/* ATM Customs — tuning.wtf
   Logo graphite + logo red on night black and vinyl white; sodium orange only for the pop flash.
   One family (Archivo), pushed wide + black + italic for display. */

:root {
  --black: #000;
  --white: #fff;
  --ink: #202124;   /* logo graphite (the "atm") */
  --red: #ff2028;   /* logo red ("customs") */
  --red-deep: #d9120a;
  --sodium: #ffa31a;
  --concrete: #a3a39e;
  --line: #2b2b2b;
  --logo-h: clamp(30px, 3vw, 44px);
  --bar-h: calc(var(--logo-h) + 27px);
  --gutter: clamp(16px, 4vw, 56px);
  --wide: "wdth" 125;
  --narrow: "wdth" 75;
  --slant: polygon(4% 0, 100% 0, 96% 100%, 0 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--bar-h); }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sodium); outline-offset: 3px; }
svg { flex: none; }

.wrap { padding-inline: var(--gutter); max-width: 1440px; margin-inline: auto; }

/* ── Top bar ─────────────────────────────────────────── */
/* its own band above the hero, closed by the logo's red underline; stays put while scrolling */
.bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 24px;
  height: var(--bar-h);
  padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
  background: var(--black);
  border-bottom: 3px solid var(--red);
}
.mark { display: block; margin-right: auto; }
.mark img { height: var(--logo-h); width: auto; }
.bar-dark { color: var(--ink); background: var(--white); position: relative; }
.nav { display: none; gap: clamp(18px, 2.4vw, 36px); }
.nav a {
  text-decoration: none; font-weight: 700; font-size: .95rem; color: #d6d6d2;
  padding-block: 6px; background: linear-gradient(var(--red), var(--red)) left bottom / 0 2px no-repeat;
  transition: background-size .2s, color .2s;
}
.nav a:hover { color: var(--white); background-size: 100% 2px; }
.bar-wa {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; text-decoration: none; font-size: .95rem;
  border: 2px solid currentColor; padding: .5em 1em; border-radius: 999px;
  min-height: 44px;
  transition: background .15s, color .15s, border-color .15s;
}
.bar-wa svg { width: 18px; height: 18px; }
.bar-wa:hover { background: var(--red); border-color: var(--red); color: var(--white); }

