/* EPC+F cards: frosted glass over the plant being built, each with its own drawing (app/epc.php).
   They rest on the desert (left and right of the plant), never over the halls whose roofs slide in.
   The default state is the finished drawing; in animated mode a card that has not arrived yet (no .is-on)
   holds the start state, so every arrival replays it. hero.js places them. */

.hero__epc { display: none; }

.epc {
  --ew: 300px; --vh: 168px;
  width: var(--ew); padding: 12px; border-radius: 26px; color: var(--white);
  background:
    linear-gradient(180deg, rgb(255 255 255 / .22), rgb(255 255 255 / .07) 42%, rgb(8 13 18 / .5) 72%, rgb(8 13 18 / .7));
  backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22), inset 0 1px 0 rgb(255 255 255 / .42), 0 34px 70px -28px rgb(0 0 0 / .7);
}
.epc__viz {
  position: relative; height: var(--vh); border-radius: 18px; overflow: hidden; container-type: size;
  background: linear-gradient(160deg, rgb(255 255 255 / .14), rgb(10 16 22 / .22) 55%, rgb(10 16 22 / .34));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2), inset 0 1px 0 rgb(255 255 255 / .36);
}
.epc__viz > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.epc__body { padding: 16px 10px 8px; }
.epc__meta { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 600; color: rgb(255 255 255 / .7); }
.epc__letter {
  display: inline-grid; place-items: center; min-width: 28px; height: 23px; padding: 0 8px; border-radius: 8px;
  background: rgb(91 230 198 / .16); box-shadow: inset 0 0 0 1px rgb(91 230 198 / .35); color: var(--wire);
  font-weight: 800; font-size: 12px; letter-spacing: .04em;
}
.epc__of { opacity: .55; }
.epc__title { margin-top: 10px; font-size: 25px; line-height: 1.3; font-weight: 820; text-shadow: 0 1px 14px rgb(0 0 0 / .35); }
.epc__title em { font-style: normal; font-weight: 300; color: #A6F5DA; }
.epc__desc { margin-top: 6px; font-size: 13.5px; line-height: 1.8; color: rgb(255 255 255 / .8); }
.epc__cta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- E: the blueprint drawing ---------- */
.bp { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bp__grid path { stroke: rgb(255 255 255 / .16); stroke-width: .7; }
.bp__dim { stroke: rgb(255 255 255 / .45); stroke-width: .8; }
.bp__draw { stroke: #9FF3D6; stroke-width: 1.15; stroke-dasharray: 1 1; stroke-dashoffset: 0; filter: drop-shadow(0 0 3px rgb(91 230 198 / .6)); transition: stroke-dashoffset 1.1s var(--ease-out) calc(var(--d) * 22ms); }

/* ---------- P: partners on a radar ---------- */
.epc__viz--radar { display: grid; place-items: center; }
.rd__ring, .rd__sweep, .rd__core, .rd__node { position: absolute; left: 50%; top: 50%; }
.rd__ring { width: calc(var(--r) * 92cqh); aspect-ratio: 1; border-radius: 50%; translate: -50% -50%; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2); transition: transform .9s var(--ease-out), opacity .9s; }
.rd__sweep {
  width: 82cqh; aspect-ratio: 1; border-radius: 50%; translate: -50% -50%;
  background: conic-gradient(from 0deg, rgb(91 230 198 / .42), rgb(91 230 198 / 0) 70deg, transparent 360deg);
  -webkit-mask: radial-gradient(closest-side, #000 98%, transparent); mask: radial-gradient(closest-side, #000 98%, transparent);
  animation: gr-sweep 4s linear infinite; animation-play-state: paused;
}
.epc.is-on .rd__sweep, html:not(.js) .rd__sweep, html.gr-static .rd__sweep { animation-play-state: running; }
@keyframes gr-sweep { to { transform: rotate(360deg); } }
.rd__core { width: 22cqh; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; display: grid; place-items: center; background: rgb(10 16 22 / .55); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2), 0 0 24px rgb(91 230 198 / .3); }
.rd__mark { width: 70%; color: var(--green-hi); }
.rd__node {
  width: 0; height: 0;
  transform: rotate(var(--a)) translateX(calc(var(--r) * 41cqh)) rotate(calc(-1 * var(--a)));
  transition: opacity .5s var(--ease-out) calc(.25s + var(--i) * .12s), scale .6s var(--ease-out) calc(.25s + var(--i) * .12s);
}
.rd__node i { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--wire); box-shadow: 0 0 0 4px rgb(91 230 198 / .2), 0 0 14px rgb(91 230 198 / .8); }
.rd__node b {
  position: absolute; top: 8px; left: 0; translate: -50% 0; white-space: nowrap; font-size: 10.5px; font-weight: 700; line-height: 1;
  padding: 4px 7px; border-radius: 999px; background: rgb(10 16 22 / .66); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .18);
}
.rd__node b[lang="en"] { letter-spacing: .05em; font-size: 9.5px; }

