
/* Pre-app screens (login, magic-link callback), styled to match the landing page so signing in feels
   like part of the same product rather than a bare form bolted onto it.
   Palette and type scale are lifted from landing.html; the tokens are duplicated here on purpose so
   this file stands alone (the landing page is one big self-contained document, not a shared sheet).
   NOTE: no webfont link — the site CSP is font-src 'self' data', so a Google Fonts <link> is blocked
   and would silently fall back anyway. The system stack below is the intended rendering. */
/* LIGHT IS THE DEFAULT, and the accent is the app's rose.
   Two things were wrong here. The accent was a blue the product does not use anywhere — every page
   served off this sheet (sign in, pricing, account, terms, privacy, the callback) looked like a
   different company to the app it signs you into. And the theme followed the OPERATING SYSTEM,
   while index.html follows data-theme and defaults to light, so a visitor on a dark desktop got a
   light landing page and a dark pricing page in the same click.
   So: light on bare :root, dark only when asked for explicitly or by system preference where the
   page has not asked for light. Same three-state shape the landing uses. */
:root {
  --bg:       #f4f6fb;
  --surface:  #ffffff;
  --surface2: #edf0f8;
  --border:   #dde2f0;
  --accent:   #E64781;
  --accent2:  #CF2F6B;
  --muted:    #8898bb;
  --text:     #1e2a4a;
  --text2:    #546080;
  --white:    #0f1828;
  --danger:   #d1242f;
  --ok:       #1a7f37;
  --radius:   14px;
  --ink:      #ffffff;          /* text ON the accent colour */
}
:root[data-theme="dark"],
:root:not([data-theme="light"]):has(body[data-theme="dark"]) {
  --bg:       #0b0e16;
  --surface:  #12151f;
  --surface2: #181c28;
  --border:   #1f2538;
  --accent:   #F25A92;
  --accent2:  #F888B2;
  --muted:    #5a6480;
  --text:     #cdd5ee;
  --text2:    #7a86a8;
  --white:    #eef1fa;
  --danger:   #ff6b6b;
  --ok:       #4ade80;
  --ink:      #ffffff;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Hanken Grotesk', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Ambient glow behind the card — the landing hero's signature, toned down so it never competes
   with the form. Two soft radial pools, accent and teal. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70vw 55vh at 50% 8%, rgba(230, 71, 129,0.08), transparent 70%),
    radial-gradient(42vw 34vh at 18% 84%, rgba(56,191,160,0.05), transparent 60%);
}

/* ── top bar ──────────────────────────────────────────────────── */
.auth-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  padding: 20px 40px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
/* stacked wordmark, matching the app's .brand block (styles.css) and the front page */
.auth-nav .logo {
  display: inline-flex; flex-direction: column;
  font-size: 15.5px; font-weight: 700; line-height: .92; letter-spacing: .06em;
  color: var(--white); text-decoration: none; user-select: none;
}
.auth-nav .logo span { display: block; }
.auth-nav .logo span + span { color: var(--accent); }
.auth-nav .sp { flex: 1; }
.auth-nav a.plain {
  color: var(--text2); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: color .15s;
}
.auth-nav a.plain:hover { color: var(--text); }

/* ── layout ───────────────────────────────────────────────────── */
.center { min-height: 100%; display: grid; place-items: center; padding: 120px 24px 56px; }
.card {
  width: 100%; max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 32px 28px;
  box-shadow: 0 24px 70px rgba(0,0,0,.34);
}
@media (prefers-color-scheme: light) { .card { box-shadow: 0 20px 56px rgba(30,42,74,.10); } }

.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.section-label::before {
  content: ""; width: 22px; height: 1px; background: var(--accent); opacity: .55;
}

.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.brand .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 16px var(--accent);
}
.brand h1 { font-size: 18px; font-weight: 800; letter-spacing: -.2px; color: var(--white); }
.brand .tag { font-size: 12.5px; color: var(--muted); }

h2 {
  font-size: 23px; font-weight: 800; letter-spacing: -.4px; line-height: 1.2;
  color: var(--white); margin: 0 0 6px;
}
.sub { color: var(--text2); font-size: 13.5px; line-height: 1.5; margin-bottom: 22px; }

