/* ============================================================
   District Solar — Animated Public Landing Styles
   ============================================================ */
:root {
  --ds-bg: #050b18;
  --ds-bg-2: #0a162e;
  --ds-surface: rgba(15, 29, 58, 0.72);
  --ds-border: rgba(255, 255, 255, 0.1);
  --ds-gold: #fbbf24;
  --ds-amber: #f59e0b;
  --ds-cyan: #22d3ee;
  --ds-green: #10b981;
  --ds-text: #f8fafc;
  --ds-muted: #94a3b8;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--ds-bg);
  color: var(--ds-text);
  overflow-x: hidden;
}

/* Navbar */
.ds-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 14px 0;
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}
.ds-nav.scrolled {
  background: rgba(5, 11, 24, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--ds-border);
  padding: 10px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.ds-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.ds-brand img {
  height: 42px;
  width: 42px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  padding: 3px;
}
.ds-nav-link {
  color: #cbd5e1 !important;
  font-weight: 500;
  font-size: 0.94rem;
  transition: color 0.2s;
}
.ds-nav-link:hover {
  color: var(--ds-gold) !important;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  padding: 110px 0 60px;
  background:
    radial-gradient(circle at 78% 18%, rgba(251, 191, 36, 0.22) 0%, rgba(245, 158, 11, 0.06) 30%, transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(34, 211, 238, 0.12) 0%, transparent 50%),
    linear-gradient(180deg, #040914 0%, #09152c 55%, #0b1c3a 100%);
  overflow: hidden;
}

/* Twinkling Starfield */
.stars-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 10% 15%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 25% 8%, rgba(255,255,255,0.5), transparent),
    radial-gradient(2px 2px at 42% 22%, rgba(251,191,36,0.6), transparent),
    radial-gradient(1px 1px at 60% 12%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 88% 30%, rgba(34,211,238,0.6), transparent),
    radial-gradient(1px 1px at 15% 45%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 52% 38%, rgba(255,255,255,0.5), transparent);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle {
  0% { opacity: 0.45; }
  100% { opacity: 0.95; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: var(--ds-gold);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.hero-badge .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ds-gold);
  box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7);
  animation: pulseDot 1.8s infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(251, 191, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}

.hero-title {
  font-size: clamp(2.1rem, 4.2vw, 3.6rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}
.text-gradient-solar {
  background: linear-gradient(120deg, #fef08a 0%, #fbbf24 25%, #22d3ee 50%, #fbbf24 75%, #fef08a 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientTextFlow 5s linear infinite;
  filter: drop-shadow(0 0 18px rgba(251, 191, 36, 0.25));
}
@keyframes gradientTextFlow {
  0% { background-position: 0% center; }
  100% { background-position: 220% center; }
}
.hero-subtitle {
  color: #cbd5e1;
  font-size: 1.08rem;
  line-height: 1.65;
  max-width: 540px;
  margin-bottom: 26px;
}

.btn-solar {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fde047 0%, #fbbf24 45%, #f59e0b 100%);
  color: #09111e !important;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 13px 26px;
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.38);
  transition: transform 0.22s ease, box-shadow 0.25s ease;
}
.btn-solar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: btnSolarShine 3.8s ease-in-out infinite;
}
@keyframes btnSolarShine {
  0%, 45% { left: -100%; }
  75%, 100% { left: 160%; }
}
.btn-solar:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 38px rgba(245, 158, 11, 0.55);
}
.btn-glass {
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 13px 24px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  transition: background 0.2s, transform 0.2s;
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

/* ============================================================
   Interactive Solar Simulation Stage (Sun -> Panel -> Inverter -> Lights)
   ============================================================ */
.solar-stage-card {
  position: relative;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(14, 28, 56, 0.85) 0%, rgba(7, 15, 32, 0.94) 100%);
  border: 1px solid rgba(251, 191, 36, 0.22);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  padding: 14px;
}
.solar-stage-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #071329 0%, #0d2144 65%, #09172f 100%);
}
#solarCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}
.solar-svg {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: block;
}

