/* ============================================================
   Alex — getalex.app marketing site (v2, bold redesign)
   Layout + components. Tokens come from ./styles.css.
   Dark is default; body.light flips to the warm light theme.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  line-height: 1.55;
  /* --- dark theme (default): warm lifted black --- */
  --bg: var(--ink-950);
  --bg-2: #131316;
  --surface: var(--ink-900);
  --surface-2: #232329;
  --border: var(--ink-800);
  --border-2: #38383f;
  --text: var(--web-text);
  --text-secondary: #b6b6c2;
  --text-muted: var(--web-muted);
  --accent-strong: var(--mint);
  --accent-soft: var(--accent-tint-08);
  --accent-soft-2: var(--accent-tint-15);
  --accent-line: var(--accent-tint-20);
  --glow: var(--accent-glow);
  --on-mint: #06140c;
  --shadow-card: 0 1px 0 rgba(255,255,255,0.02);
  --shadow-pop: 0 30px 80px -20px rgba(0,0,0,0.7);
  background: var(--bg);
  color: var(--text);
  transition: background .3s var(--ease-out), color .3s var(--ease-out);
}
/* Win over any equal-specificity harness reset (e.g. html,body{background:transparent}) */
body:not(.light), body.light { background: var(--bg); }

body.light {
  --bg: #f3f3ee;
  --bg-2: #ebebe4;
  --surface: #ffffff;
  --surface-2: #f6f6f1;
  --border: #e4e4dc;
  --border-2: #d6d6cc;
  --text: #111114;
  --text-secondary: #4c4c54;
  --text-muted: #87878f;
  --accent-strong: #0e7a47;
  --accent-soft: rgba(14,122,71,0.08);
  --accent-soft-2: rgba(14,122,71,0.14);
  --accent-line: rgba(14,122,71,0.24);
  --glow: rgba(14,122,71,0.10);
  --on-mint: #06140c;
  --shadow-card: 0 1px 2px rgba(17,17,20,0.04);
  --shadow-pop: 0 40px 90px -28px rgba(17,17,20,0.28);
}

a { text-decoration: none; color: inherit; }
img, svg { display: block; }
::selection { background: var(--mint); color: var(--on-mint); }

/* ---------- layout primitives ---------- */
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.section { padding: 110px 0; }
.section.tight { padding: 72px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-strong);
  font-family: var(--font-mono);
}
.eyebrow.pill {
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  padding: 7px 14px 7px 12px; border-radius: var(--radius-full);
}
.eyebrow.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-strong); box-shadow: 0 0 10px var(--accent-strong); }

h1, h2, h3 { font-weight: 600; letter-spacing: var(--tracking-tight); line-height: 1.04; }
.display {
  font-size: clamp(44px, 7.2vw, 92px);
  letter-spacing: var(--tracking-display);
  line-height: 0.98;
  font-weight: 600;
}
.display em, .accent { font-style: normal; color: var(--accent-strong); }
h2.section-title { font-size: clamp(30px, 4.6vw, 56px); }
.lede { font-size: clamp(17px, 1.6vw, 21px); color: var(--text-secondary); line-height: 1.55; }
.mono-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 16px; font-weight: 600; font-family: var(--font-sans);
  padding: 15px 26px; border-radius: var(--radius-web-btn); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap; transition: transform .15s var(--ease-out), opacity .15s, background .15s, border-color .15s;
}
.btn:active { transform: scale(0.975); }
.btn-primary { background: var(--mint); color: var(--on-mint); box-shadow: var(--shadow-glow); }
.btn-primary:hover { opacity: 0.9; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--text-muted); }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn ion-icon { font-size: 18px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 70px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand .mark { width: 34px; height: 34px; border-radius: 10px; background: #0e0e10; border: 1px solid #26262d; display: flex; align-items: center; justify-content: center; flex: none; }
.brand .mark img { width: 23px; height: 23px; }
.brand .word { font-size: 25px; font-weight: 700; letter-spacing: -0.03em; }
.nav-links { display: flex; gap: 26px; margin-left: 8px; }
.nav-links a { font-size: 15px; color: var(--text-secondary); transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-secondary);
  cursor: pointer; transition: color .15s, border-color .15s, background .15s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-2); }
