/* Sheer Definitions — World Religions & Science
   Many paths. One light. Mutual flourishing. */

:root {
  --bg-void: #050508;
  --bg-deep: #0a0a0f;
  --bg-card: #12121a;
  --bg-elevated: #181820;
  --gold: #d4a84b;
  --gold-soft: rgba(212, 168, 75, 0.15);
  --teal: #5eead4;
  --teal-soft: rgba(94, 234, 212, 0.12);
  --cream: #f5f0e6;
  --text-primary: #e8e4dc;
  --text-muted: #9a9588;
  --border: rgba(212, 168, 75, 0.2);
  --glow: rgba(212, 168, 75, 0.1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 4rem; }

body {
  font-family: 'Source Serif 4', 'Cormorant Garamond', Georgia, serif;
  font-size: 1.125rem;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.85;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

@keyframes ambient-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.78; }
}
.ambient-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 140% 100% at 50% -20%, rgba(212, 168, 75, 0.4) 0%, rgba(212, 168, 75, 0.12) 45%, transparent 70%),
    radial-gradient(ellipse 100% 80% at 90% 70%, rgba(94, 234, 212, 0.28) 0%, transparent 55%),
    radial-gradient(ellipse 90% 70% at 10% 90%, rgba(212, 168, 75, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 60% 30%, rgba(212, 168, 75, 0.12) 0%, transparent 45%),
    var(--bg-deep);
  pointer-events: none;
  z-index: -2;
  animation: ambient-pulse 8s ease-in-out infinite;
}

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.nav a {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

.hero {
  padding: 4rem 2rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--cream);
}

.hero .tagline {
  font-size: 1.125rem;
  color: var(--gold);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.hero-intro {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.8;
}

.doc-feature {
  max-width: 1000px;
  margin: 0 auto 3rem;
  padding: 2rem;
  border: 1px solid rgba(212, 168, 75, 0.35);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(212, 168, 75, 0.09) 0%, rgba(18, 18, 26, 0.92) 100%);
  box-shadow: 0 0 48px rgba(212, 168, 75, 0.08);
}

.doc-feature h2 {
  margin-bottom: 0.75rem;
}

.doc-feature p {
  color: var(--text-primary);
}

.doc-feature__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.doc-feature__links a {
  color: var(--gold);
  font-weight: 600;
}

.doc-feature__embed {
  width: 100%;
  min-height: 540px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.8);
}

.hero-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.hero-gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: block;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.section:first-of-type { border-top: none; }

.section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
  color: var(--gold);
}

.section .lead {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.section p {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.content-with-image {
  display: grid;
  gap: 2rem;
  align-items: start;
  margin-top: 1.5rem;
}

@media (min-width: 700px) {
  .content-with-image { grid-template-columns: 1fr 1fr; }
  .content-with-image.reverse .text-block { order: 2; }
  .content-with-image.reverse .image-block { order: 1; }
}

@media (max-width: 700px) {
  .doc-feature {
    margin-left: 1rem;
    margin-right: 1rem;
    padding: 1.5rem;
  }

  .doc-feature__embed {
    min-height: 380px;
  }

  .hero-gallery {
    grid-template-columns: 1fr;
  }
}

.image-block img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  min-height: 120px;
}
.image-block img[src*="placeholder"] {
  opacity: 0.7;
}

.image-block figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.religion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.religion-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  background: var(--bg-card);
  transition: all 0.2s;
}

.religion-card:hover {
  border-color: rgba(212, 168, 75, 0.4);
  box-shadow: 0 0 24px var(--glow);
}

.religion-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.religion-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; color: var(--cream); }
.religion-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0; }
.religion-card .tag { font-size: 0.75rem; color: var(--gold); margin-top: 0.75rem; display: block; }

.tradition-group {
  margin-bottom: 2.5rem;
}
.tradition-group:last-child { margin-bottom: 0; }
.tradition-group h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.intro-note {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-style: italic;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.theme-card {
  border-left: 4px solid var(--gold);
  padding: 1.25rem;
  background: rgba(212, 168, 75, 0.04);
  border-radius: 0 8px 8px 0;
}

.theme-card h4 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--gold); }
.theme-card p { font-size: 0.95rem; margin: 0; color: var(--text-muted); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.gallery figcaption { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

/* Gallery cards — image + title + full description, how it relates */
.gallery.gallery-cards {
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .gallery.gallery-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.gallery-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.gallery-card:hover {
  border-color: rgba(212, 168, 75, 0.35);
  box-shadow: 0 0 24px var(--glow);
}

.gallery-card-fig {
  margin: 0;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.gallery-card-fig img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
  background: rgba(8, 10, 12, 0.5);
}

.gallery-card:hover .gallery-card-fig img {
  transform: scale(1.02);
}

.gallery-card-body {
  padding: 1.25rem 1.5rem;
}

.gallery-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 0.6rem;
  letter-spacing: 0.02em;
}

.gallery-card-desc {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
}

.gallery-card-desc strong { color: var(--text-primary); }

/* Sacred story — transcendent definition of what each tradition holds sacred */
.sacred-story {
  margin: 3rem 0;
  padding: 2.5rem 2rem;
  background: linear-gradient(135deg, rgba(212, 168, 75, 0.08) 0%, rgba(94, 234, 212, 0.05) 100%);
  border: 1px solid rgba(212, 168, 75, 0.25);
  border-left: 4px solid var(--gold);
  border-radius: 0 12px 12px 0;
  box-shadow: 0 0 40px rgba(212, 168, 75, 0.08);
}
.sacred-story h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}
.sacred-story .sacred-lead {
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 1rem;
}
.sacred-story p {
  margin-bottom: 1rem;
  line-height: 1.9;
}
.sacred-story p:last-child { margin-bottom: 0; }

/* Main story — transcendent Solution on Convergence hub */
.main-story {
  max-width: 720px;
  margin: 4rem auto 3rem;
  padding: 3rem 2rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(212, 168, 75, 0.12) 0%, rgba(94, 234, 212, 0.06) 50%, transparent 100%);
  border: 1px solid rgba(212, 168, 75, 0.3);
  border-radius: 16px;
  box-shadow: 0 0 80px rgba(212, 168, 75, 0.1);
}
.main-story h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}
.main-story .main-story-tagline {
  font-size: 1rem;
  color: var(--gold);
  font-style: italic;
  margin-bottom: 1.5rem;
}
.main-story p {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-primary);
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--gold);
  text-decoration: none;
  font-size: 0.9rem;
}

.back-link:hover { color: var(--teal); }

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.site-footer a { color: var(--gold); text-decoration: none; }
.site-footer a:hover { color: var(--teal); }

/* Skip to content (accessibility) */
.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  background: var(--gold);
  color: var(--bg-deep);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 1000;
  text-decoration: none;
  border-radius: 4px;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .skip-link, .header, .site-footer, .ambient-bg { display: none !important; }
  body { background: #fff; color: #222; }
  a { color: #055; text-decoration: underline; }
  .religion-card, .theme-card { break-inside: avoid; }
  .hero, .section { break-inside: avoid; }
}
