@font-face {
  font-family: "Geist";
  src: url("../assets/fonts/geist-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --page: #0a0d11;
  --page-soft: #10151b;
  --surface: rgba(23, 29, 37, 0.78);
  --surface-strong: rgba(25, 32, 40, 0.97);
  --surface-soft: rgba(247, 249, 251, 0.055);
  --text: #f2f4f6;
  --text-soft: #aeb6bf;
  --text-faint: #7d8792;
  --accent: #d96b36;
  --accent-strong: #f27d43;
  --accent-ink: #1a0e08;
  --edge: rgba(247, 249, 251, 0.12);
  --edge-strong: rgba(247, 249, 251, 0.24);
  --shadow: rgba(1, 6, 12, 0.44);
  --radius-shell: 2rem;
  --radius-core: 1.5rem;
  --content: min(86rem, calc(100% - 4rem));
  --measure: 42rem;
  --ease-fluid: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --press: 140ms;
  --hover: 220ms;
  --reveal-time: 680ms;
}

html[data-theme="light"] {
  color-scheme: light;
  --page: #edf0f2;
  --page-soft: #e2e7ea;
  --surface: rgba(250, 252, 253, 0.76);
  --surface-strong: rgba(246, 248, 249, 0.98);
  --surface-soft: rgba(21, 30, 38, 0.045);
  --text: #182027;
  --text-soft: #56616b;
  --text-faint: #737e87;
  --accent: #cb5e2e;
  --accent-strong: #b84d22;
  --accent-ink: #fff7f2;
  --edge: rgba(22, 31, 39, 0.13);
  --edge-strong: rgba(255, 255, 255, 0.82);
  --shadow: rgba(35, 48, 58, 0.14);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
  background: var(--page);
}

body {
  min-width: 20rem;
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(circle at 82% 7%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 31rem),
    radial-gradient(circle at 8% 48%, color-mix(in srgb, var(--text) 4%, transparent), transparent 35rem),
    var(--page);
  color: var(--text);
  font-family: "Geist", "Avenir Next", system-ui, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.9'/%3E%3C/svg%3E");
}

body::before {
  content: "";
  position: fixed;
  inset: -20vh -15vw;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 75% 12%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 24rem),
    radial-gradient(circle at 12% 72%, color-mix(in srgb, #85a7c5 9%, transparent), transparent 31rem);
}

img, video { max-width: 100%; }
a { color: inherit; }
button { color: inherit; font: inherit; }

:focus-visible {
  outline: 0.18rem solid var(--accent-strong);
  outline-offset: 0.25rem;
}

::selection {
  background: color-mix(in srgb, var(--accent) 68%, transparent);
  color: var(--text);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 60;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--page);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 450ms var(--ease-out);
}

.skip-link:focus { transform: translateY(0); }

.glass-fixed {
  border: 1px solid var(--edge);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--text) 12%, transparent), transparent 42%),
    var(--surface);
  -webkit-backdrop-filter: blur(1.5rem) saturate(150%);
  backdrop-filter: blur(1.5rem) saturate(150%);
  box-shadow: inset 0 1px 0 var(--edge-strong), 0 1.5rem 5rem var(--shadow);
}

.glass-surface {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--edge);
  background:
    radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--text) 13%, transparent), transparent 34%),
    linear-gradient(145deg, color-mix(in srgb, var(--text) 7%, transparent), transparent 46%),
    var(--surface);
  box-shadow: inset 0 1px 0 var(--edge-strong), inset 0 -1px 0 color-mix(in srgb, var(--edge) 50%, transparent), 0 1.4rem 4.5rem var(--shadow);
}

.case-nav {
  position: fixed;
  top: 1.15rem;
  left: 50%;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(54rem, calc(100% - 2rem));
  min-height: 4.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: 999px;
  transform: translateX(-50%);
}

.case-nav a {
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 620;
}

.nav-back { justify-self: start; padding-left: 0.8rem; color: var(--text-soft); }
.nav-brand { display: flex; align-items: center; gap: 0.65rem; }
.nav-brand span {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  background: var(--text);
  color: var(--page);
  font-weight: 780;
  letter-spacing: -0.06em;
}
.nav-next { justify-self: end; padding-right: 0.8rem; color: var(--text-soft); }
.case-nav a:hover { color: var(--text); }

.case-hero,
.case-section,
.case-footer {
  width: var(--content);
  margin-inline: auto;
}

.case-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(24rem, 1.1fr);
  align-items: end;
  min-height: 92dvh;
  padding: 9rem 0 4rem;
  gap: clamp(3rem, 7vw, 7rem);
}

