/* Afterlife Ancient Beliefs — spine_left + full_bleed hero */

:root {
  --bg: #0d0d26;
  --bg-elevated: #1a1a33;
  --gold: #d9a621;
  --gold-dim: rgba(217, 166, 33, 0.35);
  --papyrus: #f5edd1;
  --nile: #4073a6;
  --scarab: #2e8c57;
  --plum: #944585;
  --sand: #c2996b;
  --muted: #9a8b7a;
  --spine-w: 220px;
  --edge: clamp(20px, 4vw, 48px);
  --radius: 16px;
  --font-display: "Cormorant Garamond", "Palatino Linotype", Georgia, serif;
  --font-body: "Source Sans 3", "Helvetica Neue", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--papyrus);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover { color: #f0c84a; }

/* ── Spine navigation (desktop) ── */
.site-spine {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--spine-w);
  height: 100vh;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
  background: linear-gradient(180deg, #12122a 0%, #0a0a1e 100%);
  border-right: 1px solid var(--gold-dim);
}

.spine-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.spine-mark img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}

.spine-mark span {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1.2;
}

.spine-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spine-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.2s, color 0.2s;
}

.spine-nav a:hover,
.spine-nav a.is-active {
  background: rgba(217, 166, 33, 0.12);
  color: var(--gold);
}

.spine-nav .glyph {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
  opacity: 0.85;
}

.spine-foot {
  font-size: 0.75rem;
  color: var(--muted);
  padding-top: 16px;
  border-top: 1px solid rgba(217, 166, 33, 0.15);
}

/* ── Bottom dock (mobile) ── */
.bottom-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 30, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--gold-dim);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
}

.bottom-dock ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-around;
}

.bottom-dock a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.65rem;
  color: var(--muted);
  padding: 6px 8px;
}

.bottom-dock a:hover,
.bottom-dock a.is-active { color: var(--gold); }

.bottom-dock .glyph { font-size: 1.2rem; }

/* ── Main layout ── */
.site-main {
  margin-left: var(--spine-w);
  min-height: 100vh;
}

/* ── Hero: full_bleed_overlay ── */
.hero-bleed {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
}

.hero-bleed__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bleed__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bleed__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(13, 13, 38, 0.35) 0%,
    rgba(13, 13, 38, 0.55) 40%,
    rgba(13, 13, 38, 0.92) 85%,
    var(--bg) 100%
  );
}

.hero-bleed__copy {
  position: relative;
  z-index: 2;
  padding: var(--edge);
  padding-bottom: 64px;
  max-width: 720px;
}

.hero-bleed__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 12px;
}

.hero-bleed h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.05;
  margin: 0 0 8px;
  color: var(--papyrus);
}

.hero-bleed h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero-bleed__tagline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 52ch;
  margin: 0 0 28px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-stat {
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--gold-dim);
  border-radius: 12px;
  min-width: 110px;
}

.hero-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold);
  line-height: 1;
}

.hero-stat span {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Section shells ── */
.section {
  padding: 72px var(--edge);
}

.section-intro {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-intro h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: var(--gold);
  margin: 0 0 12px;
}

.section-intro p {
  color: var(--muted);
  margin: 0;
  font-size: 1.05rem;
}

/* ── Zigzag features ── */
.zigzag {
  display: flex;
  flex-direction: column;
  gap: 56px;
  max-width: 960px;
}

.zigzag-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.zigzag-row:nth-child(even) .zigzag-visual { order: 2; }
.zigzag-row:nth-child(even) .zigzag-text { order: 1; }

.zigzag-visual {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gold-dim);
}

.zigzag-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zigzag-text h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--papyrus);
  margin: 0 0 12px;
}

.zigzag-text p {
  color: var(--muted);
  margin: 0;
  font-size: 1rem;
}

.zigzag-num {
  font-family: var(--font-display);
  font-size: 3rem;
  color: rgba(217, 166, 33, 0.2);
  line-height: 1;
  margin-bottom: 8px;
}

/* ── Mosaic screens ── */
.mosaic {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
  max-width: 900px;
}

.mosaic__hero {
  grid-row: 1 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gold-dim);
  min-height: 320px;
}

.mosaic__hero img,
.mosaic__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mosaic__cell {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gold-dim);
  min-height: 150px;
}

.mosaic-caption {
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 640px;
}

/* ── Legal: side_by_side ── */
.legal-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 960px;
}

.legal-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  padding: 32px;
}

.legal-panel h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gold);
  margin: 0 0 16px;
}

.legal-panel p,
.legal-panel li {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 12px;
}

.legal-panel ul {
  margin: 0;
  padding-left: 20px;
}

.legal-panel a {
  word-break: break-all;
}

.site-footer {
  padding: 32px var(--edge) calc(32px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(217, 166, 33, 0.12);
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .site-spine { display: none; }
  .bottom-dock { display: block; }
  .site-main {
    margin-left: 0;
    padding-bottom: 72px;
  }

  .zigzag-row {
    grid-template-columns: 1fr;
  }

  .zigzag-row:nth-child(even) .zigzag-visual { order: 0; }
  .zigzag-row:nth-child(even) .zigzag-text { order: 0; }

  .mosaic {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .mosaic__hero { grid-row: auto; }

  .legal-pair {
    grid-template-columns: 1fr;
  }
}
