/* CapyPlay: site do app. Identidade do app (laranja só para ação), ritmo da página da Apple TV.
   Dois temas: escuro (padrão da marca) e claro. Segue o aparelho; o botão da barra troca e fica guardado. */
:root {
  --bg: #0A0A0C;          /* base da página */
  --bg-night: #000;       /* sala e frases */
  --bg-band: #08080a;     /* faixa de capas */
  --fg: #F5F6F8;
  --fg2: #A3ABB8;
  --muted: #7a8291;
  --line: rgba(255, 255, 255, .08);
  --nav-glass: rgba(14, 14, 18, .72);
  --ghost: rgba(255, 255, 255, .28);
  --ghost-hover: rgba(255, 255, 255, .08);
  --chip: rgba(255, 255, 255, .12);
  --chip-hover: rgba(255, 255, 255, .22);
  --hero-glow: rgba(249, 115, 22, .16);
  --rack: linear-gradient(#202228, #0c0d10 60%);
  --room-fg2: rgba(245, 246, 248, .78);
  --r1: radial-gradient(130% 100% at 100% 0%, #1a5b67, #0b2329 70%);
  --r2: radial-gradient(130% 100% at 100% 0%, #4a2a7a, #1a0e2c 70%);
  --r3: radial-gradient(130% 100% at 100% 0%, #1c6b3e, #0a2516 70%);
  --r4: radial-gradient(130% 100% at 100% 0%, #24427e, #0b1730 70%);
  --r5: radial-gradient(130% 100% at 100% 0%, #7a2a16, #2a0d07 70%);
  --stone: #ECEEF1;
  --card: #FFFFFF;
  --dark: #121317;
  --dark2: #5B6270;
  --orange: #F97316;
  --orange-hi: #FB8A3C;
  --wrap: 980px;
  --gutter: max(20px, calc((100vw - var(--wrap)) / 2));
  --sec: 140px;
  --nav-h: 52px;
  --display: 'Outfit', system-ui, sans-serif;
  --text: 'Inter', system-ui, sans-serif;
  --nav-ease: cubic-bezier(.28, .11, .32, 1);
  color-scheme: dark;
}

/* Tema claro: mesmas peças, luz de dia. A TV e o celular continuam pretos, como aparelhos de verdade. */
:root[data-theme="light"] {
  --bg: #FBFBFD; --bg-night: #F5F5F7; --bg-band: #FFFFFF;
  --fg: #1D1D1F; --fg2: #5E636E; --muted: #6E7380;
  --line: rgba(0, 0, 0, .08); --nav-glass: rgba(251, 251, 253, .76);
  --ghost: rgba(0, 0, 0, .22); --ghost-hover: rgba(0, 0, 0, .05);
  --chip: rgba(0, 0, 0, .06); --chip-hover: rgba(0, 0, 0, .12);
  --hero-glow: rgba(249, 115, 22, .14);
  --rack: linear-gradient(#d9dbe0, #b9bcc4 60%);
  --room-fg2: rgba(29, 29, 31, .74);
  --r1: radial-gradient(130% 100% at 100% 0%, #cdeef3, #eef7f8 70%);
  --r2: radial-gradient(130% 100% at 100% 0%, #e2d6f6, #f5f0fb 70%);
  --r3: radial-gradient(130% 100% at 100% 0%, #cfeedb, #eff8f2 70%);
  --r4: radial-gradient(130% 100% at 100% 0%, #d6e2f7, #f0f4fb 70%);
  --r5: radial-gradient(130% 100% at 100% 0%, #f7dccf, #fbf1ec 70%);
  --stone: #F5F5F7;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
body { background: var(--bg); color: var(--fg); font: 400 19px/1.45 var(--text); -webkit-font-smoothing: antialiased; overflow-x: clip; transition: background-color .3s, color .3s; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 999px; }
.skip:focus { left: 12px; }

.wrap { width: min(var(--wrap), calc(100% - 40px)); margin-inline: auto; }
.h2 { font: 800 clamp(34px, 6.4vw, 72px)/1.02 var(--display); letter-spacing: -0.03em; text-wrap: balance; }
.body-l { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.45; color: var(--fg2); max-width: 36em; text-wrap: pretty; }

/* 0. Barra local */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); transition: background-color .24s var(--nav-ease), box-shadow .24s var(--nav-ease); }
.nav.stuck { background: var(--nav-glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 1px 0 var(--line); }
.nav-in { width: min(var(--wrap), calc(100% - 32px)); height: 100%; margin-inline: auto; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font: 700 19px var(--display); letter-spacing: -0.01em; margin-right: auto; }
.nav-links { display: flex; gap: 24px; font-size: 13px; }
.nav-links a { text-decoration: none; color: var(--fg2); padding: 6px 0; transition: color .2s; }
.nav-links a:hover { color: var(--fg); }
.theme { position: relative; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--fg2); transition: color .2s, background-color .2s; }
.theme:hover { color: var(--fg); background: var(--chip); }
.theme::after { content: ""; position: absolute; inset: -6px; }
.theme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme .i-sun { display: none; }
:root[data-theme="light"] .theme .i-sun { display: block; }
:root[data-theme="light"] .theme .i-moon { display: none; }
.pill { position: relative; display: inline-flex; align-items: center; background: var(--orange); color: #0A0A0C; text-decoration: none; font: 600 13px var(--text); padding: 5px 13px; border-radius: 999px; transition: background-color .2s; }
.pill::after { content: ""; position: absolute; inset: -10px -8px; }
.pill:hover { background: var(--orange-hi); }

/* Botões */
.ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.ctas.center { justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 26px; border-radius: 999px; font: 600 17px var(--text); text-decoration: none; transition: background-color .2s, color .2s, transform .2s; }
.btn:active { transform: scale(.97); }
.btn-main { background: var(--orange); color: #0A0A0C; }
.btn-main:hover { background: var(--orange-hi); }
.btn-ghost { color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--ghost); }
.btn-ghost:hover { background: var(--ghost-hover); }

/* 1. Abertura */
.hero { position: relative; min-height: min(calc(100svh - var(--nav-h)), 980px); padding-top: 72px; overflow: hidden;
  background: radial-gradient(70% 60% at 82% 70%, var(--hero-glow), transparent 70%), var(--bg); }
.hero-in { display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 40px; min-height: inherit; }
.hero-copy { align-self: center; min-width: 0; }
.hero h1 { font: 800 clamp(44px, 7.6vw, 112px)/.94 var(--display); letter-spacing: -0.03em; word-spacing: .06em; text-wrap: balance; }
.lead { font: 700 clamp(22px, 2.5vw, 34px)/1.15 var(--display); letter-spacing: -0.015em; margin-top: 26px; color: var(--fg); }
.hero-body { margin-top: 18px; color: var(--fg2); max-width: 30em; }
.phone { position: relative; border-radius: 52px; padding: 11px; background: #17181c; box-shadow: inset 0 0 0 1.5px #2b2d33, 0 40px 80px rgba(0, 0, 0, .35); }
.phone img { border-radius: 42px; width: 100%; height: auto; }
.hero-phone { width: min(330px, 100%, calc((100svh - 160px) * .46)); justify-self: center; align-self: center; margin-block: 24px 64px; }

/* 2. Sala (efeito principal). A TV mede pela largura e pela altura da janela: nunca passa da tela. */
.cinema { background: var(--bg-night); position: relative; }
.cinema-head { padding-top: var(--sec); padding-bottom: 40px; }
.cinema-head .body-l { margin-top: 20px; }
.stage { position: relative; height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(20px, 4.4vh, 44px); padding-top: var(--nav-h); overflow: hidden; }
.lockup { position: relative; width: min(1000px, 78vw, calc((100svh - var(--nav-h) - 230px) * 16 / 9)); will-change: transform; }
.tv { position: relative; background: #0d0d10; padding: 9px; border-radius: 14px; box-shadow: inset 0 0 0 1px #26272c, 0 30px 90px rgba(0, 0, 0, .45); }
.tv-screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: #050506; }
.tv-screen video, .tv-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rack { height: 26px; margin: 26px -9% 0; border-radius: 6px 6px 2px 2px; background: var(--rack); box-shadow: 0 -40px 80px -30px rgba(249, 115, 22, .12), 0 30px 60px rgba(0, 0, 0, .35); }
.tv-copy { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; color: var(--fg2); font-size: clamp(15px, 1.5vw, 19px); }
.media-toggle { position: absolute; right: 24px; bottom: 24px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background-color .2s; }
.media-toggle:hover { background: var(--chip-hover); }
.media-toggle svg, .band-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.i-play { display: none; }
.paused .i-play { display: block; }
.paused .i-pause { display: none; }

/* 3. Frases */
.lines { background: var(--bg-night); padding: 60px 0 var(--sec); }
.phrases { list-style: none; margin-top: 56px; display: grid; gap: clamp(30px, 4vw, 50px); }
.phrases li { font: 700 clamp(28px, 4.8vw, 52px)/1.08 var(--display); letter-spacing: -0.025em; max-width: 15em; text-wrap: balance; }

/* 4. Vidro (a arte de trás vem do TMDB) */
.glass-sec { background: var(--bg); padding: var(--sec) 0 0; }
.glass-head .body-l { margin-top: 20px; }
.glass-stage { position: relative; margin-top: 64px; height: min(78svh, 760px); overflow: hidden; }
.glass-art { position: absolute; inset: -12% -6%; }
.glass-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.glass-stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--bg), transparent 18%, transparent 80%, var(--bg)); pointer-events: none; }
.glass-credit { position: absolute; z-index: 2; right: 16px; bottom: 16px; font-size: 12px; color: rgba(255, 255, 255, .78); text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.glass-bar { position: absolute; z-index: 2; left: 50%; bottom: 12%; transform: translateX(-50%); max-width: calc(100% - 24px); display: flex; padding: 5px; border-radius: 999px;
  -webkit-backdrop-filter: blur(6px) saturate(165%) brightness(.86); backdrop-filter: blur(6px) saturate(165%) brightness(.86);
  background: radial-gradient(120% 120% at 50% 50%, rgba(0, 0, 0, .06) 55%, rgba(255, 255, 255, .12) 100%), rgba(18, 18, 22, .26);
  box-shadow: inset 0 0 0 .75px rgba(255, 255, 255, .4), inset 0 1px 1px rgba(255, 255, 255, .55), inset 0 -1px 1px rgba(255, 255, 255, .22), inset 0 0 12px rgba(255, 255, 255, .1), 0 10px 30px rgba(0, 0, 0, .35); }
.glass-bar.lens { -webkit-backdrop-filter: url(#lens) saturate(165%) brightness(.9); backdrop-filter: url(#lens) saturate(165%) brightness(.9); }
.glass-bar button { position: relative; z-index: 1; height: 50px; padding: 0 clamp(10px, 2.2vw, 22px); border-radius: 999px; font: 600 clamp(13px, 1.4vw, 16px) var(--text); color: #F5F6F8; white-space: nowrap; transition: color .26s cubic-bezier(.22, 1, .36, 1); }
.glass-ink { position: absolute; z-index: 2; inset: 0; display: flex; padding: inherit; pointer-events: none; color: #0A0A0C; }
.glass-ink span { height: 50px; padding: 0 clamp(10px, 2.2vw, 22px); display: flex; align-items: center; font: 600 clamp(13px, 1.4vw, 16px) var(--text); white-space: nowrap; }
.glass-pill { position: absolute; z-index: 0; top: 5px; left: 0; height: 50px; width: 0; border-radius: 999px; background: #fff; transform-origin: center; }
.lens-defs { position: absolute; }

/* 5. Salas: a TV fica presa à direita, inteira na tela, sem passar da borda */
.rooms { position: relative; color: var(--fg); }
.room { min-height: 100svh; display: flex; align-items: center; }
.room-copy h3 { font: 800 clamp(32px, 4.4vw, 48px)/1.04 var(--display); letter-spacing: -0.025em; }
.room-copy p { margin-top: 16px; color: var(--room-fg2); font-size: clamp(17px, 1.6vw, 21px); max-width: 15.5em; }
.room-copy { padding-block: 120px; }
.room-copy > * { max-width: 360px; }
.room-shot { display: none; }
.r1 { background: var(--r1); } .r2 { background: var(--r2); } .r3 { background: var(--r3); } .r4 { background: var(--r4); } .r5 { background: var(--r5); }
.rooms-device { position: absolute; z-index: 2; top: 0; bottom: 0; left: 0; right: 0; pointer-events: none; }
.device { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; justify-content: flex-end; padding-right: max(24px, calc(var(--gutter) - 120px)); }
.tv-room { width: min(906px, calc(100vw - var(--gutter) - 424px - max(24px, var(--gutter) - 120px)), calc((100svh - 120px) * 16 / 9)); flex: none; }
.scr { will-change: opacity, clip-path; }
.s1 { z-index: 2; transition: opacity 1s ease; }
.s1.faded { opacity: 0; }
.s2 { z-index: 1; }
.s3 { z-index: 3; } .s4 { z-index: 4; } .s5 { z-index: 5; }
.wipe { clip-path: inset(100% 0 0 0); }

/* 6. Detalhes (respiro claro) */
.tiles-sec { background: var(--stone); color: var(--dark); padding: var(--sec) 0; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.tile { background: var(--card); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; min-height: 520px; }
:root[data-theme="light"] .tile { box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 28px rgba(0, 0, 0, .05); }
.t-wide { grid-column: span 2; min-height: 0; }
.tile-tx { padding: clamp(26px, 4vw, 46px) clamp(24px, 4vw, 46px) 0; font: 600 clamp(17px, 1.6vw, 21px)/1.36 var(--text); color: var(--dark2); }
.tile-tx strong { color: var(--dark); font-weight: 600; }
.t-wide .tile-tx { padding: clamp(28px, 4.6vw, 56px) clamp(24px, 4.6vw, 56px) 0; max-width: 34em; }
.tile-media { position: relative; flex: 1; margin-top: 30px; min-height: 260px; }
.tile-media img, .tile-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.t-wide .tile-media { flex: none; min-height: 0; margin: 40px 0 0; background: #0A0A0C; }
.t-wide .tile-media img { position: static; height: auto; }
.crop { background: #0A0A0C; }
.crop img { object-position: left top; }
.devices { background: linear-gradient(#f5f6f8, #e6e8ec); }
.devices .d-tab { inset: 34px auto auto 34px; width: 74%; height: auto; border-radius: 14px; box-shadow: 0 0 0 7px #16171b, 0 24px 50px rgba(0, 0, 0, .25); }
.devices .d-phone { inset: 70px 34px auto auto; width: 30%; height: auto; border-radius: 22px; box-shadow: 0 0 0 6px #16171b, 0 24px 50px rgba(0, 0, 0, .3); }

/* 7. Faixa (capas em alta no TMDB) */
.band { background: var(--bg-band); padding: var(--sec) 0 70px; overflow: hidden; }
.band-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.band-toggle { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); transition: background-color .2s; }
.band-toggle:hover { background: var(--chip-hover); }
.band-rows { margin-top: 56px; display: grid; gap: 14px; }
.band-row { overflow: hidden; }
.band-track { display: flex; gap: 14px; width: max-content; will-change: transform; }
.band-track img { width: 180px; height: 270px; object-fit: cover; border-radius: 12px; flex: none; background: var(--chip); }
.band-note { margin-top: 26px; font-size: 14px; color: var(--muted); }
.band-note a { color: inherit; }

/* 8. Fecho */
.final { background: var(--bg); padding: var(--sec) 0; text-align: center; }
.final-in { display: flex; flex-direction: column; align-items: center; }
.final-mark { width: 96px; height: auto; margin-bottom: 28px; }
.final .body-l { margin: 20px auto 0; }
.platforms { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 30px; margin-top: 60px; font-size: 15px; color: var(--fg2); }
.platforms li { display: flex; align-items: center; gap: 9px; }
.platforms svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.foot { background: var(--bg); padding: 40px 0 56px; font-size: 14px; color: var(--muted); box-shadow: inset 0 1px 0 var(--line); }
.foot-in { display: grid; gap: 6px; }
.foot strong { color: var(--fg2); font-weight: 600; }
.foot-c { margin-top: 10px; }
.foot a { color: inherit; }

/* Monitor grande: mais respiro e tipografia um passo acima, sem esticar as linhas */
@media (min-width: 2000px) {
  :root { --wrap: 1360px; --sec: 180px; }
  body { font-size: 21px; }
  .h2 { font-size: 96px; }
  .phrases li { font-size: 68px; }
  .hero-phone { width: min(420px, calc((100svh - 160px) * .46)); }
  .hero h1 { font-size: 150px; letter-spacing: -0.03em; }
  .lead { font-size: 44px; }
  .glass-bar button { height: 62px; padding: 0 30px; font-size: 20px; }
  .glass-pill { height: 62px; }
  .glass-ink span { height: 62px; padding: 0 30px; font-size: 20px; }
  .tv-room { width: min(1240px, calc(100vw - var(--gutter) - 524px - max(24px, var(--gutter) - 120px)), calc((100svh - 120px) * 16 / 9)); }
  .lockup { width: min(1400px, 70vw, calc((100svh - var(--nav-h) - 260px) * 16 / 9)); }
  .room-copy h3 { font-size: 64px; }
  .room-copy p { font-size: 24px; }
  .room-copy > * { max-width: 460px; }
  .band-track img { width: 240px; height: 360px; }
}

/* Tablet */
@media (max-width: 1068px) {
  :root { --sec: 110px; }
  .hero-in { grid-template-columns: 1.1fr .9fr; }
  .tv-copy { gap: 28px; }
}

/* Salas até o tablet em pé: TV presa no alto e os textos sobem por baixo dela (mesma regra do main.js, 900 px) */
@media (max-width: 900px) {
  .rooms-device { position: absolute; inset: 0; height: auto; margin: 0; z-index: 3; }
  .device { position: sticky; top: var(--nav-h); height: auto; padding: 20px 5vw; justify-content: center; }
  .tv-room { width: min(90vw, calc((100svh - var(--nav-h) - 260px) * 16 / 9)); }
  .room { align-items: flex-end; }
  .room-copy { padding-block: 0 90px; }
  .room-copy > * { max-width: 520px; }
}

/* Celular */
@media (max-width: 734px) {
  :root { --sec: 84px; --nav-h: 48px; }
  body { font-size: 17px; }
  .nav-links { display: none; }
  .nav-in { gap: 10px; }
  .hero { padding-top: 40px; }
  .hero-in { grid-template-columns: 1fr; gap: 10px; }
  .hero-copy { padding-bottom: 20px; }
  .hero-phone { width: min(74%, calc((100svh - 120px) * .46)); margin-block: 8px 56px; }
  .lockup { width: min(90vw, calc((100svh - var(--nav-h) - 260px) * 16 / 9)); }
  .rack { height: 14px; margin-top: 16px; }
  .tv { padding: 5px; border-radius: 9px; }
  .tv-copy { grid-template-columns: 1fr; gap: 14px; }
  .phrases { margin-top: 40px; }
  .glass-stage { height: 64svh; margin-top: 40px; }
  .glass-bar { bottom: 10%; padding: 4px; }
  .glass-bar button, .glass-ink span { height: 44px; }
  .glass-pill { top: 4px; height: 44px; }
  .tiles { grid-template-columns: 1fr; gap: 14px; margin-top: 40px; }
  .t-wide { grid-column: auto; }
  .tile { min-height: 0; }
  .tile-media { flex: none; min-height: 0; height: 240px; margin-top: 24px; }
  .t-wide .tile-media { height: auto; margin-top: 24px; }
  .band-track img { width: 120px; height: 180px; border-radius: 10px; }
  .band-rows { gap: 10px; }
  .band-track { gap: 10px; }
  .platforms { justify-content: flex-start; flex-direction: column; align-items: center; gap: 14px; }
}

/* Celular muito estreito */
@media (max-width: 360px) {
  .brand span { display: none; }
  .glass-bar button, .glass-ink span { padding: 0 8px; font-size: 12px; }
}

/* Tela baixa (notebook pequeno, celular deitado): menos altura em tudo que é preso */
@media (max-height: 560px) and (orientation: landscape) {
  .hero { padding-top: 24px; }
  .hero-in { grid-template-columns: 1.4fr .6fr; }
  .tv-copy { display: none; }
  .room { min-height: 0; }
  .room-copy { padding-block: 60px; }
  .rooms-device { display: none; }
  .room-shot { display: block; margin-top: 24px; max-width: min(100%, 520px); border-radius: 10px; box-shadow: 0 0 0 5px #0d0d10; }
}

/* Movimento reduzido: nada preso, nada rolando, tudo legível */
@media (prefers-reduced-motion: reduce) {
  body, .s1, .nav, .btn, .glass-bar button { transition: none; }
  .rooms-device { display: none; }
  .room { min-height: 0; }
  .room-copy { padding-block: 80px; }
  .room-shot { display: block; margin-top: 28px; max-width: 100%; border-radius: 12px; box-shadow: 0 0 0 6px #0d0d10; }
}
