/* Na Arca — tokens primeiro; nenhuma cor fora daqui. Fontes servidas pelo próprio site (sem chamada ao Google). */
@font-face { font-family: "Fraunces"; src: url("/assets/fontes/fraunces.woff2") format("woff2"); font-weight: 600; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; src: url("/assets/fontes/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --fundo: #0d0b09;          /* preto quente */
  --fundo-2: #17130f;        /* superfícies (capas vazias, campos) */
  --fundo-3: #221c16;
  --texto: #f1e6d2;          /* pergaminho */
  --texto-2: #b9ab92;
  --texto-3: #7f7362;
  --ouro: #d9a54c;           /* a única cor de destaque: o que é clicável ou ativo */
  --ouro-claro: #f2c877;
  --ambar: #a8651f;          /* só no fundo das capas vazias */
  --sombra-video: rgba(8, 6, 4, 0.72);

  --serif: "Fraunces", Georgia, serif;
  --sans: "Figtree", system-ui, sans-serif;

  --r-capa: 10px;
  --r-botao: 999px;
  --r-aviso: 14px;

  --e1: 4px; --e2: 8px; --e3: 12px; --e4: 16px; --e5: 24px; --e6: 32px; --e7: 48px; --e8: 64px;
  --borda-tela: 20px;
  --coluna: min(100vw, 560px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--fundo); color: var(--texto); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; }
:focus-visible { outline: 2px solid var(--ouro); outline-offset: 3px; }

/* ---------- casca das páginas ---------- */
.pagina { width: var(--coluna); margin: 0 auto; padding: 0 0 var(--e8); }
.topo { display: flex; align-items: center; justify-content: space-between; padding: var(--e4) var(--borda-tela); position: sticky; top: 0; z-index: 5;
  background: linear-gradient(var(--fundo) 60%, transparent); }
.marca { font-family: var(--serif); font-weight: 600; font-size: 24px; letter-spacing: 0.005em; font-variation-settings: "opsz" 72, "SOFT" 30; }
.marca b { color: var(--ouro); font-weight: 600; }
.icone-link { display: inline-flex; align-items: center; gap: var(--e2); color: var(--texto-2); font-size: 14px; }
.icone-link svg { width: 22px; height: 22px; }

/* ---------- destaque (a história mais nova) ---------- */
.destaque { position: relative; display: block; margin: var(--e2) var(--borda-tela) 0; border-radius: var(--r-capa); overflow: hidden; aspect-ratio: 4 / 5; background: var(--fundo-2); }
.destaque img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.destaque::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(13, 11, 9, 0.92)); }
.destaque .info { position: absolute; left: var(--e5); right: var(--e5); bottom: var(--e5); z-index: 1; }
.destaque h1 { font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1.05; margin: 0 0 var(--e2); font-variation-settings: "opsz" 96; }
.ref { color: var(--ouro); font-size: 15px; font-weight: 600; }
.destaque .linha { display: flex; align-items: center; justify-content: space-between; gap: var(--e4); margin-top: var(--e4); }
.botao { display: inline-flex; align-items: center; gap: var(--e2); padding: 12px 22px; border-radius: var(--r-botao); background: var(--ouro); color: #1a1208; font-weight: 700; font-size: 16px; }
.botao svg { width: 18px; height: 18px; }
.destaque .dur { color: var(--texto-2); font-size: 14px; }

/* ---------- fileiras ---------- */
.fileira { margin-top: var(--e7); }
.fileira h2 { font-family: var(--serif); font-weight: 600; font-size: 22px; margin: 0 var(--borda-tela); font-variation-settings: "opsz" 48; }
.fileira h2 a { display: inline-flex; align-items: baseline; gap: var(--e2); }
.fileira h2 a span { font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--ouro); }
.fileira p { margin: var(--e1) var(--borda-tela) 0; color: var(--texto-3); font-size: 14px; }
.trilho { display: flex; gap: var(--e3); overflow-x: auto; padding: var(--e4) var(--borda-tela) var(--e1); scroll-snap-type: x mandatory; scroll-padding: 0 var(--borda-tela); scrollbar-width: none; }
.trilho::-webkit-scrollbar { display: none; }
.item { flex: 0 0 132px; scroll-snap-align: start; }
.item .capa { aspect-ratio: 9 / 16; }
.item h3 { font-size: 14px; font-weight: 600; line-height: 1.25; margin: var(--e2) 0 2px; }
.item .ref { font-size: 13px; }

