/* ============================================================
   ENRGPWR — Brand stylesheet
   Premium luxury industrial energy brand.
   Olive-green accents · mixed light/dark · motion-rich
   ============================================================ */

:root {
  --enrg-olive: #648b1b;
  --enrg-leaf: #80b119;
  --enrg-glow: #b3d24a;
  --enrg-spark: #d4ed62;
  --enrg-void: #07080a;
  --enrg-coal: #0e1112;
  --enrg-graphite: #15181a;
  --enrg-iron: #1c2024;
  --enrg-bone: #f6f5ee;
  --enrg-paper: #efede1;
  --enrg-ash: #c6c4b6;

  --shadow-glow: 0 30px 80px -30px rgba(128, 177, 25, 0.32);
  --shadow-edge: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html {
  background: var(--enrg-void);
}

/* Hide scrollbar utility (used by horizontal carousels) */
.no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ============================================================
   Sectors Swiper - branded styling
   ============================================================ */
.sectors-swiper .swiper-slide {
  height: auto;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity 0.45s ease;
}

/* Mobile: subtle scale on inactive slides for that premium peek */
@media (max-width: 767px) {
  .sectors-swiper .swiper-slide:not(.swiper-slide-active) {
    transform: scale(0.92);
    opacity: 0.55;
  }
  .sectors-swiper .swiper-slide.swiper-slide-active {
    transform: scale(1);
    opacity: 1;
  }
}

/* Pagination bullets - branded olive glow */
.sectors-swiper .swiper-pagination-bullets {
  position: relative;
  bottom: 0;
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.sectors-swiper .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.25);
  opacity: 1;
  border-radius: 999px;
  transition: width 0.35s ease, background-color 0.35s ease;
  margin: 0 !important;
}
.sectors-swiper .swiper-pagination-bullet:hover {
  background: rgba(255, 255, 255, 0.45);
}
.sectors-swiper .swiper-pagination-bullet-active {
  width: 32px;
  background: var(--enrg-glow);
  box-shadow: 0 0 12px rgba(179, 210, 74, 0.5);
}

/* Soft fade gradient on edges (desktop) */
@media (min-width: 768px) {
  #sectors {
    position: relative;
  }
  #sectors::before,
  #sectors::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    pointer-events: none;
    z-index: 5;
  }
  #sectors::before {
    left: 0;
    background: linear-gradient(to right, var(--enrg-void), transparent);
  }
  #sectors::after {
    right: 0;
    background: linear-gradient(to left, var(--enrg-void), transparent);
  }
}

body {
  font-feature-settings: "ss01", "ss02", "cv11";
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
  background:
    radial-gradient(80vw 60vh at 78% -10%, rgba(128, 177, 25, 0.085), transparent 60%),
    radial-gradient(60vw 50vh at -5% 38%, rgba(100, 139, 27, 0.06), transparent 70%),
    var(--enrg-void);
  color: #e6e7e3;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--enrg-leaf);
  color: #0a0c06;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--enrg-void); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2a3025, #1a1d18);
  border-radius: 30px;
  border: 2px solid var(--enrg-void);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #3d4a23, #252b1f); }

/* ============================================================
   Display typography helpers
   ============================================================ */
.font-display {
  font-family: "Cabinet Grotesk", "Outfit", system-ui, sans-serif;
  letter-spacing: -0.035em;
}
.font-mono { font-family: "JetBrains Mono", ui-monospace, monospace; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-weight: 600;
}

.text-gradient-olive {
  background: linear-gradient(120deg, var(--enrg-leaf) 0%, var(--enrg-glow) 45%, var(--enrg-olive) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============================================================
   Liquid glass + glow edges
   ============================================================ */
.liquid-glass {
  background: rgba(15, 19, 14, 0.55);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  position: relative;
  overflow: hidden;
}
.liquid-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    180deg,
    rgba(179, 210, 74, 0.35) 0%,
    rgba(255, 255, 255, 0.08) 18%,
    rgba(255, 255, 255, 0) 45%,
    rgba(255, 255, 255, 0) 60%,
    rgba(128, 177, 25, 0.18) 85%,
    rgba(179, 210, 74, 0.35) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.glass-light {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(13, 17, 9, 0.08);
}

.glass-edge {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 30px 70px -28px rgba(0, 0, 0, 0.55);
}

.shadow-lux {
  box-shadow: 0 40px 100px -28px rgba(0, 0, 0, 0.4),
    0 12px 28px -16px rgba(100, 139, 27, 0.18);
}

/* ============================================================
   Grain texture (fixed overlay)
   ============================================================ */
.grain {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.55 0 0 0 0 0.18 0 0 0 0.18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ============================================================
   Hero ambient video — keep it on-brand olive
   ============================================================ */
.hero-video {
  filter: saturate(0.85) brightness(0.7) hue-rotate(-12deg) contrast(1.05);
  transform: scale(1.04);
  will-change: transform;
  animation: hero-zoom 22s ease-in-out infinite alternate;
}
@keyframes hero-zoom {
  from { transform: scale(1.02) translateX(0); }
  to { transform: scale(1.08) translateX(-1.5%); }
}

.vision-video video {
  filter: saturate(0.95) hue-rotate(-8deg) contrast(1.05);
}

/* Subtle scan line for cinematic feel */
.hero-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg,
    transparent 0,
    rgba(255, 255, 255, 0.02) 1px,
    transparent 2px,
    transparent 4px);
  pointer-events: none;
}

/* ============================================================
   Mesh blobs
   ============================================================ */
@keyframes mesh-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.55; }
  35% { transform: translate3d(2%, -3%, 0) scale(1.05); opacity: 0.8; }
  65% { transform: translate3d(-1.5%, 2%, 0) scale(0.96); opacity: 0.65; }
}
.mesh-blob { animation: mesh-drift 18s ease-in-out infinite; }

