/* nÄS World habitat shell
   Fixed-perspective desk viewport (AAA). Not flat SaaS cards.
   Reference: assets/habitat/ref-fixed-perspective-cockpit.jpg
   Brighter than ref: lifted ambient, warm brass + cyan glass.
   No em dashes in copy elsewhere; this is CSS only.
*/

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500;600;700&family=Cinzel:wght@500;700&family=IBM+Plex+Mono:wght@400;500&family=Outfit:wght@300;400;600&display=swap');

:root {
  --desk: #1a1e28;
  --desk-edge: #0c0e14;
  --metal: #8a929e;
  --metal-hi: #d4dae4;
  --metal-lo: #3a404c;
  --cyan: #5ce1e6;
  --cyan-hot: #9ff6fa;
  --cyan-dim: rgba(92, 225, 230, 0.35);
  --brass: #c4a45a;
  --brass-dim: rgba(196, 164, 90, 0.45);
  --ink: #eef3f8;
  --ink-dim: rgba(238, 243, 248, 0.72);
  --ink-mute: rgba(238, 243, 248, 0.48);
  --glass: rgba(18, 28, 40, 0.55);
  --room-lift: 1.15; /* brightness vs pure black ref */
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--desk-edge);
  color: var(--ink);
  font-family: Outfit, system-ui, sans-serif;
}

/* Desk surface around the habitat window */
.desk-stage {
  min-height: 100vh;
  padding: clamp(0.75rem, 2vw, 1.5rem);
  background:
    radial-gradient(ellipse 90% 60% at 50% 100%, rgba(92, 225, 230, 0.08), transparent 55%),
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(196, 164, 90, 0.06), transparent 50%),
    linear-gradient(180deg, #12151c 0%, #1a1e28 40%, #0e1016 100%);
  display: flex;
  flex-direction: column;
}

/* Floating public nav sits on the desk, outside the glass */
.desk-stage > .nas-public-nav {
  position: relative;
  z-index: 50;
  margin-bottom: 0.65rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(92, 225, 230, 0.2);
}

/* The physical viewport: looking into a habitat on the desk */
.habitat-viewport {
  position: relative;
  flex: 1;
  min-height: calc(100vh - 5.5rem);
  border-radius: 1.1rem;
  overflow: hidden;
  border: 2px solid var(--metal-lo);
  box-shadow:
    0 0 0 1px rgba(212, 218, 228, 0.15),
    0 0 0 6px #2a303a,
    0 0 0 7px rgba(196, 164, 90, 0.25),
    0 28px 60px rgba(0, 0, 0, 0.55),
    inset 0 0 80px rgba(0, 0, 0, 0.35);
  isolation: isolate;
}

/* Bezel chrome corners */
.habitat-viewport::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 40;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(212, 218, 228, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.08),
    inset 0 -20px 40px rgba(0, 0, 0, 0.25);
}

/* Room volume: fixed first-person depth */
.habitat-room {
  position: absolute;
  inset: 0;
  overflow: hidden;
  filter: brightness(var(--room-lift));
}

.habitat-room .room-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 18%, rgba(120, 160, 200, 0.2), transparent 55%),
    radial-gradient(ellipse 100% 80% at 50% 100%, rgba(20, 30, 45, 0.9), transparent 45%),
    linear-gradient(180deg, #3a4a5c 0%, #1e2a38 35%, #141c28 70%, #0c121a 100%);
}

.habitat-room .room-ring {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(92vw, 1100px);
  height: min(70vh, 620px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(92, 225, 230, 0.22);
  box-shadow:
    0 0 40px rgba(92, 225, 230, 0.12),
    inset 0 0 60px rgba(92, 225, 230, 0.06);
  pointer-events: none;
}

.habitat-room .room-ring::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px solid rgba(196, 164, 90, 0.2);
}

.habitat-room .room-floor {
  position: absolute;
  left: 50%;
  bottom: 18%;
  width: 140%;
  height: 55%;
  transform: translateX(-50%) perspective(600px) rotateX(58deg);
  transform-origin: center top;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(92, 225, 230, 0.15), transparent 45%),
    repeating-linear-gradient(90deg, transparent 0 48px, rgba(255,255,255,0.03) 48px 49px),
    repeating-linear-gradient(0deg, transparent 0 48px, rgba(255,255,255,0.025) 48px 49px),
    linear-gradient(180deg, #2a3544 0%, #151c28 100%);
  border-radius: 50%;
  opacity: 0.85;
  pointer-events: none;
}

