/* RAIN — direction B "Field Notes" */
:root {
  --paper: #f6f3ec;
  --white: #ffffff;
  --ink: #1c1a16;
  --ink-2: #4a4539;
  --ink-3: #6d675a;
  --rule: #d9d3c4;
  --rule-2: #b8b09c;
  --green: #1f4d3a;
  --green-2: #2f6e54;
  --green-tint: #b7cdbf;
  --green-tint-2: #d4e2d8;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Public Sans', 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(20px, 4.4vw, 64px);
  --topbar: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--ink); color: var(--paper); font-family: var(--sans); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.skip:focus { top: 12px; outline: 2px solid var(--green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: none; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-2); }
h1, h2, h3, p, ul, ol, dl { margin: 0; }
ul, ol { padding: 0; list-style: none; }

/* type */
.h-serif { font-family: var(--serif); font-weight: 300; line-height: 1.08; letter-spacing: -.005em; text-wrap: balance; }
h2.h-serif { font-size: clamp(30px, 3.2vw, 44px); }
h3.h-serif { font-size: clamp(24px, 2.1vw, 30px); line-height: 1.15; }
.h-serif--xl { font-size: clamp(34px, 3.9vw, 54px); }
.h-serif em { font-style: italic; }
.eyebrow { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-3); }
.lede { font-size: clamp(17px, 1.35vw, 19px); color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--ink-3); }
.link { font-weight: 500; font-size: 14px; color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 2px; align-self: flex-start; }
.link:hover { color: var(--green); border-color: var(--green); }
.ph { display: inline-block; padding: 10px 14px; border: 1px dashed var(--rule-2); color: var(--ink-3); font-size: 13px; letter-spacing: .06em; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 26px; font-size: 14px; font-weight: 500; letter-spacing: .04em; transition: background .2s, color .2s, border-color .2s; }
.btn--sm { height: 40px; padding: 0 18px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.btn--solid { background: var(--green); color: var(--paper); }
.btn--solid:hover { background: var(--green-2); color: var(--paper); }
.btn--outline { border: 1px solid var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--paper); }
.btn--paper { background: var(--paper); color: var(--green); margin-top: 24px; align-self: flex-start; }
.btn--paper:hover { background: var(--white); color: var(--green); }

/* topbar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: var(--topbar); padding: 0 var(--gutter);
  background: color-mix(in oklab, var(--paper) 94%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule);
}
.nav { display: flex; gap: clamp(20px, 2.8vw, 40px); align-items: center; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.nav a { color: var(--ink); }
.nav a:hover { color: var(--green); }
.nav--right { justify-content: flex-end; }
.wordmark { font-family: var(--serif); font-weight: 300; font-size: 32px; letter-spacing: .04em; color: var(--ink); }
.burger { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; background: none; border: 0; color: var(--ink); cursor: pointer; justify-self: end; }

/* drawer (mobile) */
.drawer {
  position: fixed; inset: 0 0 0 auto; width: min(84vw, 360px); z-index: 40;
  background: var(--paper); border-left: 1px solid var(--rule);
  padding: 20px 24px 32px; display: flex; flex-direction: column; gap: 28px;
  transform: translateX(100%); transition: transform .32s cubic-bezier(.2,.7,.2,1);
}
.drawer.is-open { transform: none; }
.drawer__close { align-self: flex-end; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--ink); cursor: pointer; }
.drawer__nav { display: flex; flex-direction: column; }
.drawer__nav a { font-family: var(--serif); font-weight: 300; font-size: 34px; line-height: 1; color: var(--ink); padding: 14px 0; border-bottom: 1px solid var(--rule); }
.drawer .btn { width: 100%; }
.drawer__foot { margin-top: auto; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(28,26,22,.35); opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.is-open { opacity: 1; pointer-events: auto; }

/* layout */
main { padding: 0 var(--gutter); }
section { margin-top: clamp(72px, 9vw, 130px); }

.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; padding-top: clamp(40px, 7vw, 110px); }
.hero h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(44px, 6.7vw, 96px); line-height: 1.02; letter-spacing: -.01em; max-width: 1040px; text-wrap: balance; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

