/* Stack — stackwealth.co landing page
   Light, clean marketing site. Design tokens mirror the app
   (frontend/src/styles.css) so the brand reads consistently. */

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
::selection { background: rgba(67,80,224,.16); }

/* ─── Tokens ────────────────────────────────────────────── */
:root {
  --bg:          #FBFBFD;
  --surface:     #FFFFFF;
  --surface-2:   #F4F4F7;
  --border:      #E6E6EC;
  --border-soft: #EEEEF2;
  --text:        #0B0B0F;
  --text-dim:    #6B6B78;
  --primary:       #4350E0;
  --primary-hover: #3A45C4;
  --primary-tint:  rgba(67,80,224,.07);
  --green:  #15915B;
  --red:    #D23F3F;
  --amber:  #B8730E;
  --ink-dark: #0B0B0F;

  --font: "Inter", "IBM Plex Sans Thai", -apple-system, BlinkMacSystemFont,
          "Segoe UI", sans-serif;
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 24px; --r-full: 999px;
  --shadow-sm: 0 1px 2px rgba(11,11,15,.04), 0 2px 8px rgba(11,11,15,.04);
  --shadow-md: 0 4px 14px -2px rgba(11,11,15,.08), 0 2px 6px rgba(11,11,15,.04);
  --shadow-frame: 0 2px 8px rgba(11,11,15,.06),
                  0 28px 64px -20px rgba(28,28,45,.30);
  --container: 1160px;
}

/* ─── Base ──────────────────────────────────────────────── */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { line-height: 1.18; letter-spacing: -.02em; font-weight: 700; }
.container { width: 100%; max-width: var(--container); margin-inline: auto;
  padding-inline: 24px; }
section { padding-block: clamp(68px, 9vw, 116px); }
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--primary);
}
.section-head { max-width: 660px; margin-bottom: 52px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-top: 14px; }
.section-head p { margin-top: 16px; color: var(--text-dim); font-size: 1.05rem; }
.lead { color: var(--text-dim); }

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding-inline: 26px; border-radius: var(--r-full);
  font-weight: 600; font-size: 16px; border: 1px solid transparent;
  transition: transform .14s ease, background .14s ease, box-shadow .14s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff;
  box-shadow: 0 1px 2px rgba(11,11,15,.10), 0 8px 22px -8px rgba(67,80,224,.55); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: var(--surface); color: var(--text);
  border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 42px; padding-inline: 18px; font-size: 15px; }
.btn-lg { height: 56px; padding-inline: 32px; font-size: 17px; }
/* Pre-launch "coming soon" label — looks like a button slot but is
   informational, not an action (download opens after E2 ships). */
