/*! motion-engine components v0.1.0 (prototype). Shared page grammar for both sites.
   Brands supply variables (see each site's brand.css); structure and rhythm live here. */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--accent);
  scrollbar-color: var(--rule-strong) var(--ground);
}
::selection { background: var(--selection-bg); color: var(--selection-ink); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: var(--leading-snug);
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 60;
  padding: 0.6rem 0.9rem; border-radius: 6px; background: var(--ink); color: var(--ground);
}
.skip:focus { top: 0.75rem; }

/* ---------- Tones: a band sets its own ground and ink ---------- */
.tone, [class*="tone-"] { background: var(--ground); color: var(--ink); }
.section--flush-top { padding-top: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--ground) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.site-header > .wrap {
  display: flex; align-items: center; gap: var(--space-5);
  min-height: 4.25rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; margin-right: auto; }
.nav ul { display: flex; gap: var(--space-5); }
.nav a { text-decoration: none; font-size: var(--step--1); color: var(--ink-muted); font-weight: 500; }
.nav a:hover { color: var(--ink); }
.pause {
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: 2.75rem; padding: 0.3rem 0.85rem 0.3rem 0.65rem;
  border: 1px solid var(--rule-strong); border-radius: 999px;
  background: transparent; color: var(--ink-muted);
  font: 500 var(--step--1)/1 var(--font-body); cursor: pointer;
}
.pause:hover { color: var(--ink); border-color: var(--ink-muted); }
.pause svg { width: 1rem; height: 1rem; }
.pause[aria-pressed="true"] .icon-pause, .pause[aria-pressed="false"] .icon-play { display: none; }
.button {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.55rem 1.15rem;
  border-radius: var(--button-radius);
  background: var(--button-bg); color: var(--button-ink);
  font: 600 var(--step--1)/1.1 var(--font-body);
  text-decoration: none; white-space: nowrap;
  transition: background var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.button:hover { background: var(--button-bg-hover); }
.button:active { transform: translateY(1px); }

.menu-toggle {
  display: none; align-items: center; gap: 0.45rem;
  min-height: 2.75rem; padding: 0.3rem 0.8rem; border-radius: 999px;
  border: 1px solid var(--rule-strong); background: transparent; color: var(--ink);
  font: 600 var(--step--1)/1 var(--font-body); cursor: pointer;
}
.menu-toggle svg { width: 1rem; height: 1rem; }
.menu-toggle[aria-expanded="true"] .icon-menu, .menu-toggle[aria-expanded="false"] .icon-close { display: none; }
.menu-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--ground);
  box-shadow: 0 18px 40px -18px rgb(0 0 0 / 0.35);
}
.menu-panel ul { display: grid; padding-block: var(--space-4) var(--space-6); }
.menu-panel a {
  display: block; padding-block: 0.85rem; border-bottom: 1px solid var(--rule);
  font: var(--display-weight) var(--step-2)/1.1 var(--font-display); letter-spacing: var(--display-tracking);
  text-decoration: none;
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: clip; }
.hero .wrap {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter);
  align-items: center;
  min-height: min(calc(100svh - 4.25rem), 58rem);
  padding-block: var(--space-8) var(--space-9);
}
.hero__text { grid-column: 1 / span 6; position: relative; z-index: 2; }
.hero__motif { grid-column: 7 / span 6; }
.beats {
  font-size: var(--step-hero);
  line-height: var(--leading-tight);
  letter-spacing: var(--hero-tracking, var(--display-tracking));
}
.beats > span { display: block; }
.beats .stop { color: var(--stop, var(--accent)); }
.hero__lede { margin-top: var(--space-6); max-width: 32rem; font-size: var(--step-1); line-height: 1.5; color: var(--ink-muted); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-5); margin-top: var(--space-7); }
.hero__actions .lens { margin-top: 0; }

/* Motif: an SVG with HTML labels placed in its coordinate space (viewBox 560 x 520). */
.motif { position: relative; width: 100%; max-width: 34rem; margin-inline: auto; aspect-ratio: 560 / 520; }
.motif > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.motif-label {
  position: absolute; left: calc(var(--x) / 560 * 100%); top: calc(var(--y) / 520 * 100%);
  transform: translate(-50%, -50%);
  font: 600 var(--step--1)/1.1 var(--font-label, var(--font-body));
  letter-spacing: 0.01em; white-space: nowrap; color: var(--ink);
}
.motif-label small { display: block; font-weight: 400; color: var(--ink-muted); margin-top: 0.2rem; letter-spacing: 0; }

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section-head { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); margin-bottom: var(--space-8); }
.section-head > * { grid-column: 1 / span 7; }
.section-head h2 { font-size: var(--step-4); line-height: 1.04; }
.section-head .lede { margin-top: var(--space-5); font-size: var(--step-1); line-height: 1.5; color: var(--ink-muted); max-width: var(--measure); }
.tag {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font: 600 var(--step--1)/1 var(--font-label, var(--font-body)); color: var(--ink-muted);
  margin-bottom: var(--space-5);
}
.tag svg { width: 1.6rem; height: 1.6rem; }

