/* ==========================================================================
   MOLINA IT · 3D ARCHITECTURE EXPERIENCE (2026)
   Visual Identity: Obsidian Void (#050811) + Architectural Cyan (#38bdf8)
   Typography: Doto (Dot-Matrix Display) + IBM Plex Sans + IBM Plex Mono
   ========================================================================== */

:root {
  --bg-void: #050811;
  --bg-surface: #091122;
  --bg-panel: rgba(6, 12, 24, 0.86);
  --bg-panel-solid: #060c18;
  --ink-primary: #f2f6fc;
  --ink-secondary: #c5d2e6;
  --ink-muted: #8fa3bf;
  --accent-cyan: #38bdf8;
  --accent-electric: #00f5ff;
  --accent-amber: #f59e0b;
  --status-live: #10b981;
  --border-hairline: rgba(148, 179, 219, 0.18);
  --border-cyan: rgba(56, 189, 248, 0.48);
  --focus-ring: #00f5ff;

  --font-display: 'Doto', 'IBM Plex Mono', monospace;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --ease-out-expo: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --radius-outer: 14px;
  --radius-inner: 9px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  background-color: var(--bg-void);
  color: var(--ink-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-width: thin;
  scrollbar-color: #1c2c47 var(--bg-void);
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-void);
}
::-webkit-scrollbar-thumb {
  background: #1c2c47;
  border-radius: 3px;
}

a,
button {
  touch-action: manipulation;
}

@media (pointer: fine) {
  body.reticle-ready,
  body.reticle-ready a,
  body.reticle-ready button {
    cursor: none;
  }
}

/* ==========================================================================
   WEBGL VIEWPORT & HUD OVERLAY PLANE
   ========================================================================== */
#webgl-world {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 1;
  display: block;
  touch-action: pan-y;
}

.hud-corners {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
.corner-tick {
  position: absolute;
  width: 18px;
  height: 18px;
  color: rgba(56, 189, 248, 0.45);
}
.corner-tl { top: 20px; left: 20px; }
.corner-tr { top: 20px; right: 20px; }
.corner-bl { bottom: 20px; left: 20px; }
.corner-br { bottom: 20px; right: 20px; }

#scroll-track {
  position: relative;
  width: 100%;
  height: 480dvh;
  z-index: 0;
  pointer-events: none;
}
.scroll-act-marker {
  position: absolute;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* ==========================================================================
   BOOT PRELOADER TERMINAL
   ========================================================================== */
#boot-screen {
  position: fixed;
  inset: 0;
  z-index: 90;
  background-color: var(--bg-void);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  padding: var(--space-6);
  transition: opacity 0.6s var(--ease-out-expo), visibility 0.6s;
}
#boot-screen.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.boot-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--ink-primary);
  text-transform: uppercase;
}
.boot-rail {
  width: min(300px, 76vw);
  height: 4px;
  border-radius: 2px;
  background: rgba(148, 179, 219, 0.14);
  overflow: hidden;
}
.boot-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-electric));
  transition: width 0.2s var(--ease-out-expo);
}
.boot-meta {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.14em;
}

/* ==========================================================================
   TOP HUD BAR (Minimalist Open Spatial Chrome)
   ========================================================================== */
.hud-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  padding: 20px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  pointer-events: none;
}

.hud-brand,
.hud-controls {
  pointer-events: auto;
}

.hud-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink-primary);
  padding: 6px 12px 6px 6px;
  border-radius: 8px;
  background: rgba(5, 8, 17, 0.55);
  border: 1px solid rgba(148, 179, 219, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.22s var(--ease-out-expo), background-color 0.22s var(--ease-out-expo);
}

.hud-brand-mark {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.hud-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.hud-brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ink-primary);
}
.hud-brand-name span {
  color: var(--accent-cyan);
}
.hud-brand-role {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  margin-top: 3px;
}

.hud-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  background: rgba(5, 8, 17, 0.62);
  border: 1px solid var(--border-hairline);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ink-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out-expo), background-color 0.2s var(--ease-out-expo), transform 0.16s var(--ease-out-expo);
}

