/* static-story.css: /story/, "Sticky years" (BRIEF §2.2). Linked after static.css on this page only.
   The moment: each year is a scene on its own ground (ink/paper alternate). Its sticky column (year numeral, count,
   her portrait of that year) holds while the rows scroll, then the next year's column pushes it off. position: sticky
   only, so it works with no JS and under reduced motion. Her media: crop/resize/mask only (object-fit, object-position,
   border-radius, clip-path). No filter, blend, gradient, scrim or text over any photo or video. */

/* ------------------------------------------------------------ hero */
.hx--story .hx__chips nav { display: block; }
/* the H1 is sized by the shell (its longest word, "2019–2026", measured); the count sits on its last line */
/* desktop: the H1 fills the measure ("2019–2026" on one line, measured), so the count sits in the free end of its
   first line, just after "Her story," (4.08em in Akt 900), top-aligned like a superscript; out of the flow, so the H1
   keeps the full measure and never breaks at the dash */
@media (min-width: 761px) {
  .hx--story .hx__title { position: relative; display: block; }
  .hx--story .hx__n { position: absolute; left: calc(var(--h1-fs) * 4.22); top: calc(var(--h1-fs) * .1); margin: 0; }
}
.hx--story .chip small { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ a year: sticky column + rows */
.yr {
  --yr-side: clamp(300px, 33vw, 600px);
  --yr-fs: min(var(--t-year), calc((var(--yr-side) - 96px) / 2.2));
  --yr-top: 28px;
  padding: 0 var(--gut); overflow-x: clip;
}
/* touch screens: a year off screen is not styled, laid out or painted until it nears the viewport (FIX-PLAN A4; fine
   pointers keep every year rendered, see css/static.css); the sticky band still sticks, containment makes no scroller */
@media not all and (hover: hover) and (pointer: fine) {
  .yr { content-visibility: auto; contain-intrinsic-size: auto 4000px; }
}
.yr__g { display: grid; grid-template-columns: var(--yr-side) minmax(0, 1fr); column-gap: clamp(28px, 3.6vw, 72px); }
.yr > .nx { margin-top: 0; margin-bottom: clamp(72px, 9vw, 150px); }
.yr__s {
  position: sticky; top: var(--nav-h); align-self: start;
  height: calc(100vh - var(--nav-h)); height: calc(100svh - var(--nav-h));
  display: grid; grid-template-rows: auto minmax(0, 1fr); padding: var(--yr-top) 0 clamp(20px, 3vh, 36px);
}
.yr--np .yr__s { height: auto; }
.yr__band { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "k k" "n c"; column-gap: 14px; align-items: start; }
/* the film's year progress: ○○●○○○○○ 03 / 08 (decorative; the h2 carries the year) */
.yk { grid-area: k; display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-size: .75rem; font-weight: 700; letter-spacing: .1em; line-height: 1; color: var(--mute); font-variant-numeric: tabular-nums; }
.yk__b { display: flex; gap: 4px; }
.yk__b i { width: 14px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px currentColor; }
.yk__b i.on { background: var(--accent); box-shadow: none; }
.yr__n { grid-area: n; margin-left: -.045em; font-family: var(--f-display); font-size: var(--yr-fs); font-weight: 900; letter-spacing: -.06em; line-height: .8; font-variant-numeric: tabular-nums; white-space: nowrap; }
.yr__c { grid-area: c; display: grid; gap: 6px; padding-top: calc(var(--yr-fs) * .02); font-size: .75rem; font-weight: 700; letter-spacing: .1em; line-height: 1; text-transform: uppercase; color: var(--mute); }
.yr__c data { font-family: var(--f-display); font-size: calc(var(--yr-fs) * .2); font-weight: 800; letter-spacing: -.02em; color: var(--fg); text-transform: none; font-variant-numeric: tabular-nums; }
/* the year numeral rises into its mask as the year arrives (the shared line reveal; plain text, no odometer, so the
   heading's text stays exactly the year for crawlers that run JS) */
.yr__n .ln { padding: .02em .02em .1em; margin-bottom: -.1em; }

/* her portrait of the year: a tall oval, never above 1.05x the largest file's px */
.yp { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: start; gap: 12px; margin-top: clamp(18px, 2.6vh, 32px); }
.yp__m { position: relative; height: 100%; max-height: calc(var(--ph) * 1.05px / var(--dpr)); aspect-ratio: 4 / 5; max-width: min(100%, calc(var(--pw) * 1.05px / var(--dpr))); border-radius: 50%; overflow: hidden; background: var(--raise); }
.yp__m img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.yp figcaption, .ph figcaption { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--fg); color: var(--ground); font-size: .75rem; font-weight: 600; letter-spacing: .04em; white-space: nowrap; }

