/* ==========================================================================
   REDLINE CAPITAL — STYLES
   Direction: classic dark luxury. Black canvas, ivory type, one red accent.
   Headlines: Playfair Display · Body & numbers: Inter
   --------------------------------------------------------------------------
   1. Tokens          5. Hero              9.  Lineup
   2. Base            6. Markets           10. Bundle
   3. Layout          7. Image band        11. Trust & FAQ
   4. Components      8. Calculator        12. CTA, Footer, Motion
   ========================================================================== */

/* 1. TOKENS --------------------------------------------------------------- */
:root {
  /* Colour */
  --black: #0a0a0a;
  --surface: #111111;
  --line: rgba(244, 239, 230, 0.1);
  --line-strong: rgba(244, 239, 230, 0.2);
  --ivory: #f4efe6;
  --muted: #c4beb7;          /* 10.5:1 on --black */
  --red: #dc2626;            /* action red */
  --red-hover: #b91c1c;
  --red-soft: rgba(220, 38, 38, 0.12);
  --red-text: #f87171;       /* red for small text on black (6.4:1) */
  --gray-bar: #3f3f46;

  /* Type */
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --text-h2: clamp(2.25rem, 1.6rem + 2.6vw, 3.75rem);
  --text-hero: clamp(2.75rem, 1.6rem + 3.6vw, 5.25rem);

  /* Space & shape */
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --space-section: clamp(5rem, 3.5rem + 6vw, 9rem);
  --radius: 2px;
  --container: 1240px;
  --nav-height: 76px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 200ms;
  --slow: 700ms;

  /* Layers */
  --z-tooltip: 30;
  --z-menu: 40;
  --z-nav: 50;
}

