/* ── Design tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Palette */
  --noir:        #1A1A1A;
  --surface-b:   #252525;
  --surface-c:   #2e2e2e;
  --surface-acc: #231a3a;
  --surface-acc-lo: #2d2245;   /* lighter tint for accent lower layer */
  --lime:        #C4FF4D;
  --violet:      #BA8CFF;
  --grid:        #4D4D4D;
  --text:        #E8E8E2;
  --text-muted:  #9A9A92;
  --text-on-lime:#111;

  /* Card layers (default = odd section background --noir) */
  --card-lower: #2e2e2e;   /* ::before — lower, lighter layer */
  --card-upper: #222222;   /* ::after  — upper, slightly darker layer */

  /* Spacing scale */
  --sp-1: 0.5em;
  --sp-2: 1em;
  --sp-3: 1.5em;
  --sp-4: 2em;
  --sp-5: 3em;
  --sp-6: 4.5em;
  --sp-7: 7em;

  /* Layout */
  --container: 1100px;
  --gutter:    1rem;
  --section-pad-y: 5rem;

  /* Cards */
  --card-pad: 1.75rem;
  --card-torn-bleed: 16px;
  --card-radius: 3px;
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--noir);
  color: var(--text);
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, 'Liberation Sans', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Typography ─────────────────────────────────────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; }
h3 { font-size: 1.1rem; font-weight: 600; line-height: 1.3; }

.accent-lime   { color: var(--lime); }
.accent-violet { color: var(--violet); }
.fn { font-size: 0.65em; vertical-align: super; line-height: 0; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: var(--sp-2);
}

.section-headline { margin-bottom: var(--sp-2); }
.section-subhead {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: var(--sp-3);
  max-width: 60ch;
}

.footnote {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--sp-3);
  max-width: 60ch;
}

/* Extra breathing room before footnotes in time-to-value and launch-options */
.section--time-to-value .footnote,
.section--launch-options .footnote {
  margin-top: var(--sp-5);
}

/* Extra breathing room before price caption in first-year-cost */
.section--first-year-cost .price-caption {
  margin-top: var(--sp-5);
}

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

html, body, main { overflow-x: clip; }

.section {
  padding-block: var(--section-pad-y);
}

/*
  Section alternating — driven by loop.index classes in base.html, not CSS nth-child.
  Odd  → --noir (page background, the darker one).
  Even → --surface-b (slightly lighter).
  Card layers are defined here too so cards always contrast against their section.
*/
.section--odd {
  background: var(--noir);
  --card-lower: #2e2e2e;
  --card-upper: #222222;
}
.section--even {
  background: var(--surface-b);
  --card-lower: #363636;
  --card-upper: #2d2d2d;
}

/* Footer always uses noir regardless of loop position */
.section--footer {
  background: var(--noir);
  border-top: 1px solid var(--grid);
  padding-block: var(--sp-4);
}

/* ── Site header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26,26,26,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--grid);
  padding-block: 0.875rem;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.logo-emblem { height: 24px; width: auto; }
.logo-text {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  white-space: nowrap;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.lang-link { color: var(--text-muted); transition: color 0.15s; }
.lang-link:hover { color: var(--lime); }
.lang-active { color: var(--lime); cursor: default; }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.7em 1.6em;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn:hover { opacity: 0.85; }
.btn:active { transform: translateY(1px); }

.btn--primary  { background: var(--lime); color: var(--text-on-lime); }
.btn--secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--grid);
}
.btn--secondary:hover { border-color: var(--text-muted); opacity: 1; color: var(--lime); }
.btn--outline {
  background: transparent;
  color: var(--lime);
  border: 1px solid var(--lime);
}
.btn--outline:hover { background: rgba(196,255,77,0.08); opacity: 1; }

/* ── Torn-edge cards — DOUBLE LAYER ─────────────────────────────────────────
   Two overlapping pseudo-element backgrounds, each displaced by a different
   SVG feTurbulence seed so their contours diverge. Both layers have the same
   inset — the natural randomness of different seeds means each layer randomly
   protrudes beyond the other at different spots (~50% of the perimeter).
   ::before (z-index -2): lower, slightly lighter, with a drop-shadow.
   ::after  (z-index -1): upper, slightly darker.
   Filter references are injected per-card via CSS custom properties:
     --torn-a (::before) and --torn-b (::after)
   --card-lower and --card-upper come from the parent section class.
────────────────────────────────────────────────────────────────────────────── */
.card {
  position: relative;
  padding: var(--card-pad);
  color: var(--text);
  isolation: isolate;
}

