/* ==========================================================================
   FILMDIGIT — stylesheet
   Design language: "scanning bench". Near-black ink, brand ember gradient,
   hairline rules, sprocket motifs, monospaced numerals for anything measured.
   Light + dark themes are driven entirely by the token block below.
   ========================================================================== */

/* --------------------------------------------------------------- reset -- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.25rem);
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

/* The width/height attributes on <img> are presentational hints that map to
   CSS width/height. They are kept in the markup so the browser can reserve the
   right box before the image loads, but the height must stay derived from the
   aspect ratio — otherwise constraining only the width squashes the image. */
img {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

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

/* Several elements are toggled from JS with the `hidden` property. The UA rule
   for it is only `display: none`, which any component rule setting a display
   would silently beat — so enforce it here. */
[hidden] {
  display: none !important;
}

p,
h1,
h2,
h3,
h4 {
  overflow-wrap: break-word;
}

ul {
  list-style: none;
}

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

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

/* --------------------------------------------------------------- tokens -- */
:root {
  /* Brand ramp, sampled from the logo artwork */
  --gold: #ffc000;
  --amber: #ffa00a;
  --orange: #ff7a00;
  --ember: #ff4400;
  --ember-grad: linear-gradient(120deg, var(--gold) 0%, var(--orange) 52%, var(--ember) 100%);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --header-h: 68px;
  --container: 1180px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);

  --r-xs: 2px;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;

  --ease: cubic-bezier(0.22, 0.7, 0.3, 1);
  --t-fast: 0.14s var(--ease);
  --t-base: 0.24s var(--ease);
}

/* Light — warm paper, ink text, deepened ember so it passes on white */
:root,
[data-theme="light"] {
  color-scheme: light;

  --bg: #faf8f5;
  --bg-2: #f2eee8;
  --surface: #ffffff;
  --surface-2: #f7f4f0;
  --surface-3: #ece7e0;

  --line: #e2dbd1;
  --line-2: #cfc6b9;

  --text: #16161a;
  --text-2: #56545c;
  --text-3: #8b8891;

  --accent: #d84f00;
  --accent-hi: #b84000;
  --accent-soft: rgba(216, 79, 0, 0.08);
  --accent-line: rgba(216, 79, 0, 0.28);
  --on-accent: #1a1206;
  --brand-ink-a: #52525f;
  --brand-ink-b: #050509;
  --hero-film: rgba(22, 22, 16, 0.075);

  --console-bg: #17171c;
  --console-line: #2c2c36;
  --console-text: #f2f0ee;
  --console-text-2: #9c99a4;

  --shadow-sm: 0 1px 2px rgba(30, 22, 14, 0.06);
  --shadow-md: 0 6px 22px -10px rgba(30, 22, 14, 0.28);
  --shadow-lg: 0 24px 60px -28px rgba(30, 22, 14, 0.4);
  --glow: 0 0 0 rgba(0, 0, 0, 0);
}

