/* CherAmi marketing site.
   The story is a night flight (sky sections) carrying letters (paper sections). All 3D is CSS transforms on
   flat planes; fonts are self-hosted and there are no inline styles, so the CSP stays strict. Every
   animation stops under prefers-reduced-motion. */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('/fonts/bricolage-latin-ext-v9.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('/fonts/bricolage-latin-v9.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 {
  --ink: #070b18;
  --ink-2: #0c1226;
  --ink-3: #141c38;
  --text: #ecf1ff;
  --muted: #aab5d0;
  --muted-2: #8f9ab8;

  --paper: #f5f0e6;
  --paper-2: #ede6d6;
  --paper-card: #fffdf8;
  --paper-fold: #e0d8c6;
  --paper-line: rgba(20, 27, 45, 0.1);
  --ink-text: #141b2d;
  --ink-muted: #4f566a;

  --teal: #2dd4bf;
  --teal-2: #5eead4;
  --teal-ink: #0a6f64;
  --violet: #7c6cf0;
  --violet-2: #a99dff;
  --violet-ink: #5243c9;
  --amber: #f5c77e;

  --display: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  --container: 1200px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .26 0 0 0 0 .18 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  overflow-x: clip;
  background: var(--ink);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
p {
  margin: 0;
  text-wrap: pretty;
}
a {
  color: inherit;
}
::selection {
  background: rgba(94, 234, 212, 0.35);
}
:focus-visible {
  outline: 2.5px solid var(--teal-2);
  outline-offset: 3px;
  border-radius: 0.4rem;
}
.paper :focus-visible {
  outline-color: var(--violet-ink);
}
[id] {
  scroll-margin-top: 6rem;
}
/* 3D reveals and scenes may poke past the viewport edge for a frame; never let that become sideways scroll. */
main {
  overflow-x: clip;
}
.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}
.narrow {
  width: min(100% - 2rem, 52rem);
}
.icon {
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
}
.icon--sm {
  width: 1.1rem;
  height: 1.1rem;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: var(--teal);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus {
  top: 1rem;
}

/* ---------- Type ---------- */
.display {
  font-size: clamp(2.75rem, 1.7rem + 4.4vw, 5.6rem);
  font-weight: 750;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.display--md {
  font-size: clamp(2.3rem, 1.5rem + 3.2vw, 4.2rem);
}
.h2 {
  font-size: clamp(2rem, 1.35rem + 2.3vw, 3.3rem);
  letter-spacing: -0.03em;
}
.h3 {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  letter-spacing: -0.025em;
}
.grad-text {
  background: linear-gradient(100deg, #5eead4 0%, #a99dff 62%, #c9bfff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font: 700 0.8rem/1 var(--sans);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal-2);
}
.kicker::before {
  content: '';
  width: 1.7rem;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.paper .kicker {
  color: var(--teal-ink);
}
.kicker--amber {
  color: var(--amber);
}
.section-head {
  max-width: 48rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head .h2 {
  margin-top: 1rem;
}
.section-lead {
  margin-top: 1.15rem;
  max-width: 42rem;
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  color: var(--muted);
}
.paper .section-lead {
  color: var(--ink-muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 700 1rem/1.1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out),
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s;
}
.btn--primary {
  color: #061016;
  background: linear-gradient(120deg, #5eead4 0%, #a99dff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 4px 0 #2a5f86,
    0 14px 30px -10px rgba(94, 234, 212, 0.55);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 6px 0 #2a5f86,
    0 22px 40px -12px rgba(124, 108, 240, 0.65);
}
.btn--primary:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 1px 0 #2a5f86,
    0 8px 20px -10px rgba(124, 108, 240, 0.6);
}
.btn--ghost {
  color: #e8eeff;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.04);
}
.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.1);
}
.btn--ink {
  color: #fff;
  background: var(--ink-text);
  box-shadow: 0 4px 0 #000;
}
.btn--ink:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #000;
}
.btn--small {
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  font-size: 0.92rem;
}
.btn--lg {
  min-height: 58px;
  padding: 1rem 1.9rem;
  font-size: 1.08rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.1rem;
}
.actions--center {
  justify-content: center;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0.75rem 0 auto;
  z-index: 50;
}
.header__bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 62px;
  padding: 0.45rem 0.5rem 0.45rem 1rem;
  border: 1px solid rgba(169, 157, 255, 0.18);
  border-radius: 999px;
  background: rgba(9, 14, 32, 0.74);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font: 750 1.18rem/1 var(--display);
  letter-spacing: -0.015em;
  text-decoration: none;
}
.nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
}
.nav__links {
  display: flex;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav__links a,
.lang {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.85rem;
  border-radius: 999px;
  color: #c9d3ee;
  font-size: 0.95rem;
  font-weight: 550;
  text-decoration: none;
  transition:
    color 0.2s,
    background-color 0.2s;
}
.lang {
  justify-content: center;
  min-width: 44px;
  font-weight: 750;
  letter-spacing: 0.06em;
}
.nav__links a:hover,
.lang:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.nav__cta {
  margin-left: 0.3rem;
}
.menu {
  display: none;
  position: relative;
}
.menu summary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}
.menu summary::-webkit-details-marker {
  display: none;
}
.menu summary::after {
  content: '';
  width: 0.95rem;
  height: 0.65rem;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
}
.menu ul {
  position: absolute;
  top: calc(100% + 0.7rem);
  right: 0;
  min-width: 15.5rem;
  margin: 0;
  padding: 0.5rem;
  list-style: none;
  border: 1px solid rgba(169, 157, 255, 0.22);
  border-radius: 1.1rem;
  background: rgba(10, 15, 34, 0.97);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.menu a {
  display: block;
  padding: 0.8rem 0.95rem;
  border-radius: 0.75rem;
  color: #dfe6fb;
  text-decoration: none;
}
.menu a:hover {
  background: rgba(255, 255, 255, 0.08);
}
.menu .menu__cta {
  margin-top: 0.35rem;
  text-align: center;
  font-weight: 750;
  color: #061016;
  background: linear-gradient(120deg, #5eead4, #a99dff);
}

/* ---------- Night sky (shared) ---------- */
.sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.sky__stars {
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 23px 37px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 97px 141px, #dffaf5 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 161px 63px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 211px 189px, #e9e4ff 50%, transparent 51%),
    radial-gradient(1px 1px at 61px 223px, #fff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 143px 251px, #fff 50%, transparent 51%);
  background-size: 260px 280px;
}
.sky__stars--2 {
  opacity: 0.8;
  background-size: 410px 390px;
  background-position: 120px 60px;
  -webkit-mask-image: linear-gradient(to bottom, #000 25%, transparent 85%);
  mask-image: linear-gradient(to bottom, #000 25%, transparent 85%);
  animation: twinkle 5s ease-in-out infinite alternate;
}
.sky__aurora i {
  position: absolute;
  display: block;
  border-radius: 50%;
}
.sky__aurora i:nth-child(1) {
  top: -28vw;
  left: 38%;
  width: 62vw;
  height: 62vw;
  background: radial-gradient(closest-side, rgba(124, 108, 240, 0.42), transparent);
  animation: drift-a 22s ease-in-out infinite alternate;
}
.sky__aurora i:nth-child(2) {
  top: 12%;
  left: -18%;
  width: 52vw;
  height: 52vw;
  background: radial-gradient(closest-side, rgba(45, 212, 191, 0.24), transparent);
  animation: drift-b 26s ease-in-out infinite alternate;
}
.sky__aurora i:nth-child(3) {
  right: -12%;
  bottom: -18%;
  width: 42vw;
  height: 42vw;
  background: radial-gradient(closest-side, rgba(56, 99, 235, 0.3), transparent);
  animation: drift-a 30s ease-in-out infinite alternate-reverse;
}
.sky__floor {
  position: absolute;
  right: -30%;
  bottom: 0;
  left: -30%;
  height: 44%;
  overflow: hidden;
  perspective: 520px;
  perspective-origin: 50% 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 50%, #000 72%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 50%, #000 72%, transparent);
}
.sky__grid {
  position: absolute;
  inset: -100% 0 0;
  transform: rotateX(74deg);
  transform-origin: 50% 100%;
  background-image:
    linear-gradient(rgba(94, 234, 212, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 234, 212, 0.15) 1px, transparent 1px);
  background-size: 64px 64px;
  animation: grid-run 3.6s linear infinite;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: clamp(7rem, 13vh, 9.5rem) 0 2.5rem;
  background:
    radial-gradient(ellipse 80% 60% at 72% 28%, #1b1f50 0%, transparent 62%),
    linear-gradient(180deg, #050816 0%, #0a0f26 62%, #0c1430 100%);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 3rem);
  align-items: center;
}
.hero__copy {
  position: relative;
  z-index: 2;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.95rem 0.45rem 0.75rem;
  border: 1px solid rgba(94, 234, 212, 0.26);
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.08);
  color: #c4f6ec;
  font-size: 0.88rem;
  font-weight: 600;
}
.eyebrow__dot {
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--teal);
  animation: ping 2.4s var(--ease-out) infinite;
}
.hero h1 {
  margin-top: 1.4rem;
}
.lead {
  max-width: 38rem;
  margin-top: 1.5rem;
  color: #c3cde6;
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.25rem);
}
.hero__note {
  margin-top: 1.3rem;
  color: var(--muted-2);
  font-size: 0.9rem;
}

/* 3D stage: one perspective camera; layers sit at different depths. */
.stage {
  position: relative;
  height: 44em;
  font-size: clamp(6.5px, 0.95vw, 13px);
  perspective: 120em;
  perspective-origin: 50% 38%;
}
.scene,
.board-scene,
.story__scene {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--py, 0) * -8deg)) rotateY(calc(var(--px, 0) * 12deg));
  transition: transform 1.4s var(--ease-out);
}
.orb {
  position: absolute;
  top: 2%;
  left: 50%;
  width: 30em;
  height: 30em;
  margin-left: -11em;
  border-radius: 50%;
  transform: translateZ(-24em);
  background: radial-gradient(
    circle at 34% 30%,
    #dcfff8 0%,
    #74e6d7 13%,
    #4aa3e6 38%,
    #5b5ce6 62%,
    #3b2b9c 82%,
    #1d1650 100%
  );
  box-shadow:
    0 0 5em 1em rgba(124, 108, 240, 0.35),
    0 0 15em 3em rgba(45, 212, 191, 0.12),
    inset -3em -3.5em 6em rgba(8, 6, 40, 0.6);
}
.orb::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 62% 58%, rgba(255, 255, 255, 0.12) 0 2.2em, transparent 2.4em),
    radial-gradient(circle at 40% 72%, rgba(10, 8, 50, 0.16) 0 1.5em, transparent 1.7em),
    radial-gradient(circle at 72% 30%, rgba(10, 8, 50, 0.12) 0 1em, transparent 1.2em),
    radial-gradient(circle at 26% 48%, rgba(255, 255, 255, 0.1) 0 0.8em, transparent 1em);
}
.orb::after {
  content: '';
  position: absolute;
  inset: -2.6em;
  border: 1px solid rgba(169, 157, 255, 0.24);
  border-radius: 50%;
}
.cloud {
  position: absolute;
  width: 26em;
  height: 8em;
  background:
    radial-gradient(closest-side at 30% 60%, rgba(214, 228, 255, 0.2), transparent),
    radial-gradient(closest-side at 55% 42%, rgba(214, 228, 255, 0.26), transparent),
    radial-gradient(closest-side at 78% 62%, rgba(214, 228, 255, 0.18), transparent);
  animation: drift 20s ease-in-out infinite alternate;
}
.cloud--far {
  top: 14%;
  left: -6%;
  opacity: 0.7;
  transform: translateZ(-28em) scale(1.4);
}
.cloud--mid {
  top: 70%;
  left: 44%;
  transform: translateZ(-4em);
  animation-duration: 24s;
}
.cloud--near {
  top: 78%;
  left: -4%;
  width: 36em;
  opacity: 0.9;
  transform: translateZ(14em);
  animation-duration: 16s;
}
.flock {
  position: absolute;
  top: 9%;
  left: 8%;
  width: 10em;
  height: 5em;
  color: #cfe7f5;
  opacity: 0.75;
  transform: translateZ(-34em);
  animation: flock-drift 14s ease-in-out infinite alternate;
}
.flock__bird {
  position: absolute;
  width: 3em;
}
.flock__bird:nth-child(1) {
  top: 1.6em;
  left: 0;
  width: 2.6em;
}
.flock__bird:nth-child(2) {
  top: 0;
  left: 3.2em;
}
.flock__bird:nth-child(3) {
  top: 2.1em;
  left: 6.8em;
  width: 2.3em;
}
.glyph-wing {
  transform-box: fill-box;
  transform-origin: 40% 100%;
  animation: glyph-flap 0.42s ease-in-out infinite alternate;
}
.flock__bird:nth-child(2) .glyph-wing {
  animation-delay: -0.15s;
}
.flock__bird:nth-child(3) .glyph-wing {
  animation-delay: -0.3s;
}

