.scroll-page { overflow: visible; scroll-behavior: auto; }
.scroll-experience { display: block; height: auto; overflow: visible; --header-size: 64px; }
.scroll-experience .desk-header {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: var(--header-size);
  border-bottom: 1px solid #ffffff24;
  padding-inline: clamp(16px, 4.3vw, 68px);
  background: #0b111a;
}
.header-brief { color: var(--front-accent); min-height: 44px; display: inline-flex; align-items: center; gap: .45rem; font-size: 13px; }
.scroll-experience :is(#desk, #story, .case-beat) { scroll-margin-top: var(--header-size); }
.scroll-experience button, .scroll-experience a { touch-action: manipulation; }

.scroll-hero {
  display: grid;
  min-height: calc(100vh - var(--header-size));
  min-height: calc(100svh - var(--header-size));
  align-items: center;
  isolation: isolate;
  position: relative;
  overflow: clip;
  padding: clamp(28px, 6.5vw, 112px);
  background: #0b111a;
}
.hero-plate, .scroll-hero::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-plate { object-fit: cover; object-position: 66% 50%; z-index: -2; }
.scroll-hero::after {
  content: '';
  background: linear-gradient(90deg, #080f18f5 0%, #080f18d6 29%, #080f1833 66%, transparent),
    linear-gradient(0deg, #0b111a, transparent 26%);
  z-index: -1;
}
.hero-copy { max-width: 54rem; }
.scene-kicker { font: 600 12px/1.35 var(--mono); letter-spacing: .115em; text-transform: uppercase; color: #ffbf7d; margin: 0 0 17px; }
.scroll-hero h1, .case-beat h2, .scroll-experience .desk-opening h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: .86;
  letter-spacing: -.055em;
  color: var(--front-fg);
}
.scroll-hero h1 { font-size: clamp(82px, 11.65vw, 205px); max-width: 8ch; }
.scroll-hero h1 em, .case-beat h2 em, .scroll-experience .desk-opening h2 em { display: block; color: var(--front-accent); }
.hero-lead { color: var(--front-soft); font-size: clamp(16px,1.7vw,23px); line-height: 1.52; max-width: 32ch; margin: 23px 0 22px; }
.story-entry { display: inline-flex; align-items: center; gap: 11px; font-weight: 650; color: var(--front-fg); min-height: 44px; font-size: 15px; }
.story-entry span { display: grid; place-items: center; color: #172130; background: #ffbd7e; width: 44px; height: 44px; border-radius: 50%; font-size: 20px; }
.story-entry:hover { color: #ffcc9c; }

.investigation { --case-progress: 0; background: #0a1018; position: relative; isolation: isolate; }
.case-stage { display: none; }
.case-beats { min-width: 0; }
.case-beat { padding: clamp(43px, 7vw, 98px) clamp(22px, 6.5vw, 112px); border-bottom: 1px solid #a6b5c322; }
.scroll-experience .case-beat:focus-visible { outline: none; }
.case-beat:focus-visible .beat-copy { outline: 2px solid var(--front-accent); outline-offset: 8px; }
.case-beat h2 { font-size: clamp(52px, 7vw, 118px); text-wrap: balance; }
.beat-copy { max-width: 39rem; }
.beat-copy > p:not(.scene-kicker) { color: var(--front-soft); font-size: clamp(16px, 1.55vw, 22px); line-height: 1.55; margin: 18px 0 0; max-width: 34ch; }
.beat-copy .story-entry { margin-top: 19px; }

@media (prefers-reduced-motion: no-preference) and (min-height: 500px) {
  .investigation.motion-active { display: grid; grid-template-columns: minmax(0, 1fr); }
  .motion-active .case-stage, .motion-active .case-beats { grid-area: 1 / 1; }
  .motion-active .case-stage {
    display: block;
    position: sticky;
    align-self: start;
    top: var(--header-size);
    height: calc(100svh - var(--header-size));
    overflow: clip;
    pointer-events: none;
  }
  .motion-active .case-beats { z-index: 1; }
  .motion-active .case-beat { min-height: calc(100svh - var(--header-size)); display: grid; align-items: center; }
  .motion-active .beat-copy { width: min(44%, 39rem); }
  .case-optics { position: absolute; inset: 0; overflow: clip; }
  .case-optics::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #0a1018 4%, #0a1018e8 28%, #0a101846 59%, #0a101800 88%), linear-gradient(0deg, #0a1018c4, transparent 43%); }
  .case-optics img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; transform-origin: 70% 43%; transform: scale(calc(1 + var(--case-progress) * .49)); opacity: .75; transition: opacity .45s ease; }
  .investigation[data-beat='1'] .case-optics img { opacity: 1; }
  .investigation[data-beat='2'] .case-optics img { opacity: .87; }
  .scan-light { position: absolute; inset: 0; background: linear-gradient(106deg, transparent 35%, #ffc17b59 49%, transparent 63%); opacity: calc(var(--case-progress) * .55); transform: translateX(calc((var(--case-progress) - .52) * 85%)); }
  .record-hud { position: absolute; right: clamp(21px, 6.5vw, 110px); bottom: 12%; width: min(42vw, 550px); padding: 12px 0 0; color: #fff8ec; }
  .record-label { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid #d4bac5; color: #fff4e8; font: 650 11px/1.3 var(--mono); letter-spacing: .1em; }
  .record-run { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .trace-frame { min-height: clamp(69px, 10vw, 145px); display: flex; flex-direction: column; justify-content: space-between; padding: 10px; border: 1px solid #7d8c99; background: #152231ed; }
  .trace-frame span { font: 600 12px/1.2 var(--mono); color: #d8e2eb; }
  .trace-frame strong { font-size: clamp(15px, 2vw, 30px); line-height: 1.05; overflow-wrap: anywhere; }
  .trace-middle { background: #0e1926f7; border-style: dashed; transition: background-color .32s ease, border-color .32s ease; }
  .trace-middle .trace-found { display: none; }
  .investigation:not([data-beat='0']) .trace-middle { background: #4a2c1cf5; border: 1px solid #ffb473; box-shadow: inset 0 0 25px #ffac5426; }
  .investigation:not([data-beat='0']) .trace-middle .trace-unknown { display: none; }
  .investigation:not([data-beat='0']) .trace-middle .trace-found { display: block; color: #ffdeb8; }
  .record-progress { height: 2px; margin-top: 9px; background: #ffffff44; }
  .record-progress span { display: block; height: 100%; background: #ffb473; transform-origin: left; transform: scaleX(var(--case-progress)); }
}

.scroll-experience .desk {
  min-height: min(680px, 94svh);
  grid-template-rows: auto;
  overflow: visible;
  padding: clamp(46px, 7vw, 115px) clamp(22px, 6.5vw, 112px);
  background: radial-gradient(ellipse at 66% 30%, #1d2d3f, #0b111a 76%);
  align-items: center;
}
.scroll-experience .desk-opening h2 { font-size: clamp(50px, 7vw, 103px); margin-bottom: 16px; }
.scroll-experience .desk-opening p { display: block; }
.scroll-experience .desk-workspace { max-height: none; overflow: visible; align-self: center; margin: 0; }
.desk-tabs { display: flex; gap: 4px 17px; flex-wrap: wrap; margin-top: 14px; }
.desk-tabs a { display: inline-flex; min-height: 44px; align-items: center; color: var(--front-soft); font-weight: 650; font-size: 14px; }
.desk-tabs a[aria-current] { color: var(--front-accent); border-bottom: 1px solid currentColor; }
.brief-evidence { border-left: 2px solid var(--front-accent); padding: 5px 9px; margin-top: 10px; color: var(--front-soft); }
.brief-evidence p { margin: 0; }
.brief-evidence button { font-size: 13px; }

@media (max-width: 760px) {
  .scroll-experience { --header-size: 58px; }
  .scroll-experience .desk-header { grid-template-columns: auto minmax(0,1fr) auto; gap: 2px 9px; padding-inline: 12px; }
  .scroll-experience .desk-nav { display: flex; justify-content: center; gap: 6px; }
  .scroll-experience .desk-nav a { font-size: 12px; padding: 0 3px; }
  .scroll-experience .desk-nav a:first-child, .scroll-experience .desk-nav a:last-child { display: none; }
  .header-brief { font-size: 12px; }
  .scroll-hero { padding: 22px; align-items: end; padding-bottom: max(50px, 11svh); }
  .scroll-hero h1 { font-size: clamp(70px, 18vw, 136px); }
  .hero-plate { object-position: 67% 45%; }
  .scroll-hero::after { background: linear-gradient(0deg, #0b111a 5%, #0b111ae6 27%, #0b111a5c 65%, #0b111a12), linear-gradient(90deg, #0b111a44, transparent 86%); }
  .scroll-experience .desk[data-active] { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; gap: 16px; }
  .scroll-experience .desk-opening { padding: 0; }
  .scroll-experience .desk-panel { padding: 15px; }
}
@media (max-width: 760px) and (min-height: 500px) and (prefers-reduced-motion: no-preference) {
  .motion-active .case-stage { height: 40svh; z-index: 2; }
  .motion-active .case-beat { min-height: 88svh; align-items: start; padding-top: calc(40svh + 27px); padding-bottom: 32px; }
  .motion-active .beat-copy { width: auto; }
  .case-optics::after { background: linear-gradient(0deg, #0a1018 2%, #0a10182d 72%); }
  .record-hud { width: auto; right: 17px; left: 17px; bottom: 19px; }
  .record-label { font-size: 10px; }
  .trace-frame { min-height: 64px; }
  .case-beat h2 { font-size: clamp(44px, 10vw, 82px); text-wrap: initial; }
}
@media (max-height: 499px) { .scroll-hero { padding-block: 29px; } .scroll-hero h1 { font-size: clamp(61px,13vw,100px); } }
