:root {
  --paper: #ffffff;
  --ink: #111111;
  --night: #0e0e0e;
  --red: #c8281a;
  --gray: #626262;
  --gray-dark: #a6a6a6;
  --line: #e2e2e2;

  --display: "Anton", "Impact", sans-serif;
  --body: "Inter Tight", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --hand: "Reenie Beanie", cursive;

  --gutter: clamp(16px, 4vw, 56px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* listras da claquete: 28px preto, 28px branco, inclinadas */
  --stripes: repeating-linear-gradient(115deg, var(--ink) 0 28px, var(--paper) 28px 56px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scrollbar-color: var(--red) var(--night); }
section { scroll-margin-top: 64px; }

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 4px; }
h1, h2, h3, p, ol, dl, dd, figure { margin: 0; }
ol { padding: 0; list-style: none; }
p { text-wrap: pretty; }

::selection { background: var(--ink); color: var(--paper); }
.scene--black ::selection { background: var(--red); color: var(--paper); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Cenas: cada seção tem a sua luz */
.scene--red { background: var(--red); color: var(--paper); }
.scene--black { background: var(--night); color: var(--paper); }
.scene--white { background: var(--paper); color: var(--ink); }

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1.5px solid var(--ink);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--red); border-color: var(--red); }
.scene--red .btn:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn--small { padding: 9px 14px; font-size: 14px; }
.btn--inverse { background: var(--paper); color: var(--red); border-color: var(--paper); }
.scene--red .btn--inverse:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--ghost-light { background: transparent; color: var(--paper); border-color: var(--paper); }
.scene--red .btn--ghost-light:hover { background: var(--paper); color: var(--red); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions--center { justify-content: center; }

/* Navegação: transparente sobre a Hero, preta depois dela */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 14px var(--gutter);
  color: var(--paper);
  transition: background 0.3s;
}
.nav--solid { background: var(--night); }
.nav--solid .btn { background: var(--red); border-color: var(--red); }
.nav--solid .btn:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.nav__logo {
  font-family: var(--display);
  font-size: 24px;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.nav__links { display: flex; gap: 24px; margin-left: auto; }
.nav__links a { text-decoration: none; font-weight: 500; font-size: 15px; }
.nav__links a:hover { text-decoration: underline; }

/* Hero */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(56px, 11vh, 104px);
  padding: 104px var(--gutter) 32px;
  text-align: center;
}
.hero__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(48px, min(7vw, 11vh), 96px);
  line-height: 0.95;
  text-transform: uppercase;
  max-width: 28ch;
  text-wrap: balance;
}

/* Funil: cada linha mais curta que a anterior, até "inteiro." */
.hero__line { display: block; }

/* "inteiro." em preto, circulado à mão em branco */
.mark {
  position: relative;
  display: block;
  width: fit-content;
  margin: 0.12em auto 0;
  color: var(--ink);
}
.mark__circle {
  position: absolute;
  left: -11%;
  top: -30%;
  width: 122%;
  height: 156%;
  overflow: visible;
  pointer-events: none;
}
.mark__circle path {
  fill: none;
  stroke: var(--paper);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw 2.4s 1s cubic-bezier(0.45, 0.05, 0.35, 1) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Timeline de edição: uma tomada só, da ideia ao relatório */
.timeline {
  position: relative;
  width: min(100%, 940px);
  text-align: left;
}
.timeline__ruler {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding-bottom: 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--paper);
}
.timeline__ruler::after {
  content: "";
  position: absolute;
  inset: auto 0 2px;
  height: 7px;
  background: repeating-linear-gradient(to right, var(--paper) 0 1px, transparent 1px calc(100% / 30));
  opacity: 0.7;
}
.timeline__track { position: relative; background: var(--ink); }
.timeline__clips {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.timeline__clips li {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 68px;
  font-family: var(--display);
  font-size: clamp(15px, 1.8vw, 22px);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--paper);
  animation: pass var(--loop) linear infinite;
}
.timeline__clips li + li { box-shadow: inset 1px 0 rgba(255, 255, 255, 0.2); }
/* Cada clipe acende quando a agulha entra nele (a agulha leva 70% do loop pra atravessar) */
.timeline__clips li:nth-child(2) { animation-delay: calc(var(--loop) * 0.7 / 5); }
.timeline__clips li:nth-child(3) { animation-delay: calc(var(--loop) * 0.7 / 5 * 2); }
.timeline__clips li:nth-child(4) { animation-delay: calc(var(--loop) * 0.7 / 5 * 3); }
.timeline__clips li:nth-child(5) { animation-delay: calc(var(--loop) * 0.7 / 5 * 4); }
@keyframes pass {
  0% { background: rgba(255, 255, 255, 0.16); }
  14%, 100% { background: transparent; }
}