/* ---------- C: the four rank-one licences ---------- */
.epc__viz--grades { display: grid; grid-template-rows: auto 1fr; padding: 10px 14px 10px; }
.gd__cap { justify-self: start; font-size: 10.5px; font-weight: 700; color: #A6F5DA; padding: 3px 9px; border-radius: 999px; background: rgb(8 13 18 / .6); box-shadow: inset 0 0 0 1px rgb(91 230 198 / .35); }
.gd__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: end; padding-top: 8px; }
.gd__col { display: grid; justify-items: center; gap: 6px; min-height: 0; }
.gd__bar {
  position: relative; width: 100%; height: 62cqh; border-radius: 12px 12px 6px 6px; display: grid; place-items: start center; padding-top: 6px;
  background: linear-gradient(180deg, rgb(255 255 255 / .55), rgb(255 255 255 / .16) 45%, rgb(255 255 255 / .08));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .45), inset 0 2px 0 rgb(255 255 255 / .6), 0 10px 22px -10px rgb(0 0 0 / .5);
  transform-origin: bottom; transition: transform .9s var(--ease-out) calc(var(--i) * .1s);
}
.gd__bar::after { content: ""; position: absolute; inset: auto 18% 8% 18%; height: 30%; border-radius: 8px; background: linear-gradient(rgb(91 230 198 / .0), rgb(91 230 198 / .35)); }
.gd__bar b { font-size: 17px; font-weight: 850; color: var(--white); text-shadow: 0 1px 8px rgb(0 0 0 / .35); transition: opacity .5s calc(.5s + var(--i) * .1s); }
.gd__col i { font-style: normal; font-size: 10px; font-weight: 650; color: rgb(255 255 255 / .82); white-space: nowrap; }