.eyebrow {
  width: max-content;
  margin: 0 0 1.25rem;
  padding: 0.43rem 0.7rem;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 680;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, h3, p { text-wrap: pretty; }
h1, h2, h3 { margin: 0; font-weight: 640; letter-spacing: -0.06em; }
h1 { max-width: 9ch; font-size: clamp(4.6rem, 8.6vw, 9rem); line-height: 0.87; }
h2 { max-width: 13ch; font-size: clamp(2.75rem, 5vw, 5.2rem); line-height: 0.98; }
h3 { font-size: clamp(1.55rem, 2.5vw, 2.5rem); line-height: 1.05; }

.hero-summary {
  max-width: 35rem;
  margin: 1.7rem 0 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.35vw, 1.25rem);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 2.4rem 0 0;
  border-top: 1px solid var(--edge);
}

.hero-facts div { padding: 1.1rem 1rem 0 0; }
.hero-facts dt { color: var(--text-faint); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; }
.hero-facts dd { margin: 0.28rem 0 0; font-size: 0.95rem; font-weight: 580; }

.hero-media-shell,
.media-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--edge);
  background: color-mix(in srgb, var(--page-soft) 90%, var(--text) 10%);
}

.hero-media-shell {
  padding: 0.5rem;
  border-radius: calc(var(--radius-shell) + 0.25rem);
  box-shadow: inset 0 1px 0 var(--edge-strong), 0 2.5rem 8rem var(--shadow);
  transform: rotate(1.4deg);
}

.hero-media-shell img,
.hero-media-shell video {
  display: block;
  width: 100%;
  min-height: 34rem;
  max-height: 72dvh;
  border-radius: var(--radius-core);
  object-fit: cover;
}

.case-section { padding: 7rem 0 8rem; }

.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(20rem, 1.2fr);
  align-items: start;
  gap: clamp(3rem, 9vw, 9rem);
}

.section-intro > p,
.case-prose p {
  max-width: var(--measure);
  margin: 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.45vw, 1.22rem);
  line-height: 1.68;
}

.case-prose { display: grid; gap: 1.25rem; }

.decision-grid {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  margin-top: 4rem;
  gap: 1rem;
}

.decision-card {
  display: flex;
  flex-direction: column;
  min-height: 23rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--edge);
  background: linear-gradient(180deg, var(--surface-soft), transparent);
}

.decision-card:nth-child(2),
.decision-card:nth-child(3) { min-height: 18rem; }
.decision-card span { margin-bottom: auto; color: var(--accent-strong); font-size: 0.75rem; font-weight: 680; letter-spacing: 0.12em; }
.decision-card p { max-width: 31rem; margin: 1rem 0 0; color: var(--text-soft); }

.gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  margin-top: 4rem;
  gap: 1rem;
}

.gallery-item {
  grid-column: span 6;
  margin: 0;
  padding: 0.45rem;
  border-radius: var(--radius-shell);
}

.gallery-item.wide { grid-column: span 12; }
.gallery-item.tall { grid-column: span 5; }
.gallery-item.offset { grid-column: 6 / span 7; margin-top: 5rem; }

.gallery-item img {
  display: block;
  width: 100%;
  min-height: 24rem;
  max-height: 52rem;
  border-radius: var(--radius-core);
  object-fit: cover;
  object-position: top;
}

.gallery-item.long img { max-height: none; object-fit: contain; background: #e9edf1; }

.gallery-item figcaption {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0.8rem 0.65rem;
  gap: 1rem;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.gallery-item figcaption strong { color: var(--text); }

.artifact-strip {
  display: grid;
  grid-auto-columns: minmax(18rem, 26rem);
  grid-auto-flow: column;
  overflow-x: auto;
  margin: 4rem calc((100vw - min(86rem, 100vw - 4rem)) / -2) 0;
  padding: 0 max(2rem, calc((100vw - 86rem) / 2)) 2rem;
  gap: 1rem;
  scroll-snap-type: x proximity;
}

.artifact {
  scroll-snap-align: start;
  overflow: hidden;
  border-radius: var(--radius-shell);
  background: var(--surface-soft);
}

.artifact img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.artifact-copy { padding: 1.25rem; }
.artifact-copy span { color: var(--text-faint); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }
.artifact-copy h3 { margin-top: 0.45rem; font-size: 1.45rem; letter-spacing: -0.04em; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  margin-top: 4rem;
  gap: 1rem;
}

.video-card {
  grid-column: span 6;
  position: relative;
  overflow: hidden;
  min-height: 26rem;
  padding: 0;
  border: 1px solid var(--edge);
  border-radius: var(--radius-shell);
  background: var(--surface-soft);
  cursor: pointer;
  text-align: left;
}

.video-card.feature { grid-column: span 12; min-height: min(70dvh, 47rem); }
.video-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 800ms var(--ease-fluid); }
.video-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 38%, rgba(6, 10, 14, 0.9)); }
.video-card:hover img { transform: scale(1.025); }
.video-copy { position: absolute; right: 1.25rem; bottom: 1.25rem; left: 1.25rem; z-index: 2; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem; }
.video-copy span { color: #d8dee5; font-size: 0.78rem; text-shadow: 0 1px 0.9rem rgba(0, 0, 0, 0.72); }
.video-copy h3 { margin-top: 0.35rem; color: #f7f9fb; font-size: clamp(1.6rem, 3vw, 2.8rem); text-shadow: 0 2px 1.25rem rgba(0, 0, 0, 0.82); }
.play-island { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 760; }

.video-lightbox {
  width: min(72rem, calc(100% - 2rem));
  max-width: none;
  margin: auto;
  padding: 0.45rem;
  border: 1px solid var(--edge-strong);
  border-radius: var(--radius-shell);
  background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
  box-shadow: inset 0 1px 0 var(--edge-strong), 0 2rem 8rem rgba(1, 6, 12, 0.72);
  color: var(--text);
}

.video-lightbox::backdrop {
  background: rgba(3, 7, 11, 0.82);
  backdrop-filter: blur(1rem) saturate(0.72);
}

.video-lightbox-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-core);
  background: #050608;
}