/* Dark — the projection-booth default */
[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0b0b0e;
  --bg-2: #101015;
  --surface: #15151b;
  --surface-2: #1b1b23;
  --surface-3: #23232d;

  --line: #26262f;
  --line-2: #35353f;

  --text: #ededf2;
  --text-2: #a3a1ad;
  --text-3: #706e7b;

  --accent: #ff9412;
  --accent-hi: #ffb040;
  --accent-soft: rgba(255, 148, 18, 0.12);
  --accent-line: rgba(255, 148, 18, 0.32);
  --on-accent: #180d02;
  --brand-ink-a: #ffffff;
  --brand-ink-b: #868da3;
  --hero-film: rgba(255, 255, 255, 0.10);

  --console-bg: #101016;
  --console-line: #2a2a34;
  --console-text: #ededf2;
  --console-text-2: #8f8d99;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 26px -12px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, 0.9);
  --glow: 0 0 44px -12px rgba(255, 122, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    color-scheme: dark;

    --bg: #0b0b0e;
    --bg-2: #101015;
    --surface: #15151b;
    --surface-2: #1b1b23;
    --surface-3: #23232d;

    --line: #26262f;
    --line-2: #35353f;

    --text: #ededf2;
    --text-2: #a3a1ad;
    --text-3: #706e7b;

    --accent: #ff9412;
    --accent-hi: #ffb040;
    --accent-soft: rgba(255, 148, 18, 0.12);
    --accent-line: rgba(255, 148, 18, 0.32);
    --on-accent: #180d02;
    --brand-ink-a: #ffffff;
    --brand-ink-b: #868da3;
    --hero-film: rgba(255, 255, 255, 0.10);

    --console-bg: #101016;
    --console-line: #2a2a34;
    --console-text: #ededf2;
    --console-text-2: #8f8d99;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 26px -12px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, 0.9);
    --glow: 0 0 44px -12px rgba(255, 122, 0, 0.35);
  }
}

/* --------------------------------------------------------------- branding -- */
/* The logo artwork is a two-tone SVG held once in an inline <symbol> sprite.
   Both tones are gradients: the reel and the "film" half take #fd-ink, the
   pixels and the "digit" half take #fd-ember — one asset serves both themes.

   #fd-ink's stops read --brand-ink-a/b, declared in the theme blocks above.
   That works because the gradient lives in the sprite's <defs>, so a var() on
   its stops resolves against the *gradient's own* inherited context (<html>
   down), NOT the element referencing it via fill: url(). Setting the tokens on
   :root is therefore what makes the ink gradient theme-aware — putting them on
   .brand would not reach it. */
.brand-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* The width/height attributes on these <svg>s exist so the box is known before
   CSS applies, but — like on <img> — they are presentational hints. Neutralise
   BOTH axes here so each call site can set one and have the other follow the
   viewBox ratio; the per-site rules below are more specific and still win. */
.brand {
  display: block;
  width: auto;
  height: auto;
  color: var(--text);
}

/* ------------------------------------------------------------- primitives -- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.band {
  position: relative;
  padding-block: clamp(3.75rem, 8vw, 6.5rem);
}

.band--alt {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

/* Sprocket rule — the recurring film-edge motif used as a section divider */
.perf-rule {
  height: 9px;
  background: repeating-linear-gradient(
    90deg,
    var(--line-2) 0 13px,
    transparent 13px 32px
  );
  opacity: 0.75;
}

.perf-rule--accent {
  background: repeating-linear-gradient(
    90deg,
    var(--accent-line) 0 13px,
    transparent 13px 32px
  );
  opacity: 1;
}

/* Section heading: [ 02 ] eyebrow, tight display title, optional lede */
.section-head {
  max-width: 62ch;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head--wide {
  max-width: none;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1rem;
}

.eyebrow__idx {
  color: var(--accent);
}

.eyebrow::after {
  content: "";
  flex: 1;
  max-width: 90px;
  height: 1px;
  background: var(--line-2);
}

.section-title {
  font-size: clamp(1.85rem, 4.4vw, 2.9rem);
  line-height: 1.06;
  letter-spacing: -0.032em;
  font-weight: 800;
}

.section-lede {
  margin-top: 1rem;
  font-size: clamp(1rem, 1.6vw, 1.09rem);
  color: var(--text-2);
  max-width: 58ch;
}

.accent-text {
  background: var(--ember-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--r-sm);
  font-size: 0.94rem;
  font-weight: 650;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-base),
    background-color var(--t-base), border-color var(--t-base), color var(--t-base);
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--ember-grad);
  color: var(--on-accent);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  box-shadow: var(--shadow-md), var(--glow);
  filter: saturate(1.08) brightness(1.04);
}

