/* Gol GTI 94 · processo. Palette and type follow the toddyivon case-study system:
   black #0a0a0b, red accent #fa1556, Inter, 1440px max width. */

:root {
  --bg: #0a0a0b;
  --bg-2: #111113;
  --fg: #f4f4f5;
  --fg-dim: #a1a1aa;
  --line: rgba(255, 255, 255, 0.09);
  --red: #fa1556;
  --max: 1440px;
  --gutter: clamp(20px, 3.2vw, 56px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ---------- progress + top bar ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 50; background: transparent; }
.progress span { display: block; height: 100%; width: 0; background: var(--red); transform-origin: left; }

.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  background: linear-gradient(to bottom, rgba(10, 10, 11, 0.7), rgba(10, 10, 11, 0));
  mix-blend-mode: normal;
}
.brand { font-weight: 800; letter-spacing: -0.02em; text-decoration: none; font-size: 15px; }
.brand span { color: var(--red); }
.top nav { display: flex; gap: 22px; font-size: 14px; }
.top nav a { text-decoration: none; color: var(--fg-dim); transition: color .25s var(--ease); }
.top nav a:hover { color: var(--fg); }

/* ---------- hero ---------- */
.hero { position: relative; height: 190svh; }
.hero-stage {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: grid; place-items: center;
}
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 58%;
  transform: scale(1.14); transform-origin: 50% 60%;
  will-change: transform;
}
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(10,10,11,.25) 42%, rgba(10,10,11,.1) 100%),
    linear-gradient(to right, rgba(10,10,11,.7), rgba(10,10,11,0) 60%);
}
.hero-copy {
  position: absolute; left: var(--gutter); bottom: clamp(48px, 9svh, 110px);
  width: min(1000px, calc(100vw - 2 * var(--gutter))); max-width: calc(100vw - 2 * var(--gutter));
  will-change: transform, opacity;
}
.crumb { margin: 0 0 18px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-dim); }
h1 {
  margin: 0 0 22px;
  font-size: clamp(3rem, 9vw, 9.5rem);
  font-weight: 800;
  line-height: .9;
  letter-spacing: -0.055em;
}
h1 em { font-style: normal; color: var(--fg); }
.lead { max-width: 560px; margin: 0 0 30px; font-size: clamp(16px, 1.4vw, 19px); color: var(--fg-dim); }

.cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  background: var(--red); color: #fff; font-weight: 700; text-decoration: none; font-size: 15px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(250, 21, 86, .35); }

/* ---------- facts ---------- */
.facts { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 8vw, 110px) var(--gutter) clamp(40px, 6vw, 80px); }
.facts dl {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0;
  margin: 0; border-top: 1px solid var(--line);
}
.facts dl > div { padding: 22px 18px 0 0; border-right: 1px solid var(--line); }
.facts dl > div + div { padding-left: 18px; }
.facts dl > div:last-child { border-right: 0; }
.facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--red); margin-bottom: 8px; }
.facts dd { margin: 0; font-size: 15px; color: var(--fg); }

/* ---------- section primitives ---------- */
.block { max-width: var(--max); margin: 0 auto; padding: clamp(80px, 12vw, 180px) var(--gutter) clamp(48px, 6vw, 80px); }
.head { max-width: 1100px; }
.kicker { margin: 0 0 16px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
h2 {
  margin: 0 0 40px;
  font-size: clamp(2rem, 4.6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 16ch;
}
.body-grid { max-width: var(--max); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); }
.body-grid p { margin: 0; color: var(--fg-dim); font-size: clamp(17px, 1.5vw, 20px); max-width: 56ch; }

/* ---------- full-bleed media ---------- */
.wide { position: relative; max-width: none; margin: 0; padding: 0 var(--gutter); }
.wide figure { position: relative; overflow: hidden; border-radius: 4px; background: var(--bg-2); }
.wide img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.wide.tall img { aspect-ratio: 4 / 3; }
.pair {
  max-width: var(--max); margin: clamp(40px, 6vw, 80px) auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2vw, 28px);
}
.pair figure { position: relative; overflow: hidden; border-radius: 4px; background: var(--bg-2); }
.pair img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.single { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.single figure, .single { position: relative; }
.single img { width: 100%; max-height: 90svh; object-fit: contain; border-radius: 4px; background: var(--bg-2); }
.single figure { margin: 0; }
.wide figure, .pair figure, .single img { will-change: transform; }

figcaption { position: absolute; left: 16px; bottom: 14px; }
.label {
  display: inline-block; padding: 6px 10px; border-radius: 3px;
  background: rgba(10,10,11,.72); color: var(--fg); font-size: 13px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.pair figcaption, .wide figcaption { position: absolute; }

/* clipped open reveal for media */
.media-open { clip-path: inset(12% 8% 12% 8%); transition: clip-path 1.1s var(--ease); }
.media-open.in { clip-path: inset(0 0 0 0); }

/* ---------- pinned round 1 ---------- */
.pin { position: relative; height: 420svh; margin-top: clamp(40px, 6vw, 80px); }
.pin-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--bg); }
.pin-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 58%;
  opacity: 0; transform: scale(1.06);
  transition: opacity .9s var(--ease), transform 1.6s var(--ease);
}
.pin-img.is-active { opacity: 1; transform: scale(1); }
.pin-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right, rgba(10,10,11,.92) 0%, rgba(10,10,11,.55) 38%, rgba(10,10,11,0) 66%);
}
.pin-copy {
  position: absolute; z-index: 2; left: var(--gutter); top: 50%; transform: translateY(-50%);
  width: min(520px, 42vw);
}
.pin-copy h2 { margin-bottom: 26px; }
.pin-text { margin: 0 0 16px; color: var(--fg-dim); font-size: clamp(16px, 1.35vw, 18px); opacity: .25; transition: opacity .6s var(--ease); }
.pin-text.is-on { opacity: 1; color: var(--fg); }
.pin-count {
  position: absolute; z-index: 2; right: var(--gutter); bottom: 32px;
  font-size: 13px; letter-spacing: .12em; color: var(--fg-dim);
}
.pin-count span { color: var(--red); font-weight: 700; }

