/* Página por referência (/r/<id>): mesmo produto do gabinete, em página própria. */
:root {
  --bg: #0b0b0c; --bg-2: #121214; --bg-3: #19191c;
  --ink: #f3f1ec; --ink-2: rgba(243,241,236,.66); --ink-3: rgba(243,241,236,.54);
  --line: rgba(243,241,236,.09); --line-2: rgba(243,241,236,.16);
  --accent: #d4ff3a; --accent-ink: #0b0b0c;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", ui-sans-serif, -apple-system, "SF Pro Text", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease-out: cubic-bezier(.23,1,.32,1);
  --gutter: clamp(16px, 3.2vw, 48px); --radius: 22px; --bezel: 6px;
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body { font-family: var(--sans); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100dvh; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

/* idioma: EN padrão; o JS troca <html lang> */
html[lang="en"] [data-l="pt"], html[lang="pt"] [data-l="en"] { display: none !important; }

/* grão estático: basta cobrir a tela (inset -50% criava uma camada de GPU 4x maior) */
.grain { position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: .055;
  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"); }

/* topo */
.topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px var(--gutter); }
.wordmark { font-family: var(--serif); font-style: italic; font-size: 28px; letter-spacing: -.01em; display: inline-flex; align-items: center; gap: 10px; }
.star { width: 20px; height: 20px; fill: var(--accent); flex: none; animation: star-spin 16s linear infinite; }
.wordmark:hover .star { animation-duration: 2.4s; }
@keyframes star-spin { to { transform: rotate(360deg); } }
.lang { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; background: rgba(11,11,12,.5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lang span { padding: 5px 9px; border-radius: 999px; color: var(--ink-3); transition: background-color .3s var(--ease-out), color .3s var(--ease-out); display: inline-block !important; }
html[lang="en"] .lang [data-l="en"], html[lang="pt"] .lang [data-l="pt"] { background: var(--ink); color: var(--bg); }
/* o seletor mostra os dois idiomas (vence a regra que esconde o outro idioma) */
html[lang] .lang [data-l] { display: inline-block !important; }

/* palco + painel */
.ref { display: grid; grid-template-columns: minmax(0, 56fr) minmax(0, 44fr); gap: clamp(24px, 3vw, 48px); align-items: start; padding: 88px var(--gutter) 40px; max-width: 1760px; margin: 0 auto; }
.ref-media { position: sticky; top: 88px; padding: 10px 0; }
.bezel { padding: var(--bezel); border-radius: var(--radius); background: rgba(243,241,236,.04); border: 1px solid var(--line); transform: rotate(-1.2deg); transition: transform .3s var(--ease-out); box-shadow: 0 50px 120px -40px rgba(0,0,0,.9); will-change: transform; }
.bezel:hover { transform: rotate(0deg); }
.bezel-in { position: relative; border-radius: 16px; overflow: hidden; background: var(--bg-3); aspect-ratio: 4 / 3; max-height: calc(100dvh - 140px); width: 100%; }
.bezel-in > img, .bezel-in > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }

/* capa tipográfica (igual à do gabinete) */
.cover { position: absolute; inset: 0; display: grid; align-content: space-between; padding: 26px; overflow: hidden; background: radial-gradient(120% 90% at var(--cx, 20%) var(--cy, 0%), hsl(var(--h, 75) 60% 22% / .9), transparent 60%), linear-gradient(160deg, #18181b, #0e0e10); }
.cover::before { content: attr(data-mark); position: absolute; right: -.08em; bottom: -.24em; font-family: var(--serif); font-style: italic; font-size: clamp(200px, 26vw, 420px); line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(243,241,236,.16); letter-spacing: -.06em; }
.cover-kind { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: hsl(var(--h, 75) 90% 70%); position: relative; }
.cover-title { font-family: var(--serif); font-size: clamp(40px, 5vw, 80px); line-height: 1; letter-spacing: -.02em; max-width: 12ch; position: relative; }

.ref-panel { background: #f3f1ec; color: rgba(18,18,18,.82); border-radius: var(--radius); padding: clamp(24px, 2.4vw, 36px) clamp(22px, 2.2vw, 32px) 12px; min-width: 0; }
.kicker { display: flex; gap: 10px; flex-wrap: wrap; }
.pill { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; background: #121212; color: var(--ink); padding: 6px 11px; border-radius: 999px; }
.ref-panel h1 { font-weight: 600; font-size: clamp(34px, 4vw, 56px); line-height: 1; letter-spacing: -.02em; margin: 18px 0 12px; color: #121212; text-wrap: balance; overflow-wrap: anywhere; }
.short { font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.25; color: rgba(18,18,18,.72); text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 8px; }
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 6px 6px 6px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; border: 1px solid rgba(18,18,18,.14); color: #121212; transition: transform .16s var(--ease-out), background-color .25s var(--ease-out); }
.btn-icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(18,18,18,.07); transition: transform .4s var(--ease-out); }
.btn-icon svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.btn:active { transform: scale(.97); }
.btn.is-primary { background: #121212; color: var(--ink); border-color: #121212; }
.btn.is-primary .btn-icon { background: var(--accent); color: var(--accent-ink); }
.btn.is-ghost { padding: 6px 18px; border-color: transparent; color: rgba(18,18,18,.66); min-height: 42px; }
.btn.is-ghost:hover { color: #121212; }
@media (hover: hover) and (pointer: fine) { .btn:hover .btn-icon { transform: translate(2px, -2px) scale(1.06); } .btn:not(.is-primary):not(.is-ghost):hover { background: rgba(18,18,18,.05); } }

.d-sec { padding: 22px 0; border-top: 1px solid rgba(18,18,18,.1); }
.secs { margin-top: 18px; }
.d-sec h2, .d-sec h3 { font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(18,18,18,.62); margin-bottom: 10px; }
.d-sec p { font-size: 15px; line-height: 1.6; text-wrap: pretty; }
.d-sec ul { list-style: none; display: grid; gap: 8px; }
.d-sec li { position: relative; padding-left: 20px; font-size: 15px; line-height: 1.5; }
.d-sec li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: #121212; }
.d-sec.is-caveats { background: rgba(18,18,18,.04); margin: 0 calc(-1 * clamp(22px, 2.2vw, 32px)); padding: 22px clamp(22px, 2.2vw, 32px); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
.d-sec.is-caveats li::before { background: none; border: 1.5px solid rgba(18,18,18,.4); width: 6px; height: 6px; }

/* parecidas */
.more { padding: 72px var(--gutter) 24px; max-width: 1760px; margin: 0 auto; }
.more-h { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 20px; }
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 20px; }
.rc { display: block; transition: transform .2s var(--ease-out); }
.rc-thumb { display: block; position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: var(--bg-3); border: 1px solid var(--line); }
.rc-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transition: transform .2s var(--ease-out); }
.rc-thumb .cover { padding: 14px; } .rc-thumb .cover::before { font-size: 150px; } .rc-thumb .cover-title, .rc-thumb .cover-kind { display: none; }
.rc-name { display: block; margin-top: 12px; font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.rc-cat { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-top: 2px; }
@media (hover: hover) and (pointer: fine) { .rc:hover { transform: translateY(-4px); } .rc:hover .rc-thumb img { transform: scale(1.04); } }

/* faixa final */
.band { padding: 96px var(--gutter) 88px; text-align: center; display: grid; justify-items: center; gap: 28px; }
.band-h { font-family: var(--serif); font-size: clamp(48px, 8vw, 120px); line-height: .95; letter-spacing: -.035em; }
.btn.is-accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.is-accent .btn-icon { background: var(--bg); color: var(--accent); }

.foot { padding: 40px var(--gutter) 48px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.foot a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.foot-links { display: inline-flex; gap: 18px; }

/* entrada só com CSS */
.ref-panel > *, .ref-panel .secs > * { animation: fade-up 700ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms + 80ms); }
.ref-panel .secs { animation: none; }
.ref-media { animation: fade-up 700ms var(--ease-out) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (max-width: 899px) {
  .ref { grid-template-columns: minmax(0, 1fr); padding-top: 76px; gap: 20px; }
  .ref-media { position: static; padding: 6px 0; }
  .bezel-in { max-height: none; }
  .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
  .band { padding: 72px var(--gutter) 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .star { animation: none; }
  .ref-panel > *, .ref-media { animation: none; }
  .bezel, .rc, .rc-thumb img, .btn, .btn-icon { transition: none; }
}
