:root {
  --green: #263c2f;
  --green-soft: #dfe9dc;
  --moss: #657c4f;
  --stone: #f3efe6;
  --stone-deep: #d5c7ad;
  --ink: #1d231f;
  --muted: #5d665f;
  --gold: #b8873f;
  --wine: #793f3f;
  --white: #fffdf8;
  --shadow: 0 24px 70px rgba(28, 35, 31, 0.18);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

.skip-link,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link:focus {
  z-index: 1000;
  width: auto;
  height: auto;
  clip: auto;
  top: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--white);
  border-radius: 4px;
}

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  color: var(--white);
  transition: background 180ms ease, box-shadow 180ms ease, padding 180ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(38, 60, 47, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  min-width: 0;
}

.brand img {
  width: 42px;
  height: 46px;
  object-fit: contain;
}

.brand span {
  display: grid;
  line-height: 1.15;
}

.brand strong {
  font-size: 0.96rem;
  letter-spacing: 0.02em;
}

.brand small {
  color: rgba(255, 253, 248, 0.78);
  font-size: 0.78rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  font-size: 0.92rem;
}

.site-nav a {
  color: rgba(255, 253, 248, 0.9);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--white);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  padding: 8rem clamp(1rem, 5vw, 4rem) 4rem;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, #1d2a23, #4f5d45);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 25, 20, 0.94), rgba(17, 25, 20, 0.45) 48%, rgba(17, 25, 20, 0.1)),
    linear-gradient(0deg, rgba(17, 25, 20, 0.9), rgba(17, 25, 20, 0.08) 42%);
  z-index: 1;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(780px, 100%);
}

.eyebrow,
.section-label {
  margin: 0 0 0.8rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  line-height: 1.04;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

h1 {
  max-width: 760px;
  margin-bottom: 1.25rem;
  font-size: clamp(3.15rem, 8vw, 7.8rem);
}

h2 {
  font-size: clamp(2rem, 4.8vw, 4.6rem);
}

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

.hero-copy {
  max-width: 680px;
  color: rgba(255, 253, 248, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.78rem 1rem;
  border-radius: 4px;
  font-weight: 800;
  text-decoration: none;
}

.button-primary {
  background: var(--gold);
  color: #19150f;
}

.button-secondary {
  border: 1px solid rgba(255, 253, 248, 0.5);
  color: var(--white);
}

.hero-panel {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  margin-top: 4rem;
  border-top: 1px solid rgba(255, 253, 248, 0.24);
}

.hero-panel dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0;
}

.hero-panel div {
  padding: 1.2rem 1.2rem 0 0;
}

.hero-panel dt {
  color: rgba(255, 253, 248, 0.6);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.hero-panel dd {
  margin: 0.2rem 0 0;
  font-weight: 800;
}

.section-pad {
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 5vw, 4rem);
}

.intro,
.split,
.visit,
.nature {
  max-width: calc(var(--max) + 8rem);
  margin: 0 auto;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.75fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.intro-grid p,
.split-text p,
.romeria-content p,
.nature-copy p,
.route-panel p {
  color: var(--muted);
  font-size: 1.08rem;
}

.section-stone {
  background: var(--stone);
}

.section-heading {
  max-width: var(--max);
  margin: 0 auto 2.5rem;
}

.history .section-heading p:last-child {
  max-width: 820px;
  color: var(--muted);
  font-size: 1.08rem;
}

.history-diagram {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  position: relative;
}

.history-diagram::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 2.1rem;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--moss), var(--wine));
  opacity: 0.35;
}

.history-node {
  position: relative;
  z-index: 1;
  grid-column: span 2;
  min-height: 245px;
  padding: 1.35rem;
  border: 1px solid var(--stone-deep);
  border-radius: 6px;
  background: var(--white);
}

.history-node-major {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.history-node-alert {
  background: #fff8eb;
  border-color: #d8aa68;
}

.history-node::before {
  content: "";
  position: absolute;
  top: 1.82rem;
  left: 1.35rem;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 6px rgba(184, 135, 63, 0.16);
}

.history-node span {
  display: inline-flex;
  margin-bottom: 1rem;
  padding-left: 1.35rem;
  color: var(--wine);
  font-weight: 900;
}

.card-number {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--wine);
  font-weight: 900;
}