/* ============================================================
   Floats + breathing
   ============================================================ */
@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.float-soft { animation: float-soft 7s ease-in-out infinite; }

@keyframes breathe {
  0%, 100% { opacity: 0.55; transform: scale(0.94); }
  50% { opacity: 1; transform: scale(1); }
}
.breathe { animation: breathe 2.6s ease-in-out infinite; }

@keyframes ring-pulse {
  0% { box-shadow: 0 0 0 0 rgba(128, 177, 25, 0.55); }
  70% { box-shadow: 0 0 0 16px rgba(128, 177, 25, 0); }
  100% { box-shadow: 0 0 0 0 rgba(128, 177, 25, 0); }
}
.ring-pulse { animation: ring-pulse 2.4s ease-out infinite; }

/* ============================================================
   Marquee
   ============================================================ */
@keyframes marquee-x {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-track { animation: marquee-x 40s linear infinite; will-change: transform; }
.marquee-track.slow { animation-duration: 70s; }
.marquee-track.reverse { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ============================================================
   Animated conic border (only the border travels, not the bg)
   ============================================================ */
@property --aura-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@keyframes aura-spin {
  to { --aura-angle: 360deg; }
}
.aura-ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--aura-angle, 0deg),
    rgba(128, 177, 25, 0) 0deg,
    rgba(179, 210, 74, 0.9) 70deg,
    rgba(212, 237, 98, 1) 90deg,
    rgba(179, 210, 74, 0.9) 110deg,
    rgba(128, 177, 25, 0) 200deg,
    rgba(128, 177, 25, 0) 360deg
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: aura-spin 6s linear infinite;
  pointer-events: none;
  z-index: 1;
}
/* Fallback for browsers without @property support: simple rotation */
@supports not (background: paint(something)) {
  .aura-ring {
    animation: spin-fallback 6s linear infinite;
  }
  @keyframes spin-fallback {
    to { transform: rotate(360deg); }
  }
}

/* ============================================================
   Shimmer line (data viz)
   ============================================================ */
@keyframes shimmer-line {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(120%); }
}
.shimmer-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(179, 210, 74, 0.55) 45%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(179, 210, 74, 0.55) 55%,
    transparent 100%);
  animation: shimmer-line 3.2s ease-in-out infinite;
  mix-blend-mode: screen;
}

/* ============================================================
   Reveal animations (base state — JS toggles ".is-in")
   ============================================================ */
.reveal-up,
.reveal-right,
.reveal-scale {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 1100ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 1100ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal-right { transform: translateX(36px); }
.reveal-scale { transform: scale(0.94); }

.is-in { opacity: 1 !important; transform: none !important; }

/* Stagger via inline custom-property index */
[data-stagger] > * {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 900ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--i, 0) * 80ms);
}
[data-stagger].is-in > * { opacity: 1; transform: none; }

/* ============================================================
   Scroll progress bar
   ============================================================ */
.scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  z-index: 80;
  background: linear-gradient(90deg, var(--enrg-olive), var(--enrg-leaf), var(--enrg-glow));
  transform-origin: left center;
  transform: scaleX(var(--p, 0));
  transition: transform 0.08s linear;
  pointer-events: none;
  box-shadow: 0 0 14px rgba(128, 177, 25, 0.5);
}

/* ============================================================
   Magnetic / spotlight buttons
   ============================================================ */
.mag-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  isolation: isolate;
  transition:
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.45s ease,
    background 0.4s ease;
  will-change: transform;
}
.mag-btn::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.35), transparent 50%);
  opacity: 0;
  border-radius: inherit;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.mag-btn:hover::after { opacity: 0.7; }
.mag-btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(180deg, var(--enrg-leaf), var(--enrg-olive));
  color: #07090c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 0 rgba(0, 0, 0, 0.18),
    0 18px 38px -16px rgba(128, 177, 25, 0.55);
}
.btn-primary:hover { filter: brightness(1.05); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: #f4f5ef;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.btn-ghost:hover {
  border-color: rgba(179, 210, 74, 0.5);
  color: var(--enrg-glow);
}

/* ============================================================
   Spotlight border cards (CSS variables driven by JS pointermove)
   ============================================================ */
