/* casca.css — Portal CastroStudies, visual "evolução" (08/11/2026).
   A MOLDURA comum às 3 páginas: cores, fundo de vídeo, barra do topo, rodapé,
   janelas (menu do celular e player) e o botão de pausa. A página inicial
   acrescenta inicio.css; as páginas internas carregam antes o style.css de
   sempre, então aqui nada mexe em h1, .btn, .glass etc. */


:root {
  --fonte: "Segoe UI Variable Display", "Segoe UI Variable Text", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --preto: #030304;
  --tinta: #f7f8fb;
  --tinta-2: #d3d7e0;
  --tinta-3: #a4abba;
  --vermelho: #e1121f;
  --vermelho-2: #ff2f41;
  --vermelho-3: #8d0610;
  --vermelho-texto: #ff4d5e;
  --nutria: #3ee07a;
  --half: #4aa6ff;
  --sga: #ff304c;
  --ouro: #dfc38c;
  --color-nutria: #3ee07a;   /* o macro texto_com_estilo usa esta variável (nome do clássico) */
  --vidro: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  --borda: rgba(255,255,255,.12);
  --borda-forte: rgba(255,255,255,.24);
  --sombra: 0 24px 70px rgba(0,0,0,.45);
  --max: 1360px;
  --barra-h: 68px;
  --curva: cubic-bezier(.2,.7,.2,1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--barra-h) + 28px); }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  background: var(--preto); color: var(--tinta);
  font-family: var(--fonte); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, video, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
