/* Flow Control and Coordinated Robotics Labs, UC San Diego
   Base, layout primitives, nav, footer, print. Depends on tokens.css. */

/* ---------- reset and base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1rem); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: var(--fs-body); line-height: var(--lh-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, video, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--font-serif); font-weight: 500; line-height: 1.05; letter-spacing: -0.012em; text-wrap: balance; color: var(--ink); }
h1 { font-size: var(--fs-display); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.2; }
h4 { margin: 0; font-family: var(--font-sans); font-weight: 600; font-size: var(--fs-body); }
p { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration: none; text-underline-offset: 0.16em; text-decoration-thickness: 1px; }
.prose a, p a { text-decoration: underline; text-decoration-color: var(--line-strong); transition: text-decoration-color var(--t-base); }
.prose a:hover, p a:hover { text-decoration-color: var(--accent-ink); color: var(--accent-ink); }
ul, ol { margin: 0; padding: 0; list-style: none; }
small, .small { font-size: var(--fs-small); }
strong { font-weight: 600; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; padding: 0.5rem 1rem; background: var(--ink); color: #fff; }
.skip:focus { left: 1rem; top: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- small type ---------- */
.eyebrow { display: block; font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 1.25rem; }
.lede { font-size: var(--fs-lede); line-height: 1.4; color: var(--ink-2); max-width: 40ch; }
.prose { max-width: var(--measure); color: var(--ink-2); }
.prose strong { color: var(--ink); }
.muted { color: var(--ink-3); }
.source { font-size: var(--fs-label); color: var(--ink-3); max-width: none; }