.video-lightbox iframe { display: block; width: 100%; height: 100%; border: 0; }

.video-lightbox-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 2;
  min-height: 2.65rem;
  padding: 0 1rem;
  border: 1px solid rgba(247, 249, 251, 0.28);
  border-radius: 999px;
  background: rgba(10, 13, 17, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: #f7f9fb;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 680;
  backdrop-filter: blur(0.9rem);
  transition: background-color 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.video-lightbox-close:active { transform: translateY(1px); }

.local-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 4rem;
  gap: 1rem;
}

.local-video {
  overflow: hidden;
  margin: 0;
  padding: 0.45rem;
  border-radius: var(--radius-shell);
}

.local-video video {
  display: block;
  width: 100%;
  max-height: 46rem;
  border-radius: var(--radius-core);
  background: var(--page-soft);
  object-fit: contain;
}

.local-video figcaption { padding: 1rem 0.8rem 0.65rem; color: var(--text-soft); font-size: 0.82rem; }

.case-note {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  padding: clamp(2rem, 6vw, 5rem);
  border-radius: calc(var(--radius-shell) + 0.4rem);
  gap: 2rem;
}

.case-note p { max-width: 42rem; margin: 1.3rem 0 0; color: var(--text-soft); }

.case-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.75rem;
  padding: 0.45rem 0.5rem 0.45rem 1.35rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 690;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 500ms var(--ease-fluid), background 500ms var(--ease-fluid);
}

.case-link span { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: color-mix(in srgb, var(--accent-ink) 11%, transparent); }
.case-link:hover { transform: translateY(-0.15rem); background: var(--accent-strong); }

.case-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--edge);
  color: var(--text-soft);
  font-size: 0.78rem;
}

.case-footer a { text-decoration: none; }

.media-shell.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--text) 11%, transparent) 48%, transparent 66%);
  animation: skeleton 1.4s var(--ease-fluid) infinite;
}

.media-shell.is-error::after {
  content: attr(data-fallback);
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: var(--surface-strong);
  color: var(--text-soft);
  text-align: center;
}

