@font-face {
  font-family: "Inter";
  src: url(assets/fonts/inter.woff2) format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";            /* one word is set in it: "always" */
  src: url(assets/fonts/instrument-serif-italic.woff2) format("woff2");
  font-style: italic; font-weight: 400;
  font-display: swap;
}

:root {
  --ground: #08070a;          /* near black, the faintest plum */
  --text: #f1eff4;
  --soft: #aeaaba;            /* the line under the lockup: a step back, so its last word can step forward */
  --violet: #8a4bff;          /* the logo's violet, as light */
  --m: clamp(84px, min(27vh, (100vw - 48px) / 3), 320px);   /* height of the logo; the letters beside it are sized from it */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;           /* one screen, nothing to scroll */
  background: var(--ground);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-user-select: none; user-select: none;   /* a poster, not a document: nothing on it highlights */
}
a { color: inherit; text-decoration: none; }

/* ---------- the horizon of light under the lockup ---------- */
/* main.js draws it on this canvas. Without WebGL2 a plain CSS arc stands in: the same circle, in the
   logo's violet, built from opaque stops so it leaves no banded edge on the dark ground. */
.scene { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; display: none; }
.gl .scene { display: block; }
html:not(.gl) body {
  --r: max(90vw, 50vh);
  background: radial-gradient(circle at 50% calc(80vh + var(--r)),
    var(--ground) calc(var(--r) - 1.5px), #efe9ff var(--r), #45217f calc(var(--r) + 5px),
    #170d29 calc(var(--r) + 60px), var(--ground) calc(var(--r) + 240px)) var(--ground);
}

/* ---------- lockup, line, button ---------- */
main {
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 24px 15vh;       /* the lower part of the screen belongs to the horizon */
  text-align: center;
}

/* KR, the logo, NO: the lockup from the Kronos banner. Equal side columns keep the logo on the
   page's centre line, where the horizon's two colours meet. */
.lockup {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  column-gap: calc(var(--m) * .16);
  width: 100%;
  font-size: calc(var(--m) * .52); font-weight: 700; line-height: 1; letter-spacing: -.045em;
}
.lockup span {
  justify-self: start;
  background: linear-gradient(#fff 30%, #c3bfd0 78%, #a9a4b8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: .06em; margin-right: -.06em;   /* tight tracking leaves the last letter outside the box, where the gradient would not reach it */
  filter: drop-shadow(0 0 .2em rgb(255 255 255 / .2));
}
/* Each side of the lockup takes after the half of the logo it stands by: KR violet in its shade and its glow, NO white. */
.lockup span:first-child {
  justify-self: end;
  background-image: linear-gradient(#fff 30%, #cbb8ff 78%, #a987ff);
  filter: drop-shadow(0 0 .2em rgb(138 75 255 / .5));
}
.mark { height: var(--m); width: auto; display: block; overflow: visible; }   /* its glow reaches past its box */

h1 {
  margin: clamp(26px, 6vh, 60px) 0 0;
  font-size: clamp(18px, calc(var(--m) * .125), 32px);      /* in step with the lockup above it */
  font-weight: 500; line-height: 1.2; letter-spacing: -.02em;
  color: var(--soft);
  text-wrap: balance;
}
/* "always": the one word in an italic serif, at full white, standing on a small horizon of its own. */
h1 em {
  position: relative;
  font-family: "Instrument Serif", Georgia, serif; font-size: 1.3em; font-weight: 400; line-height: 1; letter-spacing: 0;
  color: #fff;
}
h1 em::after {
  content: ""; position: absolute; left: -.12em; right: -.12em; bottom: -.04em; height: 1px;
  background: linear-gradient(90deg, transparent, var(--violet) 30%, #fff 70%, transparent);
  box-shadow: 0 0 .5em rgb(138 75 255 / .7);
}

.btn {
  margin-top: clamp(24px, 4.4vh, 44px);
  display: inline-flex; align-items: center; gap: 9px;
  height: clamp(44px, 4.6vh, 50px); padding: 0 1.35em 0 1.15em;
  border: 0; border-radius: 999px;
  position: relative;
  /* two layers: a violet sheen parked off its left edge, which crosses on hover, over the button's own white */
  background: linear-gradient(105deg, transparent 38%, rgb(138 75 255 / .28) 50%, transparent 62%) 100% 0 / 300% 100% no-repeat,
              linear-gradient(#fff, #e2ddef);
  color: #0c0a0f;
  /* a lit top edge, a shaded bottom edge, a contact shadow, and the logo's violet glowing from under it */
  --top: inset 0 1px 0 0 #fff;
  --under: 0 10px 30px -8px rgb(138 75 255 / .65);
  --ring: 0 0 0 0 rgb(241 239 244 / .14);
  box-shadow: var(--top), inset 0 -1px 0 rgb(40 20 80 / .18), 0 1px 2px rgb(0 0 0 / .6), var(--under), var(--ring);
  font-family: inherit; font-size: clamp(15px, 1.6vh, 17px); font-weight: 500; letter-spacing: -.005em;
  cursor: pointer;
  transition: box-shadow .3s var(--ease-out), transform .4s cubic-bezier(.34, 1.56, .64, 1);   /* it springs back a little past its place */
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 1.27em; height: 1.27em; }
/* The ring of light it lets go of. While the button is held the ring sits on its edge; on release it widens and fades. */
.btn::after {
  content: ""; position: absolute; inset: -18px; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 1.5px rgb(205 184 255 / .9), 0 0 16px 1px rgb(138 75 255 / .7);
  opacity: 0;
  transition: inset .65s var(--ease-out), opacity .65s ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    transform: translateY(-1px); --ring: 0 0 0 5px rgb(241 239 244 / .14); --under: 0 14px 38px -8px rgb(138 75 255 / .95);
    background-position: 0 0, 0 0;
    transition: box-shadow .3s var(--ease-out), transform .4s cubic-bezier(.34, 1.56, .64, 1), background-position .75s var(--ease-out);
  }
}
/* Pressed: it sinks into the page, its lit edge turns to shade, and the glow under it gathers tight and bright.
   main.js makes the horizon surge at the same moment. */
.btn:active {
  transform: translateY(1px) scale(.96);
  --top: inset 0 2px 5px 0 rgb(40 20 80 / .32);
  --under: 0 3px 14px -2px rgb(138 75 255 / 1);
  --ring: 0 0 0 0 rgb(241 239 244 / .14);
  transition-duration: .09s;
}
.btn:active::after { inset: 0; opacity: 1; transition: none; }
.btn:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }

/* ---------- entrance: the logo, its letters out from behind it, the line, the button; then the horizon rises (main.js) ---------- */
.mark { animation: arrive .5s ease-out backwards; }
.lockup span { animation: part .8s var(--ease-out) .12s backwards; --from: -.18em; }
.lockup span:first-child { --from: .18em; }
h1 { animation: rise .7s var(--ease-out) .45s backwards; }
h1 em::after { animation: draw .9s var(--ease-out) 1.2s backwards; }
.btn { animation: rise .7s var(--ease-out) .58s backwards; }
@keyframes arrive { from { opacity: 0; } }
@keyframes part { from { opacity: 0; transform: translateX(var(--from)); } }
@keyframes draw { from { transform: scaleX(0); opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); filter: blur(6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
