/* ═══════════════════════════════════════════════════
   SECTION: audit-hero — source audit.html #sp-hero

   Ported with the source's variables translated to the theme's tokens. The
   three status colours in the sample report — green, amber, red — were inline
   styles repeated on every row in the source; they are classes here, so the
   palette lives in one place rather than in six style attributes.

   The scan bar animates. It is decoration on a decorative frame, so it is
   stopped for anyone who has asked for reduced motion.
═══════════════════════════════════════════════════ */

#sp-hero {
  background: var(--c-bg);
  padding: var(--sp-12) 0 var(--sp-section);
  position: relative;
  overflow: hidden;
}

.sp-hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  display: grid;
  grid-template-columns: 1fr 500px;
  gap: var(--sp-20);
  align-items: center;
  position: relative;
  z-index: 1;
}

/* ── Left ──
   The eyebrow is the shared .lbl, which carries its own spacing. The source
   had a pill here with the service's number in it; the number said nothing a
   visitor arriving from the catalogue did not already know. */

.sp-h1 {
  font-family: var(--f-display);
  font-size: clamp(36px, 4.5vw, 60px);
  font-weight: var(--fw-black);
  letter-spacing: -.05em;
  line-height: .96;
  color: var(--c-text-1);
  margin-bottom: var(--sp-5);
}
.sp-h1 em { color: var(--c-accent); font-style: normal }

.sp-hero-sub {
  font-size: var(--fs-300);
  color: var(--c-text-3);
  line-height: 1.75;
  margin-bottom: var(--sp-8);
  max-width: 500px;
}

.sp-hero-ctas { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap }

/* ── Right: the sample report ── */
.sp-hero-visual { position: relative; display: flex; align-items: center; justify-content: center }
.sp-visual-frame {
  width: 100%;
  max-width: 520px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-bg-2);
  border: 1px solid var(--c-border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .22);
}

.sc-vis-audit { padding: var(--sp-7, 28px) }

.sc-audit-scanner { position: relative; margin-bottom: var(--sp-5) }
.sc-audit-scan-bar {
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, transparent, var(--c-accent), transparent);
  margin-bottom: var(--sp-4);
  animation: sc-scan 2.5s ease-in-out infinite;
}
@keyframes sc-scan {
  0%, 100% { opacity: .4; transform: scaleX(.6) }
  50%      { opacity: 1;  transform: scaleX(1) }
}

.sc-audit-items { display: flex; flex-direction: column; gap: var(--sp-2) }
.sc-audit-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--c-bg-2);
  border: 1px solid var(--c-border);
}

.sc-audit-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0 }
.sc-audit-dot.ok   { background: var(--c-success); box-shadow: 0 0 6px var(--c-success) }
.sc-audit-dot.warn { background: #F59E0B; box-shadow: 0 0 6px rgba(245, 158, 11, .5) }
.sc-audit-dot.bad  { background: #EF4444; box-shadow: 0 0 6px rgba(239, 68, 68, .5) }

.sc-audit-name { font-size: var(--fs-300); font-weight: var(--fw-medium); color: var(--c-text-2); flex: 1 }
.sc-audit-score {
  font-family: var(--f-display);
  font-size: var(--fs-300);
  font-weight: var(--fw-extrabold);
  color: var(--c-text-1);
  letter-spacing: -.01em;
}

.sc-audit-bar-mini {
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background: var(--c-bg-4);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.sc-audit-bar-mini-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px }
.sc-audit-bar-mini-fill--ok   { background: var(--c-success) }
.sc-audit-bar-mini-fill--warn { background: #F59E0B }
.sc-audit-bar-mini-fill--bad  { background: #EF4444 }

.sc-audit-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: rgba(var(--c-accent-rgb), .06);
  border: 1px solid rgba(var(--c-accent-rgb), .15);
  margin-top: var(--sp-3);
}
.sc-audit-sum-text { font-size: var(--fs-300); color: var(--c-text-3); line-height: 1.5 }
.sc-audit-sum-text strong { color: var(--c-text-1); display: block; margin-bottom: 2px }
.sc-audit-sum-grade {
  font-family: var(--f-display);
  font-size: var(--fs-800, 32px);
  font-size: 32px;
  font-weight: var(--fw-black);
  color: var(--c-accent);
  letter-spacing: -.04em;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .sp-hero-inner { grid-template-columns: 1fr; gap: var(--sp-12) }
  .sp-visual-frame { max-width: 100% }
}

@media (max-width: 640px) {
  .sp-hero-inner { padding: 0 var(--sp-6) }
  #sp-hero { padding: var(--sp-8) 0 var(--sp-16) }
  /* Wrapped, the two buttons take their own widths and one ends up visibly
     longer than the other, which reads as a mistake rather than a hierarchy.
     Full width each, stacked — the same treatment .cs-actions and .sp-cta-btns
     already use. */
  .sp-hero-ctas .btn-p,
  .sp-hero-ctas .btn-g { flex: 1 1 100%; justify-content: center }
}

@media (prefers-reduced-motion: reduce) {
  .sc-audit-scan-bar { animation: none }
}