@keyframes skeleton { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

@media (max-width: 62rem) {
  :root { --content: calc(100% - 2.5rem); }
  .case-hero { grid-template-columns: 1fr; min-height: auto; padding-top: 9rem; }
  .case-hero-copy { max-width: 47rem; }
  .hero-media-shell { transform: none; }
  .section-intro { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 48rem) {
  :root { --content: calc(100% - 2rem); --radius-shell: 1.5rem; --radius-core: 1.1rem; }
  .case-nav { grid-template-columns: 1fr auto; min-height: 4.1rem; }
  .nav-brand { display: none; }
  .nav-next { font-size: 0.72rem; }
  .case-hero { padding: 7.5rem 0 3rem; gap: 2.5rem; }
  h1 { font-size: clamp(3.6rem, 17vw, 5.2rem); }
  h2 { font-size: clamp(2.55rem, 12vw, 4rem); }
  .hero-media-shell img, .hero-media-shell video { min-height: 25rem; }
  .case-section { padding: 5.5rem 0 6rem; }
  .decision-grid, .local-video-grid { grid-template-columns: 1fr; }
  .decision-card, .decision-card:nth-child(2), .decision-card:nth-child(3) { min-height: 16rem; }
  .gallery-item, .gallery-item.wide, .gallery-item.tall, .gallery-item.offset { grid-column: span 12; margin-top: 0; }
  .gallery-item img { min-height: 19rem; }
  .artifact-strip { margin-right: -1rem; margin-left: -1rem; padding-inline: 1rem; }
  .video-card, .video-card.feature { grid-column: span 12; min-height: 24rem; }
  .case-note { grid-template-columns: 1fr; align-items: start; }
  .case-link { width: max-content; }
  .case-footer { grid-template-columns: 1fr; gap: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .media-shell::before, .case-progress { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .glass-fixed, .glass-surface { background: var(--surface-strong); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@supports not ((backdrop-filter: blur(1rem)) or (-webkit-backdrop-filter: blur(1rem))) {
  .glass-fixed, .glass-surface { background: var(--surface-strong); }
}

/* 2026 unified case-study system */
@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) { animation-duration: 280ms; animation-timing-function: var(--ease-out); }

.case-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 70;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 38%, var(--text)));
  box-shadow: 0 0 1.2rem color-mix(in srgb, var(--accent) 54%, transparent);
  transform: scaleX(0);
  transform-origin: left;
}

@supports (animation-timeline: scroll()) {
  .case-progress { animation: reading-progress linear both; animation-timeline: scroll(root); }
  @keyframes reading-progress { to { transform: scaleX(1); } }
}

.case-nav {
  grid-template-columns: minmax(7rem, 1fr) auto minmax(7rem, 1fr) auto;
  width: min(62rem, calc(100% - 2rem));
  min-height: 4.25rem;
  transition: background-color var(--hover) var(--ease-out), border-color var(--hover) var(--ease-out), transform var(--hover) var(--ease-out);
}

.nav-theme {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  margin-left: 0.25rem;
  padding: 0;
  border: 1px solid var(--edge);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
  transition: color var(--hover) var(--ease-out), background-color var(--hover) var(--ease-out), transform var(--press) var(--ease-out);
}

.nav-theme svg { width: 1rem; height: 1rem; }
.nav-theme:active, .case-link:active, .video-card:active { transform: scale(0.97); }

.case-hero {
  grid-template-columns: minmax(0, 0.84fr) minmax(25rem, 1.16fr);
  min-height: min(56rem, 94dvh);
  padding-top: 8rem;
  padding-bottom: 2.8rem;
}

.case-hero-copy { align-self: center; }
.case-hero h1 { max-width: 10ch; }
.case-hero .hero-summary { max-width: 31rem; }
.case-hero .hero-facts { display: none; }

.project-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: var(--content);
  margin: 0 auto;
  border-top: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
}

.project-rail div {
  min-height: 7.7rem;
  padding: 1.4rem clamp(1rem, 2vw, 2rem);
  border-right: 1px solid var(--edge);
}

.project-rail div:first-child { padding-left: 0; }
.project-rail div:last-child { border-right: 0; }
.project-rail dt { color: var(--text-faint); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.project-rail dd { max-width: 16rem; margin: 0.5rem 0 0; font-size: 0.94rem; font-weight: 600; line-height: 1.35; }

.case-section {
  padding-block: clamp(5.5rem, 10vw, 9rem);
  content-visibility: auto;
  contain-intrinsic-size: auto 52rem;
}

.section-intro {
  display: block;
  max-width: 58rem;
}

.section-intro h2 { max-width: 14ch; }
.section-intro > p, .section-intro > .case-prose { margin-top: 1.8rem; }
.section-intro > p { max-width: 42rem; }

.narrative-split {
  display: grid;
  grid-template-columns: minmax(18rem, 0.8fr) minmax(20rem, 1.2fr);
  align-items: start;
  gap: clamp(3rem, 9vw, 9rem);
}

.narrative-sticky { position: sticky; top: 8rem; }
.narrative-sticky h2 { max-width: 12ch; }

.case-prose.large p:first-child { color: var(--text); font-size: clamp(1.25rem, 2vw, 1.75rem); line-height: 1.45; }

.scope-ledger { margin-top: 2.5rem; border-top: 1px solid var(--edge); }
.scope-row {
  display: grid;
  grid-template-columns: minmax(8rem, 0.35fr) 1fr;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--edge);
  gap: 1.5rem;
}
.scope-row span { color: var(--text-faint); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.scope-row p { margin: 0; color: var(--text-soft); }

.decision-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  margin-top: 5rem;
  gap: 1rem;
}

.decision-card,
.decision-card:nth-child(2),
.decision-card:nth-child(3) {
  position: sticky;
  top: 8rem;
  min-height: 24rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid var(--edge);
  border-radius: var(--radius-shell);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--text) 8%, transparent), transparent 42%),
    var(--surface-strong);
  box-shadow: inset 0 1px 0 var(--edge-strong), 0 1.2rem 4rem var(--shadow);
}

.decision-card:nth-child(2) { top: 9rem; margin-top: 4rem; }
.decision-card:nth-child(3) { top: 10rem; margin-top: 8rem; }
.decision-card span { margin-bottom: 7rem; }

.evidence-frame {
  position: relative;
  overflow: hidden;
  margin-top: 4rem;
  padding: clamp(0.35rem, 1vw, 0.65rem);
  border: 1px solid var(--edge);
  border-radius: calc(var(--radius-shell) + 0.35rem);
  background: var(--surface-soft);
  box-shadow: inset 0 1px 0 var(--edge-strong), 0 2rem 6rem var(--shadow);
}
.evidence-frame img { display: block; width: 100%; max-height: 78rem; border-radius: var(--radius-core); object-fit: cover; object-position: top; }
.evidence-caption { display: flex; justify-content: space-between; padding: 1rem 0.9rem 0.55rem; gap: 1rem; color: var(--text-soft); font-size: 0.78rem; }
.evidence-caption strong { color: var(--text); }

