:root {
  --bg: #07080c;
  --bg-soft: #10131b;
  --text: #f4f4f5;
  --muted: #a8adba;
  --line: rgba(255,255,255,.12);
  --accent: #d4a11f;
  --accent-dark: #8b6410;
  --shadow: 0 24px 80px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background:
    linear-gradient(rgba(5,8,15,.68), rgba(5,8,15,.78)),
    radial-gradient(circle at 15% 20%, rgba(212,161,31,.10), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(145,0,20,.10), transparent 36%),
    radial-gradient(circle at 50% 80%, rgba(255,255,255,.04), transparent 45%),
    url("images/fundo.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: 92px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7vw;
  background: rgba(7,8,12,.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 78px;
  width: auto;
  display: block;
  object-fit: contain;
  transition: transform .25s ease, opacity .25s ease;
}

.logo img:hover {
  transform: scale(1.04);
  opacity: .96;
}

.nav { display: flex; gap: 26px; color: var(--muted); font-size: 14px; }
.nav a:hover { color: var(--text); }
.menu-toggle { display: none; background: none; color: var(--text); border: 0; font-size: 28px; cursor: pointer; }

.section { padding: 124px 7vw; }
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 46px;
  align-items: center;
  padding-top: 160px;
}

.eyebrow {
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 12px;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  font-size: clamp(48px, 8vw, 104px);
  line-height: .92;
  letter-spacing: -5px;
  margin-bottom: 26px;
}
h2 { font-size: clamp(34px, 4vw, 56px); line-height: 1; letter-spacing: -2px; }
h3 { color: var(--muted); font-size: 22px; }
.tagline { font-size: clamp(21px, 2.4vw, 34px); max-width: 820px; color: #dfe1e8; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.btn {
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid var(--line);
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #080808; }
.btn.secondary { background: rgba(255,255,255,.04); }
.btn:hover { transform: translateY(-2px); transition: .2s ease; }

.hero-card, .info-card, .author-photo, .book-visuals, .gallery-item {
  background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.hero-card { padding: 36px; min-height: 360px; display: flex; flex-direction: column; justify-content: end; }
.card-label { color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .18em; font-size: 12px; }
.hero-card h2 { margin: 16px 0; }

.two-columns, .book-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

/* FOTO DO AUTOR — MOLDURA DO MESMO TAMANHO DA IMAGEM E CENTRALIZADA */
.author-photo {
  width: 512px;
  height: 769px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(0,0,0,.42);
  display: flex;
  justify-content: center;
  align-items: center;
}

.author-photo img {
  width: 512px;
  height: 769px;
  display: block;
  object-fit: cover;
  object-position: center top;
}

/* SEÇÃO LIVRO — CAPA À ESQUERDA E LOGO DO LIVRO À DIREITA */
.book-section {
  background: rgba(255,255,255,.025);
  border-block: 1px solid var(--line);
}

.book-visuals {
  display: grid;
  grid-template-columns: 48% 52%;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 26px;
  min-height: 620px;
}

.book-cover,
.book-logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.book-cover img {
  width: 100%;
  max-width: 300px;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 14px;
  filter: drop-shadow(0 28px 42px rgba(0,0,0,.55));
  transition: transform .3s ease;
}

.book-logo img {
  width: 100%;
  max-width: 390px;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 20px 34px rgba(0,0,0,.48));
  transition: transform .3s ease;
}

.book-cover img:hover,
.book-logo img:hover {
  transform: scale(1.025);
}


.cards-grid, .gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 30px;
}
.info-card { padding: 26px; }
.info-card h3 { color: var(--text); margin-bottom: 12px; }
.info-card p { color: var(--muted); }
.gallery-item { min-height: 220px; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 20px; }

.contact-section { text-align: center; max-width: 900px; margin: 0 auto; }
.contact-links { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.contact-links a { padding: 13px 20px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.contact-links a:hover { color: var(--text); border-color: var(--accent); }

.footer { padding: 34px 7vw; border-top: 1px solid var(--line); color: var(--muted); text-align: center; }

@media (max-width: 900px) {
  .site-header { height: 78px; }
  .logo img { height: 62px; }
  .menu-toggle { display: block; }
  .nav {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    padding: 24px 7vw;
    background: rgba(7,8,12,.96);
    border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .hero, .two-columns, .book-section { grid-template-columns: 1fr; }
  .book-visuals { min-height: auto; grid-template-columns: 42% 58%; gap: 12px; padding: 22px; }
  .book-cover img { max-width: 230px; }
  .book-logo img { max-width: 300px; }
  .cards-grid, .gallery-grid { grid-template-columns: 1fr; }
  h1 { letter-spacing: -3px; }
  .section { padding: 96px 6vw; }
  .hero { padding-top: 130px; }
  .author-photo { width: 380px; height: 571px; }
  .author-photo img { width: 380px; height: 571px; }
}

@media (max-width: 520px) {
  .author-photo { width: 320px; height: 481px; max-width: 100%; }
  .author-photo img { width: 320px; height: 481px; max-width: 100%; }
  .book-visuals { grid-template-columns: 1fr; padding: 20px; gap: 24px; }
  .book-cover img { max-width: 230px; }
  .book-logo img { max-width: 280px; }
}


/* FUNDO SOMBRIO / INVESTIGATIVO */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 120px,
      rgba(255,255,255,.018) 121px,
      transparent 122px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 120px,
      rgba(255,255,255,.010) 121px,
      transparent 122px
    );
  pointer-events: none;
  z-index: -1;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at center, transparent 42%, rgba(0,0,0,.36) 100%),
    linear-gradient(120deg, rgba(0,0,0,.20), rgba(212,161,31,.035), rgba(90,0,12,.08));
  pointer-events: none;
  z-index: -1;
}

.site-header {
  background: rgba(4,7,13,.82);
  border-bottom: 1px solid rgba(212,161,31,.18);
}

.hero-card,
.info-card,
.author-photo,
.book-visuals,
.gallery-item {
  background:
    linear-gradient(145deg, rgba(7,10,18,.72), rgba(7,10,18,.48)),
    linear-gradient(145deg, rgba(212,161,31,.08), rgba(255,255,255,.02));
  border: 1px solid rgba(212,161,31,.16);
}

.book-section {
  background: rgba(2,4,8,.38);
  border-block: 1px solid rgba(212,161,31,.13);
}


/* TEXTOS JUSTIFICADOS NA PÁGINA PERSONAGENS */
#personagens .info-card p {
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.75;
  hyphens: auto;
}

