:root {
  --bone: #f2ede3;
  --ink: #131114;
  --ink-dim: rgba(19, 17, 20, 0.72);
  --ink-faint: rgba(19, 17, 20, 0.42);
  --red: #e5382c;
  --blue: #27408b;
  --line: rgba(19, 17, 20, 0.16);
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: "Space Grotesk", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body[data-locked="true"] { overflow: hidden; }

.tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.tnum { font-variant-numeric: tabular-nums; }

h1, h2, h3, .hero-title, .gate-brand {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

/* ══ intro gate — preto, listras de pole nas bordas ══ */
.gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: var(--ink);
  transition-property: opacity, filter;
  transition-duration: 0.9s;
  transition-timing-function: var(--ease);
}

.gate.out { opacity: 0; filter: blur(8px); pointer-events: none; }

.gate-stripe {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 22px;
  background: repeating-linear-gradient(135deg,
    var(--red) 0 16px, var(--bone) 16px 32px, var(--blue) 32px 48px, var(--bone) 48px 64px);
  animation: pole-spin 1.6s linear infinite;
}

.gate-stripe.left { left: 0; }
.gate-stripe.right { right: 0; }

@keyframes pole-spin { to { background-position: 0 -64px; } }

.gate-inner { text-align: center; padding: 24px; }

.gate-kicker { color: var(--red); }

.gate-brand {
  font-size: clamp(64px, 13vw, 170px);
  line-height: 1;
  margin-top: 14px;
  color: var(--bone);
}

.gate-sub { margin-top: 12px; color: rgba(242, 237, 227, 0.45); }

.gate-btn {
  position: relative;
  margin-top: 44px;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  border: 0;
  background: var(--red);
  color: var(--bone);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(229, 56, 44, 0.3), 0 22px 60px rgba(229, 56, 44, 0.25);
  transition-property: scale, box-shadow;
  transition-duration: 0.3s;
  transition-timing-function: var(--ease);
}

.gate-btn:not(:disabled):hover { box-shadow: 0 8px 24px rgba(229, 56, 44, 0.4), 0 30px 80px rgba(229, 56, 44, 0.3); }
.gate-btn:not(:disabled):active { scale: 0.96; }
.gate-btn:disabled { cursor: default; background: #2a262b; color: rgba(242, 237, 227, 0.5); box-shadow: none; }

.gate-btn-ring {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px solid rgba(242, 237, 227, 0.25);
}

.gate-btn:not(:disabled) .gate-btn-ring { animation: pulse 2.4s var(--ease) infinite; }

@keyframes pulse {
  0%   { transform: scale(0.94); opacity: 0; }
  40%  { opacity: 1; }
  100% { transform: scale(1.12); opacity: 0; }
}

.gate-hint { margin-top: 40px; color: rgba(242, 237, 227, 0.45); letter-spacing: 0.12em; }

/* ══ camadas fixas ══ */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
  /* duotone: o hue é dirigido pelo scroll via JS */
  filter: grayscale(1) sepia(1) saturate(3) hue-rotate(315deg) brightness(0.82) contrast(1.18);
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(19, 17, 20, 0.5) 0%, rgba(19, 17, 20, 0.08) 30%, rgba(19, 17, 20, 0.08) 70%, rgba(19, 17, 20, 0.55) 100%);
}

.dim {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  opacity: 0;
}

.grain {
  position: fixed;
  inset: -100px;
  z-index: 40;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(4) infinite;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-32px, 18px); }
  50%  { transform: translate(24px, -26px); }
  75%  { transform: translate(-18px, -12px); }
  100% { transform: translate(0, 0); }
}