.gallery { gap: 1.25rem; }
.gallery-item { transition: border-color var(--hover) var(--ease-out), box-shadow var(--hover) var(--ease-out), transform var(--hover) var(--ease-out); }
.gallery-item:nth-child(3n + 2) { margin-top: 3.5rem; }
.gallery-item.wide:nth-child(3n + 2) { margin-top: 0; }

.artifact-strip { scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }
.artifact { border: 1px solid var(--edge); box-shadow: inset 0 1px 0 var(--edge-strong); transition: transform var(--hover) var(--ease-out), border-color var(--hover) var(--ease-out); }
.artifact img { transition: transform var(--hover) var(--ease-out); }

.video-card { transition: transform var(--hover) var(--ease-out), border-color var(--hover) var(--ease-out), box-shadow var(--hover) var(--ease-out); }
.video-card img { transition: transform 420ms var(--ease-out); }
.play-island { transition: transform var(--hover) var(--ease-out), background-color var(--hover) var(--ease-out); }

.case-note {
  min-height: min(35rem, 70dvh);
  background:
    radial-gradient(circle at var(--spot-x, 80%) var(--spot-y, 15%), color-mix(in srgb, var(--accent) 23%, transparent), transparent 20rem),
    linear-gradient(145deg, color-mix(in srgb, var(--text) 8%, transparent), transparent 45%),
    var(--surface);
}
.case-note h2 { max-width: 15ch; }

.case-caveat {
  max-width: 55rem;
  margin: 3rem 0 0;
  padding-left: 1.2rem;
  border-left: 2px solid var(--accent);
  color: var(--text-soft);
  font-size: 0.9rem;
}

.outcome-ledger { margin-top: 4rem; border-top: 1px solid var(--edge); }
.outcome-ledger article {
  display: grid;
  grid-template-columns: 5rem 1fr;
  align-items: baseline;
  padding: 1.7rem 0;
  border-bottom: 1px solid var(--edge);
  gap: 1rem;
}
.outcome-ledger strong { color: var(--accent-strong); font-size: 0.75rem; letter-spacing: 0.13em; }
.outcome-ledger p { margin: 0; font-size: clamp(1.2rem, 2.2vw, 2rem); letter-spacing: -0.035em; }

.js .reveal {
  opacity: 0;
  transform: translateY(2rem);
  transition:
    opacity var(--reveal-time) var(--ease-out) calc(var(--reveal-index, 0) * 55ms),
    transform var(--reveal-time) var(--ease-out) calc(var(--reveal-index, 0) * 55ms);
}
.js .reveal[data-reveal="left"] { transform: translateX(-2.5rem); }
.js .reveal[data-reveal="scale"] { transform: scale(0.965); }
.js .reveal[data-reveal="clip"] { clip-path: inset(0 0 100% 0 round 0.2rem); transform: none; transition-property: opacity, clip-path; }
.js .reveal.is-visible { opacity: 1; transform: none; clip-path: inset(0 0 0 0 round 0.2rem); }

.case-hero .reveal { transition-delay: calc(var(--hero-index, 0) * 90ms + 80ms); }
.case-hero-copy { --hero-index: 0; }
.case-hero .hero-media-shell { --hero-index: 2; }