#personagens .info-card {
  display: flex;
  flex-direction: column;
}


/* IMAGENS DA GALERIA */
.gallery-item {
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  max-width: 260px;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 18px 32px rgba(0,0,0,.45));
  transition: transform .3s ease, opacity .3s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
  opacity: .96;
}

@media (max-width: 900px) {
  .gallery-item img {
    max-width: 300px;
  }
}

@media (max-width: 520px) {
  .gallery-item img {
    max-width: 240px;
  }
}


/* IMAGEM DO INSTAGRAM NA SEÇÃO CONTATO */
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 150px;
  min-height: 150px;
  padding: 18px;
}

.contact-card img {
  width: 82px;
  height: 82px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(0,0,0,.45));
  transition: transform .3s ease, opacity .3s ease;
}

.contact-card span {
  font-weight: 800;
  letter-spacing: .04em;
}

.contact-card:hover img {
  transform: scale(1.08);
  opacity: .96;
}

@media (max-width: 520px) {
  .contact-card {
    width: 100%;
    min-height: 130px;
  }

  .contact-card img {
    width: 74px;
    height: 74px;
  }
}


/* IMAGEM DO E-MAIL NA SEÇÃO CONTATO */
.email-card img {
  width: 86px;
  height: 86px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(0,0,0,.45));
  transition: transform .3s ease, opacity .3s ease;
}

.email-card:hover img {
  transform: scale(1.08);
  opacity: .96;
}


/* IMAGEM DO TIKTOK NA SEÇÃO CONTATO */
.tiktok-card img {
  width: 86px;
  height: 86px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(0,0,0,.45));
  transition: transform .3s ease, opacity .3s ease;
}

.tiktok-card:hover img {
  transform: scale(1.08);
  opacity: .96;
}


/* ESTRUTURA MULTIPÁGINAS E MENUS */
.page-section {
  min-height: 100vh;
  padding-top: 160px;
}

.menu-dropdown,
.submenu-dropdown {
  position: relative;
}

.dropdown-toggle::after,
.submenu-toggle::after {
  content: " ▾";
  color: var(--accent);
  font-size: 12px;
}

.dropdown-menu,
.submenu-menu {
  display: none;
  position: absolute;
  min-width: 230px;
  padding: 12px;
  background: rgba(4,7,13,.96);
  border: 1px solid rgba(212,161,31,.22);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  backdrop-filter: blur(14px);
  z-index: 200;
}

.dropdown-menu {
  top: 100%;
  left: 0;
}

.submenu-menu {
  top: 0;
  left: 100%;
  margin-left: 10px;
}

