/* ==========================================================================
   Ghandour Global Group — emagine.html stylesheet
   Requires css/base.css to be loaded first.
   ========================================================================== */

/* --------------------------------------------------------------------------
   11. eMagine page - infrastructure charging model
   -------------------------------------------------------------------------- */

.emagine-flow {
  --emagine-cyan: #66e6ff;
  --emagine-green: #1fcc1f;
  isolation: isolate;
  overflow-x: clip;
  background:
    radial-gradient(circle at 78% 16%, rgba(102, 230, 255, 0.16), transparent 25rem),
    radial-gradient(circle at 18% 76%, rgba(31, 204, 31, 0.12), transparent 28rem),
    linear-gradient(180deg, #010b1b 0%, #041331 38%, #020711 72%, #010b1b 100%);
}

.emagine-flow::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 42%, rgba(102, 230, 255, 0.08) 42% 42.2%, transparent 42.2%),
    radial-gradient(circle at 72% 44%, rgba(0, 64, 224, 0.22), transparent 26rem);
}

.emagine-flow .container,
.emagine-flow section {
  position: relative;
  z-index: 1;
}

/* Energy rail: one thread spanning hero -> deployment -> interface -> CTA,
   lit by the same scroll-progress value that drives the charging sequence
   below (see --emagine-progress in emagine.js). */
.emagine-energy-rail {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  z-index: 1;
  pointer-events: none;
}

.emagine-energy-rail-track {
  position: absolute;
  inset: 0;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(102, 230, 255, 0.28) 8%,
    rgba(102, 230, 255, 0.28) 92%,
    transparent 100%
  );
}

.emagine-energy-rail-pulse {
  position: absolute;
  left: 50%;
  top: calc(var(--emagine-progress, 0) * 100%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(102, 230, 255, 0.95), transparent 70%);
  box-shadow: 0 0 24px 6px rgba(31, 204, 31, 0.4);
}

.emagine-hero,
.emagine-deployment,
.emagine-interface,
.emagine-cta {
  min-height: calc(100svh - var(--header-h, 72px));
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-block: clamp(4rem, 9vw, 7rem);
}

.emagine-hero-grid,
.emagine-deployment-grid,
.emagine-interface-grid,
.emagine-cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  align-items: center;
  gap: clamp(2.4rem, 6.5vw, 6rem);
}

.emagine-deployment-grid,
.emagine-cta-grid {
  grid-template-columns: minmax(320px, 1fr) minmax(0, 0.9fr);
}

.emagine-copy h1,
.emagine-copy h2 {
  color: var(--color-white);
  text-wrap: balance;
}

.emagine-copy h1 {
  max-width: 13ch;
  font-size: clamp(2.55rem, 6vw, 5rem);
  line-height: 0.92;
}

.emagine-copy h2 {
  max-width: 14ch;
  font-size: clamp(2rem, 4.7vw, 3.75rem);
  line-height: 0.98;
}

.emagine-copy p {
  color: rgba(232, 237, 247, 0.82);
}

.emagine-copy .lead {
  max-width: 57ch;
  font-size: clamp(1rem, 1.45vw, 1.18rem);
}

.emagine-breadcrumb a,
.emagine-breadcrumb li {
  color: rgba(232, 237, 247, 0.72);
}

.emagine-breadcrumb a:hover {
  color: var(--emagine-cyan);
}

.emagine-charge-stage {
  position: relative;
  width: min(88vw, 580px);
  min-height: 570px;
  margin-inline: auto;
  perspective: 1100px;
  transform-style: preserve-3d;
  cursor: pointer;
  transform:
    rotateX(var(--emagine-tilt-x, 0deg))
    rotateY(var(--emagine-tilt-y, 0deg));
  transition: transform 0.5s cubic-bezier(0.16, 0.6, 0.2, 1);
}

/* Tap/click replay timer: a subtle whole-stage brightness beat that times
   the .is-charging window (see emagine.js) - the actual pulse/vehicle
   replay is driven by a JS tween over the same custom properties the
   scroll sequence uses. */
.emagine-charge-stage.is-charging {
  animation: emagine-charge-replay 1.3s ease;
}

@keyframes emagine-charge-replay {
  0%, 100% { filter: brightness(1); }
  45% { filter: brightness(1.12); }
}

.emagine-grid-floor {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 3%;
  height: 50%;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(102, 230, 255, 0.48) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 48px),
    radial-gradient(ellipse, rgba(102, 230, 255, 0.16), transparent 70%);
  border: 1px solid rgba(102, 230, 255, 0.28);
  box-shadow: 0 0 44px rgba(102, 230, 255, 0.14);
  transform: rotateX(68deg) translateZ(calc(-96px + var(--emagine-floor-lift, 0px)));
  transform-origin: center bottom;
}

/* Site boundary + buried conduit markers: a surveyed, engineered pad
   rather than an orbiting halo. Static at rest, brighten once as the
   floor "activates" via --emagine-floor-charge (set in emagine.js). */
.emagine-site-bounds {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 28%;
  border: 1px dashed rgba(102, 230, 255, 0.22);
  transform: translate(-50%, -50%) rotateX(68deg) translateZ(18px);
  transform-origin: center;
  opacity: calc(0.3 + var(--emagine-floor-charge, 0) * 0.7);
  transition: opacity 0.4s ease;
}

