.flow { position: relative; z-index: 2; pointer-events: none; }
.flow > section { pointer-events: auto; }
.hero-spacer { height: 100svh; }

/* ==========================================================================
   Scene 02 — Creative Cloud Universe (WebGL matching universe.mp4 + CV HUD)
   ========================================================================== */

.universe {
  --copper: #f69a61;
  --ink-red: #de1b1c;
  --light: #f4ede1;
  position: relative;
  height: 280svh;
  background: #000;
  color: var(--light);
  isolation: isolate;
}

.universe__pin {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background: #040304;
  transform: scale(calc(0.935 + var(--enter, 1) * 0.065));
  border-radius: calc((1 - var(--enter, 1)) * 22px);
  box-shadow: 0 -22px 68px rgba(222, 27, 28, calc(sin(var(--enter, 1) * 180deg) * .32));
  transform-origin: 50% 45%;
  transition: box-shadow .5s ease;
}

.universe__pin::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  z-index: 8;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(246, 154, 97, .85), rgba(222, 27, 28, .9), transparent);
  opacity: calc(sin(var(--enter, 1) * 180deg));
}

#universeStage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.universe.is-picking #universeStage { cursor: pointer; }

/* Subtle corner typography matching universe.mp4 */
.u-note {
  position: absolute;
  margin: 0;
  z-index: 3;
  pointer-events: none;
  display: grid;
  gap: .28em;
  font: 500 clamp(7.5px, .6vw, 9.5px)/1.25 var(--ui);
  letter-spacing: .34em;
  text-transform: uppercase;
  color: rgba(235, 222, 212, .36);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.universe.is-live .u-note { opacity: 1; transform: none; }
.u-note--tl { left: clamp(18px, 2.8vw, 48px); top: 14%; }
.u-note--mr { right: clamp(18px, 2.8vw, 48px); top: 53%; text-align: right; }
.u-note--br {
  right: clamp(18px, 2.8vw, 48px);
  bottom: 18%;
  text-align: right;
  color: rgba(246, 154, 97, .42);
}

/* Floating card pick tooltip */
.u-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9;
  pointer-events: none;
  display: grid;
  gap: 2px;
  padding: 7px 11px;
  background: rgba(12, 10, 10, .88);
  border: 1px solid rgba(222, 27, 28, .65);
  border-radius: 3px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .65);
}
.u-tooltip[hidden] { display: none; }
.u-tooltip strong {
  font: 500 12px/1.15 var(--ui);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--light);
}
.u-tooltip span {
  font: 400 10px/1.2 var(--ui);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--copper);
}

