/*
 * SLOCO fixed-stage scene system.
 * Loaded after the original visual styles so the approved visual language is
 * preserved while the document is presented as one cinematic viewport at a time.
 */

:root {
  --stage-header: 92px;
  --stage-pad-x: max(4vw, calc((100vw - 1480px) / 2));
  --stage-pad-bottom: clamp(2.5rem, 5vh, 4.5rem);
  --stage-duration: 850ms;
  --stage-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html.scene-mode,
html.scene-mode body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

html.scene-mode body {
  min-height: 100dvh;
  background: var(--ink);
}

html.scene-mode main {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
}

html.scene-mode main > section[data-section] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 8vh, 0) scale(1.015);
  filter: blur(8px);
  z-index: 0;
  transition:
    transform var(--stage-duration) var(--stage-ease),
    opacity 540ms ease,
    filter 680ms ease,
    visibility 0s linear var(--stage-duration);
  contain: layout paint;
}

html.scene-mode main > section[data-section].is-before {
  transform: translate3d(0, -8vh, 0) scale(1.015);
}

html.scene-mode main > section[data-section].is-after {
  transform: translate3d(0, 8vh, 0) scale(1.015);
}

html.scene-mode main > section[data-section].is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  filter: none;
  z-index: 2;
  transition-delay: 0s;
}

html.scene-mode main > section[data-section] > * {
  transition: opacity 620ms ease 130ms, transform 820ms var(--stage-ease) 70ms;
}

html.scene-mode main > section[data-section]:not(.is-active) > * {
  opacity: 0;
  transform: translate3d(0, 1.4rem, 0);
}