/* 2. BASE ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + 12px); }

body {
  margin: 0;
  background: var(--black);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--red-text); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--red); color: #fff; padding: 0.75rem 1rem;
}
.skip-link:focus { top: 1rem; }

/* 3. LAYOUT --------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 860px; }

.section { position: relative; padding: var(--space-section) 0; }
.section--alt { background: var(--surface); border-block: 1px solid var(--line); }

.section__head { max-width: 720px; margin: 0 auto 3.5rem; text-align: center; }
.section__head--left { margin-left: 0; text-align: left; }
.section__sub { color: var(--muted); font-size: var(--text-lg); font-weight: 400; margin-top: 1.25rem; }

/* 4. COMPONENTS ----------------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--red-text); margin-bottom: 1.25rem;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--red); }

.display, .heading {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.display { font-size: var(--text-hero); }
.heading { font-size: var(--text-h2); }
.heading--xl { font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.75rem); }
.display em, .heading em { font-style: italic; color: var(--red); }

.lead { font-size: var(--text-lg); font-weight: 400; color: var(--muted); max-width: 34em; margin-top: 1.75rem; }

.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon--lg { width: 28px; height: 28px; color: var(--red-text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.625rem;
  min-height: 52px; padding: 0 1.75rem;
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer; transition: background var(--fast), border-color var(--fast), color var(--fast);
}
.btn .icon { width: 16px; height: 16px; transition: transform var(--fast) var(--ease); }
.btn:hover .icon { transform: translateX(4px); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-hover); }
.btn--ghost { border-color: var(--line-strong); color: var(--ivory); background: transparent; }
.btn--ghost:hover { border-color: var(--ivory); }
.btn--sm { min-height: 44px; padding: 0 1.25rem; font-size: 0.75rem; }
.btn--block { width: 100%; }

/* Form fields */
.field { display: grid; gap: 0.5rem; }
.field label, .builder__legend {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.field input, .field select, .newsletter input {
  width: 100%; min-height: 52px; padding: 0 1rem;
  background: var(--black); border: 1px solid var(--line-strong); border-radius: var(--radius);
  font-size: 1rem; transition: border-color var(--fast);
}
.field select {
  cursor: pointer; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.field input:hover, .field select:hover { border-color: var(--muted); }
.field input:focus, .field select:focus, .newsletter input:focus { outline: none; border-color: var(--red); }
.field input[aria-invalid="true"], .newsletter input[aria-invalid="true"] { border-color: var(--red); }
.field__error { min-height: 1.25rem; font-size: var(--text-sm); color: var(--red-text); }

.input-wrap { position: relative; }
.input-wrap__prefix { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-wrap input { padding-left: 2rem; font-variant-numeric: tabular-nums; }

.fine-print { margin-top: 1.5rem; font-size: 0.8125rem; color: var(--muted); max-width: 70ch; }

/* Navigation */
.nav {
  position: fixed; inset: 0 0 auto; z-index: var(--z-nav);
  border-bottom: 1px solid transparent;
  transition: background var(--fast), border-color var(--fast);
}
.nav.is-scrolled { background: rgba(10, 10, 10, 0.88); backdrop-filter: blur(14px); border-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 2rem; height: var(--nav-height); }

.logo { display: inline-flex; align-items: baseline; gap: 0.5rem; }
.logo__bar { width: 18px; height: 4px; background: var(--red); align-self: center; }
.logo__word { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: 0.02em; }
.logo__sub { font-size: 0.6875rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }

.nav__inner > nav { margin-left: auto; }
.nav__links { display: flex; gap: 2rem; }
.nav__links a {
  position: relative; font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  padding: 0.75rem 0; transition: color var(--fast);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px; background: var(--red);
  transform: scaleX(0); transform-origin: left; transition: transform var(--fast) var(--ease);
}
.nav__links a:hover { color: var(--ivory); }
.nav__links a:hover::after { transform: scaleX(1); }

.nav__actions { display: flex; align-items: center; gap: 0.75rem; }

.nav__toggle {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer;
}

/* 5. HERO ----------------------------------------------------------------- */
.hero { position: relative; padding: calc(var(--nav-height) + clamp(3rem, 6vw, 6rem)) 0 clamp(4rem, 7vw, 7rem); overflow: hidden; }
.hero::before { /* faint red glow behind the image */
  content: ""; position: absolute; right: -10%; top: 10%; width: 60vw; height: 60vw;
  background: radial-gradient(closest-side, rgba(220, 38, 38, 0.16), transparent);
  pointer-events: none;
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }
.hero__signin { display: flex; align-items: center; gap: 0.5rem; margin-top: 1.25rem; color: var(--muted); font-size: 0.9375rem; }

/* Text-style button, used for "Sign in" in the hero */
.link-btn {
  display: inline-flex; align-items: center; gap: 0.375rem; min-height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer; color: var(--ivory); font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 6px; text-decoration-thickness: 2px;
  transition: color var(--fast);
}
.link-btn .icon { width: 16px; height: 16px; transition: transform var(--fast) var(--ease); }
.link-btn:hover { color: var(--red-text); }
.link-btn:hover .icon { transform: translateX(4px); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.chips li { position: relative; padding-left: 1rem; font-size: var(--text-sm); color: var(--muted); }
.chips li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 5px; height: 5px; background: var(--red); }

.hero__media { position: relative; }
.frame { position: relative; aspect-ratio: 5 / 4; overflow: hidden; border: 1px solid var(--line); }
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 60%; filter: saturate(1.05) contrast(1.05); }
.frame::after { /* vignette so the photo sits in the black page */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.15) 0%, transparent 35%, rgba(10, 10, 10, 0.75) 100%);
}
.hero__media::before { /* offset red corner rule */
  content: ""; position: absolute; top: -14px; right: -14px; width: 40%; height: 40%;
  border-top: 2px solid var(--red); border-right: 2px solid var(--red);
}

.quote-card {
  position: absolute; left: -2.5rem; bottom: 2.5rem; min-width: 240px;
  padding: 1.25rem 1.5rem; background: rgba(10, 10, 10, 0.86); backdrop-filter: blur(10px);
  border: 1px solid var(--line-strong); border-left: 3px solid var(--red);
}
.quote-card__row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.quote-card__price { font-family: var(--font-body); font-size: 2.5rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin-top: 0.5rem; font-variant-numeric: lining-nums tabular-nums; }
.quote-card__meta { font-size: var(--text-sm); color: var(--muted); }

