/* ==========================================================================
   Portfólio · conceito "Timeline de edição"
   ========================================================================== */

:root {
  color-scheme: dark;

  --bg: #0b0b0d;
  --panel: #141417;
  --panel-2: #1a1a1f;
  --panel-3: #222228;
  --line: #25252c;
  --line-2: #34343d;
  --text: #ededf2;
  --muted: #9b9ba7;
  --dim: #63636e;

  --accent: #ff4d3a;       /* playhead */
  --accent-ink: #1a0603;

  /* Cores de rótulo (como as labels de clipe) */
  --l-violet: #a07fff;
  --l-iris: #5f8cff;
  --l-caribbean: #22d3a6;
  --l-mango: #ffb22e;
  --l-rose: #ff6cb0;
  --l-forest: #86d457;
  --l-cerulean: #3ec3f5;

  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --menubar: 44px;
  --dock: 96px;
  --gap: 6px;
  --r: 6px;
  --pad: clamp(16px, 3vw, 40px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--menubar) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--dock);
  overflow-x: hidden;
}

/* Fundo de "workspace": grade bem sutil */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .22;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.mono { font-family: var(--mono); font-feature-settings: "zero" 1; }
.hide-sm { }
::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible { outline: 2px solid var(--l-iris); outline-offset: 2px; border-radius: 3px; }

kbd {
  font-family: var(--mono);
  font-size: .78em;
  padding: 1px 6px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--text);
  background: var(--panel-2);
}

/* --------------------------------------------------------------------------
   Painéis
   -------------------------------------------------------------------------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

.panel-tabs {
  display: flex;
  align-items: stretch;
  gap: 2px;
  min-height: 32px;
  padding: 0 6px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  position: relative;
}
.tab i { font-style: normal; color: var(--dim); }
.tab.is-on { color: var(--text); }
.tab.is-on:not(.tab-sub)::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px; bottom: 0;
  height: 2px;
  background: var(--l-iris);
}
.tab-sub.is-on { color: var(--text); text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--dim); }
.tab-ghost { color: var(--dim); }
.tab-right { margin-left: auto; display: inline-flex; align-items: center; padding: 0 8px; color: var(--dim); }

/* --------------------------------------------------------------------------
   Abertura (boot)
   -------------------------------------------------------------------------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity .5s ease, visibility .5s;
  cursor: pointer;
}
.boot.is-done { opacity: 0; visibility: hidden; }
.boot-box {
  width: min(440px, calc(100vw - 32px));
  padding: 22px 22px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 30px 80px -20px #000;
}
.boot-title { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.boot-title b { color: var(--text); font-weight: 500; }
.boot-log { list-style: none; margin: 0 0 16px; padding: 0; font-size: 12px; color: var(--dim); min-height: 84px; }
.boot-log li { padding: 2px 0; animation: logIn .25s ease both; }
.boot-log li::before { content: "› "; color: var(--accent); }
.boot-log li.ok::after { content: " ok"; color: var(--l-caribbean); }
@keyframes logIn { from { opacity: 0; transform: translateY(4px); } }
.boot-bar { height: 4px; background: var(--panel-3); border-radius: 2px; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.boot-foot { display: flex; justify-content: space-between; margin: 10px 0 0; font-size: 11px; color: var(--dim); }

/* --------------------------------------------------------------------------
   Barra de menu
   -------------------------------------------------------------------------- */