.menu-dropdown:hover > .dropdown-menu,
.submenu-dropdown:hover > .submenu-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dropdown-menu a,
.submenu-menu a {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.dropdown-menu a:hover,
.submenu-menu a:hover {
  background: rgba(212,161,31,.10);
  color: var(--text);
}

@media (max-width: 900px) {
  .nav.open {
    display: flex;
  }

  .menu-dropdown,
  .submenu-dropdown {
    width: 100%;
  }

  .dropdown-menu,
  .submenu-menu {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0 0 0;
    background: rgba(255,255,255,.04);
    box-shadow: none;
  }

  .submenu-menu {
    margin-left: 14px;
  }

  .page-section {
    padding-top: 120px;
  }
}


/* MENU SUSPENSO EM CASCATA — LIVROS > O ARQUITETO DO CAOS > PÁGINAS */
.nav {
  align-items: center;
}

.menu-dropdown,
.submenu-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.dropdown-toggle,
.submenu-toggle {
  cursor: default;
}

.dropdown-toggle::after,
.submenu-toggle::after {
  content: " ▾";
  color: var(--accent);
  font-size: 12px;
}

.dropdown-menu,
.submenu-menu {
  display: none;
  position: absolute;
  min-width: 240px;
  padding: 12px;
  background: rgba(4,7,13,.98);
  border: 1px solid rgba(212,161,31,.24);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
  backdrop-filter: blur(14px);
  z-index: 999;
}

.dropdown-menu {
  top: 100%;
  left: 0;
}

.submenu-menu {
  top: 0;
  left: 100%;
  margin-left: 10px;
}

/* Só aparece ao passar o mouse */
.menu-dropdown:hover > .dropdown-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.submenu-dropdown:hover > .submenu-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dropdown-menu a,
.submenu-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.dropdown-menu a:hover,
.submenu-menu a:hover {
  background: rgba(212,161,31,.12);
  color: var(--text);
}

/* Área invisível pequena para facilitar o movimento do mouse entre os menus */
.submenu-dropdown::after {
  content: "";
  position: absolute;
  top: 0;
  right: -14px;
  width: 14px;
  height: 100%;
}

/* MOBILE: mantém lista fechada até abrir o menu principal; os submenus aparecem empilhados dentro dele */
@media (max-width: 900px) {
  .nav.open {
    display: flex;
  }

  .menu-dropdown,
  .submenu-dropdown {
    width: 100%;
    display: block;
  }

  .dropdown-menu,
  .submenu-menu {
    display: none;
    position: static;
    width: 100%;
    min-width: 0;
    margin: 8px 0 0 0;
    background: rgba(255,255,255,.04);
    box-shadow: none;
    border-radius: 14px;
  }

  .menu-dropdown:hover > .dropdown-menu,
  .submenu-dropdown:hover > .submenu-menu {
    display: flex;
    flex-direction: column;
  }

  .submenu-menu {
    margin-left: 14px;
    width: calc(100% - 14px);
  }
}


/* MENU SUSPENSO VERTICAL — SUBMENUS UM EMBAIXO DO OUTRO */
.nav {
  align-items: center;
}

.menu-dropdown,
.submenu-dropdown {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.dropdown-toggle,
.submenu-toggle {
  cursor: default;
}

.dropdown-toggle::after,
.submenu-toggle::after {
  content: " ▾";
  color: var(--accent);
  font-size: 12px;
}

/* Menu Livros abaixo do item Livros */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  padding: 12px;
  background: rgba(4,7,13,.98);
  border: 1px solid rgba(212,161,31,.24);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
  backdrop-filter: blur(14px);
  z-index: 999;
  flex-direction: column;
  gap: 8px;
}

/* Menu Livro/Personagens/Galeria abaixo de O Arquiteto do Caos */
.submenu-menu {
  display: none;
  position: static;
  width: 100%;
  min-width: 0;
  margin-top: 8px;
  padding: 10px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(212,161,31,.16);
  border-radius: 14px;
  box-shadow: none;
  flex-direction: column;
  gap: 8px;
}

/* Exibição somente ao passar o mouse */
.menu-dropdown:hover > .dropdown-menu {
  display: flex;
}

.submenu-dropdown:hover > .submenu-menu {
  display: flex;
}

.dropdown-menu a,
.submenu-menu a {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.dropdown-menu a:hover,
.submenu-menu a:hover {
  background: rgba(212,161,31,.12);
  color: var(--text);
}

/* Remove qualquer comportamento anterior que jogava submenu para a lateral */
.submenu-dropdown::after {
  display: none !important;
}

/* MOBILE */
@media (max-width: 900px) {
  .menu-dropdown,
  .submenu-dropdown {
    width: 100%;
    display: block;
  }

  .dropdown-menu,
  .submenu-menu {
    position: static;
    width: 100%;
    min-width: 0;
    margin-top: 8px;
    box-shadow: none;
  }

  .menu-dropdown:hover > .dropdown-menu,
  .submenu-dropdown:hover > .submenu-menu {
    display: flex;
  }
}


/* AJUSTES DE TEXTO — AUTOR E LIVRO */
#autor p,
.book-text p {
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.75;
  hyphens: auto;
}




/* PÁGINA AUTOR SEPARADA */
body:has(#autor) .page-section {
  min-height: 100vh;
  padding-top: 160px;
}





/* RODAPÉS — MESMA ALTURA EM TODAS AS PÁGINAS */
.footer {
  margin-top: -2cm;
}


/* PÁGINA PERSONAGENS — 30MM DA BORDA SUPERIOR E TEXTO MENOR */
body:has(#personagens) .page-section {
  padding-top: 30mm;
}

#personagens .info-card p {
  font-size: calc(1em - 1pt);
}

@media (max-width: 900px) {
  body:has(#personagens) .page-section {
    padding-top: 30mm;
  }

  #personagens .info-card p {
    font-size: calc(1em - 1pt);
  }
}


/* PÁGINA AUTOR — FOTO REDUZIDA EM 10% */
body:has(#autor) .author-photo {
  width: 461px;
  height: 692px;
}

body:has(#autor) .author-photo img {
  width: 461px;
  height: 692px;
}

@media (max-width: 900px) {
  body:has(#autor) .author-photo {
    width: 342px;
    height: 514px;
  }

  body:has(#autor) .author-photo img {
    width: 342px;
    height: 514px;
  }
}

@media (max-width: 520px) {
  body:has(#autor) .author-photo {
    width: 288px;
    height: 433px;
    max-width: 100%;
  }

  body:has(#autor) .author-photo img {
    width: 288px;
    height: 433px;
    max-width: 100%;
  }
}