.emagine-conduit {
  position: absolute;
  left: 50%;
  bottom: 21%;
  width: 3px;
  height: min(30vw, 190px);
  background: repeating-linear-gradient(
    180deg,
    rgba(31, 204, 31, 0.65) 0 10px,
    transparent 10px 22px
  );
  transform-origin: bottom center;
  opacity: calc(0.25 + var(--emagine-floor-charge, 0) * 0.75);
  box-shadow: 0 0 12px rgba(31, 204, 31, calc(var(--emagine-floor-charge, 0) * 0.4));
  transition: opacity 0.4s ease, box-shadow 0.4s ease;
}

.emagine-conduit--one {
  transform: translateX(-50%) rotateX(68deg) rotateZ(0deg) translateZ(-6px);
}

.emagine-conduit--two {
  height: min(24vw, 150px);
  transform: translateX(-50%) rotateX(68deg) rotateZ(31deg) translateZ(4px);
}

.emagine-conduit--three {
  height: min(24vw, 150px);
  transform: translateX(-50%) rotateX(68deg) rotateZ(-33deg) translateZ(4px);
}

.emagine-power-lane {
  position: absolute;
  left: 50%;
  bottom: 21%;
  width: min(72vw, 430px);
  height: 3px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, transparent, rgba(102, 230, 255, 0.18), rgba(31, 204, 31, 0.78), transparent);
  box-shadow: 0 0 18px rgba(102, 230, 255, 0.22);
  transform-origin: center;
  animation: emagine-power-flow 2.8s ease-in-out infinite;
}

.emagine-power-lane--one {
  transform: translateX(-50%) rotateX(68deg) rotateZ(0deg) translateZ(-12px);
}

.emagine-power-lane--two {
  width: min(64vw, 360px);
  transform: translateX(-50%) rotateX(68deg) rotateZ(23deg) translateZ(10px);
  animation-delay: 0.45s;
}

.emagine-power-lane--three {
  width: min(60vw, 340px);
  transform: translateX(-50%) rotateX(68deg) rotateZ(-25deg) translateZ(18px);
  animation-delay: 0.9s;
}

.emagine-charger-shadow {
  position: absolute;
  left: 50%;
  bottom: 15%;
  width: 210px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(1, 4, 10, 0.68), transparent 72%);
  transform: translateX(-50%) rotateX(68deg) translateZ(-40px);
  transform-origin: center;
  opacity: calc(0.5 + var(--emagine-charger-rise, 1) * 0.5);
  transition: opacity 0.6s ease;
}

.emagine-charger-base {
  position: absolute;
  left: 50%;
  bottom: 16%;
  width: 168px;
  height: 26px;
  border-radius: 14px;
  background: linear-gradient(180deg, #2a3f61, #0a1526);
  border: 1px solid rgba(102, 230, 255, 0.3);
  box-shadow: 0 10px 0 rgba(1, 6, 16, 0.5), 0 0 22px rgba(102, 230, 255, 0.16);
  transform: translateX(-50%) rotateX(62deg) translateZ(10px);
  transform-origin: center bottom;
}

.emagine-charger {
  --charger-w: 146px;
  --charger-h: 268px;
  --charger-d: 72px;
  position: absolute;
  left: 50%;
  top: 44%;
  width: var(--charger-w);
  height: var(--charger-h);
  transform-style: preserve-3d;
  opacity: calc(0.55 + var(--emagine-charger-rise, 1) * 0.45);
  transform:
    translate(-50%, -50%)
    translateY(calc((1 - var(--emagine-charger-rise, 1)) * 42px))
    translateZ(136px)
    rotateX(-4deg)
    rotateY(var(--emagine-charger-rot, -18deg));
  transition: transform 0.8s cubic-bezier(0.16, 0.6, 0.2, 1), opacity 0.6s ease;
}

.emagine-charger-face {
  position: absolute;
  backface-visibility: hidden;
  border: 1px solid rgba(102, 230, 255, 0.24);
  box-shadow: inset 0 0 24px rgba(102, 230, 255, 0.08);
}

.emagine-charger-face--front,
.emagine-charger-face--back {
  inset: 0;
  border-radius: 30px 30px 18px 18px;
}

.emagine-charger-face--front {
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(180deg, #223c63, #07152d 58%, #020814);
  transform: translateZ(calc(var(--charger-d) / 2));
}

.emagine-charger-face--back {
  background: linear-gradient(180deg, #132947, #030916);
  transform: rotateY(180deg) translateZ(calc(var(--charger-d) / 2));
}

.emagine-charger-face--right,
.emagine-charger-face--left {
  top: 0;
  left: calc(50% - var(--charger-d) / 2);
  width: var(--charger-d);
  height: 100%;
  border-radius: 22px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.14), transparent 40%),
    linear-gradient(180deg, #193253, #030815);
}

.emagine-charger-face--right {
  transform: rotateY(90deg) translateZ(calc(var(--charger-w) / 2));
}

.emagine-charger-face--left {
  transform: rotateY(-90deg) translateZ(calc(var(--charger-w) / 2));
}

.emagine-charger-face--top,
.emagine-charger-face--bottom {
  left: 0;
  top: calc(50% - var(--charger-d) / 2);
  width: 100%;
  height: var(--charger-d);
  border-radius: 24px;
}

.emagine-charger-face--top {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 36%),
    linear-gradient(90deg, #33547f, #102342);
  transform: rotateX(90deg) translateZ(calc(var(--charger-h) / 2));
}

.emagine-charger-face--bottom {
  background: linear-gradient(90deg, #030814, #111a2a);
  transform: rotateX(-90deg) translateZ(calc(var(--charger-h) / 2));
}

.emagine-status {
  position: absolute;
  left: 50%;
  top: 18px;
  width: 42px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--emagine-green);
  transform: translateX(-50%) translateZ(8px);
  box-shadow: 0 0 18px rgba(31, 204, 31, 0.82);
}

.emagine-screen {
  position: absolute;
  left: 22px;
  right: 22px;
  top: 44px;
  height: 76px;
  display: grid;
  align-content: center;
  gap: 0.55rem;
  padding: 0.9rem;
  border-radius: 16px;
  background:
    radial-gradient(circle at 78% 24%, rgba(31, 204, 31, 0.38), transparent 24%),
    linear-gradient(150deg, rgba(102, 230, 255, 0.22), rgba(2, 8, 20, 0.96));
  border: 1px solid rgba(102, 230, 255, 0.28);
  transform: translateZ(10px);
}

.emagine-screen span {
  display: block;
  height: 7px;
  border-radius: var(--radius-pill);
  background: rgba(102, 230, 255, 0.72);
  box-shadow: 0 0 12px rgba(102, 230, 255, 0.22);
}

.emagine-screen span:nth-child(2) {
  width: 72%;
  background: rgba(31, 204, 31, 0.72);
}

.emagine-screen span:nth-child(3) {
  width: 46%;
}

.emagine-port {
  position: absolute;
  left: 50%;
  top: 152px;
  width: 42px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(31, 204, 31, 0.88) 0 22%, rgba(3, 11, 24, 0.98) 23% 56%, rgba(102, 230, 255, 0.48) 57%);
  border: 1px solid rgba(31, 204, 31, 0.52);
  transform: translateX(-50%) translateZ(14px);
  box-shadow: 0 0 24px rgba(31, 204, 31, 0.34);
}

/* The cable is built from two straight segments (vertical, then
   horizontal) meeting at one corner, rather than a single bent-border
   box, so an energy pulse can travel it leg by leg (see .emagine-cable-pulse
   below and --emagine-pulse-seg1/2, set from js/emagine.js). */
.emagine-cable-seg {
  position: absolute;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, rgba(94, 235, 130, 0.85), rgba(31, 204, 31, 0.55));
  box-shadow: 0 0 14px rgba(31, 204, 31, calc(0.1 + var(--emagine-cable-connect, 1) * 0.22));
  opacity: var(--emagine-cable-connect, 1);
  transition: opacity 0.5s ease, box-shadow 0.5s ease;
}

