/* Shared immersive hero — extends homepage language; not for room pages */

.sh-hero {
  --sh-fade-to: #080807;
  position: relative;
  z-index: 1;
  overflow: hidden;
  min-height: min(88vh, 820px);
  min-height: min(88dvh, 820px);
  margin-top: 0;
}

.sh-hero__container {
  position: relative;
  overflow: hidden;
  min-height: inherit;
  background:
    radial-gradient(ellipse 115% 80% at 48% 16%, rgba(72, 14, 14, 0.48) 0%, transparent 58%),
    radial-gradient(ellipse 92% 62% at 84% 86%, rgba(28, 48, 118, 0.38) 0%, transparent 52%),
    linear-gradient(160deg, #050505 0%, #120a0a 38%, #070a14 72%, #040406 100%);
}

.sh-hero__canvas-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  min-height: 100%;
}

.sh-hero__canvas-wrap canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.sh-hero__canvas-back { z-index: 0; opacity: 0.92; }
.sh-hero__canvas-front { z-index: 1; }

.sh-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 88% 72% at 50% 42%, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.38) 100%);
}

.sh-hero__overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.045;
  background-image: url('https://grainy-gradients.vercel.app/noise.svg');
  pointer-events: none;
}

.sh-hero__light {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: normal;
  background:
    radial-gradient(ellipse 95% 75% at 45% 22%, rgba(43, 79, 212, 0.16) 0%, transparent 58%),
    radial-gradient(ellipse 75% 55% at 78% 88%, rgba(59, 13, 13, 0.2) 0%, transparent 52%);
}

.sh-hero--phase1 .sh-hero__light {
  background:
    radial-gradient(ellipse 100% 80% at 40% 18%, rgba(43, 79, 212, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 85%, rgba(28, 48, 118, 0.14) 0%, transparent 50%),
    radial-gradient(ellipse 60% 45% at 70% 40%, rgba(59, 13, 13, 0.08) 0%, transparent 45%);
}

.sh-hero--phase2 .sh-hero__light {
  background:
    radial-gradient(ellipse 85% 70% at 50% 25%, rgba(43, 79, 212, 0.12) 0%, transparent 52%),
    radial-gradient(ellipse 90% 75% at 55% 60%, rgba(72, 14, 14, 0.26) 0%, transparent 58%),
    radial-gradient(ellipse 55% 40% at 20% 80%, rgba(28, 48, 118, 0.1) 0%, transparent 48%);
}

.sh-hero--phase3 .sh-hero__light {
  background:
    radial-gradient(ellipse 88% 72% at 48% 30%, rgba(43, 79, 212, 0.15) 0%, transparent 55%),
    radial-gradient(ellipse 80% 65% at 52% 70%, rgba(59, 13, 13, 0.14) 0%, transparent 55%);
}

.sh-hero--phase4 .sh-hero__light {
  background:
    radial-gradient(ellipse 70% 55% at 50% 35%, rgba(43, 79, 212, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 100% 90% at 50% 100%, rgba(0, 0, 0, 0.45) 0%, transparent 45%);
  opacity: 0.92;
}

.sh-hero--phase5 .sh-hero__light {
  background:
    radial-gradient(ellipse 95% 75% at 45% 20%, rgba(43, 79, 212, 0.14) 0%, transparent 54%),
    radial-gradient(ellipse 65% 50% at 75% 75%, rgba(59, 13, 13, 0.12) 0%, transparent 50%);
}

.sh-hero__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(32vh, 240px);
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(to top, var(--sh-fade-to) 0%, rgba(8, 8, 7, 0.65) 38%, transparent 100%);
}

.sh-hero__content {
  position: relative;
  z-index: 4;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 8vh, 72px) 28px clamp(48px, 10vh, 88px);
  text-align: center;
}

.sh-hero__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: clamp(36px, 7vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: #f4ede0;
  max-width: 16ch;
  margin-bottom: 16px;
}

.sh-hero__sub {
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.55;
  color: rgba(203, 195, 180, 0.88);
  max-width: 36ch;
}

/* Visual anchors (phase-specific) */
.sh-anchor {
  margin: 0 auto 28px;
  width: min(100%, 320px);
  height: 120px;
  position: relative;
  opacity: 0.95;
}

