/* =========================================================
   Klassieke one-pager — bouwt verder op style.css
   ========================================================= */

html:has(body.classic), body.classic { height: auto; }
body.classic {
  overflow: visible; overflow-x: clip;
  overscroll-behavior: auto;
  font-size: 1.25rem;
  line-height: 1.6;
  scroll-behavior: smooth;
}
html:has(body.classic) { scroll-behavior: smooth; scroll-padding-top: 76px; }
.classic .sky, .classic .grain { position: fixed; }
.classic #shared-slot { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- hero ---------- */
.c-hero {
  position: relative; z-index: 2;
  min-height: 100svh;
  display: grid; place-items: center; align-content: center; gap: 20px;
  padding: max(28px, env(safe-area-inset-top)) 16px 28px;
  text-align: center;
}
.c-card {
  position: relative;
  width: min(66vw, 300px, calc((100svh - 220px) * .577));
  aspect-ratio: 300 / 520;
  animation: heroIn 1.6s var(--ease-out) both;
}
.c-card-inner {
  position: absolute; inset: 0; display: block;
  border-radius: 4.2% / 2.4%; overflow: hidden;
  background: var(--card);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(236,229,211,.06);
  animation: cFloat 7s ease-in-out 1.6s infinite;
}
.c-card-inner svg { display: block; width: 100%; height: 100%; }
@keyframes cFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px) rotate(.4deg); } }

