/* Avoria landing page. Tokens first, then sections in page order.
   Colour: off-black ink, warm paper, studio greys, night sections. One accent: warning-sign yellow
   (--signal on dark, --signal-ink on light). No gradients except the hero video's top fade. */

:root {
  --ink: #16181b;
  --ink-2: #3c3f44;
  --ink-3: #686c73;
  --paper: #f3f1ec;
  --paper-2: #e8e5de;
  --light: #faf9f6;
  --hero: #d3d3d2;
  --studio: #ecedea;
  --rule: #d8d5cd;
  --night: #0f1012;
  --night-2: #16181b;
  --night-line: #2a2d32;
  --on-night: #ecebe6;
  --on-night-2: #a7aab0;
  --on-night-3: #82868d;
  --signal: #f2c230;
  --signal-ink: #b57a0e;
  --sans: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1320px;
  --gutter: clamp(18px, 4vw, 48px);
  --nav-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 18px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.024em; line-height: 1.04; text-wrap: balance; }
p { text-wrap: pretty; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 1em; height: 1em; flex: none; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 6px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; color: var(--ink);
  transition: background-color .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease);
}
.nav[data-on="night"] { color: var(--on-night); }
.nav.is-solid {
  background: var(--nav-bg, var(--paper));
  box-shadow: 0 1px 0 color-mix(in srgb, currentColor 12%, transparent);
}
.nav__row { display: flex; align-items: center; gap: 28px; }
.nav__logo { display: block; width: 112px; color: inherit; }
.nav__logo svg { width: 100%; height: auto; }
.nav__links { display: flex; gap: 26px; margin-left: auto; font-size: 15px; }
.nav__links a { text-decoration: none; opacity: .7; transition: opacity .15s; }
.nav__links a:hover, .nav__links a[aria-current="true"] { opacity: 1; }
.nav__cta {
  font-size: 15px; font-weight: 500; text-decoration: none;
  padding: 7px 16px; border-radius: 999px; border: 1px solid currentColor;
}
.nav__menu { display: none; margin-left: auto; background: none; border: 1px solid currentColor; border-radius: 999px; padding: 6px 15px; font-size: 15px; cursor: pointer; }
.menu {
  position: absolute; top: var(--nav-h); left: 0; right: 0;
  background: color-mix(in srgb, var(--nav-bg, var(--paper)) 98%, transparent);
  padding: 4px var(--gutter) 20px; display: grid;
}
.menu[hidden] { display: none; }
.menu a { padding: 13px 0; font-size: 20px; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .nav__menu { display: block; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 24px;
  border-radius: 999px; background: var(--ink); color: var(--paper);
  font-size: 16px; font-weight: 500; text-decoration: none; transition: background-color .15s;
}
.btn:hover { background: #2c2f34; }
.btn .i { transition: transform .2s var(--ease); }
.btn:hover .i { transform: translateX(3px); }

/* ---------- 1 hero ---------- */
/* Text at left, a still of the glasses at right, both centred on one line. */
.hero { background: var(--studio); padding: calc(var(--nav-h) + clamp(32px, 6vh, 72px)) 0 clamp(40px, 6vh, 72px); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 4.4fr) minmax(0, 7.6fr); gap: clamp(24px, 3vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(38px, 4.6vw, 112px); letter-spacing: -0.034em; line-height: .98; max-width: 9.5em; }
.hero__text p { margin-top: clamp(16px, 2.6vh, 32px); font-size: clamp(16px, 1.25vw, 20px); color: var(--ink-2); max-width: 38ch; }
.hero__text .btn { margin-top: clamp(20px, 3.2vh, 40px); }
/* runs a little into the right margin, never past the window edge */
.hero__media {
  position: relative; background: var(--studio);
  width: min(118%, calc(100% + (100vw - min(100vw, var(--wrap))) / 2 + var(--gutter) - 24px));
}
.hero__still { display: block; width: 100%; height: auto; aspect-ratio: 1652 / 691; mix-blend-mode: multiply; }
@media (max-width: 899px) {
  .hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
  .hero__grid { grid-template-columns: 1fr; gap: clamp(24px, 5vh, 48px); }
  .hero__media { width: 104%; margin-left: -2%; }
}

/* ---------- 2 problem ---------- */
.problem { background: var(--night); color: var(--on-night); padding: clamp(100px, 12vw, 176px) 0 clamp(64px, 8vw, 112px); }
.problem__title { font-size: clamp(32px, 4.3vw, 62px); max-width: 17ch; }
.moments { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); margin-top: clamp(64px, 9vw, 128px); }
.moments__label { font-size: 14px; color: var(--on-night-3); padding-bottom: 14px; border-bottom: 1px solid var(--night-line); }
.moments li {
  font: italic 400 clamp(28px, 3.5vw, 50px)/1.14 var(--serif); letter-spacing: -0.01em;
  padding: clamp(18px, 2.2vw, 28px) 0; border-bottom: 1px solid var(--night-line);
}
.problem__facts { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); margin-top: clamp(36px, 4vw, 56px); color: var(--on-night-2); }
.problem__facts p { max-width: 46ch; }
.problem__facts strong { color: var(--on-night); font-weight: 500; }
.fn { font-size: .66em; vertical-align: super; margin-left: 2px; text-decoration: none; color: var(--on-night-3); }
.problem__next {
  margin-top: clamp(88px, 11vw, 168px); font-size: clamp(36px, 5.4vw, 80px);
  font-weight: 500; letter-spacing: -0.032em; line-height: 1;
}
.problem__next::before { content: ""; display: block; width: 48px; height: 4px; background: var(--signal); margin-bottom: clamp(20px, 2.4vw, 32px); }
.problem__src { margin-top: clamp(48px, 6vw, 80px); font-size: 13px; color: var(--on-night-3); max-width: 84ch; }
@media (max-width: 760px) { .moments, .problem__facts { grid-template-columns: 1fr; } }