html.scene-mode main > section[data-section].is-active > * {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

html.scene-mode .site-header {
  min-height: var(--header-height);
  background: linear-gradient(180deg, rgba(7,7,6,.92), rgba(7,7,6,.58));
  border-bottom-color: rgba(255,255,255,.055);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
}

html.scene-mode .site-header::before {
  opacity: 0;
}

html.scene-mode .site-header.is-scrolled {
  min-height: var(--header-height);
}

html.scene-mode .site-footer {
  position: fixed;
  z-index: 60;
  left: var(--stage-pad-x);
  right: var(--stage-pad-x);
  bottom: 0.65rem;
  min-height: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 1rem;
  padding: 0.8rem 0 0;
  border: 0;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(1rem);
  transition: opacity 300ms ease, transform 500ms var(--stage-ease), visibility 0s linear 500ms;
}

html.scene-mode body[data-scene="start"] .site-footer {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 180ms, 180ms, 0s;
}

html.scene-mode .footer-brand,
html.scene-mode .footer-contact {
  display: none;
}

html.scene-mode .footer-legal {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  padding: 0;
  border: 0;
  font-size: 0.54rem;
}

/* Fixed scene rail */
.scene-rail {
  position: fixed;
  z-index: 70;
  top: 50%;
  right: clamp(0.65rem, 1.4vw, 1.5rem);
  transform: translateY(-50%);
  display: grid;
  gap: 0.6rem;
  padding: 0.75rem 0.48rem;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 99px;
  background: rgba(7,7,6,.48);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

html[dir="rtl"] .scene-rail {
  right: auto;
  left: clamp(0.65rem, 1.4vw, 1.5rem);
}

.scene-rail button {
  position: relative;
  width: 0.42rem;
  height: 0.42rem;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  background: rgba(7,7,6,.8);
  cursor: pointer;
  transition: transform 260ms var(--stage-ease), background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.scene-rail button::before {
  content: attr(data-label);
  position: absolute;
  top: 50%;
  right: calc(100% + 0.8rem);
  width: max-content;
  max-width: 12rem;
  transform: translate(0.4rem, -50%);
  padding: 0.38rem 0.55rem;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(7,7,6,.9);
  color: var(--text-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.5rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, transform 220ms var(--stage-ease), visibility 0s linear 220ms;
}

html[dir="rtl"] .scene-rail button::before {
  right: auto;
  left: calc(100% + 0.8rem);
}

.scene-rail button:hover::before,
.scene-rail button:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
  transition-delay: 0s;
}

.scene-rail button.is-active {
  transform: scale(1.45);
  border-color: var(--signal-hot);
  background: var(--signal);
  box-shadow: 0 0 1rem rgba(243,161,29,.45);
}

.scene-progress {
  position: fixed;
  z-index: 70;
  left: var(--stage-pad-x);
  bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.52rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  pointer-events: none;
}

html[dir="rtl"] .scene-progress {
  left: auto;
  right: var(--stage-pad-x);
}

.scene-progress__track {
  position: relative;
  width: clamp(3.5rem, 7vw, 7rem);
  height: 1px;
  background: var(--line-soft);
  overflow: hidden;
}

.scene-progress__track i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--scene-progress, 0%);
  background: linear-gradient(90deg, var(--signal), var(--signal-hot));
  box-shadow: 0 0 .75rem rgba(243,161,29,.4);
  transition: width 650ms var(--stage-ease);
}

html[dir="rtl"] .scene-progress__track i {
  inset: 0 0 0 auto;
}

.scene-progress__hint {
  color: var(--text-soft);
}

body[data-scene="start"] .scene-progress {
  opacity: 0;
}

/* Shared full-stage spatial system */
html.scene-mode .hero,
html.scene-mode .problem-sequence,
html.scene-mode .control-section,
html.scene-mode .capabilities-section,
html.scene-mode .founder-standard,
html.scene-mode .operations-section,
html.scene-mode .integration-section,
html.scene-mode .physical-section,
html.scene-mode .security-section,
html.scene-mode .method-section,
html.scene-mode .entry-section {
  padding: calc(var(--header-height) + clamp(1rem, 2.3vh, 2rem)) var(--stage-pad-x) var(--stage-pad-bottom);
  border-top: 0;
}

html.scene-mode .section-heading,
html.scene-mode .capabilities-intro,
html.scene-mode .security-heading {
  position: relative;
  z-index: 7;
  width: min(92vw, 72rem);
  max-width: none;
  margin: 0;
}

html.scene-mode .section-heading h2,
html.scene-mode .capabilities-intro h2,
html.scene-mode .founder-copy h2,
html.scene-mode .integration-copy h2,
html.scene-mode .security-heading h2,
html.scene-mode .entry-copy h2 {
  font-size: clamp(2.5rem, 5.1vw, 6rem);
}

/* Hero */
html.scene-mode .hero {
  display: grid;
  align-content: center;
}

html.scene-mode .hero__grid {
  width: 100%;
  height: min(72vh, 720px);
  margin: 0;
}

html.scene-mode .hero-system {
  min-height: 0;
  height: 100%;
}

html.scene-mode .scroll-cue {
  bottom: 1.2rem;
  left: var(--stage-pad-x);
  z-index: 8;
}

html[dir="rtl"].scene-mode .scroll-cue {
  left: auto;
  right: var(--stage-pad-x);
}

/* Problem scene: visual field + trace overlay */
html.scene-mode .problem-sequence {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(420px, 1.18fr);
  grid-template-rows: auto 1fr auto;
  gap: clamp(1rem, 2.5vw, 2.5rem);
  background: #070706;
}

html.scene-mode .problem-sequence::after,
html.scene-mode .control-section::after,
html.scene-mode .capabilities-section::after,
html.scene-mode .operations-section::after,
html.scene-mode .physical-section::after,
html.scene-mode .security-section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7,7,6,.9) 0%, rgba(7,7,6,.62) 34%, rgba(7,7,6,.16) 68%, rgba(7,7,6,.52) 100%),
    linear-gradient(180deg, rgba(7,7,6,.78) 0%, transparent 25%, transparent 68%, rgba(7,7,6,.88) 100%);
}

html[dir="rtl"].scene-mode .problem-sequence::after,
html[dir="rtl"].scene-mode .control-section::after,
html[dir="rtl"].scene-mode .capabilities-section::after,
html[dir="rtl"].scene-mode .operations-section::after,
html[dir="rtl"].scene-mode .physical-section::after,
html[dir="rtl"].scene-mode .security-section::after {
  background:
    linear-gradient(270deg, rgba(7,7,6,.9) 0%, rgba(7,7,6,.62) 34%, rgba(7,7,6,.16) 68%, rgba(7,7,6,.52) 100%),
    linear-gradient(180deg, rgba(7,7,6,.78) 0%, transparent 25%, transparent 68%, rgba(7,7,6,.88) 100%);
}

