/*
 * Freklo web — one design system for every page.
 * Tokens mirror the iOS app's FrekloColor semantic palette exactly
 * (bgGrouped, bgCard, textPrimary…, tint #1570EF / #4A9DFF), so the
 * site reads as the app extended onto the web. Light is the base;
 * dark redefines tokens only.
 */

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

:root {
  --ground: #EBF3FC;
  --card: #FFFFFF;
  --elevated: #FFFFFF;
  --control: #EEF2F7;
  --text: #10161F;
  --text-2: #64748B;
  --text-3: #94A3B8;
  --tint: #1570EF;
  --tint-press: #0F5BD1;
  --tint-subtle: #EBF4FF;
  --on-tint: #FFFFFF;
  --success: #17B26A;
  --success-subtle: #DCF5E9;
  --warning: #F79009;
  --destructive: #D92D20;
  --border: #E2E8F0;
  --hero-1: #4A9DFF;
  --hero-2: #1570EF;
  --hero-3: #0F5BD1;
  --on-hero: #FFFFFF;
  --on-hero-2: rgba(255, 255, 255, 0.92);
  --on-hero-3: rgba(255, 255, 255, 0.78);
  --hero-glass: rgba(255, 255, 255, 0.14);
  --hero-glass-line: rgba(255, 255, 255, 0.24);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-line: rgba(255, 255, 255, 0.55);
  --shadow: 0 12px 32px rgba(16, 22, 31, 0.09);
  --shadow-lg: 0 24px 64px rgba(16, 22, 31, 0.16);
  --sparkle: #D9EEFF;
  --radius: 24px;
  --radius-sm: 14px;
  --font-display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0B0F15;
    --card: #171E29;
    --elevated: #1D2633;
    --control: #1D2633;
    --text: #F7F9FC;
    --text-2: #94A3B8;
    --text-3: #64748B;
    --tint: #4A9DFF;
    --tint-press: #1570EF;
    --tint-subtle: #14263D;
    --on-tint: #07203E;
    --success: #2ED08B;
    --success-subtle: #10291D;
    --destructive: #FF6A5F;
    --border: #1D2633;
    --glass: rgba(23, 30, 41, 0.66);
    --glass-line: rgba(255, 255, 255, 0.09);
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
  }
}

/* `hidden` must always win — a styled display would otherwise leak
   empty controls onto the page. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--ground);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  font-size: 17px;
  overflow-x: clip; /* the page must never scroll sideways */
}

h1, h2, h3, .display { font-family: var(--font-display); text-wrap: balance; }

a { color: var(--tint); }

:focus-visible {
  outline: 3px solid var(--tint);
  outline-offset: 2px;
  border-radius: 6px;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

.skip-link {
  position: absolute; left: 16px; top: -96px; z-index: 100;
  background: var(--card); color: var(--text);
  padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Wordmark (official freklo lettering + sparkle) ---------- */

.wordmark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  line-height: 1;
}
.wordmark .wm { height: 30px; width: auto; fill: currentColor; display: block; }
.wordmark .wm .wm-spark { fill: var(--sparkle); }
@keyframes spark-shine {
  0%, 100% { opacity: 0.7; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.12); }
}
@media (prefers-reduced-motion: no-preference) {
  .wordmark .wm .wm-spark {
    animation: spark-shine 3.6s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: center;
  }
}

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  top: 12px; left: 0; right: 0;
  z-index: 50;
}
.nav-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 22px;
  padding: 10px 18px;
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: var(--shadow);
}
.nav .wordmark .wm { height: 28px; }

/* Over the hero/gradient the nav reads as blue liquid glass with white
   text (darkened enough for AA contrast); once scrolled onto content it
   returns to the standard card glass. site.js toggles .on-hero. */
.nav.on-hero .nav-bar {
  background: rgba(9, 36, 84, 0.42);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}
