/*
 * Solutions card grid. Transcribed from Solutions.tsx.
 *
 * Every value reads a --ge-* property whose fallback is the original design
 * value, so an untouched widget is pixel-identical and a control only ever
 * overrides the fallback.
 */

.ge-sol {
  margin-inline: auto;
  max-width: var(--ge-sol-frame-max, var(--ge-frame-max, 1320px));
  padding: var(--ge-sol-pad, 48px var(--ge-frame-gutter, 12px) 20px);
  box-sizing: border-box;
}
@media (min-width: 640px) {
  .ge-sol { padding: var(--ge-sol-pad, 64px var(--ge-frame-gutter, 20px) 28px); }
}

/* One rule, not three. The column count is a responsive control, so Elementor
   emits its own breakpoint values for --ge-sol-cols. Writing my own min-width
   queries as well would mean two systems fighting over the same property. */
.ge-sol__grid {
  display: grid;
  gap: var(--ge-sol-gap, 12px);
  grid-template-columns: repeat(var(--ge-sol-cols, 5), minmax(0, 1fr));
}

/* ------------------------------------------------------------------ card -- */

.ge-sol__card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  border-radius: var(--ge-sol-card-radius, var(--ge-radius-card, 20px));
  border: 1px solid var(--ge-sol-card-border, var(--ge-hair));
  background: var(--ge-sol-card-bg, var(--ge-card));
  padding: var(--ge-sol-card-pad, 16px);
  transition-property: transform, box-shadow;
  transition-duration: var(--ge-sol-card-dur, 450ms);
  transition-timing-function: var(--ge-sol-card-ease, var(--ge-ease-out));
}
.ge-sol__card:hover {
  transform: translateY(var(--ge-sol-card-lift, -8px));
  box-shadow: var(--ge-sol-card-hover-shadow, var(--ge-shadow-card-hover));
}

/* ------------------------------------------------------- drawn hover edge --
 * No viewBox on purpose. Without one, an SVG user unit equals a CSS pixel, so
 * the corner radius stays circular at any card width. The React version needed
 * a ResizeObserver to achieve the same thing; this needs no JavaScript.
 * Geometry is set through CSS geometry properties, which modern browsers accept
 * on an SVG rect.
 */
.ge-sol__edge {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 10;
  overflow: visible;
}
.ge-sol__edge rect {
  x: calc(var(--ge-sol-edge-w, 1.8px) / 2);
  y: calc(var(--ge-sol-edge-w, 1.8px) / 2);
  width: calc(100% - var(--ge-sol-edge-w, 1.8px));
  height: calc(100% - var(--ge-sol-edge-w, 1.8px));
  rx: calc(var(--ge-sol-card-radius, var(--ge-radius-card, 20px)) - var(--ge-sol-edge-w, 1.8px) / 2);
  fill: none;
  stroke: var(--ge-sol-edge-color, var(--ge-green));
  stroke-width: var(--ge-sol-edge-w, 1.8px);
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset var(--ge-sol-edge-dur, 760ms) var(--ge-ease-out);
}
.ge-sol__card:hover .ge-sol__edge rect { stroke-dashoffset: 0; }

/* The React original has no reduced-motion guard on this. Added. */
@media (prefers-reduced-motion: reduce) {
  .ge-sol__edge rect { transition: none; }
  .ge-sol__card:hover .ge-sol__edge rect { stroke-dashoffset: 0; }
}

/* ------------------------------------------------------------- hover glow -- */

.ge-sol__bloom,
.ge-sol__pool {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity 520ms var(--ge-ease-out);
}
.ge-sol__bloom {
  top: 24px;
  width: var(--ge-sol-bloom-size, 176px);
  height: var(--ge-sol-bloom-size, 176px);
  border-radius: var(--ge-sol-bloom-radius, 999px);
  filter: blur(var(--ge-sol-bloom-blur, 48px));
  background: radial-gradient(circle,
    color-mix(in oklch, var(--ge-sol-bloom-color, var(--ge-green)) 70%, transparent),
    transparent 68%);
}
.ge-sol__pool {
  top: 96px;
  height: var(--ge-sol-pool-h, 20px);
  width: var(--ge-sol-pool-w, 112px);
  border-radius: var(--ge-sol-pool-radius, 50%);
  filter: blur(var(--ge-sol-pool-blur, 12px));
  background: color-mix(in oklch, var(--ge-sol-bloom-color, var(--ge-green)) 50%, transparent);
}
.ge-sol__card:hover .ge-sol__bloom { opacity: var(--ge-sol-bloom-op, 0.55); }
.ge-sol__card:hover .ge-sol__pool  { opacity: var(--ge-sol-pool-op, 0.45); }

