/* Sugar Rush platform shell.
   Design language follows sugarrush.tech: Source Serif 4 light/italic
   headings, ink #1a2238, soft pastel radial-blob gradient, airy layout. */

:root {
  --ink: #1a2238;
  --ink-muted: #5a6280;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --border: rgba(26, 34, 56, 0.12);
  --font-heading: "Source Serif 4", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  --edge: clamp(12px, 2vw, 20px);
  --radius: 12px;
  --ok: #2f7d4f;
  --bad: #b3363b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.6;
  background: linear-gradient(165deg, #f7fbff 0%, #fffaf5 48%, #f8f4ff 100%);
  -webkit-font-smoothing: antialiased;
}

/* Pastel blob field, same recipe as sugarrush.tech */
body::before {
  content: "";
  position: fixed;
  inset: -30%;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(ellipse 130% 110% at 12% 18%, rgba(200, 221, 255, 0.62) 0%, rgba(200, 221, 255, 0.18) 42%, transparent 78%),
    radial-gradient(ellipse 120% 100% at 88% 12%, rgba(228, 212, 255, 0.58) 0%, rgba(228, 212, 255, 0.14) 38%, transparent 74%),
    radial-gradient(ellipse 125% 105% at 8% 88%, rgba(200, 240, 224, 0.55) 0%, rgba(200, 240, 224, 0.12) 40%, transparent 76%),
    radial-gradient(ellipse 115% 95% at 92% 82%, rgba(255, 212, 200, 0.5) 0%, rgba(255, 212, 200, 0.1) 36%, transparent 72%),
    radial-gradient(ellipse 150% 130% at 52% 52%, rgba(255, 233, 184, 0.42) 0%, rgba(255, 233, 184, 0.08) 48%, transparent 82%);
  filter: blur(88px);
}

body::after {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 90% 80% at 38% 62%, rgba(200, 221, 255, 0.28) 0%, transparent 68%),
    radial-gradient(ellipse 85% 75% at 62% 38%, rgba(228, 212, 255, 0.24) 0%, transparent 64%),
    radial-gradient(ellipse 100% 90% at 50% 50%, rgba(255, 255, 255, 0.45) 0%, transparent 58%);
  filter: blur(56px);
  mix-blend-mode: soft-light;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 300;
  letter-spacing: -0.01em;
}

/* ── Nav ─────────────────────────────────────────────────────────────── */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1040px;
  margin: 0 auto;
  padding: calc(var(--edge) + 6px) 24px;
}

.nav .brand {
  font-family: var(--font-heading);
  font-weight: 300;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.nav .links { display: flex; gap: 22px; align-items: center; }
.nav .links a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.nav .links a:hover { color: var(--ink); }

/* ── Buttons ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 11px 24px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.93rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.btn:hover { opacity: 0.86; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-ghost {
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn[disabled] { opacity: 0.5; cursor: default; }

main { max-width: 1040px; margin: 0 auto; padding: 0 24px 88px; }

/* ── Hero ────────────────────────────────────────────────────────────── */

.hero { text-align: center; padding: 84px 0 60px; }
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.18;
  margin-bottom: 20px;
}
.hero h1 em { font-style: italic; }
.hero p {
  font-size: 1.12rem;
  color: var(--ink-muted);
  max-width: 600px;
  margin: 0 auto 34px;
}
.hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Cards ───────────────────────────────────────────────────────────── */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  padding: 28px 0;
}

.card {
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.card h3 { font-size: 1.22rem; margin-bottom: 8px; }
.card p { color: var(--ink-muted); font-size: 0.94rem; }

.section-title {
  text-align: center;
  font-size: 2rem;
  font-style: italic;
  margin: 64px 0 8px;
}
.section-sub {
  text-align: center;
  color: var(--ink-muted);
  margin-bottom: 30px;
}

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.steps .num {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.14em;
  margin-bottom: 10px;
}

/* ── Forms (onboard / login) ─────────────────────────────────────────── */

.form-shell { max-width: 560px; margin: 44px auto 0; }
.form-shell h1 { font-size: 2.2rem; font-style: italic; margin-bottom: 8px; }
.form-shell > p { color: var(--ink-muted); margin-bottom: 30px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.field .hint { font-weight: 400; color: var(--ink-muted); }
.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.field input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.field .note { font-size: 0.82rem; color: var(--ink-muted); margin-top: 5px; }
.field .note.ok { color: var(--ok); }
.field .note.bad { color: var(--bad); }

.error-box, .success-box {
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.92rem;
  margin: 18px 0;
}
.error-box { background: rgba(179, 54, 59, 0.08); color: var(--bad); border: 1px solid rgba(179, 54, 59, 0.25); }
.success-box { background: rgba(47, 125, 79, 0.08); border: 1px solid rgba(47, 125, 79, 0.22); }

.reveal {
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 20px;
}
.reveal h3 { font-size: 1.35rem; margin-bottom: 4px; }
.reveal .warn { color: #a05a00; font-size: 0.88rem; margin-bottom: 16px; }

.kv { margin-bottom: 14px; }
.kv .k {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.kv .v {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.84rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
  margin-top: 4px;
  word-break: break-all;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.kv .copy {
  flex-shrink: 0;
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-body);
}
.kv .copy:hover { border-color: var(--ink); }

footer {
  border-top: 1px solid var(--border);
  color: var(--ink-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 26px 24px;
}
footer a { color: var(--ink-muted); }