.btn--ghost {
  border-color: var(--line-2);
  color: var(--text);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.btn--full {
  width: 100%;
}

.btn__spinner {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Arrow link used across pricing rows and lists */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0.4rem 0.1rem;
  transition: gap var(--t-fast), color var(--t-fast);
}

.arrow-link svg {
  width: 14px;
  height: 14px;
}

.arrow-link:hover {
  gap: 0.7rem;
  color: var(--accent-hi);
}

/* ---------------------------------------------------------------- header -- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.nav__logo {
  display: block;
  flex-shrink: 0;
}

.nav__logo .brand {
  height: 24px;
  transition: transform var(--t-base);
}

.nav__logo:hover .brand {
  transform: scale(1.04);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.nav__link {
  position: relative;
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background-color var(--t-fast);
}

.nav__link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav__link--active {
  color: var(--text);
}

.nav__link--active::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.18rem;
  height: 2px;
  border-radius: 1px;
  background: var(--ember-grad);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
}

.nav__cta {
  padding: 0.55rem 1.05rem;
  font-size: 0.87rem;
}

/* Language + theme controls */
.lang-switch {
  display: flex;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.lang-switch__btn {
  padding: 0.32rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-3);
  transition: color var(--t-fast), background-color var(--t-fast);
}

.lang-switch__btn:hover {
  color: var(--text);
}

.lang-switch__btn--active {
  background: var(--text);
  color: var(--bg);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--text-2);
  transition: color var(--t-fast), border-color var(--t-fast);
}

.icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent-line);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

/* Only the icon matching the active theme mode is shown */
.theme-toggle__icon {
  display: none;
}

[data-theme="auto"] .theme-toggle__icon--auto,
[data-theme="light"] .theme-toggle__icon--light,
[data-theme="dark"] .theme-toggle__icon--dark {
  display: block;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 0 8px;
}

.menu-toggle span {
  display: block;
  height: 1.5px;
  background: var(--text);
  border-radius: 1px;
  transition: transform var(--t-base), opacity var(--t-fast);
}

.menu-toggle--open span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.menu-toggle--open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle--open span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* ------------------------------------------------------------------ hero -- */
.hero {
  position: relative;
  padding-block: clamp(3.25rem, 8vw, 6rem) clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}

/* Ember bloom behind the hero, scaled back on light where it would muddy */
.hero::before {
  content: "";
  position: absolute;
  top: -28%;
  right: -12%;
  width: min(760px, 82vw);
  aspect-ratio: 1;
  background: radial-gradient(
    circle,
    rgba(255, 122, 0, 0.16) 0%,
    rgba(255, 68, 0, 0.06) 42%,
    transparent 68%
  );
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero__title {
  font-size: clamp(2.35rem, 6.6vw, 4.15rem);
  line-height: 1.02;
  letter-spacing: -0.042em;
  font-weight: 800;
  margin-bottom: 1.25rem;
}

.hero__subtitle {
  font-size: clamp(1.02rem, 1.9vw, 1.18rem);
  color: var(--text-2);
  max-width: 46ch;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.hero__stat {
  background: var(--bg);
  padding: 0.9rem 1rem;
}

.hero__stat-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1.2;
}

.hero__stat-label {
  display: block;
  font-size: 0.76rem;
  color: var(--text-3);
  margin-top: 0.15rem;
}

/* Hero visual: the reel sitting in a lit "gate" with a travelling scan line */
.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 5 / 4;
  max-width: 480px;
  margin-inline: auto;
  width: 100%;
}

/* Ember bloom sitting under the pixel cloud, so the dissolve reads as lit by
   the scanner rather than floating on the background. */
.hero__visual::before {
  content: "";
  position: absolute;
  right: -6%;
  top: 50%;
  width: 62%;
  aspect-ratio: 1;
  transform: translateY(-50%);
  background: radial-gradient(
    circle,
    rgba(255, 122, 0, 0.28) 0%,
    rgba(255, 68, 0, 0.1) 45%,
    transparent 70%
  );
  pointer-events: none;
}

