/* ============================================================
   subpages.css
   Page-level styling for science.html and usecases.html —
   editorial system (MODS-reference), loaded AFTER css/style.css.
   Additive only: never renames or removes ids/classes that
   js/main.js or js/theme.js hook into (moleculeCanvas, molSwitch,
   molState, tSlides, tNav, tPrev, tNext, .switch-compare, .reveal,
   [data-count]) — only introduces page-specific classes on top of
   the shared design system. Colors come exclusively from the CSS
   custom properties defined in style.css so light/dark mode both
   keep working. .kicker, .sec-head, .science-grid, .molecule-panel,
   .steps/.step/.step-n, .features-grid, .apps-grid, .stats,
   .uc-row/.uc-num/.uc-link, .testi-* and .cta-band are already
   fully styled in style.css and are NOT redefined here.
   ============================================================ */

/* ---------- sub-hero: left-aligned page intro + banner image ---------- */
.sub-hero {
  padding: 168px 0 0;
  text-align: left;
  overflow: hidden;
}
.sub-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 45.0rem;
}
.sub-hero-inner .kicker {
  margin-bottom: 18px;
}
.display-hero {
  margin: 0;
  font-size: clamp(2.6rem, calc(1.219rem + 4.875vw), 5.2rem);
  font-weight: 620;
  letter-spacing: -0.05em;
  line-height: 0.98;
}
.sub-hero-lead {
  color: var(--text-2);
  max-width: 35.0rem;
  margin: 22px 0 0;
  font-size: 1.08rem;
  font-weight: 400;
  line-height: 1.55;
}
.sub-hero-banner {
  margin-top: clamp(40px, calc(18.0px + 4.5vw), 64px);
  border-top: 1px solid var(--border);
  aspect-ratio: 21/9;
  max-height: 480px;
  overflow: hidden;
  position: relative;
}
.sub-hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sub-hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0), rgba(10, 10, 10, 0.18));
  pointer-events: none;
}

/* ---------- layers section: film cross-section ---------- */
.layers-sec { padding-top: 40px; }
.layers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, calc(15.0px + 3.75vw), 64px);
  align-items: center;
}
.layers-media {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16/9;
}
.layers-media img { width: 100%; height: 100%; object-fit: cover; }
.layers-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.layers-list li {
  display: flex;
  gap: 18px;
  padding: 18px 4px;
  border-top: 1px solid var(--border);
}
.layers-list li:last-child { border-bottom: 1px solid var(--border); }
.ll-n {
  flex-shrink: 0;
  width: auto;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-3);
}
.ll-n::before { content: "("; }
.ll-n::after { content: ")"; }
.layers-list h4 { font-size: 1.05rem; margin-bottom: 4px; letter-spacing: -0.01em; }
.layers-list p { color: var(--text-2); font-size: 0.92rem; }

/* ---------- projection mode section ---------- */
.projection-sec { padding-top: 24px; }
.projection-inner {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(28px, calc(15.0px + 3.75vw), 64px);
  align-items: center;
}
.projection-copy p { color: var(--text-2); margin: 18px 0 0; max-width: 28.75rem; }
.projection-media {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16/9;
}
.projection-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- spec strip: second stat row on science.html ---------- */
.stats-row2 {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 20px;
}
.stats-row2 .num { font-size: clamp(2rem, calc(0.675rem + 2.7vw), 2.8rem); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .layers-grid,
  .projection-inner { grid-template-columns: 1fr; }
  .sub-hero-banner { aspect-ratio: 16/9; max-height: 360px; }
  .sub-hero { padding-top: 140px; }
}

@media (max-width: 680px) {
  .sub-hero { padding-top: 122px; }
  .sub-hero-inner .kicker { margin-bottom: 14px; }
  .sub-hero-banner { margin-top: 32px; aspect-ratio: 4/3; }
  .stats-row2 { grid-template-columns: 1fr; }
  .layers-list li { padding: 16px 2px; gap: 14px; }
}

/* ============================================================
   SPACES HERO — the space selector.
   A single stage that keeps switching frosted <-> clear while an
   editorial index swaps which space is on it. Same film, six rooms.
   ============================================================ */
.uc-hero { padding-bottom: 44px; }
.uc-hero-grid {
  display: grid; grid-template-columns: 1fr 1.15fr;
  gap: clamp(28px, 4vw, 64px); align-items: center;
}

.uc-index { display: flex; flex-direction: column; margin-top: 30px; border-top: 1px solid var(--border); }
.uc-pick {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 14px;
  padding: 13px 6px 13px 0; text-align: left; cursor: pointer;
  background: none; border: 0; border-bottom: 1px solid var(--border);
  transition: padding-left 0.35s var(--ease-out);
}
.uc-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.uc-pick .up-n { color: var(--text-3); font-size: 0.75rem; align-self: center; }
.uc-pick .up-t {
  font-family: var(--font-display); font-weight: 600; font-size: 1.06rem;
  letter-spacing: -0.02em; color: var(--text); transition: color 0.25s;
}
.uc-pick .up-d {
  grid-column: 2; font-size: 0.85rem; color: var(--text-3); line-height: 1.45;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 0.4s var(--ease-out), opacity 0.3s, margin-top 0.3s;
}
.uc-pick:hover .up-t { color: var(--accent); }
.uc-pick.is-active { padding-left: 12px; }
.uc-pick.is-active .up-t { color: var(--accent); }
.uc-pick.is-active .up-d { max-height: 4em; opacity: 1; margin-top: 4px; }

.uc-stage {
  position: relative; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3.1; max-height: min(620px, 72vh);
  background: var(--bg-2); isolation: isolate;
}
.uc-scene { position: absolute; inset: 0; opacity: 0; transition: opacity 0.55s var(--ease-out); }
.uc-scene.is-active { opacity: 1; }
.uc-scene img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.uc-scene .us-frost { opacity: 1; transition: opacity 0.5s var(--ease-out); }
.uc-stage.is-clear .uc-scene .us-frost { opacity: 0; }

.uc-stage-bar {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 10px 9px 18px; border-radius: 999px;
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.us-state { color: #fff; font-size: 0.78rem; }
.us-switch {
  position: relative; flex-shrink: 0; width: 54px; height: 30px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.18);
  transition: background 0.3s, border-color 0.3s;
}
.us-knob {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff;
  transition: transform 0.4s var(--ease-spring);
}
.us-switch[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.us-switch[aria-pressed="true"] .us-knob { transform: translateX(24px); }

.us-jump {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: #fff; font-size: 0.82rem; font-weight: 500;
}
.us-jump .arr { transition: transform 0.3s var(--ease-out); }
.us-jump:hover .arr { transform: translateX(5px); }

@media (max-width: 1000px) {
  .uc-hero-grid { grid-template-columns: 1fr; }
  .uc-stage-wrap { order: -1; }
  .uc-stage { aspect-ratio: 16 / 10; max-height: 46vh; }
  .uc-index { margin-top: 22px; }
}
@media (max-width: 680px) {
  .uc-stage { aspect-ratio: 4 / 3.2; border-radius: 16px; }
  .uc-pick .up-t { font-size: 1rem; }
  .uc-stage-bar { left: 10px; right: 10px; bottom: 10px; padding: 8px 8px 8px 14px; }
  .us-state { font-size: 0.72rem; }
  .us-jump { top: 10px; right: 10px; padding: 8px 13px; font-size: 0.76rem; }
}
