/* Crystal Pictures Entertainment — protótipo v2, estilos comuns.
   Mesma base aprovada: fundo #111110, Geist e Instrument Serif, só tema escuro.
   Regras desta versão: um efeito por tela, uma escala de texto, um tratamento de imagem. */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg: #111110;
  --surface: #1b1b19;
  --fg: #f1efea;
  --fg-2: #a9a59d;                       /* apoio: 7,70:1 sobre o fundo (medido) */
  --line: rgba(241, 239, 234, .16);
  --line-strong: rgba(241, 239, 234, .5);
  --lay: #fd0501;                        /* vermelho do título no pôster de LAY: 4,68:1 (medido) */

  --sans: "Geist", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", "Times New Roman", serif;

  /* escala de texto única */
  --t-xl: clamp(3.5rem, 1rem + 9vw, 11rem);       /* chamada da home */
  --t-l: clamp(2.75rem, 1.4rem + 5.2vw, 7rem);    /* chamada de página */
  --t-m: clamp(2rem, 1.3rem + 2.8vw, 4rem);       /* frases de destaque */
  --t-s: clamp(1.5rem, 1.2rem + 1vw, 2rem);       /* títulos de seção */
  --t-lede: clamp(1.125rem, 1rem + .4vw, 1.3125rem);

  --gutter: clamp(16px, 3.2vw, 48px);
  --max: 1360px;
  --header-h: 64px;
  --tab-h: 0px;                          /* altura da barra de baixo; só existe no celular */
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
@media (max-width: 767px) { :root { --tab-h: 56px; } }

/* ── Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-padding-top: calc(var(--header-h) + 72px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 1rem; line-height: 1.5; letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, blockquote { text-wrap: balance; margin: 0; font-weight: 500; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip {
  position: absolute; left: var(--gutter); top: 8px; z-index: 60; padding: 10px 16px;
  background: var(--fg); color: var(--bg); border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 500;
  transform: translateY(-160%); transition: transform .2s var(--ease);
}
.skip:focus-visible { transform: none; }
/* grão de película: fino e parado, por cima de tudo. Não recebe clique. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 45; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .95  0 0 0 0 .94  0 0 0 0 .9  0 0 0 .6 -.3'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 220px 220px; opacity: .3;
}

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ── Marca: o logo horizontal de 2015 (CRYSTAL com o cristal no lugar do Y) ───── */
.brand { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.brand img { display: block; height: 26px; width: auto; }

/* ── Cabeçalho ──────────────────────────────────────────── */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--header-h);
  border-bottom: 1px solid transparent; transition: background-color .3s ease, border-color .3s ease;
}
.site-header[data-solid="1"] {
  background: rgba(17, 17, 16, .82);
  -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  border-bottom-color: var(--line);
}
.site-header .wrap { height: 100%; max-width: none; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-list { display: flex; align-items: center; gap: clamp(24px, 3vw, 44px); }
.nav-link {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  font-size: 14px; text-decoration: none; color: var(--fg-2); transition: color .2s;
}
.nav-link:hover, .nav-link[aria-current] { color: var(--fg); }
.nav-link[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px; background: currentColor; }

/* celular: os 4 destinos ficam sempre à vista, numa barra embaixo (sem menu escondido) */
.tabbar { display: none; }
@media (max-width: 767px) {
  .nav-desktop { display: none; }
  .site-header .wrap { justify-content: center; }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; inset: auto 0 0 0; z-index: 40;
    height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(17, 17, 16, .86);
    -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
    border-top: 1px solid var(--line);
  }
  .tabbar a {
    position: relative; display: grid; place-items: center; text-decoration: none;
    font-size: 13px; color: var(--fg-2);
  }
  .tabbar a[aria-current] { color: var(--fg); }
  .tabbar a[aria-current]::before { content: ""; position: absolute; top: -1px; left: 28%; right: 28%; height: 1px; background: var(--fg); }
  .tabbar a:focus-visible { outline-offset: -4px; }
}