.emagine-cable-seg--vertical {
  left: calc(50% + 174px);
  top: 53%;
  width: 10px;
  height: 128px;
  transform-origin: top center;
  transform: translateZ(138px) rotateY(-18deg) scaleY(var(--emagine-cable-connect, 1));
}

.emagine-cable-seg--horizontal {
  left: calc(50% + 34px);
  top: calc(53% + 128px);
  width: 150px;
  height: 10px;
  transform-origin: left center;
  transform: translateZ(138px) rotateY(-18deg) scaleX(var(--emagine-cable-connect, 1));
}

.emagine-cable-pulse {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 255, 240, 0.95), rgba(31, 204, 31, 0.6) 60%, transparent);
  box-shadow: 0 0 16px rgba(31, 204, 31, 0.8);
  pointer-events: none;
}

.emagine-cable-pulse--seg1 {
  left: calc(50% + 174px);
  top: calc(53% + var(--emagine-pulse-seg1, 0) * 128px);
  transform: translate(-50%, -50%) translateZ(140px) rotateY(-18deg);
  opacity: calc(var(--emagine-pulse-seg1, 0) * (1 - var(--emagine-pulse-seg2, 0)));
}

.emagine-cable-pulse--seg2 {
  left: calc(50% + 34px + var(--emagine-pulse-seg2, 0) * 150px);
  top: calc(53% + 128px);
  transform: translate(-50%, -50%) translateZ(140px) rotateY(-18deg);
  opacity: var(--emagine-pulse-seg2, 0);
}

.emagine-plug {
  position: absolute;
  left: calc(50% + 164px);
  top: calc(53% + 132px);
  width: 46px;
  height: 62px;
  border-radius: 16px 16px 10px 10px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(180deg, #1e3455, #030814);
  border: 1px solid rgba(102, 230, 255, 0.24);
  transform: translateZ(150px) rotateZ(-14deg) rotateY(-18deg);
  box-shadow: 0 0 22px rgba(31, 204, 31, 0.2);
  opacity: var(--emagine-cable-connect, 1);
  transition: opacity 0.5s ease;
}

.emagine-plug::before,
.emagine-plug::after {
  content: "";
  position: absolute;
  top: -14px;
  width: 7px;
  height: 18px;
  border-radius: var(--radius-pill);
  background: rgba(232, 237, 247, 0.8);
}

.emagine-plug::before { left: 12px; }
.emagine-plug::after { right: 12px; }

.emagine-vehicle {
  position: absolute;
  left: 60%;
  bottom: 16%;
  width: 238px;
  height: 78px;
  border-radius: 34px 58px 24px 22px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.2), transparent 32%),
    linear-gradient(180deg, rgba(41, 69, 108, 0.94), rgba(5, 12, 26, 0.96));
  border: 1px solid rgba(102, 230, 255, 0.22);
  transform-style: preserve-3d;
  transform: translateZ(56px) rotateX(2deg) rotateY(-22deg);
  box-shadow: 22px 20px 0 rgba(1, 6, 16, 0.42), 0 0 32px rgba(102, 230, 255, 0.14);
}