/* ----------------------------------------------------------------- image -- */

.ge-sol__well {
  position: relative;
  display: grid;
  place-items: center;
  height: var(--ge-sol-well-h, 104px);
}
.ge-sol__img {
  max-height: var(--ge-sol-img-h, 100px);
  width: auto;
  object-fit: contain;
  transition: transform 550ms var(--ge-ease-out);
}
.ge-sol__card:hover .ge-sol__img {
  transform: translateY(var(--ge-sol-img-rise, -6px)) scale(var(--ge-sol-img-scale, 1.09));
}

/* ------------------------------------------------------------------ foot -- */

.ge-sol__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--ge-sol-foot-gap, 12px);
  margin-top: var(--ge-sol-text-gap, 20px);
}
.ge-sol__copy { display: block; }

.ge-sol__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ge-sol-title-color, var(--ge-ink));
}
.ge-sol__sub {
  display: block;
  margin-top: var(--ge-sol-sub-mt, 4px);
  font-size: 11.5px;
  color: var(--ge-sol-sub-color, var(--ge-body));
}

.ge-sol__chip {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--ge-sol-chip-size, 32px);
  height: var(--ge-sol-chip-size, 32px);
  border-radius: var(--ge-sol-chip-radius, 999px);
  background: var(--ge-sol-chip-bg, var(--ge-dark));
  color: var(--ge-sol-chip-fg, #fff);
  transition: background-color 300ms var(--ge-ease-out), color 300ms var(--ge-ease-out);
}
.ge-sol__chip svg { width: var(--ge-sol-chip-icon, 14px); height: var(--ge-sol-chip-icon, 14px); }
.ge-sol__card:hover .ge-sol__chip {
  background: var(--ge-sol-chip-bg-h, var(--ge-green));
  color: var(--ge-sol-chip-fg-h, var(--ge-ink));
}

/* ---------------------------------------------------------------- motion -- */

@media (prefers-reduced-motion: no-preference) {
  .ge-sol__card {
    opacity: 0;
    animation: ge-sol-rise 600ms var(--ge-ease-out) forwards;
    /* Stagger driven by the index the widget writes, so adding a sixth card in
       the editor stays in rhythm with no code change. */
    animation-delay: calc(var(--ge-sol-i, 0) * var(--ge-sol-stagger, 60ms));
  }
}
@keyframes ge-sol-rise {
  from { opacity: 0; transform: translate3d(0, 26px, 0); }
  to   { opacity: 1; transform: none; }
}

/* A staggered entrance that replays on every keystroke is unusable in the
   editor canvas. */
.elementor-editor-active .ge-sol__card { opacity: 1; animation: none; }

/* ------------------------------------------------------- the rebate pill --
 *
 * Each digit is a strip of eleven rows (a bullet, then 0 to 9) inside a box one
 * row tall. Moving the strip up by --d rows shows that digit. At rest --d is
 * ignored and every strip sits on the bullet, so the figure reads as withheld
 * while the pill keeps exactly the width it will have when revealed: nothing
 * reflows on reveal, which is what makes it read as a mechanism rather than a
 * layout shift.
 *
 * The sentence itself is always in the DOM as text. Only its presentation is
 * withheld, which keeps the rebate claim readable to a crawler and a screen
 * reader whatever the animation does.
 */
.ge-sol__rebate,
.ge-sol__norebate {
  display: inline-flex; align-items: baseline;
  margin-top: var(--ge-sol-norebate-mt, 8px); padding: var(--ge-sol-norebate-pad, 4px 10px);
  border-radius: var(--ge-sol-norebate-radius, 999px);
  font-size: var(--ge-sol-norebate-fontsize, 10.5px); font-weight: 500; line-height: 1.35;
  transition: background-color 500ms var(--ge-ease-out), color 500ms var(--ge-ease-out);
}
.ge-sol__norebate {
  background: var(--ge-sol-norebate-bg, var(--ge-panel));
  color: var(--ge-sol-norebate-color, var(--ge-body));
}
.ge-sol__rebate {
  background: color-mix(in oklch, var(--ge-sol-rebate-bg, var(--ge-green)) 18%, transparent);
  color: color-mix(in oklch, var(--ge-sol-rebate-color, var(--ge-ink)) 70%, transparent);
}
.ge-sol__rebate[data-open] {
  background: var(--ge-sol-rebate-bg, var(--ge-green));
  color: var(--ge-sol-rebate-color, var(--ge-ink));
}

