/* STARS NETWORK · 3D hero prototype
   Two families: Noto Serif Display (the human voice) and Archivo (the brand
   and every label). Colour lives only in the photographs; the interface is
   bone on off-black, focus rings included. */

@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(../fonts/archivo-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; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(../fonts/archivo-var-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Noto Serif Display'; font-style: normal; font-weight: 100 900; font-stretch: 62.5% 100%; font-display: swap;
  src: url(../fonts/noto-serif-display-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; }
@font-face { font-family: 'Noto Serif Display'; font-style: normal; font-weight: 100 900; font-stretch: 62.5% 100%; font-display: swap;
  src: url(../fonts/noto-serif-display-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Noto Serif Display'; font-style: normal; font-weight: 100 900; font-stretch: 62.5% 100%; font-display: swap;
  src: url(../fonts/noto-serif-display-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --ink: #08080a;
  --ink-2: #0e0e12;
  --bone: #ece6d8;
  --bone-dim: #bdb7a9;
  --muted: #8e897e;
  --line: rgba(236, 230, 216, .22);
  --line-soft: rgba(236, 230, 216, .12);

  --serif: 'Noto Serif Display', 'Iowan Old Style', Georgia, serif;
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --pad: clamp(18px, 3.2vw, 48px);
  --nav-h: clamp(64px, 8.4vh, 84px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  /* Motion's default spring (stiffness 100, damping 10, mass 1) over its one
     settling second; a browser without linear() takes the ease-out */
  --ease-spring: var(--ease-out);
  --track-label: .3em;
}
@supports (transition-timing-function: linear(0, 1)) {
  :root { --ease-spring: linear(0, 0.029, 0.104, 0.213, 0.34, 0.476, 0.61, 0.737, 0.849, 0.946, 1.023, 1.083, 1.124, 1.15, 1.162, 1.162, 1.153, 1.138, 1.118, 1.097, 1.075, 1.053, 1.034, 1.017, 1.002, 0.991, 0.983, 0.977, 0.974, 0.973, 0.974, 0.976, 0.979, 0.982, 0.986, 0.99, 0.993, 0.996, 0.999, 1.001, 1); }
}

*, *::before, *::after { box-sizing: border-box; }
/* clip, not hidden: no horizontal overflow may widen a phone's layout viewport,
   and the root stays the scroller */
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; background: var(--ink); overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0; background: var(--ink); color: var(--bone);
  font-family: var(--sans); font-size: 16px; line-height: 1.6; font-weight: 400;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
::selection { background: var(--bone); color: var(--ink); }
html { scrollbar-color: #3b3934 var(--ink); caret-color: var(--bone); color-scheme: dark; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a, button { touch-action: manipulation; }
:focus-visible { outline: 1.5px solid var(--bone); outline-offset: 4px; border-radius: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: var(--pad); top: 12px; z-index: 200; padding: 10px 14px; background: var(--bone); color: var(--ink);
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; transform: translateY(-160%); }
.skip:focus { transform: none; }

/* ---------------------------------------------------------------- stage */
#gl {
  position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh;
  display: block; z-index: 0; touch-action: pan-y;
  opacity: 0; transition: opacity .35s linear;
}
#gl.is-live { opacity: 1; }
html.is-dragging, html.is-dragging #gl { cursor: grabbing; }

/* The cursor ring, after Kage: the system arrow stays, and a thin bone ring
   trails it. Over anything clickable the ring opens to twice its size and
   takes a faint fill. Mouse and trackpad only. */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 80; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border: 1px solid rgba(236, 230, 216, .42); border-radius: 50%; pointer-events: none; opacity: 0;
  contain: strict;
  transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out),
    background-color .35s, border-color .35s, opacity .3s;
}
.cursor.is-act { width: 52px; height: 52px; margin: -26px 0 0 -26px; background-color: rgba(236, 230, 216, .07); border-color: rgba(236, 230, 216, .6); }
@media (hover: hover) and (pointer: fine) { .cursor.is-on { opacity: 1; } }
html.is-dragging { user-select: none; -webkit-user-select: none; }
/* Only exists for browsers without WebGL: a still of the real scene. */
.stage-poster { display: none; }
.no-webgl .stage-poster {
  display: block; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: var(--ink) url(../img/poster-hero.webp) center 40% / cover no-repeat;
}
@media (max-aspect-ratio: 4/5) { .no-webgl .stage-poster { background-image: url(../img/poster-hero-portrait.webp); background-position: center top; } }
/* The veil answers reduced motion: a short dip between composed shots
   instead of a camera flight. */
.veil { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: var(--ink); opacity: 0; transition: opacity .22s linear; }
.veil.is-on { opacity: 1; }
.grain {
  position: fixed; inset: -2px; z-index: 60; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-size: 160px 160px;
}

/* ------------------------------------------------------------- preloader */
.pre { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--ink);
  transition: opacity .6s linear, visibility .6s; }
.pre.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.pre__in { width: min(360px, 72vw); }
.pre__mark { margin: 0 0 22px; font-size: 11px; font-weight: 650; letter-spacing: var(--track-label); text-align: center; }
.pre__bar { position: relative; height: 1px; background: var(--line-soft); overflow: hidden; }
.pre__bar i { position: absolute; inset: 0; background: var(--bone); transform-origin: 0 50%; transform: scaleX(0); transition: transform .3s var(--ease-out); }
.pre__meta { display: flex; justify-content: space-between; margin: 12px 0 0; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.pre__meta b { font-weight: 500; color: var(--bone-dim); font-variant-numeric: tabular-nums; }
.no-webgl .pre { display: none; }

/* -------------------------------------------------------------------- nav */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 50;
  display: flex; align-items: center; gap: 24px; padding: 0 var(--pad);
  padding-top: env(safe-area-inset-top, 0px);
  transition: transform .5s var(--ease-out), opacity .6s linear;
}
.nav::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(8, 8, 10, .78), rgba(8, 8, 10, 0)); opacity: 0; transition: opacity .4s linear; }
.nav.is-stuck::before { opacity: 1; }
.nav.is-hidden { transform: translate3d(0, -100%, 0); }
.nav__brand { font-size: 11px; font-weight: 700; letter-spacing: var(--track-label); white-space: nowrap;
  display: inline-block; padding: 15px 0; margin: -15px 0; }
