:root {
  --bg: #0f0c0a;
  --surface: #1a1511;
  --line: #322a23;
  --cream: #f4ecdf;
  --muted: #ab9d8c;
  --ember: #ff5c1a;
  --ember-dim: #6e2c10;
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --body: "Hanken Grotesk", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font: 400 1.0625rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1480px; margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: fixed; top: -60px; left: 16px; z-index: 100;
  background: var(--ember); color: var(--bg); padding: 10px 16px; font-weight: 600;
}
.skip:focus { top: 10px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 32px;
  height: var(--nav-h);
  padding-inline: var(--gutter);
  background: rgba(15, 12, 10, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font: 400 1.35rem/1 var(--display);
  letter-spacing: .03em; text-transform: uppercase; text-decoration: none;
  white-space: nowrap;
}
.nav-links { display: flex; gap: 28px; margin-left: 12px; }
.nav-links a {
  font-size: .95rem; color: var(--muted); text-decoration: none;
  transition: color .15s;
}
.nav-links a:hover { color: var(--cream); }
.nav-end { display: flex; align-items: center; gap: 16px; margin-left: auto; }

.lang { display: flex; font: 500 .8rem/1 var(--mono); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.lang button { padding: 9px 11px; color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--cream); color: var(--bg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  background: var(--ember); color: var(--bg);
  font-weight: 600; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--ember); border-radius: 6px;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--cream); border-color: var(--cream); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: .92rem; }
.btn-small .narrow { display: none; }
.btn-ghost { background: transparent; color: var(--cream); border-color: var(--line); }
.btn-ghost:hover { color: var(--bg); }
.btn-dark { background: var(--bg); color: var(--cream); border-color: var(--bg); }
.btn-dark:hover { background: var(--cream); color: var(--bg); border-color: var(--cream); }

.round {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  font-size: 1.15rem; line-height: 1;
  transition: background .15s, color .15s, border-color .15s;
}
.round:hover { background: var(--cream); color: var(--bg); border-color: var(--cream); }
.round:disabled { opacity: .3; cursor: default; background: none; color: inherit; border-color: var(--line); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(32px, 5vh, 64px); }
.eyebrow {
  font: 400 .85rem/1.3 var(--mono); color: var(--muted);
  letter-spacing: .02em;
  margin-bottom: clamp(4px, 1vh, 10px);
}
h1 {
  font: 400 clamp(3.5rem, min(11.4vw, 18.5vh), 11.5rem)/1.2 var(--display);
  text-transform: uppercase;
  letter-spacing: .005em;
}
h1 em {
  font: italic 400 1.12em/.9 var(--serif);
  text-transform: none; color: var(--ember);
  letter-spacing: -.01em;
}
.hero-row {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 32px 48px; flex-wrap: wrap;
  margin-top: clamp(18px, 3vh, 32px);
}
.lead { max-width: 58ch; font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--cream); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Timeline ---------- */
.timeline {
  margin-top: clamp(28px, 5vh, 52px);
  border-block: 1px solid var(--line);
  background: #0b0907;
}
.tl-bar {
  display: flex; align-items: center; gap: 14px;
  height: 40px; padding-inline: var(--gutter);
  border-bottom: 1px solid var(--line);
  font: 400 .78rem/1 var(--mono); color: var(--muted);
}
.tl-toggle {
  width: 28px; height: 28px; display: grid; place-items: center;
  color: var(--cream); font-size: .75rem; border-radius: 4px;
}
.tl-toggle:hover { background: var(--line); }
.tl-tc { margin-left: auto; color: var(--ember); font-size: .9rem; font-variant-numeric: tabular-nums; }

.tl-view { position: relative; overflow: hidden; }
.tl-move { display: flex; width: max-content; will-change: transform; animation: tl-run 110s linear infinite; }
.timeline.is-paused .tl-move { animation-play-state: paused; }
@keyframes tl-run { to { transform: translateX(-50%); } }