.card { background: var(--white); border: 1px solid var(--rule); }
.card--dashed { background: rgba(255,255,255,.4); border: 1px dashed var(--rule-2); }

.figure { display: block; margin-top: clamp(40px, 5vw, 72px); }
.figure__art { position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); width: 100%; z-index: 0; overflow: hidden; }
.figure__text { position: relative; z-index: 2; background: var(--paper); margin-top: 0; padding-top: clamp(48px, 6vw, 96px); display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 64px); align-items: start; box-shadow: 0 -1px 0 var(--rule); }
.figure__lead { display: flex; flex-direction: column; gap: 14px; }
.figure__body { display: flex; flex-direction: column; gap: 22px; max-width: 66ch; }
.figure__body em { font-family: var(--serif); font-style: italic; }
.figure__result { font-family: var(--serif); font-size: 22px; line-height: 1.3; color: var(--ink); border-left: 2px solid var(--green); padding-left: 16px; }
.figure__aside { font-size: 13px; max-width: 34ch; }
.figure__art svg { position: absolute; inset: 0; width: 100%; height: 100%; font-family: var(--sans); display: block; }
/* Spline "signal cloud" — injected by main.js only when motion + WebGL are available */
.figure__3d { display: none; position: absolute; inset: 0; width: 100%; height: 100%; background: var(--paper); overflow: hidden; }
.figure__3d iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: var(--paper); opacity: 0; transition: opacity .9s ease; }
/* tagline drawn by the page over the settled nodes at the end of the scrub (video ends before any printed text) */
.figure__tagline { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); z-index: 3; margin: 0; text-align: center; font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 5.2vw, 84px); letter-spacing: -0.01em; line-height: 1.05; color: var(--ink); opacity: 0; pointer-events: none; display: none; }
.figure__tagline span { color: var(--green); }
.figure__art.is-video .figure__tagline { display: block; }
.figure__cap { position: absolute; left: 0; bottom: 18px; z-index: 3; margin: 0; font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--ink); pointer-events: none; }
.figure__hint { color: var(--ink-3); display: none; }
.figure__art.is-3d .figure__hint--3d { display: inline; }
.figure__art.is-video .figure__hint--video { display: inline; }
/* Fig. 1 scroll-scrubbed sequence (Seedance) — primary; runway gives the sticky band scroll distance to scrub across */
.figure__video { display: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--paper); opacity: 0; transition: opacity .9s ease; }
.figure__runway { display: none; height: 0; }
.figure__art.is-video .figure__video { display: block; }
.figure__art.is-video.is-live .figure__video { opacity: 1; }
.figure__art.is-video.is-live .figure__svg { opacity: 0; transition: opacity .9s ease; pointer-events: none; }
.figure.has-runway .figure__runway { display: block; height: 300vh; }
.figure__art.is-3d .figure__3d { display: block; }
.figure__art.is-3d .figure__svg { transition: opacity .9s ease; pointer-events: none; }
.figure__art.is-3d.is-live .figure__svg { opacity: 0; }
.figure__art.is-3d.is-live .figure__3d iframe { opacity: 1; }
@media (hover: none), (pointer: coarse) { .figure__3d iframe { pointer-events: none; } }
.fig-caption { display: none; }
.figure__text p { color: var(--ink-2); }
.spec { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.spec div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.spec dt { color: var(--ink-3); margin: 0; } .spec dd { margin: 0; }

.claims { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.claim { display: flex; flex-direction: column; gap: 14px; padding-top: 22px; border-top: 2px solid var(--ink); }
.claim p:last-child { font-size: 15px; color: var(--ink-2); }

.doctrine { display: grid; grid-template-columns: 3fr 8fr; gap: 24px; align-items: start; }
.doctrine .eyebrow { padding-top: 12px; }
.doctrine div { display: flex; flex-direction: column; gap: 28px; }
.doctrine p:not(.eyebrow) { max-width: 68ch; font-size: 17px; color: var(--ink-2); }
.differs { margin: 8px 0 0; max-width: 760px; border-top: 1px solid var(--rule); }
.differs div { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.differs dt { font-family: var(--serif); font-size: 19px; line-height: 1.2; color: var(--ink); margin: 0; }
.differs dd { margin: 0; font-size: 15px; color: var(--ink-2); }
@media (max-width: 760px) { .differs div { grid-template-columns: 1fr; gap: 8px; } }

.film { display: flex; flex-direction: column; gap: 24px; }
.film__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.film__head div { display: flex; flex-direction: column; gap: 12px; }
.player { position: relative; aspect-ratio: 16 / 9; max-height: 740px; background: var(--ink); overflow: hidden; cursor: pointer; }
.player img { width: 100%; height: 100%; object-fit: cover; opacity: .78; transition: transform 1.2s cubic-bezier(.2,.7,.2,1), opacity .4s; }
.player:hover img { transform: scale(1.02); opacity: .86; }
.player__play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 96px; height: 96px; border-radius: 50%; border: 1px solid var(--paper); color: var(--paper); background: rgba(28,26,22,.4); display: flex; align-items: center; justify-content: center; transition: background .2s; }
.player:hover .player__play { background: rgba(28,26,22,.6); }
.player__bar { position: absolute; left: 32px; right: 32px; bottom: 28px; display: flex; justify-content: space-between; gap: 16px; color: var(--paper); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.film__note { max-width: 68ch; color: var(--ink-2); }
.teaser { position: relative; display: block; aspect-ratio: 21 / 9; background: var(--ink); overflow: hidden; }
.teaser img { width: 100%; height: 100%; object-fit: cover; opacity: .78; transition: transform 1.2s cubic-bezier(.2,.7,.2,1), opacity .4s; }
.teaser:hover img { transform: scale(1.02); opacity: .9; }
.teaser__bar { position: absolute; left: 32px; right: 32px; bottom: 24px; display: flex; justify-content: space-between; gap: 16px; color: var(--paper); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
@media (max-width: 760px) { .teaser { aspect-ratio: 16 / 10; } .teaser__bar { left: 16px; right: 16px; bottom: 12px; font-size: 11px; } .teaser__bar span:first-child { display: none; } }

.reading { display: grid; grid-template-columns: 4fr 8fr; gap: 24px; }
.reading__head { display: flex; flex-direction: column; gap: 14px; }
.reading__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.paper { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding: 32px; min-height: 300px; }
.paper div { display: flex; flex-direction: column; gap: 12px; }
.paper h3 { font-size: 26px; }
.paper p { font-size: 14px; color: var(--ink-2); }
.paper cite { font-style: italic; }
.reading__refs { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 18px; padding-top: 28px; border-top: 1px solid var(--rule); }
.refs { margin: 0; padding-left: 1.4em; columns: 2; column-gap: 40px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.refs li { break-inside: avoid; margin-bottom: 10px; padding-left: 4px; }
.refs cite { font-style: italic; }
.refs a { color: var(--ink); border-bottom: 1px solid var(--rule-2); } .refs a:hover { color: var(--green); border-color: var(--green); }

.uses { display: grid; grid-template-columns: 4fr 8fr; gap: 24px; align-items: start; }
.uses__head { display: flex; flex-direction: column; gap: 14px; }
.uses__head p:not(.eyebrow) { font-size: 17px; color: var(--ink-2); max-width: 34ch; }
.uses__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
.use { display: flex; flex-direction: column; gap: 12px; padding-top: 22px; border-top: 2px solid var(--ink); }
.use h3 { font-size: 24px; }
.use p:not(.eyebrow) { font-size: 15px; color: var(--ink-2); }
.use .muted { font-size: 13px; margin-top: auto; padding-top: 6px; }

.people { display: flex; flex-direction: column; gap: 32px; }
.people > div { display: flex; flex-direction: column; gap: 12px; }
.people__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.person { display: flex; flex-direction: column; gap: 12px; }
.person__photo { aspect-ratio: 5 / 4; background: #e6e1d4; }
.person strong { font-weight: 500; }
.person span { font-size: 13px; }

.nodes { display: grid; grid-template-columns: 5fr 1fr 6fr; gap: 24px; padding: clamp(28px, 3.9vw, 56px); background: var(--green); color: var(--paper); }
.nodes__text { display: flex; flex-direction: column; gap: 18px; }
.nodes .eyebrow { color: var(--green-tint); }
.nodes__text p:last-child { font-size: 15px; color: var(--green-tint-2); }
.steps { grid-column: 3; display: flex; flex-direction: column; border-top: 1px solid rgba(246,243,236,.25); }
.steps li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid rgba(246,243,236,.25); }
.steps__n { font-family: var(--serif); font-size: 24px; line-height: 1; }
.nodes .btn--paper { grid-column: 3; justify-self: start; }

.footer { margin: clamp(72px, 8vw, 120px) var(--gutter) 0; padding: 48px 0 60px; border-top: 1px solid var(--ink); display: grid; grid-template-columns: 6fr 1fr 2fr 3fr; gap: 24px; }
.footer__line { font-size: clamp(34px, 3.9vw, 56px); line-height: 1; }
.footer__nav { grid-column: 3; display: flex; flex-direction: column; gap: 12px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.footer__nav a { color: var(--ink); }
.footer__meta { grid-column: 4; display: flex; flex-direction: column; gap: 10px; font-size: 13px; text-align: right; }

/* rain band — pattern rows driven by scroll */
.rainband { margin-top: clamp(56px, 6vw, 96px); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); overflow: hidden; }
.rainband__row { height: 88px; overflow: hidden; border-bottom: 1px solid var(--rule); }
.rainband__row:last-child { border-bottom: 0; }
.rainband__rain { height: 100%; width: 100%; background-repeat: repeat; background-size: 56px 88px; background-position: var(--bx, 0px) 0; }
.rainband__row--rain .rainband__rain { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='88' viewBox='0 0 56 88'%3E%3Cg stroke='%231c1a16' stroke-width='1.1' stroke-linecap='round' opacity='.55'%3E%3Cline x1='12' y1='10' x2='6' y2='34'/%3E%3Cline x1='40' y1='30' x2='34' y2='54'/%3E%3Cline x1='24' y1='58' x2='18' y2='82'/%3E%3C/g%3E%3Ccircle cx='46' cy='72' r='2.2' fill='%231f4d3a'/%3E%3C/svg%3E"); }
.rainband__row--dense .rainband__rain { background-size: 36px 88px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='88' viewBox='0 0 36 88'%3E%3Cg stroke='%231c1a16' stroke-width='1' stroke-linecap='round' opacity='.45'%3E%3Cline x1='10' y1='6' x2='5' y2='26'/%3E%3Cline x1='28' y1='20' x2='23' y2='40'/%3E%3Cline x1='16' y1='44' x2='11' y2='64'/%3E%3Cline x1='32' y1='60' x2='27' y2='80'/%3E%3C/g%3E%3Ccircle cx='8' cy='78' r='1.8' fill='%231f4d3a'/%3E%3C/svg%3E"); }
.rainband__row--text { display: flex; align-items: center; }
.rainband__track { display: flex; white-space: nowrap; font-family: var(--serif); font-weight: 300; font-size: 44px; line-height: 1; letter-spacing: -.005em; color: var(--ink); will-change: transform; transform: translateX(var(--tx, 0px)); }
.rainband__track span { padding-right: .2em; }
@media (max-width: 760px) { .rainband__row { height: 64px; } .rainband__track { font-size: 30px; } }

/* reveals + fig animation */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
/* GSAP takes over when present: kill CSS transitions so tweens own the properties */
.has-gsap .reveal { transition: none; }
.has-gsap .hero .reveal { opacity: 1; transform: none; }
.hw { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .06em; margin-bottom: -.06em; }
.hw > span { display: inline-block; will-change: transform; }
.has-gsap .claim, .has-gsap .use { border-top-color: transparent; position: relative; }
.has-gsap .claim::before, .has-gsap .use::before { content: ""; position: absolute; left: 0; top: -2px; height: 2px; width: 100%; background: var(--ink); transform: scaleX(var(--sx, 0)); transform-origin: left; }
.has-gsap .person__photo { clip-path: inset(0 0 100% 0); }
.has-gsap .player { clip-path: inset(6% 4% 6% 4%); }
.has-gsap .player img { will-change: transform; }
.doctrine h2 .dw { transition: none; color: #8b8577; }
.fig-links path { stroke-dasharray: 3 4; }
.fig-frag circle { transform-box: fill-box; transform-origin: center; animation: pulse 3.2s ease-in-out infinite; }
.fig-frag circle:nth-child(2) { animation-delay: .5s; } .fig-frag circle:nth-child(3) { animation-delay: 1s; }
.fig-frag circle:nth-child(4) { animation-delay: 1.5s; } .fig-frag circle:nth-child(5) { animation-delay: 2s; }
.fig-frag circle:nth-child(6) { animation-delay: 2.5s; } .fig-frag circle:nth-child(7) { animation-delay: 3s; }
.fig-frag circle:nth-child(8) { animation-delay: .8s; } .fig-frag circle:nth-child(9) { animation-delay: 2.2s; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .55; } }
.fig-nodes circle.is-dark { fill: #ff5c47; }
.fig-links path.is-heal { stroke: var(--green); stroke-dasharray: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .fig-frag circle { animation: none; }
  .figure__3d, .figure__video, .figure__runway { display: none !important; }
  .figure__art.is-video .figure__svg { opacity: 1; }
  .figure__art.is-3d .figure__svg { opacity: 1; }
  .drawer, .scrim { transition: none; }
}

/* responsive */
@media (max-width: 1100px) {
  .people__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nodes { grid-template-columns: 1fr; }
  .steps, .nodes .btn--paper { grid-column: 1; }
  .reading { grid-template-columns: 1fr; }
  .uses { grid-template-columns: 1fr; }
  .doctrine { grid-template-columns: 1fr; gap: 12px; }
  .footer { grid-template-columns: 1fr; }
  .footer__nav, .footer__meta { grid-column: 1; text-align: left; }
}
@media (max-width: 760px) {
  :root { --topbar: 56px; }
  .topbar { grid-template-columns: auto 1fr auto; }
  .nav--left { display: none; }
  .nav--right { display: none; }
  .wordmark { font-size: 24px; justify-self: start; grid-column: 1; }
  .burger { display: flex; grid-column: 3; }
  .hero { align-items: flex-start; text-align: left; }
  .hero__actions { flex-direction: column; width: 100%; justify-content: flex-start; }
  .hero__actions .btn { width: 100%; }
  .claims { grid-template-columns: 1fr; gap: 28px; }
  .reading__grid { grid-template-columns: 1fr; }
  .uses__grid { grid-template-columns: 1fr; }
  .refs { columns: 1; }
  .paper { min-height: 0; padding: 20px; }
  .figure__art { height: 62vh; }
  .figure__text { grid-template-columns: 1fr; gap: 20px; padding-top: 36px; }
  .player__play { width: 56px; height: 56px; }
  .player__bar { left: 16px; right: 16px; bottom: 14px; font-size: 11px; }
  .nodes .btn--paper { width: 100%; }
  .player__bar span:first-child { display: none; }
  .footer__nav { flex-direction: row; flex-wrap: wrap; gap: 12px 20px; }
}