.nav__links { display: flex; gap: clamp(20px, 3.1vw, 46px); margin-left: auto; }
.nav__links a { position: relative; font-size: 10px; font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--bone-dim);
  padding: 8px 0; transition: color .16s ease; }
/* a finger-sized target around small caps: 44px tall, never reaching the next link */
.nav__links a::before { content: ''; position: absolute; inset: -7px -6px; }
.nav__links a::after { content: ''; position: absolute; left: 0; right: .3em; bottom: 2px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .22s var(--ease-out); }
.nav__links a[aria-current="true"], .nav__links a[aria-current="page"] { color: var(--bone); }
.nav__links a[aria-current="true"]::after, .nav__links a[aria-current="page"]::after { transform: scaleX(1); }
/* the sound switch: four bars that move while sound is on (sound.js) */
.nav__sound { position: relative; display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; margin-left: clamp(16px, 2.4vw, 36px); padding: 0;
  border: 0; background: none; color: var(--bone); cursor: pointer; touch-action: manipulation; }
.nav__sound::before { content: ''; position: absolute; inset: -16px -14px; }
.nav__sound i { width: 2px; height: 100%; background: currentColor; transform-origin: 50% 100%; transform: scaleY(.16); transition: transform .3s var(--ease-out); }
.nav__sound[aria-pressed="true"] i { animation: nav-sound .9s ease-in-out infinite alternate; }
.nav__sound[aria-pressed="true"] i:nth-of-type(2) { animation-duration: 1.2s; animation-delay: -.4s; }
.nav__sound[aria-pressed="true"] i:nth-of-type(3) { animation-duration: .7s; animation-delay: -.2s; }
.nav__sound[aria-pressed="true"] i:nth-of-type(4) { animation-duration: 1.05s; animation-delay: -.6s; }
.nav__sound[aria-pressed="false"] { color: var(--muted); }
.nav__sound:focus-visible { outline: 1px solid var(--bone); outline-offset: 7px; }
@keyframes nav-sound { from { transform: scaleY(.2); } to { transform: scaleY(1); } }
@media (hover: hover) and (pointer: fine) {
  .nav__links a:hover { color: var(--bone); }
  .nav__links a:hover::after { transform: scaleX(1); }
}

/* ------------------------------------------------------------------- menu */
/* (menu.js) One button opens the pages as big serif lines over the ink. The
   header's small links are for a browser without JS. */