@media (hover: hover) and (pointer: fine) {
  .video-lightbox-close:hover { background: rgba(31, 38, 47, 0.92); }
  .case-nav a:hover { color: var(--text); }
  .nav-theme:hover { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
  .hero-media-shell:hover { transform: rotate(0.2deg) translateY(-0.35rem); }
  .gallery-item:hover, .artifact:hover, .video-card:hover { transform: translateY(-0.35rem); border-color: var(--edge-strong); box-shadow: 0 1.8rem 5rem var(--shadow); }
  .gallery-item:hover img, .artifact:hover img, .video-card:hover img { transform: scale(1.022); }
  .video-card:hover .play-island { transform: scale(1.08); background: var(--accent-strong); }
  .case-link:hover { transform: translateY(-0.15rem); background: var(--accent-strong); }
}

@media (max-width: 62rem) {
  .case-hero { min-height: auto; padding-top: 9rem; }
  .project-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-rail div:nth-child(2) { border-right: 0; }
  .project-rail div:nth-child(-n + 2) { border-bottom: 1px solid var(--edge); }
  .project-rail div:nth-child(3) { padding-left: 0; }
  .narrative-split { grid-template-columns: 1fr; }
  .narrative-sticky { position: static; }
  .decision-grid { grid-template-columns: 1fr; }
  .decision-card, .decision-card:nth-child(2), .decision-card:nth-child(3) { position: relative; top: auto; margin-top: 0; min-height: 18rem; }
  .decision-card span { margin-bottom: 4rem; }
}

@media (max-width: 48rem) {
  .case-nav { grid-template-columns: 1fr auto auto; }
  .nav-brand { display: none; }
  .nav-theme { width: 2.6rem; height: 2.6rem; }
  .case-hero { padding-top: 7.2rem; }
  .case-hero h1 { font-size: clamp(3.35rem, 15vw, 5rem); }
  .project-rail { grid-template-columns: 1fr; }
  .project-rail div, .project-rail div:nth-child(3) { min-height: 0; padding: 1.1rem 0; border-right: 0; border-bottom: 1px solid var(--edge); }
  .project-rail div:last-child { border-bottom: 0; }
  .scope-row { grid-template-columns: 1fr; gap: 0.45rem; }
  .gallery-item:nth-child(3n + 2) { margin-top: 0; }
  .evidence-caption { flex-direction: column; }
  .outcome-ledger article { grid-template-columns: 3rem 1fr; }
  .case-note { min-height: 28rem; }
}

@media (prefers-reduced-motion: reduce) {
  .case-progress { display: none; }
  .js .reveal, .js .reveal[data-reveal] { opacity: 1; clip-path: none; transform: none; transition: opacity 120ms linear; }
  .hero-media-shell, .gallery-item, .artifact, .video-card, .case-link { transform: none !important; }
}

/* Shared project refinement: one system, one reading flow. */
.case-nav { width: min(66rem, calc(100% - 2rem)); min-height: 4.25rem; }
.nav-brand { min-width: 0; }
.nav-current { max-width: 15rem; overflow: hidden; font-size: 0.78rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.nav-theme span { font-size: 1rem; line-height: 1; }

.case-hero {
  grid-template-columns: minmax(0, 0.92fr) minmax(27rem, 1.08fr);
  min-height: min(52rem, 92dvh);
  gap: clamp(3rem, 6vw, 6rem);
}

.case-hero h1 { max-width: 11ch; font-size: clamp(3.8rem, 7.1vw, 7.5rem); font-weight: 630; line-height: 0.91; }
.case-hero .hero-summary { max-width: 32rem; }
.hero-media-shell { transition: transform 260ms var(--ease-out), border-color 220ms var(--ease-out); }

.project-rail { border-color: var(--edge); }
.project-rail div { min-height: 6.8rem; }

.case-chapters {
  position: sticky;
  top: 5.9rem;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, minmax(max-content, 1fr));
  width: min(42rem, calc(100% - 2rem));
  margin: 1.2rem auto 0;
  padding: 0.38rem;
  border-radius: 999px;
}

.case-chapters a {
  min-height: 2.7rem;
  padding: 0.76rem 1rem;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms var(--ease-out), background-color 180ms var(--ease-out), transform 140ms var(--ease-out);
}

.case-chapters a[aria-current="true"] { background: var(--text); color: var(--page); }
.case-chapters a:active { transform: scale(0.97); }

.case-section { padding-block: clamp(5.5rem, 8.5vw, 8rem); }
.case-section .eyebrow { padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--accent-strong); letter-spacing: 0.1em; }
.case-prose p, .section-intro > p { max-width: 65ch; }
.section-intro h2 { max-width: 13ch; font-weight: 620; }

.decision-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.2rem; }
.decision-card, .decision-card:nth-child(2), .decision-card:nth-child(3) { min-height: 22rem; }
.decision-card:nth-child(1) { grid-column: 1 / span 7; }
.decision-card:nth-child(2) { grid-column: 6 / span 7; margin-top: 3rem; }
.decision-card:nth-child(3) { grid-column: 2 / span 8; margin-top: 3rem; }
.decision-card span { margin-bottom: 5rem; }

.gallery-item, .artifact, .video-card, .local-video, .evidence-frame { box-shadow: inset 0 1px 0 var(--edge-strong), 0 1.2rem 4rem var(--shadow); }
.gallery-item img, .artifact img { transition: transform 360ms var(--ease-out); }
.video-card img { transition: transform 260ms var(--ease-out); }
.case-link { transition: transform 140ms var(--ease-out), background-color 180ms var(--ease-out); }
.outcome-ledger { max-width: 70rem; }
.case-note { min-height: min(30rem, 64dvh); }

@media (hover: hover) and (pointer: fine) {
  .case-chapters a:hover { color: var(--text); background: var(--surface-soft); }
  .case-chapters a[aria-current="true"]:hover { background: var(--text); color: var(--page); }
}

@media (max-width: 62rem) {
  .case-hero { grid-template-columns: 1fr; }
  .decision-card:nth-child(1), .decision-card:nth-child(2), .decision-card:nth-child(3) { grid-column: 1 / -1; }
}

