/* Fontes locais. */
@font-face {
  font-family: Cinzel;
  src: url(../fonts/cinzel.woff2) format("woff2");
  font-display: swap;
}
@font-face {
  font-family: Garamond;
  src: url(../fonts/garamond.woff2) format("woff2");
  font-display: swap;
}
@font-face {
  font-family: Garamond;
  src: url(../fonts/garamond-italic.woff2) format("woff2");
  font-style: italic;
  font-display: swap;
}
/* Cores e estilos gerais. */
:root {
  --ink: #101e1b;
  --deep: #091410;
  --gold: #ded09a;
  --pale: #fff5c8;
  --mint: #aeeed4;
  --soft: #a4b9a6;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--deep);
  color: #e8eddb;
  font-family: Garamond, Georgia, serif;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid #fff5ae;
  outline-offset: 5px;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-180%);
  background: #fff5ae;
  color: #12221c;
  padding: 10px;
}
.skip-link:focus {
  transform: none;
}
.eyebrow {
  font:
    400 10px Cinzel,
    serif;
  letter-spacing: 0.22em;
  color: var(--gold);
}
.ornament {
  width: 190px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d4c58b, transparent);
  position: relative;
  margin: 25px auto;
}
.ornament i {
  position: absolute;
  width: 6px;
  height: 6px;
  border: 1px solid #d4c58b;
  transform: rotate(45deg);
  left: 50%;
  top: -3px;
}
/* Abertura e animação das folhas. */
.intro {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #08110f;
}

.intro:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
    ellipse at 50% 44%,
    transparent 10%,
    #050c0aaa 90%
  );
  pointer-events: none;
  transition: opacity 1s;
}

.intro-logo {
  display: block;
  width: clamp(175px, 22vw, 270px);
  height: clamp(175px, 22vw, 270px);
  object-fit: contain;
  filter: drop-shadow(0 0 35px #e0bd6b30);
  animation: logo-in 1.5s ease both;
}

.opening.intro:before {
  opacity: 0;
}
[hidden] {
  display: none !important;
}
@keyframes logo-in {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.93);
    filter: drop-shadow(0 0 0 transparent);
  }
  to {
    opacity: 1;
    transform: none;
    filter: drop-shadow(0 0 35px #e0bd6b30);
  }
}
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}/* Navegação e apresentação. */

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font: 16px Cinzel;
  color: #f2e6b6;
}
.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
}
.brand small {
  display: block;
  font: 8px Cinzel;
  letter-spacing: 0.18em;
  color: #caba80;
  margin-bottom: 4px;
}

.hero {
  min-height: calc(100svh - 90px);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding: 30px clamp(32px, 5vw, 80px) 24px;
  background: #0f211b;
}
.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    ellipse at 50% 34%,
    #295144 0%,
    #142e25 39%,
    #0b1814 80%
  );
}