.nav__menu { display: none; }
.js .nav__links { display: none; }
.js .nav__sound { margin-left: auto; }
.js .nav__menu {
  position: relative; display: inline-flex; align-items: center; gap: 12px; margin-left: clamp(24px, 2.8vw, 40px);
  font-size: 10px; font-weight: 600; line-height: 1; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--bone);
  -webkit-user-select: none; user-select: none;
}
/* a finger-sized target around small caps */
.nav__menu::before { content: ''; position: absolute; inset: -16px -14px; }
.nav__menu:focus-visible { outline-offset: 8px; }
/* the word rolls from Menu to Close; the two lines cross */
.nav__menu-label { display: grid; overflow: hidden; padding: 2px 0; margin: -2px 0; }
.nav__menu-label > span { grid-area: 1 / 1; transition: transform .45s var(--ease-out); }
.nav__menu-label > span + span { transform: translate3d(0, 150%, 0); }
.nav__menu[aria-expanded="true"] .nav__menu-label > span:first-child { transform: translate3d(0, -150%, 0); }
.nav__menu[aria-expanded="true"] .nav__menu-label > span + span { transform: none; }
.nav__menu-icon { position: relative; width: 18px; height: 7px; }
.nav__menu-icon i { position: absolute; left: 0; top: 0; width: 100%; height: 1px; background: currentColor; transition: transform .45s var(--ease-out); }
.nav__menu-icon i + i { top: 6px; }
.nav__menu[aria-expanded="true"] .nav__menu-icon i:first-child { transform: translate3d(0, 3px, 0) rotate(45deg); }
.nav__menu[aria-expanded="true"] .nav__menu-icon i + i { transform: translate3d(0, -3px, 0) rotate(-45deg); }

/* the page behind holds still while the menu is open (no scrollbar jump, so
   the stage keeps its size) */
html { scrollbar-gutter: stable; }
html.is-menu { overflow: hidden; }
.mn {
  --mn-size: clamp(40px, min(6.2vw, 8.8vh), 96px);
  --mn-py: clamp(10px, 1.9vh, 22px);
  --mn-num: clamp(40px, 5vw, 80px);
  --mn-img: clamp(190px, 19vw, 300px);
  --mn-shift: .24em;
  position: fixed; inset: 0; z-index: 45; background: var(--ink);
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; visibility: hidden; transition: opacity .24s ease-out, visibility 0s linear .24s;
}
.mn.is-open { opacity: 1; visibility: visible; transition: opacity .3s ease-out, visibility 0s; }
/* clip, so a print leaning out of its line never makes the menu scroll */
.mn__in { display: flex; flex-direction: column; min-height: 100%; overflow: hidden; overflow: clip;
  padding: calc(var(--nav-h) + clamp(6px, 2.4vh, 32px)) var(--pad) calc(clamp(16px, 3vh, 32px) + env(safe-area-inset-bottom, 0px)); }
.mn__list { list-style: none; margin: auto 0; padding: 0; }
/* one line: a number, the word, what the page is, an arrow, and a rule under it all.
   Nothing on the line makes a stacking context, so every print passes under every word. */
.mn__link { position: relative; display: grid; grid-template-columns: var(--mn-num) minmax(0, 1fr) auto; align-items: center;
  padding: var(--mn-py) 0; }
.mn__link::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; z-index: -1; height: 1px;
  background-color: var(--line); transform-origin: 0 50%; }
.mn__num { position: relative; z-index: 1; grid-column: 1; grid-row: 1; align-self: start; margin-top: calc(var(--mn-size) * .14);
  font-size: 10px; font-weight: 600; line-height: 1; letter-spacing: .2em; font-variant-numeric: tabular-nums; color: var(--bone-dim); }
.mn__num svg { display: block; width: 11px; height: 11px; }
.mn__link[aria-current="page"] .mn__num { color: var(--bone); }
.mn__head { position: relative; z-index: 1; grid-column: 2; grid-row: 1; justify-self: start; display: block;
  padding: .1em 0 .18em; margin: -.1em 0 -.18em; clip-path: inset(0 -2em);
  font-family: var(--serif); font-size: var(--mn-size); font-weight: 400; font-stretch: 100%; line-height: 1; letter-spacing: -.012em;
  white-space: nowrap; color: var(--bone); }
.mn__rise { display: block; }
.mn__w, .mn__c { display: inline-block; }
.mn__sub { position: relative; z-index: 1; grid-column: 2; grid-row: 2; justify-self: start; margin-top: clamp(8px, 1.1vh, 12px);
  font-size: 10px; font-weight: 600; line-height: 1.5; letter-spacing: .22em; text-transform: uppercase; color: var(--bone-dim); }
