@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800&family=Alegreya:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* ========= RESET ========= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* "clip" e não "hidden": hidden transforma o html em contêiner de rolagem
     e quebra o position:sticky do header (o cabeçalho parava de acompanhar
     a rolagem no celular). clip corta o excesso sem esse efeito colateral. */
  overflow-x: clip;
  /* Remove o retângulo azul que o navegador do celular pinta por cima do
     que é tocado, antes de abrir o link. */
  -webkit-tap-highlight-color: transparent;
}

/* Alguns navegadores ignoram a regra herdada do html, então reforça nos
   elementos que recebem toque. */
a,
button,
input,
textarea,
select,
label,
summary,
[role="button"],
[tabindex] {
  -webkit-tap-highlight-color: transparent;
}

/* Sem o realce padrão, o toque ficaria sem retorno nenhum — este apagão
   sutil avisa que o toque foi registrado, no lugar do azul do navegador. */
@media (hover: none) {
  a:active,
  button:active,
  .btn:active,
  .book-card:active,
  .contact-channel:active {
    opacity: 0.72;
    transition: opacity 0.08s ease;
  }
}

body {
  font-family: 'Alegreya', Georgia, serif;
  color: #16232f;
  background: #f6f2e7;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ========= PROTEÇÃO DE IMAGENS =========
   Dificulta salvar/arrastar as capas e artes do site. É um impedimento
   contra o usuário comum — quem sabe abrir as ferramentas de
   desenvolvedor ou acessar a URL do arquivo direto ainda consegue
   baixar; proteção real só com marca d'água ou servidor com token. */
img,
video {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* Transparente ao mouse: o clique/hover atravessa para o link ou card
     que envolve a imagem, e o menu do botão direito não pega a imagem. */
  pointer-events: none;
}

/* ========= PALETA — navy & dourado (identidade Guecas House) ========= */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f2e7;
  --bg-dark: #10283d;
  --primary: #1b3a57;
  --primary-dark: #10283d;
  --primary-soft: #3e6690;
  --gold: #d0bb6c;
  --gold-light: #e6d6a8;
  --gold-deep: #a88a3f;
  --accent: #d0bb6c;
  --text: #16232f;
  --muted: #6b7280;
  --title: #1b3a57;
  --border-soft: #e5e7eb;
  --radius-lg: 16px;
  --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.18);
}

/* ========= LAYOUT ========= */
.wrapper {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========= HEADER ========= */

header {
  background: var(--primary-dark);
  /* Sem backdrop-filter de propósito: ele faz o header virar o contêiner de
     referência dos elementos position:fixed dentro dele — era por isso que o
     menu mobile abria no topo do documento em vez de na tela atual. O fundo
     é opaco, então o blur não fazia diferença visual. */
  border-bottom: 1px solid rgba(208, 187, 108, 0.22);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  transition: background 0.3s ease, border-bottom 0.3s ease;
}

header.light-header {
  background: rgba(246, 242, 231, 0.95);
  border-bottom: 1px solid rgba(27, 58, 87, 0.12);
}

header.light-header .brand,
header.light-header .brand span {
  color: #16232f;
}

/* Só no desktop: o menu mobile é um painel sempre escuro (off-canvas),
   então os links dele não podem escurecer junto com o header claro. */
@media (min-width: 861px) {
  header.light-header .nav-links a {
    color: #16232f;
  }

  header.light-header .nav-links a:hover {
    color: var(--primary-soft);
  }

  header.light-header .nav-links a.active {
    color: var(--primary-soft);
  }
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 1.1rem;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffffff;
  flex-shrink: 0;
  min-width: 0;
  position: relative;
  transition: transform 0.3s ease;
}

.brand span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand:hover {
  transform: scale(1.05);
}

.brand-logo {
  width: 32px;
  height: 32px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
  color: var(--gold);
  transition: transform 0.3s ease;
}

.brand-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.brand-logo-dark {
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(208, 187, 108, 0.45));
}

.brand-logo-light {
  opacity: 0;
}

header.light-header .brand-logo-dark {
  opacity: 0;
}

