/*
 * HapticWear Live: layout, scenes and states.
 *
 * Every size is in rem, and 1 rem is a tenth of the film's 1920 x 1080 grid scaled to the window
 * (10 px on a 1080p screen, 13.3 px on a 27" iMac), so the composition is the same on any display.
 * Phones and tall screens get their own arrangement at the end of this file.
 *
 * Scenes are layers that only toggle visibility; their children animate themselves. No ancestor of a
 * glass panel is ever semi-transparent, because that would cut its backdrop blur off.
 */

*, *::before, *::after { box-sizing: border-box; }
html { font-size: min(calc(100vw / 192), calc(100vh / 108)); }
html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden; overscroll-behavior: none; }
body {
  color: var(--txt);
  font-family: var(--mono);
  font-size: 1.2rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
button:focus { outline: none; }
button:focus-visible, [tabindex]:focus-visible { outline: 1px solid rgba(255, 255, 255, 0.55); outline-offset: 0.5rem; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
body.hide-cursor, body.hide-cursor * { cursor: none !important; }

.gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; background: var(--bg); }
.no-gl .gl { visibility: hidden; }
/* Without WebGL the film's still of the vest stands in, and the frame keeps a warm pool of light. */
.still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.no-gl::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 55% at 50% 48%, rgba(206, 200, 188, 0.08), rgba(9, 9, 11, 0) 70%); }

.scene { position: fixed; inset: 0; z-index: 2; visibility: hidden; pointer-events: none; }
.is-landing #landing, .is-shatter #landing, .is-reverse #landing,
.is-phones #phones,
.is-choice #choice, .is-fall #choice,
.is-fall #dashboard, .is-dash #dashboard, .is-expanded #dashboard, .is-reverse #dashboard,
.is-expanded #expanded { visibility: visible; }
.is-landing #landing, .is-phones #phones, .is-choice #choice, .is-dash #dashboard, .is-expanded #expanded { pointer-events: auto; }

/* ------------------------------------------------------------------ glass */

.glass {
  position: relative; border-radius: 1.6rem;
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.08); backdrop-filter: blur(var(--blur)) saturate(1.08);
  box-shadow: 0 4rem 9rem -3rem rgba(0, 0, 0, 0.75), 0 0.3rem 1.2rem rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
/* a bright hairline edge, strongest along the top, like a sheet catching the light */
.glass::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.07) 28%, rgba(255, 255, 255, 0.035) 62%, rgba(255, 255, 255, 0.13));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* The lite tier (a slow machine) and browsers without backdrop blur: solid dark sheets. */
.is-lite .glass, .is-lite .spec-head { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--glass-solid); }
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass, .spec-head { background: var(--glass-solid); }
}

/* ------------------------------------------------------------------ type */

.wordmark { font-family: var(--jost); white-space: nowrap; line-height: 1; margin: 0; }
.wordmark .wm-a, .wordmark .h { font-weight: 400; color: var(--white); }
.wordmark .wm-b, .wordmark .w { font-weight: 250; color: var(--sec); }
.tag { display: inline-block; font-family: var(--mono); font-size: 1.05rem; letter-spacing: 0.16em; color: var(--txt);
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 0.5rem; padding: 0.25rem 0.6rem 0.2rem; white-space: nowrap; }

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 1rem;
  font-family: var(--mono); font-size: 1.15rem; letter-spacing: 0.24em; white-space: nowrap; color: var(--txt);
  height: 3.8rem; padding: 0 1.8rem; border-radius: 99rem; border: 1px solid rgba(255, 255, 255, 0.12);
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.pill svg { width: 1.5rem; height: 1.5rem; }
.pill:hover { color: var(--white); border-color: rgba(255, 255, 255, 0.4); }
.pill--hot { color: var(--bg); background: var(--white); border-color: var(--white); }
.pill--hot:hover { color: var(--bg); background: var(--sec); }
.pill.is-on { color: var(--white); border-color: rgba(255, 255, 255, 0.86); }
.link { font-family: var(--mono); font-size: 1.15rem; letter-spacing: 0.2em; color: var(--txt); border-bottom: 1px solid #333; padding-bottom: 2px; }
.link:hover { color: var(--white); border-color: var(--white); }
.back { display: inline-flex; align-items: center; gap: 1.2rem; padding: 1rem 0.2rem; font-size: 1.15rem; letter-spacing: 0.28em; color: var(--txt); transition: color 0.3s; }
.back::before { content: ''; width: 2.2rem; height: 1px; background: currentColor; transition: width 0.4s var(--out); }
.back:hover { color: var(--white); }
.back:hover::before { width: 3.6rem; }

/* ------------------------------------------------------------------ landing: the title sequence */

.landing__vest { position: absolute; inset: 4% 8% 14%; pointer-events: none; }
.landing__scrim { position: absolute; left: 50%; top: 46%; width: 160rem; height: 82rem; transform: translate(-50%, -50%); pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, rgba(9, 9, 11, 0.74), rgba(9, 9, 11, 0.44) 55%, rgba(9, 9, 11, 0)); }
.titles { position: absolute; left: 0; right: 0; top: 43%; transform: translateY(-50%); text-align: center; pointer-events: none; }
.wordmark--hero { font-size: 12.4rem; display: flex; justify-content: center; text-shadow: 0 0 0.6em rgba(9, 9, 11, 0.55); }
.wordmark--hero i { font-style: normal; display: inline-block; margin: 0 0.16em; opacity: 0; }
.tagline { margin: 1.9em 0 0; font: 400 2.9rem/1 var(--jost); letter-spacing: 0.7em; padding-left: 0.7em; color: var(--sec); opacity: 0; white-space: nowrap;
  text-shadow: 0 0 0.5em rgba(9, 9, 11, 0.95), 0 0 1.4em rgba(9, 9, 11, 0.85); }