.mn__go { position: relative; z-index: 1; grid-column: 3; grid-row: 1 / span 2; overflow: hidden; padding: 10px 2px 10px 16px; color: var(--bone); }
.mn__go svg { display: block; width: clamp(22px, 3.4vw, 54px); height: auto; aspect-ratio: 16 / 10; overflow: visible; }
.mn__go path { vector-effect: non-scaling-stroke; stroke-width: 1.3px; }
.mn__fig { display: none; }
.mn__foot { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px 28px; margin: clamp(18px, 3.4vh, 40px) 0 0;
  font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.mn__foot a { transition: color .16s ease; }

/* opening: each word rises out of its own mask and its rule draws across, a
   line every 60ms; closing is one fade, and the lines reset once it is out of sight */
.mn__rise { transform: translate3d(0, 110%, 0); transition: transform 0s linear .3s; }
.mn.is-open .mn__rise { transform: none; transition: transform .9s var(--ease-out) calc(var(--r) * 60ms + 60ms); }
.mn__link::before { transform: scaleX(0); transition: transform 0s linear .3s, background-color .5s ease; }
.mn.is-open .mn__link::before { transform: none; transition: transform 1.1s var(--ease-out) calc(var(--r) * 60ms), background-color .5s ease; }
.mn__num, .mn__sub, .mn__go, .mn__foot { opacity: 0; transition: opacity 0s linear .3s, color .5s ease; }
.mn.is-open :is(.mn__num, .mn__sub, .mn__go) { opacity: 1; transition: opacity .6s ease-out calc(var(--r) * 60ms + 280ms), color .5s ease; }
.mn.is-open .mn__foot { opacity: 1; transition: opacity .6s ease-out .55s; }
html.menu-instant :is(.mn, .mn *, .nav__menu *), html.menu-instant .mn__link::before { transition: none !important; }

/* a mouse: the lines rest dim and answer the pointer (a keyboard gets the same on focus) */
@media (hover: hover) and (pointer: fine) {
  .mn__head { color: var(--muted); transition: color .5s ease; }
  .mn__sub, .mn__num { color: var(--muted); }
  .mn__link[aria-current="page"] :is(.mn__head, .mn__num) { color: var(--bone-dim); }
  .mn__link:is(:hover, :focus-visible) :is(.mn__head, .mn__sub, .mn__num) { color: var(--bone); }
  .mn__link:is(:hover, :focus-visible)::before { background-color: var(--bone); }
  .mn__link:focus-visible { outline: none; }
  /* the word steps left at once, and its letters come back to it one by one */
  .mn__w { transition: transform 1s var(--ease-spring); }
  .mn__c { transition: transform 1s var(--ease-spring) calc(250ms + var(--i) * 75ms); }
  .mn__link:is(:hover, :focus-visible) .mn__w { transform: translate3d(calc(var(--mn-shift) * -1), 0, 0); }
  .mn__link:is(:hover, :focus-visible) .mn__c { transform: translate3d(var(--mn-shift), 0, 0); }
  /* the page's own print swings in under the words; menu.js moves its frame with the pointer */
  .mn__fig { display: block; position: absolute; left: 50%; top: 50%; z-index: 0; width: var(--mn-img); pointer-events: none; }
  .mn__fig img { display: block; width: 100%; height: auto; opacity: 0; transform: translate(-10%, -50%) scale(.3) rotate(-12.5deg);
    filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .55)); transition: transform 1s var(--ease-spring), opacity .22s ease-out; }
  .mn__link:is(:hover, :focus-visible) .mn__fig img { opacity: 1; transform: translate(-10%, -50%) scale(1) rotate(12.5deg); }
  .mn__go svg { opacity: 0; transform: translate3d(100%, 0, 0); transition: transform 1s var(--ease-spring), opacity .3s ease-out; }
  .mn__link:is(:hover, :focus-visible) .mn__go svg { opacity: 1; transform: none; }
  .mn__foot a:hover { color: var(--bone); }
}
/* a finger: everything is already lit, so a press dims the line it lands on */
@media (hover: none) {
  .mn__link:active :is(.mn__head, .mn__go) { color: var(--muted); }
}
/* reduced motion: the words and the rules are simply there, the colour still
   answers, and the print fades in where it stands */
@media (prefers-reduced-motion: reduce) {
  .mn__rise, .mn__link::before { transform: none; }
  .nav__menu-label > span, .nav__menu-icon i { transition: none; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: reduce) {
  .mn__link:is(:hover, :focus-visible) :is(.mn__w, .mn__c) { transform: none; }
  .mn__fig img, .mn__link:is(:hover, :focus-visible) .mn__fig img { transform: translate(-10%, -50%) rotate(4deg); transition: opacity .3s ease; }
  .mn__go svg, .mn__link:is(:hover, :focus-visible) .mn__go svg { transform: none; transition: opacity .3s ease; }
}

/* ------------------------------------------------------------------- rail */
.rail { position: fixed; right: var(--pad); top: 50%; z-index: 40; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.rail__num { font-size: 10px; font-weight: 600; letter-spacing: .2em; font-variant-numeric: tabular-nums; color: var(--bone); }
.rail__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 0; }
.rail button { display: flex; align-items: center; justify-content: flex-end; width: 40px; height: 22px; }
.rail button i { display: block; height: 1px; width: 10px; background: var(--muted); transition: width .3s var(--ease-out), background-color .2s linear; }
.rail button[aria-current="true"] i { width: 22px; background: var(--bone); }
@media (hover: hover) and (pointer: fine) {
  .rail button:hover i { width: 16px; background: var(--bone-dim); }
  .rail button[aria-current="true"]:hover i { width: 22px; }
}

/* ------------------------------------------------------------ drag control */
.drag {
  position: fixed; left: var(--pad); bottom: calc(clamp(20px, 4.6vh, 44px) + env(safe-area-inset-bottom, 0px)); z-index: 40;
  display: flex; align-items: center; gap: 16px; padding: 6px 6px 6px 0; user-select: none; -webkit-user-select: none;
}
.drag__ring { position: relative; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%;
  display: grid; place-items: center; transition: border-color .2s linear, transform .12s var(--ease-out); }
.drag__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--bone);
  transform: translate3d(var(--dx, 0px), var(--dy, 0px), 0); transition: transform .5s var(--ease-out); }
