/*
 * HomeDNA landing — styles.
 *
 * Values mirror the app design tokens in src/theme/tokens.ts (palette, radius,
 * spacing rhythm) and the brand fonts (Fraunces headings / DM Sans body).
 * One deliberate exception: --muted (#525260, the app's primary.600) is an
 * accessibility override of the app's text.secondary (#717182), which is sub-AA
 * on the mist surface. Standalone static CSS — no app/runtime import.
 */
:root {
  /* color — exact mirrors of tokens.ts */
  --ink: #030213;        /* text.primary / accent.dark */
  --paper: #ffffff;      /* surface.default */
  --mist: #f3f3f5;       /* surface.muted */
  --lime: #ccff00;       /* accent.main */
  --blue: #2563eb;       /* accentBlue.main */
  --line: rgba(3, 2, 19, 0.1);

  /* muted text — accessibility override (see header note) */
  --muted: #525260;
  --muted-on-dark: rgba(255, 255, 255, 0.72);

  /* soft tints for chips + the warn score */
  --lime-soft: #eaffa1;
  --blue-soft: #dce8ff;
  --coral-soft: #ffe0d9;
  --mint-soft: #d6f3ef;
  --mint: #2fa39d;
  --warn: #ea580c;
  --track: #e7e7ec;

  /* radius — tokens.ts radius scale */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* fonts — the app's brand families */
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;

  --shadow-card: 0 1px 2px rgba(3, 2, 19, 0.04), 0 12px 32px rgba(3, 2, 19, 0.06);
  --shadow-pop: 0 18px 50px rgba(3, 2, 19, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body { overflow-x: hidden; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; }

p { margin: 0; }

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

/* ── Layout primitives ───────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.hero-copy,
.mock,
.split-lead,
.card-stack,
.card,
.bento-copy,
.bento-card,
.compat,
.final-inner {
  min-width: 0;
}

.section { padding: clamp(64px, 8vw, 112px) 0; }
.section-mist { background: var(--mist); }
.section-dark { background: var(--ink); color: #fff; }

.muted { color: var(--muted); }
.muted-light { color: var(--muted-on-dark); }

.kicker,
.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 12px;
  border: 1px solid rgba(3, 2, 19, 0.12);
  border-radius: var(--r-sm);
  background: rgba(204, 255, 0, 0.16);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}
.kicker-light {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
}

h1 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(40px, 5.2vw, 72px);
  line-height: 1.04;
  letter-spacing: 0;
  max-width: 16ch;
}
h2 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
  max-width: 20ch;
}
h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.25;
}

/* ── Buttons (app accent motif: lime fill + near-black label) ─────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.button-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.button-lg { min-height: 52px; padding: 0 22px; font-size: 16px; }
.button-accent { background: var(--lime); color: var(--ink); }
.button-accent:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(204, 255, 0, 0.4); }
.button-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.button-ghost:hover { transform: translateY(-1px); background: var(--mist); }
.arrow { font-size: 1.05em; line-height: 1; }

/* ── Header ──────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(20px, 4vw, 40px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; }
.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--lime);
  font-weight: 800;
  font-size: 20px;
}
.brand-word { font-family: var(--font-head); font-weight: 700; font-size: 22px; }
.nav-links { display: flex; justify-content: center; gap: 28px; }
.nav-links a {
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
  transition: color 160ms ease;
}
.nav-links a:hover { color: var(--ink); }
.header-cta { justify-self: end; }

/* ── Hero ────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) clamp(20px, 4vw, 40px) clamp(64px, 9vw, 112px);
}
.lede {
  margin: 22px 0 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.proof {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: clamp(20px, 4vw, 44px);
  margin: 40px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.proof dt { font-family: var(--font-head); font-weight: 700; font-size: 34px; line-height: 1; }
.proof dd { margin: 6px 0 0; color: var(--muted); font-size: 14px; font-weight: 500; }

/* ── Product mock (single, app-native) ───────────────────────────────── */

.mock { position: relative; }
.mock-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.mock-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  background: var(--mist);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}
.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 700;
}
.pill-good { background: var(--lime-soft); color: var(--ink); }

.mock-score { display: flex; align-items: center; gap: 18px; margin-top: 22px; }
.ring { position: relative; display: inline-grid; place-items: center; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--track); stroke-width: 10; }
.ring-fill {
  fill: none;
  stroke: var(--lime);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 59; /* ~82% of 2πr (r=52) */
}
.ring-num {
  position: absolute;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 26px;
}
.mock-score-copy strong { display: block; font-weight: 600; font-size: 16px; }
.mock-score-copy { min-width: 0; }
.mock-score-copy p { margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.45; }

