/* V6: original centered scene composition. Old versions are preserved. */
body:not(.reading) .intro-sequence{font-family:YMSModern,Arial,sans-serif;font-size:clamp(56px,7.25vw,120px);font-weight:800;font-synthesis:none;letter-spacing:-.025em;line-height:.98}
body:not(.reading) .intro-sequence .beat-business{left:5%;top:16%;bottom:auto}
body:not(.reading) .intro-sequence .beat-with{right:10%;top:42%;bottom:auto}
body:not(.reading) .intro-sequence .beat-character{left:13%;top:auto;bottom:17%}
body.court-open:not(.reading) .beat-business span{background:none;color:inherit;-webkit-text-fill-color:currentColor}
body:not(.reading) .work-heading{position:absolute!important;width:1px!important;height:1px;overflow:hidden;clip-path:inset(50%);padding:0;margin:0}
body:not(.reading) .work-controls{position:absolute;left:6%;right:6%;top:auto;bottom:34px;width:auto;max-width:none;max-height:none;overflow:visible;display:grid;grid-template-columns:minmax(180px,1fr) auto auto;align-items:center;gap:14px 30px;padding:16px 0 0;border:0;border-top:1px solid color-mix(in srgb,var(--project-text) 22%,transparent);background:transparent;color:var(--project-text);box-shadow:none}
.project-identity{display:flex;align-items:center;gap:18px;min-width:0}
#selected-client-logo{width:72px;height:36px;object-fit:contain;display:block;mix-blend-mode:normal}
body:not(.reading) .work-controls #selection-label{font-size:clamp(23px,2.2vw,34px);line-height:1.1;letter-spacing:-.045em;margin:0}
body:not(.reading) .work-controls #selection-category{font-size:10px;letter-spacing:.08em;margin:0 0 6px;opacity:.7}
body:not(.reading) .work-controls #selection-description{display:none}
body:not(.reading) .work-controls .primary{grid-column:2;grid-row:1;display:inline-flex;align-items:center;gap:30px;min-height:48px;padding:12px 0;border:0;border-bottom:1px solid currentColor;background:none;color:inherit;font-size:15px;white-space:nowrap}
body:not(.reading) .project-navigation{grid-column:3;grid-row:1;display:flex;gap:14px;align-items:center;border:0;margin:0;padding:0}
body:not(.reading) .project-navigation button{width:44px;height:44px;min-width:44px;min-height:44px!important;padding:0;border:1px solid color-mix(in srgb,var(--project-text) 26%,transparent);border-radius:50%;background:transparent;color:inherit;font-size:19px}
body:not(.reading) .project-navigation button:hover{background:color-mix(in srgb,var(--project-text) 13%,transparent)}
body:not(.reading) #project-count{font-size:11px;letter-spacing:.08em;white-space:nowrap}
body:not(.reading) .work-controls .project-action{grid-column:1;grid-row:2;justify-content:flex-start;gap:20px;width:max-content;max-width:100%;padding:0 0 5px;margin:0;font-size:12px;min-height:30px}
body:not(.reading) .work-controls .work-continue{display:none}
.project-index-toggle{position:absolute;right:6%;top:106px;display:flex;align-items:center;gap:20px;border:0;border-bottom:1px solid currentColor;padding:6px 0;min-height:44px;color:var(--project-text);background:none;font-size:12px;cursor:pointer}
.project-index-toggle span{font-size:10px;opacity:.6}
body:not(.reading) .project-picker{position:absolute;left:auto;right:5%;top:158px;bottom:auto;width:min(390px,90vw);display:flex;flex-direction:column;gap:0;z-index:6;padding:8px 18px;background:#f1eee7;color:#202622;border:0;box-shadow:0 16px 60px #0005;max-height:calc(100svh - 260px);overflow-y:auto}
body:not(.reading) .project-picker[hidden]{display:none}
body:not(.reading) .project-picker .client-choice{width:100%;flex:none;min-height:64px;padding:12px 0;display:flex;flex-direction:row;align-items:center;gap:18px;border:0;border-bottom:1px solid #20262220;background:none!important;color:#202622;text-align:left;font-size:15px}
body:not(.reading) .project-picker .client-choice:last-child{border-bottom:0}
body:not(.reading) .project-picker .client-choice[aria-pressed=true]{font-weight:700}
body:not(.reading) .project-picker .client-choice[aria-pressed=true]::after{content:'Selected';margin-left:auto;font-size:10px;font-weight:400;opacity:.65}
body:not(.reading) .project-picker .client-mark{width:42px;height:28px;display:flex;align-items:center;justify-content:center}
body:not(.reading) .project-picker .client-mark img{filter:none!important;width:100%;height:100%;object-fit:contain}
#project-wipe{position:fixed;inset:0;z-index:5;background:#101820;transform:translateX(-102%);pointer-events:none;visibility:hidden}
/* Native adaptation of Magic UI Animated Shiny Text; upstream MIT in community/. */
.case-shine{color:inherit;background-image:linear-gradient(105deg,transparent 35%,#c9e9ff 49%,transparent 63%);background-repeat:no-repeat;background-size:70% 100%;background-position:-240% 0;background-clip:text;-webkit-background-clip:text;animation:case-title-shine 5.5s linear infinite}
@keyframes case-title-shine{0%,45%{background-position:-240% 0}72%,100%{background-position:340% 0}}
.reading .project-index-toggle{display:none}
.reading .project-picker{display:none!important}
.reading .work-controls{display:none}
.reading .intro-sequence{font-weight:600}
.case-preparing .work-controls,.case-preparing .project-index-toggle{opacity:0;pointer-events:none;transition:opacity .18s}
.case-preparing .journey-nav{visibility:hidden}
@media(max-width:700px){
 body:not(.reading) .intro-sequence{font-size:clamp(40px,13vw,82px);font-weight:800;letter-spacing:-.025em}
 body:not(.reading) .intro-sequence .beat-business{left:20px;top:20%}
 body:not(.reading) .intro-sequence .beat-with{right:24px;top:38%}
 body:not(.reading) .intro-sequence .beat-character{left:20px;top:61%;bottom:auto}
 body:not(.reading) .work-controls{left:20px;right:20px;bottom:65px;grid-template-columns:1fr auto;gap:12px;padding-top:13px}
 .project-identity{gap:10px}#selected-client-logo{width:42px;height:28px}
 body:not(.reading) .work-controls #selection-label{font-size:22px}
 body:not(.reading) .work-controls #selection-category{font-size:8px}
 body:not(.reading) .work-controls .primary{grid-column:1;grid-row:2;font-size:13px;width:max-content;gap:18px;min-height:44px}
 body:not(.reading) .project-navigation{grid-column:2;grid-row:1 / 3;display:grid;grid-template-columns:44px 44px;grid-template-rows:18px 44px;gap:6px;max-width:94px;justify-content:center}
 body:not(.reading) #project-count{grid-column:1 / -1;grid-row:1;order:0;width:100%;text-align:center;font-size:9px}
 body:not(.reading) .project-navigation button{width:44px}
 body:not(.reading) .work-controls .project-action{grid-column:1;grid-row:3;font-size:11px}
 .project-index-toggle{right:22px;top:84px;font-size:11px}
 body:not(.reading) .project-picker{top:134px;right:20px;width:calc(100% - 40px)}
}
@media(prefers-reduced-motion:reduce){.case-shine{animation:none;background:none}.case-preparing .work-controls{transition:none}}
/* The last chapter joins normal document flow: no form nested-scroll panel. */
body:not(.reading) main{position:relative}
body:not(.reading) #contact.contact-revised{position:absolute;inset:auto 0 auto;top:calc(var(--scene-vh,1vh) * var(--contact-landing,590));height:auto;min-height:100svh;max-height:none;overflow:visible;background:#f4f3f0}
body.reading #contact.contact-revised{position:relative;inset:auto;height:auto}
.case-shine{color:transparent;background-image:linear-gradient(105deg,transparent 35%,#c9e9ff 49%,transparent 63%),linear-gradient(var(--project-text,#f5f8fc),var(--project-text,#f5f8fc));background-size:70% 100%,100% 100%;background-position:-240% 0,0 0}
@keyframes case-title-shine{0%,45%{background-position:-240% 0,0 0}72%,100%{background-position:340% 0,0 0}}
@media(prefers-reduced-motion:reduce){.case-shine{color:inherit;background:none;animation:none}}

/* Keep the scene clear; client marks are available in the project index. */
body.in-work .journey-nav{visibility:hidden;pointer-events:none}
#selected-client-logo{display:none}
/* Fixed editorial controls remain readable across all five lit materials. */
body:not(.reading) .work-controls{--project-text:#f5f4ef;color:var(--project-text);isolation:isolate}
body:not(.reading) .work-controls::before{content:"";position:absolute;z-index:-1;pointer-events:none;left:-8vw;right:-8vw;top:-85px;bottom:-70px;background:linear-gradient(transparent,#080b0d99 55%,#080b0db3)}
body[data-chapter="work"] .project-index-toggle{color:#f5f4ef}
body.scene-ready[data-chapter="work"] .identity img,
body.court-open.between-scenes[data-chapter="arrival"] .identity img{filter:brightness(0) invert(1)}
.project-index-toggle[aria-busy="true"] span{animation:scene-preparing 1s ease-in-out infinite}
@keyframes scene-preparing{50%{opacity:.2}}
@media(prefers-reduced-motion:reduce){.project-index-toggle[aria-busy="true"] span{animation:none;opacity:.5}}

body[data-chapter="contact"] .journey-nav{visibility:hidden;pointer-events:none}
body[data-chapter="contact"] header > :is(.identity,.header-project-cta){display:none}
.header-project-cta{
  display:inline-flex;align-items:center;gap:8px;justify-content:center;
  margin-left:auto;min-height:46px;padding:0 16px;
  border:1px solid #f3f2ef66;border-radius:999px;
  color:#f3f2ef;background:#18191c;text-decoration:none;white-space:nowrap;
  font-size:12px;font-weight:550;
  box-shadow:0 1px 0 #ffffff1a inset,0 3px 12px #0002;
  transition:background-color 180ms ease,color 180ms ease,border-color 180ms ease,box-shadow 180ms ease,transform 140ms cubic-bezier(.22,.61,.36,1);
  -webkit-tap-highlight-color:transparent;
}
.header-project-cta svg{flex:none;transition:transform 180ms cubic-bezier(.22,.61,.36,1)}
@media(hover:hover) and (pointer:fine){
 .header-project-cta:hover{background:#f3f2ef;color:#18191c;border-color:#f3f2ef;transform:translateY(-2px);box-shadow:0 7px 20px #0003}
 .header-project-cta:hover svg{transform:translate(2px,-2px)}
}
.header-project-cta:focus-visible{outline:3px solid #8eb6ff;outline-offset:4px;background:#f3f2ef;color:#18191c;border-color:#f3f2ef}
.header-project-cta:focus-visible svg{transform:translate(2px,-2px)}
.header-project-cta:active{background:#deddd8;color:#18191c;transform:translateY(0) scale(.97);box-shadow:0 1px 0 #0002 inset}
.header-project-cta:active svg{transform:translate(1px,-1px)}
@media(prefers-reduced-motion:reduce){
 .header-project-cta,.header-project-cta svg{transition:none!important;transform:none!important}
}
body:has(#motion[aria-pressed="false"]) .header-project-cta,body:has(#motion[aria-pressed="false"]) .header-project-cta svg{transition:none;transform:none}
.header-project-cta + #menu-toggle.menu-trigger{margin-left:0}
body[data-chapter="contact"] #menu-toggle.menu-trigger{margin-left:auto}
@media(max-width:600px){
  header:has(.header-project-cta){gap:8px}
  .header-project-cta{min-height:44px;padding:0 10px;gap:4px;font-size:11px}
  .header-project-cta svg{width:11px}
  .header-project-cta + #menu-toggle.menu-trigger{min-width:75px;gap:6px;padding:0 11px}
  header:has(.header-project-cta) .identity img{width:clamp(82px,24vw,132px)}
}
body[data-chapter="contact"] header::before{content:"";position:absolute;inset:-24px -32px -12px;background:#f4f3f0;z-index:-1;pointer-events:none}
#contact.contact-revised .contact-footer-brand img{filter:brightness(0);mix-blend-mode:normal}
#contact.contact-revised .contact-footer-nav{border:0;border-radius:0}

/* Reference-paced introduction: plain phase caption, no loading card. */
body:not(.reading) #entrance{left:28px;bottom:34px;right:auto;max-width:none;width:auto;padding:0;background:none;border:0;box-shadow:none;color:#eff0ed;pointer-events:none;z-index:45}
body:not(.reading) #entrance .entrance-label{font:400 12px/1.2 monospace;letter-spacing:.03em;display:block}
body:not(.reading) #entrance .entrance-label>span:first-child{display:none}
body:not(.reading) #entrance p{font-size:clamp(24px,2.7vw,40px);line-height:1.1;letter-spacing:-.04em;font-weight:500;margin:12px 0 0}
body:not(.reading) #entrance progress{position:absolute;width:1px;height:1px;clip-path:inset(50%)}
body:not(.reading) #entrance button{pointer-events:auto;background:none;color:inherit;border:0;min-height:44px;padding:12px 0 0;font-size:10px;opacity:.65}
body.entering{overflow:hidden}
body.entering header{opacity:0;pointer-events:none}
body:not(.entering) header{transition:opacity .6s ease}
body.entering .arrival .scene-note,body.entering .intro-support{visibility:hidden}
@media(max-width:700px){body:not(.reading) #entrance{left:20px;bottom:84px}body:not(.reading) #entrance p{font-size:28px}}

html{scrollbar-gutter:stable}
body:not(.reading) #entrance .entrance-label{color:#a9b0af}

body.entering.intro-ui header{opacity:1;pointer-events:auto;transition:opacity .7s ease}

/* Rasterise headline layers before their beat; animation changes only transform. */
body:not(.reading) .intro-sequence .intro-beat[hidden]{display:block!important}
body:not(.reading) .intro-sequence .intro-beat[hidden]>span{transform:translate3d(0,110%,0)}
body:not(.reading) .intro-sequence .intro-beat>span{backface-visibility:hidden}
/* Native doorway/mark projection supplies ink contrast without changing type. */
body.court-open:not(.reading) .arrival{mix-blend-mode:normal;color:#1c2322}
body.court-open:not(.reading) .arrival .intro-sequence .intro-beat,body.court-open:not(.reading) .arrival .scene-note,body.court-open:not(.reading) .arrival .hero-scroll{color:#1c2322}
body.court-open:not(.reading) .arrival .intro-sequence .intro-beat>span{
 background-color:#1c2322;background-image:var(--hero-ink-map);background-size:var(--hero-ink-size);background-position:var(--hero-ink-position);background-repeat:no-repeat;
 background-clip:text;-webkit-background-clip:text;color:transparent;-webkit-text-fill-color:transparent;
}

/* Portrait controls retain desktop styling and accessible touch targets. */
@media(max-width:700px){body:not(.reading) .work-controls .project-action{min-height:44px;font-size:14px}body:not(.reading) .work-controls #selection-category{font-size:10px}body:not(.reading) .work-controls .primary{font-size:16px}}

/* During chapter choreography the artwork owns attention; Menu stays available. */
body.between-scenes .journey-nav{visibility:hidden;pointer-events:none}