/* ---------- specs table ---------- */
.specs { max-width: var(--max); margin: 0 auto; padding: clamp(80px, 10vw, 150px) var(--gutter) 40px; }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 18px 16px 18px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--red); font-weight: 700; }
tbody th { font-weight: 600; width: 22%; color: var(--fg); }
td { color: var(--fg-dim); width: 39%; }
.note { max-width: 70ch; margin: 28px 0 0; font-size: 15px; color: var(--fg-dim); }

/* ---------- final ---------- */
.final {
  max-width: var(--max); margin: clamp(100px, 14vw, 200px) auto 0;
  padding: clamp(60px, 8vw, 120px) var(--gutter);
  border-top: 1px solid var(--line);
}
.final h2 { font-size: clamp(2.6rem, 8vw, 7rem); max-width: 14ch; margin-bottom: 40px; }

footer {
  max-width: var(--max); margin: 0 auto; padding: 36px var(--gutter) 60px;
  border-top: 1px solid var(--line); color: var(--fg-dim); font-size: 14px;
}
footer p { margin: 0 0 6px; }

/* ---------- split headline (word reveal) ---------- */
.split .word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split .word > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease); transition-delay: calc(var(--i, 0) * 45ms); }
.split.in .word > span { transform: translateY(0); }
h1.split em { display: inline; }

/* ---------- generic reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .facts dl { grid-template-columns: repeat(3, 1fr); row-gap: 22px; }
  .facts dl > div:nth-child(3n) { border-right: 0; }
  .facts dl > div:nth-child(3n+1) { padding-left: 0; }
  .body-grid { grid-template-columns: 1fr; }
  .pin-copy { width: min(480px, 62vw); }
  .pin-stage::after { background: linear-gradient(to top, rgba(10,10,11,.95) 0%, rgba(10,10,11,.6) 45%, rgba(10,10,11,.1) 100%); }
  .pin-copy { top: auto; bottom: 64px; transform: none; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .top nav { display: none; }
  .hero { height: 160svh; }
  .hero-img { object-position: 60% 60%; }
  .facts dl { grid-template-columns: repeat(2, 1fr); }
  .facts dl > div { border-right: 0; padding-left: 0 !important; padding-right: 10px; }
  .pair { grid-template-columns: 1fr; }
  .pin { height: 380svh; }
  .pin-copy { width: auto; right: var(--gutter); }
  .pin-text { font-size: 15px; }
}

/* ---------- reduced motion: keep order and state, drop movement ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero { height: auto; }
  .hero-stage { position: relative; height: 90svh; }
  .hero-img, .hero-copy { transform: none !important; }
  .pin { height: auto; }
  .pin-stage { position: relative; height: auto; overflow: visible; }
  .pin-stage::after { display: none; }
  .pin-img { position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: 4 / 3; opacity: 1; transform: none; display: block; margin-bottom: 16px; object-fit: cover; }
  .pin-copy { position: relative; left: auto; top: auto; transform: none; width: auto; padding: 24px var(--gutter) 0; }
  .pin-text { opacity: 1; }
  .pin-count { display: none; }
  .media-open { clip-path: none; transition: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .split .word > span { transform: none; transition: none; }
  .cta { transition: none; }
}