/* SVG Animations */
.sun-corona {
  transform-origin: 485px 68px;
  animation: sunPulse 3.5s ease-in-out infinite;
}
.sun-rays-spin {
  transform-origin: 485px 68px;
  animation: spinSlow 24s linear infinite;
}
@keyframes sunPulse {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.16); opacity: 1; }
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.sunbeam-line {
  stroke-dasharray: 12 10;
  animation: beamFlow 1.4s linear infinite;
}
@keyframes beamFlow {
  from { stroke-dashoffset: 44; }
  to { stroke-dashoffset: 0; }
}

.dc-wire-flow {
  stroke-dasharray: 10 8;
  animation: wireFlow 1s linear infinite;
}
.ac-wire-flow {
  stroke-dasharray: 12 8;
  animation: wireFlow 0.85s linear infinite;
}
@keyframes wireFlow {
  from { stroke-dashoffset: 40; }
  to { stroke-dashoffset: 0; }
}

.panel-glint {
  animation: panelShimmer 4s ease-in-out infinite;
}
@keyframes panelShimmer {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.55; }
}

.bulb-glow {
  animation: bulbRadiate 2.2s ease-in-out infinite;
  transform-origin: center;
}
@keyframes bulbRadiate {
  0%, 100% { opacity: 0.78; filter: drop-shadow(0 0 12px #fbbf24); }
  50% { opacity: 1; filter: drop-shadow(0 0 24px #fde047); }
}

.house-window-glow {
  animation: windowWarm 2.6s ease-in-out infinite alternate;
}
@keyframes windowWarm {
  0% { fill: #fbbf24; opacity: 0.85; }
  100% { fill: #fde047; opacity: 1; }
}

.inverter-led {
  animation: ledBlink 1.2s ease-in-out infinite alternate;
}
@keyframes ledBlink {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* Stage Controls & Live Telemetry Bar */
.stage-telemetry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 6px 4px;
}
.telemetry-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.t-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.t-pill strong {
  color: var(--ds-gold);
}
.intensity-switch {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.intensity-btn {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.intensity-btn.active {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #09111e;
}

@media (max-width: 767.98px) {
  .stage-telemetry {
    justify-content: center;
    text-align: center;
  }
  .telemetry-pills {
    justify-content: center;
    width: 100%;
  }
  .intensity-switch {
    margin: 2px auto 0;
  }
}

/* Stats Strip */
.stats-strip {
  position: relative;
  background: rgba(11, 24, 48, 0.88);
  border-top: 1px solid rgba(251, 191, 36, 0.2);
  border-bottom: 1px solid rgba(34, 211, 238, 0.2);
  padding: 36px 0;
  overflow: hidden;
}
.stat-box {
  text-align: center;
  padding: 16px 12px;
  border-radius: 16px;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.stat-box:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(251, 191, 36, 0.25);
}
.stat-num {
  font-size: 2.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fef08a, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(251, 191, 36, 0.32));
  line-height: 1.1;
  transition: transform 0.3s ease;
}
.stat-box:hover .stat-num {
  transform: scale(1.06);
}
.stat-label {
  color: var(--ds-muted);
  font-size: 0.9rem;
  margin-top: 6px;
}

/* Section Headers */
.section-pad {
  position: relative;
  padding: 88px 0;
  overflow: hidden;
}
.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ds-cyan);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.3);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.18);
  animation: tagGlow 3s ease-in-out infinite alternate;
}
@keyframes tagGlow {
  0% { box-shadow: 0 0 12px rgba(34, 211, 238, 0.12); }
  100% { box-shadow: 0 0 24px rgba(34, 211, 238, 0.36); }
}
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 35%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glass Cards with Interactive Spotlight & Glowing Hover */
.glass-card {
  position: relative;
  background:
    radial-gradient(circle at var(--cx, 50%) var(--cy, 50%), rgba(251, 191, 36, 0.12) 0%, transparent 55%),
    var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: 20px;
  padding: 26px;
  height: 100%;
  overflow: hidden;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, box-shadow 0.35s ease;
}
.glass-card:hover {
  transform: translateY(-8px);
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.5), 0 0 28px rgba(251, 191, 36, 0.15);
}
.icon-orb {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  margin-bottom: 18px;
  animation: orbFloat 3.6s ease-in-out infinite;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}
@keyframes orbFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}
.glass-card:hover .icon-orb {
  transform: translateY(-4px) scale(1.1) rotate(5deg);
  box-shadow: 0 10px 26px rgba(251, 191, 36, 0.3);
}
.orb-gold { background: rgba(251, 191, 36, 0.15); color: var(--ds-gold); border: 1px solid rgba(251, 191, 36, 0.35); }
.orb-cyan { background: rgba(34, 211, 238, 0.15); color: var(--ds-cyan); border: 1px solid rgba(34, 211, 238, 0.35); }
.orb-green { background: rgba(16, 185, 129, 0.15); color: var(--ds-green); border: 1px solid rgba(16, 185, 129, 0.35); }

/* Product Cards with Sweeping Glint & Glowing Border */
.product-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at var(--cx, 50%) var(--cy, 50%), rgba(34, 211, 238, 0.1) 0%, transparent 55%),
    linear-gradient(165deg, rgba(17, 33, 66, 0.88), rgba(8, 17, 36, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 22px;
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, box-shadow 0.35s ease;
}
.product-card::before {
  content: '';
  position: absolute;
  top: -120%;
  left: -80%;
  width: 55%;
  height: 300%;
  background: linear-gradient(90deg, transparent, rgba(254, 240, 138, 0.08), transparent);
  transform: rotate(25deg);
  transition: left 0.75s ease;
  pointer-events: none;
}
.product-card:hover::before {
  left: 145%;
}
.product-card:hover {
  transform: translateY(-9px) scale(1.01);
  border-color: rgba(251, 191, 36, 0.7);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.55), 0 0 32px rgba(251, 191, 36, 0.18);
}
.kw-badge {
  background: rgba(251, 191, 36, 0.16);
  color: var(--ds-gold);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.28);
}
.price-tag {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
}