/* A real 16mm strip lying diagonally behind the mark — depth and context, not
   decoration. The geometry comes from the same GAUGES table that draws the
   pricing-table strips, so the pitch and perforations are to true scale.
   Kept faint: it is texture, and the mark has to stay the subject. */
.hero__film {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  transform: translate(-50%, -50%) rotate(-20deg);
  /* Alpha lives in the colour, not in `opacity`, so each theme can be tuned
     independently — light-on-dark reads at a lower alpha than dark-on-light. */
  color: var(--hero-film);
  overflow: hidden;
  /* the rotated box overhangs into the text column, where the mask has already
     faded it to nothing — so it must never intercept a click */
  pointer-events: none;
  /* dissolve both ends so the strip never shows a cut edge */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

/* Wider than its box so advancing the film never exposes a gap at the end. */
.hero__film svg {
  width: 112%;
  height: auto;
  animation: film-advance 3.6s linear infinite;
}

/* --advance is set by app.js to exactly one frame pitch; the strip being
   pitch-periodic, that makes the loop seamless with no visible jump. */
@keyframes film-advance {
  to {
    transform: translateX(var(--advance, -3.8%));
  }
}

/* The scanner lamp passing over the film. Lives inside the rotated strip, so
   it travels along the film's own axis and is clipped to it. */
.hero__film::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 20%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 176, 64, 0.55),
    transparent
  );
  animation: film-scan 5.2s ease-in-out infinite;
}

@keyframes film-scan {
  0%,
  100% {
    transform: translateX(-30%);
    opacity: 0;
  }
  22% {
    opacity: 1;
  }
  78% {
    opacity: 1;
  }
  50% {
    transform: translateX(430%);
  }
}

.hero__mark {
  position: relative;
  z-index: 2;
  width: 88%;
}

@media (prefers-reduced-motion: reduce) {
  .hero__film svg,
  .hero__film::after {
    animation: none;
  }

  /* park the lamp mid-strip instead of sweeping it */
  .hero__film::after {
    transform: translateX(200%);
    opacity: 0.6;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ------------------------------------------------------------- workflow -- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.step {
  position: relative;
  background: var(--bg);
  padding: clamp(1.4rem, 2.4vw, 2rem);
  transition: background-color var(--t-base);
}

.band--alt .step {
  background: var(--bg-2);
}

.step:hover {
  background: var(--surface);
}

.step::before {
  /* accent bar wipes in along the top edge on hover */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ember-grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}

.step:hover::before {
  transform: scaleX(1);
}

.step__num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.step__title {
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.018em;
  margin-bottom: 0.45rem;
}

.step__desc {
  font-size: 0.9rem;
  color: var(--text-2);
}

/* ---------------------------------------------------------- capabilities -- */
/* Fixed 3×2 rather than auto-fit: the grid's own background shows through any
   empty cell, so the column count has to divide the six items exactly. */
.caps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.cap {
  background: var(--bg);
  padding: clamp(1.5rem, 2.6vw, 2rem);
  transition: background-color var(--t-base);
}

.band--alt .cap {
  background: var(--bg-2);
}

.cap:hover {
  background: var(--surface);
}

.cap__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 1.05rem;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-sm);
  color: var(--accent);
  background: var(--accent-soft);
}

.cap__icon svg {
  width: 20px;
  height: 20px;
}

.cap__title {
  font-size: 1.03rem;
  font-weight: 700;
  letter-spacing: -0.018em;
  margin-bottom: 0.45rem;
}

.cap__desc {
  font-size: 0.9rem;
  color: var(--text-2);
}

/* --------------------------------------------------------- rate tables -- */
.rate-block + .rate-block {
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
}

.rate-block__title {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.rate-block__note {
  font-size: 0.9rem;
  color: var(--text-2);
  margin-bottom: 1.4rem;
  max-width: 62ch;
}

.rate-table {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface);
}

