/* V4: quiet surfaces, strong outcomes, and motion tied to visitor input. */
:root {
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-ui: cubic-bezier(.5, .2, .4, 1);
  --header-height: 80px;
}
html { scroll-padding-top: 158px; }
.reading-line { position: absolute; height: 2px; bottom: -1px; inset-inline: 0; overflow: hidden; }
.reading-line span { display: block; height: 100%; background: #0ba951; transform: scaleX(var(--read-progress, 0)); transform-origin: left; }
.motion-toggle { min-height: 44px; min-width: 44px; }
.brand-mark { transition: background .24s var(--ease-ui), transform .35s var(--ease-out); }
.brand:is(:hover, :focus-visible) .brand-mark { background: var(--pink); transform: rotate(-5deg); }
.nav-links a::after { width: 100%; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-out); }
.nav-links a:is(:hover, :focus-visible, .active)::after { transform: scaleX(1); }
.button { position: relative; isolation: isolate; overflow: hidden; transition: color .24s var(--ease-ui), border-color .24s; }
.button::before { content: ''; position: absolute; z-index: -1; inset: 0; background: var(--green); transform: translateY(102%); transition: transform .3s var(--ease-ui); }
.button:is(:hover, :focus-visible) { background: var(--ink); color: var(--ink); transform: none; border-color: var(--green); }
.button:is(:hover, :focus-visible)::before { transform: translateY(0); }
.button > span { transition: transform .35s var(--ease-out); }
.button:is(:hover, :focus-visible) > span { transform: translate(3px, -3px); }
.hero-actions .button:is(:hover, :focus-visible) > span { transform: translateY(4px); }
.button:active, .sequence-controls button:active, .hermes-stages button:active { transform: translateY(2px); }
.text-link { position: relative; }
.text-link::after { content: ''; position: absolute; height: 1px; background: currentColor; bottom: 6px; left: 0; right: 40px; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-out); }
.text-link:is(:hover, :focus-visible) { text-decoration: none; }
.text-link:is(:hover, :focus-visible)::after { transform: scaleX(1); }
.text-link:focus-visible > span { transform: translate(3px, -3px); }