.menubar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--menubar);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 var(--pad);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 5px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .02em;
  font-variation-settings: "wdth" 110;
}
.brand-file { font-size: 12px; color: var(--muted); }
.menu { display: flex; gap: 4px; font-size: 12px; }
.menu a {
  padding: 6px 10px;
  border-radius: 4px;
  color: var(--muted);
  transition: color .15s, background .15s;
}
.menu a:hover { color: var(--text); background: var(--panel-2); }
.menu a.is-active { color: var(--text); background: var(--panel-3); }
/* Botão de orçamento: logo depois do menu, sempre visível na barra fixa */
.quote-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: pre;
  text-decoration: none;
  transition: transform .2s cubic-bezier(.2,.7,.2,1), filter .2s;
}
.quote-cta:hover { transform: translateY(-1px); filter: brightness(1.08); }
.quote-cta:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.menubar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 12px; }
.live-tc { color: var(--accent); font-weight: 500; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.draft-chip {
  font-size: 10.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 99px;
  color: var(--l-mango);
  border: 1px dashed color-mix(in oklab, var(--l-mango) 60%, transparent);
}

/* --------------------------------------------------------------------------
   Seções
   -------------------------------------------------------------------------- */
main { padding: 0 var(--pad); }
.sec { padding: clamp(64px, 8vw, 120px) 0 0; max-width: 1400px; margin: 0 auto; }

.sec-head { margin-bottom: clamp(24px, 4vw, 44px); }
.sec-kicker {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
}
.sec-kicker .num {
  display: inline-grid; place-items: center;
  min-width: 28px; height: 20px; padding: 0 6px;
  border-radius: 3px;
  background: var(--label, var(--l-iris));
  color: #0b0b0d;
  font-weight: 700;
  font-size: 11px;
}
.sec-kicker .sec-tc { margin-left: auto; color: var(--accent); }
.sec-title {
  margin: 0;
  font-size: clamp(44px, 10.5vw, 168px); /* app.js reduz se a palavra não couber */
  line-height: .86;
  white-space: nowrap;
  font-weight: 850;
  font-variation-settings: "wdth" 125;
  letter-spacing: -.035em;
  text-transform: uppercase;
}
.sec-title.is-long { font-size: clamp(40px, 7vw, 112px); line-height: .94; }
.sec-lede { max-width: 56ch; margin: 18px 0 0; color: var(--muted); font-size: clamp(15px, 1.4vw, 18px); }

#projetos { --label: var(--l-mango); }
#sobre { --label: var(--l-violet); }
#ferramentas { --label: var(--l-rose); }
#stills { --label: var(--l-cerulean); }
#creditos { --label: var(--l-caribbean); }
#contato { --label: var(--l-forest); }

/* Revelar ao rolar */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Hero / monitor de programa
   -------------------------------------------------------------------------- */
.hero {
  padding-top: 18px;
  min-height: calc(100svh - var(--menubar) - var(--dock));
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.monitor { width: 100%; }

.viewer {
  --vh: calc(100svh - var(--menubar) - var(--dock) - 32px - 56px - 70px);
  position: relative;
  aspect-ratio: 16 / 9;
  width: min(100%, calc(var(--vh) * 16 / 9));
  min-width: min(100%, 680px);
  margin: 0 auto;
  background: #050506;
  overflow: hidden;
  container-type: inline-size;
  isolation: isolate;
}

.viewer-bg { position: absolute; inset: 0; z-index: -2; }
.viewer-bg video { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .55;
  mix-blend-mode: screen;
  animation: drift 18s ease-in-out infinite alternate;
}
.b1 { width: 55%; aspect-ratio: 1; left: -8%; top: -20%; background: var(--l-iris); }
.b2 { width: 45%; aspect-ratio: 1; right: -6%; top: 10%; background: var(--accent); animation-duration: 22s; animation-delay: -6s; opacity: .45; }
.b3 { width: 40%; aspect-ratio: 1; left: 30%; bottom: -35%; background: var(--l-violet); animation-duration: 26s; animation-delay: -12s; opacity: .4; }
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(8%, 6%) scale(1.12); }
  100% { transform: translate(-6%, 10%) scale(.92); }
}
/* Showreel: duas camadas de vídeo alternando em corte seco */
.reel-v {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
}
.reel-v.is-on { opacity: 1; }
.viewer-bg.has-reel .blob { display: none; }
.viewer-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(5,5,6,.82) 0%, rgba(5,5,6,.55) 45%, rgba(5,5,6,.2) 100%),
    linear-gradient(0deg, rgba(5,5,6,.7) 0%, transparent 30%, transparent 75%, rgba(5,5,6,.5) 100%);
  pointer-events: none;
}
.now-playing {
  max-width: 55%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: rgba(255,255,255,.75);
}

.viewer-grain {
  position: absolute; inset: -50%;
  z-index: -1;
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .8s steps(4) infinite;
  pointer-events: none;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } 100% { transform: translate(0, 0); }
}

/* Guias de área segura */
.safe { position: absolute; border: 1px dashed rgba(255,255,255,.14); pointer-events: none; }
.safe-action { inset: 5%; }
.safe-title { inset: 10%; border-color: rgba(255,255,255,.08); }
.safe-title::before, .safe-title::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  background: rgba(255,255,255,.14);
}
.safe-title::before { width: 18px; height: 1px; transform: translate(-50%, -50%); }
.safe-title::after { width: 1px; height: 18px; transform: translate(-50%, -50%); }