.rate-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr) minmax(0, 1.1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem clamp(0.9rem, 2vw, 1.35rem);
  border-bottom: 1px solid var(--line);
  transition: background-color var(--t-fast);
}

.rate-table--addons .rate-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) minmax(0, 0.85fr);
}

.rate-row:last-child {
  border-bottom: 0;
}

.rate-row:not(.rate-row--head):hover {
  background: var(--surface-2);
}

.rate-row--head {
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-3);
}

.rate-cell--format {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.rate-cell--muted {
  font-size: 0.88rem;
  color: var(--text-2);
}

.rate-cell--price {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.rate-cell--price b {
  font-weight: 600;
  color: var(--accent);
}

.rate-cell-sub {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--text-3);
}

.rate-cell--action {
  justify-self: end;
}

/* Film-gauge thumbnails injected by app.js */
.gauge {
  display: block;
  flex-shrink: 0;
  height: 40px;
  width: calc(40px * var(--vbw, 8.5) / 30.6);
  color: var(--text-3);
  cursor: zoom-in;
  transition: color var(--t-fast), transform var(--t-fast);
}

.gauge svg {
  height: 100%;
  width: 100%;
}

.rate-row:hover .gauge {
  color: var(--accent);
  transform: scale(1.06);
}

.rate-note {
  display: flex;
  gap: 0.55rem;
  font-size: 0.84rem;
  color: var(--text-3);
  margin-top: 0.85rem;
  max-width: 78ch;
}

.rate-note::before {
  content: "—";
  color: var(--accent);
  flex-shrink: 0;
}

/* ------------------------------------------------------------ calculator -- */
/* The calculator is a dark "console" in both themes: it reads as instrument
   panel, and keeps the readout legible without theme-specific tuning. */
.console {
  background: var(--console-bg);
  color: var(--console-text);
  border: 1px solid var(--console-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.console__head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem clamp(1.1rem, 2.6vw, 1.9rem);
  border-bottom: 1px solid var(--console-line);
  background: rgba(255, 255, 255, 0.02);
}

.console__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 10px 1px rgba(255, 122, 0, 0.7);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.console__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--console-text-2);
}

.console__body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
}

.console__controls {
  padding: clamp(1.25rem, 2.8vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1.65rem;
  border-right: 1px solid var(--console-line);
}

.field__label {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--console-text-2);
  margin-bottom: 0.85rem;
}

.field__readout {
  margin-left: auto;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold);
}

/* Format picker — gauge tiles, not radio pills */
.gauge-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(94px, 1fr));
  gap: 0.5rem;
}

.gauge-opt {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.4rem 0.6rem;
  border: 1px solid var(--console-line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color var(--t-fast), background-color var(--t-fast);
}

.gauge-opt:hover {
  border-color: rgba(255, 148, 18, 0.45);
  background: rgba(255, 148, 18, 0.05);
}

.gauge-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gauge-opt .gauge {
  height: 34px;
  width: calc(34px * var(--vbw, 8.5) / 30.6);
  color: var(--console-text-2);
  cursor: inherit;
  transition: color var(--t-fast);
}

.gauge-opt__name {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  color: var(--console-text-2);
  line-height: 1.25;
  transition: color var(--t-fast);
}

.gauge-opt:has(input:checked) {
  border-color: var(--orange);
  background: rgba(255, 122, 0, 0.1);
}

.gauge-opt:has(input:checked) .gauge,
.gauge-opt:has(input:checked) .gauge-opt__name {
  color: var(--gold);
}

.gauge-opt:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Segmented control for the length unit */
.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  border: 1px solid var(--console-line);
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.25);
}

.segmented__opt {
  position: relative;
  padding: 0.42rem 0.95rem;
  border-radius: 3px;
  font-size: 0.82rem;
  font-weight: 550;
  color: var(--console-text-2);
  cursor: pointer;
  transition: color var(--t-fast), background-color var(--t-fast);
}