/* RESPONSIVIDADE GERAL — DESKTOP, LAPTOP, TABLET E CELULAR */
img {
  max-width: 100%;
}

body {
  overflow-x: hidden;
}

/* LAPTOPS E TELAS MÉDIAS */
@media (max-width: 1200px) {
  .site-header {
    padding: 0 5vw;
  }

  .section {
    padding-left: 5vw;
    padding-right: 5vw;
  }

  .hero {
    grid-template-columns: 1.1fr .9fr;
    gap: 34px;
  }

  .two-columns,
  .book-section {
    gap: 34px;
  }

  .author-photo {
    width: 414px;
    height: 623px;
  }

  .author-photo img {
    width: 414px;
    height: 623px;
  }

  .cards-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* TABLETS */
@media (max-width: 900px) {
  .site-header {
    height: 78px;
    padding: 0 6vw;
  }

  .logo img {
    height: 58px;
  }

  .menu-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 22px 6vw;
    background: rgba(4,7,13,.97);
    border-bottom: 1px solid rgba(212,161,31,.22);
  }

  .nav.open {
    display: flex;
  }

  .nav a,
  .dropdown-toggle,
  .submenu-toggle {
    width: 100%;
    padding: 10px 0;
  }

  .hero,
  .two-columns,
  .book-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 130px;
  }

  .section {
    padding: 96px 6vw;
  }

  .page-section {
    padding-top: 120px;
  }

  h1 {
    font-size: clamp(42px, 11vw, 72px);
    letter-spacing: -3px;
  }

  h2 {
    font-size: clamp(32px, 7vw, 48px);
  }

  .author-photo {
    width: 342px;
    height: 514px;
    max-width: 100%;
  }

  .author-photo img {
    width: 342px;
    height: 514px;
    max-width: 100%;
  }

  .book-visuals {
    min-height: auto;
    grid-template-columns: 42% 58%;
    gap: 12px;
    padding: 22px;
  }

  .book-cover img {
    max-width: 230px;
  }

  .book-logo img {
    max-width: 300px;
  }

  .cards-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .contact-links {
    align-items: center;
  }
}

/* CELULARES */
@media (max-width: 520px) {
  .site-header {
    height: 72px;
    padding: 0 5vw;
  }

  .logo img {
    height: 48px;
  }

  .nav {
    top: 72px;
  }

  .section {
    padding: 82px 5vw;
  }

  .page-section {
    padding-top: 92px;
  }

  .hero {
    padding-top: 112px;
  }

  h1 {
    font-size: 42px;
    line-height: 1;
    letter-spacing: -2px;
  }

  h2 {
    font-size: 32px;
    letter-spacing: -1px;
  }

  h3 {
    font-size: 19px;
  }

  .tagline {
    font-size: 20px;
  }

  .hero-card,
  .info-card,
  .book-visuals,
  .gallery-item {
    border-radius: 20px;
  }

  .author-photo {
    width: min(288px, 90vw);
    height: auto;
    aspect-ratio: 288 / 433;
  }

  .author-photo img {
    width: 100%;
    height: 100%;
  }

  .book-visuals {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 18px;
  }

  .book-cover img {
    max-width: 210px;
  }

  .book-logo img {
    max-width: 260px;
  }

  .contact-links {
    flex-direction: column;
    width: 100%;
  }

  .contact-links a,
  .contact-card {
    width: 100%;
    max-width: 320px;
  }

  .footer {
    padding: 26px 5vw;
    font-size: 13px;
  }
}

/* CELULARES MUITO PEQUENOS */
@media (max-width: 360px) {
  h1 {
    font-size: 36px;
  }

  .author-photo {
    width: min(260px, 88vw);
  }

  .book-cover img {
    max-width: 190px;
  }

  .book-logo img {
    max-width: 230px;
  }
}


/* PÁGINA AUTOR — FOTO REDUZIDA MAIS 10% */
body:has(#autor) .author-photo {
  width: 415px;
  height: 623px;
}

body:has(#autor) .author-photo img {
  width: 415px;
  height: 623px;
}

@media (max-width: 1200px) {
  body:has(#autor) .author-photo {
    width: 373px;
    height: 561px;
  }

  body:has(#autor) .author-photo img {
    width: 373px;
    height: 561px;
  }
}

@media (max-width: 900px) {
  body:has(#autor) .author-photo {
    width: 308px;
    height: 463px;
  }

  body:has(#autor) .author-photo img {
    width: 308px;
    height: 463px;
  }
}

@media (max-width: 520px) {
  body:has(#autor) .author-photo {
    width: min(259px, 88vw);
    height: auto;
    aspect-ratio: 259 / 390;
  }

  body:has(#autor) .author-photo img {
    width: 100%;
    height: 100%;
  }
}


/* PERSONAGENS — SUBIR RODAPÉ EM 5MM */
body:has(#personagens) .footer {
  margin-top: calc(-2cm - 5mm);
}


/* SUBMENU O ARQUITETO DO CAOS — SEM AÇÃO DE CLIQUE */
.submenu-toggle {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  cursor: default;
  user-select: none;
  white-space: nowrap;
}