.chip-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.chip { min-width: 0; border-radius: var(--r-md); padding: 14px; }
.chip span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0; text-transform: uppercase; }
.chip strong { font-weight: 600; font-size: 16px; }
.chip-lime { background: var(--lime-soft); }
.chip-blue { background: var(--blue-soft); }
.chip-coral { background: var(--coral-soft); }
.chip-mint { background: var(--mint-soft); }

.mock-row {
  position: absolute;
  left: -18px;
  bottom: -22px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 300px;
  padding: 12px 16px 12px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
}
.mock-row p { font-size: 14px; font-weight: 500; }

.score-chip {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: var(--r-md);
  background: var(--lime);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
}
.score-warn { background: var(--warn); color: #fff; }

/* ── Generic section heading + cards ─────────────────────────────────── */

.head { margin-bottom: clamp(28px, 4vw, 44px); }
.head .kicker { margin-bottom: 14px; }

.split { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: clamp(28px, 6vw, 80px); align-items: start; }
.split-lead .muted { margin-top: 16px; font-size: 17px; line-height: 1.6; max-width: 38ch; }

.card-stack { display: grid; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.card h3 { margin-top: 4px; }
.card .muted { margin-top: 8px; font-size: 15px; line-height: 1.55; }
.num { display: inline-block; margin-bottom: 12px; color: var(--blue); font-weight: 800; font-size: 14px; }
.step, .tool-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--lime);
  font-weight: 800;
  font-size: 18px;
}

/* ── Bento (Buyer DNA) ───────────────────────────────────────────────── */

.bento { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: clamp(28px, 6vw, 72px); align-items: center; }
.bento-copy .muted { margin-top: 16px; font-size: 17px; line-height: 1.6; max-width: 42ch; }
.checks { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 30px; font-weight: 500; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 18px; height: 18px;
  border-radius: var(--r-sm);
  background: var(--lime);
  box-shadow: inset 0 0 0 1px rgba(3, 2, 19, 0.12);
}
.checks li::after {
  content: "\2713";
  position: absolute;
  left: 4px; top: 2px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}
.bento-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--shadow-card);
}
.bento-title { margin-top: 22px; font-family: var(--font-head); font-weight: 600; font-size: clamp(28px, 4vw, 44px); line-height: 1.05; }
.bento-card .chip-grid { margin-top: 24px; }

/* ── Compatibility (dark) ────────────────────────────────────────────── */

.compat { display: grid; gap: 12px; }
.compat-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.05);
}
.compat-row p { color: rgba(255, 255, 255, 0.82); font-size: 16px; }
.section-dark h2 { color: #fff; }

/* ── Final CTA ───────────────────────────────────────────────────────── */

.final { padding: clamp(64px, 8vw, 112px) 0; background: var(--mist); }
.final-inner { text-align: center; max-width: 760px; }
.final-inner .kicker { margin-bottom: 16px; }
.final-inner h2 { margin: 0 auto; }
.final-inner .muted { margin: 18px auto 30px; font-size: 18px; max-width: 52ch; }

/* ── Footer ──────────────────────────────────────────────────────────── */

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 24px;
  padding: 28px clamp(20px, 4vw, 40px);
  border-top: 1px solid var(--line);
}
.footer-brand .brand-word { font-size: 20px; }
.footer-small { font-size: 13px; }

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .nav-links { display: none; }
  .site-header { grid-template-columns: 1fr auto; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .mock { max-width: 460px; }
  .split, .bento, .grid-3, .site-footer { grid-template-columns: 1fr; }
  .grid-3 { gap: 14px; }
  .site-footer { justify-items: start; gap: 12px; }
}

@media (max-width: 640px) {
  .site-header {
    grid-template-columns: 1fr;
    min-height: 64px;
  }
  .header-cta { display: none; }
  .hero-inner {
    padding: 40px 20px 64px;
  }
  .hero-copy,
  .mock {
    width: calc(100vw - 40px);
    max-width: calc(100vw - 40px);
  }
  h1, h2 {
    max-width: 100%;
    overflow-wrap: break-word;
  }
  h1 {
    font-size: clamp(34px, 9vw, 40px);
    line-height: 1.08;
    max-width: 10.5ch;
  }
  .lede {
    max-width: 32ch;
    font-size: 17px;
  }
  .cta-row { display: grid; }
  .button-lg { width: 100%; }
  .proof {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .proof dt { font-size: 28px; }
  .proof dd { overflow-wrap: break-word; }
  .mock-card {
    width: 100%;
    max-width: 100%;
  }
  .mock-score {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .chip-grid { grid-template-columns: 1fr; }
  .mock-row {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    max-width: none;
    margin-top: 12px;
  }
  .compat-row { grid-template-columns: auto 1fr; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .button:hover, .card:hover, .nav-links a:hover { transform: none; }
}
