@font-face {
  font-family: "UnifrakturCook";
  src: url("/assets/lucid-fonts/unifraktur-cook-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Pirata One";
  src: url("/assets/lucid-fonts/pirata-one-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Pinyon Script";
  src: url("/assets/lucid-fonts/pinyon-script-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/lucid-fonts/manrope-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --p: 0;
  --night: #07030f;
  --velvet: #1a0f2e;
  --amethyst: #8b5cf6;
  --violet: #b18cff;
  --glow: #c084fc;
  --chrome: #efeaf8;
  --mist: #c2b6db;
  --line: rgba(214, 200, 255, .3);
  --chrome-text: linear-gradient(180deg, #fff 0%, #e6dcff 35%, #8d79b8 52%, #f5f0ff 62%, #b9a4e8 100%);
  --wm: "UnifrakturCook", "Pirata One", Georgia, serif;
  --head: "Pirata One", Georgia, serif;
  --vow: "Pinyon Script", cursive;
  --body: "Manrope", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--night);
  color: var(--chrome);
  font: 16px/1.6 var(--body);
}

a { color: inherit; }

:focus-visible { outline: 2px solid var(--violet); outline-offset: 4px; border-radius: 8px; }

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(180deg, #07030f 0%, #140828 55%, #24104a 100%);
}

.sky .dawn {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #2a1356 0%, #6b3fa8 45%, #d38bd9 80%, #ffc6d9 100%);
  opacity: clamp(0, calc((var(--p) - .72) * 3.6), 1);
}

#stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: clamp(0, calc(1 - (var(--p) - .7) * 3.3), 1);
}

.moon {
  position: absolute;
  left: 74%;
  top: 7vh;
  width: min(44vmin, 400px);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(calc(-50% - var(--p) * 48vw), calc(var(--p) * 62vh)) scale(calc(1 - var(--p) * .4));
  background:
    radial-gradient(circle at 30% 35%, rgba(90, 70, 140, .45) 0 7%, transparent 8%),
    radial-gradient(circle at 62% 28%, rgba(90, 70, 140, .4) 0 5%, transparent 6%),
    radial-gradient(circle at 55% 62%, rgba(90, 70, 140, .38) 0 9%, transparent 10%),
    radial-gradient(circle at 25% 70%, rgba(90, 70, 140, .3) 0 4%, transparent 5%),
    radial-gradient(circle at 72% 50%, rgba(90, 70, 140, .28) 0 3%, transparent 4%),
    radial-gradient(circle at 38% 34%, #f6f2ff 0%, #d9cff0 38%, #a596cc 66%, #5a4885 88%, #2c2050 100%);
  box-shadow: 0 0 90px 24px rgba(192, 132, 252, .35), 0 0 240px 70px rgba(139, 92, 246, .25);
}

.castle {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 34vh;
  transform: translateY(calc((1 - var(--p)) * 14vh));
}

.mist {
  position: absolute;
  left: -20%;
  right: -20%;
  height: 30vh;
  filter: blur(14px);
}

.mist-front {
  bottom: -6vh;
  opacity: .75;
  background: radial-gradient(35% 60% at 25% 60%, rgba(139, 92, 246, .55), transparent 70%), radial-gradient(35% 60% at 75% 70%, rgba(192, 132, 252, .4), transparent 70%);
  transform: translateX(calc(var(--p) * -14%));
}

.mist-back {
  bottom: 18vh;
  opacity: .4;
  background: radial-gradient(30% 50% at 60% 50%, rgba(177, 140, 255, .5), transparent 70%), radial-gradient(25% 50% at 10% 60%, rgba(177, 140, 255, .35), transparent 70%);
  transform: translateX(calc(var(--p) * 18%));
}

.bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px max(16px, env(safe-area-inset-left, 0px));
  background: linear-gradient(180deg, rgba(7, 3, 15, .88), transparent);
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { display: block; width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line), 0 0 16px rgba(139, 92, 246, .6); }
.brand span { font: 700 21px/1 var(--wm); }

.clock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 99px;
  background: rgba(26, 15, 46, .8);
  box-shadow: 0 0 0 1px var(--line) inset;
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.clock i { color: var(--glow); font-style: normal; }

.rail {
  position: fixed;
  top: 50%;
  right: 18px;
  z-index: 20;
  display: none;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translateY(-50%);
}

.rail a {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--mist) inset;
}

.rail a::after {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: var(--chrome);
  clip-path: inset(0 0 0 var(--f, 0%));
  content: "";
}

.rail a[aria-current="step"] { box-shadow: 0 0 0 1.5px #fff inset, 0 0 12px var(--glow); }

main { position: relative; z-index: 2; }

.chapter {
  display: flex;
  min-height: 100svh;
  align-items: center;
  padding: 90px max(18px, 5vw);
  scroll-margin-top: 0;
}

.chapter-right { justify-content: flex-end; }
.hero, .final-chapter { justify-content: center; text-align: center; }

.panel {
  width: 100%;
  max-width: 560px;
  padding: 28px 24px;
  border-radius: 20px;
  background: rgba(14, 7, 28, .88);
  box-shadow: 0 0 0 1px var(--line) inset, 0 30px 60px rgba(0, 0, 0, .35);
}

.time { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--glow); font-size: 14px; font-weight: 800; }
.time::before { width: 22px; height: 1px; background: var(--glow); content: ""; }

h1, h2, p { margin-top: 0; }
h2 {
  margin-bottom: 12px;
  background: var(--chrome-text);
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(139, 92, 246, .5));
  font: 400 clamp(40px, 7vw, 58px)/1.02 var(--head);
  text-wrap: balance;
  -webkit-background-clip: text;
}

