/* Magwai landing (SITE_MODE=landing). Warm paper, ink, and the brand gold. */
:root {
  --paper: #f6f1e8; --paper-deep: #efe7da; --card: #fffdf9; --ink: #1a1814; --ink-soft: #4a453e; --muted: #6b6560;
  --line: #e4dccf; --gold: #e8c53a; --gold-deep: #d4b022; --sky: #b7cde8; --rose: #f0c4c8; --mint: #c9e8dc; --error: #a1342b; --ok: #2f6b45;
  --serif: "Source Serif 4", Georgia, serif; --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px; --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.1; }
h3 { font-size: 1.3rem; line-height: 1.2; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; padding: 8px 12px; background: var(--ink); color: var(--paper); border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .wordmark { height: 22px; width: auto; }

/* Buttons and form */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 13px 22px; background: var(--ink); color: var(--paper); font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; transition: background-color 160ms ease-out, transform 120ms ease-out; white-space: nowrap; }
.button:hover { background: #2c2924; }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: 0.6; cursor: progress; }
.button-small { padding: 9px 16px; font-size: 13px; background: var(--gold); color: var(--ink); }
.button-small:hover { background: var(--gold-deep); }
.join { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; max-width: 480px; margin-top: 28px; }
.join input { min-width: 0; height: 48px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: 400 15px var(--sans); }
.join input::placeholder { color: #9a938b; }
.join input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 45%, transparent); }
.form-note { grid-column: 1 / -1; min-height: 1.4em; font-size: 13px; color: var(--muted); }
.form-note[data-kind="error"] { color: var(--error); }
.form-note[data-kind="ok"] { color: var(--ok); font-weight: 500; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 64px); align-items: center; padding-block: clamp(48px, 8vw, 96px) clamp(56px, 8vw, 104px); }
.hero h1 { margin-top: 18px; font-size: clamp(2.8rem, 6.4vw, 4.6rem); line-height: 0.98; letter-spacing: -0.035em; }
.dot { color: var(--gold); }
.lede { margin-top: 22px; max-width: 34em; font-size: 17px; color: var(--ink-soft); }
.hero-art { position: relative; padding-top: 72px; margin-bottom: 112px; }
.hero-art::before, .hero-art::after { content: ""; position: absolute; border-radius: 50%; z-index: -1; filter: blur(2px); }
.hero-art::before { width: 240px; height: 240px; right: -4%; top: 6%; background: color-mix(in srgb, var(--gold) 38%, var(--paper)); }
.hero-art::after { width: 200px; height: 200px; left: -6%; bottom: 0; background: color-mix(in srgb, var(--sky) 70%, var(--paper)); }
.mascot { position: absolute; top: 0; left: 18%; width: 112px; height: auto; z-index: 2; }
.tiles { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 10px; aspect-ratio: 5 / 4; }
.tile { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--paper-deep); box-shadow: 0 18px 40px rgb(26 24 20 / 0.12); }
.tile-tall { grid-row: span 2; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile figcaption { position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px; background: rgb(26 24 20 / 0.62); color: #fff; font-size: 11px; font-weight: 500; letter-spacing: 0.02em; backdrop-filter: blur(6px); }
.plan-card { position: absolute; right: -16px; bottom: -132px; width: min(272px, 72%); padding: 16px 16px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: 0 20px 48px rgb(26 24 20 / 0.16); font-size: 13px; z-index: 3; }
.plan-title { font-weight: 600; margin-bottom: 10px; }
.plan-card ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.plan-card li { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-soft); }
.credits, .plan-total span:last-child { font-variant-numeric: tabular-nums; }
.plan-total { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-weight: 600; }
.plan-approve { margin-top: 12px; padding: 9px; border-radius: 999px; background: var(--gold); text-align: center; font-weight: 600; }

/* Steps */
.steps { padding-block: clamp(56px, 8vw, 96px); border-top: 1px solid var(--line); }
.step-list { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.step-n { display: block; margin-bottom: 14px; font: 600 13px var(--sans); letter-spacing: 0.12em; color: var(--muted); font-variant-numeric: tabular-nums; }
.step-list p { margin-top: 10px; color: var(--ink-soft); }

/* Audience */
.audience { padding-block: clamp(56px, 8vw, 96px); }
.audience-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.audience-grid article { padding: 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.audience-grid article:nth-child(1) { border-top: 4px solid var(--gold); }
.audience-grid article:nth-child(2) { border-top: 4px solid var(--sky); }
.audience-grid article:nth-child(3) { border-top: 4px solid var(--rose); }
.audience-grid p { margin-top: 10px; color: var(--ink-soft); }

/* Desktop */
.desktop { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; padding-block: clamp(56px, 8vw, 96px); border-top: 1px solid var(--line); }
.desktop h2 { margin-top: 14px; }
.desktop-copy > p:last-child { margin-top: 18px; color: var(--ink-soft); max-width: 36em; }
.desktop-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.desktop-points li { padding: 16px 18px; border-radius: 12px; background: color-mix(in srgb, var(--mint) 45%, var(--paper)); color: var(--ink-soft); }
.desktop-points strong { color: var(--ink); }

/* Final CTA and footer */
.cta { padding-block: clamp(64px, 9vw, 112px); text-align: center; border-top: 1px solid var(--line); }
.cta > p { margin: 14px auto 0; max-width: 32em; color: var(--ink-soft); }
.cta .join { margin-inline: auto; text-align: left; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-block: 28px 36px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* Narrow screens */
@media (max-width: 860px) {
  .hero, .desktop { grid-template-columns: minmax(0, 1fr); }
  .hero-art { max-width: 520px; margin-bottom: 40px; }
  .step-list, .audience-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 480px) {
  .join { grid-template-columns: minmax(0, 1fr); }
  .join .button { width: 100%; }
  .plan-card { position: relative; right: auto; bottom: auto; width: 100%; margin-top: 12px; }
  .hero-art { margin-bottom: 0; }
  .button-small { padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