.ticker { border-block: 1px solid var(--line); background: var(--surface); min-height: 46px; }

/* 6. MARKETS -------------------------------------------------------------- */
.markets { overflow: hidden; }
.markets__bg {
  position: absolute; inset: 0; opacity: 0.12; pointer-events: none;
  background: url("../assets/images/market-candles.jpg") center / cover no-repeat;
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}
.markets .container { position: relative; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: rgba(17, 17, 17, 0.85); }
.stats--secondary { grid-template-columns: 1fr 1fr 2fr; border-top: 0; }
.stat { padding: 2rem 1.75rem; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat__label { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.stat__value {
  font-family: var(--font-body); font-size: clamp(2rem, 1.5rem + 1.6vw, 2.875rem); font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.1; margin-top: 0.75rem; font-variant-numeric: lining-nums tabular-nums;
}
.stat__value--sm { font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem); margin-top: 1rem; }
.stat__note { font-size: var(--text-sm); color: var(--muted); margin-top: 0.5rem; }

.range { margin-top: 1.25rem; }
.range__track { position: relative; display: block; height: 2px; background: var(--gray-bar); }
.range__dot {
  position: absolute; top: 50%; left: 50%; width: 12px; height: 12px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--surface); transform: translate(-50%, -50%);
}

/* Analyst ratings: one stacked bar, segments separated by 2px gaps */
.ratings { display: flex; gap: 2px; height: 10px; margin-top: 1.25rem; }
.ratings__bar { height: 100%; }
.ratings__bar:first-child { border-radius: 4px 0 0 4px; }
.ratings__bar:last-child { border-radius: 0 4px 4px 0; }
.ratings__bar--buy, .swatch--buy { background: var(--red); }
.ratings__bar--hold, .swatch--hold { background: #a8a29e; }
.ratings__bar--sell, .swatch--sell { background: #57534e; }
.ratings__legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 0.875rem; font-size: var(--text-sm); }
.ratings__legend li { display: inline-flex; align-items: center; gap: 0.5rem; }
.swatch { width: 10px; height: 10px; border-radius: 2px; }

.chart-panel { margin-top: 2rem; border: 1px solid var(--line); background: var(--surface); }
.chart-panel__head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--line); }
.chart-panel__title { font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; }
.chart-panel__body { height: clamp(360px, 50vw, 520px); }
.chart-panel__body .tradingview-widget-container,
.chart-panel__body .tradingview-widget-container__widget { height: 100%; } /* lets TradingView "autosize" fill the panel */
.live-dot { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

/* 7. IMAGE BAND ------------------------------------------------------------ */
.band { position: relative; height: clamp(380px, 52vw, 620px); overflow: hidden; }
.band img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.6) brightness(0.55); }
.band__overlay {
  position: absolute; inset: 0; display: flex; align-items: flex-end; padding-bottom: clamp(2.5rem, 6vw, 5rem);
  background: linear-gradient(0deg, rgba(10, 10, 10, 0.92), rgba(10, 10, 10, 0.2) 60%);
}
.band__quote { font-family: var(--font-display); font-size: clamp(1.75rem, 1.1rem + 2.8vw, 3.5rem); line-height: 1.15; max-width: 20ch; }
.band__quote em { color: var(--red); }
.band__cite { margin-top: 1.25rem; font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

/* 8. CALCULATOR ----------------------------------------------------------- */
.calc { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; border: 1px solid var(--line); }
.calc__form { display: grid; gap: 1.25rem; align-content: start; padding: 2.5rem; background: var(--surface); border-right: 1px solid var(--line); }
.presets { display: flex; gap: 0.5rem; }
.preset {
  flex: 1; min-height: 44px; background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius);
  font-size: var(--text-sm); cursor: pointer; transition: border-color var(--fast), background var(--fast);
}
.preset:hover { border-color: var(--ivory); }
.preset.is-active { border-color: var(--red); background: var(--red-soft); }