.emagine-vehicle::before,
.emagine-vehicle::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.emagine-vehicle::before {
  left: 58px;
  top: -38px;
  width: 96px;
  height: 48px;
  border-radius: 42px 50px 8px 8px;
  background:
    linear-gradient(120deg, rgba(102, 230, 255, calc(0.16 + var(--emagine-vehicle-lit, 1) * 0.32)), rgba(2, 8, 18, 0.9));
  border: 1px solid rgba(102, 230, 255, 0.2);
  box-shadow: 0 0 calc(var(--emagine-vehicle-lit, 1) * 22px) rgba(102, 230, 255, calc(var(--emagine-vehicle-lit, 1) * 0.45));
  transition: box-shadow 0.5s ease, background 0.5s ease;
}

.emagine-vehicle::after {
  inset: auto 24px -11px 26px;
  height: 22px;
  border-radius: var(--radius-pill);
  background:
    radial-gradient(circle at 18% 50%, #040914 0 12px, rgba(102, 230, 255, 0.52) 13px 18px, transparent 19px),
    radial-gradient(circle at 82% 50%, #040914 0 12px, rgba(102, 230, 255, 0.52) 13px 18px, transparent 19px);
}

.emagine-vehicle-indicator {
  position: absolute;
  left: 20px;
  top: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--emagine-green);
  opacity: var(--emagine-vehicle-lit, 1);
  box-shadow: 0 0 calc(var(--emagine-vehicle-lit, 1) * 16px) rgba(31, 204, 31, calc(var(--emagine-vehicle-lit, 1) * 0.9));
  transform: translateZ(4px);
  transition: opacity 0.5s ease, box-shadow 0.5s ease;
}

@keyframes emagine-power-flow {
  0%, 100% { opacity: calc(var(--emagine-floor-charge, 0) * 0.38); }
  50% {
    opacity: var(--emagine-floor-charge, 0);
    box-shadow: 0 0 26px rgba(31, 204, 31, calc(var(--emagine-floor-charge, 0) * 0.32));
  }
}

.emagine-site-model {
  position: relative;
  width: min(88vw, 560px);
  height: 560px;
  margin-inline: auto;
  perspective: 1100px;
  transform-style: preserve-3d;
}

/* Cards face the viewer almost directly (a shallow 16deg tilt, not the
   60deg near-flat-on-the-ground angle used elsewhere) so the labels stay
   legible and each card reads as a distinct floating object. Once
   assembled, each one bobs gently and independently (staggered by --i)
   rather than sitting static. */
.emagine-site-layer {
  position: absolute;
  left: 8%;
  right: 8%;
  top: calc(40px + var(--i) * 108px);
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-lg);
  transform-style: preserve-3d;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--color-white);
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.14), transparent 30%),
    linear-gradient(160deg, rgba(102, 230, 255, 0.22), rgba(5, 14, 30, 0.96));
  border: 1px solid rgba(102, 230, 255, 0.32);
  box-shadow: 0 26px 40px rgba(1, 6, 16, 0.5), 0 0 34px rgba(102, 230, 255, 0.14);
  opacity: 0;
  transform:
    rotateX(16deg) rotateZ(-6deg)
    translateZ(calc(var(--i) * 18px))
    translateX(calc((3 - var(--i)) * 14px));
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 0.6, 0.2, 1);
  transition-delay: calc(var(--i) * 0.12s);
}

.emagine-deployment.is-assembled .emagine-site-layer {
  opacity: 1;
  transform: rotateX(16deg) rotateZ(-6deg) translateZ(calc(var(--i) * 18px)) translateX(0);
  animation: emagine-layer-float 3.4s ease-in-out calc(var(--i) * 0.3s) infinite;
}

@keyframes emagine-layer-float {
  0%, 100% {
    transform: rotateX(16deg) rotateZ(-6deg) translateZ(calc(var(--i) * 18px)) translateX(0) translateY(0px);
  }
  50% {
    transform: rotateX(16deg) rotateZ(-6deg) translateZ(calc(var(--i) * 18px)) translateX(0) translateY(-10px);
  }
}

.emagine-site-layer::before,
.emagine-site-layer::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.emagine-site-layer::before {
  top: 8px;
  right: -20px;
  width: 20px;
  height: calc(100% - 10px);
  border-radius: 0 13px 13px 0;
  background: linear-gradient(180deg, rgba(15, 61, 78, 0.88), rgba(2, 7, 18, 0.96));
  transform-origin: left center;
  transform: rotateY(84deg);
}

.emagine-site-layer::after {
  left: 14px;
  bottom: -18px;
  width: calc(100% - 12px);
  height: 18px;
  border-radius: 0 0 13px 13px;
  background: linear-gradient(90deg, rgba(8, 42, 54, 0.84), rgba(2, 7, 18, 0.98));
  transform-origin: top center;
  transform: rotateX(-84deg);
}

.emagine-site-layer--one { --i: 0; }
.emagine-site-layer--two { --i: 1; border-color: rgba(31, 204, 31, 0.3); }
.emagine-site-layer--three { --i: 2; }
.emagine-site-layer--four { --i: 3; border-color: rgba(255, 203, 102, 0.34); }