/* Editorial rows: hairline-separated, never boxed cards. */
.rows { border-top: 1px solid var(--rule); }
.rows > li {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter);
  padding-block: var(--space-6); border-bottom: 1px solid var(--rule);
}
.rows h3 { grid-column: 1 / span 4; font-size: var(--step-2); line-height: 1.15; }
.rows p { grid-column: 5 / span 7; color: var(--ink-muted); max-width: var(--measure); }
.rows .row-meta { grid-column: 5 / span 7; margin-top: var(--space-3); font-size: var(--step--1); color: var(--ink-muted); }
.rows a.more { grid-column: 12 / span 1; justify-self: end; align-self: start; text-decoration: none; color: var(--accent); font-weight: 600; }

.columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-7) var(--gutter); }
.columns > * { border-top: 2px solid var(--rule-strong); padding-top: var(--space-5); }
.columns h3 { font-size: var(--step-2); line-height: 1.15; margin-bottom: var(--space-3); }
.columns p { color: var(--ink-muted); }

/* ---------- Lens links: switch to the same chapter on the partner site ---------- */
.lens {
  display: inline; font-weight: 600; font-size: var(--step--1); line-height: 1.6; color: var(--accent);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.32em;
}
.together .lens { display: inline-block; max-width: 30rem; margin-top: var(--space-6); }
.lens svg { display: inline-block; width: 1rem; height: 1rem; margin-left: 0.35rem; vertical-align: -0.2em; transition: transform var(--t-base) var(--ease-out); }
.lens:hover svg { transform: translateX(3px); }

/* ---------- Chapters: four steps of one year, two lenses ---------- */
.chapters { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8) var(--gutter); }
.chapter {
  display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); column-gap: var(--space-5); align-items: start;
  padding-top: var(--space-6); border-top: 1px solid var(--rule);
}
.chapter__wheel { width: 100%; height: auto; }
.chapter__wheel .ring { stroke: var(--kit-faint); stroke-width: 3; }
.chapter__wheel .progress { stroke: var(--loop); stroke-width: 5; stroke-dasharray: var(--p) 1; stroke-dashoffset: 0; }
.chapter__wheel .node { fill: var(--ground); stroke: var(--kit-faint); stroke-width: 2.5; }
.chapter__wheel .node.on { fill: var(--loop); stroke: var(--loop); }
.chapter__wheel-num { font: 600 21px var(--font-label, var(--font-body)); fill: var(--ink); letter-spacing: 0.02em; }
html.motion [data-scene] .chapter__wheel .progress { stroke-dashoffset: var(--p); }
html.motion [data-scene].is-playing .chapter__wheel .progress { animation: kit-progress 900ms var(--ease-in-out) 0.15s forwards; }
.chapter__num { font: 500 var(--step--1)/1 var(--font-mono, var(--font-body)); color: var(--accent); letter-spacing: 0.04em; }
.chapter h3 { font-size: var(--step-2); line-height: 1.12; margin-top: var(--space-3); }
.chapter__body > p:not(.chapter__num) { margin-top: var(--space-3); font-size: var(--step-0); line-height: 1.55; color: var(--ink-muted); max-width: 32rem; }
.chapter__picture { position: relative; margin-top: var(--space-5); padding: var(--space-5) var(--space-4) var(--space-4); border: 1px solid var(--rule); border-radius: 8px; text-align: center; }
.chapter__note {
  position: absolute; top: 0.6rem; right: 0.75rem;
  font: 600 0.7rem/1 var(--font-label, var(--font-body)); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted);
}
.chapter .lens { display: inline-block; margin-top: var(--space-5); text-wrap: balance; }
.subhead { margin-bottom: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--rule); }
.subhead h3 { font-size: var(--step-3); line-height: 1.08; }
.subhead p { margin-top: var(--space-3); color: var(--ink-muted); font-size: var(--step-1); }

