:root {
  --ink: #141414;
  --muted: #5d6461;
  --paper: #ffffff;
  --wash: #f3f7f2;
  --line: #dfe7df;
  --red: #b52331;
  --teal: #007c72;
  --gold: #e6bd37;
  --forest: #1d5d45;
  --black: #080808;
  --shadow: 0 18px 50px rgba(8, 8, 8, 0.14);
  --header: 78px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Aptos", "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0;
}

body.nav-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

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

p,
h1,
h2,
h3,
h4,
figure {
  margin: 0;
}

p + p {
  margin-top: 1rem;
}

main {
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  z-index: 1000;
  transform: translateY(-160%);
  background: var(--gold);
  color: var(--black);
  padding: 0.7rem 1rem;
  border-radius: 6px;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header);
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 900;
  line-height: 1.1;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.brand span {
  display: block;
  max-width: 12rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  color: #27302d;
  font-weight: 750;
}

.nav-links a:hover,
.nav-links a:focus,
.nav-links a[aria-current="page"] {
  background: var(--wash);
  color: var(--red);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  align-items: center;
  justify-content: center;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  content: "";
  position: relative;
}

.nav-toggle span::before {
  position: absolute;
  top: -7px;
}

.nav-toggle span::after {
  position: absolute;
  top: 7px;
}

.section {
  padding: 5.5rem 0;
}

.section-tight {
  padding: 3.5rem 0;
}

.band {
  background: var(--wash);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dark-band {
  background: var(--black);
  color: var(--paper);
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.narrow {
  width: min(840px, calc(100% - 40px));
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--gold);
  border-radius: 3px;
}

h1,
.h1 {
  max-width: 13ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4.35rem;
  line-height: 0.98;
  font-weight: 900;
}

h2,
.h2 {
  max-width: 14ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.65rem;
  line-height: 1.06;
  font-weight: 900;
}

h3 {
  font-size: 1.35rem;
  line-height: 1.2;
}

.lead {
  max-width: 66ch;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.7;
}

.dark-band .lead,
.hero .lead,
.page-hero .lead {
  color: rgba(255, 255, 255, 0.82);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.7rem;
}

.button,
button.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--red);
  border-radius: 8px;
  background: var(--red);
  color: var(--paper);
  padding: 0.72rem 1.05rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button:hover,
.button:focus {
  transform: translateY(-2px);
  background: #941928;
  border-color: #941928;
}

.button.secondary {
  background: transparent;
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.72);
}

.button.secondary:hover,
.button.secondary:focus {
  background: var(--paper);
  color: var(--black);
  border-color: var(--paper);
}

.button.light {
  background: var(--paper);
  color: var(--black);
  border-color: var(--paper);
}

.button.light:hover,
.button.light:focus {
  background: var(--gold);
  border-color: var(--gold);
}

.button.ghost {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}

.button.ghost:hover,
.button.ghost:focus {
  background: var(--red);
  color: var(--paper);
}

.hero {
  min-height: calc(84svh - var(--header));
  display: grid;
  align-items: end;
  background-image: linear-gradient(90deg, rgba(8, 8, 8, 0.92), rgba(8, 8, 8, 0.62) 45%, rgba(8, 8, 8, 0.2)), url("../img/hero-fantasia-biblioteca.jpg");
  background-size: cover;
  background-position: 50% 50%;
  color: var(--paper);
  padding: 5rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.7fr);
  gap: 2rem;
  align-items: end;
}

.hero h1 {
  margin-bottom: 1.3rem;
}

.hero-aside {
  border-left: 4px solid var(--gold);
  padding-left: 1.3rem;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.metric {
  min-height: 118px;
  padding: 1.6rem;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric strong {
  display: block;
  color: var(--red);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.05rem;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 0.55rem;
  color: var(--muted);
  font-weight: 750;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 3rem;
  align-items: center;
}

.split.reverse {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.portrait-frame {
  position: relative;
}

.portrait-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.caption-chip {
  position: absolute;
  right: -1rem;
  bottom: 1.2rem;
  max-width: 260px;
  border-radius: 8px;
  background: var(--black);
  color: var(--paper);
  padding: 1rem;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.text-stack > * + * {
  margin-top: 1.15rem;
}

.feature-list {
  display: grid;
  gap: 0.8rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.85rem;
  align-items: start;
  color: #2e3834;
  font-weight: 720;
}

.feature-list li::before {
  content: "";
  width: 18px;
  height: 18px;
  margin-top: 0.35rem;
  border-radius: 5px;
  background: var(--teal);
  box-shadow: inset 0 0 0 5px var(--wash);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.section-head .lead {
  max-width: 42rem;
}

.book-grid,
.article-grid,
.event-grid,
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.3rem;
}

.book-grid.four {
  grid-template-columns: repeat(4, 1fr);
}

.book-card,
.article-card,
.event-card,
.resource-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  overflow: hidden;
}

.book-card {
  display: flex;
  flex-direction: column;
}

.book-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--wash);
}

.book-card-body,
.article-card-body,
.event-card-body,
.resource-card {
  padding: 1.2rem;
}

.book-card h3,
.article-card h3,
.event-card h3,
.resource-card h3 {
  margin-bottom: 0.55rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 6px;
  background: var(--wash);
  color: var(--forest);
  padding: 0.18rem 0.55rem;
  font-size: 0.84rem;
  font-weight: 850;
}

.article-card img,
.event-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.article-meta {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--red);
  font-size: 0.9rem;
  font-weight: 850;
}