/* the client's name, big and in capitals: the film's credit */
.byline { margin: 1.25em 0 0; font: 400 5rem/1 var(--jost); letter-spacing: 0.3em; padding-left: 0.3em; color: var(--white); opacity: 0; white-space: nowrap;
  text-shadow: 0 0 0.5em rgba(9, 9, 11, 0.9), 0 0 1.2em rgba(9, 9, 11, 0.7); }
.landing.is-title .landing__scrim { animation: fade 3.2s ease 0.1s both; }
.landing.is-title .wordmark--hero i { animation: resolve 3.4s cubic-bezier(0.22, 0.61, 0.36, 1) both; animation-delay: calc(0.2s + var(--d) * 1s); }
.landing.is-title .tagline { animation: tagIn 2.2s var(--out) 1.9s both; }
.landing.is-title .byline { animation: card 1.9s var(--out) 2.6s both; }
.landing.is-title .start { animation: fade 1.4s var(--out) 3.5s both; }
.landing.is-title .start-pool { animation: fade 1.6s ease 3.3s both; }
@keyframes resolve {
  0% { opacity: 0; transform: translateX(var(--dx)); filter: blur(22px); }
  30% { opacity: 0.8; }
  100% { opacity: 1; transform: translateX(0); filter: blur(0); }
}
@keyframes tagIn {
  0% { opacity: 0; letter-spacing: 1.15em; padding-left: 1.15em; filter: blur(9px); }
  100% { opacity: 1; letter-spacing: 0.7em; padding-left: 0.7em; filter: blur(0); }
}
@keyframes card { 0% { opacity: 0; filter: blur(10px); transform: translateY(0.45em); } 100% { opacity: 1; filter: blur(0); transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

/* START: a hairline capsule with a point of light travelling its border. */
.start-wrap { position: absolute; left: 50%; bottom: 13.5%; transform: translateX(-50%); }
.start-pool { position: absolute; left: 50%; top: 50%; width: 280%; height: 340%; transform: translate(-50%, -50%); pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, rgba(9, 9, 11, 0.62), rgba(9, 9, 11, 0.3) 55%, rgba(9, 9, 11, 0)); }
.start { position: relative; display: grid; place-items: center; opacity: 0; width: 33rem; height: 8.8rem; border-radius: 99rem; transform-origin: 50% 50%; }
.start__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.start__svg path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.start__edge { stroke: rgba(255, 255, 255, 0.44); stroke-width: 1; }
.start__t2 { stroke: rgba(255, 255, 255, 0.32); stroke-width: 1.3; }
.start__t1 { stroke: rgba(255, 255, 255, 0.82); stroke-width: 1.7; }
.start__head { stroke: #fff; stroke-width: 3; }
.start__glass { position: absolute; inset: 0; border-radius: inherit; opacity: 0.45; pointer-events: none;
  background: radial-gradient(120% 140% at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.035) 60%);
  -webkit-backdrop-filter: blur(16px) saturate(120%); backdrop-filter: blur(16px) saturate(120%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -1px 0 rgba(255, 255, 255, 0.04), 0 2.4rem 6rem -2.4rem rgba(0, 0, 0, 0.8);
  transition: opacity 0.6s var(--out); }
.start__label { position: relative; font: 300 2.1rem/1 var(--jost); letter-spacing: 0.66em; padding-left: 0.66em; color: #fff;
  transition: letter-spacing 0.8s var(--out), padding 0.8s var(--out), opacity 0.25s; }
.start:hover .start__glass, .start:focus-visible .start__glass { opacity: 1; }
.start:hover .start__label, .start:focus-visible .start__label { letter-spacing: 0.52em; padding-left: 0.52em; }
.start:hover .start__edge { stroke: rgba(255, 255, 255, 0.7); }
.start:focus-visible { outline: none; }
.start.is-pressed .start__label { opacity: 0; }
.start.is-pressed .start__glass { opacity: 1; }

/* the bloom through white */
.bloom { position: fixed; left: 0; top: 0; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; z-index: 20; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, #fff 0%, #fff 38%, rgba(255, 255, 255, 0.55) 62%, rgba(255, 255, 255, 0)); }
.white { position: fixed; inset: 0; background: #fff; opacity: 0; z-index: 21; pointer-events: none; }

/* ------------------------------------------------------------------ "Put on the headphones." */

.phones { display: grid; place-items: center; text-align: center; padding: 2.4rem; cursor: default; }
.phones__line { margin: 0; font: 300 7.2rem/1.2 var(--jost); letter-spacing: 0.05em; color: var(--sec); opacity: 0; }
.phones.is-play .phones__line { animation: inter 4.2s linear both; }
@keyframes inter {
  0% { opacity: 0; filter: blur(12px); letter-spacing: 0.16em; animation-timing-function: var(--out); }
  24% { opacity: 1; filter: blur(0); letter-spacing: 0.05em; animation-timing-function: linear; }
  76% { opacity: 1; filter: blur(0); letter-spacing: 0.042em; animation-timing-function: var(--io); }
  100% { opacity: 0; filter: blur(8px); letter-spacing: 0.036em; }
}

/* ------------------------------------------------------------------ the choice */

.choice { display: flex; align-items: center; justify-content: center; gap: 4rem; padding: 7.2rem; }
.choice-card {
  flex: 0 1 auto; width: 64rem; height: min(72rem, 78vh); border-radius: 3rem; padding: 5rem;
  display: flex; flex-direction: column; justify-content: space-between; text-align: left; opacity: 0; overflow: hidden;
  transition: translate 0.8s var(--out), box-shadow 0.8s var(--out);
}
.choice-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22); transition: opacity 0.5s; }
.choice-card:hover, .choice-card:focus-visible, .choice-card.is-hot { translate: 0 -0.6rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 5rem 11rem -3.4rem rgba(0, 0, 0, 0.9); }
.choice-card:hover::after, .choice-card:focus-visible::after, .choice-card.is-hot::after { opacity: 1; }
.choice-card:focus-visible { outline: none; }
.card-k { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 1.2em; font: 400 2.2rem/1.4 var(--mono); letter-spacing: 0.18em; color: var(--sec); }
.card-k b { font-weight: 400; color: var(--white); }
.card-viz { position: absolute; left: 0; top: 13%; width: 100%; height: 52%; pointer-events: none; display: block; }
.card-t { position: relative; z-index: 1; margin: 0; font: 300 8.6rem/0.98 var(--jost); letter-spacing: 0.012em; color: var(--white); }
.card-t span { display: block; }
.choice.is-in .choice-card { animation: rise 1.2s var(--out) both; animation-delay: calc(0.12s + var(--i) * 0.16s); }
/* glass never carries a filter (WebKit drops backdrop-filter on an element that has one) */
@keyframes rise { 0% { opacity: 0; transform: translateY(4.6rem) scale(0.975); } 100% { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ dashboard (glass over the vest) */

.dash {
  display: grid; grid-template-columns: 40rem minmax(0, 1fr) 40rem; grid-template-rows: auto minmax(0, 1fr) 28rem;
  gap: 2rem; padding: 3.2rem 4rem 4rem;
}
.d-top { grid-column: 1 / -1; grid-row: 1; display: flex; align-items: center; gap: 2.6rem; min-height: 3.8rem; position: relative; z-index: 2; }
.wordmark--small { font-size: 2.7rem; letter-spacing: 0.2em; }
.live { display: flex; align-items: center; gap: 1rem; font-size: 1.2rem; letter-spacing: 0.26em; color: var(--white); }
.live__dot { width: 0.8rem; height: 0.8rem; border-radius: 50%; background: #fff; box-shadow: 0 0 1rem rgba(255, 255, 255, 0.8); }
.live.is-off { color: var(--txt); }
.live.is-off .live__dot { background: #444; box-shadow: none; }
.d-top__right { margin-left: auto; display: flex; align-items: center; gap: 2.4rem; }
.d-col { display: flex; flex-direction: column; gap: 2rem; min-height: 0; position: relative; z-index: 2; }
.d-left { grid-column: 1; grid-row: 2; }
.d-right { grid-column: 3; grid-row: 2; }
.vest-slot { grid-column: 2; grid-row: 2; position: relative; margin: -2rem -4rem 0; cursor: zoom-in; border-radius: 2rem; z-index: 1; }
.vest-slot:focus-visible { outline-offset: -1rem; }
.slot-hint { position: absolute; left: 50%; bottom: 0.4rem; transform: translateX(-50%); display: flex; align-items: center; gap: 0.9rem;
  font-size: 1.05rem; letter-spacing: 0.28em; color: var(--mut); transition: color 0.3s; white-space: nowrap; }
.slot-hint svg { width: 1.4rem; height: 1.4rem; }
.vest-slot:hover .slot-hint { color: var(--sec); }
.g-spec { grid-column: 1 / -1; grid-row: 3; position: relative; z-index: 2; display: flex; flex-direction: column; border-radius: 1.6rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0) 40%);
  box-shadow: 0 4rem 9rem -3rem rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
/* the spectrum sheet's hairline fades out down its sides, so no grey edge runs under the HIGH glow */
.g-spec::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.07) 26%, rgba(255, 255, 255, 0.02) 80%, rgba(255, 255, 255, 0));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }

.p { padding: 2.1rem 2.4rem; }
.p-lbl { display: flex; justify-content: space-between; gap: 1.2rem; font-size: 1.15rem; letter-spacing: 0.24em; color: var(--txt); }
.p-lbl .dim { color: var(--mut); }

/* entrance: each panel scans in, once the choice has cleared (B's scan, delayed by --d) */
.dash { --d0: 0.6s; }
.dash .enter { opacity: 0; transform: translateY(1.4rem); clip-path: inset(0 100% 0 0 round 1.6rem);
  transition: opacity 0.5s var(--io), transform 0.6s var(--io), clip-path 0.6s var(--io); }
.dash.is-in .enter { opacity: 1; transform: none; clip-path: inset(-2rem -2rem -2rem -2rem round 1.6rem);
  transition: opacity 0.8s var(--io) calc(var(--d0) + var(--d, 0s)), transform 1s var(--out) calc(var(--d0) + var(--d, 0s)),
    clip-path 1.1s cubic-bezier(0.62, 0.04, 0.24, 1) calc(var(--d0) + var(--d, 0s)); }
.dash .slot-hint { opacity: 0; transition: opacity 0.6s; }
.dash.is-in .slot-hint { opacity: 1; transition: opacity 1s 2.2s; }
/* meters light only once their sheet is fully opaque */
.dash .band .t i { opacity: 0; }
.dash.is-in .band .t i { opacity: 1; transition: opacity 0.45s var(--io) calc(var(--d0) + var(--d, 0s) + 0.8s); }

/* source */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 1.4rem; }
.seg .src { border-radius: 0.9rem; padding: 1.1rem 0.8rem; font-size: 1.1rem; letter-spacing: 0.14em; color: var(--txt); text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.02); line-height: 1.35;
  transition: color 0.3s, border-color 0.3s, background 0.3s; }