/* Agulha em loop: atravessa, segura no fim, some e volta ao começo */
.timeline { --loop: 5.5s; }
.timeline__playhead {
  position: absolute;
  top: -12px;
  bottom: -8px;
  left: 0;
  width: 2px;
  background: var(--paper);
  animation: sweep var(--loop) linear infinite;
}
.timeline__playhead::before {
  content: "";
  position: absolute;
  top: 0;
  left: -6px;
  width: 14px;
  height: 12px;
  background: var(--paper);
  clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%);
}
@keyframes sweep {
  0% { left: 0; opacity: 1; }
  70% { left: calc(100% - 2px); opacity: 1; }
  88% { left: calc(100% - 2px); opacity: 1; }
  94% { left: calc(100% - 2px); opacity: 0; }
  95% { left: 0; opacity: 0; }
  100% { left: 0; opacity: 1; }
}

.note {
  font-family: var(--hand);
  line-height: 1;
  pointer-events: none;
}
/* Assinatura escrita da esquerda pra direita, depois do círculo.
   Fica fora do fluxo pra timeline ficar no meio exato entre headline e botão. */
.note--sign {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: fit-content;
  padding: 0 4px;
  font-size: clamp(30px, 3vw, 40px);
  color: var(--paper);
  rotate: -2deg;
  clip-path: inset(-30% 100% -30% 0);
  /* começa quando a agulha chega ao fim da faixa pela primeira vez (70% do loop) */
  animation: write 1.6s calc(var(--loop) * 0.7) cubic-bezier(0.45, 0.05, 0.35, 1) forwards;
}
@keyframes write { to { clip-path: inset(-30% 0 -30% 0); } }

/* Faixas da claquete entre a Hero e Trabalhos: retas, em sentidos opostos */
.band {
  display: grid;
  gap: 10px;
  padding: 10px 0;
  background: var(--night);
}
.band__bar {
  position: relative;
  height: clamp(16px, 1.8vw, 22px);
  overflow: hidden;
}
/* a faixa é mais larga que a tela e anda exatamente um período das listras: o loop não tem emenda */
.band__bar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -80px;
  width: calc(100% + 160px);
  background: var(--stripes);
  animation: stripes 3s linear infinite;
}
.band__bar--reverse::before { animation-direction: reverse; }
@keyframes stripes { to { transform: translateX(-61.79px); } }

/* Seções */
.section { padding: clamp(72px, 9vw, 128px) var(--gutter); }
.section__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 48px;
}
.section__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(56px, 8vw, 96px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--red);
}
.section__intro { font-size: 18px; }

/* Trabalhos (fundo preto): índice de créditos com preview */
.frame {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #1c1c1c;
  overflow: hidden;
}
.frame__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 16px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-dark);
  padding-top: 120px;
}
.play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--red);
  transition: background 0.2s;
}
.play::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  translate: 2px 0;
  width: 30%;
  height: 34%;
  background: var(--paper);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transition: background 0.2s;
}
.frame__tc {
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--gray-dark);
}
.note--work {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 36px;
  color: var(--red);
  rotate: -6deg;
}

#trabalhos { padding-bottom: clamp(52px, 5.5vw, 76px); }

