:root {
  --ink: #14212b;
  --muted: #5e6a72;
  --paper: #fffdf8;
  --soft: #f4efe4;
  --line: #ddd4c1;
  --accent: #ad6b2f;
  --accent-dark: #80491f;
  --deep: #183d48;
  --light: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid rgba(221, 212, 193, 0.8);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: max-content;
}

.brand-logo {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.site-nav a {
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a:hover,
.site-nav a.active {
  background: var(--deep);
  color: var(--light);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--light);
  color: var(--ink);
  padding: 9px 12px;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: calc(100vh - 76px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--deep);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 33, 43, 0.82), rgba(20, 33, 43, 0.28));
}

.hero-content {
  position: relative;
  width: min(860px, 100%);
  padding: 12vh clamp(22px, 6vw, 76px);
  color: var(--light);
}

.eyebrow,
.section-kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f2c57e;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 1;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
}

h3 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.15;
}

.hero-content p:not(.eyebrow),
.page-hero p:not(.eyebrow) {
  max-width: 680px;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 18px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: var(--accent);
  color: var(--light);
}

.button.primary:hover {
  background: var(--accent-dark);
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--light);
}

.button.neutral {
  border-color: var(--line);
  background: var(--light);
  color: var(--ink);
}

.button.neutral:hover {
  background: var(--soft);
}

.button.small {
  margin-top: 10px;
  background: var(--deep);
  color: var(--light);
}

.section {
  padding: clamp(54px, 8vw, 96px) clamp(20px, 5vw, 72px);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  background: var(--paper);
}

.intro-grid > p {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
}

.feature-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding-top: 0;
  padding-bottom: 0;
  background: var(--line);
}

.feature-band article {
  min-height: 260px;
  padding: clamp(28px, 4vw, 48px);
  background: var(--soft);
}

.feature-band span {
  display: block;
  color: var(--accent);
  font-weight: 900;
  margin-bottom: 42px;
}

.feature-band p,
.resource-grid p,
.info-card p,
.church-list p,
.split-copy p,
.contact-panel p {
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
}

.split img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}

.text-link {
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.page-hero {
  min-height: 420px;
  display: grid;
  align-items: end;
  padding: clamp(90px, 14vw, 160px) clamp(20px, 5vw, 72px) clamp(48px, 8vw, 86px);
  color: var(--light);
  background-position: center;
  background-size: cover;
}

.page-hero > div {
  max-width: 820px;
}

.page-hero.churches {
  background-image: linear-gradient(90deg, rgba(20, 33, 43, 0.85), rgba(20, 33, 43, 0.22)), url("https://images.unsplash.com/photo-1438232992991-995b7058bbb3?auto=format&fit=crop&w=1600&q=80");
}

.page-hero.contact {
  background-image: linear-gradient(90deg, rgba(20, 33, 43, 0.86), rgba(20, 33, 43, 0.25)), url("assets/images/grupo-alabanza.jpg");
}

.page-hero.material {
  background-image: linear-gradient(90deg, rgba(20, 33, 43, 0.86), rgba(20, 33, 43, 0.25)), url("assets/images/interior-iglesia.jpg");
}

.page-hero.document {
  background-image: linear-gradient(90deg, rgba(20, 33, 43, 0.88), rgba(20, 33, 43, 0.28)), url("assets/images/interior-iglesia.jpg");
}

.page-hero.gallery {
  background-image: linear-gradient(90deg, rgba(20, 33, 43, 0.86), rgba(20, 33, 43, 0.25)), url("assets/images/hermanos-musica.jpg");
}

.page-hero.activities {
  background-image: linear-gradient(90deg, rgba(20, 33, 43, 0.86), rgba(20, 33, 43, 0.25)), url("assets/images/grupo-alabanza.jpg");
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.info-card,
.resource-grid article,
.contact-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--light);
  overflow: hidden;
}

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

.info-card div,
.resource-grid article,
.contact-panel {
  padding: clamp(22px, 4vw, 34px);
}

