/* ============================================================
   EARLIAN SOLUTIONS — Coming Soon
   "Earlian" draws itself · "Solutions" arrives by stamp
   ============================================================ */

:root {
  /* Match the new ink-on-paper skyline so it rises from the page, rather
     than revealing a visible rectangular image boundary on wide screens. */
  --paper:      #FFFFFF;
  --paper-deep: #EDE7D8;
  --ink:        #1C1A16;
  --ink-soft:   #57524A;
  --accent:     #1E9BD8;   /* azure — from the Messages video sky */
  --coral:      #F0715A;   /* coral — the tee tint in the video */
  --rule:       #C9C1AE;
  --brand: "Rock Salt", "Sedgwick Ave Display", "Permanent Marker", cursive;
  --serif: "Sedgwick Ave Display", "Permanent Marker", "Comic Sans MS", cursive;
  --sans:  "Special Elite", "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 3D vault background (crisp, no blur) ---------- */
#vault {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.scroll-space { height: 320vh; }   /* longer physical travel lets four selected looks breathe before the globe handoff */

/* ---------- The window frames (look through them at the 3D) ---------- */
.window-pair {
  position: fixed;
  top: 47%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  gap: min(6vw, 56px);
  pointer-events: none;
}
.window-frame {
  position: relative;
  width: min(30vw, 250px, 38vh);   /* never taller than the viewport */
  aspect-ratio: 4 / 5;
  margin: 0;
  border: 10px solid var(--paper-deep);
  outline: 1px solid var(--rule);
  box-shadow: 0 24px 60px rgba(28, 26, 22, 0.12);
  opacity: 0;
  cursor: grab;
  will-change: transform, opacity;
  overflow: hidden;
}
.window-frame:active { cursor: grabbing; }
.window-poster {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: sepia(0.15) contrast(0.94);
  transition: opacity 700ms ease, filter 700ms ease;
}
.window-poster-note {
  position: absolute;
  top: 10px; left: 11px;
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: rgba(245, 241, 230, 0.78);
  padding: 4px 5px;
  transition: opacity 400ms ease;
}
body.models-ready .window-poster,
body.models-ready .window-poster-note {
  opacity: 0;
  pointer-events: none;
}
.window-caption {
  position: absolute;
  bottom: -32px; left: 0; right: 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Info card ---------- */
.info-card {
  position: fixed;
  left: 50%;
  top: calc(47% + min(18.75vw, 156px, 23.75vh) + 56px);
  z-index: 2;
  width: min(74vw, 280px);
  padding: 16px 20px;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  box-shadow: 0 10px 30px rgba(28, 26, 22, 0.10);
  text-align: left;
  opacity: 0;
  will-change: transform, opacity;
}
.info-card { margin-left: calc(min(74vw, 280px) / -2); left: 50%; }
.info-kicker {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.info-title {
  font-family: var(--serif);
  font-size: 17px;
  margin-bottom: 6px;
}
.info-body {
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

/* ---------- Lyric annotations (scroll-driven, stamped in the margins) ---------- */
.lyrics { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.lyric {
  position: absolute;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  opacity: 0;                       /* vault.js drives opacity + drift per scroll beat */
  white-space: nowrap;
  max-width: 44vw;
}
.lyric-1 { top: 11vh;  left: 5vw; }
.lyric-2 { top: 27vh;  right: 4vw; text-align: right; }
.lyric-3 { bottom: 24vh; left: 6vw; }
.lyric-4 { bottom: 11vh; right: 7vw; text-align: right; }

/* ---------- Wordmark glitch (chromatic split, like the video cuts) ---------- */
@keyframes glitch {
  0%, 91.9%, 94.1%, 100% { filter: none; transform: translate(0, 0); }
  92%   { filter: drop-shadow(3px 0 0 rgba(30,155,216,0.75)) drop-shadow(-3px 0 0 rgba(240,113,90,0.75)); transform: translate(-2px, 1px); }
  93%   { filter: drop-shadow(-4px 0 0 rgba(30,155,216,0.75)) drop-shadow(4px 0 0 rgba(240,113,90,0.75)); transform: translate(2px, -1px); }
  94%   { filter: drop-shadow(2px 0 0 rgba(30,155,216,0.6)) drop-shadow(-2px 0 0 rgba(240,113,90,0.6)); transform: translate(0, 0); }
}

::selection { background: var(--accent); color: var(--paper); }

/* ---------- Stage ---------- */
.stage {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  pointer-events: none;
  animation: stageSettle 1.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes stageSettle {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Kicker ---------- */
.kicker {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.15s forwards;
}

/* ---------- "Earlian" — drawn, then filled ---------- */
/* The wrapper carries the size and the scroll transform; the word and the mark
   sit inside it so the lockup flies as one piece. */
.wordmark {
  position: relative;
  width: min(78vw, 640px);
  margin: 0 auto;
  will-change: transform, opacity;
}
.word-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

/* Daybreak is split into two parts of the opening composition: a small cloud
   beside the wordmark and a skyline that grounds the page at its bottom edge. */
/* The mark rides on the wordmark's last letter rather than at a fixed viewport
   offset, so it stays on the N at every width. vault.js writes an inline
   transform to .daybreak-cloud on scroll — so every animation below lives on an
   inner group. A CSS animation on this element would fight that inline write. */
.daybreak-cloud {
  position: absolute;
  /* Tuned against the rendered glyph box of the final "n" (getExtentOfChar),
     not the text bbox — Rock Salt's em box is ~330u against a ~98u cap height,
     so the bbox sits nowhere near the visible letter. The cloud's underside
     lands on the cap line of the n. */
  top: -33%;
  right: -10%;
  z-index: 3;
  width: 30%;
  margin: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.daybreak-cloud svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Fine nib line. */
.db-line {
  fill: none;
  stroke: #25211C;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Translucent paper veil: the sun is behind the cloud, not under it. */
.db-veil { fill: rgba(245, 241, 230, 0.62); stroke: none; }

/* Hand-drawn rays, same nib as the cloud. */
/* Three opacities stack here — this one, the shimmer on .db-rays-in, and the
   scroll fade vault.js writes to .db-rays — and they multiply. Keep this high
   or the product lands near 0.3 and the rays vanish into the paper. */
.db-ray {
  fill: none;
  stroke: #B4632F;
  stroke-width: 2.6;
  stroke-linecap: round;
  opacity: 0.9;
}
.db-rays-in {
  transform-box: fill-box;
  transform-origin: center;
  animation: dbRayShimmer 7s ease-in-out infinite, dbRayTurn 120s linear infinite;
}
@keyframes dbRayShimmer { 0%, 100% { opacity: .82; } 50% { opacity: 1; } }
@keyframes dbRayTurn    { to { transform: rotate(360deg); } }
.db-sun {
  transform-box: fill-box;
  transform-origin: center;
  animation: dbBreathe 7s ease-in-out infinite;
}
.db-sun, .db-rays, .db-cloud, .db-moon { transition: opacity .75s ease, transform .75s ease; }
.db-moon { opacity: 0; transform: translateY(5px); }
.db-moon-disc { fill: #25211C; }
.db-moon-cut { fill: #F2EAD8; }
.db-star { fill: #B4632F; }
.daybreak-cloud[data-weather="moon"] .db-sun, .daybreak-cloud[data-weather="moon"] .db-rays, .daybreak-cloud[data-weather="moon"] .db-cloud { opacity: 0 !important; transform: translateY(-7px); }
.daybreak-cloud[data-weather="moon"] .db-moon { opacity: 1; transform: none; }
.daybreak-cloud[data-weather="moon"] .db-moon-disc {
  filter: drop-shadow(0 0 10px rgba(225, 239, 255, .82));
}
.daybreak-cloud[data-weather="moon"] .db-sun,
.daybreak-cloud[data-weather="moon"] .db-cloud { animation: none; }
/* The cloud slides across the sun and back. 14s — same clock as the daylight. */
.db-cloud { animation: dbDrift 14s ease-in-out infinite; }

@keyframes dbBreathe { 0%, 100% { transform: scale(1);    opacity: .88; }
                       50%      { transform: scale(1.07); opacity: 1; } }
@keyframes dbDrift   { 0%, 100% { transform: translate(-9px, 2px); }
                       50%      { transform: translate(11px, -4px); } }

/* ---------- The sun actually lighting the page ----------
   Outer div is JS-controlled (scroll fade), inner div carries the pulse.
   Split because a CSS animation outranks an inline style — writing opacity
   straight onto an animating element does nothing. */
.daylight {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.daylight::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: conic-gradient(from 78deg at 65% 29%,
              transparent 0deg,
              rgba(170, 205, 255, .19) 8deg,
              transparent 18deg,
              rgba(149, 190, 255, .10) 28deg,
              transparent 42deg);
  filter: blur(6px);
  transition: opacity 1.2s ease;
}
.daylight-pulse {
  position: absolute;
  inset: 0;
  /* A wash, not a blob — wide and weak, so it reads as light on paper
     rather than a pink cloud sitting on the page. */
  /* Warm sienna to match the sun's own wash, not the coral accent. Centred on
     where the sun actually sits — measured at ~72%/30% on a wide viewport,
     pulled back toward centre because the lockup is width-capped and so drifts
     leftward in percentage terms as the viewport grows. */
  background: radial-gradient(62vw 52vw at 70% 30%,
              rgba(217, 138, 85, 0.14),
              rgba(217, 138, 85, 0.05) 42%,
              rgba(217, 138, 85, 0) 70%);
  animation: dbDaylight 14s ease-in-out infinite;
}
body[data-weather="moon"] .daylight-pulse {
  background: radial-gradient(58vw 48vw at 65% 29%,
              rgba(230, 242, 255, .38),
              rgba(162, 201, 255, .16) 38%,
              rgba(140, 188, 255, 0) 72%);
  animation-duration: 9s;
}
body[data-weather="moon"] .daylight::after { opacity: 1; }
/* Brightest at 50%, exactly when the cloud has cleared the sun. */
@keyframes dbDaylight { 0%, 100% { opacity: 0.22; } 50% { opacity: 0.85; } }

@media (prefers-reduced-motion: reduce) {
  .db-sun, .db-rays, .db-cloud, .daylight-pulse { animation: none; }
  .db-cloud { transform: translate(-8px, 0); }
  .daylight-pulse { opacity: 0.6; }
}
.daybreak-skyline {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: min(38vh, 310px);
  margin: 0;
  overflow: hidden;
  pointer-events: none;
  will-change: opacity, transform;
  /* Fade the container itself. The artwork is deliberately shifted upward,
     so masking the image would travel with it and leave a hard page edge. */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, .42) 13%, #000 30%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, .42) 13%, #000 30%);
}
.daybreak-skyline img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
  filter: saturate(0.10) brightness(1.11) contrast(1.22);
  /* The illustration contains its own generous sky. Crop that sky away here
     so the city sits at the page edge and never collides with the mark. */
  transform: translateY(-38%);
}

.draw-text {
  font-family: var(--brand);
  font-weight: 400;
  font-size: 140px;
  fill: var(--ink);
  fill-opacity: 0;
  stroke: var(--ink);
  stroke-width: 1.1;
  stroke-dasharray: 2200;           /* Rock Salt's ragged outlines are longer */
  stroke-dashoffset: 2200;
  animation:
    draw 1.35s cubic-bezier(0.5, 0, 0.2, 1) 0.2s forwards,
    fillIn 0.7s ease 1.15s forwards,
    glitch 9s steps(1) 5s infinite;
}
@keyframes draw {
  to { stroke-dashoffset: 0; }
}
@keyframes fillIn {
  to { fill-opacity: 1; }
}

/* ---------- Rule ---------- */
.mid-rule {
  height: 1px;
  background: var(--rule);
  width: 0;
  margin: 10px auto 26px;
  animation: ruleGrow 0.7s cubic-bezier(0.22, 1, 0.36, 1) 1.45s forwards;
}
@keyframes ruleGrow {
  to { width: min(52vw, 340px); }
}

/* ---------- "Solutions" — stamped letter by letter ---------- */
.solutions {
  font-family: var(--serif);
  font-size: clamp(17px, 2.8vw, 24px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-right: -0.28em; /* optically recenter letterspaced text */
}
.solutions span {
  display: inline-block;
  opacity: 0;
  transform: scale(1.6);
  filter: blur(2px);
  animation: stamp 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
  animation-delay: calc(1.8s + var(--i) * 0.07s);
}
@keyframes stamp {
  60% { opacity: 1; transform: scale(0.94); filter: blur(0); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

/* ---------- Tagline ---------- */
.tagline {
  font-family: var(--serif);
  font-size: clamp(15px, 2vw, 19px);
  color: var(--ink-soft);
  margin-top: 34px;
  transform: rotate(-1.2deg);
  opacity: 0;
  animation: fadeUp 0.9s ease 2.45s forwards;
}

/* ---------- Scroll hint ---------- */
.scroll-hint {
  position: absolute;
  left: 50%;
  /* Lands in the clear band between the tagline and where the buildings
     actually begin. Not the skyline element's top edge — its mask keeps the
     upper half transparent, so the ink starts about midway down it. */
  bottom: clamp(120px, 16vh, 168px);
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  animation: fadeUp 0.8s ease 2.9s forwards;
}
.scroll-hint span {
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.scroll-hint i {
  display: block;
  width: 1px;
  height: 26px;
  margin: 8px auto 0;
  background: var(--ink-soft);
  animation: hintDrop 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  transform-origin: top;
}
@keyframes hintDrop {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- Footer ---------- */
/* The skyline runs the full width behind this, so the copy was landing on top
   of the buildings. A soft paper scrim gives the text a floor to sit on
   without cropping the art or pushing the skyline down. */
.soon-footer::before {
  content: "";
  position: absolute;
  inset: -54px 0 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to top,
              var(--paper) 26%,
              rgba(245, 241, 230, 0.88) 58%,
              rgba(245, 241, 230, 0) 100%);
}
.soon-footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 22px 28px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0;
  animation: fadeUp 0.9s ease 3s forwards;
}
.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  margin-left: 24px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.footer-links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Shared motion ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Docu stage: last stretch of the scroll, paper dims to ink
   and the docu globe takes over. Scroll back up to return to the paper. ---------- */
.docu-stage {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;                 /* vault.js ramps this as scrollSmooth → 1 */
  /* The sun in the mark is the light source. The warm layer is centred on
     where it actually sits — just right of the brand at the top — so the
     stage is lit from the logo rather than from a neutral centre glow. */
  background:
    radial-gradient(ellipse 62% 44% at 53% 3%, rgba(217, 138, 85, 0.20), rgba(217, 138, 85, 0) 62%),
    radial-gradient(ellipse at center, rgba(8, 7, 5, 0.55) 0%, #0a0a0a 78%);
  will-change: opacity;
  overflow: hidden;
  isolation: isolate;
}
/* Keep the stage light physically tied to the weather mark: moonlight turns
   the cone and pool into a cool silver source instead of an amber sunbeam. */
.docu-stage:has(.stage-mark[data-weather="moon"]) {
  background:
    radial-gradient(ellipse 62% 44% at 53% 3%, rgba(180, 211, 255, 0.20), rgba(180, 211, 255, 0) 62%),
    radial-gradient(ellipse at center, rgba(8, 7, 5, 0.55) 0%, #0a0a0a 78%);
}
.stage-sunlight {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
.stage-sunbeam {
  position: absolute;
  top: var(--sun-y, calc(7vh + env(safe-area-inset-top)));
  left: var(--sun-x, 50%);
  width: min(76vw, 980px);
  height: 60vh;
  transform: translateX(-50%);
  clip-path: polygon(48% 0, 52% 0, 82% 100%, 18% 100%);
  background: linear-gradient(to bottom,
              rgba(226, 166, 112, 0.14),
              rgba(205, 137, 82, 0.07) 42%,
              rgba(191, 119, 66, 0.018) 84%,
              transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 66%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 66%, transparent 100%);
  filter: blur(34px);
  animation: stageLightBreathe 8s ease-in-out infinite;
}
.stage-lightpool {
  position: absolute;
  left: 50%;
  top: 61%;
  width: min(62vw, 620px);
  aspect-ratio: 1.55;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center,
              rgba(230, 169, 112, 0.14),
              rgba(198, 126, 72, 0.055) 42%,
              transparent 72%);
  filter: blur(16px);
  animation: stageLightBreathe 8s ease-in-out infinite reverse;
}
@keyframes stageLightBreathe {
  0%, 100% { opacity: .68; }
  50% { opacity: 1; }
}
.docu-stage .stage-head {
  position: absolute;
  top: 30%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.stage-brand {
  position: absolute;
  top: calc(5vh + env(safe-area-inset-top));
  left: 50%;
  z-index: 3;
  margin: 0;
  color: var(--cream);
  font-family: var(--brand);
  font-size: clamp(36px, 5.4vw, 70px);
  line-height: 1;
  transform: translateX(-50%) rotate(-1deg);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.4);
}
/* The mark, carried onto the dark stage. .stage-brand is already absolutely
   positioned, so it's the containing block — the mark rides its last letter
   the same way it rides the n on the paper. */
.stage-mark {
  position: absolute;
  top: -70%;
  right: -40%;
  width: 56%;
  height: auto;
  overflow: visible;
  pointer-events: none;
}
.stage-line {
  fill: none;
  stroke: var(--cream);
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.88;
}
/* Translucent rather than solid white: the cloud reads as a filled body but
   the sun still glows through it, the same way it does on the paper. */
.stage-body { fill: rgba(242, 234, 216, 0.42); stroke: none; }
.stage-rays {
  fill: none;
  stroke: #E0A06E;
  stroke-width: 3;
  stroke-linecap: round;
  opacity: .88;
  transform-box: fill-box;
  transform-origin: center;
  animation: stageRayGlow 8s ease-in-out infinite;
}
@keyframes stageRayGlow { 0%,100% { opacity:.66; } 50% { opacity:1; } }
.stage-sun {
  transform-box: fill-box;
  transform-origin: center;
  animation: dbBreathe 7s ease-in-out infinite;
}
.docu-stage:has(.stage-mark[data-weather="moon"]) .stage-sunbeam {
  background: linear-gradient(to bottom,
              rgba(206, 226, 255, 0.18),
              rgba(156, 194, 255, 0.075) 42%,
              rgba(132, 178, 255, 0.02) 84%,
              transparent 100%);
}
.docu-stage:has(.stage-mark[data-weather="moon"]) .stage-lightpool {
  background: radial-gradient(ellipse at center,
              rgba(205, 226, 255, 0.16),
              rgba(144, 184, 255, 0.06) 42%,
              transparent 72%);
}
.stage-sunshine, .stage-moon { transition: opacity .75s ease, transform .75s ease; }
.stage-moon { opacity: 0; transform: translateY(5px); }
.stage-moon-disc { fill: var(--cream); }
.stage-moon-cut { fill: #15120f; }
.stage-star { fill: #E0A06E; }
.stage-mark[data-weather="moon"] .stage-sunshine { opacity: 0; transform: translateY(-7px); }
.stage-mark[data-weather="moon"] .stage-moon { opacity: 1; transform: none; }
.stage-cloud { animation: sgDrift 16s ease-in-out infinite; }
@keyframes sgDrift { 0%, 100% { transform: translate(-6px, 1px); }
                     50%      { transform: translate(7px, -3px); } }

@media (prefers-reduced-motion: reduce) {
  .stage-sun, .stage-cloud, .stage-rays, .stage-sunbeam, .stage-lightpool { animation: none; }
}

.stage-kicker {
  font-family: var(--sans);
  color: var(--cream);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 11px;
  opacity: 0.65;
}

.stage-entry {
  position: absolute;
  top: 54%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(78vw, 520px);
  color: var(--cream);
  text-decoration: none;
  text-align: center;
}
.stage-entry-overline,
.stage-entry-route {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.62;
}
.stage-entry strong {
  position: relative;
  font-family: var(--brand);
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 400;
  letter-spacing: 0.02em;
  transform: rotate(-1.5deg);
  transition: color .25s ease, transform .25s ease;
}
.stage-entry strong::after {
  content: "";
  position: absolute;
  inset: -12px -28px;
  border: 3px solid var(--red);
  border-radius: 50%;
  transform: rotate(-3deg) scaleX(1.08);
  opacity: .84;
}
.stage-entry:hover strong,
.stage-entry:focus-visible strong { color: var(--red); transform: rotate(-1.5deg) scale(1.04); }
.stage-entry:focus-visible { outline: 1px dashed var(--cream); outline-offset: 20px; }

/* no-JS fallback: the stage itself stays invisible without vault.js, so the
   archive text lives in normal flow at the end of the scroll instead */
.no-js-stage {
  position: relative;
  z-index: 5;
  margin: 0;
  padding: 40px 24px 80px;
  text-align: center;
  background: var(--ink);
}
.no-js-kicker,
.no-js-sub {
  font-family: var(--sans);
  color: var(--cream);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 11px;
  opacity: 0.65;
  margin: 0;
}
.no-js-sub { opacity: 0.45; margin-top: 10px; }

/* ---------- Vignette ---------- */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(28, 26, 22, 0.08) 100%);
}

/* ---------- Sauce: live film grain + breathing light leak (subliminal) ---------- */
.grain {
  position: fixed;
  inset: -160px;                    /* oversized so the jitter never shows an edge */
  z-index: 60;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  animation: grain-jitter 0.9s steps(3) infinite;
}
@keyframes grain-jitter {
  0%   { transform: translate(0, 0); }
  33%  { transform: translate(-42px, 26px); }
  66%  { transform: translate(30px, -38px); }
  100% { transform: translate(0, 0); }
}

.lightleak {
  position: fixed;
  inset: -20%;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 18% 8%, rgba(255, 236, 200, 0.07), transparent 70%),
    radial-gradient(ellipse 55% 40% at 85% 92%, rgba(212, 184, 150, 0.05), transparent 70%);
  animation: leak-breathe 26s ease-in-out infinite alternate;
}
@keyframes leak-breathe {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 1.5%, 0) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .grain, .lightleak { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .draw-text { font-size: 170px; }   /* Rock Salt runs wide — keep it inside the viewBox */
  /* The wrapper owns the width now; the svg just fills it. Sizing .word-svg
     here instead would overflow the box the cloud is positioned against. */
  .wordmark { width: 92vw; }
  /* Keep the complete ray circle inside narrow viewports while preserving
     the overlap with the final n. The desktop overhang is too wide on phones. */
  .daybreak-cloud { right: -5%; }
  /* The wide artwork stays whole on desktop; on a narrow screen, enlarge its
     centered Chicago core so the skyline still reads as an intentional scene. */
  .daybreak-skyline { bottom: 54px; height: min(38vh, 330px); }
  .daybreak-skyline img {
    width: 170%;
    max-width: none;
    margin-left: -35%;
    transform: translateY(-22%);
    filter: saturate(0.12) brightness(1.04) contrast(1.34);
  }
  .scroll-space { height: 360vh; }   /* calm thumb-scroll pacing for the selected looks */
  .lyric { font-size: 11px; letter-spacing: 0.1em; max-width: 62vw; white-space: normal; }
  /* one window, big enough to actually see the look */
  .frame-b { display: none; }
  .window-frame { width: min(64vw, 300px, 50vh); }
  .info-card {
    top: calc(47% + min(40vw, 188px, 31.25vh) + 44px);   /* just under the taller window */
    width: min(78vw, 300px);
  }
  .soon-footer {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-bottom: 26px;
  }
  .footer-links a { margin: 0 12px; }
  /* the dark-stage archive entrance clears the notch and stays thumb-sized */
  .docu-stage .stage-head { top: 35%; }
  .stage-entry { top: 57%; width: 88vw; }
  .stage-entry strong { font-size: clamp(30px, 10vw, 44px); }
  .stage-brand {
    top: calc(3vh + env(safe-area-inset-top));
    font-size: clamp(30px, 8vw, 42px);
  }
  .stage-mark { top: -70%; right: -37%; width: 53%; }
  .stage-sunbeam { clip-path: polygon(47% 0, 53% 0, 91% 100%, 9% 100%); }
  .stage-sunbeam { width: 118vw; height: 64vh; }
  .stage-lightpool { top: 60%; width: 94vw; }
}

/* tablets: windows a touch larger than desktop-relative */
@media (min-width: 601px) and (max-width: 1024px) {
  .window-frame { width: min(34vw, 280px, 40vh); }
}

/* ultrawide / big desktop: let the windows breathe */
@media (min-width: 1600px) {
  .window-frame { width: min(22vw, 340px, 42vh); }
  .window-pair { gap: min(5vw, 88px); }
}

/* notched phones: keep UI off the hardware edges */
.soon-footer { padding-bottom: calc(30px + env(safe-area-inset-bottom)); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01s !important;
    animation-delay: 0s !important;
  }
}
