/* ==========================================================================
   Sonetec Powers — Interactive Solar Simulation & Dynamic Weather Engine
   Cross-fades between real scenario renders:
   • solar-morning-empty-battery.png
   • solar-evening-raining-full-battery.png
   • solar-evening-full-battery.png
   ========================================================================== */

.solar-hero-wrap {
  position: relative;
  width: 100%;
  background: #061126;
  color: #ffffff;
  overflow: hidden;
  padding-top: calc(var(--header-h, 72px) + 1.25rem);
  padding-bottom: 3.5rem;
  transition: background 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Full-Width Transparent Solar Panel Background Layer (Edge-to-Edge Grid) */
.hero-bg-solar-array {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/hero-solar-array-bg.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.16;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.8s ease, filter 0.8s ease;
}

/* Background Atmosphere Gradients */
.solar-hero-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.8s ease, background 0.8s ease;
}

/* Dynamic Weather Ambience — Distinct Themes */
/* 1. Sunny Noon: Radiant Golden Sunshine & Solar Flare */
.solar-hero-wrap[data-weather="sunny"] {
  background: radial-gradient(circle at 65% 20%, #1a5299 0%, #0b295c 45%, #051329 100%);
}
.solar-hero-wrap[data-weather="sunny"]::before {
  background: radial-gradient(circle at 72% 16%, rgba(251, 191, 36, 0.42) 0%, rgba(245, 158, 11, 0.20) 35%, rgba(217, 119, 6, 0.06) 55%, transparent 75%);
  opacity: 1;
}
.solar-hero-wrap[data-weather="sunny"] .hero-bg-solar-array {
  opacity: 0.20;
  filter: brightness(1.15) contrast(1.1) saturate(1.15);
}

/* 2. Pure On-Grid: High-Tech Electric Cyan & Azure Grid Sync Power */
.solar-hero-wrap[data-weather="ongrid"] {
  background: radial-gradient(circle at 50% 20%, #0284c7 0%, #034f85 40%, #031e3d 70%, #020b18 100%);
}
.solar-hero-wrap[data-weather="ongrid"]::before {
  background: radial-gradient(circle at 50% 15%, rgba(6, 182, 212, 0.50) 0%, rgba(14, 165, 233, 0.28) 35%, rgba(3, 105, 161, 0.12) 60%, transparent 80%);
  opacity: 1;
}
.solar-hero-wrap[data-weather="ongrid"] .hero-bg-solar-array {
  opacity: 0.24;
  filter: hue-rotate(15deg) brightness(1.25) contrast(1.25) saturate(1.3);
}

/* 3. Monsoon Rain: Overcast Slate Blue-Grey Sky */
.solar-hero-wrap[data-weather="monsoon"] {
  background: radial-gradient(circle at 50% 20%, #1e293b 0%, #0f172a 50%, #080d1a 100%);
}
.solar-hero-wrap[data-weather="monsoon"]::before {
  background: radial-gradient(circle at 50% 10%, rgba(148, 163, 184, 0.25) 0%, rgba(71, 85, 105, 0.12) 40%, transparent 80%);
  opacity: 1;
}
.solar-hero-wrap[data-weather="monsoon"] .hero-bg-solar-array {
  opacity: 0.12;
  filter: grayscale(0.4) brightness(0.9);
}

/* 4. KSEB Power Cut: Dark Stormy Pre-Monsoon Atmosphere */
.solar-hero-wrap[data-weather="blackout"] {
  background: radial-gradient(circle at 50% 35%, #0d1527 0%, #070c17 55%, #02050b 100%);
}
.solar-hero-wrap[data-weather="blackout"]::before {
  background: radial-gradient(circle at 40% 70%, rgba(16, 185, 129, 0.18) 0%, transparent 60%);
  opacity: 1;
}
.solar-hero-wrap[data-weather="blackout"] .hero-bg-solar-array {
  opacity: 0.10;
  filter: brightness(0.65) contrast(1.2);
}

/* 5. Night Mode: Deep Nocturnal Indigo & Luminous Stars */
.solar-hero-wrap[data-weather="night"] {
  background: radial-gradient(circle at 75% 20%, #131c38 0%, #080e22 50%, #02050f 100%);
}
.solar-hero-wrap[data-weather="night"]::before {
  background: radial-gradient(circle at 75% 15%, rgba(165, 180, 252, 0.25) 0%, rgba(99, 102, 241, 0.12) 40%, transparent 70%);
  opacity: 1;
}
.solar-hero-wrap[data-weather="night"] .hero-bg-solar-array {
  opacity: 0.14;
  filter: hue-rotate(-15deg) brightness(0.7) contrast(1.15);
}

/* Luminous Half Moon in Hero Night Sky (100% Transparent, No Ghost Sections) */
.hero-half-moon {
  position: absolute;
  top: calc(var(--header-h, 72px) + 1.15rem);
  right: 2.2%;
  height: 62px;
  width: auto;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transform: scale(0.88) translateY(8px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.solar-hero-wrap[data-weather="night"] .hero-half-moon {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.hero-half-moon .moon-img {
  display: block;
  height: 68px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 22px rgba(199, 210, 254, 0.55)) drop-shadow(0 0 45px rgba(129, 140, 248, 0.32));
  animation: lunarPulse 6s ease-in-out infinite alternate;
}

@keyframes lunarPulse {
  0% {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.7)) drop-shadow(0 0 18px rgba(199, 210, 254, 0.45)) drop-shadow(0 0 36px rgba(129, 140, 248, 0.25));
    transform: scale(0.97);
  }
  100% {
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 28px rgba(199, 210, 254, 0.65)) drop-shadow(0 0 54px rgba(129, 140, 248, 0.4));
    transform: scale(1.02);
  }
}

@media (max-width: 768px) {
  .hero-half-moon {
    top: calc(var(--header-h, 72px) + 0.65rem);
    right: 18px;
    height: 46px;
  }
  .hero-half-moon .moon-img {
    height: 46px;
  }
}

@media (max-width: 480px) {
  .hero-half-moon {
    top: calc(var(--header-h, 72px) + 0.5rem);
    right: 14px;
    height: 38px;
  }
  .hero-half-moon .moon-img {
    height: 38px;
  }
}

/* Ambient Canvas (Rain / Stars / Sun glare / Drifting Clouds) */
#solar-ambient-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

/* Hero Container Sizing */
.solar-hero-wrap .hero-container {
  width: min(100% - 2.5rem, 1340px);
  margin-inline: auto;
  position: relative;
  z-index: 5;
}

/* Two-Column Grid Layout (Desktop: Text Left, Simulator Right; Mobile: Text Top, Simulator Down) */
.hero-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 2.75rem;
  align-items: center;
  position: relative;
  width: 100%;
}

.hero-col-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  min-width: 0;
  z-index: 5;
}

.hero-col-right {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  position: relative;
  z-index: 5;
  container-type: inline-size;
}

.hero-content-intro {
  position: relative;
  z-index: 5;
  text-align: left;
  max-width: 100%;
  margin: 0;
  opacity: 1;
  visibility: visible;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.25rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fcd34d;
  margin-bottom: 1.15rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-pill-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.hero-pill-badge .dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 12px #10b981;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-main-title {
  font-size: clamp(2rem, 3.1vw, 3.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 1.15rem;
  word-break: normal;
  overflow-wrap: break-word;
}

.hero-main-title .gradient-text {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

.hero-sublead {
  font-size: clamp(0.98rem, 1.25vw, 1.12rem);
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.62;
  max-width: 560px;
  margin: 0 0 1.65rem 0;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

/* Trust Highlights below CTAs */
.hero-trust-bullets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.85rem;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.84);
}
.trust-bullet-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.55);
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}
.trust-bullet-item .tb-check {
  color: #38bdf8;
  font-weight: 800;
}

/* Scenario Switcher Controls — Apple Segment Dock */
.scenario-controller {
  position: relative;
  z-index: 6;
  width: 100%;
  max-width: 100%;
  margin: 0 0 0.75rem 0;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  padding: 0.35rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  box-sizing: border-box;
  overflow: hidden;
}

/* Sliding active pill indicator */
.scenario-indicator-glide {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f5a623 0%, #d97706 100%);
  box-shadow: 0 4px 16px rgba(245, 166, 35, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
  pointer-events: none;
}

.scenario-btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  padding: 0.58rem 0.32rem;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.77rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: color 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  user-select: none;
}

.scenario-btn:active {
  transform: scale(0.96);
}

.scenario-btn span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.scenario-btn:hover {
  color: #ffffff;
}

.scenario-btn.active {
  color: #0f172a;
  font-weight: 700;
}

.scenario-btn .sc-icon {
  font-size: 1.15rem;
  line-height: 1;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.scenario-btn:hover .sc-icon,
.scenario-btn.active .sc-icon {
  transform: scale(1.15);
}

/* Scenario Status Banner */
.scenario-narrative-bar {
  position: relative;
  z-index: 6;
  width: 100%;
  max-width: 100%;
  margin: 0 0 0.95rem 0;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 0.75rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.scenario-narrative-bar .sn-badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  background: rgba(251, 191, 36, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fcd34d;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.35s ease;
}

#scenario-narrative-text {
  flex: 1;
  min-width: 0;
  line-height: 1.48;
}

/* Dynamic scenario-themed highlights for narrative status bar */
.solar-hero-wrap[data-weather="sunny"] .scenario-narrative-bar {
  border-color: rgba(251, 191, 36, 0.28);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 20px rgba(251, 191, 36, 0.08);
}
.solar-hero-wrap[data-weather="sunny"] .scenario-narrative-bar .sn-badge {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fcd34d;
}

.solar-hero-wrap[data-weather="ongrid"] .scenario-narrative-bar {
  border-color: rgba(6, 182, 212, 0.32);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 20px rgba(6, 182, 212, 0.12);
}
.solar-hero-wrap[data-weather="ongrid"] .scenario-narrative-bar .sn-badge {
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.4);
  color: #67e8f9;
}

.solar-hero-wrap[data-weather="monsoon"] .scenario-narrative-bar {
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 20px rgba(148, 163, 184, 0.08);
}
.solar-hero-wrap[data-weather="monsoon"] .scenario-narrative-bar .sn-badge {
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
}

.solar-hero-wrap[data-weather="blackout"] .scenario-narrative-bar {
  border-color: rgba(239, 68, 68, 0.32);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 22px rgba(239, 68, 68, 0.12);
}
.solar-hero-wrap[data-weather="blackout"] .scenario-narrative-bar .sn-badge {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.solar-hero-wrap[data-weather="night"] .scenario-narrative-bar {
  border-color: rgba(165, 180, 252, 0.32);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 22px rgba(129, 140, 248, 0.14);
}
.solar-hero-wrap[data-weather="night"] .scenario-narrative-bar .sn-badge {
  background: rgba(129, 140, 248, 0.2);
  border-color: rgba(129, 140, 248, 0.4);
  color: #c7d2fe;
}

/* Container Query: When the column is narrow, stack badge on top cleanly */
@container (max-width: 580px) {
  .scenario-narrative-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.82rem 1rem;
  }
  .scenario-narrative-bar .sn-badge {
    font-size: 0.70rem;
    padding: 0.22rem 0.55rem;
    border-radius: 6px;
    align-self: flex-start;
  }
  #scenario-narrative-text {
    width: 100%;
    font-size: 0.84rem;
    line-height: 1.48;
    text-align: left;
  }
}