/* ── Hero ────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100svh - var(--bar-h) - 3px);
  display: flex; align-items: center;
  background: #000;
  isolation: isolate;
}
/* faint tarmac grain + a low red glow, so black isn't a void */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 80% 105%, rgba(255, 32, 40, .16), transparent 70%),
    radial-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 6px 6px;
}
.hero-flash {
  position: absolute; inset: 0; z-index: -1; opacity: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 55% at 72% 100%, var(--sodium), var(--red-deep) 45%, transparent 75%);
  mix-blend-mode: screen;
}
.hero-inner {
  width: 100%; max-width: 1440px; margin-inline: auto;
  padding: clamp(28px, 6svh, 80px) var(--gutter) clamp(28px, 5svh, 64px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  align-items: center; gap: clamp(32px, 5vw, 96px);
}
.hero-title {
  margin: 0;
  font-weight: 900; font-style: italic; font-variation-settings: var(--wide);
  text-transform: uppercase;
  font-size: clamp(2.1rem, min(5.9vw, 12svh), 8.4rem);
  /* sized to its own column, so it never runs into the dial on wide screens */
  font-size: clamp(2.1rem, min(10.4cqi, 12svh), 8.4rem);
  line-height: .88; letter-spacing: -.035em;
}
.hero-copy { container-type: inline-size; min-width: 0; }
.hero-title span { display: block; }
.hero-title span:nth-child(2) { padding-left: .5em; }
/* white + red, the same split as the logo */
.hero-title span:nth-child(3) { color: var(--red); }
.hero-lede { margin: clamp(20px, 3.5svh, 40px) 0 0; font-size: 1.125rem; color: #e8e8e4; max-width: 38ch; }
.hero-where {
  margin: 14px 0 0; font-size: .95rem; font-weight: 600; color: var(--concrete);
  display: flex; align-items: center; gap: 10px;
}
.hero-where::before { content: ""; width: 22px; height: 3px; background: var(--red); transform: skewX(-20deg); }

/* shake while popping — the whole content block jolts, not the page */
.hero.shake .hero-inner { animation: jolt .09s steps(2) 1; }
@keyframes jolt {
  0% { transform: translate(3px, -2px); }
  100% { transform: translate(-2px, 1px); }
}

/* ── Rev widget ─────────────────────────────────────── */
.rev { display: none; }
.js .rev { display: block; }

.tacho { position: relative; width: min(100%, 440px); margin-inline: auto; aspect-ratio: 320 / 184; }
.tacho-svg { width: 100%; height: 100%; overflow: visible; }
.tacho-svg .inner { fill: none; stroke: #2a2a2a; stroke-width: 1.5; }
.tacho-svg .seg { stroke: #222; stroke-width: 4.6; stroke-linecap: butt; transition: stroke .06s; }
.tacho-svg .seg.hot { stroke: #3d0e10; }
.tacho-svg .seg.on { stroke: var(--white); }
.tacho-svg .seg.hot.on { stroke: var(--red); }
.tacho-svg .lbl {
  fill: #8d8d88; font: 700 13px "Archivo", sans-serif;
  text-anchor: middle; dominant-baseline: central; font-variant-numeric: tabular-nums;
}
.tacho-svg .lbl.hot { fill: var(--red); }
.tacho.limit .tacho-svg { filter: drop-shadow(0 0 10px rgba(255, 32, 40, .55)); }

.tacho-read {
  position: absolute; left: 0; right: 0; bottom: 2%;
  display: flex; flex-direction: column; align-items: center; line-height: 1;
}
.rev-rpm {
  font-weight: 900; font-style: italic; font-variation-settings: var(--wide);
  font-size: clamp(2.6rem, 12vw, 3.6rem); letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.rev-rpm.limit { color: var(--red); }
.rev-unit { margin-top: 4px; font-weight: 700; font-size: .8rem; color: var(--concrete); }

.rev-row { display: flex; gap: 10px; margin-top: 14px; }
.rev-btn {
  position: relative; overflow: hidden; flex: 1;
  font: inherit; font-weight: 900; font-style: italic; font-variation-settings: var(--wide);
  font-size: 1.35rem; text-transform: uppercase; letter-spacing: -.01em;
  color: var(--ink); background: var(--white);
  border: 0; border-radius: 0; padding: 0 18px; min-height: 68px;
  clip-path: var(--slant);
  cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: none;
  -webkit-touch-callout: none;
  transition: transform .08s;
}
.rev-btn:hover { background: #f1f1ee; }
.rev-btn.held { transform: scale(.98); }
/* throttle position: red fills the pedal as the revs climb */
.rev-fill {
  position: absolute; inset: 0 auto 0 0; width: 0;
  background: var(--red);
}
.rev-label { position: relative; }
.rev-btn.held .rev-label { color: var(--white); mix-blend-mode: normal; }
.rev-sound {
  flex: none; width: 68px; display: grid; place-items: center;
  color: var(--white); background: none; border: 2px solid #3a3a3a; cursor: pointer;
}
.rev-sound:hover { border-color: var(--white); }
.rev-sound svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rev-sound .spk { fill: currentColor; }
.rev-sound .x { display: none; }
.rev-sound[aria-pressed="true"] { color: var(--concrete); }
.rev-sound[aria-pressed="true"] .wave { display: none; }
.rev-sound[aria-pressed="true"] .x { display: inline; }
.rev-hint { margin: 10px 0 0; font-size: .9rem; color: var(--concrete); min-height: 1.5em; text-align: center; }

/* pop words — styled like the white caption boxes on tuning reels */
.pops { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.pop {
  position: absolute;
  font-weight: 900; font-style: italic; font-variation-settings: var(--wide);
  text-transform: uppercase; line-height: 1;
  color: var(--ink); background: var(--white);
  padding: .12em .3em .08em;
  box-shadow: -.18em 0 0 var(--red);
  animation: pop .55s cubic-bezier(.2, 1.6, .4, 1) forwards;
}
@keyframes pop {
  0% { transform: scale(.3) rotate(var(--r)); opacity: 1; }
  25% { transform: scale(1.05) rotate(var(--r)); }
  75% { opacity: 1; }
  100% { transform: scale(1) rotate(var(--r)) translateY(-14px); opacity: 0; }
}

/* ── Section heads ──────────────────────────────────── */
/* thin red line under each heading, like the one under the logo */
.h2 {
  margin: 0; display: inline-block; padding-bottom: .14em;
  background: linear-gradient(var(--red), var(--red)) left bottom / 100% max(3px, .05em) no-repeat;
  font-weight: 900; font-style: italic; font-variation-settings: var(--wide);
  font-size: clamp(2.3rem, 6.4vw, 5.8rem); line-height: .9; letter-spacing: -.035em;
}
.sub { margin: 16px 0 0; font-size: 1.125rem; max-width: 46ch; }

/* ── Ledger ─────────────────────────────────────────── */
.ledger { background: var(--white); color: var(--ink); padding: clamp(64px, 9vw, 130px) 0 clamp(48px, 7vw, 100px); }
.ledger-list { list-style: none; margin: clamp(36px, 5vw, 64px) 0 0; padding: 0; }
.row {
  display: grid;
  grid-template-columns: clamp(96px, 13vw, 190px) minmax(0, 1fr) auto auto;
  align-items: center; gap: 0 clamp(16px, 3vw, 48px);
  padding: 18px var(--gutter);
  border-top: 6px solid var(--ink);
  max-width: 1440px; margin-inline: auto;
}
.row:last-child { border-bottom: 6px solid var(--ink); }
.row img { aspect-ratio: 1; object-fit: cover; width: 100%; height: auto; }
.row h3 {
  margin: 0; font-weight: 800; font-variation-settings: var(--narrow);
  font-size: clamp(1.3rem, 2.4vw, 2.2rem); text-transform: uppercase; line-height: 1;
}
.gain { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.gain span {
  font-weight: 800; font-style: italic; font-size: .85rem; line-height: 1;
  color: var(--white); background: var(--red); padding: 5px 8px 4px;
}
.num {
  margin: 0; display: flex; align-items: baseline; gap: .18em;
  font-weight: 900; font-style: italic; font-variation-settings: var(--wide);
  font-size: clamp(1.9rem, 4.2vw, 4.2rem); line-height: 1; letter-spacing: -.04em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.num span:first-child { color: #b0b0aa; text-decoration: line-through; text-decoration-thickness: .07em; }
.num b { color: var(--red); font-weight: 900; }
.num small { font-size: .38em; font-style: normal; font-weight: 800; letter-spacing: 0; margin-left: .15em; }

/* ── Menu ───────────────────────────────────────────── */
.menu { background: var(--red); color: var(--ink); padding: clamp(64px, 9vw, 130px) 0; }
.menu .h2 { background-image: linear-gradient(var(--ink), var(--ink)); }
.menu-list { margin: clamp(32px, 5vw, 60px) 0 0; }
.menu-list > div {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 8px 40px; align-items: center;
  padding: 18px 0; border-top: 3px solid var(--ink);
}
.menu-list > div:last-child { border-bottom: 3px solid var(--ink); }
.menu-list dt {
  font-weight: 900; font-style: italic; font-variation-settings: var(--wide);
  text-transform: uppercase; font-size: clamp(1.9rem, 4.4vw, 4rem); line-height: .95; letter-spacing: -.03em;
}
.menu-list dd { margin: 0; font-size: clamp(1.05rem, 1.3vw, 1.25rem); font-weight: 500; max-width: 40ch; }
.menu-note {
  margin: 40px 0 0; max-width: 62ch; font-weight: 600;
  background: var(--ink); color: var(--white); padding: 20px 24px;
  border-left: 6px solid var(--white);
}

/* ── Pile ───────────────────────────────────────────── */
.pile-sec { background: var(--ink); padding: clamp(64px, 9vw, 130px) 0 clamp(40px, 6vw, 80px); overflow: hidden;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 7px 7px; }
.pile-hint { color: var(--concrete); display: none; }
.pile {
  list-style: none; margin: 40px 0 0; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px;
}
.pile li { background: var(--white); padding: 8px 8px 0; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.pile img { aspect-ratio: 720 / 792; object-fit: cover; width: 100%; height: auto; background: #d8d8d4; pointer-events: none; -webkit-user-drag: none; }
.pile span {
  display: block; padding: 8px 2px 10px; color: var(--ink);
  font-weight: 800; font-style: italic; font-size: .95rem; line-height: 1.15;
}

/* with JS on wide screens the grid becomes a table of loose prints */
@media (min-width: 760px) {
  .js .pile-hint { display: block; }
  .js .pile { position: relative; display: block; height: clamp(560px, 62vw, 820px); max-width: 1440px; margin-inline: auto; }
  .js .pile li {
    position: absolute; width: clamp(170px, 17vw, 250px);
    cursor: grab; touch-action: none; user-select: none;
    transition: box-shadow .15s;
  }
  .js .pile li:hover { box-shadow: 0 18px 40px rgba(0,0,0,.6); }
  .js .pile li.drag { cursor: grabbing; box-shadow: 0 24px 50px rgba(0,0,0,.7); }
}

/* ── Call ───────────────────────────────────────────── */
.call { background: var(--white); color: var(--ink); padding: clamp(80px, 11vw, 160px) 0; }
.call-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: end; }
.call-title {
  margin: 0;
  font-weight: 900; font-style: italic; font-variation-settings: var(--wide);
  text-transform: uppercase; font-size: clamp(2.5rem, 7.4vw, 7.6rem); line-height: .86; letter-spacing: -.04em;
}
.call-title a { text-decoration: none; }
.call-title a:hover { color: var(--red); }
.call-links { margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; min-height: 60px;
  font-weight: 900; font-style: italic; font-variation-settings: var(--wide);
  font-size: 1.05rem; text-transform: uppercase;
  background: var(--red); color: var(--white);
  padding: 14px 30px;
  clip-path: var(--slant);
  transition: background .15s, color .15s;
}
.btn svg { width: 22px; height: 22px; }
.btn:hover { background: var(--ink); }
.btn-ghost { background: none; color: var(--ink); box-shadow: inset 0 0 0 3px var(--ink); clip-path: none; }
.btn-ghost:hover { background: var(--ink); color: var(--white); }

/* the three steps really are a sequence, so they're numbered */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 52px 1fr; column-gap: 14px;
  padding: 18px 0; border-top: 3px solid var(--ink);
}
.steps li:last-child { border-bottom: 3px solid var(--ink); }
.steps li::before {
  content: counter(step); grid-row: 1 / 3;
  font-weight: 900; font-style: italic; font-variation-settings: var(--wide);
  font-size: 2.6rem; line-height: .9; color: var(--red);
}
.steps b { font-weight: 900; font-style: italic; font-size: 1.2rem; line-height: 1.2; }
.steps span { color: #4a4b4e; }

/* ── Footer ─────────────────────────────────────────── */
.foot { padding: 48px 0 40px; color: var(--concrete); font-size: .95rem; border-top: 3px solid var(--red); }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.foot-inner p a + a { margin-left: 16px; }
.foot-main { display: grid; grid-template-columns: auto 1fr auto auto; gap: 24px 48px; align-items: center; }
.foot-main p a + a { margin-left: 0; }
.foot-logo { height: 40px; width: auto; }
.foot p { margin: 0; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--white); text-decoration: underline; }
.foot-contact, .foot-legal { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-contact a { color: var(--white); font-weight: 700; }

/* ── Mobile WhatsApp dock ───────────────────────────── */
.dock { display: none; }

/* ── Legal pages ────────────────────────────────────── */
.legal { background: var(--white); color: var(--ink); min-height: 70svh; padding: 56px 0 80px; }
.legal .wrap { max-width: 760px; }
.legal h1 { margin: 0 0 32px; font-weight: 900; font-style: italic; font-variation-settings: var(--wide); font-size: clamp(2.4rem, 7vw, 4rem); line-height: .95; letter-spacing: -.03em; }
.legal h2 { font-size: 1.2rem; margin: 32px 0 8px; }
.legal p, .legal address { margin: 0 0 12px; font-style: normal; }
.todo { background: var(--sodium); padding: 0 .25em; }

/* ── Wide screens ───────────────────────────────────── */
@media (min-width: 900px) {
  .nav { display: flex; }
}

/* ── Small screens ──────────────────────────────────── */
@media (max-width: 899px) {
  .hero { align-items: center; }
  .hero-inner { grid-template-columns: 1fr; gap: 20px; padding-top: clamp(24px, 4svh, 48px); }
  .hero-title { font-size: clamp(2.1rem, 9.3vw, 5rem); font-size: clamp(2.1rem, 10.4cqi, 5rem); }
  .hero-title span:nth-child(2) { padding-left: 0; }
  .hero-lede { font-size: 1.05rem; margin-top: 18px; }
  .rev { width: 100%; max-width: 420px; margin-inline: auto; }
  .tacho { width: min(100%, 52svh, 420px); }

  .call-grid { grid-template-columns: 1fr; }
  .foot-main { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 759px) {
  .bar-wa span { display: none; }
  .bar-wa { width: 44px; height: 44px; padding: 0; justify-content: center; background: #25d366; border-color: #25d366; color: var(--black); }
  .bar-wa svg { width: 22px; height: 22px; }

  .hero-where { display: none; }

  .row { grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: auto auto auto; gap: 6px 16px; padding-block: 16px; }
  .row img { grid-row: 1 / 4; align-self: start; }
  .row-name { margin-bottom: 4px; }
  .gain { margin-top: 8px; }
  .num { font-size: clamp(1.6rem, 7.6vw, 2.2rem); }

  .menu-list > div { grid-template-columns: 1fr; gap: 6px; }
  .menu-note { padding: 18px 20px; }

  .pile-hint { display: none; }
  .pile {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px;
    padding: 12px var(--gutter) 28px; scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .pile::-webkit-scrollbar { display: none; }
  .pile li { flex: 0 0 64%; scroll-snap-align: center; }
  .pile li:nth-child(odd) { transform: rotate(-1.5deg); }
  .pile li:nth-child(even) { transform: rotate(1.5deg); }

  .call-links { flex-direction: column; }
  .btn { width: 100%; font-size: .95rem; padding-inline: 18px; }

  .foot { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }

  /* sticky WhatsApp CTA, shown between the hero and the contact section */
  .dock {
    position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    display: flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 58px; text-decoration: none;
    font-weight: 900; font-style: italic; font-variation-settings: var(--wide);
    font-size: 1rem; text-transform: uppercase;
    background: var(--red); color: var(--white);
    clip-path: var(--slant);
    box-shadow: 0 10px 30px rgba(0,0,0,.45);
    transform: translateY(calc(100% + 30px)); transition: transform .3s cubic-bezier(.2, .9, .3, 1);
  }
  .dock svg { width: 22px; height: 22px; }
  .dock.on { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero.shake .hero-inner { animation: none; }
  .pop { animation-duration: .01s; animation-delay: .5s; }
  .dock { transition: none; }
}