.submenu-toggle:hover {
  background: rgba(212,161,31,.12);
  color: var(--text);
}


/* LOGO DO LIVRO NA PÁGINA INICIAL */
.hero-book-logo{
    display:flex;
    justify-content:center;
    margin:0 auto 20px auto;
}

.hero-book-logo img{
    width:140px;
    height:auto;
    display:block;
}

@media (max-width:768px){
    .hero-book-logo img{
        width:110px;
    }
}


/* AJUSTE: aumentar 2cm na largura da moldura de texto da página inicial */
.hero-card{
    max-width: calc(100% + 2cm);
    width: calc(100% + 2cm);
}








/* AJUSTE: reduzir 1cm da moldura de texto da página inicial e deixá-la flexível */
.hero-card {
  width: calc(100% + 1cm);
  max-width: calc(100% + 1cm);
  min-height: auto;
  height: auto;
  overflow: visible;
  justify-content: flex-start;
  align-self: center;
  word-break: normal;
  overflow-wrap: anywhere;
}

.hero-card h2,
.hero-card p,
.hero-card .card-label {
  max-width: 100%;
}

@media (max-width: 900px) {
  .hero-card {
    width: 100%;
    max-width: 100%;
    min-height: auto;
    height: auto;
  }
}





/* =========================================================
   RESPONSIVIDADE FLUIDA GLOBAL — AJUSTE FINAL
   Letras, molduras, espaçamentos e imagens escalam conforme a tela.
   ========================================================= */
:root {
  --space-page: clamp(18px, 5vw, 120px);
  --space-section-y: clamp(78px, 10vw, 170px);
  --card-padding: clamp(20px, 2.8vw, 44px);
  --radius-card: clamp(18px, 2vw, 34px);
  --font-base: clamp(14px, 0.9vw, 18px);
  --font-small: clamp(10px, 0.75vw, 13px);
  --font-nav: clamp(13px, 0.78vw, 16px);
  --font-h1: clamp(38px, 7.2vw, 118px);
  --font-h2: clamp(28px, 3.8vw, 64px);
  --font-h3: clamp(18px, 1.45vw, 28px);
  --font-tagline: clamp(18px, 2.2vw, 38px);
  --logo-header: clamp(48px, 5vw, 86px);
  --hero-logo: clamp(96px, 10vw, 190px);
  --hero-card-min: clamp(250px, 28vw, 430px);
}

html {
  font-size: var(--font-base);
}

body {
  font-size: var(--font-base);
  overflow-x: hidden;
}

.site-header {
  height: clamp(72px, 7vw, 104px);
  padding-left: var(--space-page);
  padding-right: var(--space-page);
}

.logo img {
  height: var(--logo-header);
}

.nav {
  gap: clamp(12px, 1.8vw, 34px);
  font-size: var(--font-nav);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.section {
  padding-left: var(--space-page);
  padding-right: var(--space-page);
  padding-top: var(--space-section-y);
  padding-bottom: var(--space-section-y);
}

.hero {
  grid-template-columns: minmax(0, 1.22fr) minmax(280px, .78fr);
  gap: clamp(26px, 4vw, 74px);
  min-height: 100svh;
  padding-top: clamp(118px, 12vw, 190px);
}

h1 {
  font-size: var(--font-h1);
  line-height: .92;
  letter-spacing: clamp(-5px, -0.35vw, -1px);
}

h2 {
  font-size: var(--font-h2);
  line-height: 1.02;
  letter-spacing: clamp(-2px, -0.15vw, -0.5px);
}

h3 {
  font-size: var(--font-h3);
}

p {
  font-size: var(--font-base);
}

.eyebrow,
.card-label {
  font-size: var(--font-small);
}

.tagline {
  font-size: var(--font-tagline);
  max-width: min(820px, 100%);
}

.hero-card,
.info-card,
.book-visuals,
.gallery-item,
.author-photo {
  border-radius: var(--radius-card);
}

.hero-card {
  width: clamp(280px, 34vw, 560px);
  max-width: 100%;
  min-height: var(--hero-card-min);
  height: auto;
  padding: var(--card-padding);
  justify-content: center;
  overflow: visible;
  overflow-wrap: break-word;
  word-break: normal;
}

.hero-card h2,
.hero-card p,
.hero-card .card-label {
  max-width: 100%;
}

.hero-book-logo img {
  width: var(--hero-logo);
  max-width: 78%;
}

.two-columns,
.book-section {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
  gap: clamp(28px, 4vw, 70px);
}

.author-photo {
  width: min(34vw, 415px);
  height: auto;
  aspect-ratio: 415 / 623;
}

.author-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-visuals {
  min-height: clamp(360px, 44vw, 680px);
  padding: clamp(18px, 2.4vw, 34px);
  gap: clamp(12px, 2vw, 28px);
}

.book-cover img {
  max-width: clamp(180px, 22vw, 330px);
}

.book-logo img {
  max-width: clamp(220px, 28vw, 430px);
}

.cards-grid,
.gallery-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(14px, 1.6vw, 28px);
}

.info-card {
  padding: clamp(18px, 2vw, 32px);
}

#personagens .info-card p,
#autor p,
.book-text p {
  font-size: clamp(13px, .86vw, 17px);
  line-height: clamp(1.55, 1.8vw, 1.8);
}