.card--torn::before {
  content: '';
  position: absolute;
  inset: calc(-1 * var(--card-torn-bleed));
  background: var(--card-lower);
  filter: var(--torn-a, url(#torn-1)) drop-shadow(0 5px 18px rgba(0,0,0,0.55));
  z-index: -2;
  border-radius: var(--card-radius);
}

.card--torn::after {
  content: '';
  position: absolute;
  inset: calc(-1 * var(--card-torn-bleed));
  background: var(--card-upper);
  filter: var(--torn-b, url(#torn-2));
  z-index: -1;
  border-radius: var(--card-radius);
}

/* Accent cards use violet-tinted layers */
.card--accent::before { background: var(--surface-acc-lo); }
.card--accent::after  { background: var(--surface-acc); }
.card--accent .card-title,
.card--accent .offer-metric {
  color: var(--violet);
}

/* ── Hero ─────────────────────────────────────────────────────────────────────── */
.section--hero {
  padding-block: calc(var(--section-pad-y) * 1.4) var(--section-pad-y);
}

/* Two-column layout: text left, logo right */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-6);
  align-items: center;
}
.hero-visual img {
  width: min(440px, 48vw);
  height: auto;
}

.hero-headline {
  max-width: 20ch;
  margin-bottom: var(--sp-3);
}

.hero-subhead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 55ch;
  margin-bottom: var(--sp-3);
}

.hero-bullets {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin-bottom: var(--sp-4);
  max-width: 55ch;
}
.hero-bullets li {
  padding-left: 1.25em;
  position: relative;
}
.hero-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--lime);
  font-weight: 700;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

/* ── Offers ─────────────────────────────────────────────────────────────────── */
/*
  Subgrid approach: .offers-grid defines 3 explicit rows (top cards / bottom cards /
  buttons). Each .offer-pair spans all 3 rows and uses subgrid to inherit them.
  This guarantees all gray offer-top cards share one row height and all violet
  offer-bottom cards share another — equal heights across all three pairs.
*/
.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-template-rows: auto auto auto;
  row-gap: 3.5rem;
  column-gap: 3.5rem;
  margin-top: var(--sp-4);
  overflow: visible;
}

.offer-pair {
  grid-row: span 3;
  display: grid;
  grid-template-rows: subgrid;
  overflow: visible;
}

.offer-top, .offer-bottom { align-self: stretch; }

.offer-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime);
  border: 1px solid var(--lime);
  padding: 0.2em 0.6em;
  margin-bottom: var(--sp-2);
  border-radius: 1px;
}

.offer-title { font-size: 1rem; margin-bottom: var(--sp-1); }
.offer-text { font-size: 0.9rem; color: var(--text-muted); }
.offer-text ul { list-style: disc; padding-left: 1.25em; }
.offer-text li { margin-block: 0.25em; }

.offer-metric {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--lime);
  line-height: 1.2;
  margin-bottom: var(--sp-1);
}
.offer-metric--2 { font-size: 1.1rem; color: var(--violet); }
.offer-case { font-size: 0.85rem; color: var(--text-muted); margin-top: var(--sp-1); }
/* narrow auto-width button, centered in its grid cell */
.offer-btn { justify-self: center; margin-top: var(--sp-1); }

/* ── Selected results ───────────────────────────────────────────────────────── */
.results-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.result-item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding-left: calc(var(--sp-2) + 2px);
  border-left: 2px solid var(--lime);
}

.result-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime);
}

.result-text { font-size: 0.95rem; color: var(--text-muted); }