html.is-dragging .drag__dot { transition: none; }
.drag__label { font-size: 9.5px; font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--bone-dim);
  transition: opacity .3s linear, transform .4s var(--ease-out); }
/* "Drag" for a mouse, "Swipe" for a finger: name the gesture the hand makes */
.drag__label .l-touch { display: none; }
@media (pointer: coarse) { .drag__label .l-touch { display: inline; } .drag__label .l-fine { display: none; } }
.drag__line { width: 54px; height: 1px; background: var(--line); transform-origin: 0 50%; transition: opacity .3s linear, transform .5s var(--ease-out); }
.drag:active .drag__ring { transform: scale(.94); }
html.is-dragging .drag__ring { border-color: var(--bone); }
.drag { transition: opacity .3s linear, visibility .3s; }
.drag.is-away { opacity: 0; visibility: hidden; }
.drag.is-compact .drag__label, .drag.is-compact .drag__line { opacity: 0; transform: translateX(-6px); pointer-events: none; }
.drag.is-compact .drag__line { transform: scaleX(0); }
@media (hover: hover) and (pointer: fine) {
  .drag:hover .drag__ring { border-color: var(--bone-dim); }
}

/* ------------------------------------------------------------------ labels */
.net-labels { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.net-labels span {
  position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0;
  font-size: 9.5px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--bone);
  padding: 5px 9px; border: 1px solid var(--line-soft); background: rgba(8, 8, 10, .55);
  will-change: transform, opacity;
}
.net-labels span[data-node="hub"] { border-color: var(--line); }

/* ---------------------------------------------------------------- type */
.display { font-family: var(--serif); font-weight: 400; font-stretch: 100%; letter-spacing: -0.012em; margin: 0;
  text-wrap: balance; }
.hero__title { font-size: clamp(36px, 3.1vw, 60px); line-height: .98; }
.h2 { font-size: clamp(30px, 3.2vw, 56px); line-height: 1.02; max-width: 13ch; }
.h2--statement { max-width: 18ch; margin-inline: auto; text-align: center; font-size: clamp(30px, 3.5vw, 62px); }
.body { font-size: clamp(15px, 1.06vw, 17px); line-height: 1.62; color: var(--bone-dim); max-width: 42ch; margin: 22px 0 0; letter-spacing: .005em; }
.meta { display: flex; gap: 28px; margin: 30px 0 0; padding-top: 16px; border-top: 1px solid var(--line-soft); max-width: 42ch;
  font-size: 10px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--bone); }

/* ------------------------------------------------------------------ page */
.page { position: relative; z-index: 2; pointer-events: none; }
.page a, .page button, .page .copy > :not(.scrim), .page .hero__copy { pointer-events: auto; }
.act { position: relative; padding: 0 var(--pad); overflow: hidden; overflow: clip; }
.act--hero { min-height: 100vh; min-height: 100svh; }
.act--brief { min-height: 140vh; display: flex; align-items: center; }
.act--creators { min-height: 140vh; display: flex; align-items: center; justify-content: flex-end; }
.act--network { min-height: 180vh; }
.network__hold { height: 1px; }
/* the ask is long enough for the collage to be drawn into the emblem at a
   readable pace; the copy still lands in the middle of the last screen */
.act--join { min-height: 150vh; display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: max(110px, calc(50vh - 150px)); }