/* Pillars bridge two specific adjacent layers (not an arbitrary span down
   the whole stack): pillar-one connects Survey to Power, pillar-two
   connects Install to Commission, using the layers' own 108px step and
   84px height so the geometry always matches the stack, not a guess. */
.emagine-site-pillar {
  position: absolute;
  width: 18px;
  height: 108px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, rgba(102, 230, 255, 0.65), rgba(4, 12, 28, 0.1));
  box-shadow: 0 0 18px rgba(102, 230, 255, 0.2);
  opacity: 0;
  transition: opacity 0.6s ease;
  transition-delay: 0.3s;
}

.emagine-deployment.is-assembled .emagine-site-pillar {
  opacity: 1;
}

.emagine-site-pillar--one {
  left: 21%;
  top: 82px;
  transform: rotateX(16deg) rotateZ(-6deg) translateZ(9px);
}

.emagine-site-pillar--two {
  right: 23%;
  top: 298px;
  transform: rotateX(16deg) rotateZ(-6deg) translateZ(45px);
}

/* Connector dots are drawn as the pillar's own end-caps (::before top,
   ::after bottom) so they inherit the pillar's exact rotation and depth
   and always sit locked to its ends - positioning them as separate
   elements left them drifting off the rotated/perspective-shifted
   stripe. left:2px centers the 14px dot in the 18px pillar; top/bottom
   -7px seats each dot on the corresponding end at any pillar height. */
.emagine-site-pillar::before,
.emagine-site-pillar::after {
  content: "";
  position: absolute;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--emagine-green) 0 34%, rgba(3, 12, 28, 0.96) 35% 58%, rgba(102, 230, 255, 0.58) 59%);
  box-shadow: 0 0 16px rgba(31, 204, 31, 0.4);
}

.emagine-site-pillar::before { top: -7px; }
.emagine-site-pillar::after { bottom: -7px; }

.emagine-metrics {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.emagine-metrics div {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(102, 230, 255, 0.16);
}

.emagine-metrics strong {
  color: var(--emagine-cyan);
  font-family: var(--font-primary);
}

.emagine-metrics span {
  color: rgba(232, 237, 247, 0.86);
}

.emagine-interface-grid {
  grid-template-columns: minmax(0, 0.78fr) minmax(360px, 1.22fr);
}

/* Same "console" recipe as its siblings on Melon360/Electrify Arabia/
   WattsWhere/Industries/Contact (see --radius-xl/--shadow-console) - this
   one had drifted (no backdrop-filter, a different background alpha, a
   missing highlight layer) and is brought back in line here, keeping only
   its own cyan accent color. */
.emagine-console {
  border-radius: var(--radius-xl);
  padding: clamp(1rem, 2vw, 1.35rem);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 38%),
    rgba(4, 11, 27, 0.72);
  backdrop-filter: blur(var(--blur-md));
  border: 1px solid rgba(102, 230, 255, 0.22);
  box-shadow:
    var(--shadow-console),
    inset 0 0 30px rgba(102, 230, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.emagine-console-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.emagine-tab {
  min-height: 44px;
  border: 1px solid rgba(232, 237, 247, 0.14);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(232, 237, 247, 0.78);
  font-family: var(--font-primary);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.emagine-tab:hover,
.emagine-tab:focus,
.emagine-tab:focus-visible,
.emagine-tab.is-active {
  color: var(--color-white);
  border-color: rgba(102, 230, 255, 0.56);
  background: rgba(102, 230, 255, 0.12);
  transform: translateY(-2px);
}

.emagine-console-screen {
  position: relative;
  min-height: 350px;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 72% 28%, rgba(102, 230, 255, 0.14), transparent 34%),
    linear-gradient(160deg, rgba(8, 24, 50, 0.96), rgba(2, 6, 16, 0.96));
  background-size: 42px 42px, 42px 42px, auto, auto;
  border: 1px solid rgba(232, 237, 247, 0.1);
}

.emagine-panel {
  position: absolute;
  inset: 0;
  padding: clamp(1.4rem, 3vw, 2.35rem);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.emagine-panel.is-active {
  opacity: 1;
  transform: none;
}

.emagine-panel h3 {
  max-width: 24ch;
  color: var(--color-white);
  font-size: clamp(1.35rem, 2.4vw, 2.05rem);
  line-height: 1.08;
}

.emagine-panel p:not(.eyebrow) {
  max-width: 27ch;
  color: rgba(232, 237, 247, 0.8);
}

.emagine-mini-site {
  position: absolute;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  width: 220px;
  height: 150px;
  perspective: 700px;
  transform-style: preserve-3d;
}

.emagine-mini-box {
  position: absolute;
  border-radius: var(--radius-md);
  transform-style: preserve-3d;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 30%),
    linear-gradient(160deg, rgba(102, 230, 255, 0.2), rgba(4, 12, 28, 0.94));
  border: 1px solid rgba(102, 230, 255, 0.22);
  box-shadow: 12px 14px 0 rgba(1, 6, 16, 0.38);
  transform: rotateX(46deg) rotateZ(-10deg);
}

.emagine-mini-box::before,
.emagine-mini-box::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.emagine-mini-box::before {
  top: 6px;
  right: -12px;
  width: 12px;
  height: calc(100% - 8px);
  border-radius: 0 9px 9px 0;
  background: rgba(2, 8, 18, 0.72);
  transform-origin: left center;
  transform: rotateY(84deg);
}

.emagine-mini-box::after {
  left: 10px;
  bottom: -11px;
  width: calc(100% - 8px);
  height: 11px;
  border-radius: 0 0 9px 9px;
  background: rgba(2, 8, 18, 0.78);
  transform-origin: top center;
  transform: rotateX(-84deg);
}

/* Villas: one private building, one driveway bay, one parked car - a
   single home charging setup, not a resized clone of the other modes.
   Building is tall (square-ish footprint), bay/car are flat and wide, so
   the shapes read distinctly even under the mini-site's steep tilt. */
.emagine-mini-building {
  left: 8px;
  top: 8px;
  width: 76px;
  height: 80px;
}

/* A peaked roof cap sitting on the building box (a separate element,
   not a clip-path on the box itself, so the box keeps its existing
   bevel edges intact) - the one cue that reads "house" instead of
   "generic block." */
.emagine-mini-roof {
  position: absolute;
  left: 8px;
  top: -16px;
  width: 76px;
  height: 24px;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  background: linear-gradient(160deg, rgba(255, 203, 102, 0.6), rgba(4, 12, 28, 0.9));
  transform: rotateX(46deg) rotateZ(-10deg);
  transform-origin: bottom center;
}

.emagine-mini-bay {
  left: 90px;
  top: 78px;
  width: 116px;
  height: 32px;
  border-color: rgba(31, 204, 31, 0.34);
}

.emagine-mini-car {
  left: 116px;
  top: 48px;
  width: 52px;
  height: 20px;
  border-radius: 10px;
}

/* A small cabin bump on top of the car body (again a separate element
   over the existing box) so it reads as a vehicle silhouette, not a
   plain bar. */
.emagine-mini-car-cabin {
  position: absolute;
  left: 130px;
  top: 38px;
  width: 26px;
  height: 12px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(160deg, rgba(102, 230, 255, 0.32), rgba(4, 12, 28, 0.92));
  border: 1px solid rgba(102, 230, 255, 0.26);
  transform: rotateX(46deg) rotateZ(-10deg);
  transform-origin: bottom center;
}

/* Commercial: a larger building fronted by a bay strip lined with several
   charger posts - reads as "multiple charger points," not one bay. */
.emagine-mini-site--commercial .emagine-mini-building {
  left: 6px;
  top: 4px;
  width: 106px;
  height: 84px;
}

/* Window-grid facade overlay, commercial only - the cue that reads
   "office/storefront" instead of a plain flat-topped block. */
.emagine-mini-windows {
  position: absolute;
  left: 6px;
  top: 4px;
  width: 106px;
  height: 84px;
  border-radius: var(--radius-md);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 4px, transparent 4px 18px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.12) 0 3px, transparent 3px 16px);
  transform: rotateX(46deg) rotateZ(-10deg) translateZ(1px);
  pointer-events: none;
}