.panel > p:not(.time) { margin-bottom: 16px; color: var(--mist); }
.perks { display: grid; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.perks li { position: relative; padding-left: 24px; }
.perks li::before { position: absolute; left: 0; color: var(--glow); content: "✦"; }

.hero { flex-direction: column; gap: 0; padding-top: 88px; padding-bottom: 58px; }
.kicker { margin: 0; color: #e4dbf5; font-size: 12px; font-weight: 800; letter-spacing: .2em; text-shadow: 0 1px 3px #000, 0 0 12px #000; }
.wordmark {
  margin: 8px 0 0;
  background: var(--chrome-text);
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 #3b2a63) drop-shadow(0 0 26px rgba(139, 92, 246, .85)) drop-shadow(0 6px 14px rgba(0, 0, 0, .7));
  font: 700 clamp(68px, 16vw, 190px)/.98 var(--wm);
  letter-spacing: .01em;
  white-space: nowrap;
  -webkit-background-clip: text;
}

.vow { margin: 8px 0 18px; color: #efe4ff; font: 400 clamp(36px, 8.5vw, 64px)/1.15 var(--vow); text-shadow: 0 0 18px rgba(192, 132, 252, .8), 0 2px 6px #000; }
.plaque { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 24px; padding: 7px 24px; clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%); background: linear-gradient(180deg, #f5f1ff, #9a8bbf 50%, #e8e2fb); color: #1a0f2e; font-size: 20px; font-weight: 800; letter-spacing: .08em; }
.plaque small { font-size: 11px; letter-spacing: .14em; }
.alternates { margin: 14px 0 0; color: var(--mist); font-size: 15px; }
.alternates a { color: #fff; font-weight: 700; text-decoration-color: var(--glow); text-underline-offset: 4px; }
.scroll-cue { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 38px; color: var(--mist); font-size: 13px; letter-spacing: .06em; }
.scroll-cue::after { width: 1px; height: 38px; background: linear-gradient(var(--glow), transparent); animation: fall 2.2s ease-in-out infinite; content: ""; }

.button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; padding: 12px 26px; border-radius: 12px; font-size: 16px; font-weight: 800; text-align: center; text-decoration: none; transition: transform .2s ease; white-space: nowrap; }
.button.main { background: linear-gradient(180deg, #a678ff, #6d3fe0); box-shadow: 0 0 0 1px rgba(255, 255, 255, .35) inset, 0 10px 30px rgba(139, 92, 246, .55); color: #fff; }
.button.chrome { background: linear-gradient(180deg, #fbf9ff, #b8acd6 55%, #efeaff); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); color: #1a0f2e; }
.button.ghost { background: rgba(255, 255, 255, .08); box-shadow: 0 0 0 1px var(--line) inset; color: var(--chrome); }
.button:hover { transform: translateY(-2px); }

.constellation { display: block; width: 100%; max-width: 440px; height: auto; margin: 4px auto 10px; }
.constellation line { stroke: rgba(214, 200, 255, .45); stroke-dasharray: 3 4; stroke-width: 1; }
.constellation .star { fill: #fff; filter: drop-shadow(0 0 6px #c084fc); }
.constellation text { fill: #efeaf8; font: 800 12px var(--body); letter-spacing: .2em; }
.constellation .twinkle { animation: twinkle 3s ease-in-out infinite; }
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin: 0; font-size: 14.5px; }
.services dt { color: var(--violet); font-size: 12.5px; font-weight: 800; letter-spacing: .18em; }
.services dd { margin: 2px 0 0; color: var(--mist); }

.steps { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: start; gap: 14px; }
.steps svg { width: 46px; height: 46px; filter: drop-shadow(0 0 10px rgba(192, 132, 252, .6)); }
.steps b { display: block; margin-top: 2px; font-size: 17px; }
.steps span { color: var(--mist); font-size: 15px; }

.court-top { height: 0; }
.crest { float: right; width: 112px; height: 112px; margin: -6px 0 10px 16px; border-radius: 50%; box-shadow: 0 0 40px rgba(139, 92, 246, .6); object-fit: cover; }
.faq { display: grid; gap: 8px; }
.faq details { border-radius: 12px; background: rgba(42, 33, 64, .76); box-shadow: 0 0 0 1px var(--line) inset; }
.faq summary { position: relative; padding: 14px 44px 14px 16px; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { position: absolute; top: 50%; right: 16px; color: var(--violet); content: "+"; font-size: 22px; transform: translateY(-50%); transition: transform .3s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq p { margin: 0; padding: 0 16px 14px; color: var(--mist); font-size: 15px; }

.dawn-panel { text-align: center; background: rgba(40, 18, 72, .84); }
.founder { display: block; width: 150px; height: 150px; margin: 0 auto 12px; padding: 4px; border-radius: 50%; background: linear-gradient(160deg, #fff, #a495c9 35%, #4a3d6b 55%, #e9e3ff); box-shadow: 0 0 40px rgba(255, 198, 217, .5); object-fit: cover; object-position: 50% 30%; }
.caption { margin: -4px 0 14px; color: var(--mist); font-size: 13px; }
.closing-vow { margin: 0 0 4px; }
.trio { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.fine { margin: 22px 0 0; color: var(--mist); font-size: 12.5px; }

.dock { position: fixed; right: 0; bottom: 0; left: 0; z-index: 20; padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(180deg, transparent, rgba(7, 3, 15, .94) 35%); transform: translateY(110%); transition: transform .35s ease; }
.dock.show { transform: translateY(0); }
.dock .button { width: 100%; }

@keyframes fall { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@keyframes twinkle { 50% { opacity: .35; } }

@media (min-width: 760px) {
  .rail { display: flex; }
  .trio .button { flex: 0 1 auto; }
  .chapter { padding-inline: max(40px, 8vw); }
  .dock { display: none; }
}

@media (max-width: 520px) {
  .moon { left: 84%; top: 8vh; width: 46vw; }
  .crest { width: 88px; height: 88px; }
  .panel { padding: 22px 18px; }
  .chapter { padding: 82px 16px 74px; }
  .hero { padding-top: 88px; padding-bottom: 64px; }
  .kicker { font-size: 10px; letter-spacing: .16em; }
  .wordmark { font-size: clamp(62px, 16vw, 78px); }
  .vow { font-size: clamp(38px, 10vw, 48px); }
  .plaque { margin-bottom: 18px; font-size: 18px; }
  .scroll-cue { margin-top: 27px; }
  .scroll-cue::after { height: 30px; }
  .services { gap: 10px 14px; font-size: 13px; }
  .faq summary { padding-right: 38px; }
  .trio { display: grid; }
  .trio .button { width: 100%; }
  .dawn-panel { padding-bottom: 24px; }
}

@media (max-width: 360px) {
  .bar { padding-inline: 12px; }
  .brand { gap: 7px; }
  .brand img { width: 34px; height: 34px; }
  .brand span { font-size: 18px; }
  .clock { padding: 6px 10px; font-size: 12px; }
  .wordmark { font-size: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
