@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-variable.woff2") format("woff2-variations"); font-weight: 400 700; font-display: swap; }

:root {
  --night: #05060f;
  --ink: #f4eee2;
  --ink-soft: rgba(244, 238, 226, .78);
  --gold: #f0c77c;
  --gold-deep: #c98a35;
  --line: rgba(240, 199, 124, .28);
  /* Same display stack as the birth chart pages (apps/charts/css/app.css). */
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  /* Ring size before JavaScript takes over (and when it never does). */
  --S: min(105vw, 78svh);
  --ax: 50vw;
  --ay: 55svh;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; }
html.smooth { scroll-behavior: smooth; }
body { margin: 0; min-height: 100svh; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: var(--night); overflow-x: clip; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip { position: fixed; left: var(--gutter); top: -100px; z-index: 30; padding: .6rem 1rem; background: var(--night); border: 1px solid var(--line); border-radius: 999px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ── Header ─────────────────────────────────────────────── */
.bar { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: max(14px, env(safe-area-inset-top)) var(--gutter) 14px; pointer-events: none; transition: background-color .4s, backdrop-filter .4s; }
.bar.is-solid { background: rgba(5, 6, 15, .5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(240, 199, 124, .12); }
.bar > * { pointer-events: auto; }
.brand { font-family: var(--display); font-size: 1.08rem; white-space: nowrap; letter-spacing: .01em; text-decoration: none; text-shadow: 0 1px 12px rgba(0, 0, 0, .6); }
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand__mark { width: 1.75rem; height: 1.75rem; flex: none; filter: drop-shadow(0 0 10px rgba(226, 200, 150, .25)); }
.bar__tools { display: flex; align-items: center; gap: .5rem; }
.bar__lang, .bar__motion {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: 0 .9rem;
  font: 500 .85rem/1 var(--sans); letter-spacing: .02em; color: var(--ink); text-decoration: none;
  background: rgba(5, 6, 15, .42); border: 1px solid rgba(244, 238, 226, .2); border-radius: 999px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); cursor: pointer;
}
.bar__lang:hover, .bar__motion:hover { border-color: var(--line); }
.bar__motion-dot { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--gold); }
.bar__motion[aria-pressed="true"] .bar__motion-dot { background: var(--gold); box-shadow: 0 0 8px var(--gold); }

/* ── Stage: the fixed, decorative journey ───────────────── */
.stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--night); contain: strict; }
.layer, .realm { position: absolute; inset: 0; overflow: hidden; }
.layer__img { position: absolute; inset: -10%; background: center / cover no-repeat; transform-origin: 50% 50%; will-change: transform; }
.layer--space .layer__img { background-image: url("../assets/open-space.webp"); filter: brightness(.9) saturate(1.05); }
.realm--chart .layer__img { background-image: url("../assets/realm-chart.webp"); }
/* No picture of its own: another stretch of the chart realm's sky, warmed a little, under the square. */
.realm--vedic .layer__img { background-image: url("../assets/realm-chart.webp"); background-position: 22% 35%; filter: hue-rotate(-16deg) saturate(1.1) brightness(.9); }
.realm--tarot.is-loaded .layer__img { background-image: url("../assets/realm-tarot.webp"); }
.realm--tarot .layer__img { background-position: 50% 62%; background-color: #3a2a1c; }
@media (orientation: portrait) and (max-width: 820px) {
  .layer--space .layer__img { background-image: url("../assets/open-space-mobile.webp"); }
  .realm--chart .layer__img { background-image: url("../assets/realm-chart-mobile.webp"); }
  .realm--vedic .layer__img { background-image: url("../assets/realm-chart-mobile.webp"); background-position: 70% 30%; }
  .realm--tarot.is-loaded .layer__img { background-image: url("../assets/realm-tarot-mobile.webp"); }
  .realm--tarot .layer__img { background-position: 50% 70%; }
}

/* A realm is seen only through its ring's opening until the visitor passes through. */
.realm {
  -webkit-mask-image: url("../assets/ring-round-opening.png");
  mask-image: url("../assets/ring-round-opening.png");
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: var(--S) var(--S); mask-size: var(--S) var(--S);
  -webkit-mask-position: calc(var(--ax) - var(--S) / 2) calc(var(--ay) - var(--S) / 2);
  mask-position: calc(var(--ax) - var(--S) / 2) calc(var(--ay) - var(--S) / 2);
}
.realm--vedic { visibility: hidden; }
.realm--tarot { visibility: hidden; -webkit-mask-image: url("../assets/ring-oval-opening.png"); mask-image: url("../assets/ring-oval-opening.png"); }

.ring { position: absolute; left: calc(var(--ax) - var(--S) / 2); top: calc(var(--ay) - var(--S) / 2); width: var(--S); height: var(--S); background: center / 100% 100% no-repeat; pointer-events: none; }
.ring--round { background-image: url("../assets/ring-round.webp"); }
.ring--oval { visibility: hidden; background-image: url("../assets/ring-oval.webp"); }
.ring--second { visibility: hidden; }
/* With JavaScript the rings keep their natural size and are moved by transform only. */
.js .ring { left: 0; top: 0; width: 1100px; height: 1100px; will-change: transform, opacity; }
.js .ring, .js .realm { visibility: hidden; }

.wheel { position: absolute; left: 50%; top: 50%; width: min(70vmin, 620px); height: auto; translate: -50% -50%; overflow: visible; opacity: .5; fill: none; stroke: rgba(240, 214, 160, .55); stroke-width: .35; }
.square { position: absolute; left: 50%; top: 50%; width: min(52vmin, 460px); height: auto; translate: -50% -50%; rotate: 0deg; overflow: visible; opacity: .55; fill: none; stroke: rgba(240, 214, 160, .6); stroke-width: 1.2; filter: drop-shadow(0 0 6px rgba(240, 190, 110, .55)); }
.square text { fill: rgba(240, 226, 196, .85); stroke: none; font: 600 15px var(--sans); text-anchor: middle; dominant-baseline: central; }
.wheel text { fill: rgba(240, 214, 160, .8); stroke: none; font: 7px var(--display); text-anchor: middle; dominant-baseline: central; }

.motes { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: screen; }
.veil { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(3, 4, 10, .5), transparent 110px), radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(3, 4, 10, .55) 100%); }
.js .stage, .gl-canvas { opacity: 0; transition: opacity 1.2s ease; }
.gl .stage { display: none; }
.gl-canvas { position: fixed; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; background: var(--night); }
.gl-canvas.is-ready { opacity: 1; }
.js .stage.is-ready { opacity: 1; }