/* ══ nav: barra sólida ink ══ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 34px);
  padding: 0 clamp(18px, 3vw, 40px);
  height: 58px;
  background: var(--ink);
  box-shadow: 0 1px 0 rgba(242, 237, 227, 0.12), 0 8px 30px rgba(0, 0, 0, 0.35);
}

.brand {
  font-family: "Anton", sans-serif;
  font-size: 22px;
  text-transform: uppercase;
  color: var(--red);
  text-decoration: none;
  letter-spacing: 0.03em;
}

.hud-tc {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(242, 237, 227, 0.65);
}

.hud-tc .rec {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  animation: blink 1.6s steps(2) infinite;
}

@keyframes blink { 50% { opacity: 0.2; } }

.hud-tc em { font-style: normal; font-size: 9px; color: rgba(242, 237, 227, 0.4); }

.nav-links { display: flex; gap: clamp(10px, 1.8vw, 24px); margin-left: auto; }

.nav-links a {
  color: rgba(242, 237, 227, 0.5);
  text-decoration: none;
  padding: 20px 2px;
  transition-property: color;
  transition-duration: 0.25s;
}

.nav-links a:hover, .nav-links a.is-active { color: var(--bone); }

.sound {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(242, 237, 227, 0.25);
  background: transparent;
  color: var(--bone);
  cursor: pointer;
  font-weight: 700;
  transition-property: scale, border-color;
  transition-duration: 0.25s;
  transition-timing-function: var(--ease);
}

.sound:hover { border-color: var(--red); }
.sound:active { scale: 0.96; }

.sound-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }

.sound-bars i {
  width: 2px;
  background: var(--red);
  border-radius: 1px;
  animation: bar 1s ease-in-out infinite;
}

.sound-bars i:nth-child(1) { height: 6px; }
.sound-bars i:nth-child(2) { height: 12px; animation-delay: 0.2s; }
.sound-bars i:nth-child(3) { height: 8px; animation-delay: 0.4s; }

@keyframes bar { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.4); } }

.sound[aria-pressed="false"] .sound-bars i { animation: none; transform: scaleY(0.25); opacity: 0.5; }

/* ══ barber pole (progresso) ══ */
.pole-rail {
  position: fixed;
  right: clamp(14px, 2.6vw, 30px);
  top: 50%;
  translate: 0 -50%;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.pole {
  width: 16px;
  height: 34vh;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: repeating-linear-gradient(0deg, transparent, transparent);
  background-image: repeating-linear-gradient(135deg,
    var(--red) 0 10px, var(--bone) 10px 20px, var(--blue) 20px 30px, var(--bone) 30px 40px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(242, 237, 227, 0.4);
}

.pole-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--bone);
  background: var(--ink);
  padding: 6px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.pole-label em { font-style: normal; font-size: 9px; opacity: 0.7; }

/* ══ hero ══ */
.pinwrap { position: relative; }

#s1 { height: 170vh; }
#s2, #s3 { height: 240vh; }

.pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-center { text-align: center; padding: 0 24px; }

.hero-eyebrow { color: var(--bone); opacity: 0.85; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5); }

.hero-title {
  font-size: clamp(90px, 21vw, 330px);
  line-height: 0.92;
  color: var(--bone);
  mix-blend-mode: exclusion; /* inverte sobre o vídeo: o texto "corta" a imagem */
}

.hero-lede { margin-top: 20px; }

.hero-lede span {
  display: inline-block;
  background: var(--bone);
  color: var(--ink);
  font-weight: 500;
  font-size: clamp(14px, 1.8vw, 18px);
  padding: 10px 18px;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.hint {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  bottom: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--bone);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.hint-line {
  display: block;
  width: 1px;
  height: 52px;
  background: linear-gradient(180deg, transparent, var(--bone));
  overflow: hidden;
  position: relative;
}

.hint-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  animation: drip 2s var(--ease) infinite;
}

@keyframes drip {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

/* marquee do hero (rodapé da tela) */
.hero-marquee, .band { overflow: hidden; }

.hero-marquee {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--red);
  padding: 10px 0;
}

.mrow {
  white-space: nowrap;
  font-family: "Anton", sans-serif;
  text-transform: uppercase;
  font-size: 18px;
  letter-spacing: 0.14em;
  color: var(--bone);
  will-change: transform;
}

/* faixa de marquees entre capítulos */
.band {
  position: relative;
  background: var(--bone);
  padding: clamp(40px, 7vh, 80px) 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 -1px 0 var(--ink), 0 1px 0 var(--ink);
}