.emagine-mini-site--commercial .emagine-mini-bay {
  left: 6px;
  top: 98px;
  width: 208px;
  height: 26px;
}

.emagine-mini-point {
  width: 12px;
  height: 22px;
  border-radius: 6px;
  border-color: rgba(255, 203, 102, 0.34);
}

.emagine-mini-point::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emagine-green);
  box-shadow: 0 0 8px rgba(31, 204, 31, 0.8);
  transform: translateX(-50%);
}

.emagine-mini-site--commercial .emagine-mini-point--one { left: 24px; top: 84px; }
.emagine-mini-site--commercial .emagine-mini-point--two { left: 78px; top: 84px; }
.emagine-mini-site--commercial .emagine-mini-point--three { left: 132px; top: 84px; }
.emagine-mini-site--commercial .emagine-mini-point--four { left: 186px; top: 84px; }

/* Two cars using the bay, each beside a charger post - the cue that reads
   "people arriving and parking," not just unattended charging hardware.
   Same box + cabin-bump construction as .emagine-mini-car/-cabin (villas),
   left in the default cyan tone (posts are gold, cars stay structural). */
.emagine-mini-commercial-car {
  width: 44px;
  height: 16px;
  border-radius: 9px;
}

.emagine-mini-commercial-car-cabin {
  position: absolute;
  width: 20px;
  height: 10px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(160deg, rgba(102, 230, 255, 0.32), rgba(4, 12, 28, 0.92));
  border: 1px solid rgba(102, 230, 255, 0.26);
  transform: rotateX(46deg) rotateZ(-10deg);
  transform-origin: bottom center;
}

.emagine-mini-site--commercial .emagine-mini-commercial-car--one { left: 44px; top: 100px; }
.emagine-mini-site--commercial .emagine-mini-commercial-car--two { left: 144px; top: 103px; }

.emagine-mini-site--commercial .emagine-mini-commercial-car-cabin--one { left: 56px; top: 91px; }
.emagine-mini-site--commercial .emagine-mini-commercial-car-cabin--two { left: 156px; top: 94px; }

/* Fleets: repeated parallel depot lanes, each ending in its own charger
   point - no building, reads as operational infrastructure, not a site. */
.emagine-mini-lane {
  width: 188px;
  height: 20px;
  border-radius: var(--radius-sm);
  border-color: rgba(102, 230, 255, 0.3);
}

.emagine-mini-site--fleets .emagine-mini-lane--one { left: 16px; top: 10px; }
.emagine-mini-site--fleets .emagine-mini-lane--two { left: 16px; top: 44px; }
.emagine-mini-site--fleets .emagine-mini-lane--three { left: 16px; top: 78px; }