.gallery-item {
  min-height: clamp(190px, 24vw, 340px);
  padding: clamp(16px, 2vw, 30px);
}

.gallery-item img {
  max-width: clamp(210px, 22vw, 340px);
}

.contact-section {
  max-width: min(920px, calc(100vw - (var(--space-page) * 2)));
}

.contact-card {
  min-width: clamp(130px, 14vw, 180px);
  min-height: clamp(125px, 14vw, 180px);
  padding: clamp(14px, 1.5vw, 22px);
}

.contact-card img,
.email-card img,
.tiktok-card img {
  width: clamp(66px, 6vw, 96px);
  height: clamp(66px, 6vw, 96px);
}

.footer {
  padding: clamp(24px, 3vw, 42px) var(--space-page);
  font-size: clamp(12px, .8vw, 15px);
}

/* Telas grandes: aumenta presença visual sem quebrar composição */
@media (min-width: 1500px) {
  .hero {
    grid-template-columns: minmax(0, 1.3fr) minmax(360px, .7fr);
  }

  .hero-card {
    width: clamp(420px, 31vw, 620px);
  }

  .cards-grid {
    grid-template-columns: repeat(4, minmax(240px, 1fr));
  }
}

/* Laptops e tablets horizontais */
@media (max-width: 1200px) {
  body:has(#inicio) .nav {
    left: -0.6cm;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(270px, .9fr);
  }

  .hero-card {
    width: 100%;
  }
}

/* Tablets e celulares: tudo empilha, molduras reduzem e cabem na tela */
@media (max-width: 900px) {
  body:has(#inicio) .nav,
  .hero-card {
    left: 0;
  }

  .site-header {
    height: clamp(68px, 10vw, 82px);
  }

  .menu-toggle {
    display: block;
    font-size: clamp(26px, 5vw, 34px);
  }

  .nav {
    position: absolute;
    top: clamp(68px, 10vw, 82px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: clamp(16px, 4vw, 26px) var(--space-page);
    background: rgba(4,7,13,.98);
  }

  .nav.open {
    display: flex;
  }

  .nav a,
  .dropdown-toggle,
  .submenu-toggle {
    font-size: clamp(14px, 3.5vw, 17px);
    padding: 10px 0;
  }

  .dropdown-menu,
  .submenu-menu {
    position: static;
    width: 100%;
    min-width: 0;
    box-shadow: none;
  }

  .hero,
  .two-columns,
  .book-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    align-items: start;
    padding-top: clamp(105px, 18vw, 135px);
  }

  .hero-card {
    width: min(100%, 620px);
    min-height: auto;
    justify-self: stretch;
  }

  .author-photo {
    width: min(72vw, 330px);
  }

  .book-visuals {
    grid-template-columns: 42% 58%;
    min-height: auto;
  }
}

/* Celulares */
@media (max-width: 560px) {
  :root {
    --space-page: clamp(15px, 5vw, 24px);
  }

  body {
    background-attachment: scroll;
  }

  .section {
    padding-top: clamp(72px, 18vw, 96px);
    padding-bottom: clamp(64px, 16vw, 90px);
  }

  .hero {
    padding-top: clamp(96px, 24vw, 120px);
    gap: 24px;
  }

  h1 {
    font-size: clamp(34px, 11.5vw, 48px);
    letter-spacing: -1.5px;
  }

  h2 {
    font-size: clamp(27px, 8.5vw, 36px);
  }

  h3 {
    font-size: clamp(17px, 5vw, 21px);
  }

  p,
  #personagens .info-card p,
  #autor p,
  .book-text p {
    font-size: clamp(13px, 4vw, 15.5px);
  }

  .tagline {
    font-size: clamp(18px, 5.8vw, 23px);
  }

  .hero-card,
  .info-card,
  .book-visuals,
  .gallery-item {
    padding: clamp(16px, 5vw, 22px);
    border-radius: 18px;
  }

  .hero-book-logo img {
    width: clamp(90px, 34vw, 130px);
  }

  .book-visuals {
    grid-template-columns: 1fr;
  }

  .book-cover img {
    max-width: min(220px, 62vw);
  }

  .book-logo img {
    max-width: min(260px, 76vw);
  }

  .author-photo {
    width: min(78vw, 275px);
  }

  .cards-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .contact-card,
  .contact-links a {
    width: min(100%, 320px);
  }

  .footer {
    margin-top: 0;
  }

  body:has(#personagens) .footer {
    margin-top: 0;
  }
}

/* Celulares muito estreitos */
@media (max-width: 360px) {
  .hero-card,
  .info-card,
  .book-visuals,
  .gallery-item {
    padding: 14px;
  }

  h1 {
    font-size: 32px;
  }
}

/* PÁGINA 1º CAPÍTULO */
.capitulo-section{max-width:1120px;margin:0 auto;}
.capitulo-imagem{display:flex;justify-content:center;align-items:center;margin:36px auto 42px;padding:0;}
.capitulo-imagem img{width:14cm;height:21cm;max-width:100%;object-fit:cover;object-position:center;display:block;border-radius:18px;border:1px solid rgba(212,161,31,.25);box-shadow:0 26px 70px rgba(0,0,0,.55);}
.capitulo-texto{max-width:850px;margin:0 auto;padding:clamp(22px,3vw,42px);border-radius:24px;background:linear-gradient(145deg,rgba(7,10,18,.72),rgba(7,10,18,.48)),linear-gradient(145deg,rgba(212,161,31,.08),rgba(255,255,255,.02));border:1px solid rgba(212,161,31,.16);box-shadow:var(--shadow);}
.capitulo-texto p{text-align:justify;text-justify:inter-word;line-height:1.9;color:var(--muted);margin-bottom:16px;}
@media(max-width:768px){.capitulo-imagem img{width:min(92vw,14cm);height:auto;aspect-ratio:14/21}.capitulo-texto{padding:20px}.capitulo-texto p{font-size:14px;line-height:1.75}}





/* GALERIA — 20 MOLDURAS CONFORME galeria.html */
#galeria .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(18px, 2vw, 30px);
  align-items: stretch;
}

