/* Ledger site styles: landing, sign-in and legal pages. The app screens keep styles.css / dashboard.css. */
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-normal.woff2") format("woff2");
  font-style: normal; font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-italic.woff2") format("woff2");
  font-style: italic; font-weight: 400; font-display: swap;
}

:root {
  --bg: #0b0918; --bg-2: #0f0c1f; --card: rgba(21, 18, 42, 0.62); --card-solid: #15122a;
  --line: rgba(165, 139, 255, 0.14); --line-strong: #2a2450;
  --accent: #7c5cff; --accent-2: #a58bff; --accent-3: #d4c8ff;
  --text: #f4f2ff; --soft: #c9c3e6; --muted: #8e88b0; --green: #35d37b; --red: #ff6b81;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --radius: 22px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  font-family: var(--sans); background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
img, video, svg { display: block; max-width: 100%; }
::selection { background: rgba(124, 92, 255, 0.45); }

/* Atmosphere: soft violet glows and film grain */
.atmosphere { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.atmosphere::before, .atmosphere::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55;
}
.atmosphere::before { width: 70vw; height: 70vw; left: -20vw; top: -30vw; background: radial-gradient(circle, rgba(124, 92, 255, 0.55), transparent 65%); }
.atmosphere::after { width: 60vw; height: 60vw; right: -25vw; top: 30vh; background: radial-gradient(circle, rgba(107, 77, 240, 0.35), transparent 65%); }
.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Type */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent-2);
}
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.accent-italic {
  font-family: var(--serif); font-style: italic;
  background: linear-gradient(100deg, #d4c8ff 0%, #a58bff 45%, #7c5cff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.muted { color: var(--muted); }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand-word { font-family: var(--serif); font-size: 30px; line-height: 1; letter-spacing: 0.01em; }
.logo-mark { width: 30px; height: 26px; overflow: visible; }
/* The whole mark rises in as one piece (animating each bar separately can leave one unpainted in Chrome). */
.logo-mark { animation: logo-rise 0.9s cubic-bezier(0.2, 0.9, 0.2, 1) backwards; }
.logo-mark .sheen { animation: sheen 4.8s ease-in-out 1.2s infinite; }
@keyframes logo-rise { from { transform: translateY(30%) scale(0.85); opacity: 0; } }
@keyframes sheen { 0%, 55% { transform: translateX(-60px); } 100% { transform: translateX(60px); } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 1px solid transparent;
  font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  color: white; background: linear-gradient(100deg, #6b4df0, #8f72ff);
  box-shadow: 0 12px 34px rgba(124, 92, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover { box-shadow: 0 16px 44px rgba(124, 92, 255, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.22); transform: translateY(-1px); }
.btn-ghost { color: var(--text); border-color: rgba(244, 242, 255, 0.18); background: rgba(244, 242, 255, 0.03); }
.btn-ghost:hover { border-color: rgba(165, 139, 255, 0.6); background: rgba(124, 92, 255, 0.08); }
.btn-google { color: #1f1f1f; background: #fff; }
.btn-google:hover { box-shadow: 0 8px 26px rgba(255, 255, 255, 0.14); }
.btn-google svg { width: 20px; height: 20px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; box-shadow: none; }
.btn .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Founding / FOMO pill */
.fomo {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  padding: 9px 16px; border-radius: 999px; font-size: 13.5px; color: var(--soft);
  background: rgba(124, 92, 255, 0.1); border: 1px solid rgba(165, 139, 255, 0.28);
}
.fomo strong { color: var(--text); font-weight: 600; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(53, 211, 123, 0.6); animation: pulse 2s infinite; flex-shrink: 0; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(53, 211, 123, 0); } 100% { box-shadow: 0 0 0 0 rgba(53, 211, 123, 0); } }
.fomo .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
@media (max-width: 480px) {
  .fomo { border-radius: 18px; padding: 10px 16px; row-gap: 4px; }
  .fomo .sep { display: none; }
  .fomo .pulse + span::after { content: ""; display: block; }
}

/* Glass panel */
.glass {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Form fields */
.field { display: block; margin-bottom: 14px; }
.field-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--soft); margin-bottom: 8px; }
.field-hint { font-size: 12px; color: var(--muted); }
.field-hint.ok { color: var(--green); }
.field-hint.bad { color: var(--red); }
.input-wrap { position: relative; }
.input {
  width: 100%; height: 52px; padding: 0 16px; border-radius: 14px;
  background: rgba(11, 9, 24, 0.7); border: 1px solid var(--line-strong); color: var(--text);
  font-size: 16px; outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder { color: #5e5880; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.18); }
.input.invalid { border-color: var(--red); }
.input-wrap .input { padding-right: 52px; }
.input-action {
  position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; border-radius: 10px;
  border: none; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center;
}
.input-action:hover { color: var(--text); }
.input-action svg { width: 20px; height: 20px; }

.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.strength span { height: 4px; border-radius: 4px; background: var(--line-strong); transition: background 0.2s ease; }

.code-inputs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 6px 0 18px; }
.code-inputs input {
  width: 100%; aspect-ratio: 1 / 1.15; max-height: 64px; text-align: center; border-radius: 14px;
  background: rgba(11, 9, 24, 0.7); border: 1px solid var(--line-strong); color: var(--text);
  font-family: var(--serif); font-size: 30px; outline: none; caret-color: var(--accent-2);
}
.code-inputs input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.18); }

.divider { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.alert { border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.45; margin-bottom: 16px; }
.alert-error { background: rgba(255, 107, 129, 0.1); border: 1px solid rgba(255, 107, 129, 0.35); color: #ffc2cc; }
.alert-info { background: rgba(124, 92, 255, 0.1); border: 1px solid rgba(165, 139, 255, 0.3); color: var(--soft); }
.alert-success { background: rgba(53, 211, 123, 0.1); border: 1px solid rgba(53, 211, 123, 0.35); color: #b9f3d2; }

.text-link { color: var(--accent-2); text-decoration: none; background: none; border: none; padding: 0; cursor: pointer; font-size: inherit; }
.text-link:hover { text-decoration: underline; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