.emagine-mini-site--fleets .emagine-mini-point {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.emagine-mini-site--fleets .emagine-mini-point--one { left: 2px; top: 8px; }
.emagine-mini-site--fleets .emagine-mini-point--two { left: 2px; top: 42px; }
.emagine-mini-site--fleets .emagine-mini-point--three { left: 2px; top: 76px; }

/* One small van per lane, each plugged into its own charger point - the
   cue that reads "fleet depot" instead of unlabeled lanes. Same box +
   cabin-bump construction as .emagine-mini-car/-cabin (villas), just
   narrower and repeated three times. */
.emagine-mini-fleet-van {
  width: 44px;
  height: 16px;
  border-radius: 8px;
  /* Warm gold tone (vs. the lanes' cool cyan) so each van visibly reads as
     its own object sitting on the lane, not a same-toned continuation of it. */
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 30%),
    linear-gradient(160deg, rgba(255, 203, 102, 0.4), rgba(4, 12, 28, 0.94));
  border-color: rgba(255, 203, 102, 0.5);
  box-shadow: 6px 8px 0 rgba(1, 6, 16, 0.42);
}

/* Nested inside its van (not a sibling positioned independently in the
   container) so it inherits the van's own tilt instead of being projected
   by the shared perspective at a different (x, y). Sibling positioning
   made the cabin drift away from the body the farther a lane sat from the
   container's vertical center, leaving the top-most and bottom-most vans
   looking like they'd lost their cabin. */
.emagine-mini-fleet-van-cabin {
  position: absolute;
  left: 8px;
  top: -8px;
  width: 20px;
  height: 11px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(160deg, rgba(255, 203, 102, 0.5), rgba(4, 12, 28, 0.92));
  border: 1px solid rgba(255, 203, 102, 0.42);
}

.emagine-mini-site--fleets .emagine-mini-fleet-van--one { left: 26px; top: 9px; }
.emagine-mini-site--fleets .emagine-mini-fleet-van--two { left: 26px; top: 43px; }
.emagine-mini-site--fleets .emagine-mini-fleet-van--three { left: 26px; top: 77px; }

.emagine-cta {
  min-height: 82svh;
}

.emagine-corridor {
  position: relative;
  width: min(86vw, 520px);
  height: 360px;
  margin-inline: auto;
  perspective: 900px;
  transform-style: preserve-3d;
}

.emagine-corridor::before {
  content: "";
  position: absolute;
  inset: 18% 6% 2%;
  border-radius: 50%;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 46px),
    radial-gradient(ellipse, rgba(102, 230, 255, 0.14), transparent 72%);
  border: 1px solid rgba(102, 230, 255, 0.2);
  transform: rotateX(68deg) translateZ(-58px);
  transform-origin: center bottom;
}

/* Concrete "charging in progress" scene: an EV charger post cabled to a
   car on the bay - the literal outcome of eMagine's work - instead of
   abstract pins and crossing lines that didn't represent anything. */

/* The post/cable/car below are laid out on this fixed 520x360 canvas (the
   corridor's own max size) using percentage positions + fixed-px sizes
   together, which only lines them up correctly at that one exact canvas
   size. Rather than re-deriving every position for each breakpoint,
   emagine.js measures the corridor's actual rendered width and scales this
   whole canvas down to match (--corridor-scale) - the three objects and
   the cable between them stay correctly aligned at any size because they
   shrink together as one rigid group instead of independently. */
.emagine-cta-scene {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 520px;
  height: 360px;
  margin-left: -260px;
  margin-top: -180px;
  transform-style: preserve-3d;
  transform: scale(var(--corridor-scale, 1));
}

/* Charger post: upright unit with a green screen and a charge port. */
.emagine-cta-post {
  position: absolute;
  left: 17%;
  top: 26%;
  width: 54px;
  height: 128px;
  border-radius: 14px 14px 8px 8px;
  transform-style: preserve-3d;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(180deg, #24406e, #0a1730 62%, #050d1e);
  border: 1px solid rgba(102, 230, 255, 0.34);
  box-shadow: 12px 16px 0 rgba(1, 6, 16, 0.4), 0 0 36px rgba(0, 64, 224, 0.26);
  transform: rotateY(-15deg) translateZ(46px);
}

.emagine-cta-post::before {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  top: 12px;
  height: 36px;
  border-radius: 7px;
  background:
    linear-gradient(90deg, transparent 18%, rgba(31, 204, 31, 0.75) 18% 25%, transparent 25%),
    radial-gradient(circle at 76% 42%, rgba(31, 204, 31, 0.9), transparent 44%),
    linear-gradient(160deg, rgba(102, 230, 255, 0.35), rgba(2, 9, 24, 0.9));
  box-shadow: inset 0 0 10px rgba(31, 204, 31, 0.18), 0 0 12px rgba(31, 204, 31, 0.22);
}

.emagine-cta-post::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 72px;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 204, 31, 0.85), rgba(4, 11, 27, 0.94) 52%);
  border: 1px solid rgba(31, 204, 31, 0.5);
}

/* Charging cable drooping from the post across to the car - a catenary
   (bottom-rounded) span so both ends read as connected, not dangling.
   left/width bridge exactly from the post's right edge (17% of 520px +
   its own 54px width) to the car's left edge (89% of 520px - its own
   172px width) - the old 22%/150px was independently eyeballed and fell
   about 29px short of actually reaching the car. */