@media (max-width: 48rem) {
  .case-nav { grid-template-columns: 1fr auto auto; max-width: calc(100vw - 1.5rem); }
  .nav-back { padding-left: 0.55rem; font-size: 0.7rem; }
  .nav-next { display: none; }
  .nav-brand { display: flex; }
  .nav-brand span { width: 2.55rem; height: 2.55rem; }
  .nav-current { display: none; }
  .case-hero h1 { max-width: 10ch; font-size: clamp(3.2rem, 14vw, 5rem); }
  .case-chapters { top: 5.35rem; grid-template-columns: repeat(4, max-content); justify-content: start; width: calc(100% - 1.5rem); overflow-x: auto; padding: 0.34rem; scrollbar-width: none; }
  .case-chapters::-webkit-scrollbar { display: none; }
  .case-chapters a { padding-inline: 0.85rem; }
  .decision-card:nth-child(1), .decision-card:nth-child(2), .decision-card:nth-child(3) { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .case-chapters a, .hero-media-shell, .gallery-item img, .artifact img { transform: none !important; transition: opacity 140ms linear, color 140ms linear, background-color 140ms linear; }
}

/* Case-study chapter index: part of the reading flow, not a second header. */
.case-chapters {
  position: relative;
  top: auto;
  z-index: 1;
  display: flex;
  justify-content: center;
  width: var(--content);
  margin: 1.5rem auto 0;
  padding: 0.75rem 0 1.25rem;
  gap: clamp(1rem, 3vw, 2.5rem);
  border: 0;
  border-bottom: 1px solid var(--edge);
  border-radius: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}

.case-chapters a {
  position: relative;
  min-height: 2.4rem;
  padding: 0.65rem 0.1rem;
  border-radius: 0;
  background: transparent;
}

.case-chapters a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0.18rem;
  left: 0;
  height: 0.12rem;
  background: var(--accent);
  opacity: 0;
  transform: scaleX(0.35);
  transform-origin: left;
  transition: opacity 180ms var(--ease-out), transform 220ms var(--ease-out);
}

.case-chapters a[aria-current="true"] { background: transparent; color: var(--text); }
.case-chapters a[aria-current="true"]::after { opacity: 1; transform: none; }

@media (hover: hover) and (pointer: fine) {
  .case-chapters a:hover, .case-chapters a[aria-current="true"]:hover { background: transparent; color: var(--text); }
}

@media (max-width: 48rem) {
  .case-chapters { top: auto; justify-content: flex-start; width: calc(100% - 2rem); margin-top: 1rem; overflow-x: auto; padding: 0.55rem 0 0.9rem; gap: 1.35rem; scrollbar-width: none; }
  .case-chapters a { padding-inline: 0; }
}

/* Case-study media settles into place as each decision enters the reading flow. */
.js .reveal-media img {
  transform: scale(1.035);
  transition: transform 720ms var(--ease-out);
}

.js .reveal-media figcaption,
.js .reveal-media .artifact-copy,
.js .reveal-media .video-copy {
  opacity: 0;
  transform: translateY(0.6rem);
  transition:
    opacity 360ms var(--ease-out) 90ms,
    transform 520ms var(--ease-out) 90ms;
}

.js .reveal-media.is-visible img { transform: none; }
.js .reveal-media.is-visible figcaption,
.js .reveal-media.is-visible .artifact-copy,
.js .reveal-media.is-visible .video-copy { opacity: 1; transform: none; }

@media (hover: hover) and (pointer: fine) {
  .js .reveal-media.is-visible:hover img { transform: scale(1.022); }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal-media img,
  .js .reveal-media.is-visible img,
  .js .reveal-media figcaption,
  .js .reveal-media .artifact-copy,
  .js .reveal-media .video-copy {
    transform: none;
    transition: opacity 140ms linear;
  }
}

/* A lightweight sequence for case-study journey architecture. */
.journey-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(2.6rem, 5vw, 4.8rem) 0 0;
  padding: 0;
  border-top: 1px solid var(--edge-strong);
  list-style: none;
}

.journey-rail li {
  position: relative;
  min-height: 15rem;
  padding: 1.6rem clamp(1rem, 2.4vw, 2rem) 1rem;
}

.journey-rail li + li { border-left: 1px solid var(--edge); }

.journey-rail li::before {
  content: "";
  position: absolute;
  top: -0.14rem;
  left: clamp(1rem, 2.4vw, 2rem);
  width: 2.8rem;
  height: 0.22rem;
  border-radius: 999px;
  background: var(--accent);
}

.js .journey-rail li::before {
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition:
    opacity 180ms var(--ease-out) calc(var(--reveal-index, 0) * 55ms + 120ms),
    transform 520ms var(--ease-out) calc(var(--reveal-index, 0) * 55ms + 120ms);
}

.js .journey-rail li.is-visible::before {
  opacity: 1;
  transform: scaleX(1);
}