#galeria .gallery-item {
  min-height: clamp(240px, 28vw, 420px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 2vw, 30px);
  overflow: hidden;
}

#galeria .gallery-item img {
  width: 100%;
  max-width: clamp(220px, 22vw, 340px);
  height: auto;
  display: block;
  object-fit: contain;
}


/* AJUSTE FINAL — MOLDURA DA PÁGINA INICIAL 1,5CM À DIREITA */
body:has(#inicio) .hero-card {
  position: relative;
  left: 1.5cm;
  text-align: center;
  align-items: center;
}

body:has(#inicio) .hero-card h2,
body:has(#inicio) .hero-card p,
body:has(#inicio) .hero-card .card-label {
  text-align: center;
}

@media (max-width: 900px) {
  body:has(#inicio) .hero-card {
    left: 0;
  }
}


/* =========================================================
   AJUSTE FINAL — FOTO DO AUTOR HORIZONTAL 16,5 x 11 cm
   Mantém a moldura existente, agora em proporção horizontal.
   ========================================================= */
body:has(#autor) .author-photo,
.author-photo {
  width: min(16.5cm, 100%);
  height: auto;
  aspect-ratio: 16.5 / 11;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-card, 18px);
  background:
    linear-gradient(145deg, rgba(7,10,18,.72), rgba(7,10,18,.48)),
    linear-gradient(145deg, rgba(212,161,31,.08), rgba(255,255,255,.02));
  border: 1px solid rgba(212,161,31,.16);
  box-shadow: 0 24px 80px rgba(0,0,0,.42);
  display: flex;
  justify-content: center;
  align-items: center;
}

body:has(#autor) .author-photo img,
.author-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

@media (min-width: 1500px) {
  body:has(#autor) .author-photo,
  .author-photo {
    width: min(18.5cm, 48vw);
  }
}

@media (max-width: 900px) {
  body:has(#autor) .author-photo,
  .author-photo {
    width: min(92vw, 16.5cm);
    height: auto;
    aspect-ratio: 16.5 / 11;
  }
}

@media (max-width: 520px) {
  body:has(#autor) .author-photo,
  .author-photo {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16.5 / 11;
  }
}

/* PÁGINA AVALIAÇÕES */
.reviews-section{max-width:1280px;margin:0 auto}.reviews-layout{display:grid;grid-template-columns:minmax(280px,.85fr) minmax(320px,1.25fr);gap:clamp(20px,3vw,44px);align-items:start;margin-top:32px}.reviews-summary,.review-form-panel{padding:clamp(22px,2.5vw,38px)}.score-box{display:flex;flex-direction:column;gap:8px;padding:22px 0;border-bottom:1px solid rgba(255,255,255,.12);margin-bottom:20px}.score-box strong{font-size:clamp(46px,6vw,78px);line-height:1;color:var(--text)}.score-box span{color:var(--accent);font-size:clamp(24px,3vw,34px);letter-spacing:.08em}.score-box small{color:var(--muted)}.rating-bars{display:flex;flex-direction:column;gap:12px}.rating-row{display:grid;grid-template-columns:100px 1fr 34px;gap:12px;align-items:center;color:var(--muted);font-size:14px}.rating-row progress{width:100%;height:10px;overflow:hidden;border-radius:999px;appearance:none}.rating-row progress::-webkit-progress-bar{background:rgba(255,255,255,.10);border-radius:999px}.rating-row progress::-webkit-progress-value{background:linear-gradient(90deg,var(--accent-dark),var(--accent));border-radius:999px}.rating-row progress::-moz-progress-bar{background:linear-gradient(90deg,var(--accent-dark),var(--accent));border-radius:999px}.review-product-name{font-weight:900;letter-spacing:.12em;color:var(--accent);text-transform:uppercase;margin-bottom:24px}.review-form{display:flex;flex-direction:column;gap:18px}.star-field{border:1px solid rgba(255,255,255,.12);border-radius:18px;padding:18px}.star-field legend{padding:0 8px;color:var(--muted);font-weight:700}.star-options{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.star-options label{cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:96px;border:1px solid rgba(255,255,255,.12);border-radius:16px;background:rgba(255,255,255,.035);transition:.2s ease}.star-options label:hover{transform:translateY(-2px);border-color:rgba(212,161,31,.55);background:rgba(212,161,31,.08)}.star-options input{position:absolute;opacity:0}.star-options span{color:rgba(255,255,255,.35);font-size:34px;line-height:1}.star-options small{color:var(--muted);font-size:12px;text-align:center}.star-options label:has(input:checked){border-color:var(--accent);background:rgba(212,161,31,.13)}.star-options label:has(input:checked) span{color:var(--accent)}.details-label{font-weight:900;color:var(--text);font-size:18px}.review-form textarea,.reply-box textarea{width:100%;resize:vertical;border:1px solid rgba(255,255,255,.14);border-radius:18px;background:rgba(0,0,0,.34);color:var(--text);padding:16px;font:inherit;outline:none}.review-form textarea:focus,.reply-box textarea:focus{border-color:rgba(212,161,31,.65);box-shadow:0 0 0 4px rgba(212,161,31,.10)}.review-submit{width:fit-content;cursor:pointer}.reviews-list-panel{margin-top:clamp(34px,4vw,56px)}.reviews-list-panel h3{color:var(--text);margin-bottom:18px}.reviews-list{display:flex;flex-direction:column;gap:18px}.review-card{padding:clamp(20px,2vw,30px);border:1px solid rgba(212,161,31,.16);border-radius:24px;background:linear-gradient(145deg,rgba(7,10,18,.72),rgba(7,10,18,.48)),linear-gradient(145deg,rgba(212,161,31,.07),rgba(255,255,255,.02));box-shadow:var(--shadow)}.review-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}.review-stars{color:var(--accent);font-size:22px;letter-spacing:.04em}.review-rating-label{color:var(--muted);font-weight:800}.review-text{color:#dfe1e8;text-align:justify;white-space:pre-wrap}.review-actions{display:flex;gap:10px;margin-top:16px}.vote-btn,.reply-toggle,.reply-save{border:1px solid rgba(255,255,255,.14);border-radius:999px;padding:9px 14px;background:rgba(255,255,255,.04);color:var(--muted);cursor:pointer;font-weight:800}.vote-btn:hover,.reply-toggle:hover,.reply-save:hover{color:var(--text);border-color:rgba(212,161,31,.45)}.reply-box{display:none;margin-top:16px;gap:10px;flex-direction:column}.reply-box.open{display:flex}.author-reply{margin-top:16px;padding:16px;border-left:3px solid var(--accent);background:rgba(212,161,31,.07);border-radius:14px}.author-reply strong{display:block;color:var(--accent);margin-bottom:6px}.no-reviews{color:var(--muted);padding:24px;border:1px dashed rgba(255,255,255,.16);border-radius:20px;text-align:center}@media(max-width:900px){.reviews-layout{grid-template-columns:1fr}.star-options{grid-template-columns:1fr}.rating-row{grid-template-columns:92px 1fr 30px}}@media(max-width:520px){.review-head{align-items:flex-start;flex-direction:column}.review-actions{flex-wrap:wrap}.review-submit{width:100%}}


/* AVALIAÇÕES — CAMPO NOME DO AVALIADOR */
.review-name-input{width:100%;border:1px solid rgba(255,255,255,.14);border-radius:18px;background:rgba(0,0,0,.34);color:var(--text);padding:16px;font:inherit;outline:none}.review-name-input:focus{border-color:rgba(212,161,31,.65);box-shadow:0 0 0 4px rgba(212,161,31,.10)}.review-author-name{color:var(--text);font-weight:900;margin-bottom:4px}.review-author-name span{color:var(--accent)}


/* AJUSTE FINAL — CAIXA "O QUE VOCÊ JÁ LEU" ABAIXO DAS ESTRELAS */
.read-status-below-stars {
  margin-top: 0;
}

.read-status-row label {
  font-weight: 900;
  color: var(--text);
  font-size: 18px;
}

.read-status-row select {
  min-height: 50px;
}


/* AJUSTE GLOBAL — MENUS SUPERIORES ALINHADOS AO INDEX */
.site-header .nav {
  position: relative;
  left: -1.5cm;
}

@media (max-width: 900px) {
  .site-header .nav {
    left: 0;
  }
}


/* AJUSTE FINAL — LISTA "O QUE VOCÊ JÁ LEU" ABAIXO DO TÍTULO DO LIVRO */
.read-status-below-title {
  margin-top: -4px;
  margin-bottom: 4px;
}

.read-status-row label {
  font-weight: 900;
  color: var(--text);
  font-size: 18px;
}

.read-status-row select {
  font-weight: 900;
  color: var(--text);
  font-size: 18px;
  min-height: 50px;
}

/* AJUSTE MENU LIVROS — SUBMENU INTERNO CENTRALIZADO E SEM AVALIAÇÕES */
.dropdown-menu .submenu-dropdown {
  align-items: center;
}

.dropdown-menu .submenu-toggle {
  width: 100%;
}

.dropdown-menu .submenu-menu {
  width: calc(100% - 24px);
  margin: 8px auto 0 auto;
  align-self: center;
}

@media (max-width: 900px) {
  .dropdown-menu .submenu-dropdown {
    align-items: stretch;
  }

  .dropdown-menu .submenu-menu {
    width: 100%;
    margin: 8px 0 0 0;
  }
}