/* Interactive House Simulation Stage with 3D Perspective Parallax */
.sim-stage-container {
  position: relative;
  z-index: 4;
  width: 100%;
  max-width: 100%;
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.12);
  background: #071226;
  perspective: 1200px;
  perspective-origin: center center;
}

.sim-stage-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1024 / 937;
  max-height: 840px;
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
  will-change: transform;
}

/* Multiple Layered Scenario Images (Smooth Cross-fade) */
.sim-stage-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

[data-weather="sunny"] .sim-img-sunny {
  opacity: 1;
}

[data-weather="ongrid"] .sim-img-ongrid {
  opacity: 1;
}

/* In Pure On-Grid mode, hide battery hardware hotspot, conduit trace, and indicator */
[data-weather="ongrid"] .pin-battery,
[data-weather="ongrid"] #flow-inverter-battery,
[data-weather="ongrid"] .circuit-path-base-battery,
[data-weather="ongrid"] #ind-battery {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

[data-weather="monsoon"] .sim-img-monsoon {
  opacity: 1;
}

[data-weather="blackout"] .sim-img-blackout {
  opacity: 1;
}

[data-weather="night"] .sim-img-night {
  opacity: 1;
}

/* SVG Power Flow Circuit Overlay */
.circuit-svg-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.circuit-svg-overlay path {
  fill: none !important;
}

