/* Estilos comuns a todas as páginas: base, nome no topo, menu, cartões do Books, botão padrão, barra de rolagem e rodapé */
:root {
  --night: #0b0a09;
  --night-2: #15120f;
  --cream: #f6f1e9;
  --ink: #1a1613;
  --ink-soft: #5b544d;
  --mute: #a39b91;
  --gold: #c9a14a;
  --line: rgba(255,255,255,0.14);
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.7, 0, 0.2, 1);
  --out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --pad: max(20px, calc((100vw - 1200px) / 2));
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--night); color: var(--cream); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; margin: 0; }


/* ---------- Nome no topo, sempre pequeno, acima do menu ---------- */
.mast { position: fixed; z-index: 51; top: 14px; left: 0; right: 0; text-align: center; pointer-events: none; mix-blend-mode: difference; }
.mast-name .cap { font-size: 1.32em; line-height: 0; }
.mast-name { display: inline-block; pointer-events: auto; white-space: nowrap; line-height: 1;
             color: var(--cream); font-size: 30px;
             font-family: "Cinzel Decorative", "Cormorant Garamond", serif; font-weight: 400; letter-spacing: 0.06em;
             padding-left: 0.06em; /* compensa o espaço que sobra depois da última letra */ }

/* ---------- Menu de vidro ---------- */
.nav { position: fixed; z-index: 50; top: 58px; left: 50%; width: var(--navw, calc(100vw - 2 * var(--pad))); transform: translateX(-50%); height: 62px;
       display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 14px 0 28px;
       border-radius: 31px; border: 1px solid rgba(255,255,255,0.16);
       background: rgba(20,17,14,0.5); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
       transition: width 0.7s var(--ease), padding 0.7s var(--ease); }
.nav .brand { font-family: var(--serif); font-size: 26px; font-weight: 500; white-space: nowrap; transition: opacity 0.35s ease; }
.nav ul { position: absolute; left: 50%; top: 50%; transform: translate(calc(-50% + var(--ulx, 0px)), -50%); transition: transform 0.7s var(--ease); display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; font-size: 16px; color: rgba(246,241,233,0.88); white-space: nowrap; }
.nav ul a { display: inline-block; padding: 8px 2px; }
.nav ul a:hover { color: #fff; }
.nav ul a { position: relative; }
.nav ul a[aria-current="page"] { color: #fff; font-weight: 600; }
.nav ul a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: -2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--gold); }
.nav .right { display: flex; align-items: center; gap: 14px; }
.nav .lang { font-size: 15px; color: var(--mute); white-space: nowrap; transition: opacity 0.35s ease; }
.nav .lang b { color: #fff; font-weight: 500; }
.menu-btn { display: none; border: 0; cursor: pointer; width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,0.1); color: #fff; place-items: center; }
/* Depois de rolar: o menu se fecha em direção ao centro; somem o nome e a língua */
@media (min-width: 861px) {
  .nav .brand { position: absolute; left: 28px; top: 50%; transform: translateY(-50%); }
  .nav .right { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); }
  .nav.ends-hidden .brand { opacity: 0; pointer-events: none; }
  /* o PT | EN continua no menu fechado, para trocar de idioma em qualquer ponto da página */
}
@media (max-width: 860px) {
  .mast-name { font-size: 22px; }
  .nav { top: 48px; }
  .nav ul { display: none; position: static; transform: none; }
  .nav .menu-btn { display: grid; }
  .nav.open { height: auto; flex-wrap: wrap; padding: 12px 12px 18px 22px; }
  .nav.open ul { display: flex; flex-direction: column; gap: 14px; width: 100%; order: 3; font-size: 17px; padding-top: 8px; }
}

.nav ul button { position: relative; display: inline-block; padding: 8px 12px; margin: 0 -10px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; border-radius: 999px;
                 box-shadow: 0 0 0 0 rgba(201,161,74,0); transition: box-shadow 0.35s var(--out), color 0.3s ease; }