header.light-header .brand-logo-light {
  opacity: 1;
}

/* Container de partículas */
.brand-logo::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.brand span {
  font-weight: 700;
  color: #ffffff;
}

/* Nav deve ficar à direita com espaçamento automático */
.navbar nav {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.nav-close {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: #ffffff;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: #ffffff;
}

.nav-links a.active::after {
  width: 100%;
}

/* ========= BOTÕES AUTH ========= */

.nav-auth {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin-left: auto;
}

.nav-auth-login,
.nav-auth-signup {
  padding: 0.65rem 1.2rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.nav-auth-login {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.nav-auth-login:hover {
  border-color: var(--primary);
  background: rgba(27, 58, 87, 0.05);
  transform: translateY(-1px);
}

.nav-auth-signup {
  background: linear-gradient(90deg, var(--primary), var(--primary-soft));
  color: #ffffff;
  box-shadow: 0 5px 10px rgba(16, 40, 61, 0.5);
}

.nav-auth-signup:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(16, 40, 61, 0.65);
}

/* Botão de busca na nav - apenas ícone */
.nav-search-btn {
  background: transparent;
  border: none;
  border-radius: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: color 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}

.nav-search-btn:hover {
  color: #ffffff;
}

.nav-search-btn:active {
  transform: scale(0.95);
}

/* Adaptar cor da lupa conforme background da navbar */
header.light-header .nav-search-btn {
  color: rgba(22, 35, 47, 0.65);
}

header.light-header .nav-search-btn:hover {
  color: var(--primary-soft);
}

/* Organiza a lupa no final do menu, separada por uma linha sutil */
.nav-links li:first-of-type {
  order: 5;
  margin-left: 0.4rem !important;
  margin-right: 0 !important;
  padding-left: 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

header.light-header .nav-links li:first-of-type {
  border-left-color: rgba(22, 35, 47, 0.14);
}

@media (max-width: 860px) {
  .nav-menu-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
  }

  /* Ficam acima do canvas de partículas do menu. O .nav-close é
     posicionado por conta própria (absolute) mais abaixo — por isso só o
     z-index aqui, sem mexer no position dele. */
  .nav-links > li {
    position: relative;
    z-index: 1;
  }

  .nav-links .nav-close {
    z-index: 2;
  }

  .nav-links li:first-of-type {
    order: 0;
    margin-left: 0 !important;
    padding-left: 0;
    border-left: none;
    padding-bottom: 1.2rem;
    margin-bottom: 0.4rem;
    border-bottom: 1px solid rgba(208, 187, 108, 0.3);
    width: 100%;
  }

  /* Lupa dourada dentro do painel, que é sempre escuro — inclusive nas
     páginas de header claro, onde a regra global deixaria ela escura. */
  .nav-links .nav-search-btn,
  header.light-header .nav-links .nav-search-btn {
    color: var(--gold);
    width: 44px;
    height: 44px;
  }
}

/* menu mobile */

.nav-toggle {
  display: none;
  cursor: pointer;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
}

/* ========= BORDA NEON ESTÁTICA ========= */
.neon-border {
  position: relative;
  overflow: visible;
}

.neon-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    135deg,
    #1b3a57 0%,
    #d0bb6c 50%,
    #1b3a57 100%
  );
  border-radius: inherit;
  z-index: -1;
  opacity: 1;
  box-shadow:
    0 0 20px rgba(208, 187, 108, 0.5),
    0 0 40px rgba(27, 58, 87, 0.35);
}

.neon-border::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg, #ffffff);
  border-radius: inherit;
  z-index: -1;
}

.neon-border-dark::after {
  background: linear-gradient(135deg, rgba(16, 40, 61, 0.98), rgba(27, 58, 87, 0.98));
}

/* ========= BOTÕES ========= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.4rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

/* Borda em gradiente via duplo background (respeita border-radius sem cortar quina,
   diferente da técnica de mask usada antes) */
