@font-face { font-family: 'Sora'; src: url('/fonts/sora.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }
@font-face { font-family: 'Fragment Mono'; src: url('/fonts/fragment-mono.woff2') format('woff2'); font-weight: 400; font-display: swap; }

/* Version2 brand values: one accent (#991717 with its hover, pressed and
   text-on-dark tones) on the warm charcoal ground. */
:root {
  --ground: #0c0a09;
  --raised: #15120f;
  --ink: #f0e8e0;
  --muted: #a39a92;
  --faint: #8a8079;
  --line: #322c27;
  --red: #991717;
  --red-hover: #cc2323;
  --red-pressed: #7a1212;
  --red-text: #e65353;
  --display: 'Sora', 'Segoe UI', sans-serif;
  --mono: 'Fragment Mono', ui-monospace, 'Cascadia Mono', monospace;
  --gutter: clamp(20px, 4vw, 56px);
  --stage: clamp(260px, 54vmin, 540px);
  --ease-out: cubic-bezier(0.16, 0.84, 0.24, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ground);
  color: var(--ink);
  font: 300 1rem/1.6 var(--display);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--ink); text-decoration-color: var(--red-text); }
:focus-visible { outline: 2px solid var(--red-text); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--red); color: var(--ink); }

.sky { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; pointer-events: none; }
.top, main, .foot { position: relative; z-index: 1; }

/* Header */
.top {
  position: absolute; inset: 0 0 auto 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(18px, 3vw, 32px) var(--gutter);
  animation: fade 1.4s ease 2.1s both;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; fill: var(--ink); }
.brand-domain, .top-link { font: 400 0.8125rem/1 var(--mono); color: var(--muted); letter-spacing: 0.02em; }
.top-link { text-decoration: none; padding: 8px 0; }
.top-link:hover { color: var(--ink); }

/* Hero: the eclipse stage, then the line under it */
.hero {
  min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(88px, 12vh, 128px) var(--gutter) clamp(56px, 9vh, 96px);
  text-align: center;
}
.stage { position: relative; width: var(--stage); aspect-ratio: 1; flex: none; }
.inscription {
  position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
  fill: var(--ink); fill-opacity: 0.62;
  font: 400 12.5px var(--mono); letter-spacing: 0;
  animation: fade 2.6s ease 1.5s both, spin 180s linear infinite;
}
.hero h1 {
  margin: calc(var(--stage) * -0.06) 0 0;
  font-weight: 250; font-size: clamp(2.75rem, 7vw, 6.25rem); line-height: 1.04; letter-spacing: -0.045em;
  text-wrap: balance;
  animation: rise 1.6s var(--ease-out) 1.7s both;
}
.h1-term { font-weight: 600; letter-spacing: -0.02em; }
.lede {
  max-width: 46ch; margin: clamp(18px, 2.4vh, 28px) auto 0;
  color: var(--muted); font-size: clamp(1rem, 0.35vw + 0.92rem, 1.1875rem); line-height: 1.65;
  text-wrap: pretty;
  animation: rise-soft 1.4s var(--ease-out) 2.3s both;
}

/* Without WebGL the stage draws a still eclipse in CSS */
.no-webgl .stage::before {
  content: ''; position: absolute; inset: -30%; border-radius: 50%;
  background: radial-gradient(circle, #050404 0 19.2%, #e65353 19.6%, #991717 20.6%, rgb(122 18 18 / 0.55) 24%, rgb(122 18 18 / 0.18) 34%, transparent 48%);
  animation: fade 2s ease 0.4s both;
}

/* 404 */
.stage-small { --stage: clamp(200px, 34vmin, 320px); }
.hero .lost-title { margin-top: 12px; font-size: clamp(2rem, 4.4vw, 3.5rem); font-weight: 300; }

@keyframes fade { from { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(0.3em); filter: blur(10px); } }
@keyframes rise-soft { from { opacity: 0; transform: translateY(12px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .top, .hero h1, .lede, .inscription, .no-webgl .stage::before { animation: none; }
}
