:root {
  color-scheme: dark;
  --bg: #080706;
  --bg-soft: #130f0e;
  --surface: #1b1513;
  --surface-strong: #2a1716;
  --text: #fffaf2;
  --muted: #d7cbbd;
  --line: rgba(246, 209, 122, 0.22);
  --gold: #f6d17a;
  --gold-dark: #c9972d;
  --red: #7b1113;
  --red-bright: #a91f24;
  --black: #050505;
  --white: #ffffff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 8px;
  --container: min(1120px, calc(100% - 32px));
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fffaf1;
  --bg-soft: #fff2da;
  --surface: #ffffff;
  --surface-strong: #f8e6c5;
  --text: #1e1814;
  --muted: #5e5248;
  --line: rgba(123, 17, 19, 0.18);
  --shadow: 0 24px 72px rgba(123, 17, 19, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

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

body.menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9999;
  transform: translateY(-160%);
  border-radius: var(--radius);
  background: var(--gold);
  color: var(--black);
  padding: 10px 14px;
  font-weight: 800;
  transition: transform 0.2s ease;
}

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

.container {
  width: var(--container);
  margin: 0 auto;
}

.section {
  padding: 92px 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 7, 6, 0.82);
  backdrop-filter: blur(18px);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

:root[data-theme="light"] .site-header {
  background: rgba(255, 250, 241, 0.86);
}

.site-header.is-scrolled {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.navbar {
  width: var(--container);
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
}

.site-footer .footer-brand {
  color: var(--white);
}

.logo-wrap,
.hero-logo-wrap {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--red));
  box-shadow: 0 0 26px rgba(246, 209, 122, 0.35);
}

.logo-wrap {
  width: 48px;
  height: 48px;
}

.logo-wrap.small {
  width: 42px;
  height: 42px;
}

.hero-logo-wrap {
  width: min(100%, 300px);
  aspect-ratio: 1;
  margin: 0 auto 24px;
}

.logo-wrap img,
.hero-logo-wrap img {
  position: relative;
  z-index: 2;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
}

.logo-fallback {
  position: absolute;
  inset: 3px;
  z-index: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: var(--gold);
  font-weight: 900;
}

.logo-fallback.large {
  font-size: 4rem;
}

.logo-missing img {
  display: none;
}

.logo-missing .logo-fallback {
  z-index: 3;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a,
.theme-toggle {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.theme-toggle:hover {
  background: rgba(246, 209, 122, 0.12);
  color: var(--text);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  position: relative;
  min-height: calc(100vh - 78px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(8, 7, 6, 0.96), rgba(123, 17, 19, 0.76)),
    radial-gradient(circle at 75% 35%, rgba(246, 209, 122, 0.22), transparent 34%);
}

:root[data-theme="light"] .hero-overlay {
  background:
    linear-gradient(115deg, rgba(255, 250, 241, 0.94), rgba(255, 236, 196, 0.78)),
    radial-gradient(circle at 75% 35%, rgba(123, 17, 19, 0.16), transparent 34%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 28%;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.7fr);
  align-items: center;
  gap: 48px;
  padding: 56px 0;
}

.eyebrow,
.card-label {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 800px;
  margin-bottom: 12px;
  font-size: clamp(3rem, 8vw, 6.7rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.3;
}

.hero-subtitle {
  color: var(--gold);
  font-size: clamp(1.08rem, 2.3vw, 1.5rem);
  font-weight: 800;
}

.hero-description,
.section-heading p,
.about-content p,
.featured-info p {
  color: var(--muted);
}

.hero-description {
  max-width: 660px;
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 0 20px;
  text-decoration: none;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gold);
  color: var(--black);
  box-shadow: 0 14px 32px rgba(246, 209, 122, 0.24);
}

.btn-primary:hover {
  background: #ffe29d;
}

.btn-outline {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
}

.hero-brand-card,
.featured-video,
.readings-panel,
.post-card,
.prayer-box,
.mission-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(246, 209, 122, 0.11), rgba(123, 17, 19, 0.12)), var(--surface);
  box-shadow: var(--shadow);
}