/* ---------- 3 glasses (sticky stage, scroll turns the frame) ---------- */
.glasses { background: var(--studio); }
.glasses__track { height: 470vh; }
.glasses__stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; background: var(--studio);   /* sticky = own layer: blend against this */
  --copy-h: clamp(170px, 25vh, 240px);
}
.glasses__copy { position: relative; flex: none; height: var(--copy-h); margin-top: var(--nav-h); }
.callout {
  position: absolute; left: var(--gutter); right: var(--gutter); top: clamp(18px, 4.5vh, 52px);
  max-width: 600px; opacity: 0; transition: opacity .45s var(--ease);
}
.callout.is-on { opacity: 1; }
.callout h2 { font-size: clamp(30px, 3.4vw, 50px); }
.callout p { margin-top: 14px; color: var(--ink-2); max-width: 44ch; font-size: clamp(16px, 1.2vw, 18px); }
.glasses__view { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 2vw clamp(36px, 7vh, 72px); }
.glasses__canvas, .glasses__still {
  grid-area: 1 / 1;
  width: min(96vw, calc((100svh - var(--nav-h) - var(--copy-h) - 72px) * 2.038));
  height: auto; aspect-ratio: 1600 / 785; mix-blend-mode: multiply;
}
.glasses__still { transition: opacity .3s; }
.glasses.is-ready .glasses__still { opacity: 0; }
.glasses__steps {
  position: absolute; bottom: clamp(18px, 3.5vh, 36px);
  left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  display: flex; gap: 6px;
}
.glasses__steps li { width: 28px; height: 2px; background: color-mix(in srgb, var(--ink) 16%, transparent); transition: background-color .3s; }
.glasses__steps li.is-on { background: var(--ink); }
@media (max-width: 700px) {
  .glasses__track { height: 400vh; }
  .glasses__stage { --copy-h: clamp(200px, 32vh, 260px); }
  .glasses__view { padding: 0 0 12vh; }
  /* the frames carry wide side margins for the side views; on a phone let the canvas run past the edges */
  .glasses__canvas, .glasses__still { width: 124vw; max-width: none; justify-self: start; margin-left: calc(50% - 62vw); }
  .callout h2 { font-size: 28px; }
}

/* ---------- 4 what it does (switcher) ---------- */
.what { background: var(--paper); padding: clamp(100px, 11vw, 160px) 0 clamp(72px, 8vw, 112px); }
.what__title { font-size: clamp(32px, 4.2vw, 60px); max-width: 15ch; }
.what__layout { display: grid; grid-template-columns: minmax(250px, 4fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 88px); align-items: start; }
.what__side { display: flex; flex-direction: column; }
.what__tabs { display: flex; flex-direction: column; border-top: 1px solid var(--rule); margin-top: clamp(32px, 4vw, 56px); }
.tab {
  position: relative; display: block; width: 100%; text-align: left; background: none;
  border: 0; border-bottom: 1px solid var(--rule); padding: 22px 0 24px; cursor: pointer; color: var(--ink-3);
}
.tab__name { display: block; font-size: clamp(22px, 2vw, 28px); font-weight: 500; letter-spacing: -0.02em; transition: color .2s; }
.tab__line { display: block; margin-top: 6px; font-size: 16px; line-height: 1.45; max-width: 32ch; }
.tab:hover .tab__name, .tab[aria-selected="true"] .tab__name { color: var(--ink); }
.tab[aria-selected="true"] .tab__line { color: var(--ink-2); }
.tab__timer {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink);
  transform: scaleX(0); transform-origin: left center;
}
.what__stage { position: relative; background: var(--paper-2); border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 11; }
.panel {
  position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center; gap: clamp(16px, 3vw, 44px); padding: clamp(24px, 4vw, 56px);
  background: var(--paper-2);
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility 0s linear .35s;
}
.panel.is-on { opacity: 1; visibility: visible; transition: opacity .35s var(--ease); }
.panel img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.panel figcaption { display: grid; gap: clamp(22px, 3vw, 40px); }
.said__tag { display: flex; align-items: center; gap: 8px; font: 500 13px/1.2 var(--sans); letter-spacing: .01em; color: var(--ink-3); margin-bottom: 10px; font-style: normal; }
.said--without { font: italic 400 clamp(20px, 1.75vw, 26px)/1.25 var(--serif); color: var(--ink-3); }
.said--with { font-size: clamp(21px, 1.95vw, 30px); line-height: 1.2; font-weight: 500; letter-spacing: -0.015em; }
.said--with .said__tag { color: var(--signal-ink); }
.said--with .said__tag .i { width: 16px; height: 16px; }
.what__note { margin-top: 18px; font-size: 14px; color: var(--ink-3); }
@media (max-width: 900px) {
  .what__layout { grid-template-columns: 1fr; gap: 24px; }
  .what__side { display: contents; }
  .what__stage { order: 2; }
  .what__note { order: 3; margin-top: 0; }
  .what__tabs { flex-direction: row; gap: 24px; overflow-x: auto; border-top: 0; border-bottom: 1px solid var(--rule); scrollbar-width: none; }
  .tab { width: auto; flex: none; border: 0; padding: 10px 0 14px; }
  .tab__line { display: none; }
  .what__stage { aspect-ratio: auto; }
  .panel { position: relative; inset: auto; display: none; grid-template-columns: 1fr; }
  .panel.is-on { display: grid; }
  .panel img { height: auto; max-height: 44vh; }
}