/* ── Content (scrolls over the stage) ───────────────────── */
main { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 .6rem; font: 600 .74rem/1.2 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.04; margin: 0; letter-spacing: -.025em; }
h1 { letter-spacing: -.03em; }
h1 { font-size: clamp(2.3rem, 6.4vw, 4.6rem); text-shadow: 0 2px 30px rgba(0, 0, 0, .65); }
.lead { max-width: 34rem; margin: 1rem auto 0; color: var(--ink-soft); font-size: clamp(1rem, 1.4vw, 1.12rem); text-shadow: 0 1px 14px rgba(0, 0, 0, .8); }

.intro { position: relative; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto auto auto; justify-items: center; padding: calc(68px + 4svh) var(--gutter) max(18px, env(safe-area-inset-bottom)); text-align: center; }
.intro__head { max-width: 46rem; }

.dims { grid-row: 3; width: 100%; max-width: 46rem; }
.dims__list { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 0; padding: 0; }
.dims__item { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; padding: 0 1.05rem 0 .5rem; font: 500 .95rem/1 var(--sans); text-decoration: none; color: var(--ink); background: rgba(5, 6, 15, .5); border: 1px solid var(--line); border-radius: 999px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: border-color .2s, background-color .2s; }
a.dims__item:hover { border-color: var(--gold); background: rgba(40, 28, 10, .55); }
.dims__num { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 .3rem; font: .86rem/1 var(--display); color: var(--gold); border: 1px solid var(--line); border-radius: 999px; }