/* Subsidy Table Hover Glow */
.table-hover tbody tr {
  transition: background 0.25s ease, transform 0.2s ease;
}
.table-hover tbody tr:hover {
  background: rgba(251, 191, 36, 0.07) !important;
}

/* ROI Calculator */
.roi-box {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 20%, rgba(251, 191, 36, 0.14) 0%, transparent 45%),
    linear-gradient(135deg, rgba(16, 36, 72, 0.9), rgba(9, 20, 42, 0.97));
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 26px;
  padding: 36px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.45), 0 0 36px rgba(34, 211, 238, 0.1);
}
.form-range::-webkit-slider-thumb {
  background: var(--ds-gold);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.8);
}

/* Role Chain Cards */
.role-node {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at var(--cx, 50%) var(--cy, 50%), rgba(34, 211, 238, 0.14) 0%, transparent 55%),
    rgba(14, 29, 58, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 22px 16px;
  text-align: center;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, box-shadow 0.35s ease;
}
.role-node::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #22d3ee, #fbbf24, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.role-node:hover {
  transform: translateY(-7px);
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 24px rgba(34, 211, 238, 0.16);
}
.role-node:hover::after {
  opacity: 1;
}
.role-node i {
  transition: transform 0.3s ease;
}
.role-node:hover i {
  transform: scale(1.18) translateY(-2px);
}

/* Staggered Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1), transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.row > .reveal:nth-child(2) { transition-delay: 0.08s; }
.row > .reveal:nth-child(3) { transition-delay: 0.16s; }
.row > .reveal:nth-child(4) { transition-delay: 0.24s; }
.row > .reveal:nth-child(5) { transition-delay: 0.32s; }

/* Footer */
.ds-footer {
  background: #030712;
  border-top: 1px solid var(--ds-border);
  padding: 48px 0 28px;
  color: var(--ds-muted);
}
