/* UniKu marketing site (landing + waitlist). Static, no framework.
   Colours mirror lib/theme/tokens.dart and assets/legal.css
   (brand #0066FF, navy #1A2B4C, dark #0E1830). Mobile first. */

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/Manrope.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #0066ff;
  --brand-ink: #0052cc;
  --brand-soft: #e8f0ff;
  --navy: #1a2b4c;
  --bg: #f5f7fb;
  --card: #ffffff;
  --border: #e0e6f0;
  --text: #1a2b4c;
  --copy: #3d4a63;
  --muted: #6e7c91;
  --ok: #12a150;
  --ok-soft: #e6f7ee;
  --warn: #b25e00;
  --warn-soft: #fff4e0;
  --err: #d6334a;
  --err-soft: #fdecef;
  --shadow: 0 1px 2px rgba(26, 43, 76, 0.06), 0 8px 24px rgba(26, 43, 76, 0.08);
  --radius: 18px;
  --gutter: 16px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #4d93ff;
    --brand-ink: #7fb0ff;
    --brand-soft: #16284a;
    --bg: #0e1830;
    --card: #16223d;
    --border: #243452;
    --text: #eef2fa;
    --copy: #c9d2e3;
    --muted: #8e9bb3;
    --ok-soft: #10301f;
    --warn-soft: #3a2a10;
    --err-soft: #3a1720;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--copy);
  font: 16px/1.6 "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

