/* FGS Fuel Guard Solutions. Tokens and rules come from DESIGN.md. */

@font-face { font-family: "Plex Sans"; src: url(assets/fonts/plex-sans-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url(assets/fonts/plex-sans-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url(assets/fonts/plex-sans-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(assets/fonts/plex-mono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(assets/fonts/plex-mono-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light dark;
  --paper: #F2F5F7;
  --paper-2: #E7EDF1;
  --grid: rgb(46 74 104 / .07);
  --ink: #1F2A37;
  --ink-muted: #4A5868;
  --line: #5B7089;
  --accent: #2F7D55;
  --accent-hover: #276A48;
  --accent-tint: rgb(47 125 85 / .09);
  --on-accent: #F2F5F7;
  --danger: #B83A32;
  --deep: #1F5A3D;
  --clear: rgb(52 196 132 / .26);
  --fuel: rgb(47 125 85 / .14);
  --fog: rgb(31 90 61 / .42);
  --sans: "Plex Sans", system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, monospace;
  --nav-h: 68px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E1A26;
    --paper-2: #142433;
    --grid: rgb(160 190 220 / .07);
    --ink: #E6EDF3;
    --ink-muted: #A7B6C6;
    --line: #7F9BB8;
    --accent: #5BBF86;
    --accent-hover: #74CC99;
    --accent-tint: rgb(91 191 134 / .10);
    --on-accent: #0E1A26;
    --danger: #E2675E;
    --deep: #2E8A5A;
    --clear: rgb(110 231 170 / .32);
    --fuel: rgb(91 191 134 / .20);
    --fog: rgb(6 22 16 / .62);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font: 400 1.0625rem/1.6 var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  /* drafting grid: FGS brand identity (see DESIGN.md) */
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem); }
h2 { font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent); }
img { display: block; }

.wrap { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
@media (max-width: 640px) { .wrap { padding-inline: 16px; } }

.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.skip { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 8px 12px; background: var(--ink); color: var(--paper); }
.skip:focus { top: 8px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 48px; padding: 0 1.25rem;
  font: 500 1rem/1 var(--sans); white-space: nowrap; text-decoration: none;
  color: var(--on-accent); background: var(--accent); border: 1px solid var(--accent);
  transition: background-color .2s, transform .1s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn--ghost { color: var(--ink); background: transparent; border-color: var(--line); }
.btn--ghost:hover { background: var(--paper-2); border-color: var(--ink); }
.btn--sm { min-height: 40px; padding: 0 .9rem; font-size: .9375rem; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 30%, transparent);
}
.nav__inner { height: var(--nav-h); display: flex; align-items: center; gap: 2rem; }
.nav nav { margin-left: auto; }
.nav__links { display: flex; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.nav__links a { color: var(--ink-muted); text-decoration: none; font-size: .9375rem; }
.nav__links a:hover { color: var(--ink); }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; }
.brand__name { font-size: .9375rem; line-height: 1.1; }
.brand__name span { color: var(--ink-muted); }
@media (max-width: 900px) {
  .nav nav { display: none; }
  .nav .btn { margin-left: auto; }
}
@media (max-width: 480px) {
  .hide-sm { display: none; }
  .brand__name span { display: none; }
}

/* ---------- hero + process (shared grid, sticky diagram) ---------- */
.story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "hero tank" "steps tank";
  column-gap: 4rem;
}
.hero {
  grid-area: hero;
  min-height: calc(100dvh - var(--nav-h));
  display: flex; flex-direction: column; justify-content: center; gap: 1.25rem;
  padding-block: 3rem;
}
.eyebrow { font: 500 .8125rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.lead { font-size: 1.1875rem; color: var(--ink-muted); max-width: 34ch; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }

.tank {
  grid-area: tank;
  position: sticky; top: calc(var(--nav-h) + 24px);
  align-self: start;
  margin: 0;
  padding-top: calc((100dvh - var(--nav-h) - 560px) / 2);
}
.tank svg { width: 100%; height: auto; max-height: calc(100dvh - var(--nav-h) - 96px); display: block; }
/* centred under the tank, whose centre is x=250 of the 600-wide diagram (not under the whole diagram) */
.legend { width: calc(100% * 500 / 600); display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; margin-top: .75rem; font: 400 .8125rem/1.4 var(--mono); color: var(--ink-muted); }
.legend__item { display: inline-flex; align-items: center; gap: .5rem; }
.sw { width: 22px; height: 4px; display: inline-block; }
.sw--red { background: var(--danger); }
.sw--green { background: var(--accent); }

/* ---------- process: revolver ---------- */
.steps { grid-area: steps; padding: 4rem 0 6rem; --step: 6.5s; }
.steps h2 { margin-bottom: 2rem; }

/* without JS: a plain list of the four steps */
.revolver__controls, .rv-drum, .rv-pause { display: none; }
.rv-panel + .rv-panel { margin-top: 1.5rem; }
.rv-panel h3 { font-size: 1.375rem; margin-bottom: .5rem; }
.rv-panel p { color: var(--ink-muted); max-width: 46ch; }

.js .revolver {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-areas: "ctl drum" ". panel" ". pause";
  column-gap: 1.5rem;
}
.js .revolver__controls { grid-area: ctl; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; }
.rv-btn {
  width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer;
  color: var(--ink); background: transparent;
  border: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
  transition: background-color .2s, border-color .2s, transform .1s;
}
.rv-btn:hover { background: var(--paper-2); border-color: var(--ink); }
.rv-btn:active { transform: translateY(1px); }

/* the drum: four step titles on a cylinder that turns around the X axis */
.js .rv-drum { grid-area: drum; display: block; position: relative; height: 210px; margin: 0; padding: 0; list-style: none; perspective: 800px; }
.rv-drum::before {
  content: ""; position: absolute; inset-inline: 0; top: 50%; height: 68px; margin-top: -34px;
  border-block: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.face {
  position: absolute; inset-inline: 0; top: 50%; height: 64px; margin-top: -32px; padding-inline: 1rem;
  display: flex; align-items: center; gap: .75rem;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em;
  color: var(--ink-muted); opacity: 0;
  transform: translateZ(-100px) rotateX(calc(var(--d) * -36deg)) translateZ(100px);
  backface-visibility: hidden;
  transition: transform .7s cubic-bezier(.34, 1.45, .64, 1), opacity .5s, color .3s;
}
.face[data-d="0"] { opacity: 1; color: var(--ink); }
.face[data-d="1"], .face[data-d="-1"] { opacity: .35; }
.face.no-anim { transition: none; }
.face__n { font: 500 1rem var(--mono); color: var(--accent); }

.js .rv-panels { grid-area: panel; display: grid; margin-top: 1rem; }
.js .rv-panel { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .3s, transform .3s, visibility 0s .3s; }
.js .rv-panel.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .4s .15s, transform .4s .15s; }
.js .rv-panel h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.rv-panel p { font-size: 1.0625rem; }

.js .rv-pause {
  grid-area: pause; justify-self: start; display: inline-flex; align-items: center; gap: .4rem;
  margin-top: 1.25rem; padding: .35rem 0; cursor: pointer; background: none; border: 0;
  font: 500 .8125rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted);
}
.rv-pause:hover { color: var(--ink); }
.i-play, .is-paused .i-pause { display: none; }
.is-paused .i-play { display: inline; }

/* auto-advance timer: a line filling along the bottom of the selection window */
.rv-timer { display: none; }
.js .rv-timer {
  grid-area: drum; align-self: center; display: block; z-index: 1;
  height: 2px; margin-top: 66px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  animation: timer var(--step) linear forwards;
}
.revolver:is(:hover, :has(:focus-visible), .is-paused) .rv-timer { animation-play-state: paused; }
@keyframes timer { to { transform: scaleX(1); } }

@media (max-width: 900px) {
  .story { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "tank" "steps"; }
  .hero { min-height: auto; padding-block: 2.5rem 1.5rem; }
  /* diagram stays pinned under the nav while the revolver is on screen */
  .tank {
    top: var(--nav-h); z-index: 5; padding: .5rem 0 .75rem;
    background: var(--paper);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 30%, transparent);
  }
  .tank svg { max-height: 32dvh; margin-inline: auto; }
  .legend { display: none; }
  #proceso { scroll-margin-top: calc(32dvh + 2.5rem); }
  .steps { padding: 3rem 0 4rem; }
  .js .rv-drum { height: 190px; }
}

/* ---------- diagram ---------- */
.tank svg text { font-family: var(--mono); fill: var(--ink-muted); }
.t-small { font-size: 12px; letter-spacing: .08em; }
.t-tiny { font-size: 11px; }
.t-label { font-size: 13px; }
.t-mode { font-size: 22px; font-weight: 500; fill: var(--ink) !important; letter-spacing: .04em; display: none; }
.hatch { stroke: var(--grid); stroke-width: 2; }
.ground { stroke: var(--line); stroke-width: 1.5; }
.pit { fill: var(--paper); stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 4; }
.tank-shell, .riser, .unit, .filter, .pump, .drum { fill: none; stroke: var(--line); stroke-width: 1.5; }
.riser, .unit, .drum, .filter { fill: var(--paper); }
.drum { fill: none; }
.drum__band { stroke: var(--line); stroke-width: 1; }
.l-good { fill: var(--fuel); transition: fill .6s; }
.l-fog { fill: var(--fog); stroke: transparent; stroke-width: 2; transition: opacity .6s, fill .3s, stroke .3s; }
.l-sed { stroke: transparent; stroke-width: 2; transition: fill .3s, stroke .3s; }
.rig { opacity: 0; transform: translateY(-14px); transition: opacity .6s, transform .6s cubic-bezier(.34, 1.45, .64, 1); }
.fizz { fill: var(--accent); transition: fill .6s; }
/* solid (mixed with the page colour) so the niebla band underneath never shows through */
.l-sed { fill: color-mix(in srgb, var(--danger) 55%, var(--paper)); }
.bug { fill: var(--danger); }
.sed { transform-box: fill-box; transform-origin: 50% 100%; transition: opacity .6s; }
.drum-fill { fill: color-mix(in srgb, var(--danger) 55%, transparent); transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); }
.impeller { transform-box: fill-box; transform-origin: center; }
.impeller line { stroke: var(--line); stroke-width: 2; stroke-linecap: round; }

.pipe { fill: none; stroke: color-mix(in srgb, var(--line) 35%, transparent); stroke-width: 9; stroke-linejoin: round; }
.flow { fill: none; stroke-width: 4; stroke-linejoin: round; stroke-dasharray: 10 8; opacity: 0; transition: opacity .4s; }
.flow--red { stroke: var(--danger); }
.flow--green { stroke: var(--accent); }
.mk-red { fill: var(--danger); }
.mk-green { fill: var(--accent); }
.mk-deep { fill: var(--deep); }
.f-return-label { opacity: 0; transition: opacity .4s; }
.pt { opacity: 0; transition: opacity .4s; }
.pt-suc circle, .pt-waste circle { fill: var(--danger); }
.pt-ret circle { fill: var(--accent); stroke: var(--paper); stroke-width: 1; }

.probe { opacity: 0; transition: opacity .4s; }
.probe__rod { stroke: var(--ink); stroke-width: 2; }
.probe__cup { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.probe__cup--mid { --sample: color-mix(in srgb, var(--danger) 25%, var(--paper)); }
.probe__cup--low { --sample: color-mix(in srgb, var(--danger) 75%, var(--paper)); }

.badge { opacity: 0; transform-box: fill-box; transform-origin: center; transition: opacity .3s; }
.badge__box { fill: var(--paper); stroke: var(--accent); stroke-width: 1.5; }
.badge__check { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.tank svg .badge__text { fill: var(--accent); font-size: 12px; }

/* modes: diagnose -> extract -> filter -> done. Transitions last ~one step (6.5s) so each stage visibly progresses. */
[data-mode="diagnose"] .m-diagnose,
[data-mode="extract"] .m-extract,
[data-mode="filter"] .m-filter,
[data-mode="done"] .m-done { display: inline; }

[data-mode="diagnose"] .probe { opacity: 1; animation: dip 1.6s cubic-bezier(.2, .8, .2, 1) both; }
[data-mode="diagnose"] .probe__cup--mid { animation: sample .6s 1.4s both; }
[data-mode="diagnose"] .probe__cup--low { animation: sample .6s 1.8s both; }

[data-mode="extract"] :is(.f-suction, .f-waste, .pt-suc, .pt-waste),
[data-mode="filter"] :is(.f-suction, .f-return, .f-return-label, .pt-suc, .pt-ret) { opacity: 1; }
[data-mode="extract"] .impeller,
[data-mode="filter"] .impeller { animation: spin .6s linear infinite; }

/* the FGS rig drops in once the diagnosis is done */
[data-mode="extract"] .rig, [data-mode="filter"] .rig, [data-mode="done"] .rig { opacity: 1; transform: none; }

/* colour story: red (waste) drains during extraction, the deepest green during filtering, and the
   finished tank is one crystalline green */
[data-mode="extract"] .sed { transform: scaleY(.15); opacity: 0; transition: transform 6s linear, opacity 6s cubic-bezier(.8, 0, 1, 1); }
[data-mode="filter"] .sed,
[data-mode="done"] .sed { transform: scaleY(.15); opacity: 0; }
/* filtering clears the niebla band, then the clean fuel turns crystalline */
[data-mode="filter"] .l-fog { opacity: 0; transition: opacity 4.5s linear; }
[data-mode="filter"] .l-good { fill: var(--clear); transition: fill 1.5s ease-out 4.5s; }
[data-mode="filter"] .fizz { fill: #fff; transition: fill 1.5s ease-out 4.5s; }
[data-mode="done"] .l-fog { opacity: 0; }
[data-mode="done"] .l-good { fill: var(--clear); }
[data-mode="done"] .fizz { fill: #fff; }
[data-mode="filter"] .f-suction { stroke: var(--deep); marker-end: url(#arr-deep); }
[data-mode="filter"] .pt-suc circle { fill: var(--deep); }
[data-mode="extract"] .drum-fill { transform: scaleY(.85); transition: transform 6s linear; }
[data-mode="filter"] .drum-fill,
[data-mode="done"] .drum-fill { transform: scaleY(.85); }

[data-mode="filter"] .filter { fill: color-mix(in srgb, var(--deep) 55%, var(--paper)); transition: fill 6s linear; }
[data-mode="done"] .filter { fill: color-mix(in srgb, var(--deep) 55%, var(--paper)); }

[data-mode="done"] .badge { opacity: 1; animation: pop .5s cubic-bezier(.34, 1.56, .64, 1) both; }

.flow { animation: flow .7s linear infinite; }
/* pause only the loops; one-shot entries (probe dip, badge pop) still play so manual stepping works */
.tank.is-paused :is(.flow, .impeller) { animation-play-state: paused; }

@keyframes flow { from { stroke-dashoffset: 18; } to { stroke-dashoffset: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dip { from { transform: translateY(-120px); } }
@keyframes sample { to { fill: var(--sample); } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .tank *, .face, .rv-panel, .rv-timer { animation: none !important; transition: none !important; }
}

/* ---------- one section per screen (desktop): scrolling snaps from section to section ---------- */
@media (min-width: 901px) and (min-height: 640px) {
  html { scroll-snap-type: y mandatory; scroll-padding-top: calc(var(--nav-h) + 1px); } /* nav + its 1px border */
  .hero, .steps, .section:not(.screen .section), .screen, .contact { scroll-snap-align: start; }
  .steps, .section, .screen {
    min-height: calc(100dvh - var(--nav-h));
    display: flex; flex-direction: column; justify-content: center;
  }
  .steps { padding: 3rem 0; }
  .steps h2 { padding-top: 0; }
  .section { padding-block: 4rem; }
  .section > .wrap { width: 100%; } /* keep the page column; flex centring would shrink it to its content */
  .screen .section { min-height: 0; padding-block: 3rem; }
  .screen .section + .section { padding-top: 0; }
  /* contact + footer together fill the last screen */
  .contact { min-height: calc(100dvh - var(--nav-h) - 6rem); display: flex; align-items: center; }
  .contact__inner { width: 100%; }
  .footer { height: 6rem; display: flex; align-items: center; padding-block: 0; }
  .footer__inner { width: 100%; }
}

/* ---------- opening view (html.intro, set by main.js) ---------- */
html { scrollbar-gutter: stable; }
html.intro { overflow: hidden; }
.tank { transform-origin: 0 0; transition: transform .9s cubic-bezier(.65, 0, .35, 1); }
.tank.no-trans { transition: none; }
.intro .tank { transform: var(--intro); border-color: transparent; background: transparent; }
.hero, .steps, .legend { transition: opacity .6s .5s; }
.intro :is(.hero, .steps, .legend) { opacity: 0; transition: none; pointer-events: none; }
.intro .tank svg { overflow: visible; }
.intro :is(.mode-label, .t-mode, .probe) { visibility: hidden; }
.intro .rv-timer { animation-play-state: paused; }

.notes { opacity: 0; pointer-events: none; transition: opacity .3s; }
.intro .notes { opacity: 1; pointer-events: auto; transition: opacity .6s .2s; }
.notes--stack { display: none; }
@media (max-width: 700px) {
  .notes--side { display: none; }
  .notes--stack { display: inline; }
}
.note__hit { fill: transparent; }
.note__arrow, .tank svg .note__text { transition: stroke-width .2s, fill .2s; }

/* hovering a zone or its label highlights that zone and fades the other one back */
.intro .tank:has(.hl-fog:hover) .l-fog { fill: color-mix(in srgb, var(--deep) 75%, transparent); stroke: var(--deep); }
.intro .tank:has(.hl-waste:hover) .l-sed { fill: color-mix(in srgb, var(--danger) 85%, var(--paper)); stroke: var(--danger); }
.intro .tank:has(.hl-waste:hover) .l-fog { opacity: .3; }
.intro .tank:has(.hl-fog:hover) .note.hl-fog .note__arrow,
.intro .tank:has(.hl-waste:hover) .note.hl-waste .note__arrow { stroke-width: 3.5; }
.intro .tank:has(.hl-fog:hover) .note.hl-waste,
.intro .tank:has(.hl-waste:hover) .note.hl-fog { opacity: .4; }
.note { transition: opacity .2s; }
.tank svg .note__title { font-size: 13px; font-weight: 500; letter-spacing: .08em; }
.tank svg .note__title--fog { fill: var(--deep); }
.tank svg .note__title--waste { fill: var(--danger); }
.tank svg .note__text { font-size: 13px; fill: var(--ink); }
@media (max-width: 640px) {
  .tank svg .note__text { font-size: 16px; }
  .tank svg .note__title { font-size: 15px; }
}
.note__bg { fill: var(--paper); }
.note__arrow { stroke-width: 2; }
.note__arrow--fog { stroke: var(--deep); }
.note__arrow--waste { stroke: var(--danger); }

.intro-ui { display: none; }
.intro .intro-ui {
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  position: fixed; z-index: 20; inset: var(--nav-h) 0 0; padding: 1.75rem 16px 1.5rem; pointer-events: none;
}
.intro-ui__title { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); font-weight: 600; letter-spacing: -0.02em; text-align: center; text-wrap: balance; }
.intro-ui__go {
  pointer-events: auto; display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1.1rem; cursor: pointer;
  font: 500 1rem var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line);
}
.intro-ui__go:hover { border-color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .intro-ui__go .icon { animation: nudge 1.6s ease-in-out infinite; }
}
@keyframes nudge { 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) {
  .tank, .hero, .steps, .legend, .notes { transition: none !important; }
}

/* ---------- generic sections ---------- */
.section { padding-block: 6rem; }
.section--rule { border-top: 1px solid color-mix(in srgb, var(--line) 30%, transparent); }
.section__intro { margin-top: 1rem; max-width: 60ch; color: var(--ink-muted); font-size: 1.125rem; }
@media (max-width: 640px) { .section { padding-block: 4rem; } }

/* how the product changes: three sample bottles */
.samples { position: relative; list-style: none; margin: 3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; }
.sample { position: relative; z-index: 1; text-align: center; }
/* a red line behind the bottles: the opaque samples hide it, the filtered one shows it straight through.
   It sits at y=150 of the bottle drawing (inside the liquid); bottles are 150px wide on a 120-unit drawing. */
.samples::before {
  content: ""; position: absolute; left: 0; right: 0; top: calc(150px * 150 / 120); height: 3px;
  background: var(--danger);
}
.sample:not(:last-child)::after {
  content: ""; position: absolute; top: 120px; right: -1.9rem;
  border: 7px solid transparent; border-left: 11px solid var(--line);
}
.sample svg { display: block; width: 150px; height: auto; margin: 0 auto 1.25rem; overflow: visible; }
.sample h3 { font-size: 1.125rem; margin-bottom: .4rem; }
.sample p { color: var(--ink-muted); max-width: 28ch; margin-inline: auto; }
.sample--clear h3 { color: var(--accent); }

.glass-bg { fill: color-mix(in srgb, var(--line) 10%, var(--paper)); }
.glass { fill: none; stroke: var(--line); stroke-width: 2; }
.liquid { transform-box: fill-box; transform-origin: 50% 100%; }
.cap { fill: var(--line); }
.ticks line { stroke: var(--line); stroke-width: 1.2; }
.glint { fill: #fff; opacity: .28; }

/* real fuel colours (the tank diagram uses green as a symbol; the samples show what the fuel actually looks like) */
.fuel--before { fill: #5C3B1E; }
.water { fill: #7D8B94; opacity: .55; }
.silt { fill: #2E1C0D; }
.specks circle { fill: #241405; }
.fuel--haze { fill: #D8AE34; }
.milk ellipse { fill: #FFF6D8; opacity: .38; filter: blur(6px); }
/* clear gold: almost transparent, a faint amber tint only toward the glass edges */
.fuel--clear { fill: url(#gold); }
.sample--clear .glass-bg { fill: none; } /* let the blueprint grid show through the clear fuel */
.sweep { fill: #fff; opacity: .5; filter: blur(3px); }

/* entrance: the bottles fill one after another, then a glint sweeps the clear one */
.js .samples .liquid { transform: scaleY(0); }
.samples.is-in .liquid { transform: none; transition: transform 1s cubic-bezier(.2, .8, .2, 1) calc(var(--i) * .45s); }
.samples.is-in .sweep { animation: sweep 1.1s ease-in-out 1.9s forwards; }
@keyframes sweep { to { transform: translateX(200px); } }
@media (prefers-reduced-motion: reduce) {
  .js .samples .liquid { transform: none; transition: none; }
  .samples .sweep { display: none; }
}

@media (max-width: 760px) {
  .samples { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .sample { display: grid; grid-template-columns: 84px minmax(0, 1fr); column-gap: 1.25rem; align-items: center; text-align: left; }
  .sample svg { width: 84px; margin: 0; grid-row: span 2; }
  .samples::before { display: none; }
  .sample::before {
    content: ""; position: absolute; z-index: -1; left: -12px; width: 108px; top: calc(150px * 84 / 120); height: 3px;
    background: var(--danger);
  }
  .sample h3 { align-self: end; margin: 0; }
  .sample p { align-self: start; margin: .25rem 0 0; }
  .sample:not(:last-child)::after { top: auto; bottom: -1.75rem; right: auto; left: 35px; border: 7px solid transparent; border-top: 11px solid var(--line); }
}

/* when to call: tick the signs you see; the WhatsApp message carries them */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.signs-wrap { margin-top: 2.25rem; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.5rem; align-items: center; }
.signs { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.sign {
  position: relative; display: flex; align-items: center; gap: .85rem; min-height: 4.25rem; padding: .85rem 2.75rem .85rem 1rem;
  cursor: pointer; background: var(--paper); border: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
  transition: border-color .2s, background-color .2s, transform .1s;
}
.sign:hover { border-color: var(--ink-muted); }
.sign:active { transform: translateY(1px); }
.sign input { position: absolute; opacity: 0; pointer-events: none; }
.sign:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.sign__icon { width: 1.5rem; height: 1.5rem; color: var(--ink-muted); transition: color .2s; }
.sign__text { font-size: .9375rem; line-height: 1.35; }
.sign__check {
  position: absolute; right: .9rem; top: 50%; width: 1.15rem; height: 1.15rem; margin-top: -.575rem; padding: 1px;
  color: transparent; border: 1.5px solid var(--line); stroke-width: 3; transition: color .2s, background-color .2s, border-color .2s;
}
.sign:has(input:checked) { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 7%, var(--paper)); }
.sign:has(input:checked) .sign__icon { color: var(--danger); }
.sign:has(input:checked) .sign__check { color: var(--paper); background: var(--danger); border-color: var(--danger); }

.signs__result { display: grid; gap: 1.25rem; padding: 1.5rem; border-left: 3px solid var(--line); transition: border-color .3s; }
.signs__verdict { font-size: 1.125rem; font-weight: 500; line-height: 1.4; }
.signs__cta { justify-self: start; }
.signs-wrap.has-signs .signs__result { border-left-color: var(--accent); }

@media (max-width: 900px) {
  .signs-wrap { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
}
@media (max-width: 640px) {
  .signs { grid-template-columns: minmax(0, 1fr); }
  .sign { min-height: 3.5rem; }
}
/* experience statement */
.statement { font-weight: 400; font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3rem); max-width: 22ch; letter-spacing: -0.025em; }
.statement strong { font-weight: 600; }
.statement__note { margin-top: 1rem; color: var(--ink-muted); }

/* partners: logos shown in one colour (CSS mask) so they read as one row in both themes */
.partners { list-style: none; margin: 2.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2rem 3.5rem; }
.partner { display: flex; align-items: center; color: var(--ink-muted); text-decoration: none; transition: color .2s; }
a.partner:hover { color: var(--ink); }
.partner__logo {
  display: block; aspect-ratio: var(--ratio); background: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat;
}
/* Tutanka wordmark: bold italic, the T's taller with an arrow for a top bar */
.tt { display: inline-flex; align-items: baseline; font: 600 2.025rem/1 var(--sans); letter-spacing: .01em; transform: skewX(-12deg); }
.tt__t { position: relative; display: inline-block; width: .733em; height: 1.022em; margin-right: -.03em; }
.tt__t::before { /* arrow-shaped top bar */
  content: ""; position: absolute; left: 0; top: 0; width: calc(100% + .167em); height: .333em; background: currentColor;
  clip-path: polygon(0 23%, 70% 23%, 70% 0, 100% 50%, 70% 100%, 70% 77%, 0 77%);
}
.tt__t::after { content: ""; position: absolute; left: .2em; top: .133em; bottom: 0; width: .222em; background: currentColor; } /* stem */
.tt small { font-size: .5em; margin-left: .4em; letter-spacing: .04em; }

/* faq */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 4rem; }
.faq__list details { border-bottom: 1px solid color-mix(in srgb, var(--line) 35%, transparent); }
.faq__list details:first-child { border-top: 1px solid color-mix(in srgb, var(--line) 35%, transparent); }
.faq__list summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.25rem 0; cursor: pointer; font-weight: 500; font-size: 1.125rem; list-style: none; }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary:hover { color: var(--accent); }
.faq__list summary .icon { color: var(--ink-muted); transition: transform .2s; }
.faq__list details[open] summary .icon { transform: rotate(180deg); }
.faq__list details p { padding-bottom: 1.25rem; color: var(--ink-muted); max-width: 60ch; }
@media (max-width: 900px) { .faq { grid-template-columns: minmax(0, 1fr); gap: 2rem; } }

/* contact */
.contact { padding-block: 5rem; background: var(--paper-2); border-top: 1px solid color-mix(in srgb, var(--line) 30%, transparent); }
.contact__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2.5rem; }
.contact h2 { margin-bottom: .75rem; }
.contact p { color: var(--ink-muted); }
.contact__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.contact__link { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); text-decoration: none; font-family: var(--mono); font-size: .9375rem; }
.contact__link:hover { color: var(--accent); }

/* footer */
.footer { padding-block: 2rem; border-top: 1px solid color-mix(in srgb, var(--line) 30%, transparent); background: var(--paper-2); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; font-size: .875rem; color: var(--ink-muted); }