/* ------------------------------------------------------------ the rows */
.yr__b { padding: calc(var(--yr-top) + 30px) 0 clamp(80px, 10vw, 160px); min-width: 0; }
.r { position: relative; display: grid; grid-template-columns: 7.25rem minmax(0, 1fr) 11.5rem; column-gap: clamp(16px, 2vw, 32px); padding: 22px 0 26px; }
.r::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); transform-origin: 0 50%; }
.yr__l > .r:first-child::before { background: var(--fg); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
    .r::before { animation: hl-draw linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
  }
}
/* touch: drawn once as the row enters (js/static.js adds .is-in), on the compositor (review/freeze/FIX-PLAN.md A1) */
html.rv-tap .r:not(.is-in)::before { transform: scaleX(0); }
html.rv-tap .r.is-in::before { transition: transform .7s var(--ease-osmo); }
.r time { display: flex; align-items: center; gap: 10px; align-self: start; padding-top: .3em; font-size: .8125rem; font-weight: 700; line-height: 1.2; letter-spacing: .01em; white-space: nowrap; }
.r time::before { content: ""; flex: none; width: 13px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px currentColor; }
.r__b { max-width: 40rem; font-size: clamp(1.0625rem, 1.3vw, 1.3125rem); line-height: 1.4; font-weight: 450; letter-spacing: -.003em; text-wrap: pretty; }
.r__m { display: grid; align-content: start; gap: 3px; padding-top: .25em; font-size: .8125rem; line-height: 1.3; }
.r__m b { font-weight: 700; }
.r__m span { color: var(--mute); }
.r__m a { justify-self: start; margin-top: 5px; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .28em; overflow-wrap: anywhere; }
.r__m a::after { content: "↗" / ""; display: inline-block; margin-left: .3em; transition: transform .5s var(--ease-osmo); }
@media (hover: hover) { .r__m a:hover::after { transform: translate(2px, -2px); } .r__m a:hover { text-decoration-thickness: 2px; } }

/* milestones: the year's turning points, a band on the opposite ground that runs off the right edge */
.r--ms { isolation: isolate; margin: 18px calc(-1 * var(--gut)) 18px calc(-1 * clamp(18px, 2vw, 32px)); padding: clamp(28px, 3vw, 44px) var(--gut) clamp(32px, 3.4vw, 48px) clamp(18px, 2vw, 32px); border-radius: 28px 0 0 28px; }
.r--ms::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--ground); }
.r--ms::before { display: none; }
.r--ms + .r::before { display: none; }
[data-ground="paper"] .r--ms { background: transparent; color: var(--on-ink); --fg: var(--on-ink); --ground: var(--ink); --mute: var(--on-ink-mute); --line: var(--line-ink); --raise: var(--ink-2); color-scheme: dark; }
[data-ground="ink"] .r--ms { background: transparent; color: var(--on-paper); --fg: var(--on-paper); --ground: var(--paper); --mute: var(--on-paper-mute); --line: var(--line-paper); --raise: var(--paper-2); color-scheme: light; }
.r--ms .r__b { max-width: 34ch; font-family: var(--f-display); font-size: clamp(1.375rem, 2.15vw, 2.5rem); font-weight: 800; line-height: 1.08; letter-spacing: -.028em; text-wrap: balance; }
.r--ms time::before { background: var(--accent); box-shadow: none; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
    html.js .r--ms::after { animation: ms-wipe linear both; animation-timeline: view(); animation-range: entry 0% entry 30%; }
    html.js .r--ms > * { animation: ms-txt linear both; animation-timeline: view(); animation-range: entry 10% entry 40%; }
  }
}
/* touch: the band's ground sweeps in once as a transform (on phones the band is square-cornered, so scaleX is the same
   picture as the clip-path wipe), then the text fades in on it; both run on the compositor (FIX-PLAN A1) */