.viewer-top, .viewer-bottom {
  position: absolute; left: 5%; right: 5%;
  display: flex; justify-content: space-between; gap: 12px;
  font-size: clamp(10px, 1.1cqi, 12px);
  color: rgba(255,255,255,.7);
  z-index: 2;
}
.viewer-top { top: calc(5% + 10px); padding: 0 10px; }
.viewer-bottom { bottom: calc(5% + 10px); padding: 0 10px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 4px; vertical-align: 1px; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.status { display: inline-flex; align-items: center; gap: 8px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--l-caribbean); box-shadow: 0 0 0 4px color-mix(in oklab, var(--l-caribbean) 25%, transparent); }
.status.is-off::before { background: var(--dim); box-shadow: none; }

.viewer-content {
  position: absolute;
  left: 10%; right: 10%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}
.kicker {
  margin: 0 0 2.2cqi;
  font-size: clamp(10px, 1.25cqi, 14px);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
}
.name {
  margin: 0;
  font-size: 13.2cqi;
  line-height: .82;
  font-weight: 900;
  font-variation-settings: "wdth" 125;
  letter-spacing: -.045em;
  text-transform: uppercase;
}
.name span { display: block; }
.name .last {
  color: transparent;
  -webkit-text-stroke: max(1px, .16cqi) var(--text);
  padding-left: 8cqi;
}
.tagline {
  max-width: 44ch;
  margin: 2.6cqi 0 0;
  font-size: clamp(13px, 1.75cqi, 20px);
  line-height: 1.4;
  color: rgba(255,255,255,.86);
}

/* Entrada do nome, tipo "cortes" */
.name span, .kicker, .tagline { opacity: 0; transform: translateY(14px); }
body.is-ready .name span, body.is-ready .kicker, body.is-ready .tagline {
  opacity: 1; transform: none;
  transition: opacity .6s ease, transform .8s cubic-bezier(.2,.7,.2,1);
}
body.is-ready .kicker { transition-delay: .05s; }
body.is-ready .name .first { transition-delay: .15s; }
body.is-ready .name .last { transition-delay: .3s; }
body.is-ready .tagline { transition-delay: .45s; }