.church-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.church-list section {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.church-list h3 {
  font-size: 20px;
}

.church-list p {
  margin: 0;
}

.schedule {
  background: var(--soft);
}

.schedule-list {
  display: grid;
  gap: 12px;
  max-width: 900px;
}

.schedule-list p {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  margin: 0;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 0.65fr);
  gap: 28px;
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--light);
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  padding: 12px 14px;
}

textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.activity-grid article {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--light);
  padding: clamp(22px, 4vw, 34px);
}

.activity-grid span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.activity-grid h2 {
  font-size: 25px;
}

.activity-grid p {
  color: var(--muted);
}

.activity-status {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-weight: 800;
}

.featured-activity {
  padding-top: 0;
  text-align: center;
}

.featured-activity img {
  width: min(420px, 100%);
  margin: 0 auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(20, 33, 43, 0.16);
}

.featured-activity a {
  display: inline-block;
}

.resource-grid h2 {
  font-size: 24px;
}

.printable-section {
  background: var(--soft);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 26px;
}

.printable-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--light);
  padding: clamp(22px, 4vw, 34px);
}

.printable-card h3 {
  font-size: 24px;
  text-transform: uppercase;
}

.printable-card p {
  margin: 0;
  color: var(--muted);
}

.protected-document-page {
  user-select: none;
}

.digital-book-section {
  background: var(--soft);
}

.book-notice {
  width: min(980px, 100%);
  margin: 0 auto 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--light);
  padding: 14px 18px;
}

.book-notice p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.digital-book {
  position: relative;
  width: min(980px, 100%);
  height: min(78vh, 860px);
  min-height: 620px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(90deg, #ece3d0, #fffdf8 8%, #fffdf8 92%, #ece3d0);
  box-shadow: 0 24px 60px rgba(20, 33, 43, 0.2);
  overflow: hidden;
}

.book-spine {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: 28px;
  background: linear-gradient(90deg, rgba(20, 33, 43, 0.22), rgba(20, 33, 43, 0));
  pointer-events: none;
}

.digital-book iframe {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--light);
}

.quote-band,
.media-callout,
.announcement-band {
  background: var(--deep);
  color: var(--light);
}

.quote-band p {
  max-width: 980px;
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1.06;
}

.quote-band span {
  color: #f2c57e;
  font-weight: 800;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.gallery-grid figure {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--light);
  border: 1px solid var(--line);
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.gallery-grid figcaption {
  padding: 14px;
  font-weight: 800;
}

.multimedia-sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.multimedia-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--light);
}

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

.multimedia-card > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: clamp(22px, 4vw, 34px);
}

.multimedia-card h2 {
  font-size: 27px;
}

.multimedia-card p:not(.section-kicker) {
  color: var(--muted);
}

.multimedia-card .button {
  align-self: flex-start;
  margin-top: auto;
}

.audio-item {
  margin: 18px 0 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.audio-item h3 {
  font-size: 18px;
  text-transform: uppercase;
}

.audio-item p {
  margin: 0 0 12px;
}

.audio-item audio {
  width: 100%;
}

.media-callout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.media-callout h2,
.announcement-band h2 {
  color: var(--light);
}

.media-callout p,
.announcement-band p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.announcement-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(20px, 5vw, 72px);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.82);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--light);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--light);
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

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

  .site-nav {
    display: none;
    width: 100%;
    justify-content: flex-start;
  }

  .site-nav.open {
    display: flex;
  }

  .intro-grid,
  .split,
  .contact-layout,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .feature-band,
  .resource-grid,
  .activity-grid,
  .multimedia-sections,
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: auto;
  }

  .brand {
    min-width: 0;
  }

  .brand small {
    font-size: 11px;
  }

  .site-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a {
    border-radius: 8px;
  }

  .hero {
    min-height: 690px;
  }

  .hero-content {
    padding-top: 80px;
  }

  h1 {
    font-size: clamp(38px, 14vw, 56px);
  }

  .feature-band,
  .resource-grid,
  .activity-grid,
  .multimedia-sections,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .schedule-list p {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .media-callout,
  .announcement-band,
  .printable-card,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
