:root {
  --espresso: #170e08; /* carvão */
  --cream: #f5ead8;
  --cream-dim: rgba(245, 234, 216, 0.72);
  --cream-faint: rgba(245, 234, 216, 0.4);
  --caramel: #d97e3f; /* brasa */
  --line: rgba(245, 234, 216, 0.16);
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

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

html { scroll-behavior: smooth; }

/* ═══ capítulos pinados: o texto fica preso no centro e faz
   fade in -> segura -> fade out conforme o scroll (dirigido por JS) ═══ */
.pinwrap { position: relative; }

#s1 { height: 160vh; }
#s2, #s3 { height: 230vh; } /* hold longo: texto fica bem mais tempo na tela */

.pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 6vw, 96px) clamp(56px, 8vw, 120px);
}

.pin.center { align-items: center; text-align: center; }
.pin.left   { align-items: flex-start; text-align: left; }
.pin.right  { align-items: flex-end; text-align: right; }
.pin.right .body { margin-left: auto; }

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

body {
  background: var(--espresso);
  color: var(--cream);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.mono {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

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

/* ═══ intro gate ═══ */
.gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background:
    radial-gradient(90% 70% at 50% 40%, rgba(217, 126, 63, 0.08), transparent 70%),
    var(--espresso);
  transition-property: opacity, filter;
  transition-duration: 0.9s;
  transition-timing-function: var(--ease);
}

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

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

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

.gate-brand {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(56px, 10vw, 120px);
  line-height: 1;
  margin-top: 18px;
}

.gate-sub { margin-top: 10px; color: var(--cream-faint); }

.gate-btn {
  position: relative;
  margin-top: 44px;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(243, 233, 221, 0.04);
  color: var(--cream);
  cursor: pointer;
  transition-property: scale, border-color, background-color;
  transition-duration: 0.3s;
  transition-timing-function: var(--ease);
}

.gate-btn:not(:disabled):hover { border-color: var(--caramel); background: rgba(217, 126, 63, 0.08); }
.gate-btn:not(:disabled):active { scale: 0.96; }
.gate-btn:disabled { cursor: default; color: var(--cream-faint); }

.gate-btn-ring {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px solid rgba(243, 233, 221, 0.08);
}

.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: var(--cream-faint); letter-spacing: 0.12em; }

/* ═══ camadas fixas ═══ */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
  /* comida pede cor: molho mais vermelho, queijo mais dourado */
  filter: saturate(1.4) contrast(1.06);
}

/* mesmas cores nos cards e no loop pra nada parecer lavado ao lado do vídeo */
.hcard img, .loop-card video { filter: saturate(1.35) contrast(1.04); }

.scrim {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(20, 16, 11, 0.62) 0%, rgba(20, 16, 11, 0.14) 30%, rgba(20, 16, 11, 0.14) 65%, rgba(20, 16, 11, 0.66) 100%),
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(20, 16, 11, 0.5) 100%);
}

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

.grain {
  position: fixed;
  inset: -100px;
  z-index: 40;
  pointer-events: none;
  opacity: 0.05;
  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 ═══ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(18px, 3vw, 40px);
  background: linear-gradient(180deg, rgba(20, 16, 11, 0.75), transparent);
}

.brand {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 19px;
  color: var(--cream);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand .mono { font-size: 8px; color: var(--caramel); letter-spacing: 0.3em; }

.nav-links { display: flex; gap: clamp(10px, 2vw, 26px); }

.nav-links a {
  color: var(--cream-faint);
  text-decoration: none;
  padding: 12px 2px;
  transition-property: color;
  transition-duration: 0.25s;
}

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

.sound {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(20, 16, 11, 0.4);
  color: var(--cream);
  cursor: pointer;
  transition-property: scale, border-color;
  transition-duration: 0.25s;
  transition-timing-function: var(--ease);
}

.sound:hover { border-color: var(--caramel); }
.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(--caramel);
  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; }

/* ═══ HUD ═══ */
.hud { position: fixed; inset: 0; z-index: 20; pointer-events: none; }

.hud-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(243, 233, 221, 0.28);
}