/* Transporte */
.transport {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 10px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.t-tc { font-size: 13px; color: var(--accent); font-variant-numeric: tabular-nums; }
.t-total { text-align: right; color: var(--muted); }
.t-buttons { display: flex; gap: 4px; }
.t-btn {
  display: grid; place-items: center;
  width: 36px; height: 32px;
  border-radius: 5px;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.t-btn:hover { background: var(--panel-3); color: var(--text); }
.t-btn svg { width: 16px; height: 16px; fill: currentColor; stroke: currentColor; stroke-width: 0; }
.t-btn svg path[d^="M6 5v14"], .t-btn svg path[d^="M18 5v14"] { stroke-width: 2; }
.t-play { width: 46px; color: var(--text); background: var(--panel-3); }
.t-play:hover { background: var(--accent); color: var(--accent-ink); }
.t-play .i-pause { display: none; }
body.is-playing .t-play { background: var(--accent); color: var(--accent-ink); }
body.is-playing .t-play .i-play { display: none; }
body.is-playing .t-play .i-pause { display: block; }
.t-scrub { grid-column: 1 / -1; height: 3px; border-radius: 2px; background: var(--panel-3); overflow: hidden; }
.t-scrub i { display: block; height: 100%; width: 0; background: var(--accent); }

.hint { margin: 14px 0 0; text-align: center; font-size: 11.5px; color: var(--dim); }

/* --------------------------------------------------------------------------
   Medidores
   -------------------------------------------------------------------------- */
#numeros { padding-top: clamp(40px, 6vw, 80px); }
.meters {
  display: grid;
  grid-template-columns: repeat(var(--n, 4), 1fr);
}
.meter {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  padding: 22px clamp(14px, 2vw, 26px);
  border-right: 1px solid var(--line);
}
.meter:last-child { border-right: 0; }
.meter-bar {
  position: relative;
  width: 12px;
  height: 128px;
  border-radius: 2px;
  background:
    repeating-linear-gradient(to top, transparent 0 4px, var(--panel) 4px 5px),
    var(--panel-3);
  overflow: hidden;
}
.meter-bar i {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 0;
  background:
    repeating-linear-gradient(to top, transparent 0 4px, var(--panel) 4px 5px),
    linear-gradient(to top, var(--l-forest) 0 60%, var(--l-mango) 60% 84%, var(--accent) 84%);
  background-size: 100% 100%, 100% 128px;
  background-position: 0 0, 0 100%;
  transition: height 1.4s cubic-bezier(.2,.8,.2,1);
}
.meter.is-on .meter-bar i { height: calc(var(--level) * 100%); }
.meter-val {
  margin: 0;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1;
  font-weight: 850;
  font-variation-settings: "wdth" 115;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.meter-label { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.meter-db { margin: 0; font-size: 10.5px; color: var(--dim); }
.meter-text { display: flex; flex-direction: column; justify-content: flex-end; }

/* --------------------------------------------------------------------------
   Bin de projetos
   -------------------------------------------------------------------------- */
.bin-filters {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.bin-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  transition: all .15s;
}
.bin-btn::before { content: "▸"; font-size: 10px; color: var(--dim); }
.bin-btn b { font-weight: 400; color: var(--dim); }
.bin-btn:hover { color: var(--text); border-color: var(--dim); }
.bin-btn.is-on { background: var(--text); border-color: var(--text); color: var(--bg); }
.bin-btn.is-on::before, .bin-btn.is-on b { color: var(--bg); }

.bin-grid {
  columns: 4 240px;
  column-gap: 14px;
  padding: 14px;
}
.card {
  break-inside: avoid;
  margin: 0 0 14px;
  border-radius: 5px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color .2s, transform .3s cubic-bezier(.2,.7,.2,1);
  animation: cardIn .45s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } }
.card:hover { border-color: var(--label); transform: translateY(-2px); }
.card.is-hidden { display: none; }

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px 4px 0 0;
  background: #000;
}
.thumb.is-vertical { aspect-ratio: 9 / 14; }
.thumb video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .25s;
  z-index: 1;
}
.card.is-previewing .thumb video { opacity: 1; }
.badge.multi { right: 8px; top: 12px; color: var(--l-mango); }
.thumb::before { /* faixa de rótulo, como na timeline */
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 4px;
  background: var(--label);
  z-index: 3;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.card:hover .thumb img { transform: scale(1.04); }


.scrub {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  z-index: 3;
  opacity: 0;
  transition: opacity .15s;
  pointer-events: none;
}
.card:hover .scrub { opacity: 1; }

.badge {
  position: absolute;
  z-index: 3;
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(0,0,0,.72);
  color: #fff;
  backdrop-filter: blur(4px);
}
.badge.dur { right: 8px; bottom: 8px; }
.badge.fmt { left: 8px; top: 12px; }

.card-meta { padding: 12px 14px 14px; }
.card-row { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.card-row .idx { color: var(--label); }
.card h3 {
  margin: 6px 0 4px;
  font-size: 19px;
  line-height: 1.12;
  font-weight: 750;
  font-variation-settings: "wdth" 100;
  letter-spacing: -.01em;
}
.card-roles { margin: 0; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.card-metric { margin: 8px 0 0; font-family: var(--mono); font-size: 11px; color: var(--l-caribbean); }

/* --------------------------------------------------------------------------
   Stills
   -------------------------------------------------------------------------- */
/* Grade em linhas de 4, no mesmo formato vertical dos cards de vídeo;
   a foto inteira aparece ao ampliar */
.stills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}
.still {
  position: relative;
  display: block;
  width: 100%;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: zoom-in;
}
/* a proporção fica na imagem (não no <button>): o Safari ignora aspect-ratio em botões,
   o quadro ficava com altura zero e as fotos com loading="lazy" nunca carregavam */
.still img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 14; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1), filter .4s; }
.still:hover img { transform: scale(1.03); }
.still-cap, .still-tc {
  position: absolute;
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 3px;
  background: rgba(0,0,0,.66);
  backdrop-filter: blur(4px);
  color: #fff;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .25s, transform .25s;
  text-align: left;
}
.still-cap { left: 10px; bottom: 10px; right: 10px; width: fit-content; max-width: calc(100% - 20px); }
.still-cap b { display: block; font-weight: 500; color: var(--l-cerulean); }
.still-tc { right: 10px; top: 10px; color: var(--accent); }
.still:hover .still-cap, .still:hover .still-tc, .still:focus-visible .still-cap { opacity: 1; transform: none; }

.lightbox {
  width: 100vw; height: 100svh;
  max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(5,5,7,.94);
  color: var(--text);
}
.lightbox[open] { display: grid; place-items: center; animation: srcIn .3s ease; }
.lightbox::backdrop { background: transparent; }
.lightbox img { max-width: calc(100vw - 120px); max-height: calc(100svh - 110px); object-fit: contain; border-radius: 4px; }
.lb-cap {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  margin: 0; font-size: 12px; color: var(--muted); white-space: nowrap;
}
.lb-cap span { color: var(--accent); margin-left: 8px; }
.lb-cap a { color: var(--text); margin-left: 10px; text-decoration: underline; text-underline-offset: 3px; }
.lb-btn {
  position: absolute;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 26px; line-height: 1;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
}
.lb-btn:hover { background: var(--accent); color: var(--accent-ink); }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 20px; top: 20px; font-size: 16px; }