.seg .src:hover { color: var(--white); border-color: rgba(255, 255, 255, 0.2); }
.seg .src[aria-pressed='true'] { color: var(--bg); background: var(--white); border-color: var(--white); }
.now { margin-top: 1.6rem; display: flex; flex-direction: column; gap: 0; }
.now-t { font: 300 2.4rem/1.15 var(--jost); letter-spacing: 0.02em; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the credit and licence always show completely: they wrap instead of being cut */
.now-c { margin-top: 0.7rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; font-size: 1.1rem; line-height: 1.45; letter-spacing: 0.12em; color: var(--txt); }
.trans { display: flex; align-items: center; gap: 0.8rem; margin-top: 1.4rem; }
.ib { width: 3.6rem; height: 3.6rem; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.14); transition: border-color 0.3s, background 0.3s; }
.ib:hover { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.05); }
.ib svg { width: 1.4rem; height: 1.4rem; }
.ib--play { width: 4.2rem; height: 4.2rem; border-color: rgba(255, 255, 255, 0.3); }
.ib--play svg { width: 1.6rem; height: 1.6rem; }
.ib--play .i-pause, .is-playing .ib--play .i-play { display: none; }
.is-playing .ib--play .i-pause { display: block; }
.ib--small { width: 3.2rem; height: 3.2rem; }
.prog { flex: 1; height: 1px; background: rgba(255, 255, 255, 0.12); position: relative; margin-left: 0.6rem; }
.prog i { position: absolute; left: 0; top: -0.5px; height: 2px; width: 100%; background: #fff; transform-origin: 0 50%; transform: scaleX(0); }
.time { font-size: 1.1rem; color: var(--txt); letter-spacing: 0.08em; min-width: 8.6em; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mic { display: none; align-items: center; gap: 1.2rem; margin-top: 1.4rem; color: var(--white); }
.mic svg { width: 2rem; height: 2rem; flex: none; }
.lvl { flex: 1; height: 1px; background: rgba(255, 255, 255, 0.12); position: relative; }
.lvl i { position: absolute; left: 0; top: -1px; height: 3px; width: 100%; background: #fff; transform-origin: 0 50%; transform: scaleX(0); }
.is-mic .trans { display: none; }
.is-mic .mic { display: flex; }
.pill--wide { margin-top: 1.6rem; width: 100%; height: 3.6rem; }

/* bands: each meter runs in a dark channel cut through the glass, so the HIGH glow is always
   #3B1EFF over black, never blue over a pale point */
.band { display: grid; grid-template-columns: 4.6em 1fr 4em; align-items: center; column-gap: 1.2rem; margin-top: 1.7rem; }
.band .n { font-size: 1.25rem; letter-spacing: 0.16em; color: var(--white); }
.band .r { grid-column: 1 / -1; grid-row: 2; font-size: 1rem; letter-spacing: 0.1em; color: var(--mut); margin-top: 0.6rem; }
.band .t { height: 0.4rem; border-radius: 0.2rem; position: relative; }
.band .t::before { content: ''; position: absolute; inset: -0.9rem -1.1rem; z-index: -1; border-radius: 1.2rem; pointer-events: none; background: #0A0A0C; box-shadow: 0 0 0.8rem 0.3rem #0A0A0C; }
.band.low .t { background: rgba(255, 255, 255, 0.07); }
.band.mid .t { background: rgba(0, 229, 255, 0.09); }
.band.high .t { background: rgba(59, 30, 255, 0.2); }
.band .t i { position: absolute; inset: 0; border-radius: 0.2rem; transform-origin: 0 50%; transform: scaleX(0); }
.band .pc { font-size: 1.4rem; color: var(--white); text-align: right; font-variant-numeric: tabular-nums; }
.band.low .t i { background: var(--low); box-shadow: 0 0 1rem rgba(255, 255, 255, 0.45); }
.band.mid .t i { background: var(--mid); box-shadow: 0 0 1.2rem rgba(0, 229, 255, 0.5); }
.band.high .t i { background: var(--high); box-shadow: 0 0 1rem 1px rgba(59, 30, 255, 0.9), 0 0 3px rgba(59, 30, 255, 1); }

/* motors: they glow white as they fire */
.m-row { margin-top: 1.6rem; font-size: 1.05rem; letter-spacing: 0.3em; color: var(--mut); }
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 0.8rem; }
.motor { --l: 0; position: relative; border-radius: 1.1rem; padding: 1.2rem 1.3rem 1.1rem; min-height: 6.6rem;
  background: rgba(255, 255, 255, calc(0.015 + var(--l) * 0.2));
  border: 1px solid rgba(255, 255, 255, calc(0.07 + var(--l) * 0.85));
  box-shadow: 0 0 calc(var(--l) * 4.4rem) rgba(255, 255, 255, calc(var(--l) * 0.38)), inset 0 0 calc(var(--l) * 3rem) rgba(255, 255, 255, calc(var(--l) * 0.3)); }
.motor .id { font-size: 1.7rem; color: var(--white); letter-spacing: 0.06em; }
.motor .nm { display: block; margin-top: 0.5rem; font-size: 1.05rem; letter-spacing: 0.16em; color: var(--txt); }
.motor .motor__pct { position: absolute; right: 1.2rem; top: 1.3rem; font-size: 1.3rem; color: var(--sec); font-variant-numeric: tabular-nums; }

/* vibration */
.vib-s { margin-top: 1.2rem; font: 300 5rem/1 var(--jost); letter-spacing: 0.12em; color: var(--mut); transition: color 0.25s; white-space: nowrap; }
.vib-s.is-on { color: var(--white); text-shadow: 0 0 2.4rem rgba(255, 255, 255, 0.35); }
.vib-s.is-cal { color: var(--txt); font-size: 3.6rem; }
.vib-d { margin-top: 1.1rem; font-size: 1.15rem; letter-spacing: 0.2em; color: var(--txt); white-space: nowrap; }
.vib-d b { font-weight: 400; color: var(--white); }
.cal { height: 1px; margin-top: 1.2rem; background: rgba(255, 255, 255, 0.1); position: relative; }
.cal i { position: absolute; left: 0; top: 0; height: 1px; width: 100%; background: #fff; transform-origin: 0 50%; transform: scaleX(0); }

/* spectrum: a sheet of glass with a clear window where the signal stands (the bars are the particles) */
.spec-head { display: flex; align-items: center; justify-content: space-between; gap: 1.6rem; padding: 1.3rem 2.4rem;
  border-radius: 1.6rem 1.6rem 0 0; font-size: 1.15rem; letter-spacing: 0.24em; color: var(--txt);
  background: linear-gradient(180deg, rgba(21, 21, 24, 0.55), rgba(14, 14, 16, 0.35));
  -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.spec-head b { font-weight: 400; color: var(--sec); }
.legend { display: flex; gap: 1.8rem; align-items: center; }
.legend > span { display: flex; align-items: center; gap: 0.8rem; }
.legend i { width: 1.4rem; height: 2px; display: block; box-shadow: 0 0 4px 6px #0A0A0C; }
.legend i.lo { background: var(--low); }
.legend i.mi { background: var(--mid); }
.legend i.hi { background: var(--high); box-shadow: 0 0 6px var(--high), 0 0 4px 7px #0A0A0C; }
.spec-win { position: relative; flex: 1; margin: 0 2rem 1.4rem; min-height: 6rem; }
/* the film's faint dashed reference line, each stretch in its own band's hue */
.spec-win .ref { position: absolute; left: 0; right: 0; bottom: 14%; height: 1px; --lo: 8.75%; --hi: 53.75%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 var(--lo), rgba(0, 229, 255, 0.13) var(--lo) var(--hi), rgba(59, 30, 255, 0.42) var(--hi) 100%);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 10px, transparent 10px 22px); mask: repeating-linear-gradient(90deg, #000 0 10px, transparent 10px 22px); }
.spec2d { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.no-gl .spec2d { display: block; }
.no-gl .spec-win .ref { background: rgba(255, 255, 255, 0.1); }

/* motor labels at the four nodes: a ring, a short tick outwards, and the name */
.leaders { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; overflow: visible; opacity: 0; transition: opacity 0.6s var(--io); }
.dash.is-in .leaders { opacity: 1; transition: opacity 1.2s var(--io) 2.2s; }
.is-expanded .leaders, .no-gl .leaders, .dash.is-out .leaders, .is-reverse .leaders { opacity: 0 !important; transition: opacity 0.3s !important; }
.leaders polyline { fill: none; stroke: #fff; stroke-width: 1; vector-effect: non-scaling-stroke; }
.leaders circle { fill: none; stroke: #fff; stroke-width: 1; }
.leaders text { font-family: var(--mono); font-size: 1.15rem; letter-spacing: 0.16em; fill: #FFFFFF; paint-order: stroke; stroke: rgba(9, 9, 11, 0.82); stroke-width: 4px; stroke-linejoin: round; }
.leaders text tspan.s { fill: #AAAAAA; }

/* the full-screen vest: the panels glide away to the edges */
.d-left, .d-right, .d-top, .g-spec { transition: translate 0.9s var(--io), opacity 0.7s var(--io); }
.is-expanded .d-left { translate: -120% 0; }
.is-expanded .d-right { translate: 120% 0; }
.is-expanded .d-top { translate: 0 -200%; }
.is-expanded .g-spec { translate: 0 130%; }
.is-expanded .dash .enter { opacity: 0; transition: opacity 0.6s var(--io); }
.is-expanded .slot-hint, .dash.is-out .slot-hint { opacity: 0 !important; transition: opacity 0.3s !important; }
.dash.is-out .enter, .dash.is-out .slot-hint { opacity: 0; transition: opacity 0.6s var(--io); }
/* once in, the panels drop their entrance clip (a clip on a sheet would stop the blur inside it) */
.dash.is-settled .enter { clip-path: none; }

/* ------------------------------------------------------------------ library drawer (over the right column) */

.drawer {
  grid-column: 3; grid-row: 2; z-index: 5; display: flex; flex-direction: column; padding: 1.6rem 2rem 1.8rem;
  opacity: 0; transform: translateX(4rem); pointer-events: none; visibility: hidden;
  transition: transform 0.6s var(--io), opacity 0.4s var(--io), visibility 0s linear 0.6s;
}
.is-drawer .drawer { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: transform 0.6s var(--io), opacity 0.4s var(--io), visibility 0s; }
.is-drawer .d-right { opacity: 0; transition: opacity 0.3s; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; }
.drawer__head .p-lbl { flex: 1; }
.drawer__cats { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.cat { flex: 1 1 auto; height: 3.4rem; border-radius: 0.8rem; border: 1px solid rgba(255, 255, 255, 0.08); font-size: 1.05rem; letter-spacing: 0.14em; color: var(--txt);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 1.2rem; transition: color 0.2s, border-color 0.2s, background 0.2s; }
.cat:hover { color: var(--white); }
.cat[aria-selected='true'] { color: var(--bg); background: var(--white); border-color: var(--white); }
.drawer__blurb { margin: 1.2rem 0.2rem 0.6rem; font-size: 1.1rem; letter-spacing: 0.06em; line-height: 1.5; color: var(--txt); min-height: 1.8rem; }
.drawer__list { list-style: none; margin: 0; padding: 0; flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #26262c transparent; }
.drawer__list::-webkit-scrollbar { width: 6px; }
.drawer__list::-webkit-scrollbar-thumb { background: #26262c; border-radius: 3px; }
.group { margin: 1.4rem 0.4rem 0.6rem; font-size: 1.05rem; letter-spacing: 0.24em; color: var(--mut); }
.track { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 1.2rem;
  padding: 1rem 1rem 1rem 1.4rem; border-radius: 0.9rem; cursor: pointer; transition: background 0.2s; }
.track:hover { background: rgba(255, 255, 255, 0.04); }
.track::before { content: ''; position: absolute; left: 0; top: 1.1rem; bottom: 1.1rem; width: 2px; border-radius: 1px; background: transparent; }
.track.is-current::before { background: var(--white); }
.track__title { font: 300 1.9rem/1.2 var(--jost); color: var(--sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track.is-current .track__title { color: var(--white); }
.track__meta { grid-column: 1; margin-top: 0.4rem; font-size: 1rem; letter-spacing: 0.12em; color: var(--txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track__side { grid-row: 1 / span 2; grid-column: 2; display: flex; align-items: center; gap: 1rem; font-size: 1.1rem; color: var(--txt); font-variant-numeric: tabular-nums; }
.track__remove { width: 2.8rem; height: 2.8rem; border-radius: 50%; color: var(--txt); display: grid; place-items: center; }
.track__remove:hover { color: var(--white); background: rgba(255, 255, 255, 0.08); }
.track__remove svg { width: 1.2rem; height: 1.2rem; }
.eq { display: none; gap: 3px; align-items: flex-end; height: 1.4rem; }
.track.is-current .eq { display: flex; }
.eq i { width: 3px; background: var(--white); animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -0.3s; } .eq i:nth-child(3) { animation-delay: -0.6s; }
.is-paused .eq i { animation-play-state: paused; }
@keyframes eq { 0%, 100% { height: 0.4rem; } 50% { height: 1.4rem; } }
.empty { margin: 2.4rem 0.8rem; font-size: 1.1rem; letter-spacing: 0.06em; line-height: 1.6; color: var(--txt); }
.drop { margin-top: 1rem; padding: 1.6rem 1.4rem; border: 1px dashed rgba(255, 255, 255, 0.16); border-radius: 1.2rem; text-align: center; transition: border-color 0.2s, background 0.2s; }
.drop.is-over { border-color: var(--white); background: rgba(255, 255, 255, 0.03); }
.drop__title { margin: 0; font-size: 1.1rem; letter-spacing: 0.2em; color: var(--sec); }
.drop__sub { margin: 1.2rem 0 0; }
.drop__note { margin: 1.2rem 0 0; font-size: 1rem; letter-spacing: 0.06em; color: var(--txt); }

/* ------------------------------------------------------------------ the vest, full screen */

.exp__vest { position: absolute; left: 4rem; right: 4rem; top: 8rem; bottom: 15rem; }
.exp__caption { position: absolute; left: 4rem; top: 4rem; margin: 0; font-size: 1.15rem; letter-spacing: 0.26em; color: var(--txt); }
.exp__close { position: absolute; right: 4rem; top: 3.2rem; }
.hbars { position: absolute; left: 50%; bottom: 5.6rem; width: 134rem; max-width: calc(100% - 8rem); transform: translateX(-50%); display: flex; gap: 6rem; }
.hbar { flex: 1; display: flex; align-items: center; gap: 2.2rem; }
.hbar__label { width: 5.2rem; font-size: 1.4rem; letter-spacing: 0.2em; color: var(--white); }
.hbar__track { flex: 1; position: relative; height: 0.5rem; border-radius: 0.3rem; }
.hbar--low .hbar__track { background: rgba(255, 255, 255, 0.07); }
.hbar--mid .hbar__track { background: rgba(0, 229, 255, 0.09); }
.hbar--high .hbar__track { background: rgba(59, 30, 255, 0.2); }
.hbar__fill { position: absolute; inset: 0; border-radius: 0.3rem; transform-origin: 0 50%; transform: scaleX(0); }
.hbar--low .hbar__fill { background: var(--low); box-shadow: 0 0 1rem rgba(255, 255, 255, 0.45); }
.hbar--mid .hbar__fill { background: var(--mid); box-shadow: 0 0 1.2rem rgba(0, 229, 255, 0.5); }
.hbar--high .hbar__fill { background: var(--high); box-shadow: 0 0 1rem 1px rgba(59, 30, 255, 0.9); }
.hbar__pct { width: 5.6rem; text-align: right; font-size: 1.6rem; color: var(--white); font-variant-numeric: tabular-nums; }
.exp__caption, .exp__close, .hbars { opacity: 0; transform-origin: 50% 50%; transition: opacity 0.6s var(--io); }
.is-expanded .exp__caption, .is-expanded .exp__close, .is-expanded .hbars { opacity: 1; transition: opacity 0.8s var(--io) 0.5s; }
#expanded { cursor: grab; }
#expanded.is-grabbing { cursor: grabbing; }

/* The motors, labelled like a technical drawing: a ring on each node and a hairline leader out to a
   label just outside the vest's silhouette, on whichever side the node is turned to. */
.callouts { position: fixed; inset: 0; pointer-events: none; z-index: 3; opacity: 0; transition: opacity 0.5s var(--io); }
.is-expanded .callouts { opacity: 1; transition: opacity 0.9s var(--io) 0.8s; }
.callouts svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.callouts polyline, .callouts circle { fill: none; stroke: #fff; stroke-width: 1; vector-effect: non-scaling-stroke; }
.callout { position: absolute; left: 0; top: 0; display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 1.2rem; row-gap: 0.5rem;
  will-change: transform, opacity; white-space: nowrap; }
.callout b { font: 300 3.4rem/1 var(--jost); color: var(--white); letter-spacing: 0.02em; }
.callout span { font-size: 1.5rem; color: var(--white); font-variant-numeric: tabular-nums; }
.callout em { grid-column: 1 / -1; font-style: normal; font-size: 1.1rem; letter-spacing: 0.24em; color: var(--txt); }
.callout.is-left { text-align: right; justify-items: end; }

/* ------------------------------------------------------------------ states */

.perm { position: fixed; top: 2.4rem; left: 50%; z-index: 20; width: min(52rem, 90vw); transform: translateX(-50%);
  padding: 2.2rem 2.6rem 2.4rem; text-align: center; animation: drop 0.5s var(--out); }
.perm svg { width: 3rem; height: 3rem; color: var(--white); animation: nudge 1.4s var(--io) infinite; }
.perm__title { margin: 1rem 0 0; font-size: 1.3rem; letter-spacing: 0.28em; color: var(--white); }
.perm__body { margin: 1rem 0 0; font: 300 1.9rem/1.45 var(--jost); color: var(--sec); }
.perm__body b { color: var(--white); font-weight: 400; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-0.6rem); } }
@keyframes drop { from { opacity: 0; transform: translate(-50%, 1rem); } to { opacity: 1; transform: translate(-50%, 0); } }

.scrim { position: fixed; inset: 0; z-index: 15; background: rgba(9, 9, 11, 0.6); animation: fade 0.4s var(--io); }
.card { position: fixed; left: 50%; top: 50%; z-index: 16; width: min(70rem, 92vw); transform: translate(-50%, -50%);
  padding: 4rem 4.4rem 3.4rem; border-radius: 2.2rem; animation: pop 0.5s var(--out); }
.card__eyebrow { margin: 0; font-size: 1.2rem; letter-spacing: 0.3em; color: var(--txt); }
.card__title { margin: 1.4rem 0 0; font: 300 3.8rem/1.15 var(--jost); letter-spacing: 0.01em; color: var(--white); }
.card__body { margin: 1.6rem 0 0; font: 300 2rem/1.55 var(--jost); color: var(--sec); }
.card__body b { color: var(--white); font-weight: 400; }
.card__actions { display: flex; gap: 1.4rem; margin-top: 3rem; flex-wrap: wrap; }
.card__timer { margin-top: 2.6rem; height: 2px; background: rgba(255, 255, 255, 0.08); border-radius: 1px; overflow: hidden; }
.card__timer-fill { height: 100%; background: var(--sec); transform-origin: 0 50%; transform: scaleX(0); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%) scale(0.98); } to { opacity: 1; transform: translate(-50%, -50%); } }

.notice { position: fixed; left: 50%; bottom: 2.8rem; z-index: 18; transform: translate(-50%, 2rem); max-width: min(76rem, 92vw);
  padding: 1.4rem 2.2rem; border-radius: 1.2rem; font-size: 1.25rem; letter-spacing: 0.1em; line-height: 1.5; color: var(--sec); text-align: center;
  opacity: 0; pointer-events: none; transition: opacity 0.4s var(--io), transform 0.4s var(--out); }
.notice.is-on { opacity: 1; transform: translate(-50%, 0); }

.idle { position: fixed; left: 50%; top: 3rem; z-index: 19; width: min(52rem, 90vw); transform: translateX(-50%); padding: 2rem 2.6rem 2.2rem;
  text-align: center; border-radius: 1.6rem; animation: fade 0.4s var(--io); }
.idle__txt { margin: 0; font-size: 1.4rem; letter-spacing: 0.3em; color: var(--white); }
.idle__txt b { font-weight: 400; }
.idle__sub { margin: 0.8rem 0 0; font-size: 1.05rem; letter-spacing: 0.26em; color: var(--txt); }
.idle__bar { margin-top: 1.6rem; height: 1px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.idle__fill { height: 100%; background: var(--white); transform-origin: 0 50%; transform: scaleX(1); }

.diag { position: fixed; left: 16px; bottom: 16px; z-index: 30; margin: 0; padding: 12px 14px; min-width: 280px;
  font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--txt);
  background: rgba(9, 9, 11, 0.92); border: 1px solid #26262c; border-radius: 8px; white-space: pre; }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; font-family: var(--mono); color: var(--txt); }

/* ------------------------------------------------------------------ large screens: a touch more room */

@media (min-aspect-ratio: 21/10) {
  .dash { grid-template-columns: 44rem minmax(0, 1fr) 44rem; }
}

/* ------------------------------------------------------------------ phones and tall screens */

@media (max-aspect-ratio: 1/1) {
  html { font-size: clamp(8px, calc(100vw / 39), 13px); }
  .landing__vest { inset: 18% 0 22%; }
  .titles { top: 40%; }
  .wordmark--hero { font-size: 3.9rem; }
  .wordmark--hero i { margin: 0 0.09em; }
  .tagline { font-size: 1.3rem; letter-spacing: 0.5em; padding-left: 0.5em; margin-top: 2em; }
  @keyframes tagIn { 0% { opacity: 0; letter-spacing: 0.9em; padding-left: 0.9em; filter: blur(8px); } 100% { opacity: 1; letter-spacing: 0.5em; padding-left: 0.5em; filter: blur(0); } }
  .byline { font-size: 2.3rem; letter-spacing: 0.26em; padding-left: 0.26em; margin-top: 1.3em; }
  .start-wrap { bottom: max(6rem, 12vh); }
  .start { width: 23rem; height: 6.2rem; }
  .start__label { font-size: 1.5rem; }
  .landing__scrim { width: 60rem; height: 60rem; }
  .phones__line { font-size: 3.3rem; }

  .choice { flex-direction: column; gap: 1.4rem; padding: 2rem 1.6rem 2.2rem; }
  .choice-card { width: 100%; height: auto; flex: 1 1 0; max-height: 46vh; border-radius: 2.4rem; padding: 2.2rem; }
  .card-k { font-size: 1.3rem; }
  .card-viz { top: 18%; height: 46%; }
  .card-t { font-size: clamp(3rem, 11vw, 6rem); }

  .dash { display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; gap: 1rem; padding: 1.2rem 1.2rem 3.4rem; -webkit-overflow-scrolling: touch; }
  .d-top { flex: none; gap: 1.4rem; flex-wrap: wrap; }
  .wordmark--small { font-size: 1.9rem; }
  .vest-slot { flex: none; height: 38vh; margin: 0 -1.2rem; order: 1; }
  .g-spec { flex: none; height: 15rem; order: 2; }
  .d-left, .d-right { display: contents; }
  .g-src { order: 3; } .g-motors { order: 4; } .g-bands { order: 5; } .g-vib { order: 6; }
  .p { padding: 1.4rem 1.5rem; }
  .p-lbl { font-size: 1rem; }
  .spec-head { padding: 1rem 1.4rem; font-size: 0.95rem; }
  .legend { display: none; }
  .seg .src { font-size: 1rem; }
  .now-t { font-size: 2rem; }
  .motor { min-height: 5.6rem; }
  .vib-s { font-size: 3.4rem; }
  .leaders { display: none; }
  .drawer { position: fixed; inset: auto 1.2rem 1.2rem; height: 70vh; }
  .is-expanded .d-left, .is-expanded .d-right { translate: 0 0; }
  .is-expanded .g-src, .is-expanded .g-bands { translate: -120% 0; opacity: 0; }
  .is-expanded .g-motors, .is-expanded .g-vib { translate: 120% 0; opacity: 0; }
  .exp__vest { left: 0; right: 0; top: 9rem; bottom: 22rem; }
  .exp__caption { left: 1.6rem; top: 1.8rem; font-size: 0.95rem; right: 1.6rem; }
  .exp__close { right: 1.6rem; top: 4.4rem; }
  .hbars { flex-direction: column; gap: 1.6rem; bottom: 4rem; width: calc(100% - 3.2rem); max-width: none; }
  .callout b { font-size: 2.2rem; }
  .callout span { font-size: 1.2rem; }
  .callout em { display: none; }
}

/* ------------------------------------------------------------------ motion preferences */

@media (prefers-reduced-motion: reduce) {
  :root { --t-scene: 200ms; }
  .landing.is-title .wordmark--hero i { animation: fade 1.6s ease both; animation-delay: 0.2s; }
  .landing.is-title .tagline, .landing.is-title .byline { animation: fade 1.4s ease both; }
  .landing.is-title .tagline { animation-delay: 1.2s; } .landing.is-title .byline { animation-delay: 1.8s; }
  .landing.is-title .start, .landing.is-title .start-pool { animation: fade 1s ease 2.4s both; }
  .phones.is-play .phones__line { animation-name: interCalm; }
  @keyframes interCalm { 0% { opacity: 0; } 24%, 76% { opacity: 1; } 100% { opacity: 0; } }
  .choice.is-in .choice-card { animation-name: fade; }
  .perm svg, .eq i { animation: none; }
  .dash .enter { clip-path: none !important; }
}