.segmented__opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented__opt:hover {
  color: var(--console-text);
}

.segmented__opt:has(input:checked) {
  background: var(--ember-grad);
  color: var(--on-accent);
}

.segmented__opt:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Sliders */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--console-line);
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ember-grad);
  border: 2px solid var(--console-bg);
  box-shadow: 0 0 0 1px var(--orange), 0 0 12px rgba(255, 122, 0, 0.55);
  cursor: grab;
}

.slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid var(--console-bg);
  box-shadow: 0 0 0 1px var(--orange);
  cursor: grab;
}

.slider::-webkit-slider-thumb:active,
.slider::-moz-range-thumb:active {
  cursor: grabbing;
}

.fps-track {
  position: relative;
  padding-bottom: 1.5rem;
}

.fps-marks {
  position: relative;
  height: 1rem;
  margin-top: 0.5rem;
}

.fps-mark {
  position: absolute;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--console-text-2);
  opacity: 0.65;
  user-select: none;
}

.field__hint {
  margin-top: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--console-text-2);
}

/* Add-on checkboxes */
.addons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.addon {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--console-line);
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color var(--t-fast), background-color var(--t-fast);
}

.addon:hover {
  border-color: rgba(255, 148, 18, 0.45);
}

.addon input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.addon__box {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  border: 1px solid var(--console-line);
  border-radius: 3px;
  transition: background var(--t-fast), border-color var(--t-fast);
}

.addon__box::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--on-accent);
  border-bottom: 2px solid var(--on-accent);
  transform: rotate(-45deg) scale(0);
  transition: transform var(--t-fast);
  margin-top: -2px;
}

.addon:has(input:checked) {
  border-color: var(--orange);
  background: rgba(255, 122, 0, 0.08);
}

.addon:has(input:checked) .addon__box {
  background: var(--ember-grad);
  border-color: transparent;
}

.addon:has(input:checked) .addon__box::after {
  transform: rotate(-45deg) scale(1);
}

.addon:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.addon__price {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--console-text-2);
  white-space: nowrap;
}

/* Readout panel */
.console__readout {
  padding: clamp(1.25rem, 2.8vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.22);
}

.readout__line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--console-text-2);
}

.readout__line b {
  font-family: var(--font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--console-text);
}

.readout__rule {
  height: 1px;
  background: var(--console-line);
}

.readout__total {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.readout__total-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--console-text-2);
}

.readout__total-amount {
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 4.5vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  background: var(--ember-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.readout__flag {
  display: flex;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--gold);
  background: rgba(255, 192, 0, 0.08);
  border: 1px solid rgba(255, 192, 0, 0.22);
  border-radius: var(--r-sm);
  padding: 0.5rem 0.7rem;
}

.readout__add {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.readout__qty {
  width: 68px;
  padding: 0.7rem 0.55rem;
  text-align: center;
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--console-line);
  border-radius: var(--r-sm);
  color: var(--console-text);
}

.readout__qty:focus {
  border-color: var(--orange);
  outline: none;
}

.readout__add .btn {
  flex: 1;
}

/* ----------------------------------------------------------------- quote -- */
.quote {
  margin-top: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
}

.quote__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.quote__title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
}

.quote__scroll {
  overflow-x: auto;
}

.quote__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 620px;
}