h1, h2, h3 { color: var(--text); line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 7vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 12px; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 10px;
}
.lede { font-size: 1.1rem; color: var(--copy); max-width: 40em; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* Buttons: 44px minimum touch target. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 14px; border: 1.5px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform 160ms cubic-bezier(0.33, 1, 0.68, 1), background 160ms, box-shadow 160ms;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(0, 102, 255, 0.28); }
.btn-primary:hover { background: var(--brand-ink); }
.btn-secondary { background: var(--card); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--brand); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-sm { min-height: 40px; padding: 0 16px; border-radius: 12px; font-size: 0.92rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.2rem; color: var(--text); text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, #0066ff, #4d93ff); color: #fff; font-size: 0.95rem; font-weight: 800;
}
.nav-links { display: none; gap: 22px; margin-left: 20px; }
.nav-links a { color: var(--copy); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover { color: var(--brand); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.open-app { color: var(--muted); font-weight: 600; font-size: 0.92rem; text-decoration: none; display: none; }
.open-app:hover { color: var(--brand); }
@media (min-width: 820px) {
  .nav-links { display: flex; }
  .open-app { display: inline; }
}

/* Hero */
.hero { position: relative; padding: 48px 0 56px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto auto; width: 720px; height: 720px;
  background: radial-gradient(closest-side, rgba(0, 102, 255, 0.16), transparent);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; gap: 40px; align-items: center; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 14px; }
.hero-ctas .btn { flex: 1 1 220px; }
.hero-note { font-size: 0.88rem; color: var(--muted); }
@media (min-width: 900px) {
  .hero { padding: 80px 0 88px; }
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; }
  .hero-ctas .btn { flex: 0 0 auto; }
}

/* Phone mockup (pure CSS) */
.phone {
  width: min(300px, 82vw); margin: 0 auto; aspect-ratio: 9 / 18.5;
  border-radius: 42px; padding: 12px; background: #0e1830;
  box-shadow: 0 30px 60px rgba(14, 24, 48, 0.28), inset 0 0 0 2px #2a3a5c;
}
.screen {
  height: 100%; border-radius: 32px; background: #f5f7fb; overflow: hidden;
  display: flex; flex-direction: column; padding: 18px 14px; gap: 12px; color: #1a2b4c;
}
.screen-top { display: flex; justify-content: space-between; align-items: center; font-size: 0.72rem; font-weight: 700; color: #6e7c91; }
.screen-hello { font-weight: 800; font-size: 1.05rem; color: #1a2b4c; line-height: 1.2; }
.screen-hello small { display: block; font-weight: 600; font-size: 0.72rem; color: #6e7c91; }
.screen-card { background: #fff; border-radius: 18px; padding: 12px; box-shadow: 0 4px 14px rgba(26, 43, 76, 0.08); }
.screen-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { display: grid; justify-items: center; gap: 4px; font-size: 0.62rem; font-weight: 700; color: #3d4a63; text-align: center; }
.tile span {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem;
}
.t-blue { background: #e8f0ff; } .t-orange { background: #fff1e3; } .t-green { background: #e6f7ee; }
.t-purple { background: #f1e9ff; } .t-pink { background: #ffe9f2; } .t-teal { background: #e3f7f7; }
.screen-event { display: flex; gap: 10px; align-items: center; font-size: 0.72rem; }
.screen-event b { display: block; font-size: 0.8rem; color: #1a2b4c; }
.screen-event .badge { margin-left: auto; background: #0066ff; color: #fff; border-radius: 8px; padding: 3px 8px; font-weight: 700; font-size: 0.65rem; }
.screen-dock { margin-top: auto; display: flex; justify-content: space-around; background: #fff; border-radius: 18px; padding: 10px 6px; font-size: 1.05rem; }

/* Sections */
section { padding: 64px 0; }
.section-head { max-width: 44em; margin-bottom: 32px; }
.alt { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* Bento grid */
.bento { display: grid; gap: 14px; grid-template-columns: 1fr; }
.bento-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform 200ms cubic-bezier(0.33, 1, 0.68, 1);
}
.bento-card:hover { transform: translateY(-3px); }
.bento-card .icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 14px; }
.bento-card p { margin: 0; font-size: 0.97rem; }
.bento-card.feature { background: linear-gradient(150deg, #0066ff, #1a2b4c); color: #e8f0ff; border: 0; }
.bento-card.feature h3 { color: #fff; }
.bento-card.feature .icon { background: rgba(255, 255, 255, 0.16); }
@media (min-width: 700px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-card.feature { grid-column: span 2; }
}
@media (min-width: 1000px) {
  .bento { grid-template-columns: repeat(3, 1fr); }
  .bento-card.feature { grid-column: span 2; grid-row: span 1; }
}

/* Two-sided value */
.split { display: grid; gap: 16px; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; } }
.side { border-radius: var(--radius); padding: 28px; border: 1px solid var(--border); background: var(--card); box-shadow: var(--shadow); }
.side.vendor { background: linear-gradient(160deg, var(--brand-soft), var(--card)); }
.side ul { list-style: none; padding: 0; margin: 16px 0 22px; display: grid; gap: 10px; }
.side li { display: flex; gap: 10px; align-items: flex-start; }
.side li::before { content: "✓"; flex: 0 0 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); font-weight: 800; font-size: 0.8rem; }

/* Rollout steps */
.steps { display: grid; gap: 14px; counter-reset: step; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.step::before {
  counter-increment: step; content: counter(step);
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-weight: 800; margin-bottom: 12px;
}

/* Trust banner */
.trust {
  display: grid; gap: 18px; align-items: center; border-radius: var(--radius); padding: 28px;
  background: var(--navy); color: #c9d2e3;
}
.trust h2 { color: #fff; font-size: 1.5rem; }
.trust a { color: #9cc2ff; }
.trust-badge { width: 64px; height: 64px; border-radius: 20px; background: rgba(255, 255, 255, 0.1); display: grid; place-items: center; font-size: 2rem; }
@media (min-width: 820px) { .trust { grid-template-columns: auto 1fr auto; padding: 36px; } }

/* CTA band */
.cta-band { text-align: center; }
.cta-band .hero-ctas { justify-content: center; }
.cta-band .lede { margin: 0 auto; }
.footer-tag { margin-top: 10px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 36px 0 48px; font-size: 0.92rem; }
.footer-grid { display: grid; gap: 22px; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h4 { margin: 0 0 10px; color: var(--text); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--copy); text-decoration: none; }
.site-footer a:hover { color: var(--brand); }
.copyright { margin-top: 26px; color: var(--muted); font-size: 0.85rem; }

/* ---------- Waitlist page ---------- */
.wl { padding: 36px 0 72px; }
.wl .wrap { max-width: 640px; }
.wl-head { text-align: center; margin-bottom: 26px; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
@media (min-width: 600px) { .panel { padding: 30px; } }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; background: var(--bg); border-radius: 16px; margin-bottom: 22px; border: 1px solid var(--border); }
.tab {
  min-height: 46px; border: 0; border-radius: 12px; background: transparent; color: var(--muted);
  font: inherit; font-weight: 700; cursor: pointer; transition: background 180ms, color 180ms;
}
.tab[aria-selected="true"] { background: var(--card); color: var(--brand); box-shadow: 0 2px 8px rgba(26, 43, 76, 0.1); }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .field legend { font-weight: 700; color: var(--text); font-size: 0.93rem; padding: 0; }
.field .hint { font-size: 0.82rem; color: var(--muted); }
.req { color: var(--err); }
input[type="text"], input[type="email"], input[type="tel"], select {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--bg); color: var(--text);
  font: inherit; font-size: 16px; /* 16px stops iOS zooming on focus */
  transition: border-color 160ms, box-shadow 160ms;
}
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.15); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--err); }
.err-text { color: var(--err); font-size: 0.82rem; min-height: 0; }
.err-text:empty { display: none; }
.phone-row { display: flex; gap: 8px; }
.phone-row .prefix { flex: 0 0 auto; display: grid; place-items: center; padding: 0 14px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-weight: 800; }

fieldset { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--bg); font-weight: 600; font-size: 0.9rem; color: var(--copy);
  transition: all 160ms;
}
.chip input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.chip input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; margin: 6px 0 16px; }
.consent input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--brand); }

.turnstile-slot { min-height: 70px; margin: 8px 0 14px; display: grid; place-items: center; }
.submit { width: 100%; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; animation: spin 700ms linear infinite; display: none; }
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.notice { border-radius: 14px; padding: 12px 14px; font-size: 0.9rem; margin-bottom: 16px; }
.notice:empty { display: none; }
.notice.err { background: var(--err-soft); color: var(--err); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }

.result { text-align: center; padding: 10px 4px; animation: pop 260ms cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes pop { from { transform: scale(0.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.result-icon { width: 72px; height: 72px; border-radius: 24px; margin: 0 auto 14px; display: grid; place-items: center; font-size: 2.2rem; background: var(--ok-soft); }
.result .btn { margin-top: 8px; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 16px 0 8px; }
.preview-tag { display: inline-block; margin-top: 12px; font-size: 0.8rem; font-weight: 700; color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 4px 10px; }
[hidden] { display: none !important; }
