/* DEF IT — splash page (www3d/splash.html). Dark stage only.
   Contents: fonts, tokens, stage, overlay, flat tier, motion tiers. */

/* ---------- Fonts (self-hosted, OFL) ---------- */
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/jost-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/jost-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Commissioner";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/commissioner-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Commissioner";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/commissioner-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --green: #96bb39;
  --green-hot: #c9df86;
  --bg: #061417;
  --ink: #e8eee6;
  --ink-soft: #a3b4ab;
  --accent-text: #b4d65c;
  --line: rgba(214, 232, 220, 0.16);
  --glow: rgba(150, 187, 57, 0.18);
  --font-display: "Jost", "Century Gothic", "Avenir Next", system-ui, sans-serif;
  --font-body: "Commissioner", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --e-arrive: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
html {
  background: var(--bg);
}
body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Stage ---------- */
.splash {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  cursor: default;
}
.splash__stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: var(--bg);
}
/* Soft vignette and a fine grain over the stage, under the type. */
.splash__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 62% at 50% 44%, transparent 40%, rgba(3, 10, 12, 0.8) 100%),
    linear-gradient(to bottom, rgba(6, 20, 23, 0.55), transparent 22%, transparent 60%, rgba(6, 20, 23, 0.7) 78%, rgba(6, 20, 23, 0.95));
}
.splash__veil {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
}

/* ---------- Flat lockup (no WebGL, Off motion, no JS) ---------- */
.splash__flat {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 2.4vh, 1.5rem);
  padding-bottom: 22vh;
  pointer-events: none;
}
.splash__flat::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 44%;
  width: min(80vmin, 44rem);
  aspect-ratio: 1;
  border-radius: 50%;
  translate: -50% -50%;
  background: radial-gradient(circle, var(--glow), transparent 62%);
}
.splash__flat-mark {
  width: min(34vmin, 11rem);
  height: auto;
  aspect-ratio: 144 / 130;
  fill: var(--green);
  filter: drop-shadow(0 0 32px rgba(150, 187, 57, 0.35));
}
.splash__flat-word {
  width: min(42vmin, 13.5rem);
  height: auto;
  aspect-ratio: 175 / 46;
  fill: var(--ink);
}
.js .splash__flat {
  display: none;
}
.js.splash-flat .splash__flat {
  display: flex;
}
.js.splash-flat .splash__stage {
  display: none;
}
.splash-3d .splash__flat {
  display: none;
}

/* ---------- Overlay ---------- */
.splash__top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1rem, 2.6vh, 1.75rem) var(--gutter);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.splash__brand {
  font-family: var(--font-display);
  font-weight: 500;
}
.splash__tools {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.splash__lang a,
.splash__skip {
  text-decoration: none;
  transition: color 0.25s ease;
}
.splash__lang a:hover,
.splash__skip:hover {
  color: var(--ink);
}
.splash__lang span {
  color: var(--ink);
}
.splash__lang span::after {
  content: "·";
  margin: 0 0.5em;
  color: var(--ink-soft);
}
.splash__skip {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
.splash__skip::after {
  content: "";
  width: 1.4em;
  height: 1px;
  background: currentColor;
  transition: width 0.3s var(--ease);
}
.splash__skip:hover::after {
  width: 2.2em;
}

.splash__copy {
  position: relative;
  z-index: 2;
  grid-row: 3;
  display: grid;
  justify-items: center;
  gap: clamp(0.6rem, 1.6vh, 1rem);
  padding: 0 var(--gutter) clamp(1.5rem, 5vh, 3.5rem);
  text-align: center;
}
.splash__words {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.35rem, 3.4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.splash__words .w {
  display: inline-block;
  white-space: nowrap;
  margin: 0 0.5em;
}
.splash__words .l {
  display: inline-block;
  will-change: transform, opacity;
}
.splash__words .l--stop {
  color: var(--green);
}
.splash__rule {
  width: min(22rem, 60vw);
  height: 1px;
  background: linear-gradient(to right, transparent, var(--green-hot) 30%, var(--green-hot) 70%, transparent);
  transform-origin: 50% 50%;
}
.splash__tagline {
  margin: 0;
  max-width: 44rem;
  font-size: clamp(0.9rem, 1.3vw, 1.05rem);
  line-height: 1.6;
  color: var(--ink-soft);
}
.splash__actions {
  margin: 0.25rem 0 0;
}
.splash__enter {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  min-height: 3.25rem;
  padding: 0.8rem 1.9rem 0.8rem 2.1rem;
  border: 1px solid rgba(201, 223, 134, 0.55);
  border-radius: 999px;
  overflow: hidden;
  isolation: isolate;
  font: 600 1rem/1.2 var(--font-body);
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  background: rgba(6, 20, 23, 0.4);
  backdrop-filter: blur(6px);
  transition: color 0.3s ease, border-color 0.3s ease, box-shadow 0.4s ease;
}
.splash__enter::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.45s var(--e-arrive);
}
.splash__enter:hover,
.splash__enter:focus-visible {
  color: #061417;
  border-color: var(--green);
  box-shadow: 0 0 0 1px rgba(150, 187, 57, 0.2), 0 12px 48px rgba(150, 187, 57, 0.35);
}
.splash__enter:hover::before,
.splash__enter:focus-visible::before {
  transform: scaleX(1);
}
.splash__enter svg {
  width: 1.1em;
  height: 1.1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: translate 0.35s var(--e-arrive);
}
.splash__enter:hover svg {
  translate: 0.25em 0;
}
.splash__hint {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.8;
}

/* With script the overlay copy and the lockup start hidden and the sequence brings
   them in (GSAP in the 3D tier, keyframes in the flat tier). */
.js .splash__copy {
  opacity: 0;
}
.js.splash-flat .splash__copy {
  animation: splash-rise 1.1s var(--e-arrive) 0.5s both;
}
.js.splash-flat .splash__flat {
  animation: splash-rise 1.4s var(--e-arrive) both;
}
@keyframes splash-rise {
  from {
    opacity: 0;
    translate: 0 1.2rem;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
/* Leaving in the flat and reduced tiers: a plain fade to the site's colour. */
.splash-leaving .splash__veil {
  opacity: 1;
  transition: opacity 0.4s ease;
}
/* Off: everything there at once. */
.motion-off .splash__copy,
.motion-off .splash__flat {
  animation: none;
  opacity: 1;
}

@media (max-width: 640px) {
  .splash__brand {
    display: none;
  }
  .splash__words .w {
    display: block;
    margin: 0.15em 0;
  }
  .splash__hint {
    display: none;
  }
}
@media (max-height: 560px) {
  .splash__tagline,
  .splash__hint {
    display: none;
  }
}