.btn-primary {
  --btn-fill: linear-gradient(135deg, var(--primary), var(--primary-soft));
  --btn-border: linear-gradient(90deg, #e6d6a8, #d0bb6c, #a88a3f, #d0bb6c, #e6d6a8);
  position: relative;
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: var(--btn-fill) padding-box, var(--btn-border) border-box;
  background-size: 100% 100%, 300% 100%;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 40, 61, 0.35);
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: btn-border-slide 6s linear infinite;
}

@keyframes btn-border-slide {
  0% { background-position: 0 0, 0% 0; }
  100% { background-position: 0 0, 300% 0; }
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 40, 61, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Destaque extra para os botões de compra */
.btn-primary.btn-cta {
  box-shadow: 0 4px 10px rgba(208, 187, 108, 0.3);
  animation: btn-border-slide 6s linear infinite, btn-cta-pulse 2.5s ease-in-out infinite;
}

@keyframes btn-cta-pulse {
  0%, 100% { box-shadow: 0 4px 10px rgba(208, 187, 108, 0.3); }
  50% { box-shadow: 0 5px 14px rgba(208, 187, 108, 0.42); }
}

.btn-primary.btn-cta:hover {
  transform: translateY(-2px) scale(1.02);
}

/* Padrão: para uso sobre fundos escuros (heros), como já era no restante do site */
.btn-outline {
  --btn-outline-fill: linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.02));
  --btn-border: linear-gradient(90deg, rgba(230, 214, 168, 0.65), rgba(208, 187, 108, 0.85), rgba(168, 138, 63, 0.65), rgba(208, 187, 108, 0.85), rgba(230, 214, 168, 0.65));
  position: relative;
  color: #e5e7eb;
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: var(--btn-outline-fill) padding-box, var(--btn-border) border-box;
  background-size: 100% 100%, 300% 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease, color 0.2s ease;
  animation: btn-border-slide 6s linear infinite;
}

.btn-outline:hover {
  --btn-outline-fill: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1));
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(208, 187, 108, 0.3), 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Variante: para uso sobre fundos claros (ex: card de fanfic) */
.btn-outline.on-light {
  --btn-outline-fill: linear-gradient(#ffffff, #ffffff);
  color: var(--primary);
}

.btn-outline.on-light:hover {
  --btn-outline-fill: linear-gradient(rgba(27, 58, 87, 0.05), rgba(27, 58, 87, 0.05));
  color: var(--primary);
  box-shadow: 0 0 16px rgba(208, 187, 108, 0.22), 0 6px 16px rgba(27, 58, 87, 0.15);
}

/* ========= SELO "LANÇAMENTO" ========= */
.book-badge {
  position: absolute;
  bottom: -10px;
  right: -8px;
  z-index: 6;
  background: linear-gradient(135deg, #e6d6a8 0%, #a88a3f 100%);
  color: #16232f;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  text-shadow: none;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  transform: rotate(-4deg);
  pointer-events: none;
  white-space: nowrap;
}

/* Variante verde "Em breve" — títulos ainda sem página própria */
.book-badge.is-free {
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* ========= LINHA "PRATELEIRA" ========= */
.shelf-divider {
  height: 3px;
  border-radius: 999px;
  margin: 2.75rem auto 0;
  max-width: 1120px;
  background: linear-gradient(
    90deg,
    transparent,
    #d0bb6c 50%,
    transparent
  );
  box-shadow:
    0 0 16px rgba(208, 187, 108, 0.5);
}

/* ========= SEÇÕES GENÉRICAS ========= */

.section {
  padding: 4rem 0;
  background: var(--bg);
  position: relative;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    #d0bb6c 50%,
    transparent
  );
  box-shadow:
    0 0 20px rgba(208, 187, 108, 0.55);
}

.section-alt {
  padding: 4rem 0;
  background: var(--bg-soft);
}

.section-header {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 2.5rem;
}

.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 600;
  background: linear-gradient(90deg, var(--primary), var(--primary-soft));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.8rem;
  display: inline-block;
}

.section-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 2.1rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text);
  position: relative;
  display: inline-block;
  padding-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  border-radius: 999px;
}

.section-subtitle {
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 36rem;
  margin: 1.5rem auto 0;
}

