/* Sections, one block each, in page order. */

/* ---------- Shared: the arcana plate ---------- */

.arcana { position: relative; padding-block: var(--s-9); }

.plate {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: var(--s-4);
  margin-bottom: clamp(2rem, 1rem + 3vw, 4rem);
}
.plate__num {
  font-family: var(--f-display);
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem);
  line-height: 1;
  color: var(--gold);
  min-width: 1.5ch;
}
.plate__name, .plate__count {
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  white-space: nowrap;
}
.plate__name { color: var(--bone-2); }
.plate__count { color: var(--mute); font-variant-numeric: tabular-nums; }

.arcana h2 { font-size: var(--t-h2); }

/* ---------- 0 · The Threshold ---------- */

.hero { position: relative; }
.hero__pin {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 92px var(--s-7);
}
.hero__grid {
  display: grid;
  grid-template-areas: "text" "figure" "more";
  gap: var(--s-6);
}
.hero__text { grid-area: text; }
.hero__more { grid-area: more; }
.hero__figure { grid-area: figure; margin: 0; }

.hero__name {
  font-size: var(--t-hero);
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin-left: -0.04em;
}
.hero__word { display: block; }
.hero__word + .hero__word { padding-left: 0.62em; }
.hero__line {
  margin-top: var(--s-5);
  font-family: var(--f-display);
  font-size: clamp(1.375rem, 1.1rem + 1.3vw, 2.125rem);
  line-height: 1.15;
  color: var(--gold);
}
.hero__sub {
  max-width: 38ch;
  font-size: var(--t-lead);
  line-height: 1.5;
  color: var(--bone-2);
}
.hero__actions {
  margin-top: var(--s-6);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4) var(--s-6);
}

.hero__figure {
  justify-self: center;
  width: min(56vw, 240px);
  display: grid;
  gap: var(--s-4);
}
.hero__annot {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--rule-soft);
}
.hero__annot .label { font-size: 0.6875rem; letter-spacing: 0.14em; }
.hero__moon { display: inline-flex; align-items: center; gap: var(--s-2); text-align: right; }
.moon-glyph {
  width: 12px;
  height: 12px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--gold);
}
.moon-glyph svg { width: 100%; height: 100%; }
.moon-glyph:has(svg) { border: 0; }

.hero__card { position: relative; }
.hero__card .card { will-change: transform; }
.hero__caption {
  display: grid;
  gap: var(--s-2);
  padding-top: var(--s-2);
  border-top: 1px solid var(--rule-soft);
  text-align: center;
}
.hero__daycard {
  font-family: var(--f-display);
  font-size: 1.25rem;
  line-height: 1.2;
  min-height: 1.2em;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: var(--s-5);
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: var(--s-3);
}
.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(var(--gold), transparent);
}

@media (min-width: 60em) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
    grid-template-areas: "text figure" "more figure";
    grid-template-rows: auto 1fr;
    align-items: start;
    column-gap: clamp(2rem, 5vw, 6rem);
    row-gap: var(--s-6);
  }
  .hero__text { align-self: end; }
  .hero__name { font-size: clamp(5rem, 8.6vw, 9.25rem); }
  .hero__figure {
    align-self: center;
    width: min(100%, 340px, calc((100svh - 250px) * 0.6));
  }
  .hero__scroll { display: flex; }
}

/* ---------- I · The Reader ---------- */

.reader__grid {
  display: grid;
  gap: var(--s-7);
}
.reader__portrait { margin: 0; justify-self: center; width: min(68vw, 300px); }
.portrait-card { perspective: 1400px; }
.portrait-card__frame {
  position: relative;
  aspect-ratio: var(--card-ratio);
  border-radius: 16px;
  background:
    radial-gradient(80% 55% at 50% 42%, oklch(0.24 0.05 275), transparent 75%),
    var(--ink-2);
  box-shadow: 0 30px 70px -30px oklch(0.04 0.03 280 / 0.95);
  display: grid;
  grid-template-rows: 1fr auto;
  padding: var(--s-4);
  overflow: hidden;
}
.portrait-card__plate { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.portrait-card__art {
  position: absolute;
  inset: 18.4% 13.3% 17.6%;
  display: grid;
  place-items: center;
  color: var(--gold);
  border-radius: 8px;
  overflow: hidden;
}
.portrait-card__art svg { width: 70%; height: auto; }
.portrait-card__art img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.portrait-card__title {
  padding-block: var(--s-3) var(--s-2);
  text-align: center;
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--bone);
  border-top: 1px solid var(--rule);
  margin-inline: var(--s-3);
}
.portrait-card__title span { font-family: var(--f-display); font-size: 1rem; letter-spacing: 0; color: var(--gold); }