html.scene-mode .cinema-visual--problem,
html.scene-mode .cinema-visual--control,
html.scene-mode .cinema-visual--capability,
html.scene-mode .physical-visual,
html.scene-mode .security-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  overflow: hidden;
}

html.scene-mode .cinema-visual--problem img,
html.scene-mode .cinema-visual--control img,
html.scene-mode .cinema-visual--capability img,
html.scene-mode .physical-visual img,
html.scene-mode .security-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.025);
  transition: transform 6s ease-out, filter 800ms ease;
}

html.scene-mode section.is-active .cinema-visual img,
html.scene-mode section.is-active .physical-visual img,
html.scene-mode section.is-active .security-visual img {
  transform: scale(1);
}

html.scene-mode .cinema-visual figcaption,
html.scene-mode .physical-visual figcaption,
html.scene-mode .security-visual figcaption {
  position: absolute;
  z-index: 4;
  right: var(--stage-pad-x);
  bottom: 1.25rem;
}

html.scene-mode .problem-sequence .section-heading {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
}

html.scene-mode .problem-sequence .section-heading h2 {
  font-size: clamp(2.3rem, 4.2vw, 5.2rem);
}

html.scene-mode .problem-scroll {
  position: relative;
  z-index: 7;
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 1rem;
  align-self: stretch;
}

html.scene-mode .problem-visual {
  position: relative;
  top: auto;
  min-height: 0;
  height: 100%;
  max-height: min(57vh, 540px);
  background: rgba(7,7,6,.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

html.scene-mode .problem-notes {
  position: relative;
  min-height: 7.2rem;
  display: block;
}

html.scene-mode .problem-note {
  position: absolute;
  inset: 0;
  min-height: 0;
  padding: 1.15rem 1.3rem;
  border-top: 1px solid var(--line);
  background: rgba(7,7,6,.78);
  opacity: 0;
  visibility: hidden;
  transform: translateY(.9rem);
  transition: opacity 280ms ease, transform 430ms var(--stage-ease), visibility 0s linear 430ms;
}

html.scene-mode .problem-note.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

html.scene-mode .problem-note h3 {
  font-size: clamp(1.15rem, 2vw, 1.8rem);
}

html.scene-mode .problem-resolution {
  position: relative;
  z-index: 7;
  grid-column: 1;
  grid-row: 3;
  align-self: end;
  margin: 0;
}

/* Control / capabilities: full visual with operating console */
html.scene-mode .control-section,
html.scene-mode .capabilities-section {
  display: grid;
  grid-template-columns: minmax(340px, .75fr) minmax(0, 1.25fr);
  grid-template-rows: auto 1fr;
  gap: clamp(1.2rem, 3vw, 3.5rem);
  background: #070706;
}

html.scene-mode .control-section .section-heading,
html.scene-mode .capabilities-intro {
  grid-column: 1;
  grid-row: 1;
}

html.scene-mode .control-section .section-heading h2,
html.scene-mode .capabilities-intro h2 {
  font-size: clamp(2.35rem, 4.3vw, 5.2rem);
}

html.scene-mode .control-architecture,
html.scene-mode .capability-console {
  position: relative;
  z-index: 7;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  width: 100%;
  max-height: calc(100dvh - var(--header-height) - 5rem);
  margin: 0;
  background: rgba(7,7,6,.76);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

html.scene-mode .architecture-rail,
html.scene-mode .capability-selector {
  background: rgba(7,7,6,.74);
}

/* Founder */
html.scene-mode .founder-standard {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr);
  align-items: stretch;
  gap: 0;
  padding-right: 0;
  padding-left: 0;
  background: #070706;
}

html[dir="rtl"].scene-mode .founder-standard {
  grid-template-columns: minmax(420px, 1.08fr) minmax(0, .92fr);
}

html.scene-mode .founder-visual {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  margin: 0;
}

html.scene-mode .founder-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 58%, #070706 100%), linear-gradient(180deg, rgba(7,7,6,.15), transparent 35%, rgba(7,7,6,.35));
  pointer-events: none;
}

html[dir="rtl"].scene-mode .founder-visual::after {
  background: linear-gradient(270deg, transparent 58%, #070706 100%), linear-gradient(180deg, rgba(7,7,6,.15), transparent 35%, rgba(7,7,6,.35));
}

html.scene-mode .founder-visual > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 24%;
}

html.scene-mode .founder-visual figcaption {
  z-index: 3;
}

html.scene-mode .founder-copy {
  position: relative;
  z-index: 5;
  align-self: center;
  width: min(86%, 48rem);
  margin-inline: clamp(2rem, 6vw, 7rem);
}

html.scene-mode .founder-copy h2 {
  font-size: clamp(3rem, 5.4vw, 6.4rem);
}

/* Operations */
html.scene-mode .operations-section {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 1rem;
  background: #070706;
}

html.scene-mode .operations-section .section-heading {
  z-index: 8;
}

html.scene-mode .operations-section .section-heading h2 {
  font-size: clamp(2.25rem, 4vw, 4.8rem);
}

html.scene-mode .operation-selector {
  position: relative;
  z-index: 9;
  width: 100%;
  margin: 0;
  background: rgba(7,7,6,.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

html.scene-mode .operation-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

html.scene-mode .operation-panel,
html.scene-mode .operation-cinema {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
}

html.scene-mode .operation-cinema {
  z-index: 0;
}

html.scene-mode .operation-cinema::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7,7,6,.9) 0%, rgba(7,7,6,.35) 42%, rgba(7,7,6,.12) 68%, rgba(7,7,6,.5) 100%),
    linear-gradient(180deg, rgba(7,7,6,.72) 0%, transparent 32%, rgba(7,7,6,.12) 64%, rgba(7,7,6,.9) 100%);
  pointer-events: none;
}