.mrow.big { font-size: clamp(48px, 8vw, 110px); line-height: 1.05; letter-spacing: 0.02em; }
.mrow.outline { color: transparent; -webkit-text-stroke: 2px var(--ink); }
.mrow.red { color: var(--red); }

/* ══ slabs: painéis que atravessam a tela como uma passada de navalha ══ */
.slab {
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(640px, 82vw);
  background: var(--bone);
  color: var(--ink);
  display: flex;
  align-items: center;
  will-change: transform;
}

.slab.from-left  { left: 0; transform: translateX(-115%) skewX(-6deg); box-shadow: 18px 0 60px rgba(0,0,0,0.35); border-right: 4px solid var(--ink); }
.slab.from-right { right: 0; transform: translateX(115%) skewX(-6deg); box-shadow: -18px 0 60px rgba(0,0,0,0.35); border-left: 4px solid var(--ink); }

.slab-in { padding: clamp(28px, 5vw, 72px); }

.slab-eyebrow { color: var(--red); margin-bottom: 16px; }

.slab h2 {
  font-size: clamp(44px, 6.4vw, 96px);
  line-height: 0.98;
  text-wrap: balance;
}

.body {
  margin-top: 20px;
  max-width: 44ch;
  font-size: clamp(15px, 1.7vw, 17.5px);
  line-height: 1.6;
  color: var(--ink-dim);
  text-wrap: pretty;
}

.specs { margin-top: 24px; color: var(--ink-faint); }
.specs b { color: var(--red); font-weight: 700; }

/* ══ horizontal (a tabela) ══ */
.hwrap { height: 320vh; position: relative; }

.hsticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.htrack {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
  padding-left: clamp(24px, 8vw, 120px);
  padding-right: 20vw;
  will-change: transform;
}

.eyebrow-red { color: var(--red); margin-bottom: 16px; display: block; }

.hcard {
  flex: 0 0 clamp(280px, 30vw, 420px);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bone);
  color: var(--ink);
  box-shadow: 0 2px 0 var(--ink), 0 14px 34px rgba(0, 0, 0, 0.35), 0 34px 80px rgba(0, 0, 0, 0.3);
}

.hcard-title {
  background: none;
  box-shadow: none;
  overflow: visible;
  flex-basis: clamp(300px, 34vw, 480px);
  color: var(--bone);
}

.hcard-title h2 { font-size: clamp(46px, 6vw, 92px); line-height: 0.98; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4); }

.hscroll-hint { margin-top: 24px; color: var(--bone); opacity: 0.7; }

.hcard img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  filter: grayscale(1) sepia(0.6) saturate(1.6) hue-rotate(315deg) contrast(1.1);
  outline: 1px solid rgba(0, 0, 0, 0.1);
  outline-offset: -1px;
}

.hcard figcaption { padding: 18px 20px 22px; }

.hnum { color: var(--red); font-size: 9px; }

.hcard h3 { font-size: 26px; margin-top: 8px; letter-spacing: 0.02em; }

.hcard figcaption p {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-dim);
}

.hcard .price {
  display: inline-block;
  margin-top: 14px;
  font-family: "Anton", sans-serif;
  font-size: 20px;
  color: var(--red);
}

/* ══ builder (fundo sólido bone) ══ */
.solid {
  position: relative;
  background: var(--bone);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(48px, 8vh, 96px) 24px;
  box-shadow: 0 -1px 0 var(--ink);
}

.solid h2, .final h2 { font-size: clamp(40px, 6vw, 88px); line-height: 0.98; }

.build-card {
  margin-top: 34px;
  margin-inline: auto;
  width: min(460px, 92vw);
  border-radius: 12px;
  padding: 10px;
  text-align: left;
  background: #fff;
  box-shadow: 0 0 0 2px var(--ink), 0 10px 0 var(--ink), 0 24px 50px rgba(19, 17, 20, 0.18);
}

.build-base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 14px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}