.cue { grid-row: 4; display: flex; flex-direction: column; align-items: center; gap: .55rem; margin: 1.1rem 0 0; font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); }
.cue__line { width: 1px; height: 34px; background: linear-gradient(var(--gold), transparent); }
.motion .cue__line { animation: cue 2.4s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0%, 100% { transform: scaleY(.35); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

/* Scroll lengths: the journey happens while these pass. */
.passage { height: 170svh; }
.dimension { position: relative; min-height: 165svh; }
.dimension__hold { height: 110svh; padding: 0 var(--gutter); }
.card {
  position: sticky; top: max(84px, calc(50svh - 17rem));
  max-width: 31rem; padding: clamp(1.4rem, 3vw, 2.1rem);
  background: rgba(6, 8, 22, .6); border: 1px solid rgba(240, 199, 124, .22); border-radius: 22px;
  backdrop-filter: blur(14px) saturate(1.15); -webkit-backdrop-filter: blur(14px) saturate(1.15);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.dimension--tarot .card { background: rgba(34, 18, 9, .62); border-color: rgba(240, 199, 124, .3); }
.card h2 { font-size: clamp(2rem, 4.4vw, 2.9rem); margin-bottom: .8rem; }
.card p { margin: 0 0 .8rem; }
.card__fine { font-size: .88rem; color: var(--ink-soft); }
.card__lead { font-size: 1.04rem; }
.incl > summary { display: none; }
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin: 1.1rem 0 1rem; }
.tier { padding: .85rem .9rem .7rem; border: 1px solid rgba(244, 238, 226, .14); border-radius: 14px; background: rgba(255, 255, 255, .035); }
.tier--paid { border-color: rgba(240, 199, 124, .38); background: linear-gradient(160deg, rgba(240, 199, 124, .13), rgba(240, 199, 124, .03)); }
.tier__name { margin: 0 0 .5rem; font: 600 .72rem/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }
.tier--paid .tier__name { color: var(--gold); }
.tier ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.tier li { position: relative; padding-left: 1.05rem; font-size: .9rem; line-height: 1.35; }
.tier li::before { content: ""; position: absolute; left: 0; top: .45em; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-soft); box-shadow: 0 0 6px rgba(244, 238, 226, .5); }
.tier--paid li::before { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.dims__text { display: grid; gap: .18rem; text-align: left; }
.dims__text small { font-size: .74rem; font-weight: 400; color: var(--ink-soft); letter-spacing: .01em; }
a.dims__item { min-height: 52px; padding-right: 1.2rem; }
.card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; margin: 1.3rem 0 0 !important; }
.cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.4rem;
  font: 600 1rem/1 var(--sans); color: #1b1206; text-decoration: none;
  background: linear-gradient(180deg, #f8dca0, var(--gold) 55%, #dca35a); border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 236, 190, .5) inset, 0 10px 30px rgba(240, 170, 80, .28);
}
.cta { position: relative; overflow: hidden; isolation: isolate; transition: transform .25s ease, box-shadow .25s ease; }
.cta::after { content: ""; position: absolute; inset: -40% auto -40% -60%; width: 40%; z-index: -1; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent); transform: skewX(-18deg); opacity: 0; }
.motion .cta::after { animation: cta-shine 4.5s ease-in-out infinite 1.2s; }
@keyframes cta-shine { 0%, 62% { left: -60%; opacity: 0; } 66% { opacity: 1; } 86%, 100% { left: 130%; opacity: 0; } }
.cta:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255, 236, 190, .6) inset, 0 14px 40px rgba(240, 170, 80, .45); }
.onward { display: inline-flex; align-items: center; min-height: 44px; font-size: .95rem; color: var(--ink-soft); text-underline-offset: 4px; }
.onward:hover { color: var(--ink); }


.foot { grid-row: 5; display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.4rem; margin-top: 1.1rem; font-size: .78rem; color: var(--ink-soft); text-shadow: 0 1px 10px rgba(0, 0, 0, .8); }
.foot p { margin: 0; }
.foot__links { display: flex; gap: 1.2rem; }

/* Desktop: the card sits to the left; the next ring approaches on the right. */
@media (min-width: 900px) {
  .dimension__hold { padding-left: max(var(--gutter), calc(50vw - 600px)); }
}
/* Phones: the card holds near the bottom so the ring stays visible above it. */
@media (max-width: 899px) {
  .card { top: auto; bottom: max(16px, env(safe-area-inset-bottom)); margin: 0 auto; }
  .dimension__hold { display: flex; flex-direction: column; justify-content: flex-end; height: 120svh; padding-bottom: 0; }
  .dims__item { padding-right: .85rem; font-size: .9rem; }
  .incl { margin: .2rem 0 .4rem; }
  .incl > summary { display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; padding: 0 .9rem; font: 600 .82rem/1 var(--sans); letter-spacing: .04em; color: var(--gold); list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: 999px; }
  .incl > summary::-webkit-details-marker { display: none; }
  .incl > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
  .incl[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
  .tiers { gap: .5rem; margin: .7rem 0 .7rem; }
  .tier { padding: .7rem .7rem .6rem; }
  .tier li { font-size: .82rem; padding-left: .9rem; }
  .card__lead { font-size: .98rem; }
  .card h2 { margin-bottom: .5rem; }
}
@media (max-width: 560px) {  /* with the music control: the mark stays, the link keeps its aria-label */
  .bar .brand { font-size: 0; gap: 0; }
}
@media (max-width: 420px) {
  .brand { font-size: 1rem; }
  .bar__lang, .bar__motion { padding: 0 .75rem; font-size: .8rem; }
}
@media (max-width: 340px) {
  .bar { gap: .5rem; }
  .brand { font-size: .9rem; letter-spacing: .02em; gap: .45rem; }
  .brand__mark { width: 1.45rem; height: 1.45rem; }
  .bar__tools { gap: .35rem; }
  .bar__lang { padding: 0 .6rem; }
}
@media (max-width: 360px) {
  .bar__motion-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .bar__motion { width: 40px; padding: 0; justify-content: center; }
}
.motion .wheel { animation: wheel 360s linear infinite; }
@keyframes wheel { to { rotate: 360deg; } }

/* Arriving back at the beginning menu after the loop. */
.motion .intro.is-arriving > * { animation: arrive 1.1s ease both; }
@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* The first merkaba can be turned by hand on the beginning menu (3D stage only). */
.gl .intro { cursor: grab; touch-action: pan-y; }
.gl .intro.is-grabbing { cursor: grabbing; }
.gl .intro a, .gl .intro button { cursor: pointer; }