@media (hover: hover) and (pointer: fine) {
  .hud-brand:hover {
    border-color: var(--border-cyan);
    background: rgba(9, 17, 34, 0.85);
  }
  .hud-chip-btn:hover {
    border-color: var(--border-cyan);
    background: rgba(11, 21, 42, 0.9);
  }
  .btn-island:hover {
    background-color: var(--accent-electric);
    box-shadow: 0 12px 38px rgba(0, 245, 255, 0.36);
  }
  .btn-island:hover .btn-island-circle {
    transform: translate(2px, -2px);
  }
  .btn-ghost-hud:hover {
    border-color: var(--border-cyan);
    background: rgba(14, 27, 52, 0.92);
  }
  .cylinder-item:hover {
    color: var(--ink-primary);
    border-color: var(--border-cyan);
    transform: translateX(4px);
    box-shadow: 0 0 22px rgba(56, 189, 248, 0.16);
  }
}

.hud-chip-btn:active {
  transform: scale(0.97);
}
.hud-chip-btn:focus-visible,
.btn-island:focus-visible,
.btn-ghost-hud:focus-visible,
.cylinder-item:focus-visible,
.drawer-link:focus-visible,
.hud-spine-btn:focus-visible,
.terminal-link:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  transition: none;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--status-live);
  box-shadow: 0 0 10px var(--status-live);
  animation: pulseLive 2.2s ease-in-out infinite;
}
@keyframes pulseLive {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.menu-lines {
  position: relative;
  width: 15px;
  height: 9px;
  display: inline-block;
}
.menu-lines span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.8px;
  background-color: var(--ink-primary);
  transition: transform 0.35s var(--ease-drawer), top 0.35s var(--ease-drawer);
}
.menu-lines span:first-child { top: 1px; }
.menu-lines span:last-child { top: 6px; }
.hud-chip-btn.is-open .menu-lines span:first-child {
  top: 3.5px;
  transform: rotate(45deg);
}
.hud-chip-btn.is-open .menu-lines span:last-child {
  top: 3.5px;
  transform: rotate(-45deg);
}

/* ==========================================================================
   RIGHT SCROLL TELEMETRY SPINE
   ========================================================================== */
.hud-spine {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: auto;
}
.hud-spine-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 4px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.25s var(--ease-out-expo);
}
.hud-spine-btn .spine-tick {
  width: 12px;
  height: 2px;
  background: rgba(148, 179, 219, 0.28);
  transition: width 0.3s var(--ease-out-expo), background-color 0.3s var(--ease-out-expo);
}
.hud-spine-btn.is-active {
  color: var(--accent-electric);
}
.hud-spine-btn.is-active .spine-tick {
  width: 24px;
  background: var(--accent-electric);
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.6);
}
.hud-spine-btn:hover {
  color: var(--ink-primary);
}

/* ==========================================================================
   FIXED VIEWPORT HUD ACTS
   ========================================================================== */
.act-layer {
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 92px 48px 28px;
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  visibility: hidden;
  transition: opacity 0.55s var(--ease-out-expo), transform 0.55s var(--ease-out-expo), visibility 0.55s;
}
.act-layer.is-active {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  visibility: visible;
}

.act-interactive {
  pointer-events: auto;
}

.eyebrow-tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: 4px;
  background: rgba(8, 17, 34, 0.78);
  border: 1px solid var(--border-cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  line-height: 1;
}

.hero-tag-mono {
  font-family: var(--font-mono);
  font-size: clamp(11px, 0.78vw, 13px);
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--accent-cyan);
  text-transform: uppercase;
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: normal;
  font-size: clamp(2.45rem, 4.6vw, 4.85rem);
  line-height: 0.94;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  text-transform: uppercase;
}
.hero-headline .ink-cyan {
  color: var(--accent-electric);
  display: block;
}
.hero-sub-mono {
  font-family: var(--font-mono);
  font-size: clamp(11px, 0.78vw, 13px);
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  text-transform: uppercase;
  margin-top: 8px;
}
.hero-statement {
  font-family: var(--font-mono);
  font-size: clamp(12px, 0.85vw, 14.5px);
  line-height: 1.66;
  letter-spacing: 0.06em;
  color: var(--ink-secondary);
  text-transform: uppercase;
}