.calc__result { position: relative; padding: 2.5rem; min-width: 0; }
.calc__label { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.calc__value {
  font-family: var(--font-body); font-size: clamp(2.75rem, 1.8rem + 3.6vw, 4.75rem); font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.05; margin-top: 0.5rem; font-variant-numeric: lining-nums tabular-nums;
}
.calc__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.calc__meta dt { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.calc__meta dd { font-size: 1.25rem; font-weight: 700; margin-top: 0.25rem; font-variant-numeric: tabular-nums; }
.is-down { color: var(--red-text); }

.history { position: relative; margin-top: 2.5rem; }
.history__title { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.history__chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.history__chart .grid-line { stroke: var(--line); stroke-width: 1; }
.history__chart .axis-label { fill: var(--muted); font-size: 12px; font-family: var(--font-body); }
.history__chart .bar { fill: var(--gray-bar); transition: fill var(--fast); pointer-events: none; }
.history__chart .bar.is-selected { fill: var(--red); }
.history__chart .bar.is-today { fill: var(--ivory); }
.history__chart .hit { fill: transparent; cursor: pointer; outline: none; }
.history__chart .hit:hover + .bar, .history__chart .hit:focus-visible + .bar { fill: #71717a; }
.history__chart .hit:hover + .bar.is-selected, .history__chart .hit:focus-visible + .bar.is-selected { fill: var(--red-hover); }
.history__chart .hit:hover + .bar.is-today, .history__chart .hit:focus-visible + .bar.is-today { fill: #d6d3d1; }
.history__chart .value-label { fill: var(--ivory); font-size: 12px; font-weight: 700; font-family: var(--font-body); }

.tooltip {
  position: absolute; z-index: var(--z-tooltip); pointer-events: none; transform: translate(-50%, calc(-100% - 10px));
  padding: 0.5rem 0.75rem; background: var(--black); border: 1px solid var(--line-strong);
  font-size: var(--text-sm); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.tooltip strong { display: block; font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

/* 9. LINEUP --------------------------------------------------------------- */
.lineup { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.car { display: flex; flex-direction: column; background: var(--black); border: 1px solid var(--line); transition: border-color var(--fast); }
.car:hover { border-color: var(--line-strong); }
.car__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.car__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--slow) var(--ease); }
.car:hover .car__media img { transform: scale(1.04); }
.car__type {
  position: absolute; top: 1rem; left: 1rem; padding: 0.375rem 0.75rem; background: rgba(10, 10, 10, 0.8);
  font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase;
}
.car__body { display: flex; flex-direction: column; flex: 1; padding: 1.75rem; }
.car__name { font-family: var(--font-display); font-size: 2rem; font-weight: 500; line-height: 1.1; }
.car__tagline { color: var(--muted); margin-top: 0.5rem; }
.car__price { display: flex; align-items: baseline; gap: 0.5rem; margin: 1.5rem 0; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.car__price span { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.car__price strong { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.car .btn { margin-top: auto; }

/* 10. BUNDLE --------------------------------------------------------------- */
.bundle__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.bundle .section__sub { margin-top: 1.5rem; }
.benefits { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
.benefits li { padding-left: 1.75rem; position: relative; color: var(--muted); }
.benefits li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 14px; height: 1px; background: var(--red); }
.benefits strong { color: var(--ivory); font-weight: 500; }

.builder { display: grid; gap: 2rem; padding: 2.5rem; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--red); }
.builder__models { border: 0; margin: 0; padding: 0; min-width: 0; }
.builder__legend { display: block; padding: 0; margin-bottom: 1rem; }
.model-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.model-option { position: relative; }
.model-option input { position: absolute; opacity: 0; }
.model-option label {
  display: grid; gap: 0.25rem; min-height: 72px; padding: 0.875rem; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: var(--radius); transition: border-color var(--fast), background var(--fast);
}
.model-option label:hover { border-color: var(--muted); }
.model-option strong { font-weight: 500; }
.model-option span { font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.model-option input:checked + label { border-color: var(--red); background: var(--red-soft); }
.model-option input:focus-visible + label { outline: 2px solid var(--red-text); outline-offset: 2px; }

.alloc-row { display: flex; align-items: center; gap: 1.25rem; }
.alloc-row output { min-width: 3.5ch; font-size: 1.5rem; font-weight: 700; text-align: right; font-variant-numeric: lining-nums; }
input[type="range"] { flex: 1; height: 44px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--red) var(--fill, 40%), var(--gray-bar) var(--fill, 40%)); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--gray-bar); }
input[type="range"]::-moz-range-progress { height: 2px; background: var(--red); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -9px; border-radius: 50%; background: var(--ivory); border: 3px solid var(--red); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ivory); border: 3px solid var(--red); }

.summary { display: grid; gap: 0.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.summary div { display: flex; justify-content: space-between; gap: 1rem; }
.summary dt { color: var(--muted); }
.summary dd { font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.summary__total { padding-top: 0.75rem; border-top: 1px solid var(--line); align-items: baseline; }
.summary__total dd { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.builder__note { font-size: 0.8125rem; color: var(--muted); margin-top: -1rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(4rem, 8vw, 6rem); border-top: 1px solid var(--line); }
.step { padding: 2rem 2rem 0 0; }
.step + .step { padding-left: 2rem; border-left: 1px solid var(--line); }
.step__num { font-family: var(--font-display); font-size: 3rem; font-style: italic; color: var(--red); line-height: 1; }
.step__title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; margin: 1rem 0 0.5rem; }
.step p { color: var(--muted); }

/* 11. TRUST & FAQ ---------------------------------------------------------- */
.trust { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.trust__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border: 1px solid var(--line); }
.trust__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.3) brightness(0.8); }
.trust__media::after { content: ""; position: absolute; inset: auto 0 0; height: 4px; background: var(--red); }
.trust .section__head { margin-bottom: 2.5rem; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 2.5rem; }
.pillar { display: grid; gap: 1rem; }
.pillar__title { font-family: var(--font-display); font-size: 1.375rem; font-weight: 500; margin-bottom: 0.375rem; }
.pillar p { color: var(--muted); font-size: 0.9375rem; }

.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  min-height: 72px; padding: 1.25rem 0; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); font-weight: 500;
  transition: color var(--fast);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; flex-shrink: 0; width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 50%; font-family: var(--font-body); font-size: 1.25rem; font-weight: 400;
  transition: transform var(--fast) var(--ease), border-color var(--fast);
}
.faq__item summary:hover { color: var(--red-text); }
.faq__item[open] summary::after { transform: rotate(45deg); border-color: var(--red); }
.faq__item p { padding: 0 3rem 1.75rem 0; color: var(--muted); max-width: 68ch; }

/* 12. CTA, FOOTER, MOTION --------------------------------------------------- */
.cta {
  position: relative; padding: var(--space-section) 0; overflow: hidden;
  background: radial-gradient(ellipse at 15% 50%, rgba(220, 38, 38, 0.22), transparent 55%), var(--black);
  border-top: 1px solid var(--line);
}
.cta__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.account-form { display: grid; gap: 0.75rem; padding: 2.5rem; background: var(--surface); border: 1px solid var(--line-strong); }
.account-form .btn { margin-top: 0.5rem; }
.form-success { padding: 1rem; border-left: 3px solid var(--red); background: var(--red-soft); }

/* Sign-in modal (native <dialog>) */
.modal {
  width: min(460px, calc(100% - 2rem)); max-height: calc(100% - 2rem); padding: 2.5rem; margin: auto;
  background: var(--surface); color: var(--ivory); border: 1px solid var(--line-strong); border-top: 3px solid var(--red);
}
.modal::backdrop { background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(4px); }
.modal[open] { animation: modal-in 300ms var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px); } }
body:has(.modal[open]) { overflow: hidden; }

.modal__close {
  position: absolute; top: 1rem; right: 1rem; width: 44px; height: 44px; display: grid; place-items: center;
  background: none; border: 1px solid var(--line-strong); border-radius: 50%; cursor: pointer; transition: border-color var(--fast);
}
.modal__close:hover { border-color: var(--ivory); }
.modal__title { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.5rem); }
.modal__sub { margin: 0.75rem 0 2rem; color: var(--muted); }
.modal__form { display: grid; gap: 0.75rem; }
.modal__form .btn { margin-top: 0.5rem; }
.modal__foot { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9375rem; }
.modal__foot a, .field__link { color: var(--ivory); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }
.modal__foot a:hover, .field__link:hover { color: var(--red-text); }

