/* Sod HaElohim — The Secret of God — Complete */

:root {
  --bg-void: #050508;
  --bg-deep: #0a0a0f;
  --bg-card: #12121a;
  --bg-elevated: #16162a;
  --gold: #d4af37;
  --gold-soft: #e8d48a;
  --gold-dark: #9a7b2a;
  --white-gold: #f5eed8;
  --indigo: #4a3f7a;
  --violet: #6b5b95;
  --text-primary: #e8e4dc;
  --text-muted: #9a9588;
  --border: rgba(212, 175, 55, 0.15);
  --glow: rgba(212, 175, 55, 0.2);
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--gold);
  color: var(--bg-deep);
  text-decoration: none;
  z-index: 200;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 1rem;
}

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

body {
  font-family: 'Crimson Pro', 'Cormorant Garamond', 'Georgia', serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.75;
  min-height: 100vh;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse 100% 80% at 50% -20%, rgba(74, 63, 122, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(212, 175, 55, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(212, 175, 55, 0.03) 0%, transparent 50%),
    var(--bg-deep);
  pointer-events: none;
  z-index: -2;
}

.particle-field {
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(1px 1px at 20% 30%, rgba(212, 175, 55, 0.3), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(212, 175, 55, 0.2), transparent),
    radial-gradient(1px 1px at 60% 20%, rgba(212, 175, 55, 0.25), transparent),
    radial-gradient(1px 1px at 80% 50%, rgba(212, 175, 55, 0.2), transparent),
    radial-gradient(1px 1px at 10% 80%, rgba(212, 175, 55, 0.15), transparent);
  background-size: 200% 200%;
  animation: particle-drift 30s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
  opacity: 0.6;
}

@keyframes particle-drift {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 2rem;
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

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

.logo {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo .hebrew {
  font-size: 1.15rem;
  direction: rtl;
  letter-spacing: 0.05em;
}

.logo .separator {
  color: var(--text-muted);
  font-weight: 300;
}

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

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  transition: color 0.3s;
}

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

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
}

.hero-content {
  text-align: center;
  max-width: 750px;
}

.hero-image-wrapper {
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 0 80px rgba(212, 175, 55, 0.08);
}

.hero-img {
  width: 100%;
  max-width: 700px;
  height: auto;
  display: block;
}

.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-weight: 300;
}

.opening-quote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  border-left: 3px solid var(--gold);
  background: rgba(212, 175, 55, 0.04);
  text-align: left;
}

.opening-quote p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-style: italic;
  color: var(--white-gold);
}

.opening-quote cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.hero-intro {
  margin-top: 1.5rem;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.hero-intro strong {
  color: var(--gold);
}

/* Sections */
.section {
  padding: 5rem 2rem;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.revealed {
  opacity: 1;
  transform: translateY(0);
}

.section.dark {
  background: linear-gradient(180deg, rgba(18, 18, 26, 0.5) 0%, rgba(10, 10, 15, 0.3) 100%);
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

.section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  margin-bottom: 1rem;
  color: var(--gold);
  font-weight: 600;
}

.section h3 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  color: var(--text-primary);
  font-weight: 500;
}

.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-style: italic;
}

.section p {
  margin-bottom: 1rem;
}

/* Content with image layout */
.content-with-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  margin: 2rem 0;
}

.content-with-image.reverse {
  direction: rtl;
}

.content-with-image.reverse > * {
  direction: ltr;
}

.content-with-image .text-block {
  margin-top: 0;
}

.diagram-block {
  margin: 2rem 0;
  text-align: center;
}

.diagram-block.full-width {
  grid-column: 1 / -1;
}

.diagram-block img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.diagram-block figcaption {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-style: italic;
}

/* Pardes */
.pardes-intro {
  margin-bottom: 2rem;
}

.levels-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.level-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  transition: box-shadow 0.3s, border-color 0.3s;
}

.level-card:hover {
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.25);
}

.level-card.level-sod {
  border-color: rgba(212, 175, 55, 0.35);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.05) 0%, var(--bg-card) 100%);
}

.level-card img {
  width: 100%;
  max-width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.level-card h3 {
  font-size: 1rem;
  margin: 0 0 0.25rem;
  color: var(--gold);
}

.hebrew-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  direction: rtl;
}

.level-card p:last-of-type {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* Seven Days */
.seven-days {
  margin: 3rem 0;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.day-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.day-num {
  display: block;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.day-sabbath {
  border-color: rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.05);
}

/* Name / Tetragrammaton */
.name-block {
  margin: 2rem 0;
}

.tetragrammaton {
  margin: 2rem 0;
  text-align: center;
}

.tetragrammaton img {
  max-width: 350px;
  height: auto;
  border-radius: 8px;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin: 2.5rem 0;
}

.gallery-grid figure {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-grid figure:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.gallery-grid img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.gallery-grid figcaption {
  padding: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Coda */
.coda {
  padding-bottom: 4rem;
}

.coda-image {
  margin-bottom: 2rem;
  text-align: center;
}

.coda-image img {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.coda blockquote.closing {
  margin-top: 2.5rem;
  padding: 2rem 2.5rem;
  border-left: 4px solid var(--gold);
  background: rgba(212, 175, 55, 0.06);
  font-style: italic;
  font-size: 1.15rem;
}

.closing p {
  color: var(--white-gold);
}

/* Footer */
.footer {
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.footer .fine {
  font-size: 0.85rem;
  margin-top: 0.5rem;
  opacity: 0.85;
}

.back-to-top {
  display: inline-block;
  margin-top: 1rem;
  color: var(--gold);
  text-decoration: none;
  font-size: 1.25rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.back-to-top:hover {
  opacity: 1;
}

/* Responsive */
@media (max-width: 900px) {
  .content-with-image,
  .content-with-image.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

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

  .days-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 600px) {
  .nav {
    gap: 1rem;
  }

  .hero {
    padding: 6rem 1rem 3rem;
  }

  .levels-grid {
    grid-template-columns: 1fr;
  }

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

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