.prose-measure {
  font-family: var(--font-body);
  font-size: clamp(0.98rem, 1.25vw, 1.12rem);
  line-height: 1.55;
  color: var(--ink-secondary);
  max-width: 48ch;
}

/* Sharp Technical Island CTA */
.btn-island {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 5px 6px 5px 20px;
  border-radius: 999px;
  background-color: var(--accent-cyan);
  color: #040812;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.25s var(--ease-out-expo), transform 0.16s var(--ease-out-expo), box-shadow 0.25s var(--ease-out-expo);
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.24);
}
.btn-island:active {
  transform: scale(0.97);
}
.btn-island-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(4, 8, 18, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.32s var(--ease-drawer);
}

.btn-ghost-hud {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  background: rgba(8, 15, 30, 0.78);
  border: 1px solid var(--border-hairline);
  color: var(--ink-primary);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: border-color 0.25s var(--ease-out-expo), background-color 0.25s var(--ease-out-expo), transform 0.16s var(--ease-out-expo);
}
.btn-ghost-hud:active {
  transform: scale(0.97);
}

/* ==========================================================================
   ACT 0: HERO SYMMETRIC CENTERPIECE STAGE (Left Identity | 3D Monolith | Right Bio)
   ========================================================================== */
#hud-act-0 {
  justify-content: space-between;
}
.hero-stage-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1760px;
  padding-left: clamp(4px, 1.2vw, 24px);
  padding-right: clamp(128px, 8.8vw, 160px);
  margin: auto;
  pointer-events: none;
}
.hero-left-anchor {
  max-width: clamp(220px, 19vw, 335px);
  pointer-events: auto;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.hero-right-anchor {
  max-width: clamp(230px, 20vw, 355px);
  pointer-events: auto;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  text-align: left;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.hero-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-cyan);
}
.scroll-cue-line {
  width: 24px;
  height: 1px;
  background: var(--accent-cyan);
}

/* ==========================================================================
   ACT 1: SELECTED WORK (3D CYLINDRICAL CAROUSEL HUD)
   ========================================================================== */
#hud-act-1 {
  justify-content: space-between;
}
.work-hud-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 100%;
  gap: var(--space-6);
}
.work-index-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: min(345px, 100%);
}
.cylinder-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cylinder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-radius: 6px;
  background: rgba(5, 8, 17, 0.72);
  border: 1px solid rgba(148, 179, 219, 0.15);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: left;
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  transition: color 0.2s var(--ease-out-expo), border-color 0.2s var(--ease-out-expo), background-color 0.2s var(--ease-out-expo), transform 0.2s var(--ease-out-expo);
}
.cylinder-item > span:last-child {
  font-size: 10px;
  color: var(--accent-cyan);
  opacity: 0.85;
  flex-shrink: 0;
}
.cylinder-item.is-selected {
  color: var(--ink-primary);
  background: rgba(10, 22, 42, 0.9);
  border-color: var(--accent-electric);
  transform: translateX(6px);
}
.cylinder-item .idx {
  color: var(--accent-cyan);
}

.bezel-outer {
  padding: 6px;
  border-radius: var(--radius-outer);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-hairline);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.bezel-inner {
  border-radius: var(--radius-inner);
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.14);
}
.work-detail-card {
  width: min(380px, 100%);
}
.work-detail-inner {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.work-detail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent-cyan);
  letter-spacing: 0.12em;
}
.work-detail-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  text-transform: uppercase;
}
.work-detail-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-secondary);
}
.work-detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}
.work-step-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.work-step-group .btn-ghost-hud {
  padding: 0 12px;
}
.mobile-act-dock {
  display: none;
}

/* ==========================================================================
   ACT 2: ARCHITECTURAL CANYON & MANIFESTO
   ========================================================================== */