/* ---------- 5 how it works (recordings + system) ---------- */
.how { background: var(--night); color: var(--on-night); padding: clamp(80px, 8vw, 120px) 0 clamp(64px, 7vw, 104px); }
.how__head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: end; }
.how__head h2 { font-size: clamp(32px, 4.2vw, 60px); max-width: 13ch; }
.how__head p { color: var(--on-night-2); max-width: 46ch; }
.picker { display: flex; gap: clamp(20px, 3vw, 44px); margin-top: clamp(32px, 4vw, 52px); border-bottom: 1px solid var(--night-line); overflow-x: auto; scrollbar-width: none; }
.picker__btn { position: relative; flex: none; background: none; border: 0; padding: 0 0 16px; text-align: left; cursor: pointer; color: var(--on-night-3); }
.picker__name { display: block; font-size: 18px; font-weight: 500; color: var(--on-night-2); transition: color .2s; }
.picker__meta { display: block; margin-top: 3px; font-size: 13px; }
.picker__btn:hover .picker__name, .picker__btn[aria-selected="true"] .picker__name { color: var(--on-night); }
.picker__btn[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--signal); }
.how__body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 3vw, 40px); margin-top: clamp(24px, 3vw, 36px); align-items: start; }
.player__screen { background: #000; border-radius: 6px; overflow: hidden; aspect-ratio: 1600 / 1410; }
.player__video { width: 100%; height: 100%; object-fit: cover; }
.player__bar { display: flex; align-items: center; gap: 14px; margin-top: 12px; color: var(--on-night-2); }
.player__play {
  width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid var(--night-line);
  background: var(--night-2); display: grid; place-items: center; cursor: pointer; color: var(--on-night);
}
.player__play .i { width: 14px; height: 14px; }
.player__track { position: relative; flex: 1; height: 28px; cursor: pointer; }
.player__track::before { content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 2px; background: var(--night-line); border-radius: 2px; }
.player__fill { position: absolute; left: 0; top: 13px; height: 2px; width: 0; background: var(--on-night); border-radius: 2px; }
.player__time { font: 400 12px/1 var(--mono); font-variant-numeric: tabular-nums; min-width: 78px; text-align: right; }
.player__sound {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px; flex: none;
  border-radius: 999px; border: 1px solid var(--night-line); background: none; cursor: pointer;
  color: var(--on-night-2); font-size: 13px;
}
.player__sound[aria-pressed="true"] { color: var(--on-night); border-color: var(--on-night-3); }
.system { display: grid; gap: 14px; }
.diagram { width: 100%; height: auto; background: var(--night-2); border: 1px solid var(--night-line); border-radius: 6px; }
.d-band { fill: rgba(255, 255, 255, .025); }
.d-band-label { font: 600 10.5px var(--sans); letter-spacing: .16em; fill: var(--on-night-3); text-anchor: middle; }
.d-idle { fill: none; stroke: #3d4147; stroke-width: 1.2; stroke-dasharray: 3 4; }
.d-lit { fill: none; stroke: var(--signal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .3s; }
.d-lit.on { opacity: 1; }
.d-arrowhead { fill: var(--signal); }
.d-node rect { fill: var(--night); stroke: #3d4147; stroke-width: 1.2; transition: stroke .25s, fill .25s; }
.d-node text { font: 500 14px var(--sans); fill: var(--on-night-3); text-anchor: middle; dominant-baseline: central; transition: fill .25s; }
.d-node.on rect { stroke: var(--signal); fill: rgba(242, 194, 48, .1); }
.d-node.on text { fill: var(--on-night); }
.d-halo { fill: none; stroke: var(--signal); stroke-width: 5; stroke-opacity: .32; opacity: 0; }
.d-label { font: 500 11.5px var(--sans); fill: var(--signal); opacity: 0; transition: opacity .25s; }
.d-label.on { opacity: 1; }
.d-dot { fill: var(--on-night); stroke: var(--signal); stroke-width: 2; opacity: 0; }
.log { border: 1px solid var(--night-line); border-radius: 6px; padding: 14px 16px 8px; background: var(--night-2); }
.log__head { font-size: 13px; color: var(--on-night-3); margin-bottom: 6px; }
.log__list { position: relative; font: 400 12.5px/1.45 var(--mono); max-height: 228px; overflow-y: auto; scrollbar-width: thin; }
.log__item {
  display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, .05); color: var(--on-night-3); opacity: .42;
  cursor: pointer; transition: opacity .25s, color .25s;
}
.log__item:first-child { border-top: 0; }
.log__item.is-past { opacity: .8; }
.log__item.is-now { opacity: 1; color: var(--on-night); }
.log__item .who { color: var(--on-night-2); }
.log__item.is-now .who { color: var(--signal); }
.log__item:hover { opacity: 1; }
.log__t { font-variant-numeric: tabular-nums; }
.how__note { margin-top: clamp(28px, 3vw, 40px); font-size: 13px; color: var(--on-night-3); max-width: 92ch; }
@media (max-width: 960px) { .how__head, .how__body { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .d-node text { font-size: 17px; }
  .d-band-label { font-size: 13px; }
  .d-label { font-size: 13px; }
}

/* ---------- 6 research ---------- */
.research { background: var(--paper); padding: clamp(100px, 11vw, 160px) 0 clamp(80px, 9vw, 128px); }
.research__top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.research__lead h2 { font-size: clamp(32px, 4vw, 58px); max-width: 14ch; }
.research__lead p { margin-top: 24px; color: var(--ink-2); max-width: 46ch; }
.research__lead .research__pubs { color: var(--ink-3); font-size: .9em; }
.papers-screen, .vista-screen { background: var(--paper); padding: 0 0 clamp(80px, 9vw, 128px); }
.chart { position: relative; padding-top: 6px; }
.chart__title { display: block; font-size: 18px; font-weight: 500; }
.chart__sub { display: block; margin-top: 4px; font-size: 14px; color: var(--ink-3); }
.chart__table { width: 100%; border-collapse: collapse; margin-top: 22px; --max: 3.74; }
.chart__table tr { outline-offset: 2px; }
.chart__table th { text-align: left; font-weight: 400; font-size: 15px; color: var(--ink-2); padding: 8px 16px 8px 0; white-space: nowrap; width: 1%; }
.chart__table td { padding: 8px 0; white-space: nowrap; box-shadow: inset 1px 0 0 var(--rule); }
.bar {
  display: inline-block; vertical-align: middle; height: 16px;
  width: calc(var(--v) / var(--max) * (100% - 3.6em));
  background: #aeaba3; border-radius: 0 4px 4px 0; transition: filter .15s;
}
.is-ours .bar { background: var(--signal-ink); }
.is-ours th { color: var(--ink); font-weight: 500; }
.val { display: inline-block; vertical-align: middle; margin-left: 10px; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.is-ours .val { color: var(--ink); font-weight: 600; }
.chart__table tr:hover .bar, .chart__table tr:focus-visible .bar { filter: brightness(1.14); }
.chart__src { margin-top: 18px; font-size: 13px; color: var(--ink-3); max-width: 62ch; }
.chart__tip {
  position: absolute; z-index: 2; pointer-events: none; background: var(--ink); color: var(--paper);
  font-size: 13px; padding: 7px 10px; border-radius: 6px; white-space: nowrap;
  transform: translate(-100%, calc(-100% - 8px));
}
.chart__tip b { font-weight: 600; margin-right: 8px; }
.research__fig {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px); align-items: center;
  margin-top: clamp(64px, 8vw, 112px); padding: clamp(28px, 4vw, 48px) 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.research__fig h3 { font-size: clamp(22px, 2vw, 28px); }
.research__fig figcaption p { margin-top: 12px; font-size: 16px; color: var(--ink-2); max-width: 40ch; }
.research__fig img { width: 100%; height: auto; mix-blend-mode: multiply; }
.papers { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px); margin-top: clamp(64px, 8vw, 112px); }
.papers__intro h3 { font-size: clamp(24px, 2.2vw, 30px); }
.papers__intro p { margin-top: 16px; font-size: 16px; color: var(--ink-2); }
.papers__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(20px, 3vw, 40px); align-content: start; }
.papers__list li { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: start; padding: 16px 0; border-top: 1px solid var(--rule); }
.papers__list img { width: 96px; height: 60px; object-fit: cover; border-radius: 3px; mix-blend-mode: multiply; }
.papers__name { font-weight: 600; font-size: 16px; }
.papers__venue { font-size: 14px; color: var(--ink-2); margin-top: 2px; line-height: 1.4; }
.papers__with { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
@media (max-width: 960px) { .research__top, .papers, .research__fig { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .papers__list { grid-template-columns: 1fr; } }

/* ---------- 7 team ---------- */
.team { background: var(--light); padding: clamp(100px, 11vw, 160px) 0; }
.team__head { display: block; }
.team__head p { margin-top: 16px; }
.team__head h2 { font-size: clamp(32px, 4.2vw, 60px); }
.team__head p { color: var(--ink-2); max-width: 50ch; }
.team__body { margin-top: clamp(48px, 6vw, 80px); }
.founders { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); }
.person--lead { display: grid; grid-template-columns: clamp(96px, 24vw, 168px) minmax(0, 1fr); gap: 24px; align-items: center; }
.person__photo { background: var(--paper-2); border-radius: 50%; aspect-ratio: 1; overflow: hidden; }
.person__photo img { width: 100%; height: 100%; object-fit: cover; }
.person__name { font-size: 22px; font-weight: 500; letter-spacing: -0.015em; }
.person__role { font-size: 15px; color: var(--ink-2); margin-top: 2px; }
.person__bio { font-size: 15px; color: var(--ink-3); margin-top: 10px; max-width: 34ch; }
.groups { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: clamp(20px, 3vw, 40px); margin-top: clamp(48px, 6vw, 80px); padding-top: 28px; border-top: 1px solid var(--rule); }
.group__name { font-size: 15px; font-weight: 600; letter-spacing: 0; margin-bottom: 18px; }
.group ul { display: grid; gap: 18px; }
.group:nth-child(2) ul { grid-template-columns: 1fr 1fr; }
.group .person { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; }
.group .person__photo { aspect-ratio: 1; }
.group .person__name { font-size: 16px; }
.group .person__role { font-size: 14px; color: var(--ink-3); }
@media (max-width: 960px) {
  .team__head, .founders, .groups { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .group:nth-child(2) ul { grid-template-columns: 1fr; }
  .person--lead { grid-template-columns: clamp(88px, 26vw, 140px) minmax(0, 1fr); }
}

/* ---------- 8 vision ---------- */
/* Same rhythm as the first screen: all text in the left column, the drawing in the right column. The drawing's
   coloured wash fades out beyond the lens outlines (alpha baked into the file), so the lenses sit on the page. */
.vision { background: var(--paper); padding: clamp(96px, 10vw, 150px) 0 clamp(72px, 8vw, 112px); overflow: hidden; }
.vision__layout { display: grid; grid-template-columns: minmax(0, 4.4fr) minmax(0, 7.6fr); gap: clamp(28px, 4vw, 80px); align-items: center; }
.vision h2 { font-size: clamp(32px, 3.6vw, 58px); max-width: 13em; }
.vision__text > p { margin-top: clamp(16px, 2.4vh, 28px); color: var(--ink-2); max-width: 44ch; }
.vision__key { margin: clamp(24px, 4vh, 48px) 0 0; display: grid; gap: clamp(14px, 2.2vh, 24px); border-top: 1px solid var(--rule); padding-top: clamp(16px, 2.4vh, 28px); }
.vision__key dt { font-size: 14px; font-weight: 600; color: var(--ink); }
.vision__key dd { margin: 3px 0 0; font-size: 15px; line-height: 1.45; color: var(--ink-3); max-width: 42ch; }
.vision__panel { margin: 0; display: flex; justify-content: center; }
.vision__img { display: block; width: 100%; height: auto; }
@media (max-width: 899px) {
  .vision__layout { grid-template-columns: 1fr; }
  .vision__panel { margin: 0 -2%; }
}

/* ---------- 9 contact, footer ---------- */
.contact { background: var(--night); color: var(--on-night); padding: clamp(100px, 11vw, 160px) 0 clamp(64px, 7vw, 96px); }
.contact h2 { font-size: clamp(40px, 6vw, 88px); letter-spacing: -0.034em; }
.contact__rows { margin-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--night-line); }
.contact__rows a {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) 210px; gap: 24px; align-items: baseline;
  padding: clamp(22px, 2.6vw, 32px) 0; border-bottom: 1px solid var(--night-line); text-decoration: none;
}
.row__who { font-size: clamp(20px, 1.8vw, 26px); font-weight: 500; letter-spacing: -0.015em; }
.row__what { color: var(--on-night-2); font-size: 16px; }
.row__cta { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; white-space: nowrap; justify-self: end; }
.row__cta .i { transition: transform .2s var(--ease); }
.contact__rows a:hover .row__cta .i, .contact__rows a:focus-visible .row__cta .i { transform: translateX(4px); }
.contact__rows a:hover .row__cta { color: var(--signal); }
.contact__mail { margin-top: 28px; color: var(--on-night-2); }
.foot { background: var(--night); color: var(--on-night-2); padding-bottom: 40px; }
.foot__row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding-top: 32px; border-top: 1px solid var(--night-line); }
.foot__logo { width: 104px; height: auto; color: var(--on-night); }
.foot__lab { font-size: 14px; }
.foot__links { display: flex; gap: 20px; margin-left: auto; font-size: 14px; flex-wrap: wrap; }
.foot__links a { text-decoration: none; }
.foot__links a:hover { text-decoration: underline; }
.foot__small { margin-top: 20px; font-size: 12.5px; color: var(--on-night-3); }
@media (max-width: 760px) {
  .contact__rows a { grid-template-columns: 1fr; gap: 6px; }
  .row__cta { justify-self: start; }
  .foot__links { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}


/* =====================================================================================================
   ONE SCREEN PER SECTION (desktops and laptops)
   Every section marked .screen is exactly one window tall. Type sizes use min(vw, vh), so text shrinks on
   short or narrow windows and grows on big ones; pictures and video take whatever height is left, so nothing
   runs off the bottom or sides. Phones and very short windows keep the stacked layout defined above.
   ===================================================================================================== */
:root {
  --fs-h1: clamp(40px, min(6vw, 8.4vh), 150px);
  --fs-h2: clamp(28px, min(3.5vw, 5.4vh), 80px);
  --fs-big: clamp(30px, min(4.4vw, 6.8vh), 104px);
  --fs-quote: clamp(22px, min(2.8vw, 4.4vh), 66px);
  --fs-body: clamp(16px, min(1.25vw, 2vh), 22px);
  --fs-small: clamp(13px, min(.95vw, 1.55vh), 17px);
  --vpad: clamp(20px, 4.4vh, 64px);
}
@media (min-width: 900px) and (min-height: 560px) {
  :root { --wrap: clamp(1320px, 86vw, 1760px); }
  body { font-size: var(--fs-body); }
  .screen { height: 100vh; height: 100svh; padding-top: calc(var(--nav-h) + var(--vpad)); padding-bottom: var(--vpad); overflow: hidden; }
  .screen > .wrap { height: 100%; }

  /* 1 hero: one screen, both columns centred in it; the glasses never taller than about 60% of the window */
  .hero { display: flex; flex-direction: column; justify-content: center; padding-top: var(--nav-h); padding-bottom: 0; }
  .hero > .wrap { height: auto; }
  .hero h1 { font-size: clamp(40px, min(4.6vw, 7.6vh, calc(min(100vw, var(--wrap)) * .051)), 128px); }   /* last term: three lines in the text column */
  .hero__text p { font-size: var(--fs-body); }
  .hero__text .btn { height: clamp(46px, 5.4vh, 60px); font-size: clamp(15px, min(1.1vw, 1.8vh), 19px); }
  .hero__media { width: min(118%, calc(100% + (100vw - min(100vw, var(--wrap))) / 2 + var(--gutter) - 24px), calc(60vh * 2.3907)); }

  /* 2 problem: claim and facts on top, the four moments in the middle, the turn to Avoria at the foot */
  .problem > .wrap {
    display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); grid-template-rows: auto auto auto auto; align-content: center;
    grid-template-areas: "title facts" "title src" "moments moments" "next next"; column-gap: clamp(24px, 5vw, 96px);
  }
  .problem__title { grid-area: title; font-size: var(--fs-h2); max-width: 18ch; }
  .problem__facts { grid-area: facts; grid-template-columns: 1fr; gap: clamp(10px, 1.6vh, 24px); margin-top: 0; align-self: end; font-size: var(--fs-body); }
  .moments { grid-area: moments; margin-top: clamp(36px, 8vh, 112px); }
  .moments__label { font-size: var(--fs-small); padding-bottom: clamp(8px, 1.4vh, 18px); }
  .moments li { font-size: var(--fs-quote); padding: clamp(8px, 1.7vh, 28px) 0; }
  .problem__next { grid-area: next; margin-top: clamp(36px, 8vh, 112px); font-size: var(--fs-big); }
  .problem__next::before { margin-bottom: clamp(10px, 1.8vh, 28px); }
  .problem__src { grid-area: src; margin-top: clamp(8px, 1.4vh, 18px); align-self: start; max-width: 60ch; font-size: clamp(11.5px, min(.85vw, 1.35vh), 15px); }

  /* 3 glasses: already one sticky screen; only the type scales */
  .glasses__stage { --copy-h: clamp(170px, 29vh, 380px); }
  .callout h2 { font-size: clamp(30px, min(3.4vw, 5.3vh), 70px); }
  .callout p { font-size: var(--fs-body); }

  /* 4 what it says: title, tabs and note on the left; the scene fills the right column's full height */
  .what__layout { column-gap: clamp(28px, 5vw, 96px); align-items: stretch; }
  .what__side { min-height: 0; }
  .what__title { font-size: var(--fs-h2); }
  .what__tabs { margin-top: clamp(18px, 4.4vh, 64px); }
  .tab { padding: clamp(10px, 2vh, 28px) 0 clamp(12px, 2.2vh, 30px); }
  .tab__name { font-size: clamp(20px, min(1.9vw, 3vh), 36px); }
  .tab__line { font-size: clamp(14px, min(1.05vw, 1.75vh), 19px); max-width: 34ch; }
  .what__note { margin-top: auto; padding-top: 1.6vh; font-size: var(--fs-small); }
  .what__stage { height: 100%; aspect-ratio: auto; }
  .said__tag { font-size: clamp(12px, min(.9vw, 1.5vh), 16px); }
  .said--without { font-size: clamp(18px, min(1.6vw, 2.7vh), 34px); }
  .said--with { font-size: clamp(20px, min(1.9vw, 3.1vh), 42px); }

  /* 5 how it works: the player takes the height that is left; the diagram and log share the column beside it */
  .how > .wrap { display: flex; flex-direction: column; }
  .how__head h2 { font-size: var(--fs-h2); max-width: 22ch; }
  .how__head p { font-size: var(--fs-body); }
  .picker { flex: none; margin-top: clamp(14px, 3vh, 44px); }
  .picker__name { font-size: clamp(15px, min(1.25vw, 2.1vh), 24px); }
  .picker__meta { font-size: clamp(12px, min(.9vw, 1.5vh), 15px); }
  .picker__btn { padding-bottom: clamp(10px, 1.6vh, 18px); }
  .how__body { flex: 1; min-height: 0; margin-top: clamp(12px, 2.2vh, 32px); container-type: size; grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .player { width: min(60cqw, calc((100cqh - 52px) * 1.1348)); }
  .system { height: 100cqh; grid-template-rows: minmax(0, 1fr) auto; }
  .diagram { width: 100%; height: 100%; }
  .log__head { font-size: var(--fs-small); }
  .log__list { max-height: clamp(76px, 24cqh, 240px); font-size: clamp(12px, min(.82vw, 1.4vh), 16px); }
  @container (min-aspect-ratio: 2.35 / 1) {   /* a wide, short body: put the log beside the diagram */
    .system { grid-template-columns: minmax(0, 1fr) minmax(240px, 36%); grid-template-rows: minmax(0, 1fr); }
    .log { display: flex; flex-direction: column; min-height: 0; }
    .log__list { max-height: none; flex: 1; min-height: 0; }
  }
  .how__note { flex: none; margin-top: clamp(10px, 1.6vh, 24px); font-size: clamp(11.5px, min(.85vw, 1.35vh), 14px); }

  /* 6a research: the claim on the left, the chart on the right */
  .research__top { align-items: center; }
  .research__lead h2 { font-size: var(--fs-h2); }
  .research__lead p { margin-top: clamp(14px, 2.6vh, 32px); font-size: var(--fs-body); }
  .research__lead .research__pubs { font-size: var(--fs-small); }
  .chart__title { font-size: clamp(16px, min(1.3vw, 2.1vh), 24px); }
  .chart__sub, .chart__src { font-size: var(--fs-small); }
  .chart__table { margin-top: clamp(14px, 2.4vh, 32px); }
  .chart__table th, .val { font-size: clamp(14px, min(1.05vw, 1.75vh), 19px); }
  .chart__table th, .chart__table td { padding-top: clamp(5px, 1.05vh, 14px); padding-bottom: clamp(5px, 1.05vh, 14px); }
  .bar { height: clamp(14px, 1.9vh, 26px); }

  /* 6b, 6c: VISTA's structure, then the papers; each one screen. The three research screens stack: each slides over the last */
  .research-stack > .screen { position: sticky; top: 0; }
  .research-stack > .screen + .screen { box-shadow: 0 -1px 0 var(--rule), 0 -28px 56px rgba(22, 24, 27, .07); }
  .vista-screen > .wrap, .papers-screen > .wrap { display: flex; flex-direction: column; justify-content: center; }
  .research__fig { margin-top: 0; padding: 0; border: 0; height: 100%; grid-template-rows: 100%; align-items: center; }
  .research__fig img { width: 100%; height: auto; max-height: 100%; object-fit: contain; }
  .research__fig h3, .papers__intro h3 { font-size: var(--fs-h2); }
  .research__fig figcaption p, .papers__intro p { font-size: var(--fs-body); margin-top: clamp(12px, 2.4vh, 28px); }
  .papers { margin-top: 0; align-items: center; }
  .papers__list { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(14px, 1.8vw, 36px); row-gap: clamp(20px, 4.4vh, 64px); }
  .papers__list li { grid-template-columns: 1fr; gap: clamp(6px, 1.2vh, 14px); padding: 0; border-top: 0; }
  .papers__list img { width: 100%; height: clamp(56px, 13vh, 200px); }
  .papers__name { font-size: clamp(14px, min(1.05vw, 1.75vh), 19px); }
  .papers__venue, .papers__with { font-size: clamp(12px, min(.88vw, 1.45vh), 16px); }

  /* content arrives as its screen comes up */
  .js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .js [data-reveal].in { opacity: 1; transform: none; }
  .js .chart[data-reveal], .js .research__fig[data-reveal] { transition-delay: .12s; }
  .js .papers__list[data-reveal] { transition-delay: .15s; }

  /* 7 team: founders on the left, the three groups on the right */
  /* left: title, text and the two founders; right: the three groups */
  .team__layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "head groups" "founders groups"; column-gap: clamp(24px, 5vw, 96px); row-gap: clamp(24px, 5vh, 72px); align-content: center; align-items: start; }
  .team__body { display: contents; }
  .team__head { grid-area: head; display: block; }
  .team__head p { margin-top: clamp(12px, 2.4vh, 28px); max-width: 46ch; }
  .founders { grid-area: founders; }
  .groups { grid-area: groups; align-self: center; }
  .team__head h2 { font-size: var(--fs-h2); }
  .team__head p { font-size: var(--fs-body); }
  .person--lead { display: block; }
  .person--lead .person__photo { width: clamp(80px, 17vh, 190px); }
  .person--lead .person__text { margin-top: clamp(10px, 1.6vh, 22px); }
  .person__name { font-size: clamp(18px, min(1.5vw, 2.4vh), 28px); }
  .person__role, .person__bio { font-size: clamp(13px, min(1vw, 1.65vh), 18px); }
  .groups { margin-top: 0; padding-top: 0; border-top: 0; grid-template-columns: 1fr 1fr; grid-template-areas: "g1 g2" "g3 g2"; row-gap: clamp(16px, 4vh, 56px); }
  .group:nth-child(1) { grid-area: g1; }
  .group:nth-child(2) { grid-area: g2; }
  .group:nth-child(3) { grid-area: g3; }
  .group:nth-child(2) ul { grid-template-columns: 1fr; }
  .group__name { font-size: clamp(14px, min(1.05vw, 1.75vh), 19px); margin-bottom: clamp(10px, 1.8vh, 22px); }
  .group ul { gap: clamp(10px, 1.8vh, 24px); }
  .group .person { grid-template-columns: clamp(44px, 6.4vh, 84px) 1fr; }
  .group .person__name { font-size: clamp(15px, min(1.1vw, 1.8vh), 20px); }

  /* 8 vision: both columns centred in the screen; the drawing is never taller than about 72% of the window */
  .vision { display: flex; flex-direction: column; justify-content: center; padding-top: var(--nav-h); padding-bottom: 0; }
  .vision > .wrap { height: auto; }
  .vision h2 { font-size: clamp(30px, min(3.3vw, 5.2vh, calc(min(100vw, var(--wrap)) * .036)), 72px); }
  .vision__text > p { font-size: var(--fs-body); }
  .vision__key dt { font-size: clamp(13px, min(1vw, 1.6vh), 18px); }
  .vision__key dd { font-size: var(--fs-small); }
  .vision__img { width: min(100%, calc(70vh * 1.933)); }

  /* 9 contact + footer: together exactly one screen */
  .contact { min-height: calc(100vh - var(--foot-h, 140px)); min-height: calc(100svh - var(--foot-h, 140px)); display: flex; flex-direction: column; justify-content: center; padding: calc(var(--nav-h) + var(--vpad)) 0 var(--vpad); }
  .contact h2 { font-size: clamp(40px, min(6vw, 9vh), 128px); }
  .contact__rows { margin-top: clamp(20px, 4.4vh, 64px); }
  .contact__rows a { padding: clamp(14px, 2.6vh, 36px) 0; }
  .row__who { font-size: clamp(19px, min(1.8vw, 2.9vh), 34px); }
  .row__what { font-size: var(--fs-body); }
  .row__cta { font-size: clamp(14px, min(1.05vw, 1.75vh), 19px); }
  .contact__mail { font-size: var(--fs-body); margin-top: clamp(16px, 2.6vh, 36px); }
}

/* short windows (small laptops with the browser chrome): tighten the densest screens */
@media (min-width: 900px) and (min-height: 560px) and (max-height: 700px) {
  .tab__line { display: none; }
  .contact h2 { font-size: clamp(36px, min(6vw, 8vh), 128px); }
  .contact__rows a { padding: clamp(10px, 2vh, 36px) 0; }
  .foot { padding-bottom: 22px; }
  .foot__row { padding-top: 20px; }
  .foot__small { margin-top: 10px; }
}

@media (prefers-reduced-motion: reduce) { .js [data-reveal] { opacity: 1; transform: none; } }

/* =====================================================================================================
   Level-3 headings: the labels that name a block of content (group names, column names, the log, the
   chart, the two lenses). One size between body text and section titles, full-strength colour.
   ===================================================================================================== */
:root { --fs-h3: clamp(18px, min(1.6vw, 2.5vh), 30px); }
.moments__label, .log__head, .chart__title, .group__name, .vision__key dt { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.moments__label, .log__head { color: var(--on-night); }
.chart__title, .group__name, .vision__key dt { color: var(--ink); }
/* "Without / With Avoria" marks a quote, not a block: one step up from before, still below the headings */
.said__tag { font-size: 14px; font-weight: 600; }
.said--without .said__tag { color: var(--ink-2); }
@media (min-width: 900px) and (min-height: 560px) {
  .moments__label, .log__head, .chart__title, .group__name, .vision__key dt { font-size: var(--fs-h3); }
  .said__tag { font-size: var(--fs-small); }
}