.journey-rail li:first-child { padding-left: 0; }
.journey-rail li:first-child::before { left: 0; }
.journey-rail li > span { color: var(--accent-strong); font-size: 0.7rem; font-weight: 680; letter-spacing: 0.08em; text-transform: uppercase; }
.journey-rail strong { display: block; max-width: 14ch; margin-top: 2.7rem; font-size: clamp(1.45rem, 2.4vw, 2.15rem); font-weight: 620; line-height: 1.02; letter-spacing: -0.045em; text-wrap: balance; }
.journey-rail p { max-width: 28ch; margin: 1rem 0 0; color: var(--text-soft); font-size: 0.9rem; line-height: 1.55; }

@media (max-width: 48rem) {
  .journey-rail { grid-template-columns: 1fr; border-top: 0; }
  .journey-rail li, .journey-rail li:first-child { min-height: 0; padding: 1.35rem 0 2.4rem; border-top: 1px solid var(--edge); border-left: 0; }
  .journey-rail li::before, .journey-rail li:first-child::before { top: -0.14rem; left: 0; }
  .journey-rail strong { margin-top: 1.8rem; }
  .journey-rail p { max-width: 40ch; }
}

/* One-time chapter-title reveal for a consistent case-study reading rhythm. */
.js .scroll-heading h2 {
  opacity: 0.18;
  clip-path: inset(0 0 100% 0);
  transform: translateY(1.1rem);
  transition:
    opacity 320ms var(--ease-out) 70ms,
    clip-path 640ms var(--ease-in-out) 70ms,
    transform 640ms var(--ease-out) 70ms;
}

.js .scroll-heading.is-visible h2 {
  opacity: 1;
  clip-path: inset(0 0 0 0);
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .scroll-heading h2,
  .js .scroll-heading.is-visible h2 {
    opacity: 1;
    clip-path: none;
    transform: none;
    transition: opacity 140ms linear;
  }

  .js .journey-rail li::before,
  .js .journey-rail li.is-visible::before {
    opacity: 1;
    transform: none;
    transition: opacity 140ms linear;
  }
}

/* Video portfolio chapters: one page, three clearly separated disciplines. */
.discipline-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: var(--content);
  margin: clamp(1rem, 3vw, 2rem) auto clamp(2rem, 5vw, 5rem);
  padding: 0.5rem;
  gap: 0.35rem;
}

.discipline-index + .case-section h2[id],
.case-section h2[id] { scroll-margin-top: 7rem; }

/* Accurate chapter offsets matter more than speculative paint containment on
   this media index; thumbnails and video payloads still retain lazy loading. */
.video-portfolio .case-section {
  content-visibility: visible;
  contain-intrinsic-size: none;
}

.discipline-index a {
  display: grid;
  grid-template-columns: 2rem 1fr;
  align-items: center;
  min-width: 0;
  padding: 1.15rem 1.25rem;
  border-radius: calc(var(--radius-core) - 0.25rem);
  color: var(--text-soft);
  transition:
    color 180ms var(--ease-out),
    background-color 180ms var(--ease-out),
    transform 140ms var(--ease-out);
}

.discipline-index a > span {
  grid-row: 1 / span 2;
  color: var(--accent-strong);
  font-size: 0.7rem;
  font-weight: 720;
  letter-spacing: 0.1em;
}

.discipline-index strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discipline-index small { margin-top: 0.22rem; color: var(--text-faint); font-size: 0.7rem; }
.discipline-index a:active { transform: translateY(1px); }

.motion-showcase {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
  margin-top: 4rem;
  gap: 1rem;
}

.motion-showcase .motion-feature { grid-column: span 6; min-height: 32rem; }
.motion-showcase .local-video { grid-column: span 3; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.motion-showcase .local-video video { height: 32rem; max-height: none; }
.motion-showcase .local-video figcaption { display: grid; gap: 0.3rem; }
.motion-showcase .local-video figcaption strong { color: var(--text); font-size: 0.86rem; font-weight: 650; }
.motion-showcase .local-video figcaption span { color: var(--text-faint); font-size: 0.72rem; }

@media (hover: hover) and (pointer: fine) {
  .discipline-index a:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
}

@media (max-width: 62rem) {
  .motion-showcase .motion-feature { grid-column: span 12; }
  .motion-showcase .local-video { grid-column: span 6; }
}

@media (max-width: 48rem) {
  .discipline-index { grid-template-columns: 1fr; margin-bottom: 1rem; }
  .discipline-index a { min-height: 4.25rem; padding-block: 0.85rem; }
  .discipline-index strong { white-space: normal; }
  .motion-showcase .motion-feature,
  .motion-showcase .local-video { grid-column: span 12; }
  .motion-showcase .motion-feature { min-height: 24rem; }
  .motion-showcase .local-video video { height: min(36rem, 130vw); }
}

@media (prefers-reduced-motion: reduce) {
  .discipline-index a { transform: none; transition: color 140ms linear, background-color 140ms linear; }
}