#hud-act-2 {
  justify-content: center;
  align-items: flex-start;
}
.canyon-manifesto {
  max-width: min(560px, calc(100vw - 240px));
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: 28px 32px;
  border-radius: var(--radius-outer);
  background: linear-gradient(115deg, rgba(5, 8, 17, 0.82) 0%, rgba(5, 8, 17, 0.52) 65%, rgba(5, 8, 17, 0.22) 100%);
  border-left: 3px solid var(--accent-cyan);
  border-top: 1px solid rgba(56, 189, 248, 0.28);
  border-right: 1px solid rgba(148, 179, 219, 0.08);
  border-bottom: 1px solid rgba(148, 179, 219, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: -12px 18px 42px rgba(0, 0, 0, 0.5), inset 1px 1px 0 rgba(255, 255, 255, 0.05);
}
.manifesto-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.6vw, 3.1rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(5, 8, 17, 0.95);
}
.manifesto-h2 span {
  color: var(--accent-electric);
}
.manifesto-lines {
  font-family: var(--font-mono);
  font-size: clamp(0.8rem, 1vw, 0.92rem);
  line-height: 1.68;
  color: var(--ink-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 10px rgba(5, 8, 17, 0.85);
}

/* ==========================================================================
   ACT 3: PORTAL REFLECTION & CALIBRATED CONTACT CLOSING
   ========================================================================== */
#hud-act-3 {
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  padding-bottom: 34px;
}
.portal-closing {
  position: relative;
  width: min(840px, calc(100% - 240px));
  padding: 34px 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  background: radial-gradient(closest-side, rgba(5, 8, 17, 0.92) 0%, rgba(5, 8, 17, 0.72) 52%, rgba(5, 8, 17, 0) 100%);
}
.crosshair-mark {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1;
  color: rgba(148, 179, 219, 0.28);
  pointer-events: none;
}
.cross-tl { top: 0; left: 0; }
.cross-tr { top: 0; right: 0; }
.cross-bl { bottom: 0; left: 0; }
.cross-br { bottom: 0; right: 0; }

.portal-h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.3vw, 3.7rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  text-transform: uppercase;
  text-shadow: 0 4px 28px rgba(5, 8, 17, 0.98), 0 0 24px rgba(0, 0, 0, 0.9), 0 0 12px rgba(56, 189, 248, 0.35);
}
.portal-h2 span {
  color: var(--accent-electric);
}
.portal-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-secondary);
  text-transform: uppercase;
  text-shadow: 0 2px 14px rgba(5, 8, 17, 0.95);
}
.portal-links-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 6px;
}
.terminal-link {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink-secondary);
  text-decoration: none;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.2s var(--ease-out-expo), background-color 0.2s var(--ease-out-expo);
}
.terminal-link:hover {
  color: var(--accent-electric);
  background: rgba(56, 189, 248, 0.12);
}
.portal-legal {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: rgba(219, 234, 254, 0.78);
  text-shadow: 0 1px 6px rgba(5, 8, 17, 0.94);
}

/* ==========================================================================
   FULLSCREEN ARCHITECTURAL DRAWER (MENU)
   ========================================================================== */
#nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(5, 8, 17, 0.94);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 96px 56px 40px;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-drawer), visibility 0.4s;
}
#nav-drawer.is-open {
  opacity: 1;
  visibility: visible;
}
@media (prefers-reduced-transparency: reduce) {
  #nav-drawer {
    background: var(--bg-panel-solid);
  }
}

.drawer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 760px;
}
.drawer-link {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-primary);
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.2vw, 2.65rem);
  font-weight: 800;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity 0.45s var(--ease-drawer), transform 0.45s var(--ease-drawer), background-color 0.2s, border-color 0.2s, color 0.2s;
}
#nav-drawer.is-open .drawer-link {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
#nav-drawer.is-open .drawer-link:nth-child(1) { transition-delay: 0.05s; }
#nav-drawer.is-open .drawer-link:nth-child(2) { transition-delay: 0.10s; }
#nav-drawer.is-open .drawer-link:nth-child(3) { transition-delay: 0.15s; }
#nav-drawer.is-open .drawer-link:nth-child(4) { transition-delay: 0.20s; }
#nav-drawer.is-open .drawer-link:nth-child(5) { transition-delay: 0.25s; }
#nav-drawer.is-open .drawer-link:nth-child(6) { transition-delay: 0.30s; }
#nav-drawer.is-open .drawer-link:nth-child(7) { transition-delay: 0.35s; }