.habitat-room .room-stage {
  position: absolute;
  left: 50%;
  top: 38%;
  width: min(56vw, 640px);
  height: min(28vh, 240px);
  transform: translate(-50%, -50%);
  border-radius: 0.5rem;
  background: linear-gradient(180deg, rgba(30, 40, 55, 0.5), rgba(10, 14, 22, 0.75));
  border: 1px solid rgba(212, 218, 228, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

/* Side monitor clusters (empty glass panes like ref) */
.mon-stack {
  position: absolute;
  top: 8%;
  bottom: 26%;
  width: clamp(100px, 14vw, 180px);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  z-index: 5;
  pointer-events: none;
}
.mon-stack.left { left: 2.5%; }
.mon-stack.right { right: 2.5%; }

.mon {
  flex: 1;
  border-radius: 0.45rem;
  background: linear-gradient(160deg, #1a2834 0%, #0a1018 100%);
  border: 2px solid #4a5564;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.4),
    inset 0 0 30px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
}
.mon::after {
  content: "";
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  opacity: 0.85;
}

.mon-main {
  position: absolute;
  left: 50%;
  top: 6%;
  transform: translateX(-50%);
  width: min(58vw, 720px);
  height: clamp(72px, 12vh, 120px);
  z-index: 5;
  border-radius: 0.5rem;
  background: linear-gradient(160deg, #1a2834 0%, #0a1018 100%);
  border: 2px solid #4a5564;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

/* Bottom console (desk of the habitat, not website chrome) */
.habitat-console {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(110px, 18vh, 160px);
  z-index: 15;
  background:
    linear-gradient(180deg, rgba(50, 58, 72, 0.95) 0%, rgba(28, 32, 42, 0.98) 40%, rgba(16, 18, 24, 1) 100%);
  border-top: 1px solid rgba(212, 218, 228, 0.18);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.4);
  display: grid;
  grid-template-columns: 1fr minmax(180px, 280px) 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 1.25rem 0.85rem;
}

.habitat-console .console-wing {
  height: 70%;
  border-radius: 0.5rem;
  border: 1px solid rgba(92, 225, 230, 0.2);
  background:
    radial-gradient(circle at 30% 40%, rgba(92, 225, 230, 0.1), transparent 50%),
    linear-gradient(180deg, #1a222e, #0e1218);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
}

.habitat-console .console-center {
  height: 78%;
  border-radius: 0.55rem;
  border: 1px solid rgba(92, 225, 230, 0.35);
  background: #0a1218;
  box-shadow:
    0 0 20px rgba(92, 225, 230, 0.12),
    inset 0 0 24px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.35rem;
}

.habitat-console .stick {
  width: 0.55rem;
  height: 2.2rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #c8d0dc, #5a6270);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.habitat-console .status-chip {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid var(--cyan-dim);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* Glass content plate: the readable surface inside the room */
.habitat-content {
  position: absolute;
  z-index: 20;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: min(92%, 820px);
  max-height: min(58vh, 520px);
  overflow: hidden;
  padding: clamp(1rem, 2.5vw, 1.75rem);
  border-radius: 0.85rem;
  background: linear-gradient(165deg, rgba(24, 36, 52, 0.82), rgba(10, 14, 22, 0.88));
  border: 1px solid rgba(92, 225, 230, 0.28);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 40px rgba(92, 225, 230, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Scrollbars removed - using JS virtual scroll */
/* H1 titles only: human manuscript hand (not eyebrows / subtitles / body) */
.habitat-content h1 {
  font-family: 'Caveat', 'Segoe Script', 'Bradley Hand', cursive;
  font-weight: 600;
  font-size: clamp(1.85rem, 4.2vw, 2.75rem);
  letter-spacing: 0.02em;
  text-transform: none;
  margin: 0 0 0.5rem;
  color: var(--ink);
  text-shadow: 0 0 20px rgba(92, 225, 230, 0.28), 0 1px 0 rgba(0,0,0,0.3);
}

.habitat-content .eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.65rem;
}

.habitat-content p {
  margin: 0 0 0.85rem;
  line-height: 1.65;
  color: var(--ink-dim);
  font-size: 0.95rem;
}

.habitat-content .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.habitat-content a.btn {
  display: inline-block;
  text-decoration: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--cyan-dim);
  color: var(--ink);
  background: rgba(92, 225, 230, 0.1);
  transition: background 0.2s, box-shadow 0.2s;
}
.habitat-content a.btn:hover {
  background: rgba(92, 225, 230, 0.2);
  box-shadow: 0 0 20px rgba(92, 225, 230, 0.2);
}
.habitat-content a.btn.primary {
  border-color: rgba(92, 225, 230, 0.55);
  color: var(--cyan-hot);
}

/* ----- Room themes (decor only; structure shared) ----- */

/* ICS / Covenant: glass, cyan boundary */
.room-ics .room-sky {
  background:
    radial-gradient(ellipse 80% 50% at 50% 15%, rgba(92, 225, 230, 0.28), transparent 50%),
    linear-gradient(180deg, #4a6a78 0%, #243848 40%, #141e2a 100%);
}
.room-ics .room-stage {
  border-color: rgba(92, 225, 230, 0.35);
  box-shadow: 0 0 40px rgba(92, 225, 230, 0.15);
}

/* Research Lab: instruments, cool white + teal, crystal columns */
.room-research .room-sky {
  background:
    radial-gradient(ellipse 60% 40% at 50% 20%, rgba(180, 210, 230, 0.22), transparent 50%),
    linear-gradient(180deg, #3d4f5c 0%, #1c2834 45%, #101820 100%);
}
.room-research .prop-column {
  position: absolute;
  bottom: 28%;
  width: 18px;
  height: 28%;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(140, 200, 220, 0.5), rgba(40, 80, 100, 0.3));
  box-shadow: 0 0 20px rgba(92, 225, 230, 0.35);
  z-index: 3;
  pointer-events: none;
}
.room-research .prop-column.l { left: 22%; }
.room-research .prop-column.r { right: 22%; }
.room-research .prop-bench {
  position: absolute;
  left: 50%;
  bottom: 30%;
  width: min(40vw, 360px);
  height: 8px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(180, 200, 220, 0.35), transparent);
  box-shadow: 0 0 16px rgba(180, 200, 220, 0.2);
  z-index: 3;
  pointer-events: none;
}

/* Sound / NĀmJ: warmer stage red-amber glow */
.room-sound .room-sky {
  background:
    radial-gradient(ellipse 70% 45% at 50% 25%, rgba(200, 80, 100, 0.18), transparent 55%),
    linear-gradient(180deg, #3a2a38 0%, #1e1828 50%, #120e18 100%);
}
.room-sound .room-ring {
  border-color: rgba(255, 100, 120, 0.2);
}

/* Publishing / NĀpH: parchment + brass library light */
.room-publish .room-sky {
  background:
    radial-gradient(ellipse 70% 40% at 50% 20%, rgba(196, 164, 90, 0.16), transparent 50%),
    linear-gradient(180deg, #3a3428 0%, #221e18 50%, #141210 100%);
}
.room-publish .habitat-content {
  border-color: rgba(196, 164, 90, 0.3);
  background: linear-gradient(165deg, rgba(40, 34, 28, 0.88), rgba(16, 14, 12, 0.9));
}

/* Vault: deep secure chamber */
.room-vault .room-sky {
  background:
    radial-gradient(ellipse 50% 40% at 50% 30%, rgba(60, 80, 100, 0.25), transparent 50%),
    linear-gradient(180deg, #1a2030 0%, #0c1018 100%);
}
.room-vault .room-ring {
  border-color: rgba(92, 225, 230, 0.15);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(0, 0, 0, 0.4);
}

/* Empire map: wider HQ atrium */
.room-empire .room-sky {
  background:
    radial-gradient(ellipse 90% 50% at 50% 15%, rgba(100, 140, 200, 0.2), transparent 55%),
    linear-gradient(180deg, #2c3a4c 0%, #182230 50%, #0e141c 100%);
}

/* Panel / persona: intimate chamber */
.room-panel .room-sky {
  background:
    radial-gradient(ellipse 55% 45% at 50% 35%, rgba(92, 225, 230, 0.2), transparent 55%),
    linear-gradient(180deg, #243040 0%, #121820 100%);
}

/* Boarding / coming soon */
.room-boarding .room-sky {
  background:
    radial-gradient(ellipse 80% 50% at 50% 30%, rgba(92, 225, 230, 0.15), transparent 50%),
    linear-gradient(180deg, #1a2838 0%, #0a1018 100%);
}

/* JMF Hicks Office + Crew Bay */
.room-hicks .room-sky {
  background:
    radial-gradient(ellipse 70% 45% at 50% 18%, rgba(196, 164, 90, 0.14), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 60%, rgba(92, 225, 230, 0.1), transparent 55%),
    linear-gradient(180deg, #2c3038 0%, #1a1e28 45%, #10141c 100%);
}
.room-hicks .room-ring {
  border-color: rgba(196, 164, 90, 0.28);
}
.room-hicks .habitat-content {
  border-color: rgba(196, 164, 90, 0.28);
  max-height: min(62vh, 560px);
}

/* Hexagon chamber */
.room-hexagon .room-sky {
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(120, 90, 200, 0.16), transparent 55%),
    linear-gradient(180deg, #2a2840 0%, #161428 50%, #0c0a16 100%);
}
.room-hexagon .room-stage {
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  border-radius: 0;
  border-color: rgba(160, 120, 255, 0.35);
  box-shadow: 0 0 40px rgba(120, 90, 200, 0.2);
}
.room-hexagon .room-ring {
  border-color: rgba(160, 120, 255, 0.25);
}

/* Empire Security: Core Guard + Guard Deck */
.room-security .room-sky {
  background:
    radial-gradient(ellipse 50% 40% at 50% 25%, rgba(220, 80, 80, 0.12), transparent 50%),
    radial-gradient(ellipse 80% 50% at 50% 80%, rgba(40, 80, 120, 0.2), transparent 50%),
    linear-gradient(180deg, #2a2028 0%, #141820 50%, #0a0e14 100%);
}
.room-security .room-ring {
  border-color: rgba(220, 100, 100, 0.22);
  box-shadow: 0 0 36px rgba(200, 60, 60, 0.12), inset 0 0 40px rgba(0, 0, 0, 0.35);
}
.room-security .mon::after {
  background: #ff6b6b;
  box-shadow: 0 0 8px #ff6b6b;
}

/* Crew Call strip (on any creator page) */
.crew-call {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(92, 225, 230, 0.2);
}
.crew-call .crew-call-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.55rem;
}
.crew-call .crew-call-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.crew-call a.btn-crew {
  display: inline-block;
  text-decoration: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(196, 164, 90, 0.4);
  color: var(--ink);
  background: rgba(196, 164, 90, 0.08);
}
.crew-call a.btn-crew:hover {
  background: rgba(196, 164, 90, 0.16);
}
.crew-call a.btn-crew.full {
  border-color: rgba(92, 225, 230, 0.45);
  color: var(--cyan-hot);
  background: rgba(92, 225, 230, 0.08);
}

/* Props: habitat plants (ref has plants) */
.prop-plant {
  position: absolute;
  bottom: 26%;
  width: 36px;
  height: 48px;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(40, 90, 50, 0.9), transparent 70%),
    radial-gradient(ellipse at 40% 40%, rgba(60, 140, 70, 0.7), transparent 60%);
  filter: blur(0.3px);
  opacity: 0.75;
}
.prop-plant.l { left: 18%; }
.prop-plant.r { right: 18%; }

@media (max-width: 720px) {
  .mon-stack { display: none; }
  .mon-main { width: 80%; height: 64px; }
  .habitat-content {
    top: 42%;
    max-height: 52vh;
    width: 94%;
  }
  .habitat-console {
    grid-template-columns: 1fr;
    height: 88px;
  }
  .habitat-console .console-wing { display: none; }
}