/* Faixa de vídeos: o ativo abre no formato do vídeo (9:16), os outros viram fatias */
.reel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: clamp(32px, 4vw, 64px);
  align-items: end;
}
.strip {
  --h: clamp(360px, 60vh, 620px);
  display: flex;
  gap: 4px;
  height: var(--h);
}
.panel {
  flex: 1 1 0;
  min-width: 0;
  transition: flex 0.5s var(--ease-out);
}
.panel.is-active { flex: 0 0 calc(var(--h) * 9 / 16); }
.panel__open {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  border-radius: 24px;
  background: #1c1c1c;
  cursor: pointer;
}
.panel__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55) saturate(0.8);
  transition: filter 0.4s ease;
}
.panel.is-active .panel__video { filter: none; }
.panel .play { opacity: 0; transition: opacity 0.2s, background 0.2s; }
.panel.is-active .panel__open:hover .play,
.panel.is-active .panel__open:focus-visible .play { opacity: 1; }
.panel__open:focus-visible { outline-offset: -4px; }

.reel__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.reel__cap { flex: 1 0 100%; min-width: 0; overflow: hidden; padding-bottom: 2px; }
/* setas e contador só nas telas de toque, onde as fatias são estreitas */
.reel__count,
.reel__arrow { display: none; }
.reel__name {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--red);
}
.reel__meta { margin-top: 8px; font-size: 15px; }
.reel__cap [data-cap-seg],
.reel__credits,
.reel__count,
.room__seg,
.room__label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-dark);
}
.reel__credits { margin-right: 4px; }
.reel__open { background: var(--red); border-color: var(--red); }
.reel__open:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.reel__count b { color: var(--paper); font-weight: 500; }
.reel__arrow {
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: none;
  color: var(--paper);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.reel__arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.reel__arrow:hover { background: var(--paper); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }


/* Sala de projeção: texto e ficha à esquerda, os vídeos lado a lado à direita */
html:has(.room[open]) { overflow: hidden; }
.room {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0 var(--gutter);
  border: 0;
  background: var(--night);
  color: var(--paper);
}
.room[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  animation: room-in 0.45s var(--ease-out);
}
.room::backdrop { background: rgba(0, 0, 0, 0.7); }
@keyframes room-in { from { opacity: 0; translate: 0 24px; } }
.room__stripes {
  height: 14px;
  margin-inline: calc(-1 * var(--gutter));
  background: var(--stripes);
}
.room__close { position: absolute; top: 30px; right: var(--gutter); z-index: 2; }
.room__close:hover { background: var(--paper); color: var(--ink); }

.room__body {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "head reel" "text reel";
  column-gap: clamp(32px, 5vw, 80px);
  min-height: 0;
  padding-top: 40px;
}
.room__head { grid-area: head; padding-right: 96px; }
.room__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(44px, 5.5vw, 80px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--red);
  margin: 4px 0 20px;
}
.room__text {
  grid-area: text;
  min-height: 0;
  overflow-y: auto;
  padding: 0 8px 16px 0;
  scrollbar-width: thin;
}
.room__label { display: block; margin: 0 0 8px; }
.room__label ~ .room__label { margin-top: 24px; }
.room__about { font-size: 17px; max-width: 52ch; }
.room__did { margin: 0; padding-left: 1.1em; font-size: 16px; }
.room__did li + li { margin-top: 4px; }
.room__did li::marker { color: var(--red); }
.room__slate { margin-top: 28px; }