/* capa: imagem real ou capa vazia desenhada (história ainda sem vídeo) */
.capa { position: relative; border-radius: var(--r-capa); overflow: hidden; background: var(--fundo-2); }
.capa img { width: 100%; height: 100%; object-fit: cover; }
.capa-vazia { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: var(--e3);
  background: radial-gradient(120% 70% at 30% 105%, color-mix(in oklab, var(--ambar) 55%, transparent), transparent 70%), var(--fundo-2); }
.capa-vazia span { font-family: var(--serif); font-size: 17px; line-height: 1.1; color: var(--texto); font-variation-settings: "opsz" 36; }
.capa .breve { position: absolute; top: var(--e2); left: var(--e2); font-size: 12px; font-weight: 600; color: var(--texto-2);
  background: rgba(13, 11, 9, 0.7); padding: 3px 8px; border-radius: 6px; }
.capa .tempo { position: absolute; right: var(--e2); bottom: var(--e2); font-size: 12px; font-weight: 600; color: var(--texto);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8); font-variant-numeric: tabular-nums; }

.personagens { display: flex; flex-wrap: wrap; gap: var(--e2); padding: var(--e4) var(--borda-tela) 0; }
.personagens a { padding: 8px 14px; border-radius: var(--r-botao); background: var(--fundo-2); color: var(--texto); font-size: 15px; }

.rodape { margin: var(--e8) var(--borda-tela) 0; color: var(--texto-3); font-size: 13px; line-height: 1.5; max-width: 34em; }
.rodape a { color: var(--texto-2); text-decoration: underline; text-underline-offset: 3px; }
.vazio p { margin: 0 0 var(--e4); }

/* ---------- lista (série, personagem, salvos) ---------- */
.cabeca { padding: var(--e2) var(--borda-tela) var(--e5); }
.cabeca h1 { font-family: var(--serif); font-weight: 600; font-size: 32px; margin: 0; font-variation-settings: "opsz" 96; }
.cabeca p { color: var(--texto-2); margin: var(--e2) 0 0; font-size: 15px; }
.grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 0 3px; }
.grade a { position: relative; }
.grade .capa { aspect-ratio: 9 / 16; border-radius: 4px; }
.grade .capa::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(transparent, rgba(13, 11, 9, 0.85)); }
.grade .capa-vazia span, .grade .tempo { display: none; }
.grade .nome { z-index: 1; position: absolute; left: 6px; right: 6px; bottom: 6px; font-size: 12px; font-weight: 600; line-height: 1.2; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9); }
.vazio { color: var(--texto-2); padding: var(--e6) var(--borda-tela); line-height: 1.5; }

/* ---------- feed ---------- */
body.no-feed { overflow: hidden; }
.feed { position: fixed; inset: 0; overflow-y: scroll; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; background: #000; z-index: 10; }
.feed::-webkit-scrollbar { display: none; }
.slide { position: relative; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; display: flex; justify-content: center; }
.palco { position: relative; height: 100%; width: min(100vw, calc(100dvh * 9 / 16)); background: #000; overflow: hidden; }
.palco > img, .palco > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.palco > video { z-index: 1; }
.palco .vazia { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: var(--e6);
  background: radial-gradient(100% 60% at 50% 100%, color-mix(in oklab, var(--ambar) 45%, transparent), transparent 70%), var(--fundo-2); }
.palco .vazia em { font-style: normal; color: var(--ouro); font-weight: 600; margin-bottom: var(--e3); }
.palco .vazia h2 { font-family: var(--serif); font-weight: 600; font-size: 36px; line-height: 1.05; margin: 0 0 var(--e3); font-variation-settings: "opsz" 96; }
.palco .vazia p { color: var(--texto-2); margin: 0; line-height: 1.45; }
.veu { position: absolute; inset: auto 0 0; height: 42%; background: linear-gradient(transparent, var(--sombra-video)); z-index: 2; pointer-events: none; }

.legenda { position: absolute; left: var(--e4); right: 76px; bottom: calc(var(--e5) + env(safe-area-inset-bottom)); z-index: 3; }
.legenda .serie { color: var(--texto-2); font-size: 14px; font-weight: 600; }
.legenda h2 { font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.1; margin: var(--e1) 0 var(--e1); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5); font-variation-settings: "opsz" 72; }
.legenda .ref { font-size: 15px; }

.acoes { position: absolute; right: var(--e2); bottom: calc(var(--e5) + env(safe-area-inset-bottom)); z-index: 3; display: flex; flex-direction: column; gap: var(--e4); align-items: center; }
.acao { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 60px; font-size: 12px; font-weight: 600; color: var(--texto); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7); }
.acao svg { width: 32px; height: 32px; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5)); transition: transform 0.18s cubic-bezier(.3, 1.6, .5, 1); }
.acao[aria-pressed="true"] svg { color: var(--ouro); }
.acao[aria-pressed="true"] svg path { fill: currentColor; }
.acao:active svg { transform: scale(0.86); }
.acao.pulso svg { animation: pulso 0.32s ease-out; }
@keyframes pulso { 40% { transform: scale(1.22); } }