.reader__text h2 { max-width: 17ch; }
.reader__bio {
  margin-top: var(--s-6);
  display: grid;
  gap: var(--s-4);
  max-width: 58ch;
  font-size: var(--t-lead);
  line-height: 1.55;
  color: var(--bone-2);
}
.reader__facts {
  margin-top: var(--s-7);
  max-width: 40rem;
  border-top: 1px solid var(--rule-soft);
}
.reader__facts li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: var(--s-4);
  align-items: baseline;
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--rule-soft);
}

@media (min-width: 48em) {
  .reader__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: clamp(3rem, 6vw, 7rem); }
  .reader__portrait { width: 100%; max-width: 380px; justify-self: start; }
}

/* ---------- II · The Readings ---------- */

.readings { overflow-x: clip; }

.readings__head {
  display: grid;
  gap: var(--s-5);
  margin-bottom: var(--s-7);
}
.readings__head h2 { max-width: 16ch; }
.readings__note { max-width: 36ch; color: var(--bone-2); font-size: var(--t-lead); line-height: 1.5; }

/* Phones and tablets: a scroll-snap row of the same cards. */
.hand {
  display: flex;
  gap: var(--s-4);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding: var(--s-5) var(--gutter) var(--s-7);
  scrollbar-width: none;
}
.hand::-webkit-scrollbar { display: none; }
.hand__slot {
  flex: none;
  width: min(76vw, 300px);
  scroll-snap-align: start;
}
.hand__slot { display: flex; }
.hand__slot .reading { flex: 1 1 auto; width: 100%; }

@media (min-width: 48em) {
  .readings__head { grid-template-columns: 1fr auto; align-items: end; }
}

/* Desktop: a hand of cards, slightly fanned. */
@media (min-width: 64em) {
  .hand {
    overflow: visible;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    padding: var(--s-6) var(--gutter) var(--s-8);
    scroll-snap-type: none;
  }
  .hand__slot {
    --w: clamp(190px, calc((100vw - 2 * var(--gutter)) / 5.3), 252px);
    width: var(--w);
    margin-inline: calc(var(--w) * -0.05);
    transform-origin: 50% 140%;
    transform: translateY(var(--ty, 0)) rotate(var(--rot, 0deg));
    transition: transform 0.7s var(--ease-out);
    position: relative;
  }
  .hand__slot:nth-child(1) { --rot: -7deg; --ty: 34px; }
  .hand__slot:nth-child(2) { --rot: -3.5deg; --ty: 9px; }
  .hand__slot:nth-child(3) { --rot: 0deg; --ty: 0px; }
  .hand__slot:nth-child(4) { --rot: 3.5deg; --ty: 9px; }
  .hand__slot:nth-child(5) { --rot: 7deg; --ty: 34px; }
  .hand__slot:hover, .hand__slot:focus-within {
    --rot: 0deg;
    --ty: -30px;
    z-index: 5;
  }
  .hand__slot:hover .reading, .hand__slot:focus-within .reading { border-color: var(--gold); }
  .hand__slot .reading { padding-inline: clamp(1rem, 0.6rem + 0.8vw, 1.5rem); }
}

/* ---------- III · The Ritual ---------- */

.ritual__h { max-width: 18ch; margin-bottom: var(--s-8); }

.constellation { position: relative; }
.constellation__sky, .constellation__faint { display: none; }