.hero-brand-card {
  padding: 30px;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-heading.compact {
  margin-top: 62px;
  margin-bottom: 18px;
}

.featured-video {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  overflow: hidden;
}

.featured-video iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: var(--black);
}

.featured-info {
  align-self: center;
  padding: 30px;
}

.featured-info a,
.text-link {
  color: var(--gold);
  font-weight: 900;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.video-loader {
  min-height: 320px;
  background: linear-gradient(100deg, var(--surface-strong), rgba(246, 209, 122, 0.18), var(--surface-strong));
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

.status-message {
  min-height: 28px;
  margin-bottom: 18px;
  color: var(--muted);
}

.status-message.error {
  border-left: 4px solid var(--gold);
  background: rgba(246, 209, 122, 0.1);
  padding: 14px 16px;
}

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

.readings-panel {
  padding: clamp(22px, 4vw, 34px);
}

.readings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.readings-header h3 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
}

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

.reading-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  padding: 20px;
}

:root[data-theme="light"] .reading-card {
  background: rgba(123, 17, 19, 0.04);
}

.reading-card h4 {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.reading-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 1.05rem;
}

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

.posts-section {
  background: linear-gradient(180deg, var(--bg), rgba(123, 17, 19, 0.1), var(--bg));
}

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

.post-card {
  padding: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(246, 209, 122, 0.58);
  box-shadow: var(--shadow);
}

.post-card time {
  display: block;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.post-card h3 {
  margin-bottom: 10px;
}

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

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

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

.video-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.video-card:hover {
  transform: translateY(-5px);
  border-color: rgba(246, 209, 122, 0.58);
  box-shadow: var(--shadow);
}

.video-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-strong);
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.video-card:hover .video-thumb img {
  transform: scale(1.05);
}

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--black);
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.play-badge::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid var(--black);
}

.video-card-content {
  padding: 18px;
}

.video-card h3 {
  min-height: 3.2em;
  margin-bottom: 10px;
  font-size: 1rem;
}

.video-card time {
  color: var(--muted);
  font-size: 0.9rem;
}

.prayer-section {
  background: linear-gradient(180deg, transparent, rgba(123, 17, 19, 0.16), transparent);
}

.prayer-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(300px, 1fr);
  gap: 36px;
  align-items: center;
}

.prayer-box {
  padding: clamp(28px, 5vw, 48px);
}

.prayer-box p {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.3rem, 3vw, 2.05rem);
  line-height: 1.45;
}

.cross-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--black);
  font-size: 2rem;
  font-weight: 700;
}

.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.75fr);
  gap: 42px;
  align-items: center;
}

.mission-list {
  display: grid;
  overflow: hidden;
}