.build-base em { font-style: normal; color: var(--red); font-size: 9px; margin-left: 8px; }
.build-base .tag.tnum { color: var(--ink-dim); }

.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 8px;
  cursor: pointer;
  transition-property: background-color;
  transition-duration: 0.2s;
}

.opt:hover { background: rgba(19, 17, 20, 0.05); }

.opt input { position: absolute; opacity: 0; }

.opt-box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--ink);
  position: relative;
  flex-shrink: 0;
  transition-property: background-color, border-color;
  transition-duration: 0.2s;
}

.opt-box::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 1px;
  background: var(--bone);
  opacity: 0;
  scale: 0.25;
  transition-property: opacity, scale;
  transition-duration: 0.25s;
  transition-timing-function: var(--ease);
}

.opt input:checked + .opt-box { background: var(--red); border-color: var(--red); }
.opt input:checked + .opt-box::after { opacity: 1; scale: 1; }

.opt-name { flex: 1; font-size: 15px; font-weight: 500; }
.opt-price { color: var(--ink-faint); font-size: 11px; }

.build-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 18px 14px 8px;
  border-top: 1px solid var(--line);
  margin-top: 6px;
}

.build-total .tag { color: var(--ink-faint); }

#total {
  font-family: "Anton", sans-serif;
  font-size: 36px;
  color: var(--red);
}

.build-card .cta { width: calc(100% - 8px); margin: 10px 4px 4px; }

/* ══ agenda (sobre o vídeo, escurecido) ══ */
.final {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(48px, 8vh, 96px) 24px;
  color: var(--bone);
}

.final .body { color: rgba(242, 237, 227, 0.75); margin-inline: auto; }

.reserve {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.pills { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.pill {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 6px;
  border: 2px solid rgba(242, 237, 227, 0.4);
  background: transparent;
  color: var(--bone);
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition-property: scale, background-color, color, border-color;
  transition-duration: 0.25s;
  transition-timing-function: var(--ease);
}

.pill:active { scale: 0.96; }

.pill.is-on {
  background: var(--bone);
  color: var(--ink);
  border-color: var(--bone);
}

.reserve-note { color: rgba(242, 237, 227, 0.45); font-size: 9px; }

/* ══ CTA ══ */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 34px;
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: var(--bone);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(19, 17, 20, 0.9), 0 14px 30px rgba(229, 56, 44, 0.3);
  transition-property: scale, box-shadow, background-color;
  transition-duration: 0.25s;
  transition-timing-function: var(--ease);
}

.cta:hover { box-shadow: 0 3px 0 rgba(19, 17, 20, 0.9), 0 20px 44px rgba(229, 56, 44, 0.4); }
.cta:active { scale: 0.96; }
.cta.is-done { background: #1d7a3c; }

footer {
  margin-top: 64px;
  font-size: 12px;
  color: rgba(242, 237, 227, 0.45);
}

footer strong { color: rgba(242, 237, 227, 0.7); font-weight: 700; }

/* ══ reveal (builder/agenda) ══ */
.reveal > * {
  opacity: 0;
  translate: 0 26px;
  transition-property: opacity, translate;
  transition-duration: 0.8s;
  transition-timing-function: var(--ease);
}

.reveal.in > * { opacity: 1; translate: 0 0; }

.reveal.in > *:nth-child(1) { transition-delay: 0s; }
.reveal.in > *:nth-child(2) { transition-delay: 0.08s; }
.reveal.in > *:nth-child(3) { transition-delay: 0.16s; }
.reveal.in > *:nth-child(4) { transition-delay: 0.24s; }

[data-fade] { will-change: opacity, transform; }

/* ══ responsivo / a11y ══ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hud-tc { margin-left: auto; }
}

@media (max-width: 640px) {
  .pole { width: 12px; height: 22vh; }
  .slab { width: 88vw; }
  .htrack { padding-left: 24px; }
  .grain { display: none; }
  .hint { bottom: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  .hint-line::after, .sound-bars i, .gate-btn-ring, .grain, .hud-tc .rec, .gate-stripe { animation: none; }
  .reveal > * { transition-duration: 0.01s; }
}