.nav ul button:hover { color: #fff; }
.nav ul button[aria-expanded="true"] { color: #fff; box-shadow: 0 0 0 1.5px var(--gold); }

/* ---------- Os dois cartões que saem do menu ----------
   Cada cartão nasce em cima da palavra "Books", já no meio do giro, e viaja até o seu lugar terminando de virar.
   Enquanto está por baixo do menu fica escondido (recorte feito pelo script), então parece sair de DENTRO do menu.
   O movimento é controlado pelo script e pode ser invertido a qualquer momento: clicar de novo em "Books"
   no meio do caminho faz os cartões voltarem de onde estiverem (e vice-versa). */
.flip { position: fixed; z-index: 49; top: 128px; left: 0; display: flex; gap: 16px; pointer-events: none; visibility: hidden; }
.flip.on { pointer-events: auto; }
.fcard { display: block; width: 236px; transform-origin: 50% 0; }
.fcard:nth-child(1) { --tilt: -2.4deg; }
.fcard:nth-child(2) { --tilt: 2.4deg; }
.fin { display: block; }
.card3d { position: relative; display: block; transform-origin: 50% 50%; }
.face { display: block; border-radius: 18px; overflow: hidden; background: rgba(20, 17, 14, 0.28); border: 1px solid rgba(255, 255, 255, 0.22);
        backdrop-filter: blur(14px) saturate(170%); -webkit-backdrop-filter: blur(14px) saturate(170%);
        box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.55); transition: box-shadow 0.35s var(--out); }
.front { position: relative; padding: 20px 22px 22px; }
.front b { display: block; font-family: var(--serif); font-size: 30px; font-weight: 500; line-height: 1; color: #fff; }
.front small { display: block; margin-top: 8px; font-size: 13.5px; line-height: 1.4; color: rgba(255, 255, 255, 0.82); }
/* brilho dourado que passa pelo vidro quando termina de virar */
.front::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
                background: linear-gradient(105deg, transparent 35%, rgba(255, 226, 150, 0.55) 50%, transparent 65%) no-repeat; background-size: 260% 100%; background-position: 130% 0; }
.flip.shine .front::after { animation: sheen 0.9s ease forwards; }
.flip.shine .fcard:nth-child(2) .front::after { animation-delay: 0.14s; }
@keyframes sheen { 0% { opacity: 1; background-position: 130% 0; } 100% { opacity: 1; background-position: -30% 0; } }

/* depois de virados, ficam flutuando, cada um inclinado para um lado */
.flip.settled .fcard { animation: float 4.2s ease-in-out infinite; }
.flip.settled .fcard:nth-child(2) { animation-duration: 4.8s; animation-delay: 0.14s; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(var(--tilt)); } 50% { transform: translateY(-7px) rotate(calc(var(--tilt) * 0.35)); } }
.flip.settled .fcard:hover { animation-play-state: paused; }
.fcard:hover .front, .fcard:focus-visible .front { box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.55), 0 0 0 1.5px var(--gold); }
.fcard:focus-visible { outline: none; }

@media (max-width: 860px) {
  .flip { gap: 10px; }
  .fcard { width: calc(50vw - 30px); }
  /* os dois cartões com a mesma altura, mesmo quando um texto ocupa mais linhas (Dom, 15/11) */
  .fcard { display: flex; } .fin, .card3d, .face { flex: 1; display: flex; flex-direction: column; } .fin, .card3d { width: 100%; } .face { box-sizing: border-box; }
  .front { padding: 16px; }
  .front b { font-size: 24px; }
  .front small { font-size: 12.5px; }
}


/* ---------- Botão padrão do site (identidade: pílula + contorno dourado ao passar o mouse) ----------
   .btn = clara, para fundos escuros e imagens; .btn.dark = escura, para fundos creme */
/* mesmo comportamento do "Inscrever" original: o contorno nasce colado no botão e cresce em fade */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 26px; border: 0; border-radius: 999px; cursor: pointer;
       background: var(--cream); color: var(--ink); font: 600 16px/1 var(--sans); white-space: nowrap; text-shadow: none; --gap: rgba(11, 10, 9, 0.85);
       box-shadow: 0 0 0 0 var(--gap), 0 0 0 0 rgba(201, 161, 74, 0);
       transition: box-shadow 0.35s var(--out), background 0.35s ease, transform 0.2s ease; }