.circuit-path-base {
  fill: none !important;
  stroke: rgba(15, 23, 42, 0.42);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.circuit-path-flow {
  fill: none !important;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 8 16;
  animation: flow-dash 1.3s linear infinite;
  filter: drop-shadow(0 0 8px currentColor);
}

@keyframes flow-dash {
  to {
    stroke-dashoffset: -48;
  }
}

.flow-solar {
  stroke: #4ade80;
  color: #4ade80;
}

.flow-battery {
  stroke: #22c55e;
  color: #22c55e;
}

.flow-home {
  stroke: #38bdf8;
  color: #38bdf8;
}

.flow-grid {
  stroke: #38bdf8;
  color: #38bdf8;
}

.flow-grid-disconnected {
  fill: none !important;
  stroke: #ef4444 !important;
  color: #ef4444;
  stroke-width: 4.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 6 8;
  animation: pulse-cut 1.1s infinite alternate;
  filter: drop-shadow(0 0 10px #ef4444);
}

@keyframes pulse-cut {
  from { opacity: 0.35; }
  to { opacity: 1; }
}

/* Directional Flow Arrow Indicators Overlay */
.flow-indicators-group {
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.7));
  transition: opacity 0.4s ease;
}

.flow-indicators-group g {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.flow-indicators-group circle {
  transition: stroke 0.4s ease, fill 0.4s ease;
}

.flow-indicators-group path {
  transition: stroke 0.4s ease, d 0.3s ease;
}

/* Interactive Hotspot Pins */
.hotspot-pin {
  position: absolute;
  z-index: 15;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  transition: z-index 0s;
}

.hotspot-pin:hover,
.hotspot-pin.active {
  z-index: 100 !important;
}

.pin-beacon {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.92);
  border: 2px solid #ffffff;
  color: #ffffff;
  font-size: 0.9rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s ease, box-shadow 0.25s ease;
}