html.rv-tap .r--ms::after { transform-origin: 0 50%; }
html.rv-tap .r--ms:not(.is-in)::after { transform: scaleX(0); }
html.rv-tap .r--ms.is-in::after { transition: transform .7s var(--ease-osmo); }
html.rv-tap .r--ms:not(.is-in) > * { opacity: 0; }
html.rv-tap .r--ms.is-in > * { transition: opacity .45s linear .3s; }
@keyframes ms-wipe { from { clip-path: inset(0 100% 0 0 round 28px 0 0 28px); } to { clip-path: inset(0 0 0 0 round 28px 0 0 28px); } }
/* the text is never clipped: it fades in on the band once its ground is (nearly) under it, so no frame cuts a word */
@keyframes ms-txt { from { opacity: 0; } 55% { opacity: 0; } to { opacity: 1; } }
html.rv-off .r--ms, html.rv-off .r--ms::after, html.rv-off .r--ms > * { animation: none !important; clip-path: none !important; opacity: 1; }

/* inline photos and the one loop: off-grid windows that open from a slit (the shared .slit mask) */
.ph { grid-column: 2 / -1; margin-top: clamp(24px, 3vw, 44px); width: min(46%, calc(var(--pw) * 1.05px / var(--dpr))); display: grid; gap: 12px; justify-items: start; }
.ph--l { justify-self: start; }
.ph--r { justify-self: end; margin-right: clamp(0px, 4vw, 72px); }
.ph--v { width: min(100%, calc(var(--pw) * 1.05px / var(--dpr))); margin-right: 0; }
/* a pair: two windows side by side, the second dropped (the zig-zag), each capped at 1.05x its file */
.ph2 { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 40px); align-items: start; margin-top: clamp(24px, 3vw, 44px); }
.ph2 .ph { grid-column: auto; width: min(100%, calc(var(--pw) * 1.05px / var(--dpr))); margin: 0; }
.ph2 .ph--r { justify-self: end; margin-top: clamp(40px, 7vw, 120px); }
.ph__m { position: relative; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 28px; background: var(--raise); }
.ph--v .ph__m { aspect-ratio: 16 / 9; }
.ph__m img, .ph__m video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph__m video { opacity: 0; transition: opacity .4s linear; }
.ph__m video.is-ready { opacity: 1; }

/* the rest of the year's photos: a contact sheet of ovals that closes the year */
.yr__st { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(112px, 9.6vw, 168px), 1fr)); gap: 28px clamp(14px, 1.6vw, 24px); margin-top: clamp(40px, 5vw, 72px); padding-top: 28px; border-top: 1px solid var(--fg); }
.sp { display: grid; gap: 10px; justify-items: start; max-width: calc(var(--pw) * 1.05px / var(--dpr)); }
.sp__m { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 50%; overflow: hidden; background: var(--raise); }
.sp__m img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sp figcaption { font-size: .75rem; font-weight: 600; letter-spacing: .02em; color: var(--mute); white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .sp__m { transition: border-radius .6s var(--ease-osmo); }
  .sp:hover .sp__m { border-radius: 28px; }
}

/* the next page: the shared .nx band (css/static.css), after the 2026 grid inside its section */