.mission-list div {
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.mission-list div:last-child {
  border-bottom: 0;
}

.mission-list strong,
.mission-list span {
  display: block;
}

.mission-list strong {
  margin-bottom: 4px;
  color: var(--gold);
}

.mission-list span {
  color: var(--muted);
}

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

.social-links a {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.social-links a:hover {
  transform: translateY(-3px);
  border-color: rgba(246, 209, 122, 0.58);
  background: var(--surface-strong);
}

.social-links a[aria-disabled="true"] {
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--black);
  color: var(--white);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-inner p {
  margin: 0;
  color: #d7cbbd;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

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

@media (max-width: 900px) {
  .section {
    padding: 76px 0;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 78px;
    left: 16px;
    right: 16px;
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .nav-links.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-links a,
  .theme-toggle {
    justify-content: flex-start;
    min-height: 48px;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid,
  .featured-video,
  .readings-header,
  .prayer-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-brand-card {
    max-width: 420px;
  }

  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .readings-header {
    display: grid;
  }
}

@media (max-width: 620px) {
  :root {
    --container: min(100% - 28px, 1120px);
  }

  .navbar {
    min-height: 70px;
  }

  .brand-text {
    max-width: 174px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-links {
    top: 70px;
  }

  .hero-grid {
    padding: 46px 0;
  }

  .hero-actions,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .video-grid,
  .posts-grid,
  .readings-grid,
  .social-links {
    grid-template-columns: 1fr;
  }

  .featured-info {
    padding: 22px;
  }
}

/* =========================
   LIVE NAVIGATION
========================= */

.live-nav-link {
    color: #d4af37 !important;
    font-weight: 700;
}

.live-nav-link:hover {
    color: #ffffff !important;
}
/* =========================================
   CATHOLIC DISCOVERY — CUSTOM 404 PAGE
========================================= */

body.error-404 {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  padding: 30px 20px;
  background:
    radial-gradient(
      circle at 50% 35%,
      rgba(123, 17, 19, 0.26),
      transparent 42%
    ),
    var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  text-align: center;
  line-height: 1.6;
}

body.error-404::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 15% 20%,
      rgba(246, 209, 122, 0.06),
      transparent 28%
    ),
    radial-gradient(
      circle at 85% 80%,
      rgba(123, 17, 19, 0.12),
      transparent 30%
    );
}

.error-page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  animation: errorAppear 0.8s ease both;
}

.error-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.error-brand img {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 2px solid var(--gold);
  border-radius: 50%;
  object-fit: cover;
}

.error-brand span {
  font-size: 1.05rem;
}

.error-logo-scene {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto 28px;
  display: grid;
  place-items: center;
  perspective: 900px;
}

.error-logo-scene::before {
  content: "";
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: rgba(246, 209, 122, 0.18);
  filter: blur(32px);
  animation: errorGlow 3s ease-in-out infinite;
}

.error-logo-3d {
  position: relative;
  width: 170px;
  height: 170px;
  transform-style: preserve-3d;
  animation: errorSpin3D 7s linear infinite;
}

.error-logo-3d img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 3px solid var(--gold);
  border-radius: 50%;
  object-fit: cover;
  background: var(--red);
  box-shadow:
    0 0 20px rgba(246, 209, 122, 0.3),
    inset 0 0 20px rgba(0, 0, 0, 0.3);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.error-logo-front {
  transform: translateZ(3px);
}

.error-logo-back {
  transform: rotateY(180deg) translateZ(3px);
}

.error-code {
  margin: 0;
  color: var(--gold);
  font-size: clamp(5rem, 18vw, 9rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.07em;
  text-shadow: 0 0 45px rgba(246, 209, 122, 0.12);
}

.error-title {
  margin: 22px 0 12px;
  color: var(--text);
  font-size: clamp(1.6rem, 5vw, 2.5rem);
  line-height: 1.15;
}

.error-description {
  max-width: 480px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.05rem;
}

.error-verse {
  max-width: 520px;
  margin: 28px auto;
  padding: 16px 20px;
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(246, 209, 122, 0.06);
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
}

.error-verse cite {
  display: block;
  margin-top: 8px;
  color: var(--gold);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 700;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.error-btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.error-btn:hover {
  transform: translateY(-3px);
}

.error-btn:focus-visible,
.error-brand:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.error-btn-primary {
  border-color: var(--gold);
  background: var(--gold);
  color: #050505;
}

.error-btn-primary:hover {
  background: #ffe29d;
}

.error-btn-secondary {
  background: var(--surface);
}

.error-btn-secondary:hover {
  border-color: var(--gold);
  background: #2a1716;
}

.error-footer {
  margin-top: 48px;
  color: #a89b8c;
  font-size: 0.85rem;
}

.error-footer p {
  margin-bottom: 12px;
}

.error-footer strong {
  color: var(--gold);
}

@keyframes errorSpin3D {
  from {
    transform: rotateY(0deg) rotateX(5deg);
  }

  to {
    transform: rotateY(360deg) rotateX(5deg);
  }
}

@keyframes errorGlow {
  0%, 100% {
    opacity: 0.55;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes errorAppear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  body.error-404 {
    padding: 24px 18px;
  }

  .error-logo-scene {
    width: 180px;
    height: 180px;
  }

  .error-logo-3d {
    width: 140px;
    height: 140px;
  }

  .error-actions {
    flex-direction: column;
  }

  .error-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.error-404 *,
  body.error-404 *::before,
  body.error-404 *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
body.error-404 {
  background: #080706 !important;
  color: #fffaf2 !important;
}

body.error-404 h1 {
  color: #f6d17a !important;
}


/* ==========================================
   CATHOLIC DISCOVERY — GROWING TOGETHER
   Modern statistics section
   ========================================== */

.stats-section {
  position: relative;
  padding: 58px 20px;
  overflow: hidden;
}

.stats-section .stats-card {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 42px);
  overflow: hidden;
  border: 1px solid rgba(123, 17, 19, 0.14);
  border-radius: 26px;
  background: linear-gradient(145deg, #fffdf9 0%, #f8efe5 100%);
  box-shadow: 0 18px 50px rgba(62, 22, 24, 0.09);
}

/* Header area: cross, text and live indicator */
.stats-section .stats-intro {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(123, 17, 19, 0.12);
}

.stats-section .stats-cross {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  border: 1px solid rgba(214, 173, 96, 0.65);
  border-radius: 20px;
  color: #f3d58e;
  background: linear-gradient(145deg, #851b25, #4c101d);
  box-shadow: 0 9px 22px rgba(76, 16, 29, 0.18);
  font-size: 2.1rem;
}

/* Ensure Catholic Discovery is visible */
.stats-section .stats-intro .eyebrow {
  display: block;
  margin: 0 0 8px;
  color: #8b2430;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.5;
  text-transform: uppercase;
  opacity: 1;
}

.stats-section .stats-intro h2 {
  margin: 0 0 10px;
  color: #4c101d;
  font-size: clamp(1.8rem, 3.8vw, 2.65rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.7px;
}

.stats-section .stats-intro > div:nth-child(2) > p:last-child {
  max-width: 570px;
  margin: 0;
  color: #68585a;
  font-size: 1rem;
  line-height: 1.8;
}

.stats-section .stats-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: start;
  padding: 8px 12px;
  border: 1px solid #dce9d9;
  border-radius: 999px;
  color: #32683d;
  background: #f1f8ef;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.stats-section .stats-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #39974b;
  box-shadow: 0 0 0 4px rgba(57, 151, 75, 0.12);
}

/* Statistics cards */
.stats-section .stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.stats-section .stat-item {
  min-width: 0;
  padding: 25px;
  border: 1px solid #eee1d8;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 7px 22px rgba(76, 16, 29, 0.045);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stats-section .stat-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 32px rgba(76, 16, 29, 0.10);
}

.stats-section .stat-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 25px;
}

.stats-section .stat-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 1.2rem;
}

.stats-section .youtube-icon {
  color: #a51f2c;
  background: #fff0ef;
}

.stats-section .visitor-icon {
  color: #80601e;
  background: #fbf3dc;
}

.stats-section .stat-label {
  color: #77676a;
  font-size: 0.85rem;
  font-weight: 650;
}

.stats-section .stat-number {
  margin-bottom: 4px;
  color: #791b2b;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 850;
  line-height: 1.1;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.stats-section .stat-name {
  color: #4c101d;
  font-size: 1rem;
  font-weight: 750;
}

.stats-section .stat-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 23px;
  padding-top: 15px;
  border-top: 1px solid #f0e8e3;
  color: #837477;
  font-size: 0.82rem;
}

.stats-section .stat-arrow {
  color: #9a6e2e;
  font-size: 1.15rem;
  font-weight: 800;
}

.stats-section .stats-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  color: #7b2933;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
}


/* ==========================================
   CATHOLIC DISCOVERY — EMAIL SUBSCRIPTION
   Modern newsletter card and input fields
   ========================================== */

.newsletter {
  position: relative;
  padding: 76px 20px;
  overflow: hidden;
  background: linear-gradient(145deg, #f8efe5 0%, #fffaf4 52%, #f3e6d8 100%);
}

.newsletter .container {
  width: 100%;
  max-width: 1000px;
  margin-right: auto;
  margin-left: auto;
}

.newsletter .newsletter-card {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: start;
  gap: 28px;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid rgba(123, 17, 19, 0.13);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(76, 16, 29, 0.10);
}

/* Decorative cross */
.newsletter .newsletter-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 1px solid rgba(214, 173, 96, 0.7);
  border-radius: 22px;
  color: #f5d88f;
  background: linear-gradient(145deg, #861c28, #4c101d);
  box-shadow: 0 10px 24px rgba(76, 16, 29, 0.17);
  font-size: 2.5rem;
}

.newsletter .newsletter-content {
  min-width: 0;
}

.newsletter .newsletter-content > .eyebrow {
  margin: 0 0 9px;
  color: #8a2631;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.5;
  text-transform: uppercase;
  opacity: 1;
}

.newsletter .newsletter-content h2 {
  margin: 0 0 14px;
  color: #4c101d;
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  font-weight: 850;
  line-height: 1.18;
  letter-spacing: -0.7px;
}

.newsletter .newsletter-description {
  max-width: 650px;
  margin: 0;
  color: #716366;
  font-size: 1rem;
  line-height: 1.85;
}

/* Form and fields */
.newsletter .newsletter-form {
  display: block;
  width: 100%;
  margin-top: 28px;
}

.newsletter .newsletter-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 18px;
}

.newsletter .newsletter-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 9px;
}

.newsletter .newsletter-field label {
  display: block;
  color: #4c101d;
  font-size: 0.9rem;
  font-weight: 750;
}

.newsletter .newsletter-field input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 56px;
  margin: 0;
  padding: 0 16px;
  border: 1.5px solid #e5d8d6;
  border-radius: 13px;
  outline: none;
  color: #33262a;
  background: #fffdfb;
  font-family: inherit;
  font-size: 1rem;
  line-height: normal;
  box-shadow: 0 2px 5px rgba(76, 16, 29, 0.025);
  transition: border-color 0.2s ease, box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.newsletter .newsletter-field input::placeholder {
  color: #a09294;
  opacity: 1;
}

.newsletter .newsletter-field input:hover {
  border-color: #c9a9a7;
}

.newsletter .newsletter-field input:focus {
  border-color: #8b2430;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(123, 17, 19, 0.10);
}

/* Subscribe button */
.newsletter .newsletter-button {
  display: flex;
  grid-column: 1 / -1;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  margin: 2px 0 0;
  padding: 14px 22px;
  border: 1px solid #791b2b;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(120deg, #851b28, #4c101d);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(76, 16, 29, 0.17);
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    filter 0.2s ease;
}

.newsletter .newsletter-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 12px 26px rgba(76, 16, 29, 0.23);
}

.newsletter .newsletter-button:focus-visible {
  outline: 3px solid #d6ad60;
  outline-offset: 4px;
}

.newsletter .newsletter-button:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.newsletter .newsletter-arrow {
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.newsletter .newsletter-button:hover .newsletter-arrow {
  transform: translateX(4px);
}

/* Privacy note and subscription status */
.newsletter .newsletter-note {
  margin: 17px 0 0;
  color: #827477;
  font-size: 0.84rem;
  line-height: 1.7;
}

.newsletter .newsletter-status {
  margin: 10px 0 0;
  color: #4c101d;
  font-size: 0.92rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.newsletter .newsletter-status:empty {
  display: none;
}


/* ==========================================
   RESPONSIVE DESIGN — TABLETS AND PHONES
   ========================================== */

@media (max-width: 700px) {
  .stats-section {
    padding: 38px 16px;
  }

  .stats-section .stats-card {
    padding: 23px 18px;
    border-radius: 21px;
  }

  .stats-section .stats-intro {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 15px;
    margin-bottom: 23px;
    padding-bottom: 22px;
  }

  .stats-section .stats-cross {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    font-size: 1.7rem;
  }

  .stats-section .stats-live {
    grid-column: 2;
    justify-self: start;
  }

  .stats-section .stats-grid {
    gap: 12px;
  }

  .stats-section .stat-item {
    padding: 17px 14px;
    border-radius: 16px;
  }

  .stats-section .stat-top {
    gap: 8px;
    margin-bottom: 20px;
  }

  .stats-section .stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .stats-section .stat-label {
    font-size: 0.75rem;
  }

  .stats-section .stat-footer {
    align-items: flex-start;
    margin-top: 17px;
    padding-top: 12px;
    font-size: 0.75rem;
  }

  .newsletter {
    padding: 45px 16px;
  }

  .newsletter .newsletter-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 27px 21px;
    border-radius: 22px;
  }

  .newsletter .newsletter-icon {
    width: 58px;
    height: 58px;
    border-radius: 17px;
    font-size: 2rem;
  }

  .newsletter .newsletter-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .newsletter .newsletter-button {
    grid-column: 1;
    margin-top: 3px;
  }
}

@media (max-width: 380px) {
  .stats-section .stats-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .stats-section .stats-intro h2 {
    font-size: 1.7rem;
  }

  .stats-section .stats-bottom {
    font-size: 0.78rem;
  }
}

/* Respect reduced-motion accessibility preferences */
@media (prefers-reduced-motion: reduce) {
  .stats-section .stat-item,
  .newsletter .newsletter-field input,
  .newsletter .newsletter-button,
  .newsletter .newsletter-arrow {
    transition: none;
  }

  .stats-section .stat-item:hover,
  .newsletter .newsletter-button:hover {
    transform: none;
  }
}

.dynamic-events-section {
  max-width: 1150px;
  margin: 0 auto;
  padding: 55px 20px;
}

.dynamic-events-section h2 {
  color: var(--burgundy, #7b1113);
  margin-bottom: 12px;
}

.dynamic-content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 22px;
  margin-top: 25px;
}

.dynamic-content-card {
  overflow: hidden;
  border: 1px solid var(--border, #eadfd6);
  border-radius: 15px;
  background: var(--card-bg, #fff);
  box-shadow: 0 8px 24px #4e080a0d;
}

.dynamic-content-poster {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  background: #f7eee4;
}

.dynamic-content-body {
  padding: 20px;
}

.dynamic-content-body h3 {
  color: var(--burgundy, #7b1113);
  margin: 0 0 10px;
}

.dynamic-content-body p {
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.dynamic-content-meta {
  color: var(--muted, #806e69);
  font-size: 13px;
}

.dynamic-content-button {
  display: inline-block;
  padding: 10px 15px;
  margin-top: 10px;
  border-radius: 8px;
  background: #7b1113;
  color: white;
  text-decoration: none;
  font-weight: 700;
}

.dynamic-content-button:hover {
  background: #4e080a;
}

@media (max-width: 520px) {
  .dynamic-events-section {
    padding: 35px 15px;
  }
}
.ownership-badge {
  display: inline-block;
  margin: 0 0 12px;
  padding: 5px 9px;
  border: 1px solid rgba(233, 199, 119, 0.35);
  border-radius: 20px;
  color: #f5dfaa;
  font: 700 0.72rem Arial, sans-serif;
}

.ownership-badge.catholic-discovery {
  background: rgba(83, 135, 94, 0.18);
  border-color: #79b88a;
  color: #b6edc2;
}

.ownership-badge.ai-generated {
  background: rgba(102, 87, 160, 0.2);
  border-color: #a99ae8;
  color: #d0c6ff;
}

.ownership-badge.third-party {
  background: rgba(233, 199, 119, 0.1);
}

.music-card .ownership-details,
.music-card .attribution {
  min-height: 0;
  margin: 0 0 10px;
  overflow-wrap: anywhere;
  font-size: 0.8rem;
}

.source-link {
  display: inline-block;
  margin-bottom: 14px;
  color: #e9c777;
  font: 0.82rem Arial, sans-serif;
  text-decoration: underline;
}

.music-card .button {
  margin-top: 8px;
}

.apple-discovery {
  margin-bottom: 48px;
}

.apple-search-form {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.apple-search-form .search {
  flex: 1;
  min-width: 0;
  margin-bottom: 18px;
}

.apple-result {
  overflow: hidden;
}

.apple-artwork {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  margin-bottom: 14px;
  border-radius: 7px;
  background: var(--panel);
}

.apple-badge {
  display: inline-block;
  margin: 0 0 12px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--gold);
  font: .75rem Arial, sans-serif;
}

.apple-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.apple-actions .button {
  text-align: center;
}

.apple-link {
  color: var(--gold);
  font: .85rem Arial, sans-serif;
  text-align: center;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .apple-search-form {
    flex-direction: column;
  }

  .apple-search-form .search {
    width: 100%;
    margin-bottom: 0;
  }
}