.theme-toggle ion-icon { font-size: 18px; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-web-card); padding: 30px;
  box-shadow: var(--shadow-card);
  transition: border-color .2s, background .2s, transform .2s var(--ease-out);
}
.card.hover:hover { border-color: var(--border-2); transform: translateY(-3px); }
.card.feat { border-color: var(--accent-line); background: var(--accent-soft); }

/* ---------- generic helpers ---------- */
.grid { display: grid; gap: 22px; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.row { display: flex; }
.center { text-align: center; }
.muted { color: var(--text-muted); }
.divider { height: 1px; background: var(--border); border: 0; }

/* ---------- avatar chip ---------- */
.av {
  border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex: none;
}

/* ---------- phone mock ---------- */
.phone {
  width: 320px; flex: none; border-radius: 46px; padding: 12px;
  background: linear-gradient(160deg, var(--border-2), var(--border));
  box-shadow: var(--shadow-pop);
}
.phone-screen { background: #000; border-radius: 36px; overflow: hidden; position: relative; }
.phone-statusbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px 6px; color: #fff; font-size: 13px; font-weight: 600; }
.phone-statusbar .dots { display: flex; gap: 5px; align-items: center; }
.notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 96px; height: 26px; background: #000; border-radius: 16px; z-index: 3; }
.app { background: #000; color: #fff; padding: 6px 16px 16px; }

/* in-app pieces (always dark — it's the iOS app) */
.app-h { display: flex; justify-content: space-between; align-items: center; margin: 6px 2px 14px; }
.app-greet { font-size: 13px; color: #8a8a96; }
.app-name { font-size: 19px; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.app-bell { width: 34px; height: 34px; border-radius: 50%; background: #18181b; display: flex; align-items: center; justify-content: center; color: #affec9; font-size: 16px; }
.ringwrap { display: flex; flex-direction: column; align-items: center; padding: 6px 0 14px; }
.ring-sub { font-size: 12px; color: #8a8a96; margin-top: 2px; }
.ring-sub b { color: #affec9; font-weight: 600; }
.app-card { background: #18181b; border: 1px solid #27272a; border-radius: 16px; padding: 14px; margin-top: 10px; }
.ac-top { display: flex; justify-content: space-between; align-items: center; }
.ac-name { font-size: 14px; font-weight: 600; color: #fff; }
.ac-pot { font-size: 12px; color: #affec9; font-weight: 600; }
.ac-track { height: 6px; background: #27272a; border-radius: 3px; overflow: hidden; margin: 11px 0 7px; }
.ac-fill { height: 100%; background: #affec9; border-radius: 3px; }
.ac-foot { display: flex; justify-content: space-between; font-size: 11px; color: #8a8a96; }
.lbrow { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-top: 1px solid #1f1f23; }
.lbrow:first-child { border-top: 0; }
.lb-rank { font-size: 12px; font-weight: 700; width: 18px; }
.lb-name { font-size: 13px; flex: 1; color: #e7e7ea; }
.lb-steps { font-size: 12px; color: #8a8a96; }
.tabbar { display: flex; justify-content: space-around; padding: 12px 0 4px; margin: 12px -16px 0; border-top: 1px solid #1f1f23; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 9px; color: #5a5a63; }
.tab ion-icon { font-size: 19px; }
.tab.on { color: #affec9; }

/* ---------- stat band ---------- */
.statband { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: var(--radius-web-card); overflow: hidden; background: var(--surface); }
.statband .s { padding: 30px 26px; border-left: 1px solid var(--border); }
.statband .s:first-child { border-left: 0; }
.s-num { font-size: clamp(30px, 3.4vw, 44px); font-weight: 700; color: var(--accent-strong); letter-spacing: -0.03em; line-height: 1; }
.s-lab { font-size: 14px; color: var(--text-secondary); margin-top: 10px; line-height: 1.4; }

/* ---------- step / feature cards ---------- */
.bignum { font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--accent-strong); letter-spacing: 0.1em; }
.card h3 { font-size: 20px; font-weight: 600; margin: 14px 0 9px; letter-spacing: -0.01em; }
.card p { font-size: 15px; color: var(--text-secondary); line-height: 1.6; }
.ic-badge { width: 46px; height: 46px; border-radius: 13px; background: var(--accent-soft-2); display: flex; align-items: center; justify-content: center; color: var(--accent-strong); font-size: 24px; }

/* ---------- payout viz ---------- */
.payout { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.payout .pr { display: flex; align-items: center; gap: 12px; }
.payout .pr .who { display: flex; align-items: center; gap: 10px; width: 130px; font-size: 14px; }
.payout .pr .bar { flex: 1; height: 30px; border-radius: 8px; background: var(--bg-2); position: relative; overflow: hidden; }
.payout .pr .bar i { position: absolute; inset: 0; background: var(--accent-soft-2); border-right: 2px solid var(--accent-strong); }
.payout .pr .amt { width: 64px; text-align: right; font-weight: 700; font-size: 15px; }

/* ---------- quotes ---------- */
.stars { color: var(--gold); font-size: 14px; letter-spacing: 2px; }
.q { font-size: 16px; line-height: 1.65; margin: 14px 0 18px; }
.q-by { display: flex; align-items: center; gap: 11px; }
.q-name { font-size: 14px; font-weight: 600; }
.q-meta { font-size: 12px; color: var(--text-muted); }

/* ---------- waitlist form ---------- */
.wl { display: flex; gap: 10px; max-width: 460px; flex-wrap: wrap; }
.wl input {
  flex: 1; min-width: 220px; background: var(--surface); border: 1px solid var(--border-2);
  color: var(--text); font-size: 16px; padding: 15px 18px; border-radius: var(--radius-web-btn);
  outline: none; font-family: var(--font-sans); transition: border-color .15s;
}
.wl input:focus { border-color: var(--accent-strong); }
.wl input::placeholder { color: var(--text-muted); }

/* ---------- spots / cohort meter ---------- */
.cohort { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-secondary); }
.cohort .meter { width: 140px; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.cohort .meter i { display: block; height: 100%; background: var(--mint); border-radius: 3px; }
.facepile { display: flex; }
.facepile .av { width: 32px; height: 32px; margin-left: -8px; border: 2px solid var(--bg); font-size: 12px; }
.facepile .av:first-child { margin-left: 0; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 64px 0 40px; background: var(--bg-2); }
.footer-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-logo img { width: 150px; opacity: 0.95; }
.footer-tag { font-size: 14px; color: var(--text-muted); margin-top: 14px; max-width: 260px; line-height: 1.5; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.fcol h4 { font-size: 12px; font-family: var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; font-weight: 600; }
.fcol a { display: block; font-size: 15px; color: var(--text-secondary); padding: 5px 0; transition: color .15s; }
.fcol a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 12px; }
.footer-bottom span { font-size: 13px; color: var(--text-muted); }

/* ---------- faq accordion ---------- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; color: var(--text); font-family: var(--font-sans); font-size: clamp(17px, 2vw, 21px); font-weight: 600; letter-spacing: -0.01em; padding: 26px 0; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.faq-q ion-icon { font-size: 22px; color: var(--accent-strong); flex: none; transition: transform .25s var(--ease-out); }
.faq-item.open .faq-q ion-icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease-out); }
.faq-a p { font-size: 16px; color: var(--text-secondary); line-height: 1.7; padding-bottom: 26px; max-width: 720px; }

/* ---------- pricing ---------- */
.price-hero-num { font-size: clamp(72px, 12vw, 150px); font-weight: 700; letter-spacing: -0.05em; line-height: 0.9; color: var(--accent-strong); }
.tier { display: flex; align-items: baseline; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.tier .e { font-size: 26px; font-weight: 700; width: 90px; letter-spacing: -0.02em; }
.tier .d { font-size: 15px; color: var(--text-secondary); flex: 1; }
.checklist { display: flex; flex-direction: column; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; list-style: none; font-size: 16px; color: var(--text-secondary); line-height: 1.5; }
.checklist ion-icon { color: var(--accent-strong); font-size: 20px; flex: none; margin-top: 1px; }

/* ---------- reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .cols-3, .cols-4, .statband { grid-template-columns: 1fr 1fr; }
  .cols-2 { grid-template-columns: 1fr; }
  .statband .s:nth-child(odd) { border-left: 0; }
  .statband .s:nth-child(n+3) { border-top: 1px solid var(--border); }
  .nav-links { display: none; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 20px; }
  .section { padding: 72px 0; }
  .cols-3, .cols-4, .statband { grid-template-columns: 1fr; }
  .statband .s { border-left: 0; border-top: 1px solid var(--border); }
  .statband .s:first-child { border-top: 0; }
  .nav-inner { gap: 14px; }
}