.drawer-link .num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-cyan);
}
.drawer-link:hover,
.drawer-link.is-current {
  background: var(--ink-primary);
  color: var(--bg-void);
}
.drawer-link:hover .num,
.drawer-link.is-current .num {
  color: var(--bg-void);
}

.drawer-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-hairline);
}
.drawer-credentials {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.drawer-meta-note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-primary);
  letter-spacing: 0.12em;
}
.drawer-cred-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
}
.drawer-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

/* ==========================================================================
   PROJECT / BEFORE-AFTER INSPECTOR MODAL
   ========================================================================== */
#case-modal,
#budget-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(4, 7, 15, 0.88);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-drawer), visibility 0.35s;
}
#case-modal.is-open,
#budget-modal.is-open {
  opacity: 1;
  visibility: visible;
}
.modal-shell {
  width: min(1020px, 100%);
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translate3d(0, 18px, 0) scale(0.98);
  transition: transform 0.38s var(--ease-drawer);
}
#case-modal.is-open .modal-shell,
#budget-modal.is-open .modal-shell {
  transform: translate3d(0, 0, 0) scale(1);
}
.modal-inner {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}
.modal-stack-line {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-cyan);
  letter-spacing: 0.1em;
}
.modal-figure {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-hairline);
  background: #040710;
}
.modal-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.ba-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1.303 / 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-cyan);
  background: #040710;
  user-select: none;
  touch-action: none;
}
.ba-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}
.ba-before-wrap {
  position: absolute;
  inset: 0;
  clip-path: inset(0 50% 0 0);
}
.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2.5px;
  background: var(--accent-electric);
  box-shadow: 0 0 18px var(--accent-electric);
  transform: translateX(-50%);
  pointer-events: none;
}
.ba-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-void);
  border: 2px solid var(--accent-electric);
  color: var(--accent-electric);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 22px rgba(0, 245, 255, 0.55);
}