/* ========= PÁGINA HERO ========= */

.page-hero {
  padding: 4rem 0 2rem;
  background: radial-gradient(circle at top, #f3e9d2, #f8f3e6, #fbf8f0);
  text-align: center;
  position: relative;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    #d0bb6c 50%,
    transparent
  );
  box-shadow:
    0 0 20px rgba(208, 187, 108, 0.55);
}

.page-hero h1 {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 2.1rem;
  margin-bottom: 0.75rem;
}

.page-hero p {
  max-width: 32rem;
  margin: 0 auto;
  color: var(--muted);
}

.text-block {
  max-width: 720px;
  margin: 0 auto;
  font-size: 0.98rem;
  color: var(--text);
}

.text-block p + p {
  margin-top: 1rem;
}

/* ========= ANIMAÇÕES ========= */

@keyframes fadeIn {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* ========= FOOTER ========= */

footer {
  padding: 2rem 0 1.5rem;
  background: var(--primary-dark);
  color: #e5e7eb;
  margin-top: auto;
  width: 100%;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    #d0bb6c 50%,
    transparent
  );
  box-shadow:
    0 0 20px rgba(208, 187, 108, 0.55);
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.footer-brand span {
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
}

.footer-links a:hover {
  color: #e5e7eb;
}

.footer-social {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: flex-end;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  opacity: 0.7;
}

.social-icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.social-icon:hover {
  opacity: 1;
  transform: translateY(-3px) scale(1.15);
}

.social-icon.instagram {
  filter: drop-shadow(0 2px 8px rgba(217, 50, 121, 0.25));
}

.social-icon.instagram:hover {
  filter: drop-shadow(0 4px 16px rgba(217, 50, 121, 0.4));
}

.social-icon.kiwify img {
  width: auto;
  height: 24px;
  max-width: 96px;
}

.social-icon.kiwify {
  filter: drop-shadow(0 2px 8px rgba(23, 161, 92, 0.25));
}

.social-icon.kiwify:hover {
  filter: drop-shadow(0 4px 16px rgba(23, 161, 92, 0.4));
}

/* ========= RESPONSIVO ========= */

@media (max-width: 900px) {
  /* Responsivo para header, footer e componentes gerais */
}

/* Congela a página com o menu aberto. O position:fixed é necessário porque
   no celular só overflow:hidden não segura o toque de rolagem; o "top"
   negativo é aplicado pelo script.js pra manter a posição de leitura. */
body.no-scroll {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* ========= MENU MOBILE ========= */
@media (max-width: 860px) {
  .navbar {
    height: 56px;
  }

  /* A marca não pode empurrar o botão hambúrguer pra fora da tela */
  .brand {
    flex-shrink: 1;
    min-width: 0;
    max-width: calc(100% - 60px);
    font-size: 1rem;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: 38px;
    height: 38px;
    padding: 0;
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
  }

  .nav-toggle:focus-visible {
    outline: 2px solid rgba(208, 187, 108, 0.7);
    outline-offset: 2px;
  }

  /* Ícone baseado no desenho enviado (3 barras arredondadas) — reimplementado
     em CSS/SVG puro (sem a lib de animação do arquivo original) pra reagir de
     verdade ao clique de abrir/fechar, com as cores do site. */
  .nav-toggle-icon {
    width: 19px;
    height: 18px;
    overflow: visible;
  }

  .nav-toggle-bar {
    fill: rgba(255, 255, 255, 0.85);
    transition: transform 0.25s ease, opacity 0.2s ease, width 0.2s ease, fill 0.2s ease;
    transform-box: fill-box;
    transform-origin: center;
  }

  .nav-toggle-bar.bar-mid {
    width: 13px;
  }

  .nav-toggle:hover .nav-toggle-bar.bar-mid {
    width: 19px;
  }

  .nav-toggle.open .nav-toggle-bar.bar-top {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle.open .nav-toggle-bar.bar-mid {
    opacity: 0;
  }

  .nav-toggle.open .nav-toggle-bar.bar-bottom {
    transform: translateY(-8px) rotate(-45deg);
  }

  header.light-header .nav-toggle-bar {
    fill: rgba(22, 35, 47, 0.75);
  }

  /* Menu ocupa a tela inteira: nada do site aparece por fora, então não há
     como tocar em algo atrás sem querer — só o X fecha. */
  .nav-links {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* respeita a barra de endereço do navegador no celular */
    background: var(--primary-dark);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 4.5rem 2.2rem 2rem;
    gap: 1.8rem;
    list-style: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    z-index: 1000;
    /* Fechado fica invisível de verdade: senão, ao dar zoom com os dedos no
       celular dava pra enxergar o painel parado fora da tela, à direita.
       O visibility só volta a "hidden" depois que a animação de sair termina. */
    visibility: hidden;
    transition: transform 0.28s ease, visibility 0s linear 0.28s;
  }

  .nav-links.open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.28s ease, visibility 0s linear 0s;
  }

  /* Linha dourada no topo, como assinatura da marca */
  .nav-links::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d0bb6c 50%, transparent);
    box-shadow: 0 0 20px rgba(208, 187, 108, 0.55);
  }

  /* Botão de fechar no mesmo lugar do hambúrguer, pra não confundir */
  .nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0.6rem;
    right: 1.1rem;
    left: auto;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: var(--gold);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    z-index: 2;
  }

  .nav-links li:first-of-type {
    margin-top: 0;
  }

  .nav-links li {
    margin: 0;
    width: 100%;
  }

  .nav-links a {
    color: #f3f0e6;
    font-size: 1.25rem;
    font-weight: 500;
    display: inline-block;
    /* Área de toque confortável no dedo */
    padding: 0.55rem 0;
  }

  .nav-links a:hover,
  .nav-links a.active {
    color: var(--gold);
  }

  .nav-links a::after {
    background: var(--gold);
  }

  .nav-auth {
    margin-top: auto;
    padding-top: 2rem;
    width: 100%;
    border-top: 1px solid rgba(148, 163, 184, 0.3);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-left: 0;
  }

  .nav-auth-login,
  .nav-auth-signup {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.55rem 0.9rem;
    border-radius: 12px;
    font-size: 0.95rem;
    text-align: center;
  }
}