.vermelho { color: var(--vermelho); }
.ouro { color: var(--ouro); }
.cor-nutria { color: var(--nutria); }
.cor-sga { color: var(--sga) !important; }
.cor-half { color: var(--half) !important; }
.container { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.ancora { position: absolute; top: 0; }
:focus-visible { outline: 2px solid var(--vermelho-2); outline-offset: 3px; border-radius: 6px; }
.pular { position: fixed; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 10px; background: #fff; color: #000; font-weight: 700; }
.pular:focus { top: 16px; }
svg path, svg circle, svg rect { vector-effect: non-scaling-stroke; }

/* ===== Fundo do site inteiro (o mesmo de hoje, um pouco mais vivo) ===== */
.fundo { position: fixed; inset: 0; z-index: -10; pointer-events: none; overflow: hidden; }
.fundo-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: .5;   /* 08/11 fluidez: sem filtro de cor (pesava a cada quadro) */
  /* Amplia um pouco a partir do canto superior esquerdo: a estrelinha de marca
     d'água do gerador (canto inferior direito do vídeo) sai do quadro. */
  transform: scale(1.16); transform-origin: 22% 14%;
}
.fundo-veu {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 80% 10%, rgba(225,18,31,.16), transparent 70%),
    linear-gradient(180deg, rgba(3,3,4,.55), rgba(3,3,4,.82) 60%, rgba(3,3,4,.9));
}
.fundo-grade {
  position: absolute; inset: 0; opacity: .3;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(circle at 70% 30%, #000, transparent 75%);
}

/* ===== Barra do topo ===== */
.barra {
  position: fixed; top: 14px; left: 50%; z-index: 60;
  width: min(var(--max) + 24px, calc(100% - 28px)); transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,.10); border-radius: 22px;
  /* 08/11 fluidez: sem desfoque por cima do vídeo (a UHD 620 caía a 30 quadros); fundo mais firme */ 
  background: linear-gradient(180deg, rgba(14,14,18,.86), rgba(6,6,8,.78));
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  transition: background .35s ease, box-shadow .35s ease, top .35s var(--curva);
  overflow: hidden;
}
.barra.rolou { top: 8px; background: linear-gradient(180deg, rgba(10,10,13,.95), rgba(5,5,7,.92)); box-shadow: 0 18px 60px rgba(0,0,0,.6); }
.barra-nav { height: var(--barra-h); display: flex; align-items: center; gap: 18px; padding: 0 14px 0 18px; }
.barra-marca { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.barra-marca img { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(225,18,31,.45)); }
.marca-texto { font-weight: 900; font-size: 21px; letter-spacing: -.04em; line-height: 1; white-space: nowrap; }
.barra .marca-texto { display: none; }
.barra-links { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex: 1; min-width: 0; }
.barra-links a {
  position: relative; display: inline-flex; align-items: center; gap: 0; height: 44px; padding: 0 10px; border-radius: 12px;
  font-size: 14.5px; font-weight: 700; color: rgba(255,255,255,.86); white-space: nowrap;
  transition: color .2s ease, background .2s ease;
}
.barra-links a:hover { color: #fff; background: rgba(255,255,255,.06); }
.barra-links a::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 4px; height: 2px; border-radius: 2px;
  background: var(--vermelho-2); box-shadow: 0 0 12px var(--vermelho-2);
  transform: scaleX(0); transition: transform .35s var(--curva);
}
.barra-links a[aria-current] { color: #fff; }
.barra-links a[aria-current]::after { transform: scaleX(1); }
.barra-links img { width: 26px; height: 26px; border-radius: 7px; flex: none; margin-right: 8px; }
.item-controle { color: #f0c48a !important; }
.item-reveillon { line-height: 1; }
.reveillon-nome { display: flex; flex-direction: column; color: #fff; font-weight: 800; letter-spacing: .02em; line-height: 1.1; }
.reveillon-nome b { color: var(--ouro); }
.reveillon-nome small { margin-top: 3px; color: var(--ouro); font-size: 7.5px; font-weight: 700; letter-spacing: .16em; }
.barra-menu {
  display: none; align-items: center; gap: 8px; margin-left: auto; height: 44px; padding: 0 16px; border-radius: 14px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); font-weight: 700;
}
.barra-menu svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.barra-progresso { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; }
.barra-progresso span { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(var(--progresso, 0));
  background: linear-gradient(90deg, var(--vermelho-3), var(--vermelho-2)); box-shadow: 0 0 10px var(--vermelho-2); }
@media (min-width: 1440px) { .barra .marca-texto { display: inline; } }

.nutria-a { color: var(--nutria); }
/* Rodapé */
.rodape { padding: 40px 0 90px; border-top: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.45); }
.rodape-dentro { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; color: #a3abb9; font-size: 14px; }
.rodape .barra-marca img { width: 40px; height: 40px; }
.rodape-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rodape-admin { padding: 9px 13px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: #e0e3ea; font-weight: 750; }
.rodape-admin:hover { border-color: rgba(255,47,65,.5); color: #fff; }

/* Pausa geral */
.pausa-geral { position: fixed; right: 18px; bottom: 18px; z-index: 55; display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 16px 0 13px; border-radius: 999px; cursor: pointer; font-size: 13.5px; font-weight: 700;
  border: 1px solid rgba(255,255,255,.16); background: rgba(8,8,10,.86);   /* 08/11 fluidez: sem desfoque */
  box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: border-color .2s ease, background .2s ease; }
.pausa-geral:hover { border-color: rgba(255,47,65,.6); }
.pausa-geral svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.pausa-geral .ico-play { display: none; fill: currentColor; stroke: none; }
.sem-movimento .pausa-geral .ico-pausa { display: none; }
.sem-movimento .pausa-geral .ico-play { display: block; }

/* Janelas */
dialog { color: var(--tinta); }
.folha { width: min(440px, calc(100% - 24px)); margin: 76px 12px auto auto; padding: 18px; border-radius: 22px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(10,10,13,.96); box-shadow: 0 30px 90px rgba(0,0,0,.6); }
.folha::backdrop { background: rgba(0,0,0,.55); }
.folha[open] { animation: entra-folha .35s var(--curva); }
@keyframes entra-folha { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
.folha-topo { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.folha-fechar, .player-fechar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); }
.folha-fechar svg, .player-fechar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.folha-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.folha-links a { display: flex; align-items: center; gap: 0; min-height: 52px; padding: 0 14px; border-radius: 14px; font-weight: 700;
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.035); }
.folha-links a:hover { border-color: rgba(255,47,65,.5); }
.folha-links img { width: 24px; height: 24px; border-radius: 6px; margin-right: 9px; }
.folha-links .ouro { margin-left: .28em; }
.player { width: min(980px, calc(100% - 32px)); padding: 0; border-radius: 18px; border: 1px solid rgba(255,255,255,.14); background: #050508; overflow: hidden; }
.player::backdrop { background: rgba(0,0,0,.86); }
.player[open] { animation: entra-folha .3s var(--curva); }
.player video { width: 100%; max-height: 82vh; background: #000; }
.player-fechar { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(0,0,0,.6); }

/* Pausado pelo botão: nada se move. (Desde 08/11/2026 a página começa animada
   mesmo com "reduzir movimento" no aparelho; só a rolagem suave dos links é cortada.) */
.sem-movimento *, .sem-movimento *::before, .sem-movimento *::after { animation-play-state: paused !important; }
.sem-movimento .faiscas, .sem-movimento .pulsos, .sem-movimento .varredura { opacity: 0; }
.sem-movimento .palco-camada { transition: none; }
/* 08/11 fluidez: enquanto a abertura cobre a tela inteira, o vídeo de fundo do site não aparece —
   escondê-lo (sem pausar: retomar travava a 1ª rolagem) tira uma camada de tela cheia de cada quadro: 30 → 60. */
.fundo-coberto .fundo-video { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}


/* Páginas internas: a barra é fixa; o conteúdo começa abaixo dela. */
.pagina-interna main { padding-top: calc(var(--barra-h) + 24px); }

@media (max-width: 1240px) {
  .barra-links { display: none; }
  .barra .marca-texto { display: inline; }
  .barra-menu { display: inline-flex; }
}
@media (max-width: 760px) {
  :root { --barra-h: 60px; }
  .container { width: calc(100% - 32px); }
  .barra { top: 10px; width: calc(100% - 20px); border-radius: 18px; }
  .barra-nav { padding: 0 8px 0 12px; }
  .barra-marca img { width: 32px; height: 32px; }
  .marca-texto { font-size: 19px; }
  .pausa-geral span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pausa-geral { padding: 0; width: 44px; height: 44px; justify-content: center; right: 12px; bottom: 12px; }
}
