.preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  background: #03080d;
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}
body.is-entered .preloader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.pre-brand {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  letter-spacing: -0.05em;
  line-height: 0.9;
}
.pre-brand span { font-style: italic; font-weight: 400; color: var(--ice); }
.pre-file {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  min-height: 1em;
}
.pre-track {
  width: min(14rem, 48vw);
  height: 1px;
  background: rgba(232, 242, 244, 0.12);
  overflow: hidden;
}
.pre-track i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--ice);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s linear;
}
.pre-pct {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  color: var(--ice);
}
.enter {
  margin-top: 1rem;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--line);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.enter:hover { border-color: var(--ice); }
body:not(.is-entered) .chrome,
body:not(.is-entered) main { opacity: 0; pointer-events: none; }
body.is-entered .chrome,
body.is-entered main { opacity: 1; transition: opacity 0.7s 0.2s var(--ease); }
body.is-hero .world-fade { opacity: 0.15; }
body.is-roadmap .world-fade { opacity: 0.35; }

:root {
  --snow: #e8f2f4;
  --ice: #9ed8e0;
  --fjord: #0c2a38;
  --ink: #f2f7f8;
  --muted: #9bb0b6;
  --night: #071018;
  --depth: #031018;
  --accent: #7ec8c4;
  --line: rgba(232, 242, 244, 0.14);
  --ease: cubic-bezier(0.22, 0.84, 0.28, 1);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--depth);
  color: var(--ink);
  font-family: "Sora", "Segoe UI", sans-serif;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.skip-link {
  position: fixed;
  z-index: 200;
  left: 1rem;
  top: 1rem;
  padding: 0.7rem 1rem;
  background: #fff;
  color: #000;
  transform: translateY(-160%);
  transition: 0.2s;
}
.skip-link:focus { transform: none; }

.world {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(126, 200, 196, 0.12), transparent 42%),
    linear-gradient(180deg, #0a1a28 0%, #071018 48%, #030b12 100%);
}
#norway-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.world-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 11, 18, 0.72) 0%, transparent 28%, transparent 72%, rgba(3, 11, 18, 0.35) 100%),
    linear-gradient(180deg, rgba(3, 11, 18, 0.45) 0%, transparent 22%, transparent 70%, rgba(3, 11, 18, 0.78) 100%);
}

.chrome {
  position: fixed;
  z-index: 40;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem clamp(1rem, 3vw, 2.5rem);
  pointer-events: none;
}
.chrome > * { pointer-events: auto; }
.brand {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.brand span {
  font-weight: 400;
  font-style: italic;
  opacity: 0.72;
}
.chrome-meta {
  margin: 0;
  justify-self: center;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.view-toggle {
  justify-self: end;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  background: rgba(7, 16, 24, 0.45);
  backdrop-filter: blur(12px);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.view-toggle[aria-pressed="true"],
.view-toggle:hover {
  border-color: rgba(158, 216, 224, 0.55);
  background: rgba(14, 36, 48, 0.7);
}

main {
  position: relative;
  z-index: 20;
  min-height: 100vh;
  pointer-events: none;
}
main button,
main a { pointer-events: auto; }

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding:
    clamp(5.5rem, 12vh, 8rem)
    clamp(1.25rem, 4vw, 4rem)
    clamp(7rem, 14vh, 9rem);
  max-width: 52rem;
}
.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ice);
  opacity: 0;
  animation: rise 1.1s var(--ease) 0.15s forwards;
}
.hero-brand {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(4.2rem, 14vw, 9.5rem);
  line-height: 0.86;
  letter-spacing: -0.05em;
  font-weight: 700;
  opacity: 0;
  animation: rise 1.2s var(--ease) 0.28s forwards;
}
.hero-brand span {
  font-weight: 400;
  font-style: italic;
  color: var(--ice);
}
.hero-line {
  margin: 1.35rem 0 0;
  max-width: 28rem;
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.55;
  color: var(--muted);
  opacity: 0;
  animation: rise 1.2s var(--ease) 0.42s forwards;
}
.hero-cta {
  margin-top: 2rem;
  opacity: 0;
  animation: rise 1.1s var(--ease) 0.55s forwards;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.35rem;
  background: var(--snow);
  color: var(--depth);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}
.cta:hover { transform: translateY(-2px); background: #fff; }
.hero-hint {
  position: absolute;
  right: clamp(1.25rem, 4vw, 4rem);
  bottom: clamp(2rem, 6vh, 4rem);
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(155, 176, 182, 0.7);
  opacity: 0;
  animation: rise 1s var(--ease) 0.9s forwards;
}

.stage-panel {
  position: fixed;
  z-index: 30;
  left: clamp(1rem, 3vw, 2.5rem);
  bottom: clamp(1.2rem, 3vh, 2rem);
  width: min(20rem, calc(100vw - 2rem));
  padding: 1rem 1rem 0.85rem;
  border: 1px solid var(--line);
  background: rgba(5, 14, 22, 0.72);
  backdrop-filter: blur(16px);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(18px);
  animation: rise 1s var(--ease) 0.7s forwards;
}
.stage-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.stages {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.stage {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 0.65rem;
  align-items: center;
  width: 100%;
  padding: 0.55rem 0.45rem;
  text-align: left;
  border-left: 2px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.stage:hover,
.stage.is-active {
  background: rgba(158, 216, 224, 0.06);
  border-left-color: var(--accent);
}
.stage-idx {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.stage-body {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}
.stage-body strong {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.stage-body em {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 400;
}

.stage-caption {
  position: fixed;
  z-index: 25;
  right: clamp(1rem, 3vw, 2.5rem);
  bottom: clamp(1.2rem, 3vh, 2rem);
  width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
  text-align: right;
  opacity: 0;
  transform: translateY(14px);
  animation: rise 1s var(--ease) 0.85s forwards;
}
.caption-date {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.stage-caption h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-weight: 500;
}
.stage-caption p:last-child {
  margin: 0.85rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}

.noscript {
  position: fixed;
  z-index: 100;
  inset: auto 0 0;
  padding: 1rem;
  background: #fff;
  color: #000;
  text-align: center;
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}

body.is-overhead .hero,
body.is-overhead .hero-hint {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
}
body.is-overhead .stage-caption {
  text-align: left;
  left: clamp(1rem, 3vw, 2.5rem);
  right: auto;
  bottom: auto;
  top: clamp(5.5rem, 10vh, 7rem);
}

@media (max-width: 820px) {
  .chrome {
    grid-template-columns: 1fr auto;
  }
  .chrome-meta { display: none; }
  .view-toggle { justify-self: end; }
  .hero {
    padding-bottom: clamp(16rem, 42vh, 22rem);
    max-width: none;
  }
  .hero-hint { display: none; }
  .stage-panel {
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    bottom: 0.75rem;
  }
  .stages {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.2rem;
  }
  .stage:last-child { grid-column: 1 / -1; }
  .stage-caption {
    display: none;
  }
  body.is-overhead .stage-caption {
    display: block;
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    top: 4.5rem;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .eyebrow, .hero-brand, .hero-line, .hero-cta, .hero-hint,
  .stage-panel, .stage-caption {
    opacity: 1;
    transform: none;
  }
}