/* ── Ações ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 999px;
  background: var(--fg); color: var(--bg); border: 1px solid var(--fg); cursor: pointer; white-space: nowrap;
  font: 500 15px/1 var(--sans); letter-spacing: -.01em; text-decoration: none;
  transition: background-color .25s ease, color .25s ease, transform .25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; white-space: nowrap;
  font-size: 15px; font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: .32em; text-decoration-color: var(--line-strong);
}
.link-arrow:hover { text-decoration-color: currentColor; }
.link-arrow svg, .btn svg { flex: none; transition: transform .25s var(--ease); }
.link-arrow:hover svg, .btn:hover svg.arrow { transform: translateX(3px); }

/* ── Texto ──────────────────────────────────────────────── */
.kicker { font-size: 15px; color: var(--fg-2); }
.display { font-family: var(--serif); font-weight: 400; letter-spacing: -.012em; font-size: var(--t-l); line-height: .96; }
.display .line { display: block; }
.statement { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; font-size: var(--t-m); line-height: 1.04; }
.title { font-size: var(--t-s); line-height: 1.15; letter-spacing: -.02em; font-weight: 500; }
.lede { font-size: var(--t-lede); line-height: 1.45; color: var(--fg-2); max-inline-size: 42ch; }
.prose p { max-inline-size: 62ch; font-size: 1.0625rem; line-height: 1.6; }
.prose p + p { margin-top: 1em; }
.muted { color: var(--fg-2); }

/* LAY escrito como no pôster: vermelho, fino e espaçado */
.lay-mark { font-family: var(--sans); font-weight: 300; color: var(--lay); letter-spacing: .5em; margin-right: -.5em; line-height: 1; }

/* ── Estrutura ──────────────────────────────────────────── */
.section { padding-block: clamp(88px, 11vw, 168px); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { margin-bottom: clamp(36px, 4.5vw, 64px); }
.page-head { padding-top: calc(var(--header-h) + clamp(72px, 15vh, 168px)); padding-bottom: clamp(64px, 9vw, 128px); }
.page-head .kicker { margin-bottom: 24px; }
.page-head .lede { margin-top: 32px; }
.two { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px clamp(32px, 5vw, 80px); }
@media (max-width: 899px) { .two { grid-template-columns: 1fr; } }
.closing { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 32px; }

/* imagem: sempre o quadro inteiro, sem cantos arredondados */
.frame { overflow: hidden; background: var(--surface); }
.frame img { width: 100%; height: 100%; object-fit: cover; }

/* imagens que se revelam ao entrar na tela (revelar.js).
   "rv" só existe quando o efeito pode rodar; sem ele, nada disto vale e a imagem aparece normalmente.
   Rede de segurança: se o revelar.js não chegar a rodar, a imagem aparece sozinha depois de 2,5 s. */
[data-reveal] { position: relative; }
html.rv [data-reveal] { background: var(--bg); }
html.rv [data-reveal] img { opacity: 0; transition-property: transform; }
html.rv [data-reveal].rv-done img { opacity: 1; }
html.rv:not(.rv-on) [data-reveal] img { animation: rv-safe .3s 2.5s forwards; }
@keyframes rv-safe { to { opacity: 1; } }
.rv-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; transition: opacity .25s linear; }

/* continuidade: dois destinos como pedras polidas (ônix), com dois cantos chanfrados.
   - borda: um fio de luz só, bem fino (meio pixel nas telas de alta resolução);
   - centro: preto polido com um reflexo diagonal;
   - a luz do ponteiro desliza sobre o polido (--mx, --my, escritos pelo site.js).
   Sem textura e sem moldura. Parado, nada se mexe. */