/* ---------- Together: the infinity ---------- */
.together { text-align: center; }
.together h2 { font-size: var(--step-4); line-height: 1.04; }
.together .infinity { position: relative; width: 100%; max-width: 54rem; margin: var(--space-7) auto 0; aspect-ratio: 760 / 360; }
.together .infinity > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.together .infinity .vdb-arc { stroke-width: 4.5; }
.together .infinity .hls-ring { stroke: var(--hls-loop); stroke-width: 4.5; }
.together .infinity .hls-node { fill: var(--ground); stroke: var(--hls-loop); stroke-width: 2.5; }
.together .infinity .joint { fill: var(--joint); }
.together .infinity .joint-glow { fill: var(--joint); fill-opacity: 0.16; } /* fill-opacity: the ignite animation owns opacity */
.together__halves { display: grid; grid-template-columns: 1fr 1fr; max-width: 54rem; margin: var(--space-5) auto 0; padding-inline: calc(40 / 760 * 100%); }
.together__halves > div { padding-inline: var(--space-4); }
.together__halves span { display: block; margin-bottom: var(--space-3); font: 600 var(--step--1)/1.2 var(--font-label, var(--font-body)); color: var(--ink-muted); letter-spacing: 0.01em; }
.together__line { font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(1.5rem, 1.1rem + 1.3vw, 2.25rem); line-height: 1.1; letter-spacing: var(--display-tracking); white-space: nowrap; }
.together__role { margin: var(--space-4) auto 0; max-width: 22rem; color: var(--ink-muted); line-height: 1.55; text-wrap: balance; }
.together__lede { margin-top: var(--space-4); font-size: var(--step-1); color: var(--ink-muted); }
.together .lens { margin-top: var(--space-6); }

/* ---------- Contact ---------- */
.contact .wrap { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); align-items: end; }
.contact h2 { grid-column: 1 / span 7; font-size: var(--step-4); line-height: 1.04; }
.contact__body { grid-column: 8 / span 5; }
.contact__body p { color: var(--ink-muted); }
.contact__email {
  display: inline-block; margin-top: var(--space-5);
  font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--step-2);
  color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px;
  word-break: break-word;
}
.contact__note { margin-top: var(--space-4); font-size: var(--step--1); }

/* ---------- Footer ---------- */
.site-footer { padding-block: var(--space-8) var(--space-7); border-top: 1px solid var(--rule); font-size: var(--step--1); color: var(--ink-muted); }
.site-footer .wrap { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: var(--space-6); }
.site-footer__brand { grid-column: 1 / span 5; }
.site-footer__links { grid-column: 7 / span 6; display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); justify-content: flex-end; }
.site-footer__links a { text-decoration: none; }
.site-footer__legal {
  grid-column: 1 / -1; padding-top: var(--space-5); border-top: 1px solid var(--rule);
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: var(--space-2) var(--space-6);
}
.site-footer__legal > p:not(.site-footer__policies) { grid-column: 1; }
.site-footer__policies { grid-column: 2; grid-row: 1; display: flex; gap: var(--space-4); }
.site-footer__policies a { text-decoration: none; }
.footer-lockup { margin-top: var(--space-4); font: var(--display-weight) var(--step-1)/1.15 var(--font-display); color: var(--ink); letter-spacing: -0.01em; }
.brand__break { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  html.js .menu-toggle { display: inline-flex; }
  html:not(.js) .nav { display: block; flex-basis: 100%; order: 9; padding-bottom: var(--space-3); }
  html:not(.js) .site-header > .wrap { flex-wrap: wrap; }
  html:not(.js) .nav ul { flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
  .together__body { text-align: left; }
  .chapters { grid-template-columns: 1fr; gap: var(--space-7); }
  .chapter { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .menu-panel { height: calc(100svh - 4.25rem); overflow-y: auto; }
  .site-footer__legal { grid-template-columns: 1fr; }
  .site-footer__policies { grid-column: 1; grid-row: auto; }
  .hero .wrap { min-height: auto; padding-block: var(--space-7) var(--space-8); row-gap: var(--space-7); }
  .hero__text, .hero__motif { grid-column: 1 / -1; }
  .hero__motif .motif { max-width: 26rem; }
  .section-head > * { grid-column: 1 / -1; }
  .section-head { margin-bottom: var(--space-6); }
  .rows h3, .rows p, .rows .row-meta { grid-column: 1 / -1; }
  .rows p { margin-top: var(--space-3); }
  .rows a.more { grid-column: 1 / -1; justify-self: start; margin-top: var(--space-3); }
  .columns { grid-template-columns: 1fr; }
  .contact h2, .contact__body { grid-column: 1 / -1; }
  .contact__body { margin-top: var(--space-5); }
  .site-footer__brand, .site-footer__links { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 600px) {
  .site-header > .wrap { gap: var(--space-3); }
  .pause [data-pause-label], .menu-toggle [data-menu-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .pause, .menu-toggle { padding: 0.3rem 0.6rem; min-width: 2.75rem; justify-content: center; }
  .header-cta { min-height: 2.25rem; padding: 0.4rem 0.8rem; }
  .together__halves { padding-inline: 0; }
  .together__halves > div { padding-inline: var(--space-2); }
  .together__line { font-size: 1.3rem; white-space: normal; }
  .together__role { font-size: 0.86rem; }
  .together__halves span { min-height: 2.5em; }
  .chapter { grid-template-columns: 3.75rem minmax(0, 1fr); column-gap: var(--space-4); }
}