/* ------------------------------------------------------------ medium widths: a narrower column, two-line rows */
@media (max-width: 1180px) and (min-width: 761px) {
  .yr { --yr-side: clamp(260px, 34vw, 400px); }
  .r { grid-template-columns: 6.5rem minmax(0, 1fr); }
  .r__m { grid-column: 2; display: flex; flex-wrap: wrap; gap: 0 .9em; padding-top: 10px; }
  .r__m a { margin-top: 0; }
}

/* ------------------------------------------------------------ phones: the numeral becomes a sticky band */
@media (max-width: 760px) {
  .yr, .yr__g { display: block; }
  .yr { padding: 0 var(--gut); }
  .yr__s { display: contents; }
  .yr__band {
    position: sticky; top: 60px; z-index: 2; margin: 0 calc(-1 * var(--gut)); padding: 14px var(--gut) 12px;
    grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "n c k"; align-items: end; column-gap: 12px;
    background: var(--ground); box-shadow: 0 1px 0 var(--line);
  }
  .yr__n { --yr-fs: 22vw; }
  .yr__c { --yr-fs: 22vw; padding: 0 0 4px; gap: 4px; font-size: .6875rem; }
  .yr__c data { font-size: 1.5rem; }
  .yk { margin: 0 0 6px; flex-direction: column; align-items: flex-end; gap: 8px; font-size: .6875rem; }
  .yk__b { gap: 3px; }
  .yk__b i { width: 10px; height: 7px; }
  .yp { display: grid; grid-template-rows: auto auto; margin-top: 20px; justify-items: start; }
  .yp__m { width: 100%; height: auto; max-height: min(78svh, calc(var(--ph) * 1.05px / var(--dpr))); }
  .yr__b { padding: 12px 0 72px; }
  .r { grid-template-columns: minmax(0, 1fr); row-gap: 8px; padding: 20px 0 18px; }
  .r time { padding-top: 0; }
  .r__b { font-size: 1.0625rem; line-height: 1.45; }
  .r__m { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .5em; padding-top: 0; color: var(--mute); }
  .r__m b { color: var(--fg); }
  .r__m > :not(:last-child)::after { content: "·" / ""; display: inline-block; margin-left: .5em; color: var(--mute); font-weight: 400; }
  .r__m a { margin-top: 0; min-height: 44px; display: inline-flex; align-items: center; margin-block: -10px; color: var(--fg); }
  .r--ms { margin: 14px calc(-1 * var(--gut)); padding: 26px var(--gut) 24px; border-radius: 0; }
  .r--ms .r__b { font-size: clamp(1.375rem, 6.4vw, 1.75rem); line-height: 1.1; }
  .ph { grid-column: 1; width: min(62%, calc(var(--pw) * 1.05px / var(--dpr))); margin-top: 22px; }
  .ph--r { margin-right: 0; }
  .ph--v { width: 100%; }
  .ph2 { grid-column: 1; gap: 12px; margin-top: 22px; }
  .ph2 .ph { width: min(100%, calc(var(--pw) * 1.05px / var(--dpr))); }
  .ph2 .ph--r { margin-top: 48px; }
  .yr__st { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 12px; margin-top: 36px; }
  .sp figcaption { font-size: .6875rem; white-space: normal; }
}
/* phones: while the band is stuck, its ground also fills the strip above it that the tucked nav leaves open
   (scroll-state container queries where supported; elsewhere the strip just shows the page) */
@supports (container-type: scroll-state) {
  @media (max-width: 760px) {
    .yr__band { container-type: scroll-state; }
    @container scroll-state(stuck: top) {
      .yk::after { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 61px; background: var(--ground); }
    }
  }
}

/* ------------------------------------------------------------ reduced motion: nothing moves */
@media (prefers-reduced-motion: reduce) {
  .r__m a::after, .nx__t i, .ph__m video { transition: none !important; }
  .r--ms, .r--ms::after, .r--ms > * { animation: none !important; clip-path: none !important; opacity: 1; }
}