/* Telas bem estreitas: esconde o subtítulo "Editora Digital" pra sobrar
   espaço garantido pro botão hambúrguer */
@media (max-width: 420px) {
  .brand span:last-child {
    display: none;
  }
}

/* ========= MODAL DE BUSCA NA NAV ========= */
.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16, 40, 61, 0.92);
  backdrop-filter: blur(12px);
  z-index: 9998;
  animation: fadeIn 0.25s ease;
  overflow: hidden;
}

.search-modal.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
}

.search-modal-content {
  width: 100%;
  max-width: 550px;
  margin: 0 1rem;
  animation: slideDown 0.25s ease;
  position: relative;
  z-index: 10;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: #ffffff;
  border: 2px solid rgba(27, 58, 87, 0.2);
  border-radius: 999px;
  padding: 0.9rem 1.3rem;
  box-shadow: 0 12px 30px rgba(16, 40, 61, 0.35);
  transition: all 0.2s ease;
  margin-bottom: 1.5rem;
}

.search-input-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--primary-soft);
  opacity: 0.7;
}

.search-input-wrapper:focus-within {
  border-color: var(--primary-soft);
  box-shadow: 0 12px 30px rgba(16, 40, 61, 0.35), 0 0 0 4px rgba(62, 102, 144, 0.15);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0 0.5rem;
  font-size: 1rem;
  color: var(--text);
  outline: none;
  font-family: inherit;
}

.search-input::placeholder {
  color: #b0b9c8;
}

.search-modal-close {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #6b7280;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s ease;
  display: none;
}

.search-modal-close:hover {
  color: var(--text);
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  z-index: 11;
}