.next { border-top: 1px solid var(--line); padding-block: clamp(56px, 7vw, 104px); }
.next-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 2vw, 24px); }
.next a {
  --cut: clamp(16px, 2vw, 26px);
  --hair: 1px;
  --shape: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  position: relative; isolation: isolate;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; text-decoration: none;
  padding: clamp(36px, 4.5vw, 64px) clamp(28px, 3.8vw, 56px);
  font-family: var(--serif); font-size: var(--t-m); line-height: 1.04; letter-spacing: -.01em;
  clip-path: var(--shape);
  /* o fundo do link é a borda: um fio de luz em volta do centro */
  background: linear-gradient(135deg, rgba(232, 232, 214, .72) 0%, rgba(232, 232, 214, .32) 34%, rgba(232, 232, 214, .26) 66%, rgba(232, 232, 214, .46) 100%);
  transition: filter .35s ease;
}
@media (min-resolution: 2dppx) { .next a { --hair: .5px; } }
.next a::before {            /* centro: preto polido, um reflexo diagonal */
  content: ""; position: absolute; inset: var(--hair); z-index: -2; clip-path: var(--shape);
  background:
    linear-gradient(112deg, rgba(232, 232, 214, 0) 34%, rgba(232, 232, 214, .04) 47%, rgba(232, 232, 214, .07) 50%, rgba(232, 232, 214, .04) 53%, rgba(232, 232, 214, 0) 66%),
    linear-gradient(180deg, #0e0e0d, #0a0a0a);
}
.next a::after {             /* a luz do ponteiro desliza sobre o polido */
  content: ""; position: absolute; inset: var(--hair); z-index: -1; clip-path: var(--shape); pointer-events: none;
  background: radial-gradient(circle 280px at var(--mx, 50%) var(--my, 50%), rgba(240, 240, 226, .13), rgba(240, 240, 226, 0) 70%);
  opacity: 0; transition: opacity .4s ease;
}
.next a:hover::after, .next a:focus-visible::after { opacity: 1; }
.next a:hover { filter: brightness(1.18); }
/* o recorte esconde o contorno padrão: no foco do teclado, a borda inteira acende e engrossa */
.next a:focus-visible { outline: none; background: #f1efea; }
.next a:focus-visible::before, .next a:focus-visible::after { inset: 2px; }
.next a svg { flex: none; width: 28px; height: 28px; transition: transform .3s var(--ease); }
.next a:hover svg { transform: translateX(6px); }
@media (max-width: 767px) { .next-grid { grid-template-columns: 1fr; } }

/* lista de definições (ficha técnica, sobre o projeto) */
.ficha { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 0 clamp(32px, 5vw, 80px); }
.ficha dt, .ficha dd { padding: 18px 0; border-top: 1px solid var(--line); }
.ficha dt { color: var(--fg-2); }
.ficha dd span { display: block; }
@media (max-width: 767px) { .ficha { grid-template-columns: 1fr; } .ficha dd { border-top: 0; padding-top: 0; } }

/* ── Vídeo ────────────────────────────────────────────── */
.player { position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; background: #000; }
.player img, .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.player img { transition: transform 1.4s var(--ease); }
.player::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0) 55%); }
.player-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 28px 0 22px;
  border-radius: 999px; border: 0; cursor: pointer; white-space: nowrap;
  background: #f1efea; color: #111110; font: 500 16px/1 var(--sans); letter-spacing: -.01em;
  transition: transform .25s var(--ease);
}
.player-play:hover { transform: translate(-50%, -50%) scale(1.03); }
.player:hover img { transform: scale(1.015); }
.player-play:focus-visible { outline: 2px solid #f1efea; outline-offset: 4px; }
.player[data-state="playing"]::after, .player[data-state="playing"] .player-play, .player[data-state="playing"] img { display: none; }
.player-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-top: 16px; font-size: 14px; color: var(--fg-2); }
.player-meta a { display: inline-flex; align-items: center; min-height: 44px; color: var(--fg); text-underline-offset: .25em; }
.player-meta .credits { color: var(--fg); font-size: 15px; }

/* ── Rodapé ─────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(56px, 8vw, 96px) 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px 32px; }
.footer-brand { display: inline-block; }
.footer-brand img { display: block; width: min(260px, 70vw); height: auto; }
.footer-title { font-size: 14px; color: var(--fg-2); margin-bottom: 12px; font-weight: 400; }
.footer-list a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; text-decoration: none; font-size: 15px; }
.footer-list a:hover { text-decoration: underline; text-underline-offset: .3em; text-decoration-thickness: 1px; }
@media (max-width: 767px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

/* ── Movimento reduzido ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