.hero__copy { position: absolute; left: var(--pad); top: calc(var(--nav-h) + clamp(4px, 2.2vh, 26px)); z-index: 2; }
.hero__num { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font-size: 10px; font-weight: 600; letter-spacing: .2em; color: var(--bone-dim); }
.hero__num::after { content: ''; position: absolute; left: 0; top: calc(100% - 4px); width: 22px; height: 1px; background: var(--bone-dim); }
.hero__num { position: relative; padding-bottom: 10px; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.hero__title .line > span { display: block; }
.hero__cta { position: absolute; right: var(--pad); bottom: calc(clamp(20px, 4.6vh, 44px) + env(safe-area-inset-bottom, 0px)); z-index: 2; }

.cta {
  display: inline-flex; align-items: center; gap: 18px; height: 44px; padding: 0 20px;
  border: 1px solid var(--line); color: var(--bone);
  font-size: 9.5px; font-weight: 650; letter-spacing: var(--track-label); text-transform: uppercase; white-space: nowrap;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, transform .12s var(--ease-out);
}
.cta svg { width: 16px; height: 10px; transition: transform .2s var(--ease-out); }
.cta:active { transform: scale(.97); }
.cta--solid { background: var(--bone); color: var(--ink); border-color: var(--bone); }
@media (hover: hover) and (pointer: fine) {
  .cta:hover { border-color: var(--bone); background: rgba(236, 230, 216, .08); }
  .cta--solid:hover { background: #fffaf0; }
  .cta:hover svg { transform: translateX(3px); }
}

.copy { position: relative; max-width: 560px; }
.copy--trail { margin-right: clamp(56px, 7vw, 120px); }
/* The peak's one line holds still over the finished network (scroll-windowed
   opacity from app.js) instead of scrolling across it. */
.copy--centre { position: fixed; left: 50%; bottom: calc(clamp(64px, 11vh, 120px) + env(safe-area-inset-bottom, 0px));
  width: min(820px, 88vw); max-width: none; margin: 0; text-align: center; z-index: 3; opacity: 0; visibility: hidden;
  transform: translate3d(-50%, 2vh, 0); }
.no-js .copy--centre, .no-webgl .copy--centre { position: relative; left: auto; bottom: auto; transform: none; opacity: 1; visibility: visible; margin: 40vh auto 0; }
.copy--join { max-width: 620px; }
.scrim { position: absolute; z-index: -1; pointer-events: none; }
.scrim--lead { inset: -30% -40% -30% -60%; background: radial-gradient(closest-side, rgba(8, 8, 10, .78), rgba(8, 8, 10, .5) 55%, rgba(8, 8, 10, 0)); }
.scrim--trail { inset: -30% -60% -30% -40%; background: radial-gradient(closest-side, rgba(8, 8, 10, .78), rgba(8, 8, 10, .5) 55%, rgba(8, 8, 10, 0)); }
.scrim--band { inset: -60% -30%; background: radial-gradient(closest-side, rgba(8, 8, 10, .72), rgba(8, 8, 10, .4) 60%, rgba(8, 8, 10, 0)); }
.paths { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 34px; }
.paths .cta { min-width: 272px; justify-content: space-between; }
.foot { position: absolute; left: var(--pad); right: var(--pad); bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.foot a { transition: color .16s ease; }
/* on a touch screen each footer link is a 44px row (the last section makes room: see the end of the file) */
@media (pointer: coarse) { .foot { row-gap: 0; } .foot > * { display: inline-flex; align-items: center; min-height: 44px; } }
@media (hover: hover) and (pointer: fine) { .foot a:hover { color: var(--bone); } }

.wordmark-fallback { display: none; }
.no-webgl .wordmark-fallback {
  display: block; position: absolute; left: 0; right: 0; bottom: 9vh; margin: 0; text-align: center; pointer-events: none;
  font-family: var(--sans); font-weight: 900; font-stretch: 112.5%; font-size: clamp(64px, 11.5vw, 200px); line-height: .9; color: var(--bone);
}
.no-webgl .wordmark-fallback span { display: block; margin-top: 18px; font-size: 13px; font-weight: 700; font-stretch: 100%; letter-spacing: .9em; padding-left: .9em; }
.no-webgl .drag, .no-webgl #gl { display: none; }

/* -------------------------------------------------------- text in motion */
/* (text-motion.js) words and letters that can move on their own; each line
   of a rising or sliding text is its own mask */
.tm-w { display: inline-block; white-space: nowrap; }
.tm-c { display: inline-block; }
.tm-l { display: block; overflow: hidden; padding: .1em 0 .12em; margin: -.1em 0 -.12em; }
.js .tm-rise .tm-c { transform: translate3d(0, 112%, 0) rotate(6deg); opacity: 0; transform-origin: 0 100%; }
.js .tm-rise.is-in .tm-c { transform: none; opacity: 1;
  transition: transform .95s var(--ease-out) calc(var(--tm-delay, 0ms) + var(--i, 0) * 16ms), opacity .45s ease calc(var(--tm-delay, 0ms) + var(--i, 0) * 16ms),
    translate .35s var(--ease-out), scale .35s var(--ease-out), -webkit-text-stroke-width .35s ease; }
.js .tm-lines .tm-w { transform: translate3d(0, 115%, 0); }
.js .tm-lines.is-in .tm-w { transform: none; transition: transform 1s var(--ease-out) calc(var(--tm-delay, 0ms) + var(--l, 0) * 90ms); }
/* an icon in a line (an arrow after a link) comes up with it */
.js .tm-lines .tm-l svg { translate: 0 160%; }
.js .tm-lines.is-in .tm-l svg { translate: 0 0; transition: translate 1s var(--ease-out) calc(var(--tm-delay, 0ms) + var(--l, 0) * 90ms + 90ms); }
/* a decoding text is unseen until its letters start to run */
.js .tm-decode:not(.is-running):not(.is-done) .tm-c { opacity: 0; }
.tm-fill .tm-w { opacity: calc(.14 + var(--f, 0) * .86); }
.tm-fill.is-full .tm-w { opacity: 1; }
.tm-press .tm-c { translate: 0 calc(var(--p, 0) * -0.06em); scale: calc(1 + var(--p, 0) * .07); -webkit-text-stroke: calc(var(--p, 0) * 1.3px) currentColor; }
.tm-converge [data-part] { display: inline-block; will-change: transform; }
.tm-assemble .tm-c { will-change: transform, opacity; }
/* a figure whose digits roll into place */
.od { display: inline-flex; align-items: flex-start; }
.od-d { display: inline-block; height: 1em; overflow: hidden; }
.od-s { display: flex; flex-direction: column; transition-property: transform; transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
.od-s > span { display: block; height: 1em; line-height: 1; }
.od-x { opacity: 0; transition: opacity .5s ease; }
.is-rolled .od-x { opacity: 1; }

/* ---------------------------------------------------------------- motion */
/* Reveals are opt-in once JS runs; without JS everything is simply there. */
.js [data-reveal] { opacity: 0; transform: translate3d(0, 18px, 0); }
.js [data-reveal].is-in { opacity: 1; transform: none;
  transition: opacity .7s var(--ease-out) var(--d, 0ms), transform .9s var(--ease-out) var(--d, 0ms); }
.js .hero__title .line > span { transform: translate3d(0, 108%, 0); }
.js .hero__num, .js .hero__cta, .js .nav, .js .rail, .js .drag { opacity: 0; }
.intro .hero__title .line > span { transform: none; transition: transform 1.1s var(--ease-out) calc(var(--i) * 85ms + 520ms); }
.intro .hero__num, .intro .nav, .intro .rail, .intro .drag, .intro .hero__cta { opacity: 1; transition: opacity .8s linear 1.05s; }
.intro .hero__cta { transition-delay: 1.2s; }
.intro.intro-done .hero__num, .intro.intro-done .hero__cta, .intro.intro-done .nav, .intro.intro-done .rail, .intro.intro-done .drag { transition: opacity .4s linear; }
.intro.intro-done .nav { transition: transform .5s var(--ease-out), opacity .4s linear; }
/* arriving from another STARS page: the nav was already on screen (it holds
   still through the page change), and the collage is already in the cache */
.js.arrived .nav { opacity: 1; transition: transform .5s var(--ease-out); }
.arrived .pre { display: none; }

@media (prefers-reduced-motion: reduce) {
  .nav__sound[aria-pressed="true"] i { animation: none; transform: scaleY(.7); }
  .js [data-reveal] { transform: none; }
  .js [data-reveal].is-in { transition: opacity .4s linear; }
  .js .hero__title .line > span { transform: none; opacity: 0; }
  .intro .hero__title .line > span { opacity: 1; transition: opacity .6s linear .2s; }
  .drag__dot { transition: none; }
}

/* --------------------------------------------------------------- phones */
@media (max-width: 760px) {
  .nav { gap: 12px; }
  .nav__links { gap: 14px; }
  .nav__links a { font-size: 8.5px; letter-spacing: .18em; }
  .nav__brand { font-size: 9.5px; letter-spacing: .2em; }
  /* after the hero the orbit control steps aside on a phone: the copy owns the bottom edge */
  .drag.is-compact { opacity: 0; visibility: hidden; }
  .hero__title { font-size: clamp(34px, 9.4vw, 44px); }
  .rail { display: none; }
  .hero__cta { right: var(--pad); height: 42px; padding: 0 14px; gap: 12px; }
  .drag { gap: 12px; }
  .drag__line { display: none; }
  .drag__label .l-long { display: none; }
  .copy--trail { margin-right: 0; }
  .act--creators { justify-content: flex-start; }
  .act--brief, .act--creators { align-items: flex-end; padding-bottom: 14vh; }
  .h2 { font-size: clamp(28px, 8vw, 38px); }
  .scrim--lead, .scrim--trail { inset: -40% -20%; }
  .paths { align-items: stretch; }
  .paths .cta { min-width: 0; justify-content: space-between; }
  .act--join { justify-content: flex-end; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .copy--centre { bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
  .h2--statement { font-size: clamp(26px, 7.4vw, 34px); }
  .foot { gap: 8px 18px; font-size: 9px; }
}
@media (max-width: 760px) {
  .no-webgl .wordmark-fallback { bottom: calc(118px + env(safe-area-inset-bottom, 0px)); font-size: 21vw; }
  .no-webgl .wordmark-fallback span { margin-top: 12px; font-size: 11px; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .hero__title { font-size: 32px; }
}

/* ---------------------------------------------------- short landscape */
/* A phone on its side: every block keeps its place, just smaller, so the
   network still has the middle of the frame. */
@media (orientation: landscape) and (max-height: 520px) {
  .hero__title { font-size: clamp(26px, 7.2vh, 36px); }
  .copy--centre { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .h2--statement { font-size: clamp(20px, 5.6vh, 26px); max-width: 30ch; }
  .net-labels span { font-size: 8px; padding: 3px 7px; letter-spacing: .22em; }
  .h2 { font-size: clamp(24px, 7vh, 34px); }
  .body { font-size: 14px; margin-top: 12px; }
}
@media (max-width: 400px) {
  /* small phones: four links and the brand share one row; the brand keeps STARS */
  .nav__brand span { display: none; }
  .nav__links { gap: 13px; }
  /* with the menu there is one button beside the brand, so it keeps its name */
  .js .nav__brand span { display: inline; }
}
@media (max-width: 760px) {
  .js .nav__menu { margin-left: 20px; gap: 10px; font-size: 9.5px; letter-spacing: .2em; }
  .mn { --mn-size: clamp(34px, 10.6vw, 46px); --mn-py: clamp(12px, 2vh, 18px); --mn-num: 34px; }
  .mn__sub { font-size: 9px; letter-spacing: .16em; }
  .mn__go { padding: 8px 0 8px 12px; }
  .mn__go svg { width: 22px; }
  .mn__foot { gap: 0 20px; font-size: 9px; letter-spacing: .16em; }
  .mn__foot a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .mn { --mn-size: clamp(26px, 8.6vh, 38px); --mn-py: 8px; }
  .mn__sub { margin-top: 4px; }
}

/* ------------------------------------------------------------ the emblem */
/* The homepage ending: a hit area laid over the 3D emblem each frame. The
   emblem is the thing on show, so the button draws nothing but its focus
   ring and a one-line hint. */
.emblem {
  position: fixed; left: 0; top: 0; width: 1px; height: 1px; z-index: 4; border-radius: 50%;
  visibility: hidden; opacity: 0; touch-action: pan-y; cursor: grab;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: opacity .5s var(--ease-out), visibility 0s linear .5s;
}
.emblem.is-on { visibility: visible; opacity: 1; transition: opacity .6s var(--ease-out) .15s, visibility 0s; }
html.is-dragging .emblem { cursor: grabbing; }
.emblem:focus-visible { outline: 1px solid var(--line); outline-offset: 10px; }
.emblem__hint {
  position: absolute; left: 50%; top: 100%; transform: translate(-50%, 18px); white-space: nowrap; pointer-events: none;
  font-size: 9.5px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--bone-dim);
  transition: opacity .4s linear;
}
.emblem.is-played .emblem__hint { opacity: .55; }
@media (max-width: 760px) { .emblem__hint { font-size: 8.5px; letter-spacing: .2em; transform: translate(-50%, 10px); } }

/* ------------------------------------------------------ page transitions */
/* Moving between pages dissolves one into the next through the ink, with the
   nav held still across the change. Browsers without cross-document view
   transitions get the arrival half (page.js / app.js mark them). */
@view-transition { navigation: auto; }
.nav { view-transition-name: nav; }
::view-transition-old(root) { animation: vt-out .26s var(--ease-out) both; }
::view-transition-new(root) { animation: vt-in .5s var(--ease-out) both; }
::view-transition-group(nav) { animation-duration: .3s; }
@keyframes vt-out { to { opacity: 0; filter: blur(3px); transform: scale(.992); } }
@keyframes vt-in { from { opacity: 0; filter: blur(3px); transform: scale(1.008); } }
.vt-fallback body { animation: vt-arrive .5s var(--ease-out) both; }
@keyframes vt-arrive { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root) { animation: vt-fade-out .18s linear both; }
  ::view-transition-new(root) { animation: vt-fade-in .24s linear both; }
  @keyframes vt-fade-out { to { opacity: 0; } }
  @keyframes vt-fade-in { from { opacity: 0; } }
}

/* a touch phone's footer has 44px rows, so the last section leaves it room */
@media (max-width: 760px) and (pointer: coarse) {
  .act--join { padding-bottom: calc(200px + env(safe-area-inset-bottom, 0px)); }
}