/* ── Three-card blocks ──────────────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 3.5rem;
  margin-top: var(--sp-4);
  overflow: visible;
}

.card-title { margin-bottom: var(--sp-1); }
.card-text  { font-size: 0.95rem; color: var(--text-muted); }
.card-text ul { list-style: disc; padding-left: 1.25em; }
.card-text li { margin-block: 0.3em; }

/* ── Launch options (comparison table) ──────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin-top: var(--sp-4); }

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.comparison-table th,
.comparison-table td {
  padding: 0.9em 1.1em;
  text-align: left;
  border-bottom: 1px solid var(--grid);
  vertical-align: top;
}

.comparison-table th {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--violet);
  background: var(--surface-b);
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  color: var(--text-muted);
  font-size: 0.85rem;
  min-width: 8em;
}

.comparison-table td ul { list-style: disc; padding-left: 1.2em; }
.comparison-table td li { margin-block: 0.2em; }

/* ── First year cost ──────────────────────────────────────────────────────── */
.price-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  position: relative;
  margin-top: var(--sp-4);
  overflow: visible;
}

.price-col {
  display: flex;
  flex-direction: column;
}

.price-col .card { flex: 1; }

.price-col--lime   { --price-accent: var(--lime); }
.price-col--violet { --price-accent: var(--violet); }

.price-label {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--price-accent);
  text-align: center;
  margin-bottom: 0.75rem;
}

/* Gradient bar connecting $30K and $100K — clear of label text */
.price-gradient-bar {
  position: absolute;
  top: 1.1rem;
  left: calc(50% - 8rem);
  width: 16rem;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--lime), var(--violet));
  pointer-events: none;
}

/* Downward spotlight cone from price label into card */
.price-cone {
  width: 60%;
  height: 100px;
  margin-inline: auto;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  flex-shrink: 0;
  margin-bottom: calc(-1 * (var(--card-torn-bleed) + 8px));
}
.price-col--lime   .price-cone { background: linear-gradient(to bottom, rgba(196,255,77,0.55), rgba(196,255,77,0)); }
.price-col--violet .price-cone { background: linear-gradient(to bottom, rgba(186,140,255,0.5),  rgba(186,140,255,0)); }

.price-caption {
  margin-top: var(--sp-3);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
}
.price-caption .accent-lime { font-weight: 700; }

/* ── Founder ─────────────────────────────────────────────────────────────────── */
.founder-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-5);
  align-items: start;
  margin-top: var(--sp-4);
}

.founder-photo-wrap { flex-shrink: 0; }
.founder-photo {
  width: 200px;
  height: auto;         /* natural aspect ratio — no square crop */
  border-radius: 2px;
  border: 2px solid var(--grid);
}

.founder-name {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: var(--sp-2);
}

.founder-lines {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin-bottom: var(--sp-3);
}
.founder-lines li {
  font-size: 0.95rem;
  color: var(--text-muted);
  padding-left: 1.25em;
  position: relative;
}
.founder-lines li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--lime);
}

.founder-quote {
  margin-bottom: var(--sp-3);
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-3);
  border-left: 3px solid var(--lime);
}
.founder-quote p {
  font-size: 1rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.65;
}

/* ── Contacts ────────────────────────────────────────────────────────────────── */
.contacts-body {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 55ch;
  margin-bottom: var(--sp-4);
}

.contacts-cta { margin-bottom: var(--sp-3); }

.contacts-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}
.contacts-link {
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--grid);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.contacts-link:hover { color: var(--lime); border-color: var(--lime); }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.footer-layout {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  justify-content: space-between;
  align-items: center;
}

.footer-copy { font-size: 0.8rem; color: var(--text-muted); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.footer-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color 0.15s;
}
.footer-link:hover { color: var(--lime); }

/* ── Responsive ───────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --section-pad-y: 3.5rem;
    --gutter: 1.5rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }
  .hero-visual {
    order: -1;    /* logo above text on mobile */
  }
  .hero-visual img {
    width: min(200px, 60vw);
  }

  .founder-layout {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }

  .founder-photo { width: 140px; }

  .offers-grid { grid-template-columns: 1fr; grid-template-rows: none; }
  .offer-pair  { grid-row: span 1; grid-template-rows: none; display: flex; flex-direction: column; gap: 3.5rem; }
  .cards-grid  { grid-template-columns: 1fr; }
  .results-list { grid-template-columns: 1fr; }

  .price-layout { grid-template-columns: 1fr; }
  .price-gradient-bar { display: none; }

  .hero-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-layout {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  :root {
    --section-pad-y: 2.5rem;
    --gutter: 1.5rem;
  }
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.5rem; }
  .price-label { font-size: 2rem; }
}

/* ── Focus / accessibility ──────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