/* ── form ─────────────────────────────────────────────────────── */
label {
  display: block; font-size: 13px; font-weight: 500; color: var(--text2);
  letter-spacing: .02em; margin-bottom: 6px;
}
input[type="email"], input[type="text"] {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font: inherit; font-size: 15px;
  color: var(--white);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--muted); }
input[type="email"]:focus, input[type="text"]:focus {
  border-color: rgba(230, 71, 129,.45);
  box-shadow: 0 0 0 3px rgba(230, 71, 129,.10);
}
input[type="checkbox"] { width: auto; accent-color: var(--accent); }

button.primary {
  width: 100%; margin-top: 20px;
  background: var(--accent); color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 700;
  border: 0; border-radius: 10px; padding: 15px 32px;
  cursor: pointer;
  transition: background .2s, transform .2s, box-shadow .2s, opacity .2s;
}
button.primary:hover:not(:disabled) {
  background: var(--accent);
  box-shadow: 0 8px 24px rgba(230, 71, 129,.25);
}
button.primary:disabled { opacity: .45; cursor: not-allowed; }

/* ── OAuth ────────────────────────────────────────────────────────
   Deliberately NOT .primary: a second filled accent button beside "Send sign-in link" would read as
   two equally-weighted choices, and the email path is still the one that works for everybody. This is
   the surface-coloured sibling — same size and radius, less pull. */
.oauth {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--surface2); color: var(--white);
  font: inherit; font-size: 15px; font-weight: 600;
  border: 1px solid var(--border); border-radius: 10px; padding: 14px 32px;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s, opacity .2s;
}
.oauth:hover:not(:disabled) { background: var(--surface); border-color: var(--muted); }
.oauth:disabled { opacity: .45; cursor: not-allowed; }
.oauth svg { flex: none; display: block; }

/* "or" rule — two lines with the word sitting in the gap */
.or {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0 14px;
  color: var(--muted); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase;
}
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Consent, as fine print under BOTH buttons rather than a checkbox above them. A browser-default
   checkbox cannot be styled to match anything around it, and gating on it meant the primary button
   sat greyed out until ticked — which reads as a broken page rather than as a rule. */
.fineprint {
  margin-top: 16px; color: var(--muted); font-size: 12px; line-height: 1.55; text-align: center;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── feedback ─────────────────────────────────────────────────── */
.msg {
  display: none; margin-top: 18px; padding: 13px 15px;
  border-radius: 10px; font-size: 14px; line-height: 1.5;
}
.msg.show { display: block; }
.msg.ok  { background: color-mix(in srgb, var(--ok) 12%, transparent);
           border: 1px solid color-mix(in srgb, var(--ok) 34%, transparent); color: var(--ok); }
.msg.err { background: color-mix(in srgb, var(--danger) 12%, transparent);
           border: 1px solid color-mix(in srgb, var(--danger) 34%, transparent); color: var(--danger); }

.spinner {
  width: 22px; height: 22px; margin: 20px auto 0;
  border: 2px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.note {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px; color: var(--muted); line-height: 1.6;
}

@media (max-width: 560px) {
  .auth-nav { padding: 16px 20px; }
  .center { padding: 100px 18px 40px; }
  .card { padding: 28px 22px; }
  h2 { font-size: 23px; }
}

/* THE CALL TO ACTION. Big, heavy, uppercase — it is the one thing on the page we want pressed,
   and at 13px/600 in sentence case it was competing with the nav links and losing. */
.nav-cta, .btn-primary, .primary, .tier .cta button.primary, .about-cta .btn-primary {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--accent); color: #fff !important;
  font-size: 13.5px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .07em;
  text-decoration: none; border: none; cursor: pointer;
  padding: 12px 22px; border-radius: 10px;
  transition: filter .15s, transform .15s;
}
.nav-cta:hover, .btn-primary:hover, .primary:hover { }
/* The big in-page buttons are the same shape, one step larger. */
.btn-primary, .about-cta .btn-primary { font-size: 14.5px; padding: 16px 30px; }
@media (max-width: 760px) { nav { padding: 12px 20px; } .nav-plain { font-size: 14px; } }