.btn-soon {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 50px; padding-inline: 24px; border-radius: var(--r-full);
  font-weight: 600; font-size: 15px; white-space: nowrap; cursor: default;
  background: var(--surface-2); color: var(--text-dim);
  border: 1px solid var(--border);
}
.btn-soon::before { content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary); flex: none; }
.btn-soon.btn-sm { height: 40px; padding-inline: 15px; font-size: 13.5px; }
.btn-soon.btn-lg { height: 56px; font-size: 16px; }
.cta-final .panel .btn-soon { background: rgba(255,255,255,.09);
  color: #e9e9f1; border-color: rgba(255,255,255,.20); }
:focus-visible { outline: 2.5px solid var(--primary); outline-offset: 2px;
  border-radius: 4px; }

/* ─── Nav ───────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,251,253,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-in { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700;
  font-size: 19px; letter-spacing: -.02em; }
.brand svg { flex: none; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { color: var(--text-dim); font-size: 15px; font-weight: 500;
  transition: color .14s ease; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; }
.nav-panel { display: none; }
#nav-check { display: none; }

/* ─── Hero ──────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; text-align: center;
  padding-block: clamp(60px, 8vw, 104px) clamp(56px, 7vw, 92px); }
.hero::before {
  content: ""; position: absolute; inset: -20% 0 auto 0; height: 620px;
  background: radial-gradient(620px 340px at 50% 0%,
              rgba(67,80,224,.13), transparent 70%);
  pointer-events: none; z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); font-size: 13px; font-weight: 600;
  color: var(--text-dim); margin-bottom: 26px;
}
.hero-badge b { color: var(--text); }
.hero h1 { font-size: clamp(2.15rem, 5.4vw, 3.7rem); max-width: 14ch;
  margin-inline: auto; }
.hero h1 .accent { color: var(--primary); }
.hero-sub { margin: 22px auto 0; max-width: 60ch; font-size: 1.12rem;
  color: var(--text-dim); }
.hero-actions { margin-top: 32px; display: flex; gap: 14px;
  justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 14px; color: var(--text-dim);
  display: flex; gap: 8px 18px; justify-content: center; flex-wrap: wrap; }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-shot { margin-top: 54px; }

/* ─── App window frame (for screenshots) ────────────────── */
.app-frame {
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--border);
  background: #141419; box-shadow: var(--shadow-frame);
}
.app-frame__bar { height: 38px; display: flex; align-items: center; gap: 8px;
  padding-inline: 15px; background: #141419; border-bottom: 1px solid #25252e; }
.app-frame__dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.app-frame__bar span:nth-child(1) { background: #ff5f57; }
.app-frame__bar span:nth-child(2) { background: #febc2e; }
.app-frame__bar span:nth-child(3) { background: #28c840; }
.app-frame__title { margin-left: 8px; font-size: 12px; color: #6b6b78;
  font-weight: 500; }
.app-frame img { display: block; width: 100%; height: auto; }
.hero-shot .app-frame { max-width: 1000px; margin-inline: auto; }

/* ─── Asset chips strip ─────────────────────────────────── */
.assets-strip { border-block: 1px solid var(--border-soft);
  background: var(--surface); }
.assets-strip .container { padding-block: 30px; }
.assets-strip p { text-align: center; font-size: 13px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip { padding: 8px 15px; border-radius: var(--r-full);
  background: var(--surface-2); border: 1px solid var(--border-soft);
  font-size: 14px; font-weight: 500; color: var(--text); }

/* ─── Problem ───────────────────────────────────────────── */
.problem { background: var(--surface); border-bottom: 1px solid var(--border-soft); }
.problem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
  align-items: center; }
.versus { display: grid; gap: 12px; }
.versus-row { display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--bg); font-size: 15px; }
.versus-row .x { color: var(--red); flex: none; font-weight: 700; }
.versus-row.win { border-color: rgba(67,80,224,.35);
  background: var(--primary-tint); }
.versus-row.win .x { color: var(--primary); }

/* ─── Personas ──────────────────────────────────────────── */
.persona-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.persona {
  padding: 30px; border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease;
}
.persona:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.persona-ico { width: 48px; height: 48px; border-radius: var(--r-md);
  background: var(--primary-tint); display: grid; place-items: center;
  margin-bottom: 18px; }
.persona h3 { font-size: 1.18rem; }
.persona .role { font-size: 13px; font-weight: 600; color: var(--primary);
  margin-bottom: 12px; }
.persona p { color: var(--text-dim); font-size: 15px; margin-bottom: 16px; }
.persona ul { list-style: none; display: grid; gap: 9px; }
.persona li { display: flex; gap: 9px; font-size: 14.5px; }
.persona li svg { flex: none; margin-top: 3px; color: var(--green); }

/* ─── Feature blocks ────────────────────────────────────── */
.feature { padding-block: clamp(56px, 7vw, 96px); }
.feature + .feature { border-top: 1px solid var(--border-soft); }
.feature-in { display: grid; grid-template-columns: 1fr 1.12fr; gap: 60px;
  align-items: center; }
.feature:nth-child(even) .feature-copy { order: 2; }
.feature-tag { display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--primary);
  background: var(--primary-tint); padding: 6px 12px;
  border-radius: var(--r-full); margin-bottom: 16px; }
.feature-copy h3 { font-size: clamp(1.5rem, 3vw, 2.05rem); }
.feature-copy > p { margin-top: 14px; color: var(--text-dim);
  font-size: 1.05rem; }
.feature-list { list-style: none; margin-top: 22px; display: grid; gap: 13px; }
.feature-list li { display: flex; gap: 11px; font-size: 15.5px; }
.feature-list li svg { flex: none; margin-top: 3px; color: var(--primary); }
.feature-list li b { font-weight: 600; }
.beta-tag { font-size: 11px; font-weight: 700; letter-spacing: .04em;
  color: var(--amber); background: rgba(184,115,14,.10);
  padding: 2px 7px; border-radius: 5px; vertical-align: middle; }

/* ─── Privacy ───────────────────────────────────────────── */
.privacy { background: var(--ink-dark); color: #F4F4F7; }
.privacy .eyebrow { color: #9aa0ff; }
.privacy .section-head h2 { color: #fff; }
.privacy .section-head p { color: #9a9aa8; }
.privacy-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.privacy-card { padding: 26px; border-radius: var(--r-lg);
  background: #141419; border: 1px solid #25252e; }
.privacy-card svg { color: #9aa0ff; margin-bottom: 14px; }
.privacy-card h3 { font-size: 1.05rem; color: #fff; }
.privacy-card p { margin-top: 8px; font-size: 14px; color: #9a9aa8; }

/* ─── Comparison table ──────────────────────────────────── */
.compare-wrap { overflow-x: auto; border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.compare { width: 100%; border-collapse: collapse; min-width: 680px;
  background: var(--surface); }
.compare th, .compare td { padding: 16px 18px; text-align: center;
  border-bottom: 1px solid var(--border-soft); font-size: 15px; }
.compare thead th { font-size: 14px; color: var(--text-dim);
  font-weight: 600; background: var(--surface-2); }
.compare thead th.col-stack { color: var(--primary); }
.compare tbody th { text-align: left; font-weight: 500; }
.compare td.col-stack { background: var(--primary-tint); font-weight: 600; }
.compare tr:last-child td, .compare tr:last-child th { border-bottom: 0; }
.compare .yes { color: var(--green); font-weight: 700; }
.compare .no  { color: #C2C2CC; }
.compare .price-stack { color: var(--primary); font-weight: 700; }

/* ─── Pricing ───────────────────────────────────────────── */
.pricing { background: var(--surface); border-top: 1px solid var(--border-soft); }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  align-items: start; }
.price-card { padding: 30px; border: 1px solid var(--border);
  border-radius: var(--r-lg); background: var(--bg); position: relative; }
.price-card.featured { border-color: var(--primary); border-width: 1.5px;
  background: var(--surface); box-shadow: 0 16px 40px -16px rgba(67,80,224,.32); }
.price-flag { position: absolute; top: -13px; left: 50%;
  transform: translateX(-50%); background: var(--primary); color: #fff;
  font-size: 12px; font-weight: 700; padding: 5px 14px;
  border-radius: var(--r-full); white-space: nowrap; }
.price-card h3 { font-size: 1.1rem; }
.price-amount { margin-top: 14px; display: flex; align-items: baseline; gap: 6px; }
.price-amount .num { font-size: 2.5rem; font-weight: 700;
  letter-spacing: -.03em; }
.price-amount .per { color: var(--text-dim); font-size: 15px; }
.price-sub { margin-top: 6px; font-size: 14px; color: var(--text-dim);
  min-height: 21px; }
.price-save { display: inline-block; margin-top: 10px; font-size: 12.5px;
  font-weight: 700; color: var(--green); background: rgba(21,145,91,.10);
  padding: 3px 9px; border-radius: var(--r-full); }
.price-card .btn, .price-card .btn-soon { width: 100%; margin-top: 22px; }
.founding {
  margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 16px; padding: 18px 24px; border-radius: var(--r-lg);
  background: linear-gradient(100deg, rgba(67,80,224,.08), rgba(67,80,224,.02));
  border: 1px dashed rgba(67,80,224,.4);
}
.founding .gem { font-size: 18px; }
.founding b { color: var(--primary); }
.founding .spread { margin-left: auto; font-size: 14px; color: var(--text-dim); }
.price-foot { text-align: center; margin-top: 24px; font-size: 14px;
  color: var(--text-dim); }

/* ─── FAQ ───────────────────────────────────────────────── */
.faq-list { max-width: 760px; margin-inline: auto; display: grid; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); overflow: hidden; }
.faq-item summary { list-style: none; cursor: pointer; padding: 20px 22px;
  font-weight: 600; font-size: 16px; display: flex; align-items: center;
  gap: 14px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; margin-left: auto; font-size: 22px;
  font-weight: 400; color: var(--text-dim); transition: transform .18s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 22px 20px; color: var(--text-dim);
  font-size: 15px; }

/* ─── Final CTA ─────────────────────────────────────────── */
.cta-final { text-align: center; }
.cta-final .panel {
  position: relative; overflow: hidden;
  padding: clamp(48px, 7vw, 80px) 32px; border-radius: var(--r-xl);
  background: var(--ink-dark); color: #fff;
}
.cta-final .panel::before {
  content: ""; position: absolute; inset: auto -10% -60% -10%; height: 380px;
  background: radial-gradient(500px 280px at 50% 100%,
              rgba(67,80,224,.55), transparent 70%);
}
.cta-final .panel > * { position: relative; }
.cta-final h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.cta-final p { margin: 14px auto 28px; color: #b9b9c6; max-width: 48ch; }

/* ─── Footer ────────────────────────────────────────────── */
.footer { background: var(--surface); border-top: 1px solid var(--border); }
.footer .container { padding-block: 56px 36px; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer-brand p { margin-top: 14px; color: var(--text-dim); font-size: 14.5px;
  max-width: 34ch; }
.footer-col h4 { font-size: 13px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-dim); margin-bottom: 14px; }
.footer-col a { display: block; padding: 5px 0; color: var(--text);
  font-size: 15px; }
.footer-col a:hover { color: var(--primary); }
.footer-disc { margin-top: 40px; padding-top: 24px;
  border-top: 1px solid var(--border-soft); font-size: 13px;
  color: var(--text-dim); display: flex; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; }
.footer-disc p { max-width: 60ch; }

/* ─── Legal / content pages (privacy, terms) ────────────── */
.legal { padding-block: clamp(52px, 8vw, 92px); }
.legal .container { max-width: 760px; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.legal .legal-updated { margin-top: 10px; color: var(--text-dim);
  font-size: 14px; }
.legal .legal-intro { margin-top: 18px; color: var(--text-dim);
  font-size: 1.06rem; line-height: 1.7; }
.legal h2 { font-size: 1.2rem; margin-top: 42px; }
.legal h2 + p { margin-top: 10px; }
.legal p { margin-top: 13px; line-height: 1.75; }
.legal ul { margin-top: 12px; padding-left: 22px; display: grid; gap: 9px; }
.legal li { line-height: 1.7; }
.legal a { color: var(--primary); }
.legal .legal-note { margin-top: 40px; padding: 18px 20px;
  background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: var(--r-md); font-size: 14px; color: var(--text-dim); }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links, .nav-cta .btn, .nav-cta .btn-soon { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-panel { position: absolute; top: 68px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 14px 24px 22px; box-shadow: var(--shadow-md); }
  #nav-check:checked ~ .nav-panel { display: block; }
  .nav-panel a { display: block; padding: 12px 0; font-weight: 500;
    border-bottom: 1px solid var(--border-soft); }
  .nav-panel .btn, .nav-panel .btn-soon { display: flex; width: 100%; margin-top: 14px; }
  .problem-grid, .feature-in { grid-template-columns: 1fr; gap: 36px; }
  .feature:nth-child(even) .feature-copy { order: 0; }
  .persona-grid { grid-template-columns: 1fr; }
  .privacy-grid { grid-template-columns: repeat(2, 1fr); }
  .price-grid { grid-template-columns: 1fr; }
  .price-card.featured { order: -1; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
  body { font-size: 16px; }
  .privacy-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .founding .spread { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