.field__row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.field__link { font-size: var(--text-sm); }
.modal .input-wrap input { padding-left: 1rem; padding-right: 4.5rem; }
.input-wrap__toggle {
  position: absolute; right: 0.25rem; top: 50%; transform: translateY(-50%); min-height: 44px; padding: 0 0.875rem;
  background: none; border: 0; cursor: pointer; color: var(--muted); font-size: var(--text-sm); font-weight: 600;
}
.input-wrap__toggle:hover { color: var(--ivory); }

.footer { padding: 5rem 0 2.5rem; background: #070707; border-top: 1px solid var(--line); }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 3rem; padding-bottom: 3rem; border-bottom: 1px solid var(--line); }
.footer__news { margin: 1.25rem 0 1rem; color: var(--muted); max-width: 40ch; font-size: 0.9375rem; }
.newsletter { display: flex; gap: 0.5rem; max-width: 420px; }
.newsletter input { min-height: 44px; }
.footer__heading { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.25rem; }
.footer__links { display: grid; gap: 0.25rem; }
.footer__links a { display: inline-block; padding: 0.375rem 0; font-size: 0.9375rem; transition: color var(--fast); }
.footer__links a:hover { color: var(--red-text); }
.footer__legal { display: grid; gap: 1rem; padding-top: 2.5rem; font-size: 0.8125rem; color: var(--muted); }
.footer__legal p { max-width: 110ch; }
.footer__copy { color: var(--ivory); }

/* Scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* RESPONSIVE --------------------------------------------------------------- */
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats .stat:nth-child(2) { border-right: 0; }
  .stats .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stats--secondary { grid-template-columns: 1fr 1fr; }
  .stats--secondary .stat--wide { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .lineup { grid-template-columns: 1fr 1fr; }
  .trust { grid-template-columns: 1fr; }
  .trust__media { aspect-ratio: 16 / 9; }
}

@media (max-width: 900px) {
  .nav__links {
    position: fixed; inset: var(--nav-height) 0 auto; z-index: var(--z-menu); flex-direction: column; gap: 0;
    padding: 1rem var(--gutter) 2rem; background: var(--black); border-bottom: 1px solid var(--line);
    transform: translateY(-120%); visibility: hidden; transition: transform var(--fast) var(--ease), visibility var(--fast);
  }
  .nav__links.is-open { transform: none; visibility: visible; }
  .nav__links a { display: block; padding: 1rem 0; font-size: 0.9375rem; border-bottom: 1px solid var(--line); }
  .nav__inner { gap: 0.75rem; }
  .nav__toggle { display: inline-flex; }
  .nav__cta { display: none; }

  .hero__grid, .calc, .bundle__grid, .cta__grid { grid-template-columns: 1fr; }
  .frame { aspect-ratio: 4 / 3; }
  .quote-card { left: 1rem; bottom: 1rem; }
  .calc__form { border-right: 0; border-bottom: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 2rem 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__top > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .stats, .stats--secondary, .lineup, .pillars { grid-template-columns: 1fr; }
  .stat, .stats .stat:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .calc__form, .calc__result, .builder, .account-form { padding: 1.5rem; }
  .calc__meta { grid-template-columns: 1fr 1fr; }
  .model-options { grid-template-columns: 1fr; }
  .hero__media::before { right: -6px; top: -6px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__signin { justify-content: center; }
  .logo__sub { display: none; }
  .modal { padding: 2rem 1.5rem; }
  .quote-card { position: relative; left: auto; bottom: auto; margin-top: -1px; }
  .footer__top { grid-template-columns: 1fr; }
  .newsletter { flex-direction: column; }
  .faq__item p { padding-right: 0; }
}