/* Live Budget Calculator Modal */
.budget-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.budget-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.budget-step-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent-cyan);
}
.budget-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.budget-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(8, 15, 30, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out-expo), background-color 0.2s var(--ease-out-expo);
}
.budget-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.budget-card:hover {
  border-color: rgba(56, 189, 248, 0.45);
}
.budget-card:has(input:checked),
.budget-card.is-checked {
  border-color: var(--accent-electric);
  background: rgba(0, 245, 255, 0.08);
}
.budget-card:has(input:focus-visible) {
  outline: 2px solid var(--accent-electric);
  outline-offset: 2px;
}
.budget-card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-primary);
}
.budget-card-sub {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-secondary);
}
.budget-card-price {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-cyan);
  letter-spacing: 0.08em;
}
.budget-result-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 10px;
  background: rgba(4, 8, 18, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.34);
}
.budget-result-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.budget-result-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
}
.budget-result-price {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.8vw, 2.3rem);
  font-weight: 900;
  line-height: 1.05;
  color: var(--ink-primary);
  font-variant-numeric: tabular-nums;
}
.budget-dash {
  color: var(--ink-muted);
  margin: 0 4px;
}
.budget-result-time {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-secondary);
}
.budget-result-time strong {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* ==========================================================================
   CUSTOM HUD RETICLE CURSOR
   ========================================================================== */
#hud-reticle {
  position: fixed;
  top: 0;
  left: 0;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border-radius: 50%;
  border: 1px dashed rgba(56, 189, 248, 0.7);
  pointer-events: none;
  z-index: 95;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s, width 0.25s var(--ease-out-expo), height 0.25s var(--ease-out-expo), margin 0.25s var(--ease-out-expo), border-color 0.25s, border-radius 0.25s var(--ease-out-expo);
}
#hud-reticle.is-visible {
  opacity: 1;
}
#hud-reticle.is-hover {
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border-style: solid;
  border-color: var(--accent-electric);
  background: rgba(0, 245, 255, 0.08);
}
#hud-reticle.is-screen-hover {
  width: auto;
  min-width: 72px;
  height: 30px;
  padding: 0 11px;
  margin: 14px 0 0 14px;
  border-radius: 999px;
  border-style: solid;
  border-color: rgba(0, 245, 255, 0.78);
  background: rgba(5, 8, 17, 0.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 22px rgba(5, 8, 17, 0.65), 0 0 16px rgba(0, 245, 255, 0.22);
}
#hud-reticle.is-screen-hover .reticle-coords {
  opacity: 0;
}
#hud-reticle.is-portal-hover {
  width: 70px;
  height: 70px;
  margin: -35px 0 0 -35px;
  border-style: solid;
  border-radius: 10px;
  border-color: var(--accent-electric);
  background: rgba(0, 245, 255, 0.14);
}
.reticle-core {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-electric);
  line-height: 1;
}
#hud-reticle.is-screen-hover .reticle-core {
  font-size: 10px;
}
.reticle-coords {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (320 / 375 / 414 / 768px · Thumb-Zone & Zero Overlap)
   ========================================================================== */
@media (max-width: 960px) {
  html,
  body {
    scrollbar-width: none;
  }
  html::-webkit-scrollbar,
  body::-webkit-scrollbar {
    display: none;
  }
  input,
  textarea,
  select {
    font-size: 16px;
  }
  .hud-topbar {
    padding: 10px 14px;
    padding-top: max(10px, env(safe-area-inset-top));
  }
  .hud-brand {
    min-height: 44px;
    padding: 6px 10px 6px 6px;
  }
  .hud-chip-btn {
    min-height: 44px;
    padding: 0 12px;
  }
  .hud-brand-role,
  .hud-spine,
  .hud-corners,
  .reticle-coords,
  .crosshair-mark,
  #hud-reticle {
    display: none !important;
  }
  .act-layer {
    padding: max(68px, calc(58px + env(safe-area-inset-top))) 14px max(78px, calc(68px + env(safe-area-inset-bottom)));
  }

  /* Mobile Floating Quick-Jump Bottom Dock */
  .mobile-act-dock {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 5px;
    border-radius: 12px;
    background: rgba(5, 8, 17, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.28);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .mobile-dock-btn {
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: color 0.2s, background-color 0.2s, border-color 0.2s;
  }
  .mobile-dock-btn.is-active {
    color: var(--bg-void);
    background: var(--accent-electric);
    border-color: var(--accent-electric);
  }
  .budget-option-grid {
    grid-template-columns: 1fr;
  }
  #nav-drawer {
    overflow-y: auto;
  }

  /* Act 0 Mobile: 3D M sculpture floats clean above; compact single-row thumb CTA card */
  #hud-act-0 {
    justify-content: flex-end;
    gap: 8px;
  }
  .hero-stage-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin-top: auto;
    margin-bottom: 2px;
    margin-inline: 0;
    padding: 13px 14px;
    border-radius: 12px;
    background: rgba(5, 8, 17, 0.88);
    border: 1px solid rgba(56, 189, 248, 0.24);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .hero-left-anchor,
  .hero-right-anchor {
    max-width: 100%;
    width: 100%;
    gap: 7px;
  }
  .hero-headline {
    font-size: clamp(1.85rem, 7.6vw, 2.45rem);
    text-wrap: balance;
  }
  .hero-headline .ink-cyan {
    display: inline;
  }
  .hero-statement {
    font-size: 13.5px;
    line-height: 1.5;
  }
  .hero-actions {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 8px;
    width: 100%;
  }
  .hero-actions .btn-island,
  .hero-actions .btn-ghost-hud {
    min-height: 44px;
    width: 100%;
    justify-content: center;
    font-size: 11px;
    white-space: nowrap;
  }
  .hero-actions .btn-island {
    justify-content: space-between;
    padding: 4px 5px 4px 12px;
  }
  .hero-actions .btn-ghost-hud {
    padding: 0 10px;
  }
  .hero-bottom-bar {
    font-size: 10px;
    justify-content: center;
  }
  .hero-bottom-bar > span:first-child {
    display: none;
  }

  /* Act 1 Mobile: Segmented Controls + Thumb Card */
  #hud-act-1 {
    justify-content: flex-end;
  }
  .work-hud-grid {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    height: auto;
    gap: 8px;
  }
  .work-index-panel {
    width: 100%;
    gap: 6px;
  }
  .work-index-panel .eyebrow-tag {
    font-size: 10px;
    padding: 4px 8px;
  }
  .cylinder-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .cylinder-item {
    min-height: 44px;
    padding: 6px 8px;
    font-size: 10px;
    letter-spacing: 0.03em;
    justify-content: center;
    text-align: center;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(8, 15, 30, 0.92);
  }
  .cylinder-item > span:first-child {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
  .cylinder-item > span:last-child {
    display: none;
  }
  .cylinder-item.is-selected {
    transform: none;
  }
  .work-detail-card {
    width: 100%;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(5, 8, 17, 0.9);
  }
  .work-detail-inner {
    padding: 12px 14px;
    gap: 6px;
  }
  .work-detail-title {
    font-size: 19px;
    text-wrap: balance;
  }
  .work-detail-desc {
    font-size: 13.5px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .work-detail-actions .btn-island,
  .work-detail-actions .btn-ghost-hud {
    min-height: 44px;
    font-size: 11.5px;
  }

  #hud-act-2 {
    justify-content: flex-end;
    align-items: stretch;
  }
  .canyon-manifesto {
    max-width: 100%;
    padding: 16px;
    gap: 10px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(5, 8, 17, 0.88);
  }
  .manifesto-h2 {
    font-size: clamp(1.5rem, 6.8vw, 2.05rem);
    text-wrap: balance;
  }
  .manifesto-lines {
    font-size: 12.5px;
    line-height: 1.55;
  }

  #hud-act-3 {
    padding-bottom: max(78px, calc(66px + env(safe-area-inset-bottom)));
  }
  .hero-bottom-bar {
    display: none;
  }
  .portal-closing {
    width: 100%;
    padding: 16px 12px;
    gap: 10px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .portal-h2 {
    font-size: clamp(1.6rem, 7.2vw, 2.25rem);
    text-wrap: balance;
  }
  .portal-sub {
    font-size: 11.5px;
    letter-spacing: 0.08em;
  }
  .portal-links-row {
    gap: 6px;
  }
  .terminal-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: 11px;
  }

  #nav-drawer {
    padding: 82px 18px max(24px, env(safe-area-inset-bottom));
  }
  .drawer-link {
    font-size: clamp(1.25rem, 5.5vw, 1.8rem);
    min-height: 48px;
    padding: 10px 12px;
  }
  #case-modal,
  #budget-modal {
    padding: 12px;
  }
  .modal-inner {
    padding: 16px;
  }
}