/* The readable sentence: present for assistive tech and crawlers, off-screen
   for everyone else. Not display:none, which would take it out of the
   accessibility tree along with the rebate claim. */
.ge-sol__rebate-read {
  position: absolute; width: var(--ge-sol-rebate-read-w, 1px); height: var(--ge-sol-rebate-read-h, 1px);
  margin: var(--ge-sol-rebate-read-m, -1px); padding: 0; border: 0;
  overflow: hidden; white-space: nowrap;
  clip-path: inset(50%);
}
.ge-sol__rebate-show { display: inline-flex; align-items: baseline; gap: var(--ge-sol-rebate-show-gap, 4px); }
.ge-sol__reels {
  /* Centre, not baseline. A reel's only child is absolutely positioned, so the
     reel has no text baseline of its own and flexbox synthesises one from its
     bottom edge, while the `$` beside it aligns on its real baseline. That left
     the digits sitting a couple of pixels high no matter what the boxes did.
     Every box in this row is now exactly 1.15em tall with its glyph centred in
     it, so aligning the boxes themselves is exact and does not care what font
     is loaded. */
  display: inline-flex; align-items: center;
  font-size: var(--ge-sol-reels-fontsize, 13px); font-weight: 800; letter-spacing: var(--ge-sol-reels-letterspacing, -0.02em);
  color: var(--ge-sol-rebate-color, var(--ge-ink));
}
/* The dollar sign and the comma have to be the SAME KIND OF BOX as a digit
   column, or they do not sit on the same line as the digits.

   An inline-block whose overflow is not `visible` takes its baseline from its
   bottom margin edge rather than from the text inside it. That is the spec, and
   it is why `vertical-align: baseline` on the reel does not do what it reads
   like it does. The reels are overflow-hidden so the digits above and below the
   window stay hidden, so every reel sat its BOTTOM EDGE on the baseline while
   the plain `$` sat on the real text baseline, and the number floated a
   descender's worth above the dollar sign.

   Giving the symbols the same height, line-height and overflow makes both boxes
   resolve their baseline the same way, so they line up exactly. Matching the
   box beats nudging with a vertical-align magic number, which would only be
   right for one font at one size. */
.ge-sol__sym {
  display: inline-block;
  height: var(--ge-sol-sym-h, 1.15em);
  line-height: var(--ge-sol-sym-lineheight, 1.15em);
  overflow: hidden;
  vertical-align: baseline;
  font-variant-numeric: tabular-nums;
}
.ge-sol__reel {
  position: relative; display: inline-block;
  width: var(--ge-sol-reel-w, 0.62em); height: var(--ge-sol-reel-h, 1.15em);
  overflow: hidden; vertical-align: baseline;
}
.ge-sol__strip {
  position: absolute; inset-inline: 0; top: 0;
  display: flex; flex-direction: column; align-items: center;
  font-variant-numeric: tabular-nums;
  transform: translateY(0);
  transition: transform 620ms var(--ge-ease-out);
  transition-delay: calc(var(--n, 0) * 55ms);
}
.ge-sol__strip > span { height: var(--ge-sol-strip-h, 1.15em); line-height: var(--ge-sol-strip-lineheight, 1.15em); }
.ge-sol__rebate[data-open] .ge-sol__strip { transform: translateY(calc(var(--d, 0) * -1 * var(--ge-sol-strip-h, 1.15em))); }

/* No script, or reduced motion: show the number rather than a row of bullets.
   The figure is the content; the reveal is decoration on top of it. */
.ge-sol:not([data-reveal]) .ge-sol__strip { transform: translateY(calc(var(--d, 0) * -1 * var(--ge-sol-strip-h, 1.15em))); }
.ge-sol:not([data-reveal]) .ge-sol__rebate {
  background: var(--ge-sol-rebate-bg, var(--ge-green));
  color: var(--ge-sol-rebate-color, var(--ge-ink));
}
@media (prefers-reduced-motion: reduce) {
  .ge-sol__strip { transition: none; transform: translateY(calc(var(--d, 0) * -1 * var(--ge-sol-strip-h, 1.15em))); }
  .ge-sol__rebate {
    background: var(--ge-sol-rebate-bg, var(--ge-green));
    color: var(--ge-sol-rebate-color, var(--ge-ink));
  }
}
.elementor-editor-active .ge-sol__strip { transform: translateY(calc(var(--d, 0) * -1 * var(--ge-sol-strip-h, 1.15em))); }