.steps {
  position: relative;
  display: grid;
  gap: var(--s-7);
  padding-left: 2.75rem;
}
.steps::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--rule-soft);
}
.steps__progress {
  position: absolute;
  left: 11px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--gold);
  transform-origin: top;
  transform: scaleY(1);
}
.step { position: relative; }
.step__star {
  position: absolute;
  left: calc(-2.75rem + 3px);
  top: 4px;
  width: 17px;
  height: 17px;
}
.step__star::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  transition: transform 0.6s var(--ease-out), opacity 0.6s var(--ease-out);
}
.step__star::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  transition: transform 0.8s var(--ease-out), opacity 0.6s;
}
.js .step:not(.is-lit) .step__star::before { transform: scale(0.45); opacity: 0.5; }
.js .step:not(.is-lit) .step__star::after { transform: scale(0.4); opacity: 0; }
.step__num { display: block; margin-bottom: var(--s-2); font-size: 0.8125rem; }
.step h3 { font-size: var(--t-h3); margin-bottom: var(--s-3); }
.step p { color: var(--bone-2); max-width: 34ch; }

@media (min-width: 60em) {
  .constellation { --band: 180px; }
  .constellation__sky {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: var(--band);
    overflow: visible;
  }
  .constellation__sky path { fill: none; stroke-width: 1; }
  .constellation__ghost { stroke: var(--rule); stroke-dasharray: 0.004 0.008; }
  .constellation__line { stroke: var(--gold); }
  .constellation__faint {
    display: block;
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--bone);
    opacity: 0.5;
    transform: translateY(calc(var(--band) * 0));
  }
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding-left: 0;
    padding-top: calc(var(--band) + var(--s-6));
  }
  .steps::before, .steps__progress { display: none; }
  .step { padding-inline: clamp(0.75rem, 1.5vw, 1.75rem); text-align: center; position: static; }
  .step p { margin-inline: auto; }
  .step { position: relative; }
  .step__star {
    left: calc(50% - 11px);
    top: calc(var(--y) * var(--band) - var(--band) - var(--s-6) - 11px);
    width: 22px;
    height: 22px;
  }
}

/* ---------- IV · The Draw ---------- */

.draw__head { display: grid; gap: var(--s-5); margin-bottom: var(--s-7); }
.draw__head h2 { max-width: 15ch; }
.draw__intro { max-width: 44ch; color: var(--bone-2); font-size: var(--t-lead); line-height: 1.5; }

.draw__stage {
  --slot-w: min(27vw, 168px);
  position: relative;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.draw__slots {
  display: flex;
  justify-content: center;
  gap: clamp(0.6rem, 3vw, 3rem);
}
.slot {
  position: relative;
  flex: 0 0 var(--slot-w);
  min-width: 0;
  width: var(--slot-w);
  align-content: start;
  display: grid;
  gap: var(--s-3);
  justify-items: center;
}
.slot__frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--card-ratio);
  border-radius: 12px;
  border: 1px dashed oklch(0.80 0.11 85 / 0.35);
  background: oklch(0.10 0.025 280 / 0.35);
}
.slot__frame::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  background: var(--rule);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}
.slot__label { display: block; width: 100%; color: var(--bone-2); text-align: center; min-height: 2.8em; }
.slot.is-filled .slot__frame { border-color: transparent; background: none; }
.slot.is-filled .slot__frame::after { display: none; }
.slot .card { position: absolute; inset: 0; width: 100%; height: auto; }
.slot__reversed { display: block; color: var(--foil-rose); }

.draw__table { display: none; }
.js .draw__table {
  display: block;
  position: relative;
  height: clamp(250px, 30vw, 360px);
  margin-top: var(--s-6);
}
.draw__deck {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 110px;
  aspect-ratio: var(--card-ratio);
  transform: translate(-50%, -50%);
}
.draw__deck .card { position: absolute; inset: 0; }
.draw__fan { position: absolute; inset: 0; }
.draw__fan.is-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-deep) transparent;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.draw__track { position: relative; }
.draw__restart { color: var(--mute); }

.draw__controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-6);
  text-align: center;
}
.draw__status { min-height: 1.4em; color: var(--gold); }
.draw__nojs { color: var(--bone-2); max-width: 40ch; }
.js .draw__nojs { display: none; }