.hud-corner.tl { top: 74px; left: 18px; border-right: 0; border-bottom: 0; }
.hud-corner.tr { top: 74px; right: 18px; border-left: 0; border-bottom: 0; }
.hud-corner.bl { bottom: 18px; left: 18px; border-right: 0; border-top: 0; }
.hud-corner.br { bottom: 18px; right: 18px; border-left: 0; border-top: 0; }

.hud-tc {
  position: absolute;
  top: 84px;
  left: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cream-dim);
}

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

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

.hud-tc em {
  font-style: normal;
  color: var(--cream-faint);
  font-size: 9px;
}

/* ═══ temp rail (esq) / pour rail (dir) ═══ */
.temp, .pour {
  position: fixed;
  top: 50%;
  translate: 0 -50%;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.temp {
  left: clamp(14px, 3vw, 34px);
  color: var(--cream-dim);
  transition-property: opacity, translate;
  transition-duration: 0.6s;
  transition-timing-function: var(--ease);
}

.temp.is-done { opacity: 0; translate: -20px -50%; }
.pour { right: clamp(14px, 3vw, 34px); }

.temp-max { font-size: 9px; color: var(--cream-faint); }

.temp-track, .pour-track {
  width: 2px;
  height: 30vh;
  background: rgba(243, 233, 221, 0.16);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.temp-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, #e05c3a, var(--caramel));
  transform-origin: bottom;
  transform: scaleY(0);
}

.pour-fill {
  width: 100%;
  height: 100%;
  align-self: flex-start;
  background: linear-gradient(180deg, var(--cream), var(--caramel));
  transform-origin: top;
  transform: scaleY(0);
}

.temp-read { font-size: 11px; }

.temp em, .pour em {
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--cream-faint);
}

.pour-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: var(--cream-dim);
}

/* ═══ painéis ═══ */
.panel {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 6vw, 96px) clamp(56px, 8vw, 120px);
}

.panel.center, .panel.final { align-items: center; text-align: center; }

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

.display {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(64px, 14vw, 180px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: clamp(36px, 6vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.lede {
  margin-top: 22px;
  font-size: clamp(16px, 2.2vw, 21px);
  color: var(--cream-dim);
  text-wrap: balance;
}

.body {
  margin-top: 22px;
  max-width: 42ch;
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.65;
  color: var(--cream-dim);
  text-wrap: pretty;
}

.panel.center .body, .panel.final .body { margin-inline: auto; }

.specs { margin-top: 26px; color: var(--cream-faint); }
.specs b { color: var(--caramel); font-weight: 500; }

/* split c/ loop card */
.split {
  display: flex;
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  width: 100%;
  justify-content: space-between;
}

.loop-card {
  flex: 0 0 clamp(200px, 24vw, 320px);
  width: clamp(200px, 24vw, 320px);
  min-width: 0;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(243, 233, 221, 0.1),
    0 12px 32px rgba(0, 0, 0, 0.35),
    0 32px 80px rgba(0, 0, 0, 0.3);
}

.loop-card video { display: block; width: 100%; aspect-ratio: 9 / 15; object-fit: cover; }

.loop-card figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(20, 16, 11, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--cream-dim);
  font-size: 9px;
}

/* ═══ reveal ═══ */
.reveal > * {
  opacity: 0;
  translate: 0 26px;
  filter: blur(6px);
  transition-property: opacity, translate, filter;
  transition-duration: 0.9s;
  transition-timing-function: var(--ease);
}

.reveal.in > * { opacity: 1; translate: 0 0; filter: blur(0); }

.reveal.in > *:nth-child(1) { transition-delay: 0s; }
.reveal.in > *:nth-child(2) { transition-delay: 0.1s; }
.reveal.in > *:nth-child(3) { transition-delay: 0.2s; }
.reveal.in > *:nth-child(4) { transition-delay: 0.3s; }
.reveal.in > *:nth-child(5) { transition-delay: 0.4s; }

.split > div:first-child { flex: 1; }
/* largura presa também à altura da tela: o card nunca estoura o viewport */
.split .loop-card { flex: 0 0 min(clamp(200px, 24vw, 320px), 34svh); width: min(clamp(200px, 24vw, 320px), 34svh); }

/* hint */
.hint {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  bottom: max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--cream-dim);
}

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

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

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

/* ═══ seção horizontal ═══ */
.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(56px, 8vw, 120px);
  padding-right: 20vw;
  will-change: transform;
}

