/* ==========================================================================
   Hero — copy + device illustration (laptop, phone and shield showing an InjectGuard scan)
   The illustration is a 600×540 design scaled to its container: inside .hv, 1em = 10 design px.
   ========================================================================== */

#hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 8vw, 112px);
  background:
    radial-gradient(ellipse 55% 65% at 78% 45%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, #e3edff 0%, #edf3ff 65%, #f7faff 100%);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}
.hero__copy { max-width: 560px; }
.hero__lead {
  max-width: 520px;
  margin-top: 22px;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

/* ---------- Device illustration ---------- */
.hero__media {
  position: relative;
  width: 100%;
  max-width: 640px;
  justify-self: end;
  container-type: inline-size;
}
.hv {
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --bezel: linear-gradient(160deg, #2b3552 0%, #121a30 45%, #0b1224 100%);
  --screen: linear-gradient(180deg, #f6f9ff 0%, #e8eefc 100%);
  position: relative;
  width: 60em;
  height: 54em;
  font-size: 10px;
  font-size: calc(100cqw / 60);
  color: var(--navy);
}
.hv svg { display: block; }

.hv-glow {
  position: absolute;
  left: 6em;
  top: 4em;
  width: 52em;
  height: 48em;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 91, 255, 0.24) 0%, rgba(31, 91, 255, 0.08) 45%, rgba(31, 91, 255, 0) 70%);
}

/* Laptop */
.hv-laptop {
  position: absolute;
  left: 10em;
  top: 11em;
  width: 46em;
}
.hv-lid {
  position: relative;
  height: 29.5em;
  padding: 1.3em 1.3em 1.7em;
  border-radius: 2em 2em 0.8em 0.8em;
  background: var(--bezel);
  box-shadow:
    inset 0 0 0 0.15em #3a4566,
    0 3em 5em -2em rgba(11, 27, 63, 0.55);
}
.hv-cam {
  position: absolute;
  top: 0.45em;
  left: 50%;
  width: 0.5em;
  height: 0.5em;
  margin-left: -0.25em;
  border-radius: 50%;
  background: #3e4a6d;
}
.hv-screen {
  position: relative;
  display: grid;
  grid-template-columns: 5.4em minmax(0, 1fr);
  height: 100%;
  overflow: hidden;
  border-radius: 0.6em;
  background: var(--screen);
}
.hv-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1em;
  padding-top: 1.4em;
  background: var(--navy);
}
.hv-side-logo { width: 2.6em; height: 2.95em; margin-bottom: 0.5em; }
.hv-side i {
  width: 2.4em;
  height: 2.4em;
  border-radius: 0.7em;
  background: rgba(255, 255, 255, 0.12);
}
.hv-side i.is-on {
  background: var(--blue);
  box-shadow: 0 0 0 0.25em rgba(31, 91, 255, 0.3);
}
.hv-main {
  display: flex;
  flex-direction: column;
  gap: 1.3em;
  min-width: 0;
  padding: 1.5em 1.7em;
}
.hv-top {
  display: flex;
  align-items: center;
  gap: 1em;
}
.hv-word {
  font-size: 1.7em;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hv-word span,
.hv-p-head span { color: var(--blue); }
.hv-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.35em 0.9em 0.35em 0.7em;
  border-radius: 99em;
  background: var(--green-100);
  color: #128a4a;
  font-size: 1.05em;
  font-weight: 800;
}
.hv-status i {
  width: 0.65em;
  height: 0.65em;
  border-radius: 50%;
  background: var(--green);
  animation: hv-pulse 2.4s ease-in-out infinite;
}
.hv-cols {
  display: grid;
  grid-template-columns: 12.6em minmax(0, 1fr);
  gap: 1.2em;
  flex: 1;
  min-height: 0;
}
.hv-panel {
  border: 0.1em solid #e1e8f7;
  border-radius: 1.2em;
  background: #fff;
  box-shadow: 0 1em 2em -1.2em rgba(11, 27, 63, 0.35);
}
.hv-scorecard {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1em 0.8em;
}
.hv-scorecard small {
  margin-top: 0.15em;
  color: var(--muted);
  font-size: 1.1em;
  font-weight: 600;
}
.hv-gauge {
  position: relative;
  flex: none;
  width: 9em;
  height: 9em;
}
.hv-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hv-gauge circle { fill: none; stroke-width: 6.5; }
.hv-gauge .trk { stroke: #e3eaf7; }
.hv-gauge .bar { stroke: var(--green); stroke-linecap: round; stroke-dasharray: 150.8; stroke-dashoffset: 150.8; }
.hv-gauge b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2.6em;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.hv-verdict {
  margin-top: 0.35em;
  color: #16a35a;
  font-size: 1.8em;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hv-checks {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding: 0.4em 1em;
  list-style: none;
}
.hv-checks li {
  display: flex;
  align-items: center;
  gap: 0.75em;
  padding: 0.78em 0;
  border-bottom: 0.09em solid #edf1fa;
  font-size: 1.06em;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
}
.hv-checks li:last-child { border-bottom: 0; }
.hv-checks i,
.hv-p-row i {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.6em;
  height: 1.6em;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
}
.hv-checks i svg,
.hv-p-row i svg { width: 1em; height: 1em; }

/* A soft scan beam passes over the screen now and then */
.hv-sweep {
  position: absolute;
  left: 5.4em;
  right: 0;
  top: 0;
  height: 32%;
  border-bottom: 0.22em solid rgba(127, 164, 255, 0.95);
  background: linear-gradient(180deg, rgba(31, 91, 255, 0), rgba(31, 91, 255, 0.14));
  box-shadow: 0 0.5em 1.6em rgba(31, 91, 255, 0.3);
  opacity: 0;
  pointer-events: none;
}

.hv-base {
  position: relative;
  height: 1.9em;
  margin: 0 -3em;
  border-radius: 0.3em 0.3em 2.2em 2.2em / 0.3em 0.3em 1.6em 1.6em;
  background: linear-gradient(180deg, #f3f6fb 0%, #d3dae7 50%, #a8b2c6 100%);
  box-shadow: 0 1.8em 2.6em -1.2em rgba(11, 27, 63, 0.5);
}
.hv-base span {
  position: absolute;
  top: 0;
  left: 50%;
  width: 9em;
  height: 0.75em;
  margin-left: -4.5em;
  border-radius: 0 0 0.8em 0.8em;
  background: linear-gradient(180deg, #aab4c7, #d6dce8);
}

/* Phone */
.hv-phone {
  position: absolute;
  left: 0.5em;
  top: 22.5em;
  width: 15.5em;
  height: 31em;
  padding: 0.7em;
  border-radius: 2.8em;
  background: var(--bezel);
  box-shadow:
    inset 0 0 0 0.15em #3a4566,
    0 3em 5em -1.8em rgba(11, 27, 63, 0.6);
}
.hv-phone-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8em;
  height: 100%;
  overflow: hidden;
  padding: 3.1em 1.2em 1.2em;
  border-radius: 2.2em;
  background: var(--screen);
}
.hv-island {
  position: absolute;
  top: 0.9em;
  left: 50%;
  width: 4.6em;
  height: 1.3em;
  margin-left: -2.3em;
  border-radius: 99em;
  background: var(--navy);
}
.hv-p-head {
  display: flex;
  align-items: center;
  gap: 0.35em;
  font-size: 1.25em;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hv-p-head svg { width: 1.25em; height: 1.42em; }
.hv-p-head b { font-weight: 800; }
.hv-gauge--sm { width: 8em; height: 8em; margin-top: 0.3em; }
.hv-gauge--sm b { font-size: 2.3em; }
.hv-phone .hv-verdict { margin-top: -0.1em; font-size: 1.5em; }
.hv-p-row {
  display: flex;
  align-items: center;
  gap: 0.7em;
  width: 100%;
  padding: 0.7em 0.8em;
  border-radius: 0.9em;
  background: #fff;
  box-shadow: 0 0.6em 1.2em -0.8em rgba(11, 27, 63, 0.35);
}
.hv-p-row em {
  flex: 1;
  height: 0.65em;
  border-radius: 99em;
  background: #e3eaf7;
}
.hv-p-row em.short { flex: none; width: 55%; }

/* Shield + check bubble */
.hv-shield {
  position: absolute;
  right: 0;
  top: 0;
  width: 17em;
  height: 18.6em;
}
.hv-shield-art {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 1.6em 1.8em rgba(11, 27, 63, 0.32));
  animation: hv-float 6s ease-in-out infinite;
}
.hv-bubble {
  position: absolute;
  left: -7em;
  top: 0.6em;
  width: 9.5em;
  height: 8.2em;
  filter: drop-shadow(0 0.8em 1.1em rgba(11, 27, 63, 0.22));
  transform-origin: 20% 90%;
  animation: hv-float 5.2s ease-in-out -2s infinite;
}
.hv-bubble-tick { stroke-dasharray: 80; stroke-dashoffset: 0; }

/* Entrance: once the illustration is revealed, the devices rise in, the shield pops, the gauges fill */
.js .hero__media .hv-laptop,
.js .hero__media .hv-phone,
.js .hero__media .hv-shield,
.js .hero__media .hv-checks li { opacity: 0; transition: opacity 0.5s, translate 0.9s var(--out), scale 0.7s var(--spring); }
.js .hero__media .hv-laptop { translate: 0 3em; }
.js .hero__media .hv-phone { translate: -3em 2em; }
.js .hero__media .hv-shield { scale: 0.5; }
.js .hero__media .hv-checks li { translate: -1em 0; }
.js .hero__media .hv-bubble-tick { stroke-dashoffset: 80; transition: stroke-dashoffset 0.5s var(--out); }

.js .hero__media.is-visible .hv-laptop,
.js .hero__media.is-visible .hv-phone,
.js .hero__media.is-visible .hv-shield,
.js .hero__media.is-visible .hv-checks li { opacity: 1; translate: 0 0; scale: 1; }
.js .hero__media.is-visible .hv-phone { transition-delay: 0.2s; }
.js .hero__media.is-visible .hv-shield { transition-delay: 0.5s; }
.js .hero__media.is-visible .hv-checks li:nth-child(1) { transition-delay: 0.95s; }
.js .hero__media.is-visible .hv-checks li:nth-child(2) { transition-delay: 1.1s; }
.js .hero__media.is-visible .hv-checks li:nth-child(3) { transition-delay: 1.25s; }
.js .hero__media.is-visible .hv-checks li:nth-child(4) { transition-delay: 1.4s; }
.js .hero__media.is-visible .hv-bubble-tick { stroke-dashoffset: 0; transition-delay: 1.2s; }
.hero__media.is-visible .hv-gauge .bar { animation: hv-fill 1.4s var(--out) 0.7s both; }
.hero__media.is-visible .hv-gauge--sm .bar { animation-delay: 0.9s; }
.hero__media.is-visible .hv-sweep { animation: hv-sweep 7s cubic-bezier(0.65, 0, 0.35, 1) 2.4s infinite; }
.hero__media.is-visible .hv-phone { animation: hv-float 6.5s ease-in-out -3s infinite; }
.no-js .hv-gauge .bar { stroke-dashoffset: 0; }

@keyframes hv-fill { to { stroke-dashoffset: 0; } }
@keyframes hv-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.8em); }
}
@keyframes hv-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 192, 106, 0.5); }
  50% { box-shadow: 0 0 0 0.35em rgba(34, 192, 106, 0); }
}
@keyframes hv-sweep {
  0% { opacity: 0; transform: translateY(-100%); }
  6% { opacity: 1; }
  30% { opacity: 1; transform: translateY(320%); }
  34%, 100% { opacity: 0; transform: translateY(320%); }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__copy {
    max-width: 640px;
    margin-inline: auto;
    text-align: center;
  }
  .hero__lead { margin-inline: auto; }
  .hero__ctas,
  #hero .install-hint { justify-content: center; }
  .hero__media {
    max-width: 600px;
    justify-self: center;
  }
}
@media (max-width: 640px) {
  .hero__ctas .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .hv-gauge .bar,
  .hv-bubble-tick { stroke-dashoffset: 0 !important; }
  .js .hero__media .hv-laptop,
  .js .hero__media .hv-phone,
  .js .hero__media .hv-shield,
  .js .hero__media .hv-checks li { opacity: 1; translate: none; scale: none; }
  .hv-shield-art,
  .hv-bubble,
  .hero__media.is-visible .hv-phone,
  .hv-status i { animation: none; }
  .hv-sweep { display: none; }
}
