html { scroll-padding-top: 110px; }
.skip { position: fixed; top: 0; left: 1rem; z-index: 12; padding: 12px; background: #090909; transform: translateY(-150%); }
.skip:focus { transform: none; }
footer .privacy-link { pointer-events: auto; margin-right: auto; padding: 12px 0; font-size: 9px; text-transform: uppercase; color: #c9c2b7; }
/* Match updateView's human-pose camera before the renderer starts. */
.opening-frame { position: absolute; inset: 0 0 auto; height: 100vh; height: 100lvh; pointer-events: none; }
.opening-frame .title-block { pointer-events: auto; }
.opening-plate {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s ease-out, visibility 0s .45s;
}
.opening-plate img {
  position: absolute;
  width: min(107.333333vw, 167.708333lvh);
  max-width: none;
  height: auto;
  left: 0;
  top: 38%;
  transform: translate(-1.242236%, -45.347368%);
}
@media (width < 760px) {
  .opening-plate img { width: 149.074074vw; top: 55px; transform: translate(-1.552795%, -12.280702%); }
}
.still-site .opening-plate { opacity: 1; visibility: visible; transition: none; }
.still-site .title-block { position: absolute; opacity: 1 !important; transform: none !important; }
.still-site :is(#creature,#hdr-creature,.progress-rail,.reading-shade,.footer-actions,#controls) { visibility: hidden; }
.still-site #reveal-projects, .still-projects { display: none; }
.still-site .still-projects {
  display: block;
  max-width: 40rem;
  margin: 0 auto;
  padding: 18svh 7%;
  font: 18px/1.6 Baskerville,Georgia,serif;
  color: #e5d9c2;
}
.still-site .reading-copy { opacity: 1; clip-path: none; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .opening-plate { transition: none; }
}
.notice { max-width: 44rem; margin: 0 auto; padding: 3rem 1.5rem; font: 17px/1.65 Baskerville,Georgia,serif; color: #e5d9c2; }
.notice h1 { font: 400 clamp(2rem,5vw,3rem)/1.15 Baskerville,Georgia,serif; margin: 1.5rem 0; }
.notice h2 { font: 400 1.5rem/1.3 Baskerville,Georgia,serif; margin-top: 2rem; }
.notice a { text-decoration: underline; text-underline-offset: .18em; }
.notice .back { font: 11px/2 ui-monospace,monospace; letter-spacing: .12em; }
body { overflow-x: clip; }
.opening { height: 155svh; }
.title-block { transform-origin: right center; }
.invitation { text-transform: uppercase; line-height: 1.8; color: #b9afa2; }
.header-right { gap: clamp(20px, 3vw, 48px); }
.site-nav, .about-link {
  font: 10px/1.5 ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: .16em;
}
.about-link span { color: var(--red); }
.site-nav { display: flex; gap: clamp(16px, 2vw, 32px); color: #a29a8e; }
.site-nav a, .site-nav > span { padding: 8px 0; }
.site-nav [aria-current] { color: var(--bone); position: relative; }
.site-nav [aria-current]::after {
  content: "";
  position: absolute;
  left: 0;
  right: .16em;
  bottom: 2px;
  height: 1px;
  background: #c74731;
}
footer { justify-content: flex-end; pointer-events: none; }
.footer-actions { pointer-events: auto; }
#controls { max-height: calc(100svh - 110px); overflow-y: auto; }
#controls .study-details { color: var(--muted); font-size: 9px; }

.reading-shade {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent 20%, rgb(0 0 0 / 20%) 47%, rgb(0 0 0 / 94%) 65%, rgb(0 0 0 / 98%));
}
.studio-chapter {
  position: relative;
  z-index: 2;
  min-height: 110svh;
  padding: 16svh 9% 22svh 57%;
  color: #e5d9c2;
  font-family: Baskerville, Georgia, serif;
}
.reading-copy {
  max-width: 510px;
  opacity: 0;
  transform: translateY(45px);
  clip-path: inset(0 0 100% 0);
  transition: opacity .8s, transform 1.15s cubic-bezier(.16,.7,.2,1), clip-path 1.25s cubic-bezier(.16,.7,.2,1);
}
.reading-copy.visible, .reading-copy:focus-within {
  opacity: 1;
  transform: none;
  clip-path: inset(-8px);
}
.chapter-label, .studio-note > span, .chapter-link {
  font: 10px/1.7 ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 2.6px;
}
.chapter-label { margin: 0 0 23px; color: #b7a993; }
.chapter-label span { margin-right: 18px; color: #c74731; font: 16px Georgia, serif; }
.studio-chapter h2 {
  margin: 0 0 32px;
  font: 400 clamp(42px, 4.4vw, 72px)/1.02 Baskerville, Georgia, serif;
  letter-spacing: -1.8px;
}
.reading-copy > p:where(:not(.chapter-label)) { color: #b7a993; font-size: 17px; line-height: 1.75; }
.reading-copy > .chapter-lead {
  color: #e5d9c2;
  font-size: clamp(21px, 1.8vw, 28px);
  line-height: 1.45;
  margin-bottom: 27px;
}
.studio-note { margin: 28px 0 24px; padding-left: 19px; border-left: 1px solid #c74731; }
.studio-note > span { color: #b7a993; font-size: 9px; letter-spacing: 1.4px; }
.studio-note p { color: #b7a993; font-size: 15px; line-height: 1.7; margin: 10px 0 0; }
.chapter-link { display: inline-flex; align-items: center; gap: 25px; min-height: 50px; padding: 16px 0; letter-spacing: 2px; }
.chapter-link span { transition: transform .5s; }
.chapter-link:hover span { transform: translateX(8px); }
#projects { min-height: 100svh; }

@media (max-width: 1000px) and (min-width: 701px) {
  .studio-chapter { padding-left: 51%; padding-right: 8%; }
  .reading-shade { background: linear-gradient(90deg, transparent, rgb(0 0 0 / 20%) 28%, rgb(0 0 0 / 94%) 55%, rgb(0 0 0 / 98%)); }
}
@media (max-width: 760px) {
  html { scroll-padding-bottom: 72px; }
  footer {
    inset: auto 0 0;
    padding: 20px 3.5% max(8px, env(safe-area-inset-bottom));
    background: linear-gradient(transparent, #030303 35%);
  }
  .title-block h1 { grid-row: 1 / 3; }
  .site-nav, .about-link { font-size: 9px; }
  .header-right { gap: 18px; }
  .site-nav { gap: 12px; }
}
@media (max-width: 590px) {
  header { align-items: flex-start; }
  .header-right { flex-direction: column-reverse; align-items: flex-end; gap: 5px; }
  .about-link { padding-top: 2px; }
}
@media (max-width: 700px) and (orientation: portrait), (max-aspect-ratio: 11/10) and (max-width: 1100px) {
  html { scroll-padding-top: 95px; }
  .studio-chapter { min-height: 114svh; padding: 22svh 9% 26svh; }
  .reading-copy { max-width: 490px; margin: 0 auto; }
  .studio-chapter h2 { font-size: clamp(45px, 9vw, 65px); margin-bottom: 25px; letter-spacing: -1.2px; }
  .reading-shade { background: linear-gradient(180deg, rgb(0 0 0 / 20%), rgb(0 0 0 / 24%) 8%, rgb(0 0 0 / 88%) 30%, rgb(0 0 0 / 97%) 56%, rgb(0 0 0 / 97%)); }
}
@media (max-height: 500px) and (min-width: 501px) {
  html { scroll-padding-top: 64px; }
  footer { justify-content: flex-start; }
  .studio-chapter { padding-top: 26svh; padding-bottom: 30svh; }
  .title-block { top: 18%; }
  h1.living-logo { width: min(100%, 33svh); margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .reading-copy, .chapter-link span { transition: none; transform: none; clip-path: none; }
}

#fibre-count {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 5px 9px;
  border: 1px solid #46423c;
  border-radius: 2px;
  background: #141513;
  color: var(--bone);
  font: 12px ui-monospace, monospace;
}
#fibre-count:focus-visible { outline: 1px solid var(--red); outline-offset: 2px; }
#controls #fibre-hint { margin: 5px 0 12px; color: #b9afa2; }
@media (pointer: coarse) {
  #fibre-count { min-height: 44px; font-size: 16px; }
}

/* The camera and the canvas share a stable CSS viewport while phone chrome
   moves. A real window resize or rotation still changes their dimensions. */
#creature, #hdr-creature, #fibre-emission { height: 100vh; height: 100lvh; bottom: auto; }
@media (max-width: 760px) and (orientation: portrait) {
  .title-block { top: clamp(48lvh, calc(89lvh - 240px), 59lvh); }
  h1.living-logo { width: min(100%, clamp(120px, calc(35lvh - 132px), 170px)); }
}

#fibre-emission {
 position: fixed; inset: 0 0 auto; width: 100%; min-height: 13vw; object-fit: cover;
 pointer-events: none; dynamic-range-limit: no-limit;
 /* Confine the native light to the art layer for desktop HDR compositing. */
 mask-image: linear-gradient(to right, black 60%, rgb(0 0 0 / 80%) 100%);
}
#creature, #hdr-creature { dynamic-range-limit: no-limit; }
.still-site #fibre-emission, #fibre-emission[hidden] { display: none; }