.history-node-major span {
  color: var(--gold);
}

.history-node p,
.visit-card p {
  color: var(--muted);
}

.history-node-major p {
  color: rgba(255, 253, 248, 0.76);
}

.anniversary {
  max-width: calc(var(--max) + 8rem);
  margin: 0 auto;
}

.anniversary-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.8fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  margin-bottom: 2.5rem;
}

.anniversary-intro p {
  color: var(--muted);
  font-size: 1.08rem;
}

.anniversary-intro a {
  color: var(--green);
  font-weight: 800;
}

.photo-archive {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.photo-archive figure {
  margin: 0;
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--green);
  box-shadow: var(--shadow);
}

.photo-archive .photo-wide {
  grid-column: span 2;
}

.photo-archive img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  filter: contrast(1.04);
}

.photo-archive figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.2rem;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(0deg, rgba(17, 25, 20, 0.85), rgba(17, 25, 20, 0));
}

.archive-subtitle {
  max-width: var(--max);
  margin: 0 0 1rem;
  color: var(--green);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.anniversary-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.anniversary-gallery a {
  display: grid;
  gap: 0.55rem;
  padding: 0.7rem;
  border: 1px solid #e1d8c8;
  border-radius: 6px;
  background: #fffaf0;
  color: var(--ink);
  text-decoration: none;
}

.anniversary-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1.32;
  object-fit: cover;
  object-position: top;
  border-radius: 4px;
}

.anniversary-gallery span {
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--green);
}