.spot-card {
  position: relative;
  overflow: hidden;
}
.spot-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: radial-gradient(280px circle at var(--mx, -200px) var(--my, -200px),
    rgba(179, 210, 74, 0.55), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.spot-card:hover::before { opacity: 1; }

.spot-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(360px circle at var(--mx, -200px) var(--my, -200px),
    rgba(179, 210, 74, 0.08), transparent 55%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.spot-card:hover::after { opacity: 1; }

/* ============================================================
   3D tilt card
   ============================================================ */
.tilt-stage { perspective: 1500px; }
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

/* ============================================================
   Word + char-by-char heading
   `.word` keeps an entire word from breaking across lines.
   `.char` carries the entrance animation.
   ============================================================ */
.word {
  display: inline-block;
  white-space: nowrap;
}
.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em) rotate(2deg);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--ci, 0) * 24ms + 180ms);
}
.is-in .char { opacity: 1; transform: none; }

/* ============================================================
   Iconoir tweaks
   ============================================================ */
.iconoir, [class^="iconoir-"], [class*=" iconoir-"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   Section dividers — light/dark transitions
   ============================================================ */
.section-light {
  background:
    radial-gradient(50vw 40vh at 80% 12%, rgba(128, 177, 25, 0.08), transparent 60%),
    var(--enrg-bone);
  color: #16170f;
}
.section-light .eyebrow { color: #527015; }

.section-dark { background: var(--enrg-void); color: #e6e7e3; }

/* ============================================================
   Mobile bottom dock active indicator
   ============================================================ */
.dock-link[aria-current="true"] {
  color: var(--enrg-glow);
}
.dock-link[aria-current="true"] .dock-dot {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.dock-dot {
  opacity: 0;
  transform: translateY(4px) scale(0.6);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   Battery cell ASCII grid
   ============================================================ */
.cell-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}

/* ============================================================
   Floating contact pill
   ============================================================ */
.contact-pill {
  animation: float-soft 6s ease-in-out infinite;
}

/* ============================================================
   Carbon counter
   ============================================================ */
.counter-num {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

/* ============================================================
   Custom horizontal sectors track
   ============================================================ */
.h-track { will-change: transform; }

/* ============================================================
   Accessibility — reduce motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal-up, .reveal-right, .reveal-scale, [data-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================================
   Q&A accordion (used on /q-and-a.html)
   ============================================================ */
.qa-item { transition: background-color 240ms ease; }
.qa-item[open] { background-color: rgba(255, 255, 255, 0.02); }
.qa-list--light .qa-item[open] { background-color: rgba(0, 0, 0, 0.025); }

.qa-summary {
  display: flex;
  cursor: pointer;
  list-style: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: "Cabinet Grotesk", "Inter", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  outline: none;
}
.qa-summary::-webkit-details-marker { display: none; }
.qa-summary--light { color: #16170f; }

.qa-icon {
  position: relative;
  display: inline-flex;
  height: 32px;
  width: 32px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background-color: rgba(255, 255, 255, 0.04);
  transition: transform 280ms ease, background-color 280ms ease, border-color 280ms ease;
}
.qa-list--light .qa-icon {
  border-color: rgba(0, 0, 0, 0.10);
  background-color: rgba(0, 0, 0, 0.025);
}
.qa-icon::before,
.qa-icon::after {
  content: "";
  position: absolute;
  background-color: #b3d24a;
  border-radius: 1px;
  transition: transform 280ms ease, opacity 280ms ease;
}
.qa-list--light .qa-icon::before,
.qa-list--light .qa-icon::after {
  background-color: #527015;
}
.qa-icon::before { width: 12px; height: 2px; }
.qa-icon::after  { width: 2px; height: 12px; }
.qa-item[open] .qa-icon::after { transform: rotate(90deg); opacity: 0; }
.qa-item[open] .qa-icon { border-color: rgba(179, 210, 74, 0.5); background-color: rgba(179, 210, 74, 0.08); }

.qa-body {
  margin-top: 1rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #a1a1aa;
  max-width: 65ch;
}
.qa-body--light { color: #3f3f46; }
.qa-body a { color: inherit; }

/* ============================================================
   Savings calculator sliders
   ============================================================ */
.calc-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: linear-gradient(90deg, rgba(179, 210, 74, 0.6) 0%, rgba(255, 255, 255, 0.08) 100%);
  border-radius: 9999px;
  outline: none;
}
.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  background: #b3d24a;
  border: 3px solid #16170f;
  box-shadow: 0 0 0 4px rgba(179, 210, 74, 0.12), 0 4px 14px rgba(179, 210, 74, 0.35);
  cursor: pointer;
  transition: transform 160ms ease;
}
.calc-slider::-webkit-slider-thumb:hover { transform: scale(1.08); }
.calc-slider::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 9999px;
  background: #b3d24a; border: 3px solid #16170f;
  box-shadow: 0 0 0 4px rgba(179, 210, 74, 0.12);
  cursor: pointer;
}

/* ============================================================
   Misc niceties
   ============================================================ */
.no-tap-highlight { -webkit-tap-highlight-color: transparent; }
.text-balance { text-wrap: balance; }