.nav-search-result {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.8rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.nav-search-result:hover {
  background: rgba(208, 187, 108, 0.1);
  border-color: rgba(208, 187, 108, 0.3);
  transform: translateX(2px);
}

.nav-search-result-image {
  width: 50px;
  height: 70px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.nav-search-result-content {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-width: 0;
}

.nav-search-result-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.2;
}

.nav-search-result-tagline {
  font-size: 0.85rem;
  color: #b0b9c8;
  line-height: 1.1;
}

.nav-search-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: #b0b9c8;
  font-size: 0.95rem;
}

.search-result-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.3rem 0;
  word-break: break-word;
}

.search-result-tagline {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* Responsivo */
@media (max-width: 768px) {
  .search-modal.active {
    padding-top: 80px;
  }

  .search-input-wrapper {
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
  }

  .search-input {
    font-size: 0.95rem;
  }

  .search-results {
    max-height: 50vh;
  }

  .nav-search-result {
    padding: 0.75rem;
  }

  .nav-search-result-image {
    width: 45px;
    height: 60px;
  }

  .nav-search-result-title {
    font-size: 0.9rem;
  }

  .nav-search-result-tagline {
    font-size: 0.8rem;
  }
}

/* Símbolos flutuantes do modal de busca — ambiente, sempre atrás do campo */
.floating-symbols {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.floating-symbol {
  position: absolute;
  width: 2.75rem;
  height: 2.75rem;
  opacity: 0.16;
  animation: float linear infinite;
  will-change: transform;
  color: #d0bb6c;
  filter: drop-shadow(0 0 10px rgba(208, 187, 108, 0.35));
}

.floating-symbol svg {
  width: 100%;
  height: 100%;
  display: block;
}

.floating-symbol.symbol-1 {
  animation: float-1 20s linear infinite;
}

.floating-symbol.symbol-2 {
  animation: float-2 25s linear infinite;
}

.floating-symbol.symbol-3 {
  animation: float-3 30s linear infinite;
}

.floating-symbol.symbol-4 {
  animation: float-4 22s linear infinite;
}

.floating-symbol.symbol-5 {
  animation: float-5 28s linear infinite;
}

@keyframes float-1 {
  from {
    transform: translateY(100vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.16;
  }
  90% {
    opacity: 0.16;
  }
  to {
    transform: translateY(-100vh) translateX(100px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes float-2 {
  from {
    transform: translateY(100vh) translateX(50px) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.16;
  }
  90% {
    opacity: 0.16;
  }
  to {
    transform: translateY(-100vh) translateX(-80px) rotate(-360deg);
    opacity: 0;
  }
}

@keyframes float-3 {
  from {
    transform: translateY(100vh) translateX(-50px) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.16;
  }
  90% {
    opacity: 0.16;
  }
  to {
    transform: translateY(-100vh) translateX(120px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes float-4 {
  from {
    transform: translateY(100vh) translateX(-100px) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.16;
  }
  90% {
    opacity: 0.16;
  }
  to {
    transform: translateY(-100vh) translateX(-120px) rotate(-360deg);
    opacity: 0;
  }
}

@keyframes float-5 {
  from {
    transform: translateY(100vh) translateX(100px) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.16;
  }
  90% {
    opacity: 0.16;
  }
  to {
    transform: translateY(-100vh) translateX(0px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* NAV AUTH (desktop) */
.nav-auth-login {
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: #e5e7eb;
  background: transparent;
}

.nav-auth-login:hover {
  transform: translateY(-1px);
}

.nav-auth-signup {
  background: linear-gradient(90deg, var(--primary), var(--primary-soft));
  color: #f9fafb;
  box-shadow: 0 10px 30px rgba(16, 40, 61, 0.4);
}

.nav-auth-signup:hover {
  transform: translateY(-1px);
}

/* ========= ANIMAÇÃO DE PARTÍCULAS DO LOGO ========= */
@keyframes particle-float {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) rotate(var(--rotate));
    opacity: 0;
  }
}

.brand-particle {
  position: absolute;
  width: 8px;
  height: 10px;
  background: var(--particle-color);
  border-radius: 2px;
  pointer-events: none;
  animation: particle-float 1.5s ease-out forwards;
  z-index: 200;
}