.prayer-shell {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.7fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.prayer-copy h2 {
  max-width: 760px;
}

.prayer-card {
  margin-top: 1.8rem;
  padding: clamp(1.4rem, 3vw, 2.35rem);
  border-left: 5px solid var(--gold);
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 18px 52px rgba(28, 35, 31, 0.12);
}

.prayer-card p {
  margin-bottom: 1.15rem;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  line-height: 1.58;
}

.prayer-card p:last-child {
  margin-bottom: 0;
}

.prayer-card strong,
.prayer-card .amen {
  color: var(--wine);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prayer-card .amen {
  font-weight: 800;
  text-align: right;
}

.source-link {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--green);
  font-weight: 900;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.24em;
}

.prayer-image {
  margin: 0;
}

.prayer-image img {
  width: 100%;
  min-height: 520px;
  object-fit: cover;
  object-position: center;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.prayer-image figcaption {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.72fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.check-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  padding-left: 1.65rem;
  position: relative;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.62rem;
  height: 0.62rem;
  background: var(--gold);
  border-radius: 50%;
}

.image-stack {
  margin: 0;
}

.image-stack img {
  width: 100%;
  min-height: 420px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.image-stack figcaption {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.romeria {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  min-height: 720px;
  padding-left: 0;
  padding-right: 0;
  background: var(--green);
  color: var(--white);
}

.romeria-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.romeria-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 5rem);
}

.romeria-content p {
  color: rgba(255, 253, 248, 0.76);
}

.romeria-notes {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.romeria-notes article {
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
}

.romeria-notes strong,
.romeria-notes span {
  display: block;
}

.romeria-notes span {
  color: rgba(255, 253, 248, 0.72);
}

.events .section-heading p:last-child {
  max-width: 820px;
  color: var(--muted);
  font-size: 1.08rem;
}

.events-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.event-card {
  min-height: 260px;
  padding: 1.35rem;
  border: 1px solid var(--stone-deep);
  border-radius: 6px;
  background: var(--white);
}

.event-card-featured {
  grid-column: span 2;
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.event-card span {
  display: inline-flex;
  margin-bottom: 0.8rem;
  color: var(--wine);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-card-featured span {
  color: var(--gold);
}

.event-card p {
  color: var(--muted);
}

.event-card-featured p {
  color: rgba(255, 253, 248, 0.76);
}

.visit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.visit-card {
  min-height: 280px;
  padding: 1.5rem;
  border: 1px solid #e1d8c8;
  border-radius: 6px;
  background: #fffaf0;
}

.visit-card a {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--green);
  font-weight: 800;
}

.nature .section-heading {
  max-width: var(--max);
}

.route-explorer {
  display: grid;
  grid-template-columns: minmax(280px, 0.55fr) minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.route-list {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.route-card {
  width: 100%;
  padding: 1rem;
  border: 1px solid #e1d8c8;
  border-radius: 6px;
  background: #fffaf0;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.route-card:hover,
.route-card:focus {
  border-color: var(--gold);
  outline: none;
  transform: translateY(-1px);
}

.route-card.is-active {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.route-card span,
.route-panel span {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.route-card strong {
  display: block;
  line-height: 1.18;
  font-size: 1.02rem;
}

.route-card small {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.route-card.is-active small {
  color: rgba(255, 253, 248, 0.72);
}

.route-detail {
  min-height: 520px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(38, 60, 47, 0.92), rgba(38, 60, 47, 0.65)),
    url("assets/santuario-brezo-panoramica.png") center / cover;
  padding: clamp(1rem, 3vw, 2rem);
  color: var(--white);
}

.route-panel {
  display: grid;
  align-content: end;
  min-height: 460px;
  max-width: 760px;
}

.route-panel[hidden] {
  display: none;
}

.route-panel h3 {
  max-width: 680px;
  margin-bottom: 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1.04;
}

.route-panel p {
  max-width: 700px;
  color: rgba(255, 253, 248, 0.82);
}

.route-panel dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.4rem 0;
}

.route-panel dl div {
  padding: 0.85rem;
  border: 1px solid rgba(255, 253, 248, 0.24);
  border-radius: 6px;
  background: rgba(255, 253, 248, 0.1);
}

.route-panel dt {
  color: rgba(255, 253, 248, 0.62);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-panel dd {
  margin: 0.16rem 0 0;
  font-weight: 900;
}

.route-panel a {
  justify-self: start;
  min-height: 44px;
  padding: 0.68rem 0.95rem;
  border-radius: 4px;
  background: var(--gold);
  color: #19150f;
  font-weight: 900;
  text-decoration: none;
}

.nature-gallery {
  display: grid;
  grid-template-columns: 0.72fr 1fr;
  gap: 1rem;
  align-items: end;
}

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

.nature-gallery img:first-child {
  aspect-ratio: 3 / 4;
}

.nature-gallery img:last-child {
  aspect-ratio: 4 / 3;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem clamp(1rem, 5vw, 4rem);
  background: #17231c;
  color: rgba(255, 253, 248, 0.8);
}

.site-footer div {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.site-footer img {
  width: 38px;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--white);
  font-weight: 800;
}

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

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    padding: 0.5rem 1rem 1rem;
    background: rgba(38, 60, 47, 0.98);
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    padding: 0.85rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .hero {
    min-height: 860px;
  }

  .intro-grid,
  .split,
  .prayer-shell,
  .romeria,
  .nature {
    grid-template-columns: 1fr;
  }

  .history-diagram,
  .events-grid,
  .visit-grid,
  .route-explorer,
  .photo-archive,
  .anniversary-gallery,
  .anniversary-intro {
    grid-template-columns: 1fr 1fr;
  }

  .history-node {
    grid-column: span 1;
  }

  .event-card-featured {
    grid-column: span 2;
  }

  .romeria {
    min-height: auto;
  }

  .romeria-media img {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 0.8rem 1rem;
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: 780px;
    padding-top: 6rem;
  }

  h1 {
    font-size: 3.05rem;
  }

  .hero-actions {
    display: grid;
  }

  .hero-panel dl,
  .history-diagram,
  .events-grid,
  .visit-grid,
  .route-explorer,
  .route-panel dl,
  .nature-gallery,
  .photo-archive,
  .anniversary-gallery,
  .anniversary-intro {
    grid-template-columns: 1fr;
  }

  .photo-archive .photo-wide {
    grid-column: auto;
  }

  .event-card-featured {
    grid-column: auto;
  }

  .history-diagram::before {
    display: none;
  }

  .history-node {
    grid-column: auto;
  }

  .history-node {
    border-right: 0;
  }

  .image-stack img {
    min-height: 320px;
  }

  .prayer-image img {
    min-height: 340px;
  }

  .route-detail {
    min-height: auto;
  }

  .route-panel {
    min-height: 420px;
  }

  .site-footer {
    display: grid;
  }
}