/* Foreground HUD chrome layered cleanly above the canvas */
.uni-chrome {
  position: relative;
  z-index: 6;
  height: 100%;
  max-width: 1680px;
  margin: auto;
  padding: clamp(16px, 2.6vh, 30px) clamp(18px, 4.2vw, 68px) clamp(12px, 2vh, 22px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.kit-top, .fin__edition, .fin__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.kit-top {
  border-bottom: 1px solid rgba(130, 96, 80, .55);
  padding-bottom: 12px;
  pointer-events: auto;
}
.scene-label, .kit-top a, .kit-tour, .kit-services, .kit-tabs button,
.fin__edition, .fin__bar, .fin__strip {
  font: 500 12px/1.4 var(--ui);
  letter-spacing: .13em;
  text-transform: uppercase;
}
.scene-label {
  display: flex;
  gap: 1.2em;
  align-items: center;
  margin: 0;
  color: #d6c9bc;
}
.scene-label > span {
  display: inline-flex;
  align-items: center;
  gap: .75em;
  color: var(--copper);
}
.scene-label > span::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.kit-top a, .fin a { color: inherit; text-decoration: none; }
.kit-top a span, .fin a span { margin-left: .45em; }
.kit-top a:hover { color: var(--copper); }
.kit-actions { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); }
.kit-tour {
  border: 0;
  padding: 6px 0;
  cursor: pointer;
  background: transparent;
  color: #dfd0c2;
}
.kit-tour::before { content: 'Ⅱ'; margin-right: .5em; color: var(--copper); }
.is-paused .kit-tour::before { content: '▸'; }
.kit-tour:hover { color: var(--copper); }

/* Bottom HUD: split left + right wings so the central figure and floor
   reflections stay completely unobstructed between x=36% and x=64%. */
.uni-hud {
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.uni-wings {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(16px, 4vw, 64px);
}

.kit-panel { display: contents; }
.kit-panel[hidden], .fin__frames[hidden] { display: none; }

.uni-panelCopy {
  pointer-events: auto;
  width: min(440px, 34vw);
  padding: 13px 16px;
  background: rgba(10, 8, 8, .74);
  border: 1px solid rgba(130, 96, 80, .48);
  border-left: 2px solid var(--copper);
  border-radius: 3px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.uni-headRow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
}
.kit-title {
  margin: 0;
  font: 400 clamp(22px, 2vw, 32px)/.95 var(--disp);
  letter-spacing: -.02em;
  text-transform: uppercase;
  color: var(--light);
}
.kit-title em, .fin__copy h2 em {
  font-family: 'Bodoni Moda', Georgia, serif;
  font-weight: 400;
  font-style: italic;
  text-transform: none;
}
.kit-title em {
  color: var(--copper);
  letter-spacing: -.04em;
}
.uni-panelCopy h3 {
  margin: 0;
  color: var(--copper);
  font: 500 clamp(11px, .85vw, 13px)/1.25 var(--ui);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.uni-panelCopy p:not(.kit-services), .fin__copy > p {
  font: 400 clamp(13px, .95vw, 15px)/1.45 system-ui, sans-serif;
  margin: 0;
  color: #ebe2d6;
  text-wrap: pretty;
}
.uni-panelCopy .kit-services {
  margin: 7px 0 0;
  color: #bfb2a6;
  letter-spacing: .06em;
  font-size: clamp(10px, .74vw, 11.5px);
  line-height: 1.45;
}
.uni-panelCopy .kit-services + .kit-services {
  margin-top: 4px;
}
.uni-panelCopy .kit-services strong {
  color: var(--copper);
  font-weight: 600;
}

.kit-marks {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: min(440px, 34vw);
}
.kit-marks li span {
  display: flex;
  align-items: center;
  gap: .55em;
  padding: .42em .75em .42em .45em;
  color: #f3eade;
  border: 1px solid rgba(136, 105, 84, .75);
  border-radius: 3px;
  background: rgba(16, 13, 12, .82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .55);
  font: 500 clamp(11px, .9vw, 14px)/1 var(--ui);
  letter-spacing: .07em;
}
.kit-marks img {
  display: block;
  width: 1.75em;
  height: 1.75em;
  padding: .25em;
  border-radius: 2px;
  background: #f3f0e9;
  object-fit: contain;
}

.kit-marks--dense {
  max-width: min(500px, 39vw);
  gap: 6px;
}
.kit-marks--dense li span {
  font-size: clamp(10px, .78vw, 12px);
  padding: .34em .62em .34em .36em;
}
.kit-marks--dense img {
  width: 1.55em;
  height: 1.55em;
  padding: .2em;
}

.kit-tabs {
  pointer-events: auto;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  background: rgba(10, 8, 8, .78);
  border: 1px solid rgba(103, 86, 74, .6);
  border-radius: 3px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.kit-tabs button {
  position: relative;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: #c8bdb2;
  cursor: pointer;
  padding: 8px 4px;
  letter-spacing: .05em;
  font-size: clamp(9px, .72vw, 11.5px);
  transition: color .25s ease, background .25s ease;
}
.kit-tabs button:hover { color: var(--light); background: rgba(255, 255, 255, .05); }
.kit-tabs button[aria-selected="true"] {
  color: var(--copper);
  background: linear-gradient(rgba(222, 27, 28, .18), transparent);
}
.kit-tabs button[aria-selected="true"]::before {
  content: '';
  position: absolute;
  inset: -1px 0 auto;
  height: 2px;
  background: var(--copper);
}

.universe :focus-visible, .fin :focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* Fallback when WebGL2 is unavailable */
.universe.is-fallback {
  height: auto;
  background: radial-gradient(ellipse at 50% 45%, #2c1210 0%, #090808 68%);
}
.universe.is-fallback .universe__pin { position: relative; height: auto; min-height: 100svh; }
.universe.is-fallback #universeStage { display: none; }

@keyframes kit-arrive {
  from { opacity: 0; translate: 0 10px; }
  to { opacity: 1; translate: 0 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .universe .kit-top,
  .universe .uni-panelCopy,
  .universe .kit-marks,
  .universe .kit-tabs {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .68s var(--ease-out), transform .82s var(--ease-out);
  }
  .universe.is-entered .kit-top {
    opacity: 1;
    transform: none;
    transition-delay: .10s;
  }
  .universe.is-entered .uni-panelCopy {
    opacity: 1;
    transform: none;
    transition-delay: .24s;
  }
  .universe.is-entered .kit-marks {
    opacity: 1;
    transform: none;
    transition-delay: .36s;
  }
  .universe.is-entered .kit-tabs {
    opacity: 1;
    transform: none;
    transition-delay: .48s;
  }
  .universe.is-tab-switch.in-view .kit-panel:not([hidden]) .uni-panelCopy { animation: kit-arrive .44s var(--ease-out) backwards; }
  .universe.is-tab-switch.in-view .kit-panel:not([hidden]) .kit-marks li { animation: kit-arrive .42s var(--ease-out) backwards; }
  .universe.is-tab-switch.in-view .kit-panel:not([hidden]) .kit-marks li:nth-child(2) { animation-delay: 45ms; }
  .universe.is-tab-switch.in-view .kit-panel:not([hidden]) .kit-marks li:nth-child(3) { animation-delay: 90ms; }
  .universe.is-tab-switch.in-view .kit-panel:not([hidden]) .kit-marks li:nth-child(4) { animation-delay: 135ms; }
  .universe.is-tab-switch.in-view .kit-panel:not([hidden]) .kit-marks li:nth-child(5) { animation-delay: 180ms; }
  .universe.is-tab-switch.in-view .kit-panel:not([hidden]) .kit-marks li:nth-child(6) { animation-delay: 225ms; }
  .universe.is-tab-switch.in-view .kit-panel:not([hidden]) .kit-marks li:nth-child(7) { animation-delay: 270ms; }
  .universe.is-tab-switch.in-view .kit-panel:not([hidden]) .kit-marks li:nth-child(8) { animation-delay: 315ms; }
  .universe.is-tab-switch.in-view .kit-panel:not([hidden]) .kit-marks li:nth-child(9) { animation-delay: 360ms; }
  .universe.is-tab-switch.in-view .kit-panel:not([hidden]) .kit-marks li:nth-child(10) { animation-delay: 405ms; }
}

@media (max-width: 900px) {
  .uni-wings { gap: 14px; }
  .uni-panelCopy { width: min(360px, 48vw); padding: 10px 12px; }
  .kit-marks { max-width: 44vw; }
}

@media (max-width: 740px) {
  .universe { height: 225svh; }
  .u-note { display: none; }
  .uni-chrome { padding: 14px clamp(14px, 4vw, 24px) 12px; }
  .uni-wings { flex-direction: column; align-items: stretch; gap: 8px; }
  .uni-panelCopy { width: 100%; max-width: none; padding: 10px 12px; }
  .kit-marks { max-width: none; justify-content: flex-start; gap: 6px; }
  .kit-marks li span { font-size: 11px; padding: .35em .6em .35em .35em; }
  .kit-marks--dense { gap: 5px; }
  .kit-marks--dense li span { font-size: 10px; padding: .28em .5em .28em .28em; }
  .kit-marks--dense img { width: 1.4em; height: 1.4em; }
  .kit-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kit-tabs button {
    min-height: 36px;
    padding: 6px 4px;
    font-size: 9px;
    letter-spacing: .04em;
    line-height: 1.15;
  }
}
@media (max-width: 390px) {
  .kit-top .scene-label, .kit-actions > * { font-size: 10.5px; letter-spacing: .09em; }
  .kit-top .scene-label { display: grid; gap: 2px; }
  .kit-actions { gap: 12px; white-space: nowrap; }
}
