:root {
  --ink: #0e1430;
  --dusk: #251c42;
  --rose: #5e3a57;
  --gold: #ffd79a;
  --light: #eef1ff;
  --mist: #a3abcf;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--ink); }
body {
  margin: 0;
  font: 400 1.125rem/1.7 var(--serif);
  color: var(--light);
  background: linear-gradient(180deg, var(--ink) 0%, #141a3c 45%, var(--dusk) 80%, #33244a 100%) fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: #ffe9c6; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 2px; }
h1, h2, h3 { font-weight: 400; line-height: 1.12; margin: 0; }
p { margin: 0; }

.skip { position: absolute; left: -999px; top: 12px; background: var(--light); color: var(--ink); padding: 10px 16px; z-index: 5; }
.skip:focus { left: 16px; }

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1160px; margin: 0 auto; padding: 22px 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--light); text-decoration: none; font-size: 1.15rem; letter-spacing: .01em; }
.site-header nav { display: flex; gap: 24px; }
.site-header nav a { color: var(--mist); text-decoration: none; font-size: 1rem; }
.site-header nav a:hover { color: var(--light); }

/* Hero: the constellation draws itself, once. */
.hero {
  position: relative; isolation: isolate; max-width: 1160px; margin: 0 auto; padding: 40px 24px 96px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: center;
}
.field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; fill: var(--light); opacity: .55; }
.field .tw { animation: twinkle 5s ease-in-out infinite; }
.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); letter-spacing: -.015em; max-width: 13ch; }
.intro { margin-top: 24px; max-width: 34em; color: #d6dbf3; font-size: 1.2rem; }
.status { margin-top: 36px; color: var(--gold); font-size: 1.15rem; }
.status-detail { color: var(--mist); font-size: 1rem; margin-top: 4px; }

.sky-art { margin: 0; }
.sky-art svg { width: 100%; height: auto; display: block; overflow: visible; }
.guides line { stroke: var(--light); stroke-opacity: .2; stroke-width: 1.2; stroke-dasharray: 2 7; stroke-linecap: round; }
.thread, .thread-glow { fill: none; stroke: var(--gold); stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.thread { stroke-width: 2.2; animation: draw 4.2s cubic-bezier(.45, .05, .35, 1) .6s forwards; }
.thread-glow { stroke-width: 9; opacity: .5; animation: draw 4.2s cubic-bezier(.45, .05, .35, 1) .6s forwards, breathe 5s ease-in-out var(--end) infinite; }
.star .halo { fill: url(#halo); opacity: .35; transform-box: fill-box; transform-origin: center; animation: flare 1.4s ease-out var(--at) both; }
.star .core { fill: var(--light); }
.star .glint { stroke: #fff6e4; stroke-width: 1; stroke-linecap: round; opacity: 0; transform-box: fill-box; transform-origin: center; animation: glint 1.6s ease-out var(--at) forwards; }
.mote { fill: #fff1d4; opacity: 0; animation: rise 3.6s ease-out infinite; }
.figure { animation: bob 8s ease-in-out var(--end) infinite; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes flare { 0% { opacity: .35; transform: scale(1); } 25% { opacity: 1; transform: scale(1.9); } 100% { opacity: .8; transform: scale(1.15); } }
@keyframes glint { 0% { opacity: 0; transform: scale(.4) rotate(0deg); } 30% { opacity: 1; transform: scale(1.4) rotate(12deg); } 100% { opacity: .55; transform: scale(.9) rotate(20deg); } }
@keyframes breathe { 50% { opacity: .8; } }
@keyframes rise { 0% { opacity: 0; transform: translate(0, 0); } 20% { opacity: .9; } 100% { opacity: 0; transform: translate(var(--drift), -34px); } }
@keyframes bob { 50% { transform: translateY(-7px) rotate(-.6deg); } }
@keyframes twinkle { 50% { opacity: .25; } }

/* How it plays: a real sequence, so it is numbered. */
.how, .evening, .contact, .document { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.how { padding-top: 24px; padding-bottom: 88px; }
.how h2, .evening h2, .contact h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); }
.how ol { list-style: none; counter-reset: step; margin: 36px 0 0; padding: 0; display: grid; gap: 32px; }
.how li { counter-increment: step; display: grid; grid-template-columns: 3.2rem 1fr; column-gap: 12px; }
.how li::before { content: counter(step); grid-row: span 2; font-size: 2.4rem; line-height: 1; color: var(--gold); font-style: italic; }
.how h3 { font-size: 1.4rem; }
.how li p { margin-top: 6px; color: #cfd4ee; max-width: 34em; }

.evening { padding-bottom: 88px; }
.evening p { margin-top: 16px; color: #cfd4ee; max-width: 34em; font-size: 1.2rem; }

.contact { padding-bottom: 96px; }
.contact p { margin-top: 12px; color: var(--mist); }
.contact a { display: inline-block; margin-top: 12px; font-size: 1.2rem; }

.document { padding-top: 48px; padding-bottom: 96px; }
.document h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); margin-bottom: 24px; }
.document h2 { font-size: 1.6rem; margin: 40px 0 12px; }
.document p + p { margin-top: 16px; }
.document p { color: #d6dbf3; max-width: 36em; }
.document .contact { padding: 48px 0 0; }
.email { font-size: 1.15rem; }

footer {
  max-width: 1160px; margin: 0 auto; padding: 28px 24px 40px; border-top: 1px solid rgba(238, 241, 255, .12);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; color: var(--mist); font-size: .95rem;
}
footer span { margin-left: 10px; opacity: .8; }
.languages { display: flex; flex-wrap: wrap; gap: 16px; }
.languages a { color: var(--mist); text-decoration: none; }
.languages a[aria-current] { color: var(--light); text-decoration: underline; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 8px; padding-bottom: 64px; gap: 8px; }
  .sky-art { order: -1; margin: 0 -8px; }
  .hero h1 { max-width: none; }
  .site-header nav { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .thread, .thread-glow { animation: none; stroke-dashoffset: 0; }
  .star .halo { animation: none; opacity: .8; }
  .star .glint { animation: none; opacity: .5; }
  .mote, .field .tw, .figure { animation: none; }
}
