/* One continuous sheet, from the cut in the portrait to the black spread. */
.opening-story { position: relative; isolation: isolate; }
.star-flight { display: none; }
.story-motion .star-flight { display: block; position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 3; }
.flight-line { position: absolute; inset: 0; width: 100%; height: 100%; stroke: var(--yellow); stroke-width: 1.2; }
.travelling-star { position: absolute; top: 0; left: 0; width: var(--star-size); max-width: none; height: auto; }
.story-motion .hero-star,.story-motion .about-star { visibility: hidden; }
.hero { display:grid; grid-template-rows:minmax(min-content,1fr) auto; min-height:calc(100svh - var(--header-h)); }
html:not(.story-motion) .hero { --opening:var(--yellow); --opening-ink:#000; }
.story-motion .hero,.story-motion .about { background-color:inherit; color:var(--scene-ink); }
@property --mast-opening { syntax:"<color>"; inherits:false; initial-value:#f5ec70; }
.story-motion .masthead[data-tone="yellow"] { background-color:var(--mast-opening,var(--yellow)); }
.story-motion .hero-copy,.story-motion .hero-base,.story-motion .photo-foot { color:var(--scene-ink); }
.story-motion .hero-copy h1 { translate:0 var(--headline-rise,0); }
.story-motion .hero-actions .pill { background:var(--scene-ink); color:var(--scene-color); }
.story-motion .photo-foot .circle-button:hover { color:var(--scene-color); background:var(--scene-ink); }
.story-motion .hero-window { translate:0 var(--portrait-rise,0); scale:var(--portrait-scale,1); transform-origin:55% 65%; }
.story-motion .plate-outline { translate: var(--plate-x, 0) var(--plate-y, 0); }
.story-motion .hero-window img { scale: var(--lens, 1); }
.story-motion .orbit-line { rotate: var(--orbit-turn, 0deg); }
.about { position: relative; overflow: clip; }
.about-grid { position: relative; }
.about-side { position: relative; }
.about-side::before {
  content: ""; position: absolute; right: 8%; bottom: -5%; width: 90%; height: 67%;
  border: 1px solid #37362c; border-radius: 50%; rotate: -24deg; pointer-events: none;
  clip-path: inset(0 4% 0 15%);
}
.about-copy { position: relative; }
.about-copy .about-purpose { padding-left: 17px; border-left: 1px solid #777245; }
.story-motion .about-copy .about-purpose { translate: 0 var(--about-shift, 0); }

/* The chapter text stays in the document flow. Only the photographic table is sticky. */
.camera-column[hidden],.manifesto-dock { display: none; }
.line-row { position: relative; }
.line-copy p { text-wrap: pretty; }
.chapter-edition .chapter-sequence {
  display: grid; grid-template-columns: minmax(0,1.16fr) minmax(0,.92fr);
  column-gap: clamp(43px,6.6vw,112px); border-bottom: 1px solid #8e887e;
}
.chapter-edition .camera-column { min-width: 0; }
.chapter-edition .line-camera { position: sticky; top: var(--camera-top, 17svh); margin-block: clamp(22px,4.4svh,49px); }
.camera-plates { position: relative; width: 100%; height: min(35.4vw,52svh,580px); min-height: 210px; }
.camera-main,.camera-detail { position: absolute; overflow: hidden; background: #191918; }
.camera-main {
  inset: 0 14% 5% 0;
  clip-path: polygon(0 0,100% 0,100% 77%,88% 77%,88% 100%,0 100%);
}
.camera-detail {
  right: 0; bottom: 0; width: 32%; height: 57%;
  border: clamp(4px,.47vw,8px) solid var(--paper); border-right: 0;
  translate: 0 var(--detail-y, 0px);
}
.camera-detail::after {
  content: ""; position: absolute; inset: auto 0 0; height: clamp(5px,.65vw,9px);
  background: var(--coral); opacity: var(--incubator-accent,1);
}
.camera-plate { position: absolute; inset: 0; overflow: hidden; }
.camera-plate img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chapter-photo { display: contents; }
.camera-main .camera-plate:first-child img { object-position: 48% 48%; }
.camera-main .camera-plate:nth-child(3) img { object-position: 52% 55%; }
.camera-detail .camera-plate:first-child img { object-position: 46% 52%; }
.camera-nav { display: grid; grid-template-columns: repeat(5,1fr); gap: 7px; margin-top: 14px; }
.camera-nav a {
  position: relative; min-height: 38px; display: flex; align-items: center; gap: 7px;
  border-top: 1px solid #999184; color: #514c43; font-size: .74rem; font-variant-numeric: tabular-nums;
}
.camera-nav a::before { content: ""; position: absolute; inset: -1px 0 auto; height: 3px; background: #111; transform-origin: left; transform: scaleX(var(--read,0)); }
.camera-nav a[aria-current] { color: #000; font-weight: 700; }
.camera-nav a:hover { border-top-color: #000; color: #000; }
.chapter-edition .line-row { display: grid; grid-template-columns: 1fr; min-height: clamp(358px,62svh,610px); padding-block: 35px; }
.chapter-edition .line-row:last-child { border: 0; }
.chapter-edition .line-row .montage { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.chapter-edition .line-copy { display: block; }
.chapter-edition .line-number { display: flex; align-items: flex-start; width: fit-content; font-size: clamp(30px,3.4vw,57px); font-weight: 360; padding: 0; margin: 0 0 19px; }
.chapter-edition .line-number span { padding-left: .07em; }
.chapter-edition .line-copy h3 { font-size: clamp(57px,6.25vw,104px); font-weight: 555; letter-spacing: -.083em; }
.chapter-edition .line-copy p { margin: 18px 0 13px; font-size: clamp(16px,1.22vw,21px); max-width: 34ch; }
.chapter-edition .line-copy .text-link { font-size: clamp(.84rem,.99vw,1.04rem); }
.story-motion:not(.chapter-edition) .montage-main img { scale: var(--row-lens,1); }
.story-motion:not(.chapter-edition) .montage-detail { clip-path: inset(var(--row-trim,0%) 0 0); }

/* Both prints stay in the layout. Only the photographed wings leave the paper. */
.butterfly-dock { display: block; grid-column: 1; grid-row: 5/8; min-width: 0; min-height: 0; }
.butterfly-dock .tile-2 { width: 100%; height: 100%; }
.manifesto h2 { text-wrap: pretty; }
.manifesto .word { transition: none; }
.story-motion .manifesto .word {
  color: transparent; background: linear-gradient(90deg,var(--yellow) var(--ink,0%),var(--paper) var(--ink,0%));
  background-clip: text; -webkit-background-clip: text;
}
.chapter-edition .manifesto { padding-block: clamp(90px,8.4vw,148px) clamp(65px,7.5vw,135px); }
.chapter-edition .manifesto-layout { display: grid; grid-template-columns: minmax(0,2.85fr) minmax(0,1fr); align-items: center; gap: 2.5vw; }
.chapter-edition .manifesto h2 { margin-top: 37px; font-size: clamp(53px,5.72vw,99px); line-height: 1.02; letter-spacing: -.075em; }
.chapter-edition .manifesto-dock { display: block; justify-self: end; width: 91%; aspect-ratio: 1.35; }
.chapter-edition .gallery .section-head { justify-content: start; gap: 24px; }
.chapter-edition .gallery-count { color: #c7c1b5; }
.chapter-edition .butterfly-dock { display: block; grid-column: 4; grid-row: 1/5; min-width: 0; min-height: 0; }
.story-motion .manifesto { min-height: min(80svh,860px); display: grid; align-content: center; }
.story-motion .manifesto-copy { position: relative; z-index: 5; }
.story-motion .manifesto-dock { position: relative; background: center / cover no-repeat; }
.story-motion:not(.chapter-edition) .manifesto-dock { display: block; width: clamp(110px,35vw,230px); aspect-ratio: 1.38; margin: clamp(12px,4vw,24px) 0 0 auto; }
.story-motion[data-butterfly] .manifesto-dock,
.story-motion[data-butterfly] .tile-2 { background: #060607 url("assets/mariposa-fondo.webp") center / cover no-repeat; }
.story-motion[data-butterfly="perched"] .manifesto-dock { background-image: url("assets/mariposa.webp"); }
.story-motion[data-butterfly]:not([data-butterfly="landed"]) .tile-2 > img { opacity: 0; }
.story-motion[data-butterfly]:not([data-butterfly="landed"]) .tile-2:not(:focus-visible):not(:hover) :is(.tile-caption,.tile-open) { opacity: 0; }
.butterfly-flight { position: fixed; inset: 0; z-index: 4; pointer-events: none; overflow: clip; visibility: hidden; }
.story-motion[data-butterfly="flying"] .butterfly-flight { visibility: visible; }
.butterfly-pose { position: absolute; top: 0; left: 0; width: 320px; height: 320px; perspective: 650px; perspective-origin: 45% 52%; }
.wing { position: absolute; inset: 0; background: center / contain no-repeat; transform-origin: 44% 51%; }
[data-butterfly="flying"] .wing { background-image: url("assets/mariposa-alas.webp"); }
.wing-far { clip-path: polygon(0 0,15% 0,72% 100%,0 100%); transform: rotate3d(.50,.87,0,var(--far-fold,0deg)); }
.wing-near { clip-path: polygon(15% 0,100% 0,100% 100%,72% 100%); transform: rotate3d(.50,.87,0,var(--near-fold,0deg)); }
.butterfly-body { clip-path: polygon(41.4% 46%,44.2% 45%,55% 63%,51% 66%); }
@media (max-width: 540px) { .butterfly-dock { grid-column: 2; grid-row: 2/5; } }
.chapter-edition .tile-5 { grid-column: 1; grid-row: 5/8; }
.story-motion .gallery-grid .gallery-tile:not(.tile-2) { translate: 0 var(--tile-lift,0px); }
.gallery .section-head { position: relative; }
.gallery .section-head::after,.footer-sign::before {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 100%; height: 1px;
  background: var(--yellow); transform: scaleX(var(--gallery-rule,1)); transform-origin: left;
}
.gallery-tile:focus-visible .tile-caption { color: var(--yellow); }
.tile-caption { font-weight: 520; }
.lightbox { background: #080808; border: 1px solid #535048; }
.lightbox-top { color: var(--yellow); }
.viewer-caption strong { font-size: clamp(17px,2.1vw,32px); line-height: 1.1; letter-spacing: -.045em; font-weight: 490; }
.viewer-caption span { color: var(--yellow); border-bottom: 1px solid #625f3d; padding-bottom: 2px; }
.lightbox-shell { padding: clamp(16px,2.1vw,32px); }

/* The stripe follows the reader's hand. The figures keep their final values throughout. */
.tape { min-height: clamp(56px,5.8vw,94px); }
.tape-track { animation: none; transform: translate3d(var(--tape-x,0px),0,0); }
.tape-group { min-width: calc(100vw + 380px); justify-content: space-around; }
.tape-group span { font-size: clamp(31px,3.9vw,69px); }
.tape-toggle { width: clamp(48px,5.8vw,94px); background: var(--yellow); }
.tape-toggle .ui-icon { width: 1.32rem; height: 1.32rem; }
/* One continuous poster. The heading and both rows share the same printing grid. */
.impact { overflow:clip; background:#161615; border-block:1px solid #484640; }
.impact-poster {
  --rail:clamp(19px,2.7vw,54px);
  --figure-zone:clamp(151px,17.6vw,295px);
  --caption-zone:clamp(83px,7.6vw,127px);
  --panel-height:calc(var(--figure-zone) + var(--caption-zone));
  display:grid; grid-template-columns:repeat(24,minmax(0,1fr)); grid-auto-rows:var(--panel-height);
  max-width:1920px; margin-inline:auto;
}
.impact-poster h2 {
  grid-area:1 / 1 / 2 / 7; z-index:1; margin:0; position:relative;
  color:#151514; background:var(--paper);
  font-size:clamp(30px,3.85vw,73px); line-height:.98; letter-spacing:-.063em; font-weight:540;
}
.impact-poster h2 span { position:absolute; bottom:var(--caption-zone); padding:0 var(--rail) clamp(14px,1.65vw,32px); }
.metric-value {
  display:flex; align-items:flex-end; height:var(--figure-zone); padding:0 var(--rail) clamp(14px,1.65vw,32px);
}
.impact-poster h2::after,.metric-caption::before {
  content:""; position:absolute; left:var(--rail); right:0; height:1px; background:currentColor; opacity:.5;
}
.impact-poster h2::after { top:var(--figure-zone); }
.impact-metrics {
  grid-area:1 / 1 / 3 / -1; margin:0; padding:0; list-style:none;
  display:grid; grid-template-columns:repeat(24,minmax(0,1fr)); grid-auto-rows:var(--panel-height);
}
.metric { position:relative; isolation:isolate; min-width:0; color:var(--paper); background:#111110; border-inline-start:1px solid #4a4945; }
.metric p { position:relative; }
.metric-value {
  font-size:clamp(83px,11.5vw,210px); font-weight:500; letter-spacing:-.087em; line-height:.84;
  white-space:nowrap; font-variant-numeric:lining-nums;
}
.metric-caption {
  position:relative; display:block; padding:clamp(12px,1.35vw,24px) var(--rail) 0;
  font-size:clamp(15px,1.25vw,23px); line-height:1.22; letter-spacing:-.025em;
}
.metric-caption::before { top:0; transform:scaleX(var(--impact-rule,1)); transform-origin:left; }
.metric-photo { grid-area:1 / 7 / 2 / 14; color:var(--yellow); overflow:hidden; }
.metric-photo img { position:absolute; width:100%; height:100%; object-fit:cover; object-position:56% 41%; filter:grayscale(1); transform:scale(var(--impact-photo-scale,1)); }
.metric-photo::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg,rgba(0,0,0,.27),rgba(0,0,0,.65) 65%,rgba(0,0,0,.85)); }
.metric-photo p { z-index:1; }
.metric-people { grid-area:1 / 14 / 2 / -1; background:#1c1c1b; }
.metric-people .metric-value { font-size:clamp(110px,14.25vw,258px); }
.metric-incubated,.metric-trained,.metric-allies { border-block-start:1px solid #56544e; }
.metric-incubated { grid-area:2 / 1 / 3 / 7; color:#191917; background:#dbd5ca; border-inline-start:0; }
.metric-trained { grid-area:2 / 7 / 3 / 17; }
.metric-allies { grid-area:2 / 17 / 3 / -1; background:#282826; }
@media (max-width:699px) {
  .impact-poster {
    --rail:clamp(12px,3.8vw,25px); --figure-zone:clamp(96px,26vw,151px); --caption-zone:clamp(84px,20vw,96px);
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .impact-poster h2 { grid-area:1 / 1; font-size:clamp(32px,8.2vw,51px); }
  .impact-metrics { grid-area:1 / 1 / 4 / -1; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .metric-photo { grid-area:1 / 2; }
  .metric-people { grid-area:2 / 1; border-block-start:1px solid #56544e; border-inline-start:0; }
  .metric-incubated { grid-area:2 / 2; border-inline-start:1px solid #56544e; }
  .metric-trained { grid-area:3 / 1; border-inline-start:0; }
  .metric-allies { grid-area:3 / 2; }
  .metric-value,.metric-people .metric-value { font-size:clamp(47px,15.35vw,96px); }
  .metric-photo .metric-value,.metric-allies .metric-value { font-size:clamp(67px,21vw,130px); }
  .metric-caption { font-size:clamp(14px,3.6vw,18px); }
}

.footer { overflow: clip; }
.footer-top > div { border-top: 1px solid #9e998e; padding-top: 13px; }
.footer-top h2 { color: #4b463d; }
.back-top { background: #141411; color: var(--yellow); border-color: #141411; }
.back-top:hover { color: #000; background: var(--yellow); }
.footer-sign { position: relative; margin-top: clamp(45px,6vw,99px); }
.footer-sign::before { bottom: auto; top: -1px; background: #151511; transform: scaleX(var(--footer-rule,1)); transform-origin: right; }
.footer-sign .wordmark { width: min(72%,1000px); height: auto; }
.footer-seal { position: relative; align-self: stretch; min-width: 15%; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 14px; }
.footer-seal img { width: clamp(43px,5.7vw,93px); rotate: var(--seal-turn,0deg); }
.footer-seal p { white-space: nowrap; }
.story-motion .footer-sign .wordmark { translate: 0 var(--signature-lift,0px); }

/* Navigation and local program guide use the same print, ink and cut edge. */
.page-progress {
  position: absolute; bottom: 0; left: var(--gutter); right: var(--gutter); pointer-events:none;
  height: 2px; z-index: 1; background: currentColor; transform: scaleX(0); transform-origin: left;
}
.header-links a[aria-current] { text-decoration: underline; text-underline-offset: .35em; }
.menu-grid { align-items: start; }
.menu-tools [role="search"] {
  position: relative; padding: clamp(22px,2.5vw,42px); background: var(--yellow); color: #000;
  clip-path: polygon(0 0,calc(100% - 19px) 0,calc(100% - 19px) 13px,100% 13px,100% 100%,0 100%);
}
.menu-tools label { color: #26250d; }
.search-box { border-bottom-color: #696624; }
.search-box:focus-within { border-color: #000; }
.search-box input,#search-results a,.search-info { color: #141411; }
.search-box input::placeholder { color: #575321; }
#search-results a { border-color: #aaa34b; }
#search-results a:hover { color: #000; text-decoration: underline; text-underline-offset:.2em; }
.account-nav { margin-top: 20px; }
.menu-group[open] summary { color: var(--yellow); }
.subnav { margin: 5px 0 18px 3px; padding: 1px 0 1px 16px; border-left: 1px solid #8b8543; }
.menu-dialog[open] { animation: none; }
.menu-dialog[open] .menu-tools [role="search"] { animation: unfold-search .29s cubic-bezier(.22,.75,.22,1); }
.menu-dialog[open] .primary-nav { animation: set-type .25s ease-out; }
@keyframes unfold-search { from { translate: 0 -12px; } }
@keyframes set-type { from { translate: -11px 0; } }
@media (max-width: 780px) {
  .about-side::before { width: 90%; max-height: 104px; bottom: 3%; }
  .menu-grid { gap: 28px; }
}
@media (max-width: 540px) {
  .about-side::before { width: 96px; height: 43px; left: -4px; bottom: 5%; }
  .about-copy .about-purpose { padding-left: 12px; }
  .gallery .section-head { align-items: center; }
  .tape-group { min-width: max-content; }
  .footer-sign { flex-direction: column-reverse; gap: 18px; }
  .footer-sign .wordmark { width: 100%; }
  .footer-seal { align-self: stretch; flex-direction: row; align-items: center; }
  .footer-seal img { width: 29px; }
  .footer-top .back-top { justify-self: end; }
  .menu-tools [role="search"] { padding: 18px; }
  .menu-grid { gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .menu-dialog[open] .primary-nav,.menu-dialog[open] .menu-tools [role="search"],dialog[open] { animation: none; }
}
@media (forced-colors: active) {
  .story-motion .manifesto .word { color: CanvasText; background: none; }
  .story-motion .hero-copy,.story-motion .hero-base,.story-motion .photo-foot { mix-blend-mode: normal; color: CanvasText; }
}
html:not(.story-motion) .page-progress { display: none; }
html:not(.story-motion) .gallery .section-head::after,html:not(.story-motion) .footer-sign::before { transform: none; }
html:not(.story-motion) .footer-seal img { rotate: 0deg; }
.footer-seal img { height: auto; flex: none; }
@media (max-width: 540px) {
  .menu-grid { align-items: stretch; }
  .menu-tools [role="search"],.primary-nav { width: 100%; }
}

.about-link { color: var(--yellow); margin-top: 17px; }


.about-grid { align-items:center; grid-template-columns:minmax(100px,.62fr) minmax(0,1.7fr); }
.about-side { display:grid; align-content:center; justify-content:center; }
.about-side::before { display:none; }
.about-copy .kicker { color:var(--yellow); margin-bottom:clamp(17px,2vw,34px); }
.story-motion .about-copy .kicker,.story-motion .about-link { color:var(--scene-accent,var(--yellow)); }
.story-motion .about-copy .about-purpose { color:var(--scene-ink); }
@media (max-width:600px) {
  .about-grid { grid-template-columns:clamp(43px,13vw,72px) minmax(0,1fr); gap:clamp(13px,3.7vw,20px); padding-block:clamp(45px,7svh,78px); }
  .about-star { width:100%; }
  .about-copy .about-statement { font-size:clamp(27px,6.8vw,39px); }
  .about-copy .about-purpose { padding:0; border:0; font-size:clamp(15px,3.9vw,18px); }
}