.draw__result { margin-top: var(--s-7); }
.draw__readings {
  display: grid;
  gap: var(--s-6);
}
.draw-read { border-top: 1px solid var(--rule); padding-top: var(--s-4); }
.draw-read__place { color: var(--gold); margin-right: 0.2em; }
.draw-read__rev { display: inline-block; vertical-align: middle; margin-left: 0.5em; color: var(--foil-rose); white-space: nowrap; }
.draw-read__keys { display: flex; flex-wrap: wrap; }
.draw-read__keys span { white-space: nowrap; }
.draw-read__keys span:not(:last-child)::after { content: "·"; margin-inline: 0.7em; }
.draw-read h3 { font-size: var(--t-h3); }
.draw-read__keys { margin-top: var(--s-2); color: var(--mute); }
.draw-read p { margin-top: var(--s-3); color: var(--bone-2); max-width: 42ch; }
.draw__cta {
  margin-top: var(--s-8);
  display: grid;
  justify-items: center;
  gap: var(--s-5);
  text-align: center;
}
.draw__glimpse { font-family: var(--f-display); font-size: var(--t-h3); line-height: 1.2; max-width: 22ch; }
.draw__cta-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--s-4) var(--s-6); }

@media (min-width: 48em) {
  .draw__head { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: end; }
  .draw__readings { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- V · The Voices ---------- */

.quotes { position: relative; display: grid; gap: var(--s-8); }
.quote { margin: 0; }
.quote blockquote p { max-width: 21ch; }
.quote__tag {
  display: inline-block;
  padding: 0.2em 0.7em;
  margin-right: 0.6em;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.6875rem;
  color: var(--bone-2);
}
.quote blockquote { margin: 0; }
.quote blockquote p {
  font-family: var(--f-display);
  font-size: var(--t-quote);
  line-height: 1.12;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.quote blockquote p::before { content: "\201C"; color: var(--gold); margin-left: -0.45em; padding-right: 0.05em; }
.quote blockquote p::after { content: "\201D"; color: var(--gold); }
.quote figcaption { margin-top: var(--s-5); }

.js .quotes { grid-template-areas: "stack" "nav"; gap: var(--s-7); }
.js .quote { grid-area: stack; }
.js .quotes__nav { grid-area: nav; }
.js .quote[hidden] { display: block; visibility: hidden; }
.quotes__nav { display: flex; align-items: center; gap: var(--s-4); }
.quotes__btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--bone);
  transition: border-color var(--d-ui), color var(--d-ui);
}
.quotes__btn:hover { border-color: var(--gold); color: var(--gold); }
.quotes__count { min-width: 4.5ch; text-align: center; }

@media (min-width: 60em) {
  .quote { margin-left: 8.33%; }
  .quotes__nav { margin-left: 8.33%; }
}

/* ---------- VI · The Questions ---------- */

.questions__grid { display: grid; gap: var(--s-7); }
.questions__side h2 { max-width: 12ch; }
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-5);
  min-height: 72px;
  padding-block: var(--s-4);
  cursor: pointer;
  list-style: none;
  font-family: var(--f-display);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  line-height: 1.2;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--gold); }
.faq__mark {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--rule);
  border-radius: 50%;
}
.faq__mark::before, .faq__mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1px;
  margin-left: -6px;
  background: var(--gold);
  transition: transform 0.4s var(--ease-out);
}
.faq__mark::after { transform: rotate(90deg); }
.faq details[open] .faq__mark::after { transform: rotate(0deg); }
.faq__body { overflow: hidden; }
.faq__body p { padding-bottom: var(--s-5); max-width: 58ch; color: var(--bone-2); }

@media (min-width: 60em) {
  .questions__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(3rem, 6vw, 7rem); }
  .questions__side { position: sticky; top: 120px; align-self: start; }
}

/* ---------- VII · The Invitation ---------- */

.invitation { padding-bottom: var(--s-8); }
.arcana .invitation__h {
  font-size: var(--t-close);
  line-height: 0.96;
  letter-spacing: -0.03em;
  max-width: 13ch;
}
.invitation__row {
  margin-top: var(--s-8);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-5) var(--s-7);
}
.magnet { display: inline-block; }
.btn--big { min-height: 64px; font-size: 0.875rem; --pad-x: 2.2em; }
.invitation__links { display: flex; gap: var(--s-6); }

.footer { border-top: 1px solid var(--rule-soft); }
.footer__in {
  display: grid;
  gap: var(--s-4);
  padding-block: var(--s-6) var(--s-7);
}
.footer__disclaimer { max-width: 60ch; font-size: var(--t-small); color: var(--mute); }
@media (min-width: 48em) {
  .footer__in { grid-template-columns: 1fr auto; align-items: end; }
}