/* ---------- layout ---------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--content)); margin-inline: auto; }
.wrap--wide { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; }
.section { padding-block: var(--section-pad); }
.section--mist { background: var(--bg-mist); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.stack > * + * { margin-top: 1.5rem; }
.stack--lg > * + * { margin-top: clamp(2.5rem, 5vw, 4rem); }
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head .lede { margin-top: 1.25rem; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .lede { margin-inline: auto; }
.split { display: grid; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .split--wide-media { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .split--flip > :first-child { order: 2; }
  .split--top { align-items: start; }
}
.cols { display: grid; gap: clamp(2rem, 4vw, 3.5rem); }
@media (min-width: 720px) { .cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- hero (full-bleed video) ---------- */
.hero { position: relative; min-height: min(92svh, 60rem); display: grid; align-items: end; isolation: isolate; background: #0a0e0c; color: #fff; margin-top: var(--nav-h); }
.hero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__media video, .hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after { content: ""; position: absolute; inset: 0; background: var(--scrim), linear-gradient(90deg, rgba(10, 14, 12, 0.62) 0%, rgba(10, 14, 12, 0.28) 45%, rgba(10, 14, 12, 0) 75%); }
.hero__copy { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem); max-width: 46rem; text-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.hero__copy h1 { color: #fff; margin-bottom: 1.25rem; }
.hero__copy .lede { color: rgba(255, 255, 255, 0.86); }
.hero__copy .eyebrow { color: #8fe08c; }
.hero__actions { display: flex; gap: 1rem 1.75rem; flex-wrap: wrap; align-items: center; margin-top: 2rem; }

/* light page header for projects without hero video */
.page-head { padding-top: calc(var(--nav-h) + clamp(3rem, 7vw, 6rem)); }
.page-head h1 { font-size: clamp(2.5rem, 5.5vw, 4.5rem); }
.team__name a:hover { color: var(--accent-ink); }

/* ---------- renovation notice ---------- */
.notice { background: var(--accent-soft); border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-small); padding: 0.8rem 0; text-align: center; }
.notice a { text-decoration: underline; text-decoration-color: var(--line-strong); }
.notice a:hover { color: var(--accent-ink); }
.hero--home { min-height: min(80svh, 52rem); }
.hero--home h1 { max-width: 16ch; }

/* ---------- section nav (page jump bar) ---------- */
.subnav { position: sticky; top: var(--nav-h); z-index: 30; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.subnav ul { display: flex; gap: clamp(1rem, 2.5vw, 2.25rem); overflow-x: auto; scrollbar-width: none; padding-block: 0.9rem; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a { position: relative; white-space: nowrap; font-size: var(--fs-small); font-weight: 500; color: var(--ink-3); padding: 0.2rem 0 0.35rem; transition: color 300ms; }
.subnav a::after { content: ""; position: absolute; right: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); transition: width 300ms var(--ease-sine); }
.subnav a:hover, .subnav a.is-active { color: var(--ink); }
.subnav a:hover::after, .subnav a.is-active::after { width: 100%; left: 0; right: auto; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 3.25rem; padding: 0 1.6rem; border-radius: 999px; font-weight: 600; font-size: var(--fs-small); background: var(--ink); color: #fff; transition: background var(--t-base), color var(--t-base); }
.btn:hover { background: var(--accent-ink); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--accent-soft); color: var(--ink); }
.btn--ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.55); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn--outline { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn--outline:hover { border-color: var(--accent-ink); color: var(--accent-ink); background: transparent; }
.link { font-weight: 600; color: var(--accent-ink); font-size: var(--fs-small); }
.link::after { content: " \2192"; }
.link:hover { text-decoration: underline; }

/* ---------- figure ---------- */
.fig { margin: 0; }
.fig__media { position: relative; background: var(--bg-mist) center / cover no-repeat; overflow: hidden; border-radius: 6px; }
.fig__media > img, .fig__media > video, .fig__media > picture > img { width: 100%; height: 100%; object-fit: cover; }
.fig--square .fig__media { aspect-ratio: 1; }
.fig--wide .fig__media { aspect-ratio: 16 / 9; }
.fig--video .fig__media { aspect-ratio: 4 / 3; }
.fig--portrait .fig__media { aspect-ratio: 4 / 5; }
.fig--contain .fig__media > img, .fig--contain .fig__media > picture > img { object-fit: contain; }
.fig--white .fig__media { background: #fff; border: 1px solid var(--line); }
.fig figcaption { padding-top: 0.8rem; color: var(--ink-3); font-size: var(--fs-small); line-height: 1.45; }
.fig__poster { display: none; }
.fig-grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
@media (min-width: 720px) { .fig-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* full-width media band */
.band { position: relative; overflow: hidden; background: #0a0e0c center / cover no-repeat; width: 100%; height: min(43.75vw, 88svh); }
.band video, .band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band--32 { height: min(66.67vw, 88svh); }
.band__caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.5rem var(--gutter) 1.25rem; color: rgba(255, 255, 255, 0.9); font-size: var(--fs-small); background: linear-gradient(180deg, rgba(10,14,12,0) 0%, rgba(10,14,12,0.6) 100%); }

/* ---------- stats ---------- */
.stats { display: grid; gap: 2.5rem 3rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.stat__value { font-family: var(--font-serif); font-size: clamp(2.75rem, 5vw, 4.5rem); font-weight: 500; line-height: 1; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat__value small { font-size: 0.42em; font-family: var(--font-sans); font-weight: 500; color: var(--ink-3); margin-left: 0.2em; letter-spacing: 0; white-space: nowrap; }
.stat__value--unit-line small { display: block; font-size: 0.3em; margin: 0.35rem 0 0; letter-spacing: 0.02em; }
.stat__label { margin-top: 0.9rem; color: var(--ink-2); max-width: 24ch; }
.stat__source { display: block; margin-top: 0.4rem; font-size: var(--fs-label); color: var(--ink-3); }

/* ---------- compare lists ---------- */
.compare { display: grid; gap: 2rem; }
@media (min-width: 720px) { .compare { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 4rem); } }
.compare h3 { font-family: var(--font-sans); font-weight: 600; font-size: 1.0625rem; letter-spacing: 0.02em; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--line-strong); }
.compare li { position: relative; padding: 0.55rem 0 0.55rem 1.75rem; color: var(--ink-2); }
.compare li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--line-strong); }
.compare--ours li::before { background: var(--accent); }

/* ---------- numbered steps ---------- */
.steps { display: grid; gap: 2rem; counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.5rem); } }
.steps li { counter-increment: step; padding-top: 1.25rem; border-top: 1px solid var(--line-strong); }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--font-serif); font-size: 1.5rem; color: var(--accent-ink); margin-bottom: 0.75rem; }
.steps h3 { font-family: var(--font-sans); font-weight: 600; font-size: 1.25rem; margin-bottom: 0.6rem; }
.steps p { color: var(--ink-2); font-size: var(--fs-small); line-height: 1.5; }