/* --------------------------------------------------------------------------
   Créditos finais
   -------------------------------------------------------------------------- */
.credits {
  height: clamp(420px, 60svh, 620px);
  overflow: hidden;
  position: relative;
  background: #050506;
  mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent);
}
.credits-roll {
  padding: 40px 20px;
  animation: roll var(--roll, 40s) linear infinite;
}
.credits:hover .credits-roll { animation-play-state: paused; }
@keyframes roll { to { transform: translateY(-50%); } }
.cr-gap { height: 120px; }
.cr-head { margin: 0 0 6px; text-align: center; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.cr-name {
  margin: 0 0 56px;
  text-align: center;
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 850;
  font-variation-settings: "wdth" 120;
  text-transform: uppercase;
  letter-spacing: -.02em;
}
.cr-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: baseline;
  padding: 10px 0;
}
.cr-role { text-align: right; font-size: 11.5px; color: var(--l-caribbean); text-transform: uppercase; letter-spacing: .1em; }
.cr-client {
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 750;
  font-variation-settings: "wdth" 105;
  letter-spacing: -.01em;
  line-height: 1.1;
}
.cr-row + .cr-head { margin-top: 56px; }

/* --------------------------------------------------------------------------
   Transcrição
   -------------------------------------------------------------------------- */
.transcript { padding: clamp(18px, 3vw, 40px); display: grid; gap: clamp(22px, 3vw, 36px); }
.tr-block { display: grid; grid-template-columns: 120px 1fr; gap: 20px; }
.tr-meta { font-family: var(--mono); font-size: 11.5px; color: var(--dim); padding-top: .55em; }
.tr-meta b { display: block; color: var(--l-violet); font-weight: 500; letter-spacing: .06em; }
.tr-text {
  margin: 0;
  font-size: clamp(22px, 3.1vw, 44px);
  line-height: 1.18;
  font-weight: 600;
  font-variation-settings: "wdth" 96;
  letter-spacing: -.018em;
  text-wrap: pretty;
}
.w { color: #3a3a43; transition: color .25s ease; }
.w.is-lit { color: var(--text); }
.w.is-cur { color: var(--text); background: color-mix(in oklab, var(--l-violet) 35%, transparent); border-radius: 3px; box-shadow: 0 0 0 2px color-mix(in oklab, var(--l-violet) 35%, transparent); }

/* --------------------------------------------------------------------------
   Ferramentas
   -------------------------------------------------------------------------- */
.tools-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: var(--gap); align-items: start; }

.fx-tree { padding: 10px 6px 14px; font-size: 13px; }
.fx-tree details { border-bottom: 1px solid var(--line); }
.fx-tree details:last-child { border-bottom: 0; }
.fx-tree summary {
  list-style: none;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 10px;
  cursor: pointer;
  color: var(--text);
  border-radius: 4px;
}
.fx-tree summary::-webkit-details-marker { display: none; }
.fx-tree summary:hover { background: var(--panel-2); }
.fx-tree summary::before { content: "▸"; color: var(--dim); transition: transform .2s; }
.fx-tree details[open] summary::before { transform: rotate(90deg); }
.fx-tree summary .folder { width: 14px; height: 11px; border-radius: 2px; background: var(--l-mango); opacity: .85; position: relative; }
.fx-tree summary .count { margin-left: auto; color: var(--dim); font-size: 11px; }
.fx-tree ul { list-style: none; margin: 0 0 8px; padding: 0 0 0 30px; }
.fx-tree li {
  display: flex; align-items: baseline; gap: 10px;
  padding: 7px 10px;
  border-radius: 4px;
}
.fx-tree li:hover { background: var(--panel-2); }
.fx-tree li .fx { color: var(--l-rose); font-size: 11px; font-style: italic; }
.fx-tree li .use { margin-left: auto; color: var(--dim); font-size: 11.5px; text-align: right; }