.hero-inner {
  text-align: center;
  margin: auto;
  position: relative;
  padding: 25px 15px;
}
.hero-inner .eyebrow {
  margin: 0 0 25px;
}
.hero-logo {
  width: clamp(145px, 18vw, 210px);
  height: clamp(145px, 18vw, 210px);
  object-fit: contain;
  filter: drop-shadow(0 8px 24px #0005);
}
.hero h2 {
  font: 400 clamp(43px, 5.4vw, 76px) / 1.06 Garamond;
  margin: 16px 0 0;
  color: #f3ebc6;
}
.hero h2 em {
  font-style: normal;
  color: #e7d49a;
}
.hero-copy {
  font: italic 21px Garamond;
  color: #becfbb;
  margin: 0 0 20px;
}
.hero-link,
.text-link {
  display: inline-block;
  text-align: center;
  border-bottom: 1px solid #c3b576;
  color: #e7d899;
  padding: 12px 0;
  font: 9px Cinzel;
  letter-spacing: 0.13em;
}
.hero-link span {
  margin-left: 22px;
}

/* Ajustes para telas menores. */
@media (max-width: 680px) {

  .intro-logo {
    width: 190px;
    height: 190px;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
  }
  .brand {
    font-size: 13px;
  }

  .hero {
    min-height: calc(100svh - 72px);
    padding: 20px 24px;
  }

  .hero-inner .eyebrow {
    font-size: 8px;
    line-height: 1.6;
  }
  .hero-logo {
    width: 155px;
    height: 155px;
  }
  .hero h2 {
    font-size: clamp(39px, 9vw, 60px);
  }

}
/* Respeita a preferência por movimento reduzido. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .intro-logo,
  .intro-kicker,
  .intro h1 span,
  .intro-content .ornament,
  .intro-caption,
  .entry-button {
    animation: none;
  }
  .intro-door,
  .intro-content,
  .intro:before {
    transition: none;
  }
}

/* Paleta inspirada na logo: turquesa, rosa, dourado e pergaminho. */
:root {
  --deep: #102a2c;
  --gold: #f5c867;
  --pale: #fff1ca;
  --mint: #a3dfd7;
  --soft: #d8e8df;
}
.intro {
  background: #102a2c;
}

.brand {
  color: #fff0d0;
}
.brand small,
.header-link {
  color: #f5c867;
}

.hero {
  background: #143b3e;
}
.hero-backdrop {
  background: radial-gradient(
    ellipse at 50% 34%,
    #387f7c 0%,
    #1e5959 38%,
    #103033 85%
  );
}

.hero h2 {
  color: #fff0d4;
}
.hero h2 em {
  color: #ffe0e7;
}
.hero-copy {
  color: #f3d6d8;
}
.hero-link {
  color: #ffe7a6;
  border-color: #f5c867;
}

/* Abertura com a logo. */
.intro { background: radial-gradient(ellipse at center, #28605e 0%, #102d30 62%, #0a1d20 100%); transition: opacity 1s ease; }
.opening.intro { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .intro { transition: none; } }

/* Navegação lateral nas páginas. */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  width: 250px;
  display: flex;
  flex-direction: column;
  padding: 35px 26px;
  background: #123337;
  border-right: 1px solid #79c8c655;
  overflow-y: auto;
}
.sidebar .brand { line-height: 1.35; }
.sidebar .brand-logo { width: 58px; height: 58px; }
.sidebar-label {
  margin: 65px 0 14px;
  color: #afd5cc;
  font: 9px Cinzel, serif;
  letter-spacing: .18em;
}
.sidebar nav { display: grid; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 8px;
  border-bottom: 1px solid #c5e6dc1c;
  color: #d9eeeb;
  font: 12px Cinzel, serif;
}
.sidebar nav a span { color: #a5c8bf; font-size: 9px; }
.sidebar nav a:hover, .sidebar nav a[aria-current="page"] {
  color: #ffe0ad;
  background: #ffffff0a;
  box-shadow: inset 2px 0 #f5c867;
}

.menu-toggle { display: none; }
.page-content { margin-left: 250px; }
.page-content .hero { min-height: 100svh; }

@media (max-width: 680px) {
  .menu-toggle {
    display: block;
    position: fixed;
    z-index: 12;
    top: 16px;
    left: 16px;
    padding: 11px 16px;
    border: 1px solid #e9d299;
    background: #123337;
    color: #fff1ca;
    font: 10px Cinzel, serif;
    letter-spacing: .1em;
  }
  .sidebar {
    width: min(280px, 85vw);
    padding-top: 75px;
    transform: translateX(-105%);
    transition: transform .3s ease;
    box-shadow: 0 0 35px #0007;
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-label { margin-top: 35px; }
  .page-content { margin-left: 0; }
  .page-content .hero { min-height: 100svh; padding-top: 75px; }

}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* Tipografia: títulos clássicos e legendas em versalete. */
.intro h1,
.hero h2,
.about h2,
.inspiration-content h2 {
  font-family: Garamond, Georgia, serif;
  font-weight: 400;
  font-variant: small-caps;
  letter-spacing: .035em;
  line-height: 1.08;
}

.hero h2 { font-size: clamp(47px, 5.6vw, 74px); }

.sidebar .brand, footer div {
  font-family: Garamond, Georgia, serif;
  font-variant: small-caps;
  letter-spacing: .025em;
}
.sidebar .brand { font-size: 19px; }

.eyebrow, .sidebar-label, .sidebar-note { letter-spacing: .16em; }
@media (max-width: 680px) {

  .hero h2 { font-size: clamp(44px, 10vw, 62px); }
}

/* Ícone do livro compartilhado por todas as páginas. */
.sidebar .nav-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex: none;
  margin-left: -10px;
}

/* O ícone de maçã tem margens transparentes na imagem original. */
.sidebar .nav-icon-apple { transform: scale(1.35); }

/* Abertura provisória: apenas a logo, até a animação final. */
.intro > .intro-logo { animation: none; object-fit: contain; }

/* Imagem de fundo da página inicial. */
.hero { overflow: hidden; }
.hero-backdrop {
  inset: -16px;
  background: linear-gradient(#0a2428a8, #0a2428c4), url("../imagens/fundo-inicio.png") center / cover no-repeat;
  filter: blur(6px);
}

/* Teste da JMH Typewriter nos textos. */
@font-face {
  font-family: "JMH Typewriter";
  src: url(../fonts/jmh-typewriter.ttf) format("truetype");
  font-display: swap;
}
body, html body :is(p, a, button, label, input, select, .family-name, .family-role, .council-coin-face) { font-family: "JMH Typewriter", Garamond, serif; }

/* Fonte dos títulos. */
@font-face {
  font-family: "The Inquisition";
  src: url(../fonts/the-inquisition.ttf) format("truetype");
  font-display: swap;
}
.hero h2 { font-family: "The Inquisition", Garamond, serif; font-variant: normal; }

/* Movimento suave com brilho fixo, sem redesenhar sombras a cada quadro. */
.hero-inner h2 { text-shadow: 0 2px 18px #e9c77b70; }
.hero-inner .eyebrow, .hero-copy { text-shadow: 0 0 10px #e8cf8c40; }
@media (prefers-reduced-motion: no-preference) {
  .hero-inner h2 { animation: hero-float 6s ease-in-out infinite; }
  .hero-inner .eyebrow, .hero-copy { animation: hero-float 7s ease-in-out infinite; }
  .hero-copy { animation-delay: -2s; }
}
@keyframes hero-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -4px, 0); }
}

/* Menu lateral integrado ao fundo das páginas. */
.sidebar { background: transparent; border-right: 0; box-shadow: none; }
.sidebar nav a { border-bottom-color: transparent; }
.sidebar nav a:hover, .sidebar nav a[aria-current="page"] { background: transparent; }
@media (min-width: 681px) {
  .page-content { margin-left: 0; }
  .page-content .hero { padding-left: calc(250px + clamp(32px, 5vw, 80px)); }
  .page-content .library { padding-left: clamp(20px, 4vw, 60px); }
  .page-content .family-page { padding-left: clamp(16px, 2vw, 30px); }
  .page-content .collection-page { padding-left: clamp(24px, 7vw, 100px); }

  body:not(:has(.hero)) .sidebar .brand,
  body:not(:has(.hero)) .sidebar nav a { color: #245c58; }
  body:not(:has(.hero)) .sidebar-label,
  body:not(:has(.hero)) .sidebar-note,
  body:not(:has(.hero)) .sidebar nav a span { color: #50776d; }
  body:not(:has(.hero)) .sidebar nav a:hover,
  body:not(:has(.hero)) .sidebar nav a[aria-current="page"] { color: #9b6f27; }
  body:not(:has(.hero)) .sidebar a:focus-visible { outline-color: #245c58; }
}
@media (max-width: 680px) {
  .sidebar { background: #123337ed; box-shadow: 0 0 35px #0007; }
}

/* Brilho discreto nos controles interativos. */
button:not(:disabled), .hero-link, .sidebar nav a { transition: filter .25s ease, text-shadow .25s ease, transform .25s ease, background-color .25s ease, color .25s ease; }
button:not(:disabled):is(:hover, :focus-visible),
.hero-link:is(:hover, :focus-visible),
.sidebar nav a:is(:hover, :focus-visible) {
  filter: drop-shadow(0 0 7px #e9c27085);
  text-shadow: 0 0 9px #edce8970;
}
@media (prefers-reduced-motion: reduce) {
  button:not(:disabled), .hero-link, .sidebar nav a { transition: none; }
}

/* A apresentação ocupa a tela inteira, com o menu sobre o fundo. */
@media (min-width: 681px) {
  .page-content .hero { padding-left: clamp(32px, 5vw, 80px); }
}

/* Desce a navegação sem alterar a posição da marca. */
@media (min-width: 681px) {
  .sidebar { padding-top: calc(75px + clamp(70px, 22vh, 180px)); }
  .sidebar-label { margin-top: 25px; }
}

/* Links de destaque da página inicial. */
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; }

/* Fonte dos botões. */
@font-face {
  font-family: Minecraft;
  src: url(../fonts/minecraft.ttf) format("truetype");
  font-display: swap;
}
html body :is(button, a.hero-link) { font-family: Minecraft, "JMH Typewriter", Garamond, serif; }

/* Fundo e cores compartilhados pelas páginas internas. */
body:not(:has(.hero))::before {
  content: ""; position: fixed; inset: -16px; z-index: -1; pointer-events: none;
  background: linear-gradient(#0a2428c4, #0a2428e3), url("../imagens/fundo-inicio.png") center / cover no-repeat;
  filter: blur(6px);
}
.page-content .library, .page-content .family-page, .page-content .collection-page { background: transparent; color: #fff0d4; min-height: 100svh; }
body:not(:has(.hero)) .sidebar .brand, body:not(:has(.hero)) .sidebar nav a { color: #edf3e5; }
body:not(:has(.hero)) .sidebar-label, body:not(:has(.hero)) .sidebar nav a span { color: #b8d5c9; }
body:not(:has(.hero)) .sidebar nav a:hover, body:not(:has(.hero)) .sidebar nav a[aria-current="page"] { color: #ffe0ad; }
body:not(:has(.hero)) .sidebar a:focus-visible { outline-color: #fff5ae; }
.page-content .library-heading .eyebrow, .page-content .collection-kicker { color: #e4c27c; }
.page-content .collection-intro, .page-content .gallery-status { color: #e4dfd1; }
.page-content .council-member h2, .page-content .ally h2, .page-content .family-name { color: #fff0d4; }
.page-content .council-member p, .page-content .family-role, .page-content .family-unconfirmed { color: #d8c7a6; }
.page-content .family-tree-viewport { background: #102b2db3; border-color: #d6bd9580; }
.page-content .family-connections .indirect-label { fill: #e3c381; stroke: #173536; }
.page-content .gallery-button { color: #fff0d4; }
.page-content .book-arrow { color: #e8c77d; }
.page-content .book-arrow:hover:not(:disabled) { color: #fff0c1; }
.page-content :is(a, button, select, .family-tree-viewport):focus-visible { outline-color: #fff5ae; }

/* Entrada breve da logo antes de revelar a página. */
@media (prefers-reduced-motion: no-preference) {
  .intro > .intro-logo { animation: intro-logo-arrival 1.4s ease-out both; }
}
@keyframes intro-logo-arrival {
  from { opacity: 0; transform: translateY(10px) scale(.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mantém a navegação rolável sem exibir uma barra sobre as páginas. */
.sidebar { scrollbar-width: none; }
.sidebar::-webkit-scrollbar { display: none; }