/* The bird layer: .flight places and glides it; the canvas inside is drawn by bird.js. */
.flight {
  position: absolute;
  top: 10%;
  left: 4%;
  width: 92%;
  height: 76%;
  transform-style: preserve-3d;
  transform: translateZ(6em);
  animation: glide 10s ease-in-out infinite;
}
.trail {
  position: absolute;
  top: 66%;
  left: -16%;
  width: 46%;
  height: 34%;
  overflow: visible;
}
.bird {
  position: relative;
  width: 100%;
  height: 100%;
}
.bird__poster,
.bird__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.bird__poster {
  object-fit: contain;
  transition: opacity 0.6s var(--ease-out);
}
.bird__canvas {
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}
.bird__canvas.is-live {
  opacity: 1;
}
.bird__canvas.is-live ~ .bird__poster,
.bird:has(.bird__canvas.is-live) .bird__poster {
  opacity: 0;
}
.trail path {
  fill: none;
  stroke: url(#trail-g);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 1 11;
  vector-effect: non-scaling-stroke;
  animation: dash-run 1.6s linear infinite;
}
/* ---------- Works-with marquee ---------- */
.works {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: clamp(1.5rem, 4vw, 3rem);
}
.works__title {
  flex: none;
  color: var(--muted-2);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.marquee {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee:hover .marquee__track {
  animation-play-state: paused;
}
.marquee ul {
  display: flex;
  gap: 0.8rem;
  margin: 0;
  padding: 0 0.8rem 0 0;
  list-style: none;
}
.marquee li {
  padding: 0.55rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #d5ddf3;
  font-size: 0.92rem;
  white-space: nowrap;
}

/* ---------- Route: an isometric map of the flight ---------- */
.route {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: clamp(4.5rem, 8vw, 7rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  background: linear-gradient(180deg, #0c1430 0%, #0b1026 100%);
}
.route .section-head {
  margin-inline: auto;
  margin-bottom: 0;
  text-align: center;
}
.route .section-lead {
  margin-inline: auto;
}
/* --tilt/--turn orient the board; labels and flyers undo them so they always face the camera. */
.board-stage {
  --tilt: 58deg;
  --turn: -34deg;
  position: relative;
  height: 46em;
  margin: 0;
  font-size: clamp(4.6px, 1vw, 12.5px);
  perspective: 130em;
  perspective-origin: 50% 30%;
}
.board-scene {
  transform: rotateX(calc(var(--py, 0) * -6deg)) rotateY(calc(var(--px, 0) * 9deg));
}
.board {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64em;
  height: 34em;
  margin: -17em 0 0 -32em;
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt)) rotateZ(var(--turn));
}
.board__map {
  position: absolute;
  inset: 0;
  border-radius: 2.4em;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(45, 212, 191, 0.12), transparent 70%),
    linear-gradient(rgba(148, 163, 255, 0.1) 1px, transparent 1px) 0 0 / 4em 4em,
    linear-gradient(90deg, rgba(148, 163, 255, 0.1) 1px, transparent 1px) 0 0 / 4em 4em,
    #0e1633;
  box-shadow:
    0 0 0 1px rgba(148, 163, 255, 0.2),
    0 4em 8em rgba(0, 0, 0, 0.5);
}
.board__paths {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.board__out,
.board__back {
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 2 10;
  animation: dash-run 1.4s linear infinite;
}
.board__out {
  stroke: var(--teal-2);
  stroke-width: 3;
}
.board__back {
  stroke: var(--violet-2);
  stroke-width: 2.4;
  opacity: 0.85;
  animation-direction: reverse;
}
.node {
  position: absolute;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}
.node::before {
  content: '';
  position: absolute;
  top: -7em;
  left: -7em;
  width: 14em;
  height: 14em;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(45, 212, 191, 0.3), transparent);
}
.node--server {
  --lift: 10em;
  top: 24em;
  left: 10em;
}
.node--senders {
  --lift: 7.5em;
  top: 17em;
  left: 32em;
}
.node--inboxes {
  --lift: 8.5em;
  top: 10em;
  left: 54em;
}
.node--inboxes::before {
  background: radial-gradient(closest-side, rgba(124, 108, 240, 0.32), transparent);
}
.cube {
  --w: 8em;
  --d: 8em;
  --h: 5em;
  position: absolute;
  top: calc(var(--d) / -2);
  left: calc(var(--w) / -2);
  width: var(--w);
  height: var(--d);
  transform-style: preserve-3d;
}
.cube i {
  position: absolute;
  display: block;
}
.cube__top {
  inset: 0;
  border-radius: 0.4em;
  transform: translateZ(var(--h));
  background: var(--top);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.cube__south {
  top: 100%;
  left: 0;
  width: 100%;
  height: var(--h);
  transform-origin: 50% 0;
  transform: rotateX(90deg);
  background: var(--south);
}
.cube__west {
  top: 0;
  right: 100%;
  width: var(--h);
  height: 100%;
  transform-origin: 100% 50%;
  transform: rotateY(90deg);
  background: var(--west);
}
.cube--server {
  --w: 9em;
  --d: 9em;
  --h: 6.5em;
  --top: repeating-linear-gradient(90deg, transparent 0 1.2em, rgba(94, 234, 212, 0.18) 1.2em 1.3em),
    linear-gradient(135deg, #34437e, #1f2858);
  --south: repeating-linear-gradient(to bottom, transparent 0 1.3em, rgba(94, 234, 212, 0.55) 1.3em 1.45em),
    linear-gradient(to bottom, #0f1631, #26326a);
  --west: linear-gradient(to right, #1d2650, #0d1430);
}
.cube--mail {
  --w: 3.4em;
  --d: 3.4em;
  --h: 3.2em;
  --top: linear-gradient(135deg, #5eead4, #8b7cf6);
  --south: linear-gradient(to bottom, #0e5f62, #23a59a);
  --west: linear-gradient(to right, #1aa597, #0b4f57);
}
.cube--m1 {
  translate: -4.6em 1.2em;
}
.cube--m2 {
  translate: 0 -3.2em;
}
.cube--m3 {
  translate: 4.6em 1.6em;
}
.cube--inbox {
  --w: 8em;
  --d: 7em;
  --h: 4em;
  --top: radial-gradient(ellipse at 50% 50%, #1b1745 0 46%, transparent 47%), linear-gradient(135deg, #a99dff, #6a5ae0);
  --south: linear-gradient(to bottom, #2d2380, #5b4bd1);
  --west: linear-gradient(to right, #4b3db8, #241c66);
}
.node__pin {
  position: absolute;
  top: 0;
  left: 0;
  transform-style: preserve-3d;
  transform: translateZ(var(--lift, 9em)) rotateZ(calc(var(--turn) * -1)) rotateX(calc(var(--tilt) * -1));
}
.node__label {
  position: absolute;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 0.15rem;
  min-width: 10.5rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(169, 157, 255, 0.3);
  border-radius: 0.9rem;
  background: rgba(12, 18, 40, 0.82);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  font-size: clamp(0.72rem, 0.55rem + 0.42vw, 0.95rem);
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  transform: translateX(-50%);
}
.node__tag {
  color: var(--teal-2);
  font: 700 0.72em/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.node__label strong {
  color: #fff;
  font-family: var(--display);
  font-size: 1.12em;
}
.node__sub {
  color: var(--muted);
  font-size: 0.88em;
}
.flyer {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: fly-out 6.4s linear infinite;
}
.flyer--b {
  animation-delay: -3.2s;
}
.flyer--reply {
  animation: fly-back 7.2s linear infinite;
  animation-delay: -1.4s;
}
.flyer__pin {
  position: absolute;
  top: 0;
  left: 0;
  transform-style: preserve-3d;
  transform: rotateZ(calc(var(--turn) * -1)) rotateX(calc(var(--tilt) * -1));
}
.flyer__env {
  position: absolute;
  top: -2.4em;
  left: -1.6em;
  width: 3.2em;
  height: 2.2em;
  animation: flyer-fade 6.4s linear infinite;
  animation-delay: inherit;
}
.flyer--b .flyer__env {
  animation-delay: -3.2s;
}
.flyer--reply .flyer__env {
  animation-duration: 7.2s;
  animation-delay: -1.4s;
}
.flyer__env svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 0.5em rgba(94, 234, 212, 0.7));
}
.flyer__env rect {
  fill: #fffdf8;
  stroke: var(--teal-2);
  stroke-width: 1.2;
}
.flyer__env path {
  fill: none;
  stroke: var(--violet);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.flyer--reply svg {
  filter: drop-shadow(0 0 0.5em rgba(169, 157, 255, 0.8));
}
.flyer--reply rect {
  fill: #efeaff;
  stroke: var(--violet-2);
}
.board__caption {
  position: absolute;
  right: 0;
  bottom: 0.5em;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: #d6dcf5;
  font-size: 1rem;
  font-weight: 650;
}
.board__caption .icon {
  color: var(--violet-2);
}

/* ---------- Paper sections ---------- */
.airmail {
  height: 10px;
  background: repeating-linear-gradient(
    -45deg,
    var(--teal) 0 12px,
    var(--paper) 12px 24px,
    var(--violet) 24px 36px,
    var(--paper) 36px 48px
  );
}
.paper {
  --surface: var(--paper);
  position: relative;
  color: var(--ink-text);
  background-color: var(--surface);
  background-image: var(--noise);
}
.paper--alt {
  --surface: var(--paper-2);
}
.section {
  padding: clamp(4.5rem, 9vw, 8rem) 0;
}
.section--flush {
  padding-top: 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}
.card {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  padding: 2.1rem 1.75rem 1.9rem;
  border-radius: 1.2rem;
  background: var(--paper-card);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(20, 24, 40, 0.06),
    0 18px 36px -18px rgba(20, 24, 40, 0.3);
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition:
    transform 0.6s var(--ease-out),
    box-shadow 0.6s var(--ease-out);
}
.card.is-tilting {
  transition:
    transform 0.12s linear,
    box-shadow 0.6s var(--ease-out);
}
.card:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(20, 24, 40, 0.06),
    0 36px 60px -26px rgba(20, 24, 40, 0.45);
}
/* Dog-eared corner. */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0 1.2rem 0 0.55rem;
  background: linear-gradient(225deg, var(--surface) 50%, var(--paper-fold) 50%);
  box-shadow: -2px 3px 5px -2px rgba(20, 24, 40, 0.2);
}
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.7), transparent 50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}
.card:hover::after {
  opacity: 0.6;
}
.stamp {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, #14b8a6, #5b4bd1);
  outline: 2px dashed rgba(255, 255, 255, 0.62);
  outline-offset: -6px;
  box-shadow: 0 14px 24px -10px rgba(82, 67, 201, 0.7);
  transition: transform 0.6s var(--ease-out);
}
.card--violet .stamp {
  background: linear-gradient(135deg, #7c6cf0, #2b7fd6);
}
.stamp .icon {
  width: 1.5rem;
  height: 1.5rem;
}
.card h3 {
  margin-top: 1.4rem;
  font-size: 1.32rem;
  transition: transform 0.6s var(--ease-out);
}
.card p {
  margin-top: 0.65rem;
  color: var(--ink-muted);
}
.card:hover .stamp {
  transform: translateZ(46px);
}
.card:hover h3 {
  transform: translateZ(22px);
}

/* Features: one group per row, an exploded stack of UI sheets beside the list. */
.fgroup {
  display: grid;
  grid-template-columns: minmax(0, 19rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-block: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--paper-line);
}
.fgroup__n {
  display: block;
  color: transparent;
  font: 800 3.6rem/1 var(--display);
  letter-spacing: -0.04em;
  -webkit-text-stroke: 1.5px rgba(20, 27, 45, 0.32);
}
.fgroup__title {
  margin-top: 0.5rem;
  font-size: clamp(1.4rem, 1.1rem + 0.8vw, 1.8rem);
}
.fgroup__items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 0.9rem;
}
.feature {
  display: flex;
  gap: 0.9rem;
  padding: 1.2rem 1.25rem;
  border: 1px solid rgba(20, 27, 45, 0.08);
  border-radius: 1rem;
  background: rgba(255, 253, 248, 0.7);
  transition:
    transform 0.4s var(--ease-out),
    background-color 0.3s,
    border-color 0.3s,
    box-shadow 0.4s var(--ease-out);
}
.feature:hover {
  border-color: rgba(10, 111, 100, 0.28);
  background: var(--paper-card);
  box-shadow: 0 16px 30px -20px rgba(20, 24, 40, 0.4);
  transform: translateY(-3px);
}
.feature h4 {
  font-size: 1.06rem;
  line-height: 1.3;
}
.feature p {
  margin-top: 0.35rem;
  color: var(--ink-muted);
  font-size: 0.97rem;
}
.icon--check {
  width: 1.55rem;
  height: 1.55rem;
  margin-top: 0.05rem;
  padding: 0.28rem;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #0d9488, #5b4bd1);
}
.stack {
  height: 13rem;
  margin-top: 0.75rem;
  perspective: 900px;
}
.stack__plane {
  position: relative;
  top: 2.4rem;
  left: 1.4rem;
  width: 13.5rem;
  height: 8.6rem;
  transform-style: preserve-3d;
  transform: rotateX(56deg) rotateZ(-38deg);
}
.sheet {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(20, 27, 45, 0.12);
  border-radius: 0.8rem;
  background: var(--paper-card);
  box-shadow: 0 10px 22px -8px rgba(20, 27, 45, 0.3);
  transition: transform 0.8s var(--ease-out);
}
.sheet--1 {
  background: #ebe3d2;
}
.sheet--2 {
  transform: translateZ(1.7rem);
}
.sheet--3 {
  transform: translateZ(3.4rem);
}
.fgroup:hover .sheet--2 {
  transform: translateZ(2.8rem);
}
.fgroup:hover .sheet--3 {
  transform: translateZ(5.6rem);
}
.ui-line {
  display: block;
  height: 0.42rem;
  border-radius: 1rem;
  background: rgba(20, 27, 45, 0.14);
}
.ui-line--short {
  width: 60%;
}
.ui-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ui-row--reply {
  margin-inline: -0.35rem;
  padding: 0.2rem 0.35rem;
  border-radius: 0.5rem;
  background: rgba(124, 108, 240, 0.14);
}
.ui-dot {
  flex: none;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: #14b8a6;
}
.ui-dot--v {
  background: var(--violet);
}
.ui-bar {
  height: 0.5rem;
  border-radius: 1rem;
  background: linear-gradient(90deg, #14b8a6, var(--violet));
}
.ui-bar--40 {
  width: 40%;
}
.ui-bar--45 {
  width: 45%;
}
.ui-bar--60 {
  width: 60%;
}
.ui-bar--70 {
  width: 70%;
}
.ui-bar--75 {
  width: 75%;
}
.ui-bar--85 {
  width: 85%;
}
.ui-pause {
  align-self: flex-end;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.4rem;
  background:
    linear-gradient(90deg, transparent 30%, #fff 30% 43%, transparent 43% 57%, #fff 57% 70%, transparent 70%) center / 100%
      50% no-repeat,
    #e06b4f;
}
.ui-chip {
  align-self: flex-start;
  padding: 0.2rem 0.45rem;
  border-radius: 0.4rem;
  color: var(--teal-ink);
  background: rgba(20, 184, 166, 0.14);
  font: 600 0.78rem/1.2 var(--mono);
  white-space: nowrap;
}
.ui-chip--v {
  color: var(--violet-ink);
  background: rgba(124, 108, 240, 0.14);
}
.ui-gauge {
  width: 5.6rem;
  height: 2.8rem;
  margin: auto;
  border-radius: 5.6rem 5.6rem 0 0;
  background: conic-gradient(
    from -90deg at 50% 100%,
    #14b8a6 0 62deg,
    var(--violet) 62deg 118deg,
    rgba(20, 27, 45, 0.12) 118deg 180deg,
    transparent 180deg
  );
  -webkit-mask: radial-gradient(circle at 50% 100%, transparent 1.55rem, #000 1.6rem);
  mask: radial-gradient(circle at 50% 100%, transparent 1.55rem, #000 1.6rem);
}
.ui-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  height: 100%;
}
.ui-grid span {
  border: 1px solid rgba(20, 27, 45, 0.16);
  border-radius: 0.4rem;
  background: #fff;
}
.ui-grid .is-dark {
  background: #1c2340;
}
.ui-seq {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding-inline: 0.4rem;
  background: linear-gradient(rgba(20, 27, 45, 0.22), rgba(20, 27, 45, 0.22)) center / calc(100% - 1.6rem) 2px no-repeat;
}
.ui-seq span {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: #14b8a6;
  box-shadow: 0 0 0 0.3rem var(--paper-card);
}
.ui-seq .is-stop {
  border-radius: 0.35rem;
  background: var(--violet);
}

/* ---------- The story (1918) ---------- */
.story {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: clamp(5rem, 10vw, 9rem) 0;
  background:
    radial-gradient(ellipse 70% 50% at 78% 14%, rgba(245, 185, 120, 0.16), transparent 62%),
    radial-gradient(ellipse 60% 50% at 8% 92%, rgba(124, 108, 240, 0.2), transparent 62%),
    linear-gradient(180deg, #0c0f22 0%, #130f1f 70%, #0e0c19 100%);
}
.story__sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.story__year {
  position: absolute;
  right: -2vw;
  bottom: -5vw;
  color: transparent;
  font: 800 clamp(10rem, 30vw, 27rem) / 0.8 var(--display);
  letter-spacing: -0.05em;
  -webkit-text-stroke: 1px rgba(245, 199, 126, 0.17);
  user-select: none;
}
.story__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.story .h2 {
  margin-top: 1rem;
}
.story .section-lead {
  color: #cdc5da;
}
.beats {
  position: relative;
  margin: 2.3rem 0 0;
  padding: 0;
  list-style: none;
}
.beats::before {
  content: '';
  position: absolute;
  top: 0.7rem;
  bottom: 0.7rem;
  left: 0.45rem;
  width: 2px;
  background: linear-gradient(var(--amber), rgba(124, 108, 240, 0.65));
  opacity: 0.6;
}
.beat {
  position: relative;
  padding: 0 0 1.5rem 2.3rem;
}
.beat:last-child {
  padding-bottom: 0;
}
.beat::before {
  content: '';
  position: absolute;
  top: 0.15rem;
  left: 0;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--amber);
  border-radius: 50%;
  background: #130f1f;
  box-shadow: 0 0 0 4px rgba(245, 199, 126, 0.12);
}
.beat__when {
  color: var(--amber);
  font: 700 0.85rem/1.2 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.beat p {
  margin-top: 0.45rem;
  color: #dcd5e8;
}
.story__stage {
  position: relative;
  height: 46em;
  font-size: clamp(6px, 0.95vw, 12.5px);
  perspective: 110em;
  perspective-origin: 50% 30%;
}
.map {
  position: absolute;
  top: 62%;
  left: 50%;
  width: 40em;
  height: 26em;
  margin: -13em 0 0 -20em;
  transform-style: preserve-3d;
  transform: rotateX(54deg) rotateZ(-16deg);
}
.map__paper {
  position: absolute;
  inset: 0;
  border-radius: 0.6em;
  background:
    repeating-radial-gradient(ellipse at 30% 72%, transparent 0 1.6em, rgba(120, 84, 40, 0.2) 1.6em 1.72em),
    linear-gradient(rgba(120, 84, 40, 0.12) 1px, transparent 1px) 0 0 / 3em 3em,
    linear-gradient(90deg, rgba(120, 84, 40, 0.12) 1px, transparent 1px) 0 0 / 3em 3em,
    linear-gradient(135deg, #f0e3c6, #dfcaa0);
  box-shadow:
    0 3em 6em rgba(0, 0, 0, 0.6),
    inset 0 0 3em rgba(120, 84, 40, 0.28);
}
.map__route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.map__route path {
  fill: none;
  stroke: #b4472f;
  stroke-width: 2.6;
  stroke-dasharray: 7 6;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  animation: dash-run 1.2s linear infinite;
}
.map__pt {
  position: absolute;
  width: 1.4em;
  height: 1.4em;
  margin: -0.7em 0 0 -0.7em;
  border-radius: 50%;
  background: #b4472f;
  box-shadow: 0 0 0 0.4em rgba(180, 71, 47, 0.25);
}
.map__pt--from {
  top: 79.2%;
  left: 16%;
}
.map__pt--to {
  top: 25.4%;
  left: 82.5%;
}
.map__label {
  position: absolute;
  color: #5a3d1c;
  font: 700 1.3em/1.2 var(--mono);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.map__label--from {
  top: 84%;
  left: 7%;
}
.map__label--to {
  top: 11%;
  right: 3%;
}
.map__flyer {
  position: absolute;
  top: 0;
  left: 0;
  transform-style: preserve-3d;
  animation: map-fly 7s linear infinite;
}
.map__shadow {
  position: absolute;
  top: -0.6em;
  left: -1.5em;
  width: 3em;
  height: 1.2em;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(60, 35, 10, 0.45), transparent);
}
.map__pin {
  position: absolute;
  top: 0;
  left: 0;
  transform-style: preserve-3d;
  transform: translateZ(4em) rotateZ(16deg) rotateX(-54deg);
}
.map__bird {
  position: absolute;
  top: -4.4em;
  left: -3.8em;
  width: 7.6em;
  color: #39404f;
  filter: drop-shadow(0 0.15em 0.2em rgba(60, 35, 10, 0.35));
}
.note {
  position: absolute;
  top: 0;
  left: 0;
  width: min(23rem, 88%);
  margin: 0;
  padding: 1.7rem 1.8rem 1.4rem;
  border-radius: 0.35rem;
  color: #2d2416;
  background:
    repeating-linear-gradient(transparent 0 1.85rem, rgba(90, 60, 20, 0.12) 1.85rem calc(1.85rem + 1px)),
    #fbf5e7;
  box-shadow:
    0 2em 4em rgba(0, 0, 0, 0.5),
    0 0.2em 0.4em rgba(0, 0, 0, 0.2);
  transform: translateZ(9em) rotate(-3deg);
}
.note::before {
  content: '';
  position: absolute;
  top: -0.85rem;
  left: 50%;
  width: 6.5rem;
  height: 1.7rem;
  margin-left: -3.25rem;
  background: rgba(245, 199, 126, 0.6);
  transform: rotate(-4deg);
}
.note blockquote {
  margin: 0;
  font: 600 clamp(0.95rem, 0.85rem + 0.35vw, 1.12rem) / 1.5 var(--mono);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.note__tr {
  margin-top: 0.7rem;
  color: #5c4a2c;
  font-size: 0.98rem;
  font-style: italic;
}
.note figcaption {
  margin-top: 0.9rem;
  color: #7a6440;
  font-size: 0.88rem;
  font-weight: 650;
}
.story__closing {
  max-width: 50rem;
  margin: clamp(3.5rem, 7vw, 6rem) auto 0;
  color: #f3ecdf;
  font: 650 clamp(1.4rem, 1rem + 1.6vw, 2.25rem) / 1.3 var(--display);
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
}
.story__closing::before {
  content: '';
  display: block;
  width: 3rem;
  height: 3px;
  margin: 0 auto 1.6rem;
  border-radius: 3px;
  background: var(--amber);
}

/* ---------- How it works ---------- */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.4rem, 3vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps::before {
  content: '';
  position: absolute;
  top: 2.8rem;
  right: 12%;
  left: 3rem;
  border-top: 2px dashed rgba(20, 27, 45, 0.22);
}
.step {
  position: relative;
}
.step__n {
  position: relative;
  display: grid;
  place-items: center;
  width: 5.6rem;
  height: 5.6rem;
  border-radius: 1.5rem;
  color: #fff;
  background: linear-gradient(140deg, var(--c1), var(--c2));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    0 0.55rem 0 var(--c3),
    0 1.4rem 2.2rem -0.8rem rgba(20, 27, 45, 0.5);
  font: 800 3rem/1 var(--display);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
  transform: perspective(500px) rotateX(16deg) rotateY(-18deg);
  transition: transform 0.6s var(--ease-out);
}
.step:hover .step__n {
  transform: perspective(500px) rotateX(4deg) rotateY(-4deg) translateY(-4px);
}
.step:nth-child(1) {
  --c1: #14b8a6;
  --c2: #0f766e;
  --c3: #0a4f4a;
}
.step:nth-child(2) {
  --c1: #4f8ef7;
  --c2: #3b5bdb;
  --c3: #24388f;
}
.step:nth-child(3) {
  --c1: #8b7cf6;
  --c2: #5b4bd1;
  --c3: #3a2d97;
}
.step h3 {
  margin-top: 1.8rem;
  font-size: 1.35rem;
}
.step p {
  margin-top: 0.55rem;
  color: var(--ink-muted);
}

/* ---------- Limits and flight log ---------- */
.limits-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.limits {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.limit {
  display: flex;
  gap: 0.9rem;
  padding: 1.1rem 1.2rem;
  border: 1.5px dashed rgba(20, 27, 45, 0.22);
  border-radius: 1rem;
  background: rgba(255, 253, 248, 0.5);
}
.icon--limit {
  width: 1.55rem;
  height: 1.55rem;
  padding: 0.22rem;
  border-radius: 50%;
  color: #8a3b2a;
  background: rgba(180, 71, 47, 0.12);
}
.limit strong {
  display: block;
  font-weight: 700;
}
.limit span {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink-muted);
  font-size: 0.97rem;
}
.log-card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.8rem, 4vw, 2.6rem);
  border-radius: 1.5rem;
  color: var(--text);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(124, 108, 240, 0.35), transparent 60%),
    radial-gradient(ellipse at 0% 100%, rgba(45, 212, 191, 0.18), transparent 60%),
    var(--ink-2);
  box-shadow: 0 34px 70px -30px rgba(10, 16, 32, 0.7);
}
.log-card .kicker {
  color: var(--teal-2);
}
.log-card .h3 {
  margin-top: 0.9rem;
}
.flightlog {
  position: relative;
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
}
.flightlog::before {
  content: '';
  position: absolute;
  top: 0.6rem;
  bottom: 0.6rem;
  left: 0.55rem;
  width: 2px;
  background: linear-gradient(var(--teal), rgba(169, 157, 255, 0.35));
}
.log {
  position: relative;
  padding: 0 0 1.35rem 2.3rem;
}
.log:last-child {
  padding-bottom: 0;
}
.log__dot {
  position: absolute;
  top: 0.2rem;
  left: 0;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid var(--violet-2);
  border-radius: 50%;
  background: var(--ink-2);
}
.log--done .log__dot {
  border-color: var(--teal);
  background: var(--teal);
}
.log--now .log__dot {
  border-color: var(--teal);
  animation: ping 2.4s var(--ease-out) infinite;
}
.log strong {
  display: block;
  font-family: var(--display);
  font-size: 1.1rem;
}
.log span {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.97rem;
}

/* ---------- Early access ---------- */
.access {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: clamp(11rem, 18vw, 15rem) 0 clamp(6rem, 11vw, 9rem);
  text-align: center;
  background:
    radial-gradient(ellipse 60% 70% at 50% 100%, rgba(124, 108, 240, 0.36), transparent 70%),
    linear-gradient(180deg, #0a0f26 0%, #070b18 100%);
}
.access__flight {
  position: absolute;
  top: clamp(4.5rem, 7vw, 6rem);
  right: 0;
  left: 0;
  z-index: 0;
  height: clamp(7rem, 11vw, 10rem);
  pointer-events: none;
}
.bird--cross .bird__poster {
  left: 6%;
  width: clamp(7rem, 12vw, 10rem);
}
.access__inner {
  position: relative;
  z-index: 1;
  max-width: 48rem;
}
.access .section-lead {
  margin-inline: auto;
}
.access__call {
  margin-top: 1rem;
  color: var(--muted);
}
.access__email {
  margin-top: 1.4rem;
  color: var(--muted);
}
.access__email a {
  color: #fff;
  text-decoration-color: rgba(94, 234, 212, 0.6);
  text-underline-offset: 0.22em;
}

/* ---------- FAQ: each answer is a letter; the flap opens. ---------- */
.faq {
  display: grid;
  gap: 0.8rem;
}
.faq-item {
  border: 1px solid rgba(20, 27, 45, 0.08);
  border-radius: 1rem;
  background: var(--paper-card);
  box-shadow: 0 1px 2px rgba(20, 24, 40, 0.05);
  transition:
    border-color 0.3s,
    box-shadow 0.4s var(--ease-out);
}
.faq-item[open] {
  border-color: rgba(10, 111, 100, 0.3);
  box-shadow: 0 18px 40px -22px rgba(20, 24, 40, 0.38);
}
.faq-item summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 44px;
  padding: 1.15rem 1.3rem;
  font: 700 1.08rem/1.35 var(--display);
  list-style: none;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-env {
  position: relative;
  flex: none;
  width: 2.2rem;
  height: 1.5rem;
  border: 1.5px solid var(--violet-ink);
  border-radius: 0.3rem;
  background: linear-gradient(135deg, #e8fbf7, #ece8ff);
  perspective: 120px;
}
.faq-env i {
  position: absolute;
  top: -1.5px;
  right: -1.5px;
  left: -1.5px;
  height: 62%;
  background: var(--violet-ink);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: 50% 0;
  transition: transform 0.5s var(--ease-out);
}
.faq-item[open] .faq-env i {
  transform: rotateX(180deg);
}
.faq-a {
  padding: 0 1.3rem 1.35rem 4.5rem;
  color: var(--ink-muted);
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  overflow: clip;
  padding: 4.5rem 0 2.2rem;
  color: var(--muted);
  background: var(--ink);
}
.footer__grid,
.footer__bottom {
  position: relative;
  z-index: 1;
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2rem;
}
.footer__tagline {
  margin-top: 1.1rem;
  color: #fff;
  font: 700 1.45rem/1.2 var(--display);
}
.footer__story {
  max-width: 30rem;
  margin-top: 0.6rem;
  font-size: 0.95rem;
}
.footer__links {
  display: grid;
  gap: 0.35rem;
  justify-self: end;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: right;
}
.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #c9d3ee;
  text-decoration: none;
}
.footer__links a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.footer__bottom {
  margin-top: 3rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.88rem;
}
.footer__word {
  position: absolute;
  bottom: -3.4vw;
  left: 50%;
  color: transparent;
  font: 800 18vw/1 var(--display);
  letter-spacing: -0.05em;
  white-space: nowrap;
  -webkit-text-stroke: 1px rgba(169, 157, 255, 0.13);
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
}

/* ---------- Inner pages ---------- */
.body--paper {
  background: var(--paper);
}
.page {
  position: relative;
  padding: clamp(7.5rem, 12vw, 9.5rem) 0 clamp(4rem, 8vw, 6rem);
}
.letter {
  position: relative;
  overflow: hidden;
  padding: clamp(1.8rem, 5vw, 3.4rem);
  border-radius: 1.2rem;
  background: var(--paper-card);
  box-shadow:
    0 1px 2px rgba(20, 24, 40, 0.06),
    0 30px 60px -30px rgba(20, 24, 40, 0.4);
}
.letter::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    var(--teal) 0 10px,
    var(--paper-card) 10px 20px,
    var(--violet) 20px 30px,
    var(--paper-card) 30px 40px
  );
}
.prose h1 {
  font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.2rem);
  letter-spacing: -0.03em;
}
.prose h2 {
  margin-top: 2.2rem;
  font-size: 1.45rem;
}
.prose p {
  margin-top: 0.9rem;
  color: var(--ink-muted);
}
.prose .updated {
  margin-top: 0.6rem;
  font-size: 0.92rem;
}
.prose .letter__back {
  margin-top: 2.4rem;
}
.page--lost {
  isolation: isolate;
  overflow: clip;
  min-height: 88vh;
  color: var(--text);
  text-align: center;
  background: linear-gradient(180deg, #050816 0%, #0c1430 100%);
}
.lost__stage {
  position: relative;
  width: min(100%, 40rem);
  height: clamp(13rem, 30vw, 19rem);
  margin: 0 auto;
}
.lost__copy .section-lead {
  margin-inline: auto;
}

/* ---------- Scroll reveal (progressive: only where scroll timelines exist) ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 26%;
    }
  }
}

/* Off-screen scenes are paused by site.js. */
.is-paused,
.is-paused * {
  animation-play-state: paused !important;
}

/* ---------- Keyframes ---------- */
@keyframes reveal {
  from {
    opacity: 0;
    transform: perspective(1000px) translateY(2.5rem) rotateX(12deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.55);
  }
  80%,
  100% {
    box-shadow: 0 0 0 0.6rem rgba(45, 212, 191, 0);
  }
}
@keyframes twinkle {
  from {
    opacity: 0.25;
  }
  to {
    opacity: 0.85;
  }
}
@keyframes drift-a {
  to {
    transform: translate3d(-8%, 6%, 0) scale(1.1);
  }
}
@keyframes drift-b {
  to {
    transform: translate3d(10%, -4%, 0) scale(0.92);
  }
}
@keyframes drift {
  to {
    translate: 3em 0;
  }
}
@keyframes flock-drift {
  to {
    translate: 4em -1.5em;
  }
}
@keyframes grid-run {
  to {
    transform: rotateX(74deg) translateY(64px);
  }
}
@keyframes dash-run {
  to {
    stroke-dashoffset: -24;
  }
}
@keyframes glide {
  0%,
  100% {
    translate: 0 0;
  }
  33% {
    translate: 1.4em -1.2em;
  }
  66% {
    translate: -1em 0.8em;
  }
}
@keyframes glyph-flap {
  to {
    transform: scaleY(0.3);
  }
}
@keyframes marquee {
  to {
    transform: translateX(-25%);
  }
}
@keyframes fly-out {
  0% {
    transform: translate3d(10em, 24em, 8em);
  }
  22% {
    transform: translate3d(21em, 20.5em, 11em);
  }
  45% {
    transform: translate3d(32em, 17em, 6.5em);
  }
  70% {
    transform: translate3d(43em, 13.5em, 10em);
  }
  90%,
  100% {
    transform: translate3d(54em, 10em, 6.5em);
  }
}
@keyframes fly-back {
  0% {
    transform: translate3d(54em, 10em, 6em);
  }
  25% {
    transform: translate3d(60em, 21em, 6em);
  }
  50% {
    transform: translate3d(46em, 30em, 5em);
  }
  75% {
    transform: translate3d(26em, 31em, 6em);
  }
  92%,
  100% {
    transform: translate3d(10em, 24em, 8.5em);
  }
}
@keyframes flyer-fade {
  0%,
  100% {
    opacity: 0;
  }
  7%,
  86% {
    opacity: 1;
  }
}
@keyframes map-fly {
  0% {
    transform: translate(6.4em, 20.6em);
  }
  25% {
    transform: translate(12.3em, 18.75em);
  }
  50% {
    transform: translate(17.9em, 15.25em);
  }
  75% {
    transform: translate(24.4em, 10.9em);
  }
  92%,
  100% {
    transform: translate(33em, 6.6em);
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav__links,
  .lang {
    display: none;
  }
  .menu {
    display: block;
  }
}
@media (max-width: 960px) {
  .hero__grid,
  .story__grid,
  .limits-grid,
  .footer__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .stage {
    height: 38em;
    font-size: clamp(6px, 2vw, 12px);
  }
  /* Narrow screens: the map and the note stack instead of overlapping. */
  .story__stage {
    height: auto;
    font-size: clamp(6px, 2.1vw, 12px);
  }
  .story__scene {
    position: relative;
    inset: auto;
  }
  .map {
    position: relative;
    top: auto;
    left: auto;
    margin: 2em auto 5em;
  }
  .note {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    max-width: 26rem;
    margin: 0 auto;
    transform: rotate(-1.5deg);
  }
  .cards {
    grid-template-columns: minmax(0, 1fr);
    max-width: 36rem;
  }
  .fgroup {
    grid-template-columns: minmax(0, 1fr);
  }
  .stack {
    display: none;
  }
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .steps::before {
    display: none;
  }
  .footer__links {
    justify-self: start;
    text-align: left;
  }
}
@media (max-width: 640px) {
  .nav__cta {
    display: none;
  }
  .header__bar {
    padding-left: 0.85rem;
  }
  .fgroup__items {
    grid-template-columns: minmax(0, 1fr);
  }
  .works {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
  }
  .board-stage {
    --tilt: 54deg;
    --turn: -58deg;
    height: 74em;
    font-size: clamp(4.6px, 1.5vw, 7px);
  }
  .node__label {
    min-width: 0;
    padding: 0.45rem 0.65rem;
  }
  .node__sub {
    display: none;
  }
  .faq-a {
    padding-left: 1.3rem;
  }
}

/* ---------- Reduced motion: final, readable states, no parallax ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
  }
  .scene,
  .board-scene,
  .story__scene {
    transform: none;
  }
  .flyer--b,
  .flyer--reply {
    display: none;
  }
  .flyer--a {
    transform: translate3d(21em, 20.5em, 11em);
  }
  .map__flyer {
    transform: translate(17.9em, 15.25em);
  }
}