.hcard {
  flex: 0 0 clamp(280px, 30vw, 420px);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(20, 16, 11, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    inset 0 0 0 1px rgba(243, 233, 221, 0.1),
    0 10px 28px rgba(0, 0, 0, 0.3),
    0 30px 72px rgba(0, 0, 0, 0.28);
}

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

.hscroll-hint { margin-top: 26px; color: var(--cream-faint); }

.hcard img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  outline: 1px solid rgba(255, 255, 255, 0.1);
  outline-offset: -1px;
}

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

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

.hcard h3 {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 24px;
  margin-top: 8px;
}

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

.hcard .price { display: inline-block; margin-top: 14px; color: var(--caramel); font-size: 13px; }

/* ═══ builder ═══ */
.build-card {
  margin-top: 34px;
  margin-inline: auto;
  width: min(460px, 92vw);
  border-radius: 24px;
  padding: 10px;
  text-align: left;
  background: rgba(20, 16, 11, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    inset 0 0 0 1px rgba(243, 233, 221, 0.1),
    0 12px 32px rgba(0, 0, 0, 0.3),
    0 32px 80px rgba(0, 0, 0, 0.3);
}

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

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

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

.opt:hover { background: rgba(243, 233, 221, 0.05); }

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

.opt-box {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(243, 233, 221, 0.35);
  position: relative;
  flex-shrink: 0;
  transition-property: background-color, border-color;
  transition-duration: 0.2s;
}

.opt-box::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 2px;
  background: var(--espresso);
  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(--caramel); border-color: var(--caramel); }
.opt input:checked + .opt-box::after { opacity: 1; scale: 1; }

.opt-name { flex: 1; font-size: 15px; }
.opt-price { color: var(--cream-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 .mono { color: var(--cream-faint); }

#total {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 34px;
  color: var(--caramel);
}

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

/* ═══ reserva ═══ */
.reserve {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  background: rgba(20, 16, 11, 0.45);
}

.step-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(243, 233, 221, 0.08);
  color: var(--cream);
  font-size: 18px;
  cursor: pointer;
  transition-property: scale, background-color;
  transition-duration: 0.2s;
  transition-timing-function: var(--ease);
}

.step-btn:hover { background: rgba(243, 233, 221, 0.15); }
.step-btn:active { scale: 0.96; }

.step-val { padding: 0 14px; font-size: 15px; color: var(--cream-dim); }
.step-val b { color: var(--cream); font-size: 17px; }

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

.pill {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cream-dim);
  font-family: inherit;
  font-size: 13.5px;
  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(--cream);
  color: var(--espresso);
  border-color: var(--cream);
  font-weight: 600;
}

.reserve-note { color: var(--cream-faint); font-size: 9px; }

/* ═══ CTA ═══ */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 34px;
  border: 0;
  border-radius: 999px;
  background: var(--cream);
  color: var(--espresso);
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.3),
    0 12px 32px rgba(0, 0, 0, 0.28);
  transition-property: scale, box-shadow, background-color;
  transition-duration: 0.25s;
  transition-timing-function: var(--ease);
}

.cta:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.34), 0 18px 44px rgba(0, 0, 0, 0.3); }
.cta:active { scale: 0.96; }
.cta.is-done { background: var(--caramel); }

footer {
  margin-top: 72px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: rgba(243, 233, 221, 0.45);
}

footer strong { color: rgba(243, 233, 221, 0.7); font-weight: 600; }

/* ═══ responsivo / a11y ═══ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .split { flex-direction: column; align-items: flex-start; }
  .loop-card { flex-basis: auto; width: min(240px, 60vw); }
}

@media (max-width: 640px) {
  .panel, .pin { padding-left: 24px; padding-right: 60px; }
  .pin.left, .pin.right { align-items: flex-start; text-align: left; }
  .pin.right .body { margin-left: 0; }
  .temp { display: none; }
  .temp-track, .pour-track { height: 20vh; }
  .hud-tc { top: 72px; left: 22px; }
  .htrack { padding-left: 24px; }
  .grain { display: none; }
}

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