@media (max-width: 600px) {
  .hud-chip-status {
    min-width: 44px;
    padding: 0;
    justify-content: center;
  }
  .hud-chip-status span:last-child {
    display: none;
  }
}

@media (max-width: 440px) {
  .hud-topbar {
    padding: 10px 12px;
    gap: 8px;
  }
  .hud-controls {
    gap: 6px;
  }
  .hud-chip-btn {
    padding: 0 10px;
    font-size: 10px;
    min-height: 44px;
  }
  #btn-audio-toggle {
    min-width: 44px;
    padding: 0;
    justify-content: center;
  }
  #btn-audio-toggle span {
    display: none;
  }
  .btn-island {
    min-height: 44px;
    padding: 4px 5px 4px 14px;
    gap: 8px;
    font-size: 11.5px;
  }
  .btn-island-circle {
    width: 32px;
    height: 32px;
  }
  .cylinder-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .work-detail-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .work-step-group .btn-ghost-hud {
    padding: 0 9px;
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  .hud-brand {
    gap: 8px;
    padding: 4px 8px 4px 5px;
  }
  .hud-brand-name {
    font-size: 14px;
  }
}

@media (max-height: 700px) and (min-width: 961px) {
  .act-layer {
    padding: 76px 40px 20px;
  }
  .portal-closing {
    padding: 18px 24px;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot {
    animation: none;
  }
  .act-layer,
  .btn-island,
  .btn-island-circle,
  .drawer-link,
  .cylinder-item,
  #nav-drawer,
  #case-modal,
  #budget-modal {
    transition-duration: 0.01ms !important;
  }
}