.flow { padding: 18px 14px 20px; }
.flow-ruler {
  height: 18px;
  margin-bottom: 8px;
  background-image: repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 20px);
  background-size: 100% 6px;
  background-repeat: no-repeat;
  background-position: bottom;
  border-bottom: 1px solid var(--line);
}
.flow-track { display: flex; gap: 3px; }
.flow-clip {
  flex: var(--w, 1) 1 0;
  min-width: 0;
  height: 86px;
  padding: 8px;
  border-radius: 4px;
  background: color-mix(in oklab, var(--label) 22%, var(--panel-2));
  border-top: 3px solid var(--label);
  font-family: var(--mono);
  font-size: 11px;
  overflow: hidden;
  position: relative;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform .5s cubic-bezier(.2,.7,.2,1) var(--d, 0s);
}
.reveal.is-in .flow-clip { transform: scaleX(1); }
.flow-clip b { display: block; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow-clip small { color: var(--muted); font-size: 10px; }
.flow-clip::after { /* "fx" badge */
  content: "fx";
  position: absolute; right: 6px; bottom: 6px;
  font-size: 9px; font-style: italic;
  color: color-mix(in oklab, var(--label) 80%, white);
}
.flow-note { margin: 14px 2px 0; font-size: 13px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Contato / exportar
   -------------------------------------------------------------------------- */
.export-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: var(--gap); align-items: start; }
.export-body { padding: 8px 18px 18px; }
.ex-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.ex-label { font-size: 11.5px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 11px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  font-size: 13px;
  color: var(--muted);
  transition: all .15s;
}
.chip:hover { color: var(--text); border-color: var(--dim); }
.chip[aria-checked="true"] { background: var(--l-forest); border-color: var(--l-forest); color: #0b0b0d; font-weight: 600; }
.ex-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  resize: vertical;
}
.ex-input:focus { outline: none; border-color: var(--l-iris); }
.ex-input::placeholder { color: var(--dim); }
.ex-file { font-size: 13px; color: var(--l-forest); word-break: break-all; }
.ex-actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.ex-progress { flex: 1; height: 4px; border-radius: 2px; background: var(--panel-3); overflow: hidden; }
.ex-progress i { display: block; height: 100%; width: 0; background: var(--l-forest); }
.btn-export {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 14px 22px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 17px;
  font-weight: 800;
  font-variation-settings: "wdth" 110;
  text-transform: uppercase;
  letter-spacing: .02em;
  transition: transform .15s, box-shadow .2s;
}
.btn-export:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -10px var(--accent); }
.btn-export b { font-weight: 500; font-size: 14px; opacity: .7; }
.ex-note { margin: 12px 0 0; font-size: 11.5px; color: var(--dim); min-height: 1.4em; }

.dests { list-style: none; margin: 0; padding: 6px 0; }
.dests a {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.dests li:last-child a { border-bottom: 0; }
.dests a:hover { background: var(--panel-2); }
.dests .d-k { font-family: var(--mono); font-size: 11px; color: var(--dim); width: 82px; flex-shrink: 0; text-transform: uppercase; letter-spacing: .06em; }
.dests .d-v { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dests .d-a { margin-left: auto; color: var(--dim); transition: transform .2s, color .2s; }
.dests a:hover .d-a { color: var(--accent); transform: translate(3px, -3px); }

.slate {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.slate div { padding: 12px 18px; border-right: 1px solid var(--line); }
.slate div:last-child { border-right: 0; }
.slate span { display: block; color: var(--dim); font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 2px; }

.end {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  max-width: 1400px;
  margin: clamp(80px, 10vw, 140px) auto 0;
  padding: 18px 0 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--dim);
}
.to-top:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   Dock: timeline fixa
   -------------------------------------------------------------------------- */
.dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  height: var(--dock);
  display: grid;
  grid-template-columns: 96px 1fr;
  background: color-mix(in oklab, var(--panel) 94%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-2);
  padding-bottom: env(safe-area-inset-bottom);
  user-select: none;
  -webkit-user-select: none;
}
.dock-heads {
  display: grid;
  grid-template-rows: 22px 1fr 26px;
  border-right: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--muted);
}
.dh { display: flex; align-items: center; padding: 0 10px; border-bottom: 1px solid var(--line); }
.dh:last-child { border-bottom: 0; }
.dh b { font-weight: 500; padding: 1px 5px; border-radius: 3px; background: var(--panel-3); color: var(--text); }
.dh-ruler { color: var(--accent); font-size: 10.5px; font-variant-numeric: tabular-nums; padding: 0 8px; }