.c-hero-line {
  margin: 0;
  font-family: var(--serif-caps); letter-spacing: .24em; text-transform: uppercase;
  font-size: .95rem; color: var(--bone-2);
  animation: fadeUp 1.2s var(--ease-out) .6s both;
}
.c-hero-line strong { color: var(--gold); font-weight: 500; }
.c-scroll {
  display: grid; justify-items: center; gap: 2px;
  text-decoration: none; color: var(--bone-3);
  font-family: var(--serif-caps); font-size: .75rem; letter-spacing: .3em; text-transform: uppercase;
  padding: 8px 16px; min-height: 44px;
  animation: fadeUp 1.2s var(--ease-out) 1s both;
}
.c-scroll svg { width: 26px; height: 26px; fill: none; stroke: var(--gold); stroke-width: 1.4; animation: nudge 2.2s ease-in-out infinite; }
.c-scroll:hover { color: var(--bone); }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ---------- sticky nav ---------- */
.c-nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11,10,13,.72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-block: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.c-nav.is-stuck { border-bottom-color: var(--line); background: rgba(11,10,13,.9); }
.c-nav ul {
  list-style: none; margin: 0 auto; padding: 0 12px;
  display: flex; gap: 4px; max-width: 1100px;
  overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x proximity;
  justify-content: safe center;
}
.c-nav ul::-webkit-scrollbar { display: none; }
.c-nav li { flex: none; scroll-snap-align: center; }
.c-nav a {
  display: block; position: relative;
  padding: 18px 12px; min-height: 44px;
  font-family: var(--serif-caps); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; color: var(--bone-2);
  transition: color .25s;
}
.c-nav a::after {
  content: ""; position: absolute; left: 50%; bottom: 8px; width: 7px; height: 7px; margin-left: -3.5px;
  background: var(--gold);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  transform: scale(0); transition: transform .35s var(--ease-out);
}
.c-nav a:hover { color: var(--bone); }
.c-nav a.is-current { color: #fff; }
.c-nav a.is-current::after { transform: scale(1); }

/* ---------- sections ---------- */
#sections { position: relative; z-index: 2; }
.c-section {
  max-width: 680px; margin: 0 auto;
  padding: 72px 20px 40px;
}
.c-section + .c-section { border-top: 1px solid var(--line); }
.c-head { text-align: center; }
.c-emblem { width: 96px; height: 124px; display: block; margin: 0 auto 10px; color: var(--bone); }
.c-num { margin: 0; font-family: var(--serif-caps); color: var(--gold); letter-spacing: .26em; font-size: .8rem; text-transform: uppercase; }
.c-head h2 {
  margin: 6px 0 0;
  font-family: var(--serif-caps); font-weight: 500;
  font-size: clamp(1.9rem, 7vw, 2.6rem); letter-spacing: .12em; text-transform: uppercase; line-height: 1.15;
}

.classic .reading-body > * { animation: none; }
.classic .reading-body .lead { font-size: 1.4rem; }
.classic .faq summary { font-size: 1rem; }
.classic .ghost-btn { font-size: .82rem; }

/* scroll reveal */
.c-section.reveal .c-head, .c-section.reveal .reading-body > * {
  opacity: 0; transform: translateY(18px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.c-section.reveal .c-emblem { transform: scale(.85) rotate(-4deg); }
.c-section.is-in .c-head, .c-section.is-in .reading-body > * { opacity: 1; transform: none; }
.c-section.is-in .reading-body > *:nth-child(1) { transition-delay: .12s; }
.c-section.is-in .reading-body > *:nth-child(2) { transition-delay: .2s; }
.c-section.is-in .reading-body > *:nth-child(3) { transition-delay: .28s; }
.c-section.is-in .reading-body > *:nth-child(n+4) { transition-delay: .36s; }
.c-section .c-emblem { transition: transform 1.2s var(--ease-out); }
.c-section.is-in .c-emblem { transform: none; }
.c-section.is-in .spin { animation: spin 24s linear infinite; transform-origin: 0 0; }

/* ---------- footer ---------- */
.c-foot {
  position: relative; z-index: 2; text-align: center;
  padding: 40px 16px max(48px, env(safe-area-inset-bottom));
}
.c-foot p { margin: 0 0 14px; }
.c-foot-names { font-family: var(--serif-caps); letter-spacing: .3em; text-transform: uppercase; font-size: 1.1rem; }
.c-foot-names span { color: var(--gold); }
.c-totop { color: var(--bone-3); text-decoration: none; font-style: italic; }
.c-totop:hover { color: var(--bone); }

@media (min-width: 760px) {
  .c-nav a { padding-inline: 16px; }
  .c-section { padding-top: 96px; }
}

/* ---------- desktop: sticky tarot card left, text right ---------- */
.c-layout { position: relative; z-index: 2; }
.c-deck { display: none; }

@media (min-width: 1000px) {
  .c-layout {
    display: grid;
    grid-template-columns: minmax(300px, 420px) minmax(0, 640px);
    justify-content: center;
    gap: clamp(40px, 6vw, 96px);
    padding: 0 32px;
  }
  .c-deck {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
    position: sticky; top: 64px;
    height: calc(100vh - 64px);
    perspective: 1600px;
  }
  .c-deck-card {
    --rx: 0deg; --ry: 0deg;
    position: relative;
    width: min(100%, calc((100vh - 280px) * .577));
    aspect-ratio: 300 / 520;
    transform: rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform .6s var(--ease-out);
    transform-style: preserve-3d;
  }
  .c-deck-card::before {
    content: ""; position: absolute; inset: -16%; z-index: -1; pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(199,163,94,.16), transparent 62%);
    filter: blur(10px);
    /* push the glow far behind the card so the flipping card never cuts through it */
    transform: translateZ(-400px) scale(1.25);
    animation: glowFlicker 4s ease-in-out infinite;
  }
  @keyframes glowFlicker { 0%, 100% { opacity: .75; } 30% { opacity: 1; } 45% { opacity: .6; } 70% { opacity: .95; } }
  .c-deck-flip {
    position: absolute; inset: 0;
    transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(.3, 1.3, .4, 1);
  }
  .c-deck-side {
    position: absolute; inset: 0;
    backface-visibility: hidden; -webkit-backface-visibility: hidden;
    border-radius: 4.2% / 2.4%; overflow: hidden;
    background: var(--card); color: var(--bone);
    box-shadow: 0 30px 60px -20px rgba(0,0,0,.95), 0 0 0 1px rgba(236,229,211,.08);
  }
  .c-deck-side.is-back { transform: rotateY(180deg); }
  .c-deck-side svg { display: block; width: 100%; height: 100%; }
  .c-deck-side .spin { animation: spin 24s linear infinite; transform-origin: 0 0; }

  /* miniature strip */
  .c-thumbs ol {
    list-style: none; margin: 0; padding: 0;
    display: flex; gap: 8px; align-items: flex-end;
  }
  .c-thumbs a {
    display: block; position: relative;
    width: clamp(30px, 2.9vw, 42px); aspect-ratio: 300 / 520;
    border-radius: 3px;
    color: var(--bone); background: var(--card);
    box-shadow: 0 6px 12px -6px #000, 0 0 0 1px rgba(236,229,211,.12);
    opacity: .45; filter: grayscale(.3);
    transition: transform .45s var(--ease-out), opacity .3s, box-shadow .3s, filter .3s;
  }
  .c-thumbs a svg { display: block; width: 100%; height: 100%; }
  .c-thumbs a:hover { opacity: .85; transform: translateY(-5px); }
  .c-thumbs a.is-current {
    opacity: 1; filter: none;
    transform: translateY(-10px) scale(1.12);
    box-shadow: 0 10px 18px -8px #000, 0 0 0 1px var(--gold), 0 0 16px -2px rgba(199,163,94,.5);
  }
  .c-thumbs a::after { /* small star marker below the active card */
    content: ""; position: absolute; left: 50%; bottom: -14px; width: 7px; height: 7px; margin-left: -3.5px;
    background: var(--gold);
    clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  }
  .c-thumbs li { padding-bottom: 14px; }
  .c-thumbs a svg { border-radius: 3px; }
  .c-thumbs a:not(.is-current)::after { display: none; }

  /* the card on the left already shows the emblem */
  .c-section { max-width: none; padding-inline: 0; }
  .c-head { text-align: left; }
  .c-emblem { display: none; }
  .c-head .divider { margin-left: 0; }
  .classic .reading-body .lead { text-align: left; }
}