.btn:hover, .btn:focus-visible { outline: none; background: #fff; box-shadow: 0 0 0 3px var(--gap), 0 0 0 5px var(--gold); }
.btn:active { transform: scale(0.97); }
.btn.dark { background: #5a554f; color: #fff; --gap: var(--cream); }
.btn.dark:hover, .btn.dark:focus-visible { background: #4b4641; }

/* ---------- Barra de rolagem (estilo Lusion): só aparece enquanto rola ---------- */
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
.sbar { position: fixed; top: 50%; right: 14px; width: 6px; height: 180px; margin-top: -90px; z-index: 60; opacity: 0; transition: opacity 0.5s ease; pointer-events: none;
        border-radius: 3px; background: rgba(255, 255, 255, 0.3); mix-blend-mode: difference; }
.sbar.on, .sbar.drag { opacity: 1; pointer-events: auto; }
.sbar .thumb { position: absolute; left: 0; width: 6px; border-radius: 3px; background: #fff; cursor: grab; }
.sbar .thumb::before { content: ""; position: absolute; inset: 0 -6px; }
.sbar.drag .thumb { cursor: grabbing; }
@media (hover: none) { .sbar { display: none; } }


/* ---------- Rodapé ---------- */
footer { padding: 56px var(--pad) 48px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 28px; font-size: 14px; color: var(--mute); }
footer .brand { font-family: var(--serif); font-size: 26px; color: var(--cream); }
footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
footer nav a:hover { color: var(--cream); }
footer .bottom { grid-column: 1 / -1; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; }
footer .bottom b { color: var(--cream); font-weight: 500; }
@media (max-width: 860px) { footer { grid-template-columns: 1fr; } }

/* Entrada ao rolar */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 1s ease, transform 1s var(--out); }
.reveal.in { opacity: 1; transform: none; }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* página atual dentro de Books: bolinha dourada embaixo de "Books" */
.nav ul button.here { color: #fff; font-weight: 600; }
.nav ul button.here::before { content: ""; position: absolute; left: 50%; bottom: 0; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--gold); }

/* ---------- Newsletter ---------- */
.news { position: relative; padding: clamp(96px, 12vw, 160px) var(--pad); text-align: center; background: radial-gradient(60% 80% at 50% 100%, rgba(201,161,74,0.18), transparent 70%), var(--night); }
.news h2 { font-size: clamp(40px, 5.4vw, 76px); line-height: 1; }
.news p { margin: 18px auto 0; max-width: 46ch; font-size: 18px; line-height: 1.55; color: var(--mute); }
.news form { margin: 36px auto 0; display: flex; gap: 10px; max-width: 480px; }
.news input { flex: 1; min-width: 0; height: 54px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,0.06); color: #fff; }
.news input::placeholder { color: var(--mute); }
.news input { transition: border-color 0.3s ease; }
.news input:focus-visible { outline: none; border-color: transparent; box-shadow: 0 0 0 3px var(--night), 0 0 0 5px var(--gold); }
.news .ok { margin-top: 16px; font-size: 14px; color: var(--gold); min-height: 1.4em; }

/* Books aberto: a bolinha sai de "Books" (ficaria em cima do contorno dourado) e aparece no cartão da página em que estamos */
.nav ul button.here::before { transition: opacity 0.25s ease; }
.nav ul button.here[aria-expanded="true"]::before { opacity: 0; }
.fcard[aria-current] .front b { position: relative; display: inline-block; }
.fcard[aria-current] .front b::after { content: ""; position: absolute; left: calc(100% + 10px); top: 50%; width: 6px; height: 6px; margin-top: -2px; border-radius: 50%;
                                       background: var(--gold); box-shadow: 0 0 8px rgba(201, 161, 74, 0.7); }

/* PT | EN: o idioma atual em destaque, o outro como link */
.lang a, footer .bottom span a { color: inherit; text-decoration: none; transition: color 0.25s ease; }
.lang a:hover, .lang a:focus-visible, footer .bottom span a:hover, footer .bottom span a:focus-visible { color: var(--gold); outline: none; }

/* Redes sociais: título + botões com ícone (Sobre, Contato e posts do blog) */
.segue { text-align: center; }
.segue-t { margin: 0; font-family: var(--serif); font-size: clamp(28px, 2.6vw, 38px); font-weight: 500; line-height: 1.1; color: var(--cream); }
.icones { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }
.icone { --gap: #0b0a09; display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px 0 18px; border-radius: 999px; border: 1px solid rgba(246, 241, 233, 0.28);
         color: var(--cream); font: 500 15px/1 var(--sans); text-decoration: none; transition: box-shadow 0.25s ease, border-color 0.25s ease, color 0.25s ease; }
.icone svg { width: 20px; height: 20px; flex: none; }
.icone:hover, .icone:focus-visible { outline: none; border-color: transparent; box-shadow: 0 0 0 3px var(--gap), 0 0 0 5px var(--gold); }
.segue.claro .segue-t { color: var(--ink); }
.segue.claro .icone { --gap: var(--cream); color: var(--ink); border-color: rgba(26, 22, 19, 0.2); }

/* Idade real (no ano do planeta do personagem): brilha devagar; com o mouse (ou um toque) abre por cima a idade equivalente na Terra */
dd.idade { position: relative; display: inline-block; cursor: help; outline: none; }
/* números das idades todos da mesma altura (sem os algarismos "antigos" da fonte serifada); a fração (",5") menor, apoiada na mesma linha de base */
dd.idade .real { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }
dd.idade .real .fr { font-size: 0.68em; vertical-align: baseline; letter-spacing: 0.01em; }
dd.idade .real { display: inline-block; animation: idade-brilha 2.4s ease-in-out infinite; }
/* pulso bem visível: a cor esquenta para o dourado, o brilho cresce e o número respira */
@keyframes idade-brilha {
  0%, 100% { color: inherit; text-shadow: 0 0 0 rgba(255, 220, 150, 0); transform: scale(1); }
  50% { color: #ffe3a3; text-shadow: 0 0 8px rgba(255, 225, 160, 1), 0 0 20px rgba(230, 180, 80, 0.9), 0 0 38px rgba(201, 162, 75, 0.7); transform: scale(1.06); }
}
dd.idade .eq { position: absolute; z-index: 30; left: 50%; bottom: calc(100% + 12px); display: flex; align-items: center; gap: 10px; padding: 11px 20px; border-radius: 999px;
               background: var(--cream, #f6f1e9); color: var(--ink, #1a1613); box-shadow: 0 0 0 1px rgba(201, 162, 75, 0.6), 0 14px 30px -10px rgba(0, 0, 0, 0.55);
               font-family: var(--sans, "Inter", sans-serif); font-style: normal; font-size: 15px; line-height: 1; letter-spacing: 0; white-space: nowrap; text-shadow: none;
               opacity: 0; pointer-events: none; transform: translate(-50%, 6px); transition: opacity 0.25s ease, transform 0.25s ease; }
dd.idade .eq b { font-size: 10.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: #8a6a24; transform: translateY(0.11em); }   /* maiúsculas pequenas ficam um pouco altas: desce para centralizar com o número */
dd.idade .eq::after { content: ""; position: absolute; left: 50%; top: 100%; width: 10px; height: 10px; background: inherit; transform: translate(-50%, -5px) rotate(45deg); box-shadow: 1px 1px 0 0 rgba(201, 162, 75, 0.6); }
dd.idade:hover .eq, dd.idade:focus .eq { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 600px) { dd.idade .eq { left: 0; transform: translate(0, 6px); } dd.idade:hover .eq, dd.idade:focus .eq { transform: none; } dd.idade .eq::after { left: 28px; } }
@media (prefers-reduced-motion: reduce) { dd.idade .real { animation: none; text-shadow: 0 0 10px rgba(255, 236, 190, 0.7); } }
/* sigla com o nome inteiro num balão ao passar o mouse (ex.: C.O. = Coeficiente de Desintegração), no estilo do balão da idade */
.sigla { position: relative; display: inline-block; cursor: help; outline: none; text-decoration: underline dotted; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sigla .sig-nome { position: absolute; z-index: 30; left: 50%; bottom: calc(100% + 12px); padding: 10px 18px; border-radius: 999px;
                   background: var(--cream, #f6f1e9); color: #8a6a24; box-shadow: 0 0 0 1px rgba(201, 162, 75, 0.6), 0 14px 30px -10px rgba(0, 0, 0, 0.55);
                   font-family: var(--sans, "Inter", sans-serif); font-style: normal; font-size: 10.5px; font-weight: 600; line-height: 1; letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap; text-shadow: none;
                   opacity: 0; pointer-events: none; transform: translate(-50%, 6px); transition: opacity 0.25s ease, transform 0.25s ease; }
.sigla .sig-nome::after { content: ""; position: absolute; left: 50%; top: 100%; width: 10px; height: 10px; background: inherit; transform: translate(-50%, -5px) rotate(45deg); box-shadow: 1px 1px 0 0 rgba(201, 162, 75, 0.6); }
.sigla:hover .sig-nome, .sigla:focus .sig-nome { opacity: 1; transform: translate(-50%, 0); }
/* no cabeçalho da tabela, o balão abre para baixo (em cima ele seria cortado pela borda da tabela) */
thead .sigla .sig-nome { bottom: auto; top: calc(100% + 12px); transform: translate(-50%, -6px); }
thead .sigla .sig-nome::after { top: auto; bottom: 100%; transform: translate(-50%, 5px) rotate(45deg); box-shadow: -1px -1px 0 0 rgba(201, 162, 75, 0.6); }
thead th:has(.sigla) { z-index: 3; }
/* na última coluna o balão se alinha pela direita, para não passar da borda da tabela */
thead th:last-child .sigla .sig-nome { left: auto; right: -10px; transform: translate(0, -6px); } thead th:last-child .sigla:hover .sig-nome, thead th:last-child .sigla:focus .sig-nome { transform: none; } thead th:last-child .sigla .sig-nome::after { left: auto; right: 18px; transform: translate(0, 5px) rotate(45deg); }
tbody th:has(.sigla:hover), tbody th:has(.sigla:focus) { z-index: 4; }
/* na primeira coluna (tabela com os dados na lateral) o balão abre para a direita, por cima dos números */
tbody th .sigla .sig-nome { left: 0; transform: translate(0, 6px); } tbody th .sigla:hover .sig-nome, tbody th .sigla:focus .sig-nome { transform: none; } tbody th .sigla .sig-nome::after { left: 22px; }
@media (max-width: 600px) { .sigla .sig-nome { left: 0; transform: translate(0, 6px); } .sigla:hover .sig-nome, .sigla:focus .sig-nome { transform: none; } .sigla .sig-nome::after { left: 22px; } }