html[dir="rtl"].scene-mode .operation-cinema::after {
  background:
    linear-gradient(270deg, rgba(7,7,6,.9) 0%, rgba(7,7,6,.35) 42%, rgba(7,7,6,.12) 68%, rgba(7,7,6,.5) 100%),
    linear-gradient(180deg, rgba(7,7,6,.72) 0%, transparent 32%, rgba(7,7,6,.12) 64%, rgba(7,7,6,.9) 100%);
}

html.scene-mode .operation-cinema > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

html.scene-mode .operation-cinema figcaption {
  position: absolute;
  z-index: 3;
  right: var(--stage-pad-x);
  bottom: 1.4rem;
}

html.scene-mode .operation-panel__copy {
  position: absolute;
  z-index: 5;
  left: var(--stage-pad-x);
  bottom: clamp(6rem, 12vh, 9rem);
  width: min(42rem, 52vw);
}

html[dir="rtl"].scene-mode .operation-panel__copy {
  left: auto;
  right: var(--stage-pad-x);
}

html.scene-mode .operation-panel__copy h3 {
  font-size: clamp(2rem, 4vw, 4.5rem);
  line-height: 1.02;
}

html.scene-mode .operation-flow {
  position: absolute;
  z-index: 6;
  left: var(--stage-pad-x);
  right: var(--stage-pad-x);
  bottom: 2.2rem;
  width: auto;
  margin: 0;
  background: rgba(7,7,6,.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* Integration */
html.scene-mode .integration-section {
  display: grid;
  grid-template-columns: minmax(360px, .82fr) minmax(0, 1.18fr);
  grid-template-rows: 1fr auto;
  gap: clamp(2rem, 5vw, 6rem);
  align-items: center;
  background:
    radial-gradient(circle at 68% 50%, rgba(243,161,29,.08), transparent 30rem),
    #070706;
}

html.scene-mode .integration-copy {
  width: auto;
  margin: 0;
}

html.scene-mode .integration-copy h2 {
  font-size: clamp(2.5rem, 4.7vw, 5.7rem);
}

html.scene-mode .boundary-system {
  min-height: min(54vh, 550px);
  margin: 0;
}

html.scene-mode .connection-examples {
  grid-column: 1 / -1;
  margin: 0;
}

/* Physical */
html.scene-mode .physical-section {
  display: grid;
  align-content: start;
  background: #070706;
}

html.scene-mode .physical-section .section-heading {
  z-index: 7;
}

html.scene-mode .device-bus {
  position: absolute;
  z-index: 7;
  left: var(--stage-pad-x);
  right: var(--stage-pad-x);
  bottom: clamp(2.8rem, 5vh, 4.5rem);
  width: auto;
  margin: 0;
  background: rgba(7,7,6,.78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Security */
html.scene-mode .security-section {
  display: grid;
  grid-template-columns: minmax(320px, .75fr) minmax(0, 1.25fr);
  gap: clamp(2rem, 4vw, 5rem);
  align-items: start;
  background: #070706;
}

html.scene-mode .security-heading {
  grid-column: 1;
}

html.scene-mode .security-heading h2 {
  font-size: clamp(2.4rem, 4.3vw, 5.2rem);
}

html.scene-mode .security-system {
  position: static;
  grid-column: 2;
  align-self: center;
  width: 100%;
  margin: 0;
}

html.scene-mode .security-visual {
  z-index: 0;
}

html.scene-mode .control-register {
  position: relative;
  z-index: 7;
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: rgba(7,7,6,.76);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

html.scene-mode .control-register article {
  min-height: 0;
  display: block;
  padding: 1.2rem 1.25rem;
  border-right: 1px solid var(--line-soft);
}

html.scene-mode .control-register p {
  margin-top: .55rem;
}

/* Method */
html.scene-mode .method-section {
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px) 0 0 / 10vw 100%,
    linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px) 0 0 / 100% 10vw,
    #090807;
}

html.scene-mode .method-line {
  align-self: center;
  width: 100%;
  margin: 0;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: visible;
}

html.scene-mode .method-line li {
  min-height: min(34vh, 20rem);
}

/* Entry */
html.scene-mode .entry-section {
  min-height: 0;
  display: grid;
  place-content: center;
  padding-bottom: 5.5rem;
}

html.scene-mode .entry-route {
  margin-top: clamp(2.5rem, 6vh, 5rem);
}

/* Internal step indicator for problem narrative */
.problem-step-indicator {
  position: absolute;
  z-index: 10;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  gap: .42rem;
}

html[dir="rtl"] .problem-step-indicator {
  right: auto;
  left: 1rem;
}

.problem-step-indicator button {
  width: .45rem;
  height: .45rem;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  background: rgba(7,7,6,.9);
  cursor: pointer;
}

.problem-step-indicator button.is-active {
  border-color: var(--signal-hot);
  background: var(--signal);
  box-shadow: 0 0 .65rem rgba(243,161,29,.4);
}

/* Short-height desktops: keep every scene usable without changing the stage model. */
@media (min-width: 821px) and (max-height: 820px) {
  :root {
    --header-height: 66px;
    --stage-pad-bottom: 1.7rem;
  }

  html.scene-mode .site-header {
    min-height: 66px;
    padding-block: .45rem;
  }

  html.scene-mode .identity img {
    width: 38px;
    height: 38px;
  }

  html.scene-mode .section-heading h2,
  html.scene-mode .capabilities-intro h2,
  html.scene-mode .founder-copy h2,
  html.scene-mode .integration-copy h2,
  html.scene-mode .security-heading h2,
  html.scene-mode .entry-copy h2 {
    font-size: clamp(2.15rem, 4.25vw, 4.8rem);
  }

  html.scene-mode .hero__grid {
    height: min(74vh, 610px);
  }

  html.scene-mode .problem-visual {
    max-height: 52vh;
  }

  html.scene-mode .control-architecture,
  html.scene-mode .capability-console {
    transform: scale(.92);
    transform-origin: center right;
  }

  html[dir="rtl"].scene-mode .control-architecture,
  html[dir="rtl"].scene-mode .capability-console {
    transform-origin: center left;
  }

  html.scene-mode .method-line li {
    min-height: 13rem;
  }
}

/* Phone and compact tablet: one scene, portrait visual, controlled inner scroll. */
@media (max-width: 820px) {
  :root {
    --header-height: 68px;
    --stage-pad-x: 1rem;
    --stage-pad-bottom: 3.4rem;
    --stage-duration: 620ms;
  }

  html.scene-mode .site-header {
    min-height: 68px;
  }

  html.scene-mode main > section[data-section].is-active {
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  html.scene-mode main > section[data-section].is-active::-webkit-scrollbar {
    display: none;
  }

  html.scene-mode .hero,
  html.scene-mode .problem-sequence,
  html.scene-mode .control-section,
  html.scene-mode .capabilities-section,
  html.scene-mode .founder-standard,
  html.scene-mode .operations-section,
  html.scene-mode .integration-section,
  html.scene-mode .physical-section,
  html.scene-mode .security-section,
  html.scene-mode .method-section,
  html.scene-mode .entry-section {
    min-height: 100dvh;
    height: 100dvh;
    padding: calc(var(--header-height) + .9rem) var(--stage-pad-x) var(--stage-pad-bottom);
  }

  .scene-rail {
    display: none;
  }

  .scene-progress {
    left: 1rem;
    right: 1rem;
    bottom: .72rem;
    justify-content: center;
    font-size: .48rem;
  }

  html[dir="rtl"] .scene-progress {
    left: 1rem;
    right: 1rem;
  }

  .scene-progress__hint {
    display: none;
  }

  html.scene-mode .site-footer {
    left: 1rem;
    right: 1rem;
    bottom: .55rem;
  }

  html.scene-mode .footer-legal {
    gap: .75rem;
    flex-wrap: wrap;
    font-size: .48rem;
  }

  html.scene-mode .hero {
    display: block;
  }

  html.scene-mode .hero__grid {
    min-height: calc(100dvh - var(--header-height) - 4.5rem);
    height: auto;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(44vh, 1fr);
    gap: 1rem;
  }

  html.scene-mode .hero h1 {
    font-size: clamp(2.8rem, 14vw, 4.4rem);
  }

  html.scene-mode .hero__lead {
    margin-top: 1rem;
    font-size: .92rem;
  }

  html.scene-mode .hero__actions {
    margin-top: 1.25rem;
  }

  html.scene-mode .hero-system {
    min-height: 44vh;
    height: 44vh;
  }

  html.scene-mode .scroll-cue {
    display: none;
  }

  html.scene-mode .problem-sequence,
  html.scene-mode .control-section,
  html.scene-mode .capabilities-section,
  html.scene-mode .security-section {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 1rem;
  }

  html.scene-mode .problem-sequence::after,
  html.scene-mode .control-section::after,
  html.scene-mode .capabilities-section::after,
  html.scene-mode .operations-section::after,
  html.scene-mode .physical-section::after,
  html.scene-mode .security-section::after {
    background:
      linear-gradient(180deg, rgba(7,7,6,.93) 0%, rgba(7,7,6,.48) 35%, rgba(7,7,6,.18) 58%, rgba(7,7,6,.92) 100%);
  }

  html.scene-mode .problem-sequence .section-heading,
  html.scene-mode .control-section .section-heading,
  html.scene-mode .capabilities-intro,
  html.scene-mode .security-heading {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
  }

  html.scene-mode .problem-sequence .section-heading h2,
  html.scene-mode .control-section .section-heading h2,
  html.scene-mode .capabilities-intro h2,
  html.scene-mode .security-heading h2 {
    font-size: clamp(2rem, 10vw, 3.4rem);
  }

  html.scene-mode .problem-scroll,
  html.scene-mode .control-architecture,
  html.scene-mode .capability-console,
  html.scene-mode .security-system {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
    width: 100%;
    max-height: none;
  }

  html.scene-mode .problem-visual {
    max-height: none;
    height: min(46vh, 430px);
  }

  html.scene-mode .problem-resolution {
    display: none;
  }

  html.scene-mode .architecture-rail,
  html.scene-mode .capability-selector,
  html.scene-mode .operation-selector {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
  }

  html.scene-mode .architecture-rail::-webkit-scrollbar,
  html.scene-mode .capability-selector::-webkit-scrollbar,
  html.scene-mode .operation-selector::-webkit-scrollbar {
    display: none;
  }

  html.scene-mode .architecture-tab,
  html.scene-mode .capability-tab,
  html.scene-mode .operation-tab {
    min-width: max-content;
    scroll-snap-align: start;
  }

  html.scene-mode .founder-standard {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 58% 42%;
    padding: 0;
  }

  html[dir="rtl"].scene-mode .founder-standard {
    grid-template-columns: 1fr;
  }

  html.scene-mode .founder-visual {
    grid-row: 1;
  }

  html.scene-mode .founder-visual::after,
  html[dir="rtl"].scene-mode .founder-visual::after {
    background: linear-gradient(180deg, transparent 55%, #070706 100%);
  }

  html.scene-mode .founder-visual > img {
    object-position: 52% 20%;
  }

  html.scene-mode .founder-copy {
    grid-row: 2;
    align-self: start;
    width: auto;
    margin: -1rem 1rem 0;
  }

  html.scene-mode .founder-copy h2 {
    font-size: clamp(2.55rem, 12vw, 4rem);
  }

  html.scene-mode .founder-copy > p {
    margin-top: .8rem;
    font-size: .9rem;
  }

  html.scene-mode .founder-copy blockquote {
    margin-top: 1rem;
    font-size: 1rem;
  }

  html.scene-mode .operations-section {
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: .7rem;
  }

  html.scene-mode .operations-section .section-heading h2 {
    font-size: clamp(2rem, 9.5vw, 3.25rem);
  }

  html.scene-mode .operation-selector {
    width: 100%;
  }

  html.scene-mode .operation-panel__copy {
    left: 1rem;
    right: 1rem;
    bottom: 7.2rem;
    width: auto;
  }

  html[dir="rtl"].scene-mode .operation-panel__copy {
    left: 1rem;
    right: 1rem;
  }

  html.scene-mode .operation-panel__copy h3 {
    font-size: clamp(1.85rem, 9vw, 3rem);
  }

  html.scene-mode .operation-flow {
    left: 1rem;
    right: 1rem;
    bottom: 3rem;
    overflow-x: auto;
  }

  html.scene-mode .operation-cinema > img {
    object-position: center;
  }

  html.scene-mode .integration-section {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    align-content: start;
    gap: 1.25rem;
  }

  html.scene-mode .integration-copy h2 {
    font-size: clamp(2.05rem, 9.8vw, 3.45rem);
  }

  html.scene-mode .integration-copy > p {
    margin-top: .9rem;
    font-size: .9rem;
  }

  html.scene-mode .boundary-system {
    min-height: 42vh;
  }

  html.scene-mode .connection-examples {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: inline mandatory;
  }

  html.scene-mode .connection-examples p {
    min-width: 72vw;
    scroll-snap-align: start;
  }

  html.scene-mode .physical-section {
    display: grid;
    grid-template-rows: auto 1fr;
  }

  html.scene-mode .physical-section .section-heading h2 {
    font-size: clamp(2.1rem, 10vw, 3.4rem);
  }

  html.scene-mode .device-bus {
    left: 1rem;
    right: 1rem;
    bottom: 3rem;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: inline mandatory;
  }

  html.scene-mode .device-group {
    min-width: 75vw;
    scroll-snap-align: start;
  }

  html.scene-mode .control-register {
    grid-template-columns: 1fr 1fr;
  }

  html.scene-mode .control-register article {
    padding: .85rem;
  }

  html.scene-mode .control-register h3 {
    font-size: .82rem;
  }

  html.scene-mode .control-register p {
    font-size: .68rem;
  }

  html.scene-mode .method-section {
    display: grid;
    grid-template-rows: auto 1fr;
  }

  html.scene-mode .method-section .section-heading h2 {
    font-size: clamp(2.3rem, 11vw, 3.8rem);
  }

  html.scene-mode .method-line {
    align-self: center;
    grid-template-columns: repeat(6, minmax(68vw, 1fr));
    overflow-x: auto;
    scroll-snap-type: inline mandatory;
  }

  html.scene-mode .method-line li {
    min-height: 38vh;
    scroll-snap-align: center;
  }

  html.scene-mode .entry-copy h2 {
    font-size: clamp(3rem, 14vw, 5rem);
  }

  html.scene-mode .entry-route {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: .5rem;
  }
}

@media (max-width: 480px) {
  html.scene-mode .problem-visual {
    height: 42vh;
  }

  html.scene-mode .control-register {
    grid-template-columns: 1fr;
    max-height: 48vh;
    overflow-y: auto;
  }

  html.scene-mode .footer-legal > span:first-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.scene-mode main > section[data-section],
  html.scene-mode main > section[data-section] > *,
  .scene-progress__track i,
  .scene-rail button {
    transition-duration: 1ms !important;
  }

  html.scene-mode section.is-active .cinema-visual img,
  html.scene-mode section.is-active .physical-visual img,
  html.scene-mode section.is-active .security-visual img {
    transform: none;
  }
}