/* These links replace the static list of disciplines. */
.practice-strip a { position: relative; display: flex; align-items: center; justify-content: center; gap: 13px; min-height: 70px; padding: 18px 12px; border-left: 1px dashed var(--line); overflow: hidden; transition: background .25s; }
.practice-strip a:last-child { border-right: 1px dashed var(--line); }
.practice-strip a > span { padding: 0; border: 0; font: 17px var(--sans); opacity: 0; transform: translate(-6px, 6px); transition: opacity .25s, transform .35s var(--ease-out); }
.practice-strip i { display: block; width: 8px; height: 8px; border: 1px solid #7b9d85; transform: rotate(45deg); transition: transform .45s var(--ease-out), background .25s; }
.practice-strip a:is(:hover, :focus-visible) { background: #edfaef; }
.practice-strip a:is(:hover, :focus-visible) i { transform: rotate(225deg); background: var(--green); border-color: #0b9c4c; }
.practice-strip a:is(:hover, :focus-visible) > span { opacity: 1; transform: none; }

/* Large outcome headings carry the page; technical copy stays secondary. */
.work { padding-top: 104px; }
.section-heading { display: grid; grid-template-columns: 1.5fr 1fr; align-items: end; gap: 40px; margin-bottom: 52px; }
.section-heading h2 { font-size: clamp(58px, 5.6vw, 80px); font-weight: 600; line-height: 1.02; letter-spacing: -.05em; }
.section-heading > p:last-child { max-width: 340px; margin: 0 0 7px auto; font-size: 20px; line-height: 1.5; }
.title-line { display: block; }
.ink-mark { position: relative; isolation: isolate; white-space: nowrap; }
.ink-mark::before { content: ''; position: absolute; inset: 12% -4px 0; background: var(--green); z-index: -1; transform-origin: left; transition: transform .8s var(--ease-out) .18s; }
.ink-pink::before { background: #ffc4f7; }
.js-ready .reveal:not(.visible) .ink-mark::before { transform: scaleX(0); }
.js-ready .reveal .title-line { transition: transform .8s var(--ease-out), opacity .7s; }
.js-ready .reveal .title-line:nth-child(2) { transition-delay: .09s; }
.js-ready .reveal:not(.visible) .title-line { opacity: 0; transform: translateY(20px); }
.work-index { position: sticky; top: var(--header-height); z-index: 15; display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-block: 1px dashed var(--line); margin-bottom: 40px; }
.work-index a { position: relative; display: flex; align-items: center; justify-content: center; gap: 11px; padding: 17px 8px; min-height: 54px; font: 12px var(--mono); transition: background .24s; }
.work-index a + a { border-left: 1px dashed var(--line); }
.work-index a span { font-size: 10px; color: #5b7563; }
.work-index a::after { content: ''; position: absolute; inset: auto 0 0; height: 3px; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out); }
.work-index a:is(:hover, :focus-visible) { background: #f0faf2; }
.work-index a[aria-current="location"]::after { transform: scaleX(1); }
.case-study { margin-bottom: 48px; scroll-margin-top: 0; position: relative; }
.case-layout { padding: 52px 42px; gap: 46px; }
.project-category { margin-bottom: 38px; font-size: 11px; letter-spacing: .035em; }
.project-name { font: 12px var(--mono); color: #3d624a; margin-bottom: 16px; }
.case-copy h3, .systems-intro h3 { font-size: clamp(43px, 4.25vw, 60px); line-height: 1.06; font-weight: 600; letter-spacing: -.045em; margin-bottom: 30px; }
.case-intro { font-size: 20px; line-height: 1.5; max-width: 440px; }
.case-copy .tech-list, .systems-intro .tech-list, .research-card .tech-list { font-size: 11px; color: #597360; margin-block: 22px 14px; gap: 13px; }
.case-notes { margin-top: 24px; }
.case-notes summary { min-height: 48px; text-transform: none; font-size: 12px; color: #375341; transition: color .2s, background .2s; }
.case-notes summary:is(:hover, :focus-visible) { color: #066c34; background: #f2faf3; }
.note-body p { color: var(--muted); font-size: 15px; line-height: 1.65; margin: 12px 0; }
.case-notes[open] .note-body { animation: note-open .32s var(--ease-out) both; }
@keyframes note-open { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.systems-case { padding: 48px 42px; }
.systems-intro { grid-template-columns: 1.2fr 1fr; gap: 55px; align-items: start; }
.systems-intro .case-notes { margin-top: 18px; }
.systems-intro .case-intro { margin-top: 48px; }
.systems-footer p { font-size: 12px; max-width: 450px; }
.secondary-heading { padding-block: 68px 38px; }
.secondary-heading .eyebrow { font-size: 11px; margin-bottom: 18px; }
.secondary-heading h2 { font-size: clamp(45px, 4.6vw, 64px); line-height: 1.1; font-weight: 600; margin-bottom: 20px; }
.secondary-heading p:last-child { font-size: 18px; }
.research-card { padding: 38px; scroll-margin-top: 0; }
.research-card h3 { font-size: clamp(35px, 3.4vw, 46px); font-weight: 600; margin-bottom: 23px; }
.research-card > p:not(.project-name):not(.project-category) { font-size: 18px; max-width: 430px; line-height: 1.5; }
.research-card .project-category { gap: 10px; }
.about h2 { font-size: clamp(45px, 4.5vw, 61px); font-weight: 600; }
.about h2 span { background: none; color: inherit; box-shadow: none; }
.about-copy p:last-of-type { max-width: 500px; }
.footer a { padding-block: 12px; min-height: 44px; }

/* Artwork follows a fine pointer by a few pixels. Phase geometry stays intact. */
[data-art-surface] { position: relative; }
.art-plane { width: 100%; min-width: 0; transform: translate3d(var(--art-x, 0px), var(--art-y, 0px), 0); transition: transform .6s var(--ease-out); }
.hero-visual .art-plane { flex: 1; max-width: 100%; padding-bottom: 45px; }
.hero-visual .hero-system { width: 100%; margin: 0; max-height: 510px; }
.hero-controls { position: absolute; inset: auto 12px 30px 22px; border-top: 0; padding: 0; margin: 0; z-index: 2; }
.hero-visual .visual-bottomline { font-size: 10px; left: 22px; right: 12px; bottom: 4px; }
.hero-visual .visual-bottomline > span:first-child { display: none; }
.hero-visual .visual-bottomline > span:last-child { margin-left: 0; }
.case-visual::before, .case-visual::after { content: ''; position: absolute; width: 16px; height: 16px; pointer-events: none; opacity: .35; transition: transform .4s var(--ease-out), opacity .3s; }
.case-visual::before { top: -1px; left: -1px; border-top: 1px solid #159351; border-left: 1px solid #159351; }
.case-visual::after { right: -1px; bottom: -1px; border-right: 1px solid #159351; border-bottom: 1px solid #159351; }
.case-visual:is(:hover, :focus-within)::before { opacity: 1; transform: translate(-3px, -3px); }
.case-visual:is(:hover, :focus-within)::after { opacity: 1; transform: translate(3px, 3px); }
.art-fragments { position: absolute; inset: 0; pointer-events: none; }
.art-fragments i { position: absolute; width: 11px; height: 11px; border: 1px solid #74c190; transform: rotate(30deg) skewX(-30deg); animation: fragment-drift 6s ease-in-out infinite alternate; }
.art-fragments i:nth-child(1) { left: 18%; top: 20%; background: #dcffe8; }
.art-fragments i:nth-child(2) { left: 75%; top: 16%; width: 8px; height: 8px; background: var(--pink); border: 0; animation-delay: -2s; }
.art-fragments i:nth-child(3) { left: 83%; top: 74%; background: #b8fbd0; animation-delay: -4s; }
.art-fragments i:nth-child(4) { left: 30%; top: 80%; width: 7px; height: 7px; border-color: #d3a3cd; animation-delay: -1s; }
@keyframes fragment-drift { to { transform: translateY(-8px) rotate(30deg) skewX(-30deg); } }
.sequence-controls button { min-height: 44px; position: relative; transition: background .24s var(--ease-ui), border-color .24s, transform .2s; }
.sequence-controls button[aria-pressed="true"] { background: #bafbd2; border-color: #81c695; }
.sequence-controls button[aria-pressed="true"]::after { content: ''; position: absolute; inset: auto 7px 3px; height: 2px; background: #159351; animation: control-rule .25s var(--ease-out); transform-origin: left; }
.sequence-controls .replay span, .hermes-replay span { display: inline-block; transition: transform .6s var(--ease-out); }
.sequence-controls .replay:is(:hover, :focus-visible) span, .hermes-replay:is(:hover, :focus-visible) span { transform: rotate(-180deg); }
@keyframes control-rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.phase-notes p:not([hidden]) { animation: caption-in .25s var(--ease-out); }
.sequence-scene[data-manual] .phase-notes p:not([hidden]),
[data-motion-scene][data-manual] .sequence-controls button[aria-pressed="true"]::after { animation: none; opacity: 1; transform: none; }
@keyframes caption-in { from { opacity: .4; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.hermes-diagram { height: auto; min-height: 260px; }
.hermes-stages button { width: 100%; text-align: left; display: flex; align-items: center; gap: 13px; min-height: 49px; border: 0; border-bottom: 1px solid #dae5d9; padding: 7px 8px; background: transparent; transition: background .3s, transform .25s; }
.hermes-stages button > span:nth-child(2) { font-size: 16px; }
.hermes-stages button:is(:hover, :focus-visible) { background: #e2f6e7; }
.hermes-stages button[aria-pressed="true"] { background: #c9fbdc; }
.hermes-stages button[aria-pressed="true"] .stage-number { color: #076e37; }
.hermes-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hermes-bottom .diagram-foot { margin: 0; }
.hermes-replay { min-height: 44px; border: 0; background: none; font: 11px var(--mono); padding: 8px 2px 8px 10px; }
.hermes-replay span { font-size: 17px; }
.memory-bars { display: grid; gap: 4px; max-width: 170px; }
.memory-bars i { display: block; height: 4px; background: #b3c9b8; transform-origin: left; transition: transform .9s var(--ease-out) .2s; }
.memory-bars i:last-child { width: 63.725%; background: #0bad50; transition-delay: .35s; }
.js-ready .reveal:not(.visible) .memory-bars i { transform: scaleX(0); }
.case-study::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 1px; background: #93bea0; pointer-events: none; transform-origin: left; transition: transform 1.15s var(--ease-out); }
.js-ready .case-study.reveal:not(.visible)::after { transform: scaleX(0); }
.js-ready .case-study.reveal .case-copy > :is(.case-intro, .tech-list, .text-link) { transition: opacity .7s .12s, translate .7s var(--ease-out) .12s; }
.js-ready .case-study.reveal:not(.visible) .case-copy > :is(.case-intro, .tech-list, .text-link) { opacity: 0; translate: 0 9px; }

@media (max-width: 1100px) {
  .case-layout { padding: 38px 30px; gap: 30px; }
  .case-copy h3, .systems-intro h3 { font-size: 43px; }
  .systems-case { padding: 38px 30px; }
  .systems-intro { gap: 32px; }
  .research-card { padding: 28px; }
  .research-card h3 { font-size: 36px; }
  .work-index a { gap: 7px; }
  .hero-controls { left: 15px; }
}
@media (max-width: 820px) {
  .section-heading { grid-template-columns: 1fr; gap: 25px; }
  .section-heading > p:last-child { margin: 0; max-width: none; font-size: 18px; }
  .section-heading > p:last-child br { display: none; }
  .hero-visual { height: 485px; }
  .hero-visual .art-plane { flex: none; max-width: 550px; padding-bottom: 65px; }
  .hero-visual .hero-system { width: 100%; height: auto; max-height: 390px; }
  .hero-controls { max-width: 500px; left: 10px; right: 10px; bottom: 35px; margin-inline: auto; }
  .hero-visual .visual-bottomline { bottom: 9px; left: 10px; }
  .systems-intro { grid-template-columns: 1fr; gap: 26px; }
  .systems-intro .case-intro { margin-top: 0; }
  .case-copy h3, .systems-intro h3 { font-size: clamp(42px, 6.5vw, 55px); }
  .case-layout { gap: 34px; }
  .practice-strip { grid-template-columns: 1fr 1fr; }
  .practice-strip a:nth-child(-n+2) { border-bottom: 1px dashed var(--line); }
  .practice-strip a:nth-child(2) { border-right: 1px dashed var(--line); }
  .research-card h3 { font-size: 44px; }
  .about h2 { font-size: 53px; }
}
@media (max-width: 480px) {
  :root { --header-height: 72px; }
  html { scroll-padding-top: 143px; }
  .work { padding-top: 67px; }
  .section-heading { gap: 20px; margin-bottom: 32px; }
  .section-heading h2 { font-size: clamp(39px, 10.2vw, 49px); line-height: 1.08; }
  .section-heading > p:last-child { font-size: 16px; }
  .work-index { margin-bottom: 26px; }
  .work-index a { min-height: 50px; font-size: 11px; padding: 15px 3px; letter-spacing: -.055em; }
  .work-index a span { display: none; }
  .case-layout { padding: 31px 18px; gap: 31px; }
  .case-study { margin-bottom: 32px; scroll-margin-top: 0; }
  .case-copy h3, .systems-intro h3 { font-size: clamp(32px, 9.5vw, 40px); margin-bottom: 25px; }
  .project-category { margin-bottom: 26px; }
  .project-name { font-size: 11px; margin-bottom: 15px; }
  .case-intro { font-size: 18px; }
  .systems-case { padding: 31px 18px; }
  .systems-intro { gap: 24px; }
  .systems-footer p { font-size: 12px; }
  .research-card { padding: 30px 18px; scroll-margin-top: 0; }
  .research-card h3 { font-size: clamp(33px, 9.2vw, 40px); }
  .research-card > p:not(.project-name):not(.project-category) { font-size: 17px; }
  .secondary-heading { padding-block: 36px 28px; }
  .secondary-heading h2 { font-size: clamp(35px, 9.5vw, 43px); }
  .secondary-heading p:last-child { font-size: 16px; }
  .hero-visual { height: 390px; }
  .hero-visual .art-plane { padding-bottom: 65px; width: 100%; }
  .hero-visual .hero-system { width: 100%; max-height: 285px; }
  .hero-controls { left: 4px; right: 4px; bottom: 33px; }
  .hero-visual .visual-bottomline { left: 7px; font-size: 10px; }
  .practice-strip a { min-height: 62px; font-size: 10px; padding: 14px 5px; gap: 7px; }
  .practice-strip a > span { display: none; }
  .practice-strip i { width: 6px; height: 6px; }
  .sequence-controls { gap: 2px; }
  .sequence-controls button { min-height: 44px; padding-inline: 6px; font-size: 11px; }
  .case-notes summary { font-size: 11px; }
  .about h2 { font-size: clamp(37px, 10vw, 44px); }
  .hermes-stages button { gap: 8px; padding-inline: 5px; }
  .hermes-stages button > span:nth-child(2) { font-size: 15px; }
  .hermes-verb { display: none; }
}
@media (hover: none), (pointer: coarse) {
  .art-plane { transform: none; }
  .practice-strip a > span { opacity: 1; transform: none; }
  .button:hover { transform: none; }
}
/* Pausing covers the decorative layer as well as the technical scenes. */
html[data-motion="paused"] *, html[data-motion="paused"] *::before, html[data-motion="paused"] *::after,
html[data-motion="reduced"] *, html[data-motion="reduced"] *::before, html[data-motion="reduced"] *::after {
  animation: none !important; transition: none !important;
}
html[data-motion="paused"], html[data-motion="reduced"] { scroll-behavior: auto; }
html:is([data-motion="paused"], [data-motion="reduced"]) .art-plane { transform: none; }
html:is([data-motion="paused"], [data-motion="reduced"]) .reveal,
html:is([data-motion="paused"], [data-motion="reduced"]) .reveal .title-line,
html:is([data-motion="paused"], [data-motion="reduced"]) .reveal .case-copy > :is(.case-intro, .tech-list, .text-link) { opacity: 1; transform: none; translate: none; }
html:is([data-motion="paused"], [data-motion="reduced"]) .ink-mark::before,
html:is([data-motion="paused"], [data-motion="reduced"]) .memory-bars i,
html:is([data-motion="paused"], [data-motion="reduced"]) .case-study::after { transform: none; }
html:not(.js-ready) *, html:not(.js-ready) *::before, html:not(.js-ready) *::after { animation: none !important; transition: none !important; }
html:not(.js-ready) .hermes-stages button { pointer-events: none; }
html:not(.js-ready) .hermes-replay { display: none; }
@media (prefers-reduced-motion: reduce) {
  .art-plane, .js-ready .reveal .title-line, .ink-mark::before, .memory-bars i, .case-study::after { transform: none !important; opacity: 1 !important; }
  .js-ready .case-study.reveal .case-copy > :is(.case-intro, .tech-list, .text-link) { opacity: 1 !important; translate: none !important; }
}