.pin-beacon::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid #4ade80;
  opacity: 0.85;
  animation: apple-radar-pulse 2.2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

@keyframes apple-radar-pulse {
  0% { transform: scale(0.8); opacity: 0.9; box-shadow: 0 0 8px rgba(74, 222, 128, 0.6); }
  60% { transform: scale(1.5); opacity: 0; box-shadow: 0 0 16px rgba(74, 222, 128, 0); }
  100% { transform: scale(1.8); opacity: 0; }
}

.hotspot-pin:hover .pin-beacon {
  transform: scale(1.18);
  background: #f5a623;
  color: #0f172a;
  border-color: #ffffff;
  box-shadow: 0 8px 24px rgba(245, 166, 35, 0.6);
}

.pin-tag {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

/* Tooltip / Info Card when clicked or hovered */
.hotspot-card {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(8px) scale(0.96);
  width: 280px;
  background: rgba(11, 19, 41, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 30;
}

.hotspot-pin:hover .hotspot-card,
.hotspot-pin.active .hotspot-card {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* Smart Position Modifiers to Prevent Clipping */
.hotspot-pin.pin-top .hotspot-card {
  top: auto;
  bottom: calc(100% + 14px);
  transform: translateX(-50%) translateY(-8px);
}
.hotspot-pin.pin-top:hover .hotspot-card,
.hotspot-pin.pin-top.active .hotspot-card {
  transform: translateX(-50%) translateY(0);
}
.hotspot-pin.pin-top .pin-tag {
  bottom: auto;
  top: calc(100% + 8px);
}

.hotspot-pin.pin-bottom .hotspot-card {
  top: auto;
  bottom: calc(100% + 14px);
  transform: translateX(-50%) translateY(-8px);
}
.hotspot-pin.pin-bottom:hover .hotspot-card,
.hotspot-pin.pin-bottom.active .hotspot-card {
  transform: translateX(-50%) translateY(0);
}
.hotspot-pin.pin-bottom .pin-tag {
  bottom: auto;
  top: calc(100% + 8px);
}

.hotspot-pin.pin-right .hotspot-card {
  left: auto;
  right: 0;
  transform: translateY(8px);
}
.hotspot-pin.pin-right:hover .hotspot-card,
.hotspot-pin.pin-right.active .hotspot-card {
  transform: translateY(0);
}

.hotspot-pin.pin-bottom.pin-right .hotspot-card {
  left: auto;
  right: 0;
  top: auto;
  bottom: calc(100% + 14px);
  transform: translateY(-8px);
}
.hotspot-pin.pin-bottom.pin-right:hover .hotspot-card,
.hotspot-pin.pin-bottom.pin-right.active .hotspot-card {
  transform: translateY(0);
}

.hotspot-pin.pin-left .hotspot-card {
  left: 0;
  transform: translateY(8px);
}
.hotspot-pin.pin-left:hover .hotspot-card,
.hotspot-pin.pin-left.active .hotspot-card {
  transform: translateY(0);
}

.hotspot-card h4 {
  font-size: 0.95rem;
  color: #fbbf24;
  margin-bottom: 0.35rem;
}

.hotspot-card p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.45;
  margin-bottom: 0.5rem;
}

.hotspot-card .badge-row {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.hotspot-card .badge {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: #e2e8f0;
}

/* Live Telemetry HUD Bar (bottom of stage) — Frosted Glass Dock */
.telemetry-hud-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.16);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 12;
}

.hud-metric-cell {
  background: rgba(11, 19, 41, 0.85);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  padding: 1.15rem 0.9rem;
  text-align: center;
  transition: background 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hud-metric-cell:hover {
  background: rgba(18, 35, 66, 0.94);
}

.hud-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.hud-val {
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  line-height: 1.1;
}

.hud-sub {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 0.25rem;
}

.val-solar { color: #4ade80; }
.val-battery { color: #22c55e; }
.val-home { color: #38bdf8; }
.val-grid { color: #38bdf8; }
.val-savings { color: #fbbf24; }

/* In Blackout: Grid warning indicator */
[data-weather="blackout"] .val-grid {
  color: #f87171;
}

@media (min-width: 993px) {
  .scenario-btn {
    padding: 0.54rem 0.2rem;
    font-size: 0.73rem;
    gap: 0.2rem;
  }
  .scenario-btn .sc-icon {
    font-size: 0.92rem;
  }
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .hero-two-col {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  .hero-col-left {
    align-items: center;
    text-align: center;
  }
  .hero-content-intro {
    text-align: center;
    margin: 0 auto;
  }
  .hero-main-title {
    font-size: clamp(1.85rem, 5.2vw, 2.6rem);
    text-align: center;
  }
  .hero-main-title br.desktop-only {
    display: none;
  }
  .hero-sublead {
    margin: 0 auto 1.5rem auto;
    text-align: center;
  }
  .hero-cta-row {
    justify-content: center;
  }
  .hero-trust-bullets {
    justify-content: center;
  }
  .scenario-controller {
    flex-wrap: wrap;
    border-radius: 18px;
    padding: 0.55rem;
    margin: 0 auto 0.75rem auto;
  }
  .scenario-indicator-glide {
    display: none !important;
  }
  .scenario-btn.active {
    background: linear-gradient(135deg, #f5a623 0%, #d97706 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(245, 166, 35, 0.5);
  }
  .scenario-btn {
    flex: 1 1 45%;
    font-size: 0.82rem;
  }
  .scenario-narrative-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.85rem 1.05rem;
    margin: 0 auto 0.95rem auto;
  }
  .scenario-narrative-bar .sn-badge {
    font-size: 0.70rem;
    padding: 0.22rem 0.55rem;
    border-radius: 6px;
    align-self: flex-start;
  }
  #scenario-narrative-text {
    width: 100%;
    font-size: 0.84rem;
    line-height: 1.48;
    text-align: left;
  }
  .sim-stage-container {
    width: 100%;
    margin: 0 auto;
  }
  .telemetry-hud-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .solar-hero-wrap {
    padding-top: calc(var(--header-h, 72px) + 0.75rem);
    padding-bottom: 2rem;
  }
  .scenario-controller {
    gap: 0.35rem;
    padding: 0.45rem;
  }
  .scenario-btn {
    flex: 1 1 calc(50% - 0.35rem);
    min-height: 44px;
    padding: 0.65rem 0.5rem;
    font-size: 0.82rem;
    gap: 0.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .scenario-btn:last-child {
    flex: 1 1 100%;
  }
  .scenario-narrative-bar {
    padding: 0.75rem 0.85rem;
    gap: 0.45rem;
    border-radius: 12px;
  }
  .scenario-narrative-bar .sn-badge {
    font-size: 0.68rem;
    padding: 0.2rem 0.5rem;
  }
  #scenario-narrative-text {
    font-size: 0.82rem;
    line-height: 1.44;
  }
  .telemetry-hud-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .hud-val {
    font-size: 1.15rem;
  }
  .pin-tag {
    display: none;
  }
  .hotspot-card {
    width: 220px;
  }
}

@media (max-width: 480px) {
  .hero-pill-badge {
    font-size: 0.70rem;
    padding: 0.35rem 0.75rem;
    max-width: 96%;
    line-height: 1.35;
  }
  .hero-main-title {
    font-size: clamp(1.45rem, 5.8vw, 2rem);
    line-height: 1.22;
  }
  .scenario-btn {
    min-height: 44px;
    font-size: 0.78rem;
    padding: 0.6rem 0.4rem;
  }
  .scenario-btn .sc-icon {
    font-size: 0.88rem;
  }
  .scenario-narrative-bar {
    padding: 0.65rem 0.8rem;
    gap: 0.35rem;
    border-radius: 11px;
  }
  .scenario-narrative-bar .sn-badge {
    font-size: 0.64rem;
    padding: 0.18rem 0.45rem;
    letter-spacing: 0.05em;
  }
  #scenario-narrative-text {
    font-size: 0.78rem;
    line-height: 1.4;
  }
}