.barra { position: absolute; left: 0; right: 0; bottom: 0; height: 18px; z-index: 4; touch-action: none; cursor: pointer; }
.barra i { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(241, 230, 210, 0.22); transition: height 0.15s; }
.barra b { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--ouro); transition: height 0.15s; }
.barra.arrastando i, .barra.arrastando b, .barra:hover i, .barra:hover b { height: 5px; }

.feed-topo { position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: min(100vw, calc(100dvh * 9 / 16)); z-index: 12;
  display: flex; align-items: center; justify-content: space-between; padding: calc(var(--e3) + env(safe-area-inset-top)) var(--e3) var(--e3);
  background: linear-gradient(rgba(8, 6, 4, 0.55), transparent); pointer-events: none; }
.feed-topo > * { pointer-events: auto; }
.feed-topo .voltar { display: inline-flex; align-items: center; gap: 2px; font-family: var(--serif); font-size: 20px; font-weight: 600; padding: var(--e1) var(--e2) var(--e1) 0; }
.feed-topo .voltar svg { width: 24px; height: 24px; }
.feed-topo .som { width: 40px; height: 40px; display: grid; place-items: center; }
.feed-topo .som svg { width: 24px; height: 24px; }

.pilula-som { position: fixed; top: calc(72px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 12; display: inline-flex; align-items: center; gap: var(--e2);
  padding: 10px 18px; border-radius: var(--r-botao); background: rgba(13, 11, 9, 0.82); color: var(--texto); font-weight: 600; font-size: 15px; }
.pilula-som svg { width: 20px; height: 20px; color: var(--ouro); }

.pausa { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity 0.2s; }
.pausa svg { width: 72px; height: 72px; color: rgba(241, 230, 210, 0.85); filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.5)); }
.pausado .pausa { opacity: 1; }

.coracao { position: absolute; z-index: 5; width: 96px; height: 96px; margin: -48px 0 0 -48px; color: var(--ouro); pointer-events: none; animation: coracao 0.8s ease-out forwards; }
@keyframes coracao { 0% { transform: scale(0.4) rotate(-12deg); opacity: 0; } 18% { transform: scale(1.1) rotate(-6deg); opacity: 1; } 70% { transform: scale(1) translateY(-10px); opacity: 1; } 100% { transform: scale(1.05) translateY(-60px); opacity: 0; } }

.fim { height: 100dvh; scroll-snap-align: start; display: grid; place-items: center; text-align: center; padding: var(--e6); }
.fim h2 { font-family: var(--serif); font-weight: 600; font-size: 28px; margin: 0 0 var(--e3); }
.fim p { color: var(--texto-2); margin: 0 0 var(--e5); }

.aviso { position: fixed; left: 50%; bottom: calc(var(--e7) + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 30; opacity: 0;
  background: var(--texto); color: #1a1208; padding: 10px 16px; border-radius: var(--r-aviso); font-weight: 600; font-size: 14px; transition: opacity 0.2s, transform 0.2s; }
.aviso.ver { opacity: 1; transform: translate(-50%, 0); }

/* telas largas: o feed vira uma coluna central, ações ao lado do vídeo (como no TikTok no computador) */
@media (min-width: 700px) {
  .slide { padding: var(--e4) 0; }
  .palco { height: 100%; border-radius: 12px; }
  .acoes { right: auto; left: calc(50% + min(100vw, calc((100dvh - 32px) * 9 / 16)) / 2 + var(--e3)); bottom: var(--e6); }
  .acao { color: var(--texto-2); text-shadow: none; }
  .acao svg { filter: none; }
  .palco { width: calc((100dvh - 32px) * 9 / 16); }
  .feed-topo { width: 100vw; padding: var(--e5) var(--e6); background: none; }
  .legenda { right: var(--e4); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