/* a pilha: a carta da frente é a atual, as próximas em leque atrás dela */
.room__reel {
  grid-area: reel;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-width: 0;
  min-height: 0;
  --fan-x: 26px;
  --fan-r: 3.5deg;
  --spread: 1;
}
/* o leque abre pra direita: a carta da frente e as setas andam juntas pra esquerda e o conjunto fica no meio */
.room__reel > .deck,
.room__reel > .deck__bar { translate: calc(var(--spread) * var(--fan-x) * -1.5) 0; }
.deck {
  position: relative;
  touch-action: pan-y;
  user-select: none;
}
.deck--takes {
  --tall: min(calc(100dvh - 290px), 600px);
  height: var(--tall);
  aspect-ratio: 9 / 16;
}
.card {
  --d: 0;
  position: absolute;
  inset: 0;
  transform-origin: 50% 88%;
  transform:
    translateX(calc(var(--d) * var(--fan-x)))
    rotate(calc(var(--d) * var(--fan-r)))
    scale(calc(1 - var(--d) * 0.05));
  filter: brightness(calc(1 - var(--d) * 0.24));
  transition: transform 0.55s var(--ease-out), filter 0.3s;
  cursor: pointer;
}
.card.is-front { cursor: grab; }
.card.is-dragging { cursor: grabbing; transition: none; }
.card.is-out { visibility: hidden; opacity: 0; pointer-events: none; }
.card:not(.is-front):hover { filter: brightness(calc(1.12 - var(--d) * 0.24)); }

.take__face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 24px;
  background: #1c1c1c center / cover no-repeat;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}
.take__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.take__start {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: inherit;
}
.take__start:focus-visible { outline-offset: -6px; }
.take__start .play { transition: scale 0.25s var(--ease-out), background 0.2s; }
.take__start:hover .play { scale: 1.1; }
.card:not(.is-front) .take__start,
.card:not(.is-front) .take__controls,
.card:not(.is-front) .take__label { visibility: hidden; }

/* tocando: sai a etiqueta, entra a barra; pausado mostra o play de novo */
.card.is-playing .take__start,
.card.has-error .take__start { display: none; }
.card.is-playing .take__label { display: none; }
.card.is-playing .take__face { cursor: pointer; }
.card.is-paused .take__face::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56'%3E%3Cpath fill='%23fff' d='M23 18.5v19L38 28z'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}
/* carregando: o anel gira no lugar do play */
.card.is-loading .take__face::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--paper);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { rotate: 360deg; } }

.take__label,
.take__time {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  font-variant-numeric: tabular-nums;
}
.take__label { position: absolute; left: 16px; bottom: 14px; pointer-events: none; }
.take__error {
  display: none;
  position: absolute;
  inset: auto 16px 16px;
  padding: 10px 12px;
  background: var(--night);
  color: var(--paper);
  font-size: 14px;
  line-height: 1.35;
}
.card.has-error .take__error { display: block; }
.card.has-error .take__face { cursor: pointer; }

.take__controls {
  display: none;
  position: absolute;
  inset: auto 0 0;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 2px 4px;
  padding: 28px 14px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
  cursor: default;
}
.card.is-playing .take__controls { display: grid; }
/* a linha do tempo: sem bolinha, o vermelho preenche; a área de clique é maior que o traço */
.take__bar {
  --p: 0;
  position: relative;
  grid-column: 1 / -1;
  height: 22px;
  cursor: pointer;
  touch-action: none;
}
.take__bar::before,
.take__fill {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 3px;
  margin-top: -1.5px;
  transition: height 0.15s, margin-top 0.15s;
}
.take__bar::before { background: rgba(255, 255, 255, 0.35); }
.take__fill {
  background: var(--red);
  transform: scaleX(var(--p));
  transform-origin: 0 50%;
}
.take__bar:hover::before,
.take__bar:hover .take__fill,
.take__bar.is-scrubbing::before,
.take__bar.is-scrubbing .take__fill { height: 6px; margin-top: -3px; }
.take__bar:focus-visible { outline-offset: 0; }
.take__time { min-height: 1.4em; }
.take__mute,
.take__fs {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: -4px 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--paper);
  cursor: pointer;
}
.take__fs { margin-right: -6px; }
.take__mute svg,
.take__fs svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.take__mute:hover,
.take__fs:hover { color: var(--gray-dark); }
.take__x,
.take__fs-close { display: none; }
.card.is-muted .take__x { display: inline; }
.card.is-muted .take__waves { display: none; }