.quote__table th {
  padding: 0.7rem 1rem;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.quote__table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.quote__table tr:last-child td {
  border-bottom: 0;
}

.quote__addons {
  font-size: 0.8rem;
  color: var(--text-2);
}

.quote__qty {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.quote__qty-btn {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--text-2);
  transition: background-color var(--t-fast), color var(--t-fast);
}

.quote__qty-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.quote__qty-value {
  min-width: 26px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.quote__price {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 550;
}

.quote__remove {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--text-3);
  border-radius: var(--r-sm);
  font-size: 1.15rem;
  line-height: 1;
  transition: color var(--t-fast), background-color var(--t-fast);
}

.quote__remove:hover {
  color: #e5484d;
  background: rgba(229, 72, 77, 0.1);
}

.quote__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.quote__grand {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.quote__grand-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.quote__grand-amount {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.quote__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quote__btn {
  padding: 0.55rem 1rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  font-size: 0.83rem;
  font-weight: 550;
  color: var(--text-2);
  transition: color var(--t-fast), border-color var(--t-fast),
    background-color var(--t-fast);
}

.quote__btn:hover {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.quote__btn--primary {
  background: var(--ember-grad);
  border-color: transparent;
  color: var(--on-accent);
}

.quote__btn--primary:hover {
  color: var(--on-accent);
  filter: brightness(1.05);
}

/* ----------------------------------------------------------------- specs -- */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 1rem;
}

.spec {
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent-line);
  border-radius: var(--r-sm);
  background: var(--surface);
  transition: border-left-color var(--t-base), transform var(--t-base);
}

.spec:hover {
  border-left-color: var(--accent);
  transform: translateX(3px);
}

.spec__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
}

.spec__idx {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--accent);
}

.spec__text {
  font-size: 0.88rem;
  color: var(--text-2);
}

.delivery {
  margin-top: clamp(2.25rem, 4vw, 3.25rem);
}

.delivery__list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.delivery__item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.95rem 1.2rem;
  background: var(--surface);
  font-size: 0.92rem;
  color: var(--text-2);
  transition: background-color var(--t-fast);
}

.delivery__item:hover {
  background: var(--surface-2);
}

.delivery__item::before {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-top: 0.55rem;
  border-radius: 1px;
  background: var(--ember-grad);
}

/* --------------------------------------------------------------- contact -- */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: start;
}