/* ---------- model showcase ---------- */
.models { display: grid; gap: clamp(2rem, 4vw, 3rem); }
@media (min-width: 720px) { .models { grid-template-columns: repeat(3, minmax(0, 1fr)); } .models--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 60rem; margin-inline: auto; } }
.model { display: flex; flex-direction: column; }
.model__media { aspect-ratio: 4 / 3; background: #f7f8f7; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.model__media img { width: 100%; height: 100%; object-fit: cover; }
.model__media--contain img { object-fit: contain; padding: 2%; }
.model__tag { font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-top: 1.5rem; }
.model h3 { margin-top: 0.4rem; }
.model ul { margin-top: 1rem; display: grid; gap: 0.45rem; }
.model li { position: relative; padding-left: 1.25rem; color: var(--ink-2); font-size: var(--fs-small); }
.model li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--accent); }
.model .link { margin-top: auto; padding-top: 1.25rem; }

/* ---------- timeline ---------- */
.timeline { display: grid; gap: 2rem; }
@media (min-width: 960px) { .timeline { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem; } }
.timeline li { position: relative; padding-top: 1.25rem; border-top: 2px solid var(--line-strong); }
.timeline li.is-now { border-top-color: var(--accent); }
.timeline li.is-next { border-top-style: dashed; }
.timeline__when { display: block; font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 0.6rem; }
.timeline h3 { font-family: var(--font-sans); font-weight: 600; font-size: 1.1875rem; margin-bottom: 0.5rem; }
.timeline p { color: var(--ink-2); font-size: var(--fs-small); line-height: 1.5; }

/* phases wrap the timeline */
.phases { display: grid; gap: clamp(2rem, 4vw, 3rem); }
@media (min-width: 960px) { .phases { grid-template-columns: 3fr 1fr; gap: clamp(2.5rem, 5vw, 4rem); } }
.phase__label { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; font-family: var(--font-serif); font-size: 1.375rem; padding-bottom: 0.75rem; margin-bottom: 1.5rem; border-bottom: 2px solid var(--ink); }
.phase__label .muted { font-family: var(--font-sans); font-size: var(--fs-small); }
.phase--now .phase__label { border-bottom-color: var(--accent); }
.timeline--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.timeline--1 { grid-template-columns: 1fr; }
@media (max-width: 959px) { .timeline--3 { grid-template-columns: 1fr; } }