.sh-anchor svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sh-anchor--nodes .sh-n {
  fill: rgba(43, 79, 212, 0.35);
  stroke: rgba(58, 107, 255, 0.5);
  stroke-width: 0.5;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.sh-anchor--ring circle {
  fill: none;
  stroke: rgba(196, 163, 90, 0.25);
  stroke-width: 0.6;
}

.sh-anchor--flow path {
  fill: none;
  stroke: rgba(58, 107, 255, 0.35);
  stroke-width: 0.8;
}

/* System map */
.sh-after-hero {
  position: relative;
  z-index: 5;
  margin-top: -48px;
  padding-bottom: 56px;
}

.sh-system-map {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 12px;
}

.sh-map-node {
  flex: 1 1 140px;
  min-width: 120px;
  max-width: 200px;
  margin: 8px;
  padding: 22px 16px 20px;
  border: 1px solid rgba(244, 237, 224, 0.1);
  border-radius: 2px;
  background: rgba(13, 13, 11, 0.72);
  text-align: center;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  text-decoration: none;
  color: inherit;
}

.sh-map-node:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(58, 107, 255, 0.45);
  box-shadow: 0 8px 36px rgba(43, 79, 212, 0.22);
}

.sh-map-node__label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c4a35a;
  margin-bottom: 10px;
}

.sh-map-node__name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 300;
  color: #f4ede0;
  letter-spacing: -0.02em;
}

.sh-map-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  flex-shrink: 0;
  color: rgba(110, 101, 88, 0.7);
  font-size: 14px;
  user-select: none;
}

@media (max-width: 720px) {
  .sh-map-connector {
    width: 100%;
    height: 20px;
    transform: rotate(90deg);
  }
  .sh-system-map {
    flex-direction: column;
    align-items: center;
  }
  .sh-map-node {
    max-width: 280px;
    width: 100%;
  }
}

/* Entry block under hero */
.sh-phase-entry {
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 20px 48px;
  text-align: center;
}

.sh-entry-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 300;
  color: #e8e0d4;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.sh-entry-lead {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(184, 174, 160, 0.92);
  margin-bottom: 28px;
  max-width: 44ch;
  margin-left: auto;
  margin-right: auto;
}

.sh-entry-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* Buttons — royal blue primary */
.sh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 32px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 400;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.35s ease, background 0.35s ease, border-color 0.35s ease, color 0.3s ease;
}

.sh-btn--primary {
  background: linear-gradient(165deg, #4d7cff 0%, #2b4fd4 100%);
  color: #fff;
  box-shadow: 0 4px 28px rgba(43, 79, 212, 0.28);
}

.sh-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(43, 79, 212, 0.42);
}

.sh-btn--ghost {
  background: transparent;
  border-color: rgba(244, 237, 224, 0.12);
  color: rgba(160, 152, 137, 0.95);
}

.sh-btn--ghost:hover {
  border-color: rgba(58, 107, 255, 0.4);
  color: #f4ede0;
  transform: translateY(-1px);
}

/* Optional cursor glow */
.sh-cursor-glow {
  position: fixed;
  width: 280px;
  height: 280px;
  margin: -140px 0 0 -140px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(65, 105, 225, 0.14), transparent 62%);
  mix-blend-mode: screen;
  z-index: 9997;
  opacity: 0;
  transition: opacity 0.5s ease, width 0.35s ease, height 0.35s ease, margin 0.35s ease;
  will-change: transform;
}

body.sh-cursor-on .sh-cursor-glow {
  opacity: 1;
}

body.sh-cursor-on.sh-cursor-hover .sh-cursor-glow {
  width: 340px;
  height: 340px;
  margin: -170px 0 0 -170px;
  background: radial-gradient(circle, rgba(65, 105, 225, 0.22), transparent 58%);
}

@media (max-width: 767px) {
  .sh-cursor-glow {
    display: none !important;
  }
  .sh-hero {
    min-height: min(72vh, 620px);
    min-height: min(72dvh, 620px);
  }
}

/* Homepage hero — text link below primary CTA */
.hero-text-link-wrap {
  margin-top: 14px;
}
a.hero-text-link {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 13px;
  color: var(--text-muted, rgba(160, 160, 192, 0.85));
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
a.hero-text-link:hover,
a.hero-text-link:focus-visible {
  color: var(--text-secondary, #a0a0c0);
  border-bottom-color: rgba(200, 169, 110, 0.45);
}
