:root {
  /* colour: ink ground, bone text; orange and blue live only in the field */
  --color-surface: #05070a;
  --color-text: #ece6da;
  --color-text-muted: #a39e94;

  /* spacing: 8px grid */
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-6: 48px;
  --s-8: 64px;
  --s-12: 96px;

  /* type: one family, four sizes */
  --font: "Schibsted Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --t-name: 1.125rem;
  --t-lead: clamp(1.125rem, 0.5vw + 1rem, 1.5rem);
  --t-h: clamp(2rem, 3.6vw + 0.75rem, 4.25rem);
  --t-end: clamp(3rem, 6vw + 1rem, 6rem);

  --pad: var(--s-3);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) { :root { --pad: var(--s-6); } }
@media (min-width: 1024px) { :root { --pad: var(--s-8); } }

* { box-sizing: border-box; margin: 0; }

html {
  background: var(--color-surface);
  scroll-snap-type: y proximity;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  color: var(--color-text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--color-text); color: var(--color-surface); }

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: var(--color-surface);
}

.veil {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(5, 7, 10, 0.88) 0%, rgba(5, 7, 10, 0) 46%);
}

.top {
  position: fixed;
  z-index: 3;
  top: 0;
  left: 0;
  padding: var(--s-3) var(--pad);
}

.name {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--t-name);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.name:focus-visible { outline: 1px solid var(--color-text); outline-offset: 8px; }

main { position: relative; z-index: 2; }

.scene {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding: var(--s-12) var(--pad) var(--s-8);
  scroll-snap-align: start;
}

.copy > * + * { margin-top: var(--s-3); }

h1, h2 {
  font-size: var(--t-h);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.03em;
  max-width: 17ch;
  text-wrap: balance;
}

.lead {
  font-size: var(--t-lead);
  line-height: 1.4;
  color: var(--color-text-muted);
  max-width: 34ch;
}

.scene--end { align-items: center; justify-items: center; text-align: center; padding-bottom: var(--s-12); }
.scene--end .copy { display: grid; justify-items: center; }
.endmark { font-size: var(--t-end); font-weight: 600; letter-spacing: -0.04em; max-width: none; }

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}

.scene.is-active .reveal { opacity: 1; transform: none; transition-delay: 0.15s; }
.scene.is-active .reveal:nth-child(2) { transition-delay: 0.35s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition-duration: 0.01s; transform: none; }
}