/* tela cheia: o vídeo inteiro, sem corte, com a mesma linha do tempo */
.take__face:fullscreen {
  border-radius: 0;
  background-image: none !important;
  background-color: #000;
  box-shadow: none;
}
.take__face:fullscreen .take__video { object-fit: contain; }
.take__face:fullscreen .take__controls { padding: 48px clamp(16px, 4vw, 56px) 20px; }
.take__face:fullscreen .take__fs-open { display: none; }
.take__face:fullscreen .take__fs-close { display: inline; }

.deck__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 40;
}
.deck__bar[hidden] { display: none; }
.deck__count {
  min-width: 64px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gray-dark);
  font-variant-numeric: tabular-nums;
}
.deck__count b { color: var(--paper); font-weight: 500; }
.deck__arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: none;
  color: var(--paper);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.deck__arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.deck__arrow:hover { background: var(--paper); color: var(--ink); }

.room__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 20px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-dark);
}
.room__nav button {
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--paper);
  font: inherit;
  cursor: pointer;
}
.room__nav button:hover { color: var(--red); }

/* TCC na sala: as páginas são deitadas, então a pilha ganha mais largura que o texto */
.room--pages .room__body { grid-template-columns: minmax(300px, 0.7fr) minmax(0, 1.3fr); }
.room--pages .room__reel { --fan-x: 12px; --fan-r: 1.6deg; }
.deck--pages {
  width: min(calc(100% - 44px), calc((100dvh - 290px) * 16 / 9));
  aspect-ratio: 16 / 9;
}
.deck--pages .card { transform-origin: 50% 100%; }
.page {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  background: #1c1c1c;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
/* fora do fluxo, pra não tirar as setas do centro da carta */
.deck__zoom { position: absolute; left: calc(100% + 16px); white-space: nowrap; font-size: 15px; font-weight: 500; color: var(--paper); }
.deck__zoom[hidden] { display: none; }
.deck__zoom:hover { color: var(--red); }

/* Sobre (fundo branco) */
.about {
  position: sticky;
  top: var(--pin, 0);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
}
.about__text { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; max-width: 520px; position: sticky; top: 96px; align-self: start; }
.about__text .section__title { margin-bottom: 16px; }
.about__lead { font-size: 24px; font-weight: 600; line-height: 1.3; }
.about__label,
.sheet__title,
.sheet__extra dt {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
}
.about__label { margin-top: 16px; }
.about__text .btn { margin-top: 16px; }

/* Ficha técnica como quadro de claquete: preto, linhas brancas, campos escritos à mão */
.slate {
  background: var(--ink);
  color: var(--paper);
  padding: 0 clamp(18px, 2.5vw, 32px) clamp(24px, 3vw, 36px);
}
.slate__stick,
.slate__stripes {
  height: 22px;
  margin: 0 calc(-1 * clamp(18px, 2.5vw, 32px)) 16px;
  background: var(--stripes);
}
/* a haste: começa aberta e bate quando a ficha aparece na tela */
.slate__stick {
  margin-bottom: 6px;
  outline: 6px solid var(--ink);
  transform-origin: 0 100%;
  rotate: -9deg;
}
.slate.is-clapped .slate__stick { animation: clap 0.6s cubic-bezier(0.55, 0, 1, 0.45) forwards; }
@keyframes clap {
  0% { rotate: -9deg; }
  70% { rotate: 0deg; }
  82% { rotate: -1.2deg; }
  100% { rotate: 0deg; }
}
.slate .sheet__title,
.slate .sheet__extra dt { color: var(--gray-dark); }
.sheet__title { margin-bottom: 10px; }
.slate__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2px;
  background: var(--paper);
  border-block: 2px solid var(--paper);
}
.slate__grid > div { background: var(--ink); padding: 8px 12px 10px; }
.slate__grid .span-2 { grid-column: span 2; }
.slate__grid .span-3 { grid-column: span 3; }
.slate__grid .span-6 { grid-column: 1 / -1; }
.slate__grid dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-dark);
}
.slate__grid dd {
  font-family: var(--hand);
  font-size: clamp(24px, 2vw, 30px);
  line-height: 1.1;
  margin-top: 2px;
}
.slate__label { margin-top: 22px; }
.sheet__rows li {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) minmax(0, 0.7fr);
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.sheet__when { font-family: var(--mono); font-size: 13px; color: var(--gray-dark); padding-top: 2px; }
.sheet__what { font-weight: 600; }
.sheet__where { color: var(--gray-dark); text-align: right; }
.sheet__extra { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 22px; }
.sheet__extra dd { margin-top: 6px; }

/* Contato (fundo vermelho): a chamada à esquerda, os créditos finais à direita.
   Sobe como cortina por cima do Sobre, por isso ocupa a tela inteira. */
.contact {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.28);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: clamp(32px, 6vw, 112px);
  padding: clamp(84px, 12vh, 112px) var(--gutter) 16px;
}
.contact__call { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(16px, 2.6vh, 24px); }
.contact__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(48px, min(7.5vw, 11vh), 96px);
  line-height: 0.95;
  text-transform: uppercase;
  max-width: 11ch;
}
.contact__ink { color: var(--ink); }
.contact__mark { position: relative; display: inline-block; }
.contact__mark svg {
  position: absolute;
  left: -2%;
  bottom: -0.16em;
  width: 104%;
  height: 0.22em;
  overflow: visible;
}
.contact__mark path {
  fill: none;
  stroke: var(--paper);
  stroke-width: 4;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.contact__body { font-size: 19px; max-width: 34ch; }
.contact__aside { font-size: 15px; }
.contact__aside a { text-underline-offset: 4px; }
.contact__aside + .contact__aside { margin-top: calc(-1 * clamp(10px, 1.8vh, 16px)); }

.endroll__label {
  font-size: clamp(36px, 3.4vw, 48px);
  color: var(--paper);
  rotate: -4deg;
  margin: 0 0 18px -4px;
}
.endroll__list > div {
  display: flex;
  align-items: baseline;
  padding: 7px 0;
}
.endroll__list dt {
  display: flex;
  align-items: baseline;
  flex: 1;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* os pontinhos que ligam a função ao nome, como nos créditos de filme */
.endroll__list dt::after {
  content: "";
  flex: 1;
  margin: 0 14px;
  border-bottom: 2px dotted rgba(255, 255, 255, 0.6);
  translate: 0 -0.25em;
}
.endroll__list dd {
  font-family: var(--display);
  font-size: clamp(18px, 1.7vw, 24px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.endroll__next { margin-top: 14px; padding-top: 18px !important; border-top: 2px solid var(--paper); }
.endroll__next dd { color: var(--ink); font-size: clamp(24px, 2.4vw, 32px); }

/* Créditos rolando como numa tela de cinema: a lista sobe sem parar, some no alto e
   surge embaixo. A lista é duplicada pelo JS e anda metade da altura, então o loop não tem emenda. */
.endroll__window { position: relative; }
.endroll.is-rolling .endroll__window {
  height: clamp(220px, 34vh, 340px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
}
.endroll.is-rolling .endroll__list { padding-bottom: 72px; }
.endroll.is-rolling .endroll__roll { animation: roll var(--roll-dur, 16s) linear infinite; }
.endroll.is-rolling .endroll__window:hover .endroll__roll { animation-play-state: paused; }
@keyframes roll { to { transform: translateY(-50%); } }

.contact__end {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  margin-top: clamp(20px, 3.5vh, 40px);
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Rodapé */
.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px var(--gutter);
  background: var(--night);
  color: var(--gray-dark);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Responsivo */
@media (max-width: 960px) {
  .contact { grid-template-columns: 1fr; grid-template-rows: none; align-content: space-between; }
  .reel { grid-template-columns: minmax(0, 1fr); }
  .reel__open { margin-right: auto; }
  .reel__count { display: block; }
  .reel__arrow { display: grid; }
  /* a faixa rola com o dedo: cada card para no centro e os vizinhos aparecem nas bordas */
  .strip {
    position: relative;
    gap: 8px;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: calc((100vw - var(--h) * 9 / 16) / 2);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .strip::-webkit-scrollbar { display: none; }
  .panel,
  .panel.is-active { flex: 0 0 calc(var(--h) * 9 / 16); scroll-snap-align: center; scroll-snap-stop: always; transition: none; }
  .about { grid-template-columns: 1fr; }
  .about__text { position: static; }
}

@media (max-width: 600px) {
  .strip { --h: min(120vw, 64vh); }
  .panel__open { border-radius: 18px; }
  body { font-size: 16px; }
  .nav { gap: 16px; }
  .nav__links { display: none; }
  .nav .btn { margin-left: auto; }

  .hero { padding-top: 104px; }

  /* Como no CapCut: a agulha fica parada no centro e a faixa corre por baixo */
  .timeline { container-type: inline-size; overflow-x: clip; --strip: 720px; --loop: 9s; }
  .timeline__ruler,
  .timeline__clips {
    width: var(--strip);
    animation: scrub var(--loop) linear infinite;
  }
  .timeline__clips li { height: 60px; font-size: 18px; }
  .timeline__playhead { left: calc(50% - 1px); animation: none; }
  @keyframes scrub {
    0% { transform: translateX(50cqw); opacity: 1; }
    70% { transform: translateX(calc(50cqw - 100%)); opacity: 1; }
    88% { transform: translateX(calc(50cqw - 100%)); opacity: 1; }
    94% { transform: translateX(calc(50cqw - 100%)); opacity: 0; }
    95% { transform: translateX(50cqw); opacity: 0; }
    100% { transform: translateX(50cqw); opacity: 1; }
  }
  .note--sign { left: 0; margin-inline: auto; }

  .play { width: 44px; height: 44px; }
  /* celular: a sala rola; nome, tira de vídeos e o texto por último */
  .room[open] { display: block; overflow-y: auto; }
  .room__reel { margin-inline: calc(-1 * var(--gutter)); overflow-x: clip; }
  .room__body { display: block; padding-top: 22px; }
  .room__close { top: 24px; }
  .room__title { margin-bottom: 16px; }
  .room__reel { --fan-x: 16px; }
  .deck--takes { --tall: min(62dvh, 520px, calc((100vw - 2 * var(--gutter) - 56px) * 16 / 9)); }
  .room__text { overflow: visible; padding: 28px 0 8px; }
  .room--pages .room__reel { --fan-x: 6px; --fan-r: 1deg; }
  .deck--pages { width: calc(100% - 2 * var(--gutter) - 18px); }
  .deck__bar { flex-wrap: wrap; justify-content: center; }
  .deck__zoom { position: static; flex-basis: 100%; text-align: center; }


  .sheet__rows li { grid-template-columns: 80px minmax(0, 1fr); }
  .sheet__where { grid-column: 2; text-align: left; margin-top: -10px; }
  .sheet__extra { grid-template-columns: 1fr; }
  .endroll.is-rolling .endroll__window { height: 190px; }
}

@media (prefers-reduced-motion: reduce) {
  .panel, .panel__video, .card { transition: none; }
  .room[open] { animation: none; }
  .band__bar::before { animation: none; }
  .slate__stick { rotate: 0deg; }
  .note--sign { animation: none; clip-path: none; }
  html { scroll-behavior: auto; }
  .mark__circle path { animation: none; stroke-dashoffset: 0; }
  .timeline__clips li { animation: none; }
  .timeline__playhead { animation: none; left: calc(100% - 2px); }
}
@media (prefers-reduced-motion: reduce) and (max-width: 600px) {
  /* sem animação, a faixa vira rolagem manual sob a agulha */
  .timeline { overflow-x: auto; }
  .timeline__ruler, .timeline__clips { animation: none; }
  .timeline__playhead { left: calc(50% - 1px); }
}