.nav.on-hero .wordmark { color: #FFFFFF; }
.nav.on-hero .nav-links a { color: rgba(255, 255, 255, 0.94); }
.nav.on-hero .nav-links a:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.14); }
.nav.on-hero .lang { background: rgba(255, 255, 255, 0.14); }
.nav.on-hero .lang button { color: rgba(255, 255, 255, 0.85); }
.nav.on-hero .lang button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.24); color: #FFFFFF; box-shadow: none; }
.nav.on-hero .btn-tint { background: #FFFFFF; color: var(--hero-2); }
.nav.on-hero .btn-tint:hover { background: #EBF4FF; color: var(--hero-3); }
.nav.on-hero .menu-toggle { background: rgba(255, 255, 255, 0.16); color: #FFFFFF; }
.nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin-left: auto;
}
.nav-links a {
  display: block;
  color: var(--text-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 12px;
}
.nav-links a:hover { color: var(--text); background: var(--control); }
.nav .btn { padding: 10px 18px; font-size: 15px; }

.lang {
  display: flex; gap: 2px;
  background: var(--control);
  border-radius: 999px;
  padding: 3px;
}
.lang button {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 600;
  color: var(--text-2);
  background: transparent;
  border: 0; border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(16,22,31,0.12); }

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  border: 0; border-radius: 14px;
  background: var(--control);
  color: var(--text);
  cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-toggle svg { width: 22px; height: 22px; fill: currentColor; }

@media (max-width: 900px) {
  .nav-bar .nav-links, .nav-bar .lang, .nav-bar .btn { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav-bar[data-open="true"] { flex-wrap: wrap; }
  .nav-bar[data-open="true"] .nav-links {
    display: flex; flex-direction: column; align-items: stretch;
    width: 100%; order: 10; gap: 2px; padding-top: 10px;
  }
  .nav-bar[data-open="true"] .nav-links a { padding: 12px 14px; font-size: 17px; }
  .nav-bar[data-open="true"] .lang { display: flex; order: 11; margin: 10px 0 4px; justify-content: center; }
  .nav-bar[data-open="true"] .btn { display: block; order: 12; text-align: center; width: 100%; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 17px; font-weight: 600;
  text-decoration: none;
  text-align: center;
  border: 0;
  border-radius: 16px;
  padding: 15px 26px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, opacity 0.12s ease;
}
.btn:active { transform: scale(0.98); }
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:active { transform: none; }
}

.btn-tint { background: var(--tint); color: var(--on-tint); }
.btn-tint:hover { background: var(--tint-press); color: #FFFFFF; }
.btn-quiet { background: var(--tint-subtle); color: var(--tint); }
.btn-quiet:hover { opacity: 0.85; }
.btn-hero { background: #FFFFFF; color: var(--hero-2); }
.btn-hero-quiet {
  background: var(--hero-glass);
  border: 1px solid var(--hero-glass-line);
  color: var(--on-hero);
}
.btn-hero-quiet:hover { background: rgba(255, 255, 255, 0.22); }

/* ---------- Hero / gradient surfaces ---------- */

.hero {
  background: var(--hero-2);
  background-image: linear-gradient(180deg, var(--hero-1) 0%, var(--hero-2) 52%, var(--hero-3) 100%);
  color: var(--on-hero);
  padding: 148px 0 0;
  overflow: hidden;
  position: relative;
}
.hero a:not(.btn) { color: var(--on-hero); }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding-bottom: 96px;
}
@media (max-width: 900px) {
  .hero { padding-top: 120px; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; padding-bottom: 64px; }
  .hero-copy .actions { justify-content: center; }
  .hero-visual { justify-self: center; }
}

.hero h1 {
  font-size: clamp(40px, 6.4vw, 64px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.hero .lede {
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--on-hero-2);
  margin-top: 18px;
  max-width: 34em;
}
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero .chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
@media (max-width: 900px) { .hero .chips { justify-content: center; } }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display);
  font-size: 13.5px; font-weight: 600;
  color: #FFFFFF;
  background: var(--hero-glass);
  border: 1px solid var(--hero-glass-line);
  border-radius: 999px;
  padding: 7px 14px;
}
.chip svg { width: 15px; height: 15px; fill: #A9F0C9; }

.wave {
  display: block;
  width: 100%;
  height: 72px;
  color: var(--ground);
}

/* ---------- Phone mockups (decorative) ---------- */

.hero-phones {
  position: relative;
  width: min(560px, 100%);
  min-height: 620px;
  margin: 0 auto;
}
.phone {
  width: min(320px, 78vw);
  border-radius: 48px;
  background: #0B0F15;
  padding: 10px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255, 255, 255, 0.14);
  position: relative;
}
.phone.front { position: relative; z-index: 2; }
.phone.back {
  position: absolute;
  top: 34px; right: -8px;
  width: min(280px, 66vw);
  transform: rotate(9deg);
  z-index: 1;
  opacity: 0.98;
}
@media (max-width: 700px) {
  .hero-phones { min-height: 0; }
  .phone.back { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes phone-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
  .phone.front { animation: phone-float 7s ease-in-out infinite; }
}
.phone-screen {
  border-radius: 40px;
  background: #EEF2F7;
  color: #10161F;
  overflow: hidden;
  padding: 18px 14px 20px;
}
/* Real app screenshots: the capture already carries its own status bar,
   island and tab bar — the frame just crops it. */
.phone-screen.shot { padding: 0; background: #EEF2F7; }
.phone-screen.shot img { display: block; width: 100%; height: auto; }
.phone-status {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px 2px;
  font-family: var(--font-display);
  font-size: 12px; font-weight: 700; color: #10161F;
}
.phone-status svg { width: 40px; height: 11px; fill: #10161F; }
.phone-island {
  width: 96px; height: 26px;
  background: #0B0F15;
  border-radius: 999px;
  margin: -14px auto 10px;
}
.phone-tabs {
  display: flex;
  justify-content: space-around;
  background: #FFFFFF;
  border-radius: 18px;
  margin-top: 10px;
  padding: 8px 4px 6px;
  box-shadow: 0 6px 18px rgba(16, 22, 31, 0.08);
}
.phone-tabs span {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 9px; font-weight: 600; color: #94A3B8;
}
.phone-tabs svg { width: 17px; height: 17px; fill: currentColor; }
.phone-tabs .active { color: #1570EF; }

/* Business workspace mini-screen (back phone) */
.biz-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 8px; }
.biz-title { font-family: var(--font-display); font-size: 14px; font-weight: 700; max-width: 75%; }
.biz-head svg { width: 16px; height: 16px; fill: #64748B; }
.biz-picker {
  display: inline-flex; align-items: center; gap: 6px;
  background: #FFFFFF; border-radius: 999px;
  padding: 6px 12px; margin: 0 4px 10px;
  font-size: 11.5px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(16, 22, 31, 0.06);
}
.biz-picker svg { width: 13px; height: 13px; fill: #1570EF; }
.biz-stats { display: flex; gap: 8px; }
.biz-stat {
  flex: 1;
  background: #FFFFFF; border-radius: 14px; padding: 10px 12px;
  box-shadow: 0 4px 12px rgba(16, 22, 31, 0.06);
}
.biz-stat .lbl { font-size: 9.5px; color: #64748B; }
.biz-stat .num { font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.biz-stat .pct {
  display: inline-block;
  font-size: 9px; font-weight: 700;
  color: #17B26A; background: #DCF5E9;
  border-radius: 99px; padding: 1px 7px; margin-top: 3px;
}
.biz-scan {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(90deg, #4A9DFF, #1570EF);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 12.5px; font-weight: 600;
  border-radius: 14px;
  padding: 12px;
  margin: 10px 0;
}
.biz-scan svg { width: 15px; height: 15px; fill: #FFFFFF; }
.biz-label { font-size: 10px; font-weight: 700; color: #64748B; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 4px 6px; }
.biz-row {
  display: flex; align-items: center; gap: 8px;
  background: #FFFFFF; border-radius: 12px;
  padding: 8px 10px;
  box-shadow: 0 3px 10px rgba(16, 22, 31, 0.05);
}
.biz-row + .biz-row { margin-top: 6px; }
.biz-ava {
  width: 26px; height: 26px; flex: none;
  border-radius: 999px;
  background: #EBF4FF; color: #1570EF;
  display: flex; align-items: center; justify-content: center;
}
.biz-ava svg { width: 13px; height: 13px; fill: currentColor; }
.biz-row .who { font-size: 11px; font-weight: 600; }
.biz-row .pts { font-size: 10px; font-weight: 700; color: #17B26A; }
.biz-row .when { margin-left: auto; font-size: 9.5px; color: #94A3B8; }

/* ---------- Intro trio (join / collect / get rewards) ---------- */

.intro-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; text-align: left; }
@media (max-width: 820px) { .intro-cards { grid-template-columns: 1fr; } }
.intro-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  display: flex; gap: 16px; align-items: flex-start;
}
.intro-card .icon-tile { border-radius: 999px; }
.intro-card h3 { font-size: 19px; margin-bottom: 4px; }
.intro-card p { color: var(--text-2); font-size: 15px; }
.phone-title { font-family: var(--font-display); font-size: 21px; font-weight: 700; padding: 0 4px; }
.phone-sub { font-size: 12px; color: #64748B; padding: 0 4px 12px; }

.mock-card {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 6px 18px rgba(16, 22, 31, 0.08);
}
.mock-card + .mock-card { margin-top: 10px; }
.mock-row { display: flex; align-items: center; gap: 10px; }
.mock-tile {
  width: 38px; height: 38px; flex: none;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.mock-tile svg { width: 20px; height: 20px; }
.mock-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.mock-note { font-size: 11.5px; color: #64748B; }
.mock-points { margin-left: auto; text-align: right; }
.mock-points b { font-family: var(--font-display); font-size: 17px; display: block; }
.mock-bar {
  margin-top: 12px;
  height: 8px; border-radius: 99px;
  background: #EBF4FF;
  overflow: hidden;
}
.mock-bar i {
  display: block; height: 100%; width: 70%;
  border-radius: 99px;
  background: linear-gradient(90deg, #4A9DFF, #1570EF);
}
.mock-qr { display: flex; align-items: center; gap: 12px; }
.mock-qr svg { width: 62px; height: 62px; flex: none; border-radius: 10px; }
.mock-wallet-pill {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px;
  font-size: 11.5px; font-weight: 600;
  color: #17B26A; background: #DCF5E9;
  border-radius: 999px; padding: 4px 10px;
}
.mock-wallet-pill svg { width: 13px; height: 13px; fill: currentColor; }

.hero-visual { position: relative; }
.hero-spark {
  position: absolute;
  top: -26px; right: 2px;
  width: 56px; height: 56px;
  pointer-events: none;
}
.hero-spark { fill: var(--sparkle); }
@media (prefers-reduced-motion: no-preference) {
  .hero-spark { animation: spark-shine 4.4s ease-in-out infinite; }
}

/* ---------- Sections ---------- */

.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.eyebrow {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700;
  color: var(--tint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.section h2 {
  font-size: clamp(30px, 4.4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-top: 8px;
}
.section .sub {
  color: var(--text-2);
  font-size: 18px;
  margin-top: 12px;
  max-width: 38em;
}
.center { text-align: center; }
.center .sub { margin-left: auto; margin-right: auto; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 44px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 44px; }
@media (max-width: 820px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.icon-tile {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tint-subtle);
  color: var(--tint);
  flex: none;
}
.icon-tile svg { width: 26px; height: 26px; fill: currentColor; }
.icon-tile.green { background: var(--success-subtle); color: var(--success); }

.card h3 { font-size: 23px; font-weight: 700; margin: 18px 0 6px; }
.card .desc { color: var(--text-2); font-size: 16px; }

.feature-list { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; }
.feature-list svg { width: 22px; height: 22px; flex: none; fill: var(--success); margin-top: 1px; }

/* ---------- Steps ---------- */

.step { text-align: center; padding: 8px; }
.step-num {
  font-family: var(--font-display);
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: var(--tint-subtle);
  color: var(--tint);
  font-size: 23px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { font-size: 21px; margin-bottom: 6px; }
.step p { color: var(--text-2); font-size: 16px; }

/* ---------- Wallet pass preview (decorative) ---------- */

.pass {
  width: min(340px, 86vw);
  border-radius: 20px;
  overflow: hidden;
  background: var(--elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  color: var(--text);
}
.pass-strip {
  background-image: linear-gradient(120deg, var(--hero-1), var(--hero-2));
  color: #FFFFFF;
  padding: 16px 18px 14px;
}
.pass-strip .row { display: flex; justify-content: space-between; align-items: baseline; }
.pass-brand { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.pass-type { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; }
.pass-biz { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-top: 14px; }
.pass-fields { display: flex; gap: 28px; padding: 16px 18px 6px; }
.pass-fields dt { font-size: 11px; letter-spacing: 0.07em; color: var(--text-3); text-transform: uppercase; }
.pass-fields dd { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.pass-qr { display: flex; justify-content: center; padding: 10px 0 20px; }
.pass-qr svg { width: 108px; height: 108px; border-radius: 8px; }

/* ---------- CTA band ---------- */

.cta-band {
  background-image: linear-gradient(120deg, var(--hero-2), var(--hero-1));
  border-radius: 28px;
  color: var(--on-hero);
  text-align: center;
  padding: 64px 32px;
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { font-size: clamp(28px, 4vw, 40px); }
.cta-band p { color: var(--on-hero-2); font-size: 18px; margin: 12px auto 28px; max-width: 34em; }

/* ---------- FAQ ---------- */

.faq { display: flex; flex-direction: column; gap: 12px; margin-top: 36px; }
.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.faq summary {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 600;
  padding: 18px 52px 18px 22px;
  cursor: pointer;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute; right: 22px; top: 50%;
  width: 10px; height: 10px;
  border-right: 2.5px solid var(--text-3);
  border-bottom: 2.5px solid var(--text-3);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq .answer { padding: 0 22px 20px; color: var(--text-2); font-size: 16px; }

/* ---------- Forms ---------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--control);
  border: 1.5px solid transparent;
  border-radius: 14px;
  padding: 13px 16px;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--tint);
  background: var(--card);
}
.field .err { display: none; color: var(--destructive); font-size: 13.5px; margin-top: 5px; }
.field.invalid input, .field.invalid textarea { border-color: var(--destructive); }
.field.invalid .err { display: block; }

.form-status {
  margin-top: 14px;
  font-size: 15px;
  border-radius: 14px;
  padding: 13px 16px;
}
.form-status.ok { background: var(--success-subtle); color: var(--success); }
.form-status.bad { background: var(--tint-subtle); color: var(--text-2); }

.contact-line { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 16px; }
.contact-line svg { width: 20px; height: 20px; fill: var(--tint); flex: none; }

/* ---------- Footer ---------- */

footer.site {
  background: var(--card);
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 56px 0 40px;
  color: var(--text-2);
  font-size: 15px;
}
.footer-grid { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 14px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { color: var(--text-2); text-decoration: none; }
.footer-col a:hover { color: var(--tint); }
footer .wordmark .wm { height: 24px; }
.footer-meta {
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border);
  margin-top: 40px; padding-top: 24px;
  font-size: 13.5px; color: var(--text-3);
}

/* ---------- Legal / long-form pages ---------- */

.page-head {
  background-image: linear-gradient(180deg, var(--hero-1), var(--hero-2));
  color: var(--on-hero);
  padding: 150px 0 56px;
}
.page-head h1 { font-size: clamp(32px, 5vw, 46px); }
.page-head .meta { color: var(--on-hero-2); margin-top: 10px; font-size: 16px; }

.doc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 56px);
  margin: -28px auto 72px;
  max-width: 760px;
  font-size: 16.5px;
}
.doc .toc {
  background: var(--control);
  border-radius: 18px;
  padding: 20px 24px;
  margin-bottom: 36px;
}
.doc .toc h2 { font-size: 16px; margin-bottom: 10px; }
.doc .toc ol { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.doc .toc a { text-decoration: none; }
.doc .toc a:hover { text-decoration: underline; }
.doc section { margin-top: 36px; }
.doc h2 { font-size: 22px; margin-bottom: 10px; }
.doc p, .doc li { color: var(--text-2); }
.doc p + p { margin-top: 10px; }
.doc ul { padding-left: 22px; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.doc strong { color: var(--text); }
.review-note {
  margin-top: 44px;
  font-size: 13.5px;
  color: var(--text-3);
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

/* ---------- Invite view (join/team deep-link landing) ---------- */

html[data-route="invite"] .marketing { display: none; }
.invite-wrap {
  min-height: 100dvh;
  background: var(--hero-2);
  background-image: linear-gradient(180deg, var(--hero-1) 0%, var(--hero-2) 62%, var(--hero-3) 100%);
  color: var(--on-hero);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 32px 24px;
  text-align: center;
}
.invite-card {
  width: 100%; max-width: 420px;
  background: var(--hero-glass);
  border: 1px solid var(--hero-glass-line);
  border-radius: 28px;
  padding: 34px 26px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.invite-card .icon-tile { background: rgba(255,255,255,0.18); color: #FFFFFF; width: 64px; height: 64px; border-radius: 20px; }
.invite-card .icon-tile svg { width: 30px; height: 30px; }
.invite-card h1 { font-size: 26px; }
.invite-card .lede { color: var(--on-hero-2); font-size: 16px; }
.invite-code {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700; letter-spacing: 0.14em;
  background: rgba(255,255,255,0.16);
  border-radius: 12px; padding: 8px 18px;
}
.invite-card .actions { display: flex; flex-direction: column; gap: 12px; width: 100%; margin-top: 8px; }
.invite-card .note { font-size: 14px; color: var(--on-hero-3); }
.invite-wrap .wordmark { color: #FFFFFF; }
.invite-wrap .wordmark .wm { height: 44px; }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
