:root {
  --paper: #f2e4c4;
  --paper-alt: #ead6ab;
  --ink: #3b2a18;
  --ink-muted: #6b5a42;
  --rubric: #7a1f1f;
  --rubric-dark: #591515;
  --gold: #9c7a2d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "EB Garamond", "Georgia", serif;
  color: var(--ink);
  line-height: 1.75;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(122, 31, 31, 0.05), transparent 40%),
    radial-gradient(circle at 85% 12%, rgba(156, 122, 45, 0.08), transparent 38%),
    radial-gradient(circle at 78% 82%, rgba(122, 31, 31, 0.06), transparent 42%),
    radial-gradient(circle at 15% 88%, rgba(156, 122, 45, 0.07), transparent 40%);
  max-width: 880px;
  margin: 2rem auto;
  border: 3px solid var(--rubric);
  box-shadow:
    0 0 0 7px var(--paper),
    0 0 0 9px var(--gold),
    0 25px 70px rgba(20, 10, 0, 0.45);
  position: relative;
}

header {
  text-align: center;
  padding: 2.25rem 2rem 1.5rem;
  position: relative;
}

header h1 {
  font-family: "Cinzel", serif;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 600;
  color: var(--rubric);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

header h1::before,
header h1::after {
  content: "✠";
  color: var(--gold);
  font-size: 0.8em;
  margin: 0 0.6rem;
  vertical-align: middle;
}

.menu-toggle {
  display: none;
  margin: 1rem auto 0;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.menu-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s ease;
}

.menu-toggle:hover {
  border-color: var(--rubric);
  color: var(--rubric);
}

.menu-toggle[aria-expanded="true"] {
  transform: rotate(180deg);
}

nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gold);
}

nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

nav a.active {
  color: var(--rubric);
  font-weight: 600;
  border-bottom: 1px solid var(--rubric);
}

nav a:hover {
  color: var(--rubric);
}

.hero {
  text-align: center;
  padding: 1rem 2rem 2rem;
}

.hero h2 {
  font-family: "Cinzel", serif;
  font-size: clamp(1.3rem, 3.4vw, 1.75rem);
  font-weight: 600;
  color: var(--rubric);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.hero h2::before {
  content: "✝ ";
}

.hero img {
  max-width: 260px;
  width: 100%;
  height: auto;
}

.img-fluid {
  max-width: 260px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--gold);
  box-shadow:
    0 0 0 5px var(--paper),
    0 0 0 6px var(--gold),
    0 12px 30px rgba(20, 10, 0, 0.35);
  filter: sepia(0.25) contrast(1.02);
}

section {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 2rem 3rem;
}

.font-controls {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.font-controls button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--paper-alt);
  color: var(--rubric);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.font-controls button:hover {
  background: var(--rubric);
  color: var(--paper);
  transform: translateY(-1px);
}

#sobre {
  font-size: 1rem;
  transition: font-size 0.15s ease;
}

#sobre h3 {
  font-family: "Cinzel", serif;
  font-size: 1.15em;
  font-weight: 600;
  color: var(--rubric);
  margin-bottom: 0.9em;
  letter-spacing: 0.02em;
}

#sobre h3::before {
  content: "✝ ";
}

#sobre h3:not(:first-of-type) {
  border-top: 1px solid var(--gold);
  padding-top: 1.85em;
  margin-top: 2.5em;
}

#sobre h4 {
  font-family: "EB Garamond", serif;
  font-style: italic;
  font-weight: 600;
  color: var(--rubric-dark);
  font-size: 1.05em;
  margin: 0.75em 0;
}

#sobre p {
  font-size: 1.15em;
  color: var(--ink);
  text-align: justify;
}

#sobre p:first-of-type::first-letter {
  font-family: "Cinzel", serif;
  float: left;
  font-size: 3.4em;
  line-height: 0.8;
  padding: 0.1em 0.35em 0 0;
  color: var(--rubric);
}

#pedido {
  color: var(--rubric);
  font-style: italic;
}

footer {
  text-align: center;
  padding: 1.5rem 2rem 2rem;
  border-top: 1px solid var(--gold);
  color: var(--ink-muted);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

@media (max-width: 640px) {
  body {
    margin: 1rem;
    box-shadow:
      0 0 0 5px var(--paper),
      0 0 0 6px var(--gold),
      0 15px 40px rgba(20, 10, 0, 0.4);
  }

  header {
    padding: 1.75rem 1rem 1.25rem;
  }

  header h1 {
    font-size: clamp(0.95rem, 4.6vw, 1.15rem);
    letter-spacing: 0.01em;
    white-space: nowrap;
  }

  header h1::before,
  header h1::after {
    margin: 0 0.25rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 1rem;
    padding-top: 0;
    border-top: 1px solid var(--gold);
    transform: translateY(-6px);
    transition:
      max-height 0.4s ease,
      opacity 0.3s ease,
      transform 0.35s ease,
      padding-top 0.4s ease;
  }

  nav.show {
    max-height: 28rem;
    opacity: 1;
    padding-top: 1rem;
    transform: translateY(0);
  }

  nav a {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease, color 0.2s ease;
  }

  nav.show a {
    opacity: 1;
    transform: translateY(0);
  }

  nav.show a:nth-child(1) { transition-delay: 0.05s; }
  nav.show a:nth-child(2) { transition-delay: 0.1s; }
  nav.show a:nth-child(3) { transition-delay: 0.15s; }
  nav.show a:nth-child(4) { transition-delay: 0.2s; }
  nav.show a:nth-child(5) { transition-delay: 0.25s; }
  nav.show a:nth-child(6) { transition-delay: 0.3s; }
  nav.show a:nth-child(7) { transition-delay: 0.35s; }

  @media (prefers-reduced-motion: reduce) {
    nav,
    nav a {
      transition: none;
    }
  }

  section {
    padding: 1.5rem 1.25rem 2.5rem;
  }
}
