@font-face {
  font-family: "Kalnia Nora";
  src: url("fonts/kalnia-nora.woff2") format("woff2");
  font-weight: 250 450;
  font-style: normal;
  font-display: swap;
}

:root {
  --plum-950: #130716;
  --plum-900: #1a0a1d;
  --plum-800: #261128;
  --plum-glow: #3d1529;
  --amber: #ffad63;
  --rose: #ff7a9e;
  --ice: #a7c6ff;
  --ivory: #fbefe1;
  --lilac: #c3a7c0;
  --line-size: 14px;
  --line-track: 0.12em;
  --gutter: clamp(20px, 4.4vh, 46px);
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --t-fast: 160ms;
  --t-reveal: 900ms;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--plum-900);
  color: var(--ivory);
}

body {
  font-family: "Kalnia Nora", "Didot", "Bodoni 72", Georgia, serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

.stage {
  position: fixed;
  inset: 0;
  isolation: isolate;
  background:
    radial-gradient(ellipse 60% 45% at 62% 108%, var(--plum-glow), transparent 70%),
    radial-gradient(ellipse 45% 35% at 6% -6%, #22183a, transparent 70%),
    linear-gradient(to bottom, var(--plum-950), var(--plum-800));
}

.lens {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity var(--t-reveal) var(--ease-out);
}

.gl .lens { opacity: 1; }

.word {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  place-items: center;
  padding-bottom: 6vh;
  font-size: 8.4vw;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--ivory);
  pointer-events: none;
  user-select: none;
}

.word span {
  grid-area: 1 / 1;
  -webkit-mask-image: radial-gradient(ellipse 20vw 15vw at 62% 52%, #000 35%, transparent 78%);
  mask-image: radial-gradient(ellipse 20vw 15vw at 62% 52%, #000 35%, transparent 78%);
}

.word::before {
  content: attr(data-text);
  grid-area: 1 / 1;
  color: var(--lilac);
  opacity: 0.5;
  filter: blur(0.09em);
}

.word[data-short] { font-size: min(30vw, 40vh); }

.gl .word {
  position: absolute;
  width: 1px;
  height: 1px;
  inset: auto;
  overflow: hidden;
  clip-path: inset(50%);
  padding: 0;
}

.line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--gutter);
  margin: 0;
  text-align: center;
  font-size: var(--line-size);
  font-weight: 450;
  letter-spacing: var(--line-track);
  color: var(--lilac);
  opacity: calc(0.8 + var(--near, 0) * 0.2);
}

.line a {
  color: var(--ivory);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.45em;
  text-decoration-color: color-mix(in srgb, var(--ivory) 45%, transparent);
  transition: color var(--t-fast) var(--ease-out), text-decoration-color var(--t-fast) var(--ease-out);
}

.line a:hover { color: var(--amber); text-decoration-color: var(--amber); }

.line a:active { color: var(--rose); }

.line a:focus-visible {
  outline: 1px solid var(--amber);
  outline-offset: 6px;
  border-radius: 2px;
}

html:not(.gl) .stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 14% 71%, rgb(255 173 99 / 0.42) 0 3.6vmin, transparent 5.4vmin),
    radial-gradient(circle at 27% 62%, rgb(255 122 158 / 0.31) 0 6vmin, transparent 8.6vmin),
    radial-gradient(circle at 41% 77%, rgb(255 173 99 / 0.28) 0 2.2vmin, transparent 3.4vmin),
    radial-gradient(circle at 55% 58%, rgb(167 198 255 / 0.22) 0 4.4vmin, transparent 6.6vmin),
    radial-gradient(circle at 63% 49%, rgb(255 230 200 / 0.70) 0 1.1vmin, transparent 1.5vmin),
    radial-gradient(circle at 69% 44%, rgb(255 173 99 / 0.70) 0 1.6vmin, transparent 2vmin),
    radial-gradient(circle at 74% 53%, rgb(255 122 158 / 0.63) 0 1.3vmin, transparent 1.7vmin),
    radial-gradient(circle at 82% 38%, rgb(255 173 99 / 0.31) 0 7vmin, transparent 10vmin),
    radial-gradient(circle at 91% 30%, rgb(255 122 158 / 0.25) 0 3vmin, transparent 4.6vmin),
    radial-gradient(circle at 8% 22%, rgb(167 198 255 / 0.20) 0 5vmin, transparent 7.4vmin),
    radial-gradient(circle at 36% 30%, rgb(255 173 99 / 0.17) 0 2.6vmin, transparent 4vmin),
    radial-gradient(circle at 88% 82%, rgb(255 173 99 / 0.34) 0 4vmin, transparent 6vmin);
}

html:not(.gl) .stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -0.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  .lens, .line a { transition: none; }
}