.inline-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-top: 0.9rem;
  color: var(--red);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.quote-band {
  background: var(--teal);
  color: var(--paper);
  padding: 4.5rem 0;
}

.quote-band blockquote {
  margin: 0;
  max-width: 980px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.1rem;
  line-height: 1.25;
  font-weight: 900;
}

.gallery {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  grid-template-rows: 260px 260px;
  gap: 1rem;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.gallery img:first-child {
  grid-row: 1 / 3;
}

.page-hero {
  min-height: 430px;
  display: grid;
  align-items: end;
  color: var(--paper);
  padding: 5rem 0 4rem;
  background-size: cover;
  background-position: center;
  position: relative;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 8, 8, 0.86), rgba(8, 8, 8, 0.48), rgba(8, 8, 8, 0.18));
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  margin-bottom: 1rem;
}

.hero-sobre {
  background-image: url("../img/hero3.jpg");
}

.hero-livros {
  background-image: url("../img/featured-image-5.jpg");
}

.hero-blog {
  background-image: url("../img/89dee3a7a2bf04e6bdb3e5f8850755c841aacb4c.jpg");
}

.hero-eventos {
  background-image: url("../img/a0be258eccba40f998f0c92108eec18cbcecf816.jpg");
}

.hero-contato {
  background-image: url("../img/70d30cc3e2f7160c01602db40086c10f13c63a99.jpg");
}

.timeline {
  display: grid;
  gap: 1rem;
  padding: 0;
  list-style: none;
  margin: 2rem 0 0;
}

.timeline li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.timeline strong {
  color: var(--red);
  font-size: 1.05rem;
}

.book-detail {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  border-top: 1px solid var(--line);
  padding: 2rem 0;
}

.book-detail:first-child {
  border-top: 0;
  padding-top: 0;
}

.book-detail img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 3rem;
  align-items: start;
}

.prose {
  max-width: 760px;
}

.prose > * + * {
  margin-top: 1.15rem;
}

.prose h2 {
  margin-top: 2rem;
  font-size: 2rem;
}

.prose ul {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.prose li + li {
  margin-top: 0.55rem;
}

.prose blockquote {
  margin: 2rem 0;
  border-left: 5px solid var(--gold);
  padding: 0.35rem 0 0.35rem 1.2rem;
  color: #1f2724;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  line-height: 1.35;
  font-weight: 850;
}

.side-panel {
  position: sticky;
  top: calc(var(--header) + 1.5rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.2rem;
  background: var(--wash);
}

.side-panel img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2rem;
  align-items: start;
}

.contact-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.3rem;
  background: var(--paper);
}

.contact-list {
  display: grid;
  gap: 0.9rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.contact-list a {
  color: var(--red);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

label {
  font-weight: 850;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #cbd6cf;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  min-height: 48px;
  padding: 0.75rem 0.85rem;
  font: inherit;
}

textarea {
  min-height: 156px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: 3px solid rgba(0, 124, 114, 0.18);
  border-color: var(--teal);
}

.site-footer {
  background: var(--black);
  color: var(--paper);
  padding: 3rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

.footer-grid h2,
.footer-grid h3 {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.3;
  margin-bottom: 0.8rem;
}

.footer-grid p,
.footer-grid a {
  color: rgba(255, 255, 255, 0.76);
}

.footer-links {
  display: grid;
  gap: 0.45rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-links a:hover,
.footer-links a:focus {
  color: var(--gold);
}

.footer-bottom {
  margin-top: 2.3rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    inset: var(--header) 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 20px 1.4rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  body.nav-open .nav-links {
    display: flex;
  }

  .nav-links a {
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    padding: 0.85rem 0;
  }

  .hero {
    min-height: 74svh;
    padding: 4rem 0 3rem;
    background-position: 42% 24%;
  }

  .hero-grid,
  .split,
  .split.reverse,
  .article-layout,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .metric-strip,
  .book-grid,
  .book-grid.four,
  .article-grid,
  .event-grid,
  .resource-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(3) {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 240px 240px 240px;
  }

  .gallery img:first-child {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .nav-wrap,
  .container,
  .narrow {
    width: min(100% - 28px, 1180px);
  }

  .brand span {
    max-width: 9rem;
  }

  h1,
  .h1 {
    font-size: 2.75rem;
    line-height: 1.02;
  }

  h2,
  .h2 {
    font-size: 2.05rem;
  }

  .lead {
    font-size: 1.03rem;
  }

  .section {
    padding: 4rem 0;
  }

  .section-tight {
    padding: 2.5rem 0;
  }

  .hero {
    min-height: 72svh;
  }

  .hero-aside {
    display: none;
  }

  .metric-strip,
  .book-grid,
  .book-grid.four,
  .article-grid,
  .event-grid,
  .resource-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .metric {
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .metric:first-child {
    border-top: 0;
  }

  .metric:nth-child(3) {
    grid-column: auto;
  }

  .caption-chip {
    position: static;
    margin-top: 0.85rem;
    max-width: none;
  }

  .quote-band blockquote {
    font-size: 1.55rem;
  }

  .timeline li,
  .book-detail {
    grid-template-columns: 1fr;
  }

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

  .gallery {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, 220px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
