@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/inter-var-latin.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;
}

:root {
  --space-0: #07071a;
  --space-1: #3a1a6b;
  --accent: #8a9dff;
  --accent-2: #a06dff;
  --fg: #f5f5f7;
  --muted: #8a8a99;
  --card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.10);

  --mood-t: 0.5;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--space-0);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.journey {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 12vh 24px;
}

.moment {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 22px;
  margin-bottom: 8vh;
}

.moment-image {
  width: min(560px, 88vw);
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.moment-image img,
img.moment-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder stands in for a photograph that does not exist yet.
   Remove .placeholder and swap in an <img> when the real photo arrives. */
.moment-image.placeholder {
  background: linear-gradient(135deg,
    color-mix(in oklab, var(--accent) 55%, #000),
    color-mix(in oklab, var(--accent-2) 55%, #000));
  position: relative;
}

.moment-image.placeholder::after {
  content: 'photo ' attr(data-placeholder);
  position: absolute;
  inset: auto 12px 10px auto;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.moment-caption {
  width: min(560px, 88vw);
  text-align: left;
}

.moment-caption time {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.moment-caption h2 {
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 10px;
}

.moment-caption p {
  font-size: clamp(0.98rem, 2.4vw, 1.08rem);
  line-height: 1.6;
  color: rgba(245, 245, 247, 0.78);
  max-width: 52ch;
}

/* Once the constellation is actually running, journey.js adds this to
   <body>. It clips the accessible document out of sight — not display:none,
   which would also remove it from the accessibility tree — so a
   screen-reader user still gets the full photo essay while a sighted user
   sees only the 3D scene. Never applied when JS/WebGL is unavailable or
   reduced motion is on: in those cases the plain document is the page. */
body.is-immersive .journey,
body.is-immersive .arrival {
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  min-height: 0;
  overflow: hidden;
}

/* Arrival — the teaser, now the destination. */
.arrival {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  position: relative;
}

.wordmark {
  font-size: clamp(2.6rem, 9vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  background: linear-gradient(120deg, #ffffff 0%, var(--accent) 55%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 18px;
}

.tagline { font-size: clamp(1.1rem, 3.4vw, 1.5rem); font-weight: 500; margin-bottom: 10px; }
.subline { font-size: clamp(0.92rem, 2.6vw, 1.05rem); color: var(--muted); margin-bottom: 40px; line-height: 1.55; max-width: 40ch; }

.badges { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.store {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 12px 20px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  color: var(--fg);
  opacity: 0.85;
}

.store svg { width: 26px; height: 26px; flex-shrink: 0; }
.store .label { text-align: left; line-height: 1.15; }
.store .label .small { display: block; font-size: 0.62rem; color: var(--muted); letter-spacing: 0.04em; }
.store .label .big { display: block; font-size: 0.98rem; font-weight: 600; }

.footer {
  position: absolute;
  bottom: 22px; left: 0; right: 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Still, not degraded. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.journey {
  perspective: 1100px;
  perspective-origin: 50% 45%;
}

.moment {
  transform-style: preserve-3d;
  will-change: transform, opacity, filter;
  scroll-snap-align: center;
}

/* scroll-snap-type belongs on the scrolling element. The page scrolls the
   document, not .journey, so putting it on .journey would silently do nothing. */
html {
  scroll-snap-type: y proximity;
}

/* Depth is decoration. Strip it when motion is unwelcome. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-snap-type: none; }
  .journey { perspective: none; }
  .moment { transform: none !important; opacity: 1 !important; filter: none !important; will-change: auto; }
}

body {
  background: var(--space-0);
}

/* The field: fades in on load, exactly as the reference does. Its far stop
   interpolates on --mood-t — altitude-driven mood, rebuilt in the new
   palette. Lows read cold, dark and closed; peaks read warm, bright and open. */
body::before {
  content: '';
  display: block;
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image: linear-gradient(
    to right,
    var(--space-0),
    color-mix(in oklab, var(--space-1) calc((1 - var(--mood-t)) * 100%), var(--accent-2))
  );
  background-attachment: fixed;
  opacity: 0;
  will-change: opacity;
}

body.has-field::before {
  transition: opacity 1s ease-out;
  will-change: auto;
  opacity: 1;
}

/* Vignette: tightens at lows, opens at peaks. */
body::after {
  content: '';
  display: block;
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(
    100vmax 100vmax at 50% 50%,
    transparent calc(20% + var(--mood-t) * 20%),
    rgba(0, 0, 0, calc(0.75 - var(--mood-t) * 0.40)) 100%
  );
}

::-webkit-scrollbar { width: 10px; background: var(--space-1); }
::-webkit-scrollbar-thumb { background-color: var(--space-0); }

@media (prefers-reduced-motion: reduce) {
  body::before { transition: none; opacity: 1; }
}