.contact__card {
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

/* Stacked lockup (~1.28:1) — needs a little size before the wordmark reads. */
.contact__logo {
  width: 188px;
  margin-bottom: 1.5rem;
}

.contact__rows {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.contact__row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.contact__row-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.contact__row a:hover {
  color: var(--accent);
}

.contact__row-value {
  font-weight: 550;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form__label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-3);
}

.form__input {
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.form__input::placeholder {
  color: var(--text-3);
}

.form__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea.form__input {
  resize: vertical;
  min-height: 128px;
}

.form__attach {
  border: 1px dashed var(--accent-line);
  border-radius: var(--r-sm);
  padding: 0.95rem 1.1rem;
  background: var(--accent-soft);
}

.form__check {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
  font-weight: 550;
  cursor: pointer;
}

.form__check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.form__check-box {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  transition: background var(--t-fast), border-color var(--t-fast);
}

.form__check-box::after {
  content: "";
  width: 9px;
  height: 5px;
  margin-top: -2px;
  border-left: 2px solid var(--on-accent);
  border-bottom: 2px solid var(--on-accent);
  transform: rotate(-45deg) scale(0);
  transition: transform var(--t-fast);
}

.form__check:has(input:checked) .form__check-box {
  background: var(--ember-grad);
  border-color: transparent;
}

.form__check:has(input:checked) .form__check-box::after {
  transform: rotate(-45deg) scale(1);
}

.form__check:has(input:focus-visible) .form__check-box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form__quote-preview {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--accent-line);
  font-size: 0.83rem;
  color: var(--text-2);
}

.form__quote-lines {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.form__quote-total {
  margin-top: 0.5rem;
  font-weight: 600;
  color: var(--text);
}

.form__status {
  padding: 0.8rem 1rem;
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  border: 1px solid;
}

.form__status--error {
  color: #e5484d;
  border-color: rgba(229, 72, 77, 0.35);
  background: rgba(229, 72, 77, 0.08);
}

.form__status--success {
  color: #30a46c;
  border-color: rgba(48, 164, 108, 0.35);
  background: rgba(48, 164, 108, 0.08);
}

.form__success {
  padding: 1.75rem;
  text-align: center;
  border: 1px solid rgba(48, 164, 108, 0.35);
  background: rgba(48, 164, 108, 0.08);
  border-radius: var(--r-md);
  color: var(--text);
}

/* ---------------------------------------------------------------- footer -- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding-block: clamp(2.25rem, 4vw, 3.25rem) 1.5rem;
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
}

.footer__logo {
  height: 26px;
  margin-bottom: 0.9rem;
}

.footer__tagline {
  font-size: 0.9rem;
  color: var(--text-2);
  max-width: 44ch;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__col-title {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.2rem;
}

.footer__col a {
  font-size: 0.88rem;
  color: var(--text-2);
  transition: color var(--t-fast);
}

.footer__col a:hover {
  color: var(--accent);
}

.footer__bottom {
  padding-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-3);
}

/* ----------------------------------------------------------- gauge modal -- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 1.5rem;
}

.modal--open {
  display: grid;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 8, 0.78);
  backdrop-filter: blur(3px);
}

.modal__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: min(440px, 92vw);
  padding: 2rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.modal__figure {
  color: var(--accent);
  height: min(62vh, 420px);
}

.modal__figure svg {
  height: 100%;
  width: auto;
}

.modal__caption {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--text-2);
}

.modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  color: var(--text-3);
  transition: color var(--t-fast), background-color var(--t-fast);
}

.modal__close:hover {
  color: var(--text);
  background: var(--surface-2);
}

.modal__close svg {
  width: 17px;
  height: 17px;
}

/* ------------------------------------------------------------ responsive -- */
@media (max-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero__visual {
    order: -1;
    max-width: 340px;
  }

  .console__body {
    grid-template-columns: 1fr;
  }

  .console__controls {
    border-right: 0;
    border-bottom: 1px solid var(--console-line);
  }

  .steps,
  .caps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact__grid {
    grid-template-columns: 1fr;
  }
}

/* The header CTA is the first thing to go when the bar gets tight. */
@media (max-width: 1080px) {
  .nav__cta {
    display: none;
  }
}

/* …and below this the links themselves collapse into the drawer. */
@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
  }

  .nav__actions {
    margin-left: auto;
  }

  .nav__menu {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-130%);
    visibility: hidden;
    transition: transform var(--t-base), visibility var(--t-base);
  }

  .nav__menu--open {
    transform: translateY(0);
    visibility: visible;
  }

  .nav__link {
    padding: 0.85rem 0.5rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .nav__link--active::after {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 60px;
  }

  /* Pricing table collapses to stacked cards */
  .rate-row,
  .rate-table--addons .rate-row {
    grid-template-columns: 1fr auto;
    gap: 0.5rem 1rem;
    padding: 1rem;
  }

  .rate-row--head {
    display: none;
  }

  .rate-cell--format {
    grid-column: 1 / -1;
  }

  .rate-cell--muted {
    grid-column: 1;
  }

  .rate-cell--price {
    grid-column: 2;
    text-align: right;
  }

  .rate-table--addons .rate-cell--muted {
    grid-column: 1 / -1;
    order: 3;
  }

  .rate-cell--action {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .quote__foot {
    flex-direction: column;
    align-items: stretch;
  }

  .quote__actions .quote__btn {
    flex: 1;
  }
}

@media (max-width: 560px) {
  .steps,
  .caps,
  .hero__stats {
    grid-template-columns: 1fr;
  }

  .gauge-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .segmented {
    width: 100%;
  }

  .segmented__opt {
    flex: 1;
    text-align: center;
    padding-inline: 0.5rem;
  }

  .hero__actions .btn {
    width: 100%;
  }
}

@media print {
  .site-header,
  .hero__visual,
  .quote__actions,
  .form,
  .menu-toggle {
    display: none;
  }
}