/* ---------- publications ---------- */
.pubs li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem; padding: 1.4rem 0; border-top: 1px solid var(--line); }
.pubs li:last-child { border-bottom: 1px solid var(--line); }
.pubs__year { font-weight: 600; color: var(--accent-ink); padding-top: 0.15rem; font-size: var(--fs-small); }
.pubs__title { font-family: var(--font-serif); font-weight: 500; font-size: 1.25rem; line-height: 1.3; }
.pubs__meta { display: block; margin-top: 0.4rem; color: var(--ink-3); font-size: var(--fs-small); }
.pubs__links { margin-top: 0.6rem; display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* ---------- book list ---------- */
.booklist { margin-top: 1rem; display: grid; gap: 0.6rem; }
.booklist li { display: grid; gap: 0.1rem; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.booklist a { font-weight: 600; color: var(--ink); }
.booklist a:hover { color: var(--accent-ink); }
.booklist span { font-size: var(--fs-small); color: var(--ink-3); }

/* ---------- books ---------- */
.books { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 960px) { .books { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.book { display: block; color: inherit; }
.book:hover .cover { border-color: var(--accent); }
.book:hover .cover__title { color: var(--accent-ink); }
.cover { aspect-ratio: 3 / 4; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(1rem, 2vw, 1.5rem); background: #fff; border: 1px solid var(--line-strong); border-left: 6px solid var(--ink); border-radius: 4px; transition: border-color 300ms; }
.cover--accent { border-left-color: var(--accent); }
.cover__press { font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.cover__title { font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.25rem, 1.8vw, 1.75rem); line-height: 1.1; color: var(--ink); transition: color 300ms; }
.cover__sub { margin-top: 0.6rem; font-size: var(--fs-label); line-height: 1.4; color: var(--ink-2); }
.cover__author { font-size: var(--fs-label); color: var(--ink-3); }
.book__meta { margin-top: 0.9rem; font-size: var(--fs-small); color: var(--ink-3); }
.cover--large { max-width: 22rem; }
blockquote.preface { margin: 0; padding: 0 0 0 1.5rem; border-left: 3px solid var(--accent); color: var(--ink-2); font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.5; max-width: 62ch; }
blockquote.preface p + p { margin-top: 1em; }
blockquote.preface cite { display: block; margin-top: 1rem; font-family: var(--font-sans); font-style: normal; font-size: var(--fs-small); color: var(--ink-3); }
.chapters { display: grid; gap: 0.25rem 3rem; counter-reset: none; }
@media (min-width: 720px) { .chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chapters li { display: grid; grid-template-columns: 2.5rem 1fr; gap: 0.75rem; padding: 0.6rem 0; border-top: 1px solid var(--line); font-size: var(--fs-small); }
.chapters .num { color: var(--accent-ink); font-weight: 600; }
.chapters a { color: var(--ink); } .chapters a:hover { color: var(--accent-ink); text-decoration: underline; }
.chapters .muted { color: var(--ink-3); }
.chapters__code { margin-left: 0.6rem; font-size: var(--fs-label); color: var(--accent-ink); }
.chapters__code::before { content: "\00b7 "; color: var(--ink-3); }

/* ---------- team ---------- */
.team { display: grid; gap: 1.75rem 2rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.team li { padding-top: 1rem; border-top: 1px solid var(--line); }
.team__name { display: block; font-weight: 600; font-size: 1.125rem; }
.team__role { display: block; margin-top: 0.3rem; color: var(--ink-3); font-size: var(--fs-small); }

/* ---------- project index rows ---------- */
.rows li { display: grid; gap: 0.4rem 2rem; padding: 1.5rem 0; border-top: 1px solid var(--line); align-items: baseline; }
.rows li:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 960px) { .rows li { grid-template-columns: 17rem 1fr auto; } }
.rows__title { font-family: var(--font-serif); font-weight: 500; font-size: 1.375rem; line-height: 1.2; color: var(--ink); transition: color 300ms; }
a.rows__title:hover { color: var(--accent-ink); }
.rows__desc { color: var(--ink-2); font-size: var(--fs-small); max-width: 56ch; }
.rows__soon { font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.rows .is-soon .rows__title, .rows .is-soon .rows__desc { color: var(--ink-3); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h); display: flex; align-items: center; gap: 2rem; padding-inline: var(--gutter); background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color var(--t-base); }
.nav--scrolled { border-bottom-color: var(--line); }
.nav__brand { display: flex; align-items: center; gap: 0.9rem; margin-right: auto; }
.nav__mark { width: 2.5rem; height: 2.5rem; }
.nav__name { font-family: var(--font-serif); font-weight: 500; font-size: 1.125rem; line-height: 1.15; }
.nav__name small { display: block; font-family: var(--font-sans); font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-top: 0.15rem; }
.nav__menu { display: none; align-items: center; gap: 0.25rem; }
.nav__item > a, .nav__item > button { position: relative; display: inline-flex; align-items: center; gap: 0.4rem; height: var(--nav-h); padding: 0 0.9rem; font: inherit; font-weight: 500; font-size: var(--fs-small); letter-spacing: 0.02em; color: var(--ink-2); background: none; border: 0; cursor: pointer; transition: color 300ms; }
.nav__item > a::after, .nav__item > button::after { content: ""; position: absolute; left: auto; right: 0.9rem; bottom: 0; height: 2px; width: 0; background: var(--accent); transition: width 300ms var(--ease-sine); }
.nav__item > a:hover, .nav__item > button:hover, .nav__item.is-open > button, .nav__item > a[aria-current="page"] { color: var(--ink); }
.nav__item > a:hover::after, .nav__item > button:hover::after, .nav__item.is-open > button::after, .nav__item > a[aria-current="page"]::after { width: calc(100% - 1.8rem); left: 0.9rem; right: auto; }
.nav__item > button .chev { width: 0.45rem; height: 0.45rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 300ms var(--ease-sine); }
.nav__item.is-open > button .chev { transform: translateY(1px) rotate(225deg); }
.nav__item--drop { position: relative; }
.nav__drop { position: absolute; top: 100%; left: 0; margin-top: -2px; min-width: 20rem; background: #fff; border: 1px solid var(--line); border-top: 2px solid var(--accent); border-radius: 0 0 8px 8px; padding: 0.25rem 0; box-shadow: 0 18px 40px -20px rgba(20, 26, 23, 0.35); opacity: 0; transform: translateY(20px); visibility: hidden; transition: opacity 250ms var(--ease-sine), transform 250ms var(--ease-sine), visibility 0s linear 250ms; }
.nav__item.is-open .nav__drop, .nav__item--drop:focus-within .nav__drop { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
/* the last menu opens toward the left so it never leaves the viewport */
.nav__item--drop:last-child .nav__drop { left: auto; right: 0; border-radius: 0 0 8px 8px; }
.nav__drop a small { white-space: normal; }
.nav__drop a { display: block; padding: 0.85rem 1.1rem; font-size: var(--fs-small); color: var(--ink); transition: color 300ms, background 300ms; }
.nav__drop a + a { border-top: 1px solid var(--line); }
.nav__drop a small { display: block; color: var(--ink-3); font-size: var(--fs-label); margin-top: 0.1rem; }
.nav__drop a:hover { background: var(--bg-mist); }
.nav__drop a.is-soon { color: var(--ink-3); }
.nav__toggle { appearance: none; background: none; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink); font: inherit; font-size: var(--fs-small); font-weight: 500; padding: 0.5rem 1rem; cursor: pointer; }
@media (min-width: 960px) { .nav__menu { display: flex; } .nav__toggle { display: none; } }
@media (max-width: 959px) {
  .nav__name small { display: none; }
  .nav__name { font-size: 1rem; white-space: nowrap; }
  .nav__brand { gap: 0.6rem; }
  body.menu-open .nav__menu { display: flex; flex-direction: column; align-items: stretch; gap: 0; position: fixed; inset: var(--nav-h) 0 0 0; background: #fff; padding: 1rem var(--gutter) 2rem; overflow-y: auto; }
  body.menu-open .nav__item > a, body.menu-open .nav__item > button { width: 100%; justify-content: space-between; padding: 1rem 0; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1.125rem; }
  body.menu-open .nav__item > a, body.menu-open .nav__item > button { height: auto; }
  body.menu-open .nav__item > a::after, body.menu-open .nav__item > button::after { display: none; }
  body.menu-open .nav__drop { position: static; opacity: 1; transform: none; visibility: visible; margin: 0; box-shadow: none; border: 0; border-radius: 0; padding: 0 0 0.5rem 1rem; display: none; }
  body.menu-open .nav__item.is-open .nav__drop { display: block; }
  body.menu-open { overflow: hidden; }
  body.menu-open .nav { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; border-bottom-color: var(--line); }
}

/* ---------- footer ---------- */
.footer { background: var(--bg-mist); border-top: 1px solid var(--line); padding-block: 3.5rem 2.5rem; color: var(--ink-2); font-size: var(--fs-small); }
.footer__grid { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .footer__grid { grid-template-columns: 1.5fr 1fr 1fr auto; } }
.footer__qr { display: flex; gap: 1rem; align-items: flex-start; }
.footer__qr img { width: 9.5rem; height: 9.5rem; flex: none; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 0.4rem; }
.footer__qr p { font-size: var(--fs-small); color: var(--ink-3); max-width: 15rem; }
.footer__qr a { color: var(--ink-2); word-break: break-all; }
.footer__brand { display: flex; gap: 1.25rem; align-items: flex-start; }
.footer__logo { width: 4.5rem; flex: none; }
.footer h4 { font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.9rem; }
.footer ul li { padding: 0.25rem 0; }
.footer a:hover { color: var(--accent-ink); }
.footer__legal { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; gap: 1rem 2rem; flex-wrap: wrap; justify-content: space-between; color: var(--ink-3); font-size: var(--fs-label); }

/* videos stay invisible (poster background shows) until a frame is actually playing */
video[data-src] { opacity: 0; transition: opacity var(--t-slow) var(--ease); }
video[data-src].is-playing { opacity: 1; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity var(--t-reveal) var(--ease-out-expo), transform var(--t-reveal) var(--ease-out-expo); }
@media (max-width: 767px) { .reveal { opacity: 1; transform: none; transition: none; } }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  video[autoplay] { display: none; }
  .fig__poster { display: block; }
}
@media print {
  .nav, .subnav, .skip, .btn, .hero__actions, .footer__legal, video { display: none !important; }
  .footer__qr img { width: 9rem; height: 9rem; }
  .fig__poster { display: block !important; }
  .hero { margin-top: 0; min-height: 0; color: var(--ink); background: #fff; }
  .hero__media { position: static; max-height: 45vh; } .hero__media::after { display: none; }
  .hero__copy h1, .hero__copy .lede { color: var(--ink); }
  .section { padding-block: 1.5rem; break-inside: avoid; }
  .band { aspect-ratio: auto; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: var(--ink-3); }
}