.dock-body {
  position: relative;
  display: grid;
  grid-template-rows: 22px 1fr 26px;
  cursor: ew-resize;
  touch-action: none;
  overflow: hidden;
  margin-right: 12px;
}
.dock-body:focus-visible { outline-offset: -2px; }
.ruler {
  position: relative;
  border-bottom: 1px solid var(--line);
  background-image:
    repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 10px);
  background-size: 100% 5px;
  background-repeat: no-repeat;
  background-position: bottom;
  font-size: 9.5px;
  color: var(--dim);
}
.ruler span { position: absolute; top: 3px; transform: translateX(3px); white-space: nowrap; }
.ruler span::before { content: ""; position: absolute; left: -3px; top: -3px; width: 1px; height: 19px; background: var(--line-2); }

.track { position: relative; border-bottom: 1px solid var(--line); }
.track-v { padding: 5px 0; }
.track-a { border-bottom: 0; }
.track-a canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.clip {
  position: absolute;
  top: 5px; bottom: 5px;
  padding: 4px 8px;
  border-radius: 3px;
  background: color-mix(in oklab, var(--label) 30%, #15151a);
  border: 1px solid color-mix(in oklab, var(--label) 70%, transparent);
  border-top-width: 3px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.2;
  color: var(--text);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background .2s;
}
.clip small { display: block; color: color-mix(in oklab, var(--label) 70%, white); font-size: 9px; opacity: .8; }
.clip.is-active { background: color-mix(in oklab, var(--label) 55%, #15151a); }
.clip:hover { background: color-mix(in oklab, var(--label) 48%, #15151a); }

.playhead {
  position: absolute;
  top: 0; bottom: 0;
  left: 0;
  width: 0;
  z-index: 5;
  pointer-events: none;
  will-change: transform;
}
.playhead::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: -.5px;
  width: 1.5px;
  background: var(--accent);
}
.playhead span {
  position: absolute; top: 0; left: -7px;
  width: 14px; height: 16px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 100%, 0 60%);
}

/* --------------------------------------------------------------------------
   Monitor de origem (dialog)
   -------------------------------------------------------------------------- */
.source {
  width: min(1180px, calc(100vw - 24px));
  max-height: calc(100svh - 24px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: visible;
}
.source::backdrop { background: rgba(5,5,7,.78); backdrop-filter: blur(6px); }
.source[open] { animation: srcIn .35s cubic-bezier(.2,.7,.2,1); }
@keyframes srcIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.source-panel { box-shadow: 0 40px 100px -20px #000; }
.src-close { margin-left: auto; padding: 0 12px; color: var(--muted); font-size: 14px; }
.src-close:hover { color: var(--accent); }
.source-body {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  max-height: calc(100svh - 24px - 33px);
  overflow: auto;
}
.src-media {
  position: relative;
  background: #000;
  display: grid;
  place-items: center;
  min-height: 300px;
}
.src-media { align-content: center; gap: 0; }
.src-media video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.src-media.is-vertical video { aspect-ratio: 9 / 16; width: auto; height: min(80svh, 760px); max-width: 100%; margin: 0 auto; }
.src-clips {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 10px;
  width: 100%;
  background: var(--panel-2);
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.src-clips button {
  padding: 6px 10px;
  border-radius: 3px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  border-top: 3px solid var(--label);
}
.src-clips button span { color: var(--dim); margin-left: 6px; }
.src-clips button.is-on { background: color-mix(in oklab, var(--label) 30%, var(--panel-2)); color: var(--text); }
.src-info { padding: 22px 22px 26px; border-left: 1px solid var(--line); }
.src-cat { margin: 0 0 8px; font-size: 11px; color: var(--label); text-transform: uppercase; letter-spacing: .08em; }
.src-info h3 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: .98;
  font-weight: 850;
  font-variation-settings: "wdth" 112;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.src-desc { margin: 0 0 18px; color: var(--muted); }
.src-props { margin: 0; font-size: 12px; border-top: 1px solid var(--line); }
.src-props div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.src-props dt { color: var(--dim); }
.src-props dd { margin: 0; }
.src-link {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 14px;
  border-radius: 5px;
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  font-weight: 500;
}
.src-link:hover { background: var(--accent); }

/* --------------------------------------------------------------------------
   Responsivo
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .tools-grid, .export-grid { grid-template-columns: 1fr; }
  .meters { grid-template-columns: repeat(2, 1fr); }
  .meter:nth-child(2) { border-right: 0; }
  .meter:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .source-body { grid-template-columns: 1fr; }
  .src-info { border-left: 0; border-top: 1px solid var(--line); }
  .stills { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* abre espaço para o menu e o botão de orçamento na mesma linha */
  .brand-file, .menubar-right { display: none; }
}

@media (max-width: 720px) {
  :root { --dock: 70px; --menubar: 48px; }
  .hide-sm { display: none !important; }
  .menubar { gap: 10px; }
  .brand-file, .live-tc { display: none; }
  .menu { overflow-x: auto; scrollbar-width: none; margin-right: -8px; }
  .menu::-webkit-scrollbar { display: none; }
  /* o botão leva ao mesmo lugar, então "Contato" sai para o menu caber */
  .menu { flex: 1; min-width: 0; margin-right: 0; }
  .menu a[data-nav="contato"] { display: none; }
  .quote-cta { min-height: 28px; padding: 0 10px; font-size: 10px; }
  .menu a { padding: 6px 8px; white-space: nowrap; }
  .menubar-right { display: none; }
  .draft-chip { display: none; }

  .viewer { aspect-ratio: 4 / 5; min-width: 0; width: 100%; }
  .name { font-size: 15.5cqi; }
  .name .last { padding-left: 0; }
  .viewer-content { left: 9%; right: 9%; }
  .kicker { font-size: 10px; margin-bottom: 4cqi; }
  .tagline { font-size: 14px; margin-top: 5cqi; }
  .transport { grid-template-columns: 1fr auto; }
  .t-total { display: none; }
  .t-buttons { justify-self: end; }
  .t-btn { width: 32px; }
  .hint { display: none; }

  .meter { grid-template-columns: auto 1fr; gap: 12px; padding: 16px 14px; }
  .meter-bar { height: 92px; width: 9px; }

  .bin-grid { columns: 2 150px; column-gap: 10px; padding: 10px; }
  .stills { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .still-cap { display: none; }
  .lightbox img { max-width: 100vw; max-height: calc(100svh - 140px); border-radius: 0; }
  .lb-prev, .lb-next { top: auto; bottom: 56px; transform: none; }
  .lb-cap { white-space: normal; text-align: center; width: calc(100% - 140px); bottom: 66px; }
  .cr-row { grid-template-columns: 1fr; gap: 2px; text-align: center; padding: 12px 0; }
  .cr-role { text-align: center; }
  .now-playing { display: none; }
  .badge.multi { display: none; }
  .card { margin-bottom: 10px; }
  .card h3 { font-size: 15px; }
  .card-meta { padding: 10px; }
  .card-roles { font-size: 10px; }

  .tr-block { grid-template-columns: 1fr; gap: 6px; }
  .tr-meta b { display: inline; margin-right: 8px; }

  .ex-row { grid-template-columns: 1fr; gap: 8px; }
  .ex-actions { flex-direction: column-reverse; align-items: stretch; }
  .btn-export { justify-content: center; }
  .slate { grid-template-columns: 1fr 1fr; }
  .slate div:nth-child(2) { border-right: 0; }
  .slate div:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid var(--line); }

  .dock { grid-template-columns: 44px 1fr; }
  .dock-heads, .dock-body { grid-template-rows: 16px 1fr 18px; }
  .dh { padding: 0 6px; }
  .dh-ruler { visibility: hidden; }
  .ruler span { font-size: 8.5px; top: 1px; }
  .ruler span::before { height: 15px; }
  .clip { padding: 2px 6px; font-size: 9.5px; }
  .clip small { display: none; }
  .dock-body { margin-right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob, .viewer-grain, .dot { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .name span, .kicker, .tagline { opacity: 1; transform: none; }
  .flow-clip { transform: none; transition: none; }
  .credits { height: auto; mask-image: none; }
  .credits-roll { animation: none; }
  .credits-roll > [aria-hidden], .cr-gap { display: none; }
}

/* --------------------------------------------------------------------------
   Balão do WhatsApp
   -------------------------------------------------------------------------- */
.wa-fab {
  position: fixed;
  right: 18px;
  bottom: calc(var(--dock) + 16px + env(safe-area-inset-bottom));
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 12px;
  border-radius: 999px;
  background: #25d366;
  color: #062b14;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  transition: transform .2s ease, box-shadow .2s ease;
}
.wa-fab[hidden] { display: none; }
.wa-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, .55); }
.wa-fab svg { width: 24px; height: 24px; flex-shrink: 0; }
.wa-fab-label { padding-right: 4px; }
@media (max-width: 720px) {
  .wa-fab { right: 12px; bottom: calc(var(--dock) + 12px + env(safe-area-inset-bottom)); width: 44px; height: 44px; padding: 0; justify-content: center; }
  .wa-fab svg { width: 24px; height: 24px; }
  .wa-fab-label { display: none; }
}
