/* Self-hosted historical book face; SIL OFL in assets/fonts/OFL.txt. */
@font-face {
  font-family: 'IM Fell English';
  src: url('assets/fonts/IMFeENit28P.ttf') format('truetype');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --ornamental-font: 'Palatino Linotype', 'Book Antiqua', Palatino, 'URW Palladio L', Georgia, serif;
  --gold: #e5c991;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #eee3ff;
  background: #0c061b;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 240px; min-height: 100vh; min-height: 100svh; position: relative; isolation: isolate; display: flex; flex-direction: column; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
.cosmos { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: radial-gradient(ellipse at 50% 49%, #50217650 0, #22113760 31%, transparent 65%), radial-gradient(ellipse at 16% 76%, #46227230, transparent 44%), radial-gradient(ellipse at 88% 20%, #3c1f5a35, transparent 40%), #0c061b; }
.cosmos::before, .cosmos::after { content: ''; position: absolute; inset: 0; background-repeat: repeat; }
.cosmos::before { opacity: .65; background-image: radial-gradient(1px 1px at 24px 39px, #eedaff 80%, transparent), radial-gradient(1px 1px at 133px 189px, #c9a9ff 80%, transparent), radial-gradient(1.5px 1.5px at 291px 81px, #dac1ff 65%, transparent), radial-gradient(1px 1px at 218px 304px, #e6d1ff 80%, transparent); background-size: 367px 349px; }
.cosmos::after { opacity: .3; background-image: radial-gradient(1px 1px at 101px 201px, #c9a9ff 80%, transparent), radial-gradient(1px 1px at 52px 84px, #b88bff 80%, transparent); background-size: 239px 277px; transform: rotate(9deg) scale(1.15); }
.masthead { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 32px 24px 18px; }
.masthead h1 { margin: 0; font-family: var(--ornamental-font); font-size: 15px; font-weight: 400; text-transform: uppercase; letter-spacing: .32em; }
.brand-mark { font-size: 29px; color: var(--gold); line-height: 1; }
.portal-page { overflow: clip; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 22px 16px 26px; }
.pulsar { width: min(570px, 82vw, 58svh); aspect-ratio: 1; position: relative; display: grid; place-items: center; margin: 32px 0; }
.pulsar-energy { position: absolute; inset: 0; }
.momentum-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.momentum-orbit { transform-origin: 300px 300px; animation: orbit 90s linear infinite; }
.momentum-words { fill: #dfd0ed; font-family: var(--ornamental-font); font-size: 26px; font-style: italic; font-weight: 400; }
.momentum-dots { fill: var(--gold); }
.nebula { position: absolute; inset: -10%; width: 120%; height: 120%; pointer-events: none; opacity: .9; }
.aura { position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle, #d2a4ff12 16%, #a05bff25 32%, #8b41eb16 47%, transparent 70%); box-shadow: 0 0 90px #8440d812; animation: breathe 6s ease-in-out infinite; }
.sacred-geometry { position: relative; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 7px #ab73ef55); }
.outer-orbit, .mandala, .star-spin, .wave, .frequency { transform-origin: 300px 300px; }
.outer-orbit { animation: orbit 130s linear infinite; }
.mandala { animation: orbit 85s linear infinite reverse; }
.star-spin { animation: orbit 65s linear infinite; }
.frequency { animation: breathe 6s ease-in-out infinite; }
.wave { animation: radiate 6s ease-out infinite; opacity: 0; }
.wave-two { animation-delay: 3s; }
.enter-button { position: relative; width: 32%; aspect-ratio: 1; border: 1px solid #d4afff99; border-radius: 50%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; padding: 12px; color: #fff1ff; background: radial-gradient(circle at 50% 25%, #39234f, #1c0f31 75%); box-shadow: inset 0 0 24px #b071f22a, 0 0 0 7px #b385ef0c, 0 0 36px #b67aff40; font-family: var(--ornamental-font); font-style: italic; font-size: clamp(22px, 2.8vw, 32px); letter-spacing: .055em; text-align: center; text-wrap: balance; cursor: pointer; transition: border-color .25s, box-shadow .25s, background .25s; }
.enter-button:hover { border-color: #f1d6ff; background: radial-gradient(circle at 50% 25%, #54316e, #26113f 75%); box-shadow: inset 0 0 24px #b071f244, 0 0 0 8px #b385ef16, 0 0 55px #b67aff65; }
.enter-button:focus-visible, .motion-toggle:focus-visible, .fallback:focus-visible { outline: 2px solid #f2ddff; outline-offset: 8px; }
.enter-label { display: block; font-family: 'IM Fell English', var(--ornamental-font); font-size: 1.1em; font-style: italic; font-weight: 400; line-height: 1.1; letter-spacing: .025em; white-space: nowrap; color: #f5ead6; text-shadow: 0 0 16px #e5c99126; }
.enter-label::first-letter { font-size: 1.2em; color: #edcf96; }
.button-star { font-size: 18px; color: var(--gold); text-shadow: 0 0 14px #e5c99155; }
.button-line { width: 23px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.page-footer { display: flex; justify-content: flex-end; align-items: center; padding: 14px 40px 24px; }
.motion-toggle { width: 44px; height: 44px; display: grid; place-items: center; padding: 10px; color: #c2acd8; background: transparent; border: 0; border-radius: 50%; cursor: pointer; }
.play-icon, .motion-toggle[aria-pressed="true"] .pause-icon { display: none; }
.motion-toggle[aria-pressed="true"] .play-icon { display: block; }
.motion-toggle:hover { color: #fff1ff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fallback { color: #eee3ff; display: inline-block; padding: 20px; }
.motion-paused .pulsar-energy, .motion-paused .pulsar-energy * { animation-play-state: paused; }
.entering .pulsar-energy { animation: portal-open 1.45s cubic-bezier(.5,.03,.65,1) forwards; }
.entering .star-spin { animation: orbit .65s linear infinite; }
.entering .mandala { animation: orbit 1s linear infinite reverse; }
.entering .outer-orbit { animation: orbit 1.2s linear infinite; }
.entering .enter-button { animation: core-open 1.45s ease-in forwards; cursor: wait; }

.entering .pulsar { animation: vibration .13s linear 8; }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { opacity: .55; transform: scale(.97); } 50% { opacity: 1; transform: scale(1.025); } }
@keyframes radiate { 0% { transform: scale(.95); opacity: 0; } 20% { opacity: .35; } 100% { transform: scale(2.25); opacity: 0; } }
@keyframes vibration { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(2px, -1px); } 75% { transform: translate(-2px, 1px); } }
@keyframes portal-open { 0% { transform: scale(1) rotate(0); opacity: 1; } 60% { transform: scale(1.12) rotate(110deg); opacity: 1; } 100% { transform: scale(1.35) rotate(300deg); opacity: 0; } }
@keyframes core-open { 45% { transform: scale(.94); opacity: 1; } 100% { transform: scale(1.15); opacity: 0; } }
@media (max-width: 600px) { .masthead { padding-top: 28px; } .portal-page { padding: 30px 12px; } .enter-button { width: 36%; gap: 9px; } .page-footer { padding: 12px 22px 18px; justify-content: center; } }
@media (max-height: 580px) and (min-width: 601px) { .pulsar { width: 65svh; } .masthead { padding: 12px; } .portal-page { padding: 8px; } .page-footer { padding-bottom: 8px; } .enter-button { font-size: 14px; gap: 5px; width: 38%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .motion-toggle { display: none; } }