.emagine-cta-cable {
  position: absolute;
  left: 142.4px;
  top: 52%;
  width: 148.4px;
  height: 34px;
  border: 5px solid rgba(31, 204, 31, 0.62);
  border-top: 0;
  border-radius: 0 0 90px 90px;
  box-shadow: 0 0 12px rgba(31, 204, 31, 0.16);
  transform: translateZ(56px);
}

/* Car (side profile): body + cabin/greenhouse + two wheels. */
.emagine-cta-car {
  position: absolute;
  right: 11%;
  top: 45%;
  width: 172px;
  height: 46px;
  border-radius: 16px 26px 12px 12px;
  transform-style: preserve-3d;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 30%),
    linear-gradient(180deg, #2f4c7c, #0c1a34 72%);
  border: 1px solid rgba(102, 230, 255, 0.32);
  box-shadow: 0 16px 24px rgba(1, 6, 16, 0.42), 0 0 30px rgba(0, 64, 224, 0.2);
  transform: translateZ(72px);
}

.emagine-cta-car-cabin {
  position: absolute;
  left: 42px;
  top: -25px;
  width: 88px;
  height: 30px;
  border-radius: 12px 16px 0 0;
  clip-path: polygon(16% 0, 84% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(150, 205, 255, 0.5), rgba(18, 38, 70, 0.92));
  border: 1px solid rgba(102, 230, 255, 0.26);
  border-bottom: 0;
}

.emagine-cta-car-wheel {
  position: absolute;
  bottom: -13px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle, #1b2942 0 32%, #050c18 34%);
  border: 3px solid #2b3d5c;
  box-shadow: 0 6px 10px rgba(1, 6, 16, 0.5);
}

.emagine-cta-car-wheel--rear { left: 24px; }
.emagine-cta-car-wheel--front { right: 24px; }

@media (max-width: 900px) {
  .emagine-hero,
  .emagine-deployment,
  .emagine-interface,
  .emagine-cta {
    min-height: auto;
    padding-block: clamp(4rem, 14vw, 6rem);
  }

  .emagine-hero-grid,
  .emagine-deployment-grid,
  .emagine-interface-grid,
  .emagine-cta-grid {
    grid-template-columns: 1fr;
  }

  .emagine-charge-stage {
    width: min(92vw, 430px);
    min-height: 430px;
  }

  .emagine-charger {
    --charger-w: 118px;
    --charger-h: 218px;
    --charger-d: 58px;
  }

  /* The cable/plug/vehicle chain is positioned with fixed offsets tuned
     for the desktop charger's size (see base rules above); shrinking the
     charger for mobile (--charger-w/-h/-d, right above) left this whole
     cluster floating well past its now-smaller right edge, overlapping
     itself instead of visually connecting to anything. On desktop this
     only shows mid-scroll as a gradual, scroll-scrubbed reveal, but
     mobile skips straight to this end state with nothing animating it
     in - so the disconnect is fully visible instead of a passing frame.
     Simplest reliable fix: drop the cluster and let the charger itself
     (which reads perfectly well on its own) be the focal point, same
     reasoning already applied to hiding the vehicle below 600px - this
     just extends that to the full mobile range and to its cable/plug. */
  .emagine-cable-seg,
  .emagine-cable-pulse,
  .emagine-plug,
  .emagine-vehicle {
    display: none;
  }

  .emagine-site-model {
    height: 440px;
  }

  .emagine-site-layer {
    top: calc(26px + var(--i) * 90px);
    height: 70px;
  }

  /* Re-derive pillar spans for the mobile layer spacing (90px step,
     70px height) so they still bridge the same layer pairs. */
  .emagine-site-pillar {
    height: 90px;
  }

  .emagine-site-pillar--one { top: 61px; }
  .emagine-site-pillar--two { top: 241px; }

  .emagine-console-tabs {
    grid-template-columns: 1fr;
  }

  .emagine-console-screen {
    min-height: 410px;
  }

  /* Was only unstacked below 600px, but the tab copy above it already
     goes full-width at this same 900px breakpoint - between 600 and
     900px this stayed position: absolute, right/bottom-anchored to the
     panel, and landed squarely on top of the copy's last paragraph
     instead of sitting below it. Matching the breakpoints fixes it. */
  .emagine-mini-site {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 1.5rem;
    width: min(100%, 220px);
  }

  /* Reduce side details on mobile: one power lane and one conduit instead
     of three, a single-outline floor, and a capped mini-site so the
     centered charger stays the clear focal point. */
  .emagine-power-lane--two,
  .emagine-power-lane--three,
  .emagine-conduit--two,
  .emagine-conduit--three {
    display: none;
  }

  .emagine-mini-site--commercial .emagine-mini-point--four {
    display: none;
  }
}

@media (max-width: 600px) {
  .emagine-copy h1 {
    font-size: clamp(2.05rem, 13vw, 3.1rem);
  }

  .emagine-copy h2 {
    font-size: clamp(1.7rem, 10vw, 2.55rem);
  }

  .emagine-charge-stage {
    min-height: 370px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .emagine-power-lane,
  .emagine-site-layer {
    animation: none;
  }

  .emagine-charge-stage,
  .emagine-charger,
  .emagine-charger-shadow,
  .emagine-site-bounds,
  .emagine-conduit,
  .emagine-cable-seg,
  .emagine-cable-pulse,
  .emagine-plug,
  .emagine-vehicle::before,
  .emagine-vehicle-indicator,
  .emagine-site-layer,
  .emagine-site-pillar,
  .emagine-panel {
    transition: none;
  }
}
