@font-face {
  font-family: "Iskoola Pota";
  src: local("Iskoola Pota"), local("IskoolaPota"),
       url("fonts/iskoola-pota-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0a09;
  --ink: #ece7df;
  --soft: #aaa49b;
  --muted: #8b867f;
  --light: 255 240 218;
  --pad: clamp(1.5rem, 7vw, 7.5rem);
  --slit-x: 71vw;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Iskoola Pota", "Times New Roman", Times, serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Film grain: breaks up gradient banding and keeps the black from feeling flat. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' 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 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* A single gap of light, like a door left slightly open. */
.light {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.light span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--slit-x);
  transform: translateX(-50%);
}

.wash {
  width: 120vmin;
  background: radial-gradient(ellipse 50% 58% at 50% 56%,
    rgb(var(--light) / 0.075),
    rgb(var(--light) / 0.025) 48%,
    transparent 78%);
  animation: fade 4s ease-out 0.4s both;
}

.glow,
.core {
  background: linear-gradient(to bottom,
    rgb(var(--light) / 0) 2%,
    rgb(var(--light) / 0.35) 22%,
    rgb(var(--light) / 0.95) 56%,
    rgb(var(--light) / 0.55) 86%,
    rgb(var(--light) / 0.15) 100%);
  animation: open 3s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s both;
}

.glow {
  width: 22px;
  filter: blur(10px);
  opacity: 0.55;
}

.core { width: 1.5px; }

main {
  align-self: center;
  position: relative;
  padding: 4rem var(--pad);
}

h1 {
  max-width: min(11em, calc(var(--slit-x) - 2 * var(--pad)));
  margin: 0;
  font-weight: 400;
  font-size: clamp(2.1rem, 1.2rem + 3.6vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
  animation: fade 1.8s ease-out 1.1s both;
}

.mission {
  max-width: calc(var(--slit-x) - 2 * var(--pad));
  margin: clamp(1.25rem, 2.4vw, 2rem) 0 0;
  color: var(--soft);
  font-size: clamp(1.05rem, 0.95rem + 0.45vw, 1.35rem);
  line-height: 1.4;
  text-wrap: pretty;
  animation: fade 1.8s ease-out 1.5s both;
}

footer {
  position: relative;
  padding: 0 var(--pad) clamp(1.75rem, 4vw, 3rem);
}

footer p {
  max-width: calc(var(--slit-x) - 2 * var(--pad));
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.9rem, 0.85rem + 0.2vw, 1rem);
  line-height: 1.5;
  text-wrap: pretty;
  animation: fade 1.8s ease-out 1.9s both;
}

@keyframes open {
  from { opacity: 0; transform: translateX(-50%) scaleX(0); }
  to   { opacity: 1; transform: translateX(-50%) scaleX(1); }
}

@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (max-width: 640px) {
  :root { --slit-x: 86vw; }
}

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