.tl-half { display: flex; flex: none; }
.clip { flex: none; display: flex; flex-direction: column; }
.clip-ruler {
  height: 22px; position: relative;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 16px) bottom / 100% 5px no-repeat;
  font: 400 .62rem/18px var(--mono); color: #7d7063;
  padding-left: 5px; white-space: nowrap; overflow: hidden;
}
.clip-video {
  position: relative; height: clamp(84px, 13vh, 124px);
  margin: 5px 1px 3px; overflow: hidden; border-radius: 3px;
  background: var(--surface);
}
.clip-video img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--zoom, 1)); }
.clip-video span {
  position: absolute; left: 0; top: 0; max-width: 100%;
  padding: 2px 6px; background: rgba(11, 9, 7, .78);
  font: 400 .64rem/1.4 var(--mono); color: var(--cream);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.clip-audio {
  height: 34px; margin: 0 1px 6px; border-radius: 3px;
  background: #241109; overflow: hidden;
}
.clip-audio svg { display: block; width: 100%; height: 100%; }
.clip-audio path { fill: var(--ember); }

.tl-head {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; margin-left: -1px; background: var(--ember);
  pointer-events: none;
}
.tl-head::before {
  content: ""; position: absolute; top: 0; left: -6px;
  border: 7px solid transparent; border-top-color: var(--ember); border-bottom: 0;
}

/* ---------- Stats ---------- */
.stats dl {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}
.stats div { padding-block: clamp(26px, 4vw, 44px); padding-right: 16px; }
.stats div + div { padding-left: clamp(16px, 2.4vw, 32px); border-left: 1px solid var(--line); }
.stats dd { font: 400 clamp(2.3rem, 4.6vw, 4rem)/1.1 var(--display); }
.stats div { display: flex; flex-direction: column; }
.stats dt { order: 2; color: var(--muted); font-size: .95rem; margin-top: 6px; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 128px) 0; }
.sec-head {
  display: grid; grid-template-columns: auto 1fr; align-items: start;
  column-gap: 18px; margin-bottom: clamp(28px, 4vw, 52px);
}
.sec-n { font: 400 .9rem/1 var(--mono); color: var(--ember); margin-top: .9em; }
.sec-head h2 {
  font: 400 clamp(2.8rem, 7vw, 6rem)/1.05 var(--display);
  text-transform: uppercase;
}
.sec-head p { grid-column: 2; color: var(--muted); max-width: 60ch; margin-top: 8px; }

/* ---------- Project cards ---------- */
.grid-gastro { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(44px, 5vw, 72px) clamp(20px, 3vw, 40px); }
.grid-other { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(44px, 5vw, 64px) clamp(20px, 3vw, 40px); }
.grid-other .card { grid-column: span 2; }
.grid-other .card:nth-child(-n+2) { grid-column: span 3; }

.card { min-width: 0; display: flex; flex-direction: column; }
.media {
  position: relative; display: block; width: 100%;
  overflow: hidden; border-radius: 6px; background: var(--surface);
  aspect-ratio: 16 / 9;
}
.media img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--zoom, 1)); transition: transform .4s ease; }
.media:hover img { transform: scale(calc(var(--zoom, 1) * 1.035)); }
.media::after {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(244, 236, 223, .08);
  pointer-events: none;
}
.play {
  position: absolute; left: 14px; bottom: 14px;
  width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ember); color: var(--bg);
  transition: transform .2s ease;
}
.play svg { width: 18px; height: 18px; margin-left: 2px; fill: currentColor; }
.media:hover .play { transform: scale(1.1); }
.media-sm .play { left: 8px; bottom: 8px; width: 30px; height: 30px; }
.media-sm .play svg { width: 11px; height: 11px; margin-left: 1px; }

.thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 8px; }
.pair { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pair .play { width: 40px; height: 40px; left: 10px; bottom: 10px; }
.card-info { margin-top: 18px; }
.card-tag { font: 400 .78rem/1.3 var(--mono); color: var(--ember); margin-bottom: 8px; }
.card h3 {
  font: 400 clamp(1.8rem, 3vw, 2.5rem)/1.12 var(--display);
  text-transform: uppercase; letter-spacing: .01em;
}
.card-desc { color: var(--muted); margin-top: 10px; max-width: 62ch; }
.card-stats {
  display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 14px;
  font: 400 .84rem/1.4 var(--mono); color: var(--muted);
}
.card-stats b { font-weight: 500; color: var(--cream); }

/* Destaque: vídeo grande, duas capas ao lado e texto em duas colunas abaixo */
.card-featured { grid-column: 1 / -1; display: block; }
.card-featured .card-visual { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.card-featured .card-visual > .media { aspect-ratio: auto; height: 100%; }
.card-featured .card-visual > .media img { position: absolute; inset: 0; }
.card-featured .thumbs { grid-auto-flow: row; grid-auto-columns: auto; margin-top: 0; }
.card-featured .media-sm .play { left: 12px; bottom: 12px; width: 40px; height: 40px; }
.card-featured .media-sm .play svg { width: 14px; height: 14px; }
.card-featured .card-info {
  display: grid; grid-template-columns: 1fr 1fr; align-items: start;
  column-gap: clamp(24px, 4vw, 64px); margin-top: 24px;
}
.card-featured .card-tag, .card-featured h3, .card-featured .card-stats { grid-column: 1; }
.card-featured h3 { font-size: clamp(2.6rem, 5.4vw, 4.8rem); }
.card-featured .card-desc {
  grid-column: 2; grid-row: 1 / span 3; margin-top: 0;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: var(--cream);
}

/* ---------- Vertical rail ---------- */
.sec-head-rail { grid-template-columns: auto 1fr auto; }
.rail-nav { grid-column: 3; grid-row: 1 / span 2; align-self: end; display: flex; gap: 8px; }
/* --n define quantos reels cabem inteiros; a largura de cada um é calculada a partir dele */
.rail {
  --n: 5; --gap: 14px;
  display: grid; grid-auto-flow: column; gap: var(--gap);
  grid-auto-columns: calc((100% - (var(--n) - 1) * var(--gap)) / var(--n));
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 14px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.reel { min-width: 0; scroll-snap-align: start; text-align: left; }
.reel .media { aspect-ratio: 9 / 16; }
.reel-name { display: block; margin-top: 10px; font-weight: 500; }

/* ---------- Formats ---------- */
.formats { border-top: 1px solid var(--line); }
.formats button {
  width: 100%; text-align: left;
  display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 16px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
  transition: padding .2s ease, color .15s;
}
.formats button:hover { padding-left: 14px; color: var(--ember); }
.fmt-name { font: 400 clamp(1.4rem, 2.6vw, 2.1rem)/1.2 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.fmt-who { color: var(--muted); }
.fmt-go { font: 400 .84rem/1 var(--mono); white-space: nowrap; }

/* ---------- Contact ---------- */
.contact {
  margin-top: clamp(72px, 10vw, 140px);
  background: var(--ember); color: var(--bg);
  padding-top: clamp(56px, 8vw, 110px);
}
.contact h2 {
  font: 400 clamp(3.2rem, 10.5vw, 10rem)/1.03 var(--display);
  text-transform: uppercase;
}
.contact-sub { font-size: clamp(1.1rem, 1.6vw, 1.35rem); margin-top: 14px; }
.contact-links { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 28px; margin-top: 30px; }
.contact-mail { font-weight: 600; text-underline-offset: 4px; overflow-wrap: anywhere; }
.contact :focus-visible { outline-color: var(--bg); }
.foot {
  display: flex; justify-content: space-between; gap: 8px 32px; flex-wrap: wrap;
  margin-top: clamp(48px, 7vw, 96px); padding-block: 20px;
  border-top: 1px solid rgba(15, 12, 10, .35);
  font-size: .88rem;
}

/* ---------- Player ---------- */
.player {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0; border: 0; background: transparent; color: var(--cream);
  overflow: visible;
}
.player.is-vertical { width: min(420px, calc(100vw - 32px)); }
.player::backdrop { background: rgba(8, 6, 5, .92); }
.player-top, .player-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.player-top { margin-bottom: 10px; }
.player-bottom { margin-top: 12px; align-items: flex-start; }
.player-meta { font: 400 .85rem/1.3 var(--mono); color: var(--muted); }
.player-meta strong { color: var(--cream); font-weight: 500; margin-right: 8px; }
.player-frame {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  max-height: calc(100dvh - 190px);
  background: #000; border-radius: 6px; overflow: hidden;
}
.player.is-vertical .player-frame { aspect-ratio: 9 / 16; }
.player-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.player-actions a { font-size: .9rem; color: var(--muted); margin-right: 8px; text-underline-offset: 3px; }
.player-actions a:hover { color: var(--cream); }
.player .round[hidden] { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .rail { --n: 4; }
}
@media (max-width: 1040px) {
  .nav-links { gap: 18px; margin-left: 0; }
}
@media (max-width: 860px) {
  .rail { --n: 3; }
  :root { --nav-h: 100px; }
  .nav { flex-wrap: wrap; height: auto; gap: 0 12px; padding-block: 10px 0; }
  .nav-links {
    order: 3; width: 100%; justify-content: space-between; gap: 12px;
    margin-top: 8px; padding-block: 9px;
    border-top: 1px solid var(--line);
  }
  .card-featured .card-visual { grid-template-columns: 1fr; }
  .card-featured .card-visual > .media { aspect-ratio: 16 / 9; height: auto; }
  .card-featured .thumbs { grid-auto-flow: column; grid-auto-columns: 1fr; }
  .card-featured .media-sm .play { left: 8px; bottom: 8px; width: 30px; height: 30px; }
  .card-featured .media-sm .play svg { width: 11px; height: 11px; }
  .card-featured .card-info { display: block; margin-top: 18px; }
  .card-featured .card-desc { margin-top: 10px; }
  .stats dl { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(3) { padding-left: 0; border-left: 0; }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .grid-other .card, .grid-other .card:nth-child(-n+2) { grid-column: span 3; }
  .grid-other .card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  h1 { font-size: 19vw; }
  .btn-small { min-height: 38px; padding: 0 12px; font-size: .85rem; }
  .btn-small .wide { display: none; }
  .btn-small .narrow { display: inline; }
  .brand { font-size: 1.15rem; }
  .hero-cta, .hero-cta .btn { width: 100%; }
  .grid-gastro { grid-template-columns: 1fr; }
  .grid-other { grid-template-columns: 1fr; }
  .grid-other .card, .grid-other .card:nth-child(-n+2), .grid-other .card:last-child { grid-column: auto; }
  .sec-head, .sec-head-rail { grid-template-columns: auto 1fr; }
  .rail-nav { display: none; }
  .rail { --n: 2; --gap: 10px; }
  .reel .play { left: 10px; bottom: 10px; width: 40px; height: 40px; }
  .formats button { grid-template-columns: 1fr auto; }
  .fmt-who { grid-column: 1; grid-row: 2; }
  .fmt-go { grid-column: 2; grid-row: 1 / span 2; }
  .tl-name { display: none; }
  .contact-links .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tl-move { animation: none; }
  .media img, .play, .formats button { transition: none; }
}