/* ---------- O&M: the plant goes live ---------- */
.ga { fill: none; stroke-linecap: round; }
.ga__track { stroke: rgb(255 255 255 / .18); stroke-width: 9; }
.ga__fill { stroke: #8EF0CD; stroke-width: 9; stroke-dasharray: 1 1; stroke-dashoffset: 0; filter: drop-shadow(0 0 6px rgb(91 230 198 / .7)); transition: stroke-dashoffset 1.4s var(--ease-io); }
.ga__ticks path { stroke: rgb(255 255 255 / .45); stroke-width: 1.4; }
.ga__needle { transform-origin: 150px 122px; transform: rotate(90deg); transition: transform 1.4s var(--ease-io); }
.ga__needle path { stroke: var(--white); stroke-width: 3; }
.ga__needle circle { fill: var(--white); }
.ga__lamps circle { fill: var(--amber); stroke: none; filter: drop-shadow(0 0 5px rgb(255 179 71 / .9)); transition: fill .3s calc(1s + var(--i) * .12s), filter .3s calc(1s + var(--i) * .12s); }
.ga__label { position: absolute; left: 50%; top: 52%; translate: -50% 0; font-size: 12px; font-weight: 800; color: var(--wire); letter-spacing: .02em; transition: opacity .5s 1.2s; }

/* ---------- F: E → P → C → F ---------- */
.cv { fill: none; }
.cv__grid path { stroke: rgb(255 255 255 / .14); stroke-width: .8; stroke-dasharray: 3 5; }
.cv__area { stroke: none; transition: opacity 1s .6s; }
.cv__line { stroke: #9FF3D6; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 0; filter: drop-shadow(0 0 5px rgb(91 230 198 / .7)); transition: stroke-dashoffset 1.3s var(--ease-io); }
.cv__node circle { fill: #0B1118; stroke: #9FF3D6; stroke-width: 2; transition: transform .5s var(--ease-out) calc(.3s + var(--i) * .25s); transform-box: fill-box; transform-origin: center; }
.cv__node text { fill: rgb(255 255 255 / .85); font: 800 11px var(--font-latin); text-anchor: middle; }
.cv__node--f circle { fill: #8EF0CD; stroke: var(--white); filter: drop-shadow(0 0 8px rgb(142 240 205 / .9)); }
.cv__badge { position: absolute; top: 12px; inset-inline-start: 14px; font: 850 20px/1 var(--font-latin); letter-spacing: .02em; color: var(--white); transition: opacity .6s 1s, transform .6s var(--ease-out) 1s; }
.cv__badge b { color: #8EF0CD; font-weight: 850; }

/* start states (animated mode, before the card has arrived) */
html.js:not(.gr-static) .epc:not(.is-on) .bp__draw { stroke-dashoffset: 1; transition-duration: .2s; transition-delay: 0s; }
html.js:not(.gr-static) .epc:not(.is-on) .rd__ring { transform: scale(.4); opacity: 0; }
html.js:not(.gr-static) .epc:not(.is-on) .rd__node { opacity: 0; scale: .4; transition-delay: 0s; }
html.js:not(.gr-static) .epc:not(.is-on) .gd__bar { transform: scaleY(.04); transition-delay: 0s; }
html.js:not(.gr-static) .epc:not(.is-on) .gd__bar b { opacity: 0; transition-delay: 0s; }
html.js:not(.gr-static) .epc:not(.is-on) .ga__fill { stroke-dashoffset: 1; transition-duration: .2s; }
html.js:not(.gr-static) .epc:not(.is-on) .ga__needle { transform: rotate(-90deg); transition-duration: .2s; }
html.js:not(.gr-static) .epc:not(.is-on) .ga__lamps circle { fill: rgb(255 255 255 / .18); filter: none; transition-delay: 0s; }
html.js:not(.gr-static) .epc:not(.is-on) .ga__label { opacity: 0; transition-delay: 0s; }
html.js:not(.gr-static) .epc:not(.is-on) .cv__line { stroke-dashoffset: 1; transition-duration: .2s; }
html.js:not(.gr-static) .epc:not(.is-on) .cv__area { opacity: 0; transition-delay: 0s; }
html.js:not(.gr-static) .epc:not(.is-on) .cv__node circle { transform: scale(0); transition-delay: 0s; }
html.js:not(.gr-static) .epc:not(.is-on) .cv__badge { opacity: 0; transform: translateY(6px); transition-delay: 0s; }

/* ---------- the stepper ---------- */
.epc-steps { display: none; }

/* ======================================================================================
   Animated mode
   ====================================================================================== */
html.js:not(.gr-static) .hero__epc { display: block; position: absolute; inset: 0; z-index: 3; pointer-events: none; }
html.js:not(.gr-static) .epc {
  position: absolute; left: 0; top: 0; visibility: hidden;
  transform: translate3d(var(--x, 0px), var(--y, 0px), 0) translate(-50%, -50%) rotate(var(--r, 0deg)) scale(var(--s, 1));
  opacity: var(--o, 0); will-change: transform, opacity;
}
html.js:not(.gr-static) .epc.is-shown { visibility: visible; }
html.js:not(.gr-static) .epc.is-live { pointer-events: auto; }

html.js:not(.gr-static) .epc-steps {
  display: block; position: absolute; z-index: 5; bottom: 24px; inset-inline-end: var(--gutter);
  padding: 12px 16px 12px; border-radius: 18px; pointer-events: auto;
  background: rgb(11 17 24 / .55); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12), inset 0 1px 0 rgb(255 255 255 / .12), 0 14px 30px -14px rgb(0 0 0 / .7);
  opacity: var(--steps-o, 0); visibility: hidden; transition: visibility 0s .3s;
}
html.js:not(.gr-static) .hero.is-steps .epc-steps { visibility: visible; transition: none; }
.epc-steps ol { display: flex; align-items: flex-end; gap: 8px; margin: 0; padding: 0; list-style: none; }
.epc-steps button {
  display: grid; justify-items: start; gap: 7px; padding: 0; border: 0; background: none; color: rgb(255 255 255 / .55); cursor: pointer;
  font-size: 12px; font-weight: 700; transition: color .3s;
}
.epc-steps button:hover, .epc-steps button[aria-current="step"] { color: var(--white); }
.epc-steps i { position: relative; display: block; width: 46px; height: 3px; border-radius: 3px; background: rgb(255 255 255 / .2); overflow: hidden; transition: width .5s var(--ease-out); }
.epc-steps i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--wire); transform: scaleX(var(--f, 0)); transform-origin: var(--fo, right); }
[dir="ltr"] .epc-steps i::after { --fo: left; }
.epc-steps button[aria-current="step"] i { width: 84px; }
.epc-steps__n { font-size: 11px; opacity: .8; }
.epc-steps__t { display: none; }
.epc-steps button[aria-current="step"] .epc-steps__t { display: inline; }
.epc-steps button { grid-template-columns: auto auto; column-gap: 6px; }
.epc-steps button i { grid-column: 1 / -1; }

/* phones: a compact horizontal card over the sky, the stepper as a thin meter */
@media (max-width: 767px) {
  html.js:not(.gr-static) .epc {
    --vh: 104px;
    display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px; border-radius: 22px;
  }
  html.js:not(.gr-static) .epc__viz { border-radius: 15px; }
  html.js:not(.gr-static) .epc__body { padding: 2px 2px 2px 4px; }
  html.js:not(.gr-static) .epc__meta { font-size: 11px; gap: 7px; }
  html.js:not(.gr-static) .epc__letter { height: 20px; min-width: 24px; font-size: 11px; }
  html.js:not(.gr-static) .epc__title { margin-top: 6px; font-size: 18px; }
  html.js:not(.gr-static) .epc__desc { font-size: 12px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  html.js:not(.gr-static) .epc__cta { margin-top: 8px; }
  html.js:not(.gr-static) .epc__cta .btn { min-height: 34px; padding: 0 12px; font-size: 12.5px; }
  html.js:not(.gr-static) .epc__viz--grades { padding: 6px 7px; }
  .gd__cap { font-size: 8px; padding: 2px 6px; }
  .gd__row { gap: 4px; padding-top: 4px; }
  .gd__bar { border-radius: 7px 7px 4px 4px; padding-top: 3px; }
  .gd__bar b { font-size: 12px; }
  .gd__col i { font-size: 7px; }
  .rd__node b { font-size: 7.5px; padding: 2px 4px; top: 6px; }
  .rd__node b[lang="en"] { font-size: 7px; }
  .rd__node i { width: 6px; height: 6px; margin: -3px 0 0 -3px; }
  .cv__badge { font-size: 13px; top: 8px; inset-inline-start: 9px; }
  .ga__label { font-size: 9px; }
  html.js:not(.gr-static) .epc-steps { bottom: 14px; padding: 9px 12px; border-radius: 14px; }
  .epc-steps ol { gap: 5px; }
  .epc-steps i { width: 18px; }
  .epc-steps button[aria-current="step"] i { width: 46px; }
  .epc-steps__n { display: none; }
}

/* ======================================================================================
   Static mode: the stages as a row of cards under the headline
   ====================================================================================== */
html:not(.js) .hero__epc, html.gr-static .hero__epc {
  display: grid; grid-column: 1 / -1; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 24px;
}
html:not(.js) .epc, html.gr-static .epc { width: auto; }
