/* ── Free Audit reveal: scroll-driven 3D tilt of an audit report mock ── */
.audit-reveal-sec {
  position: relative;
  width: 100%;
  background: var(--bg);
  overflow: hidden;
  /* Phones + tablet-portrait + phone-landscape: size to content so the
     audit card isn't marooned in 30rem of empty padding. Desktop (≥1024px)
     keeps the tall reserve so the scroll-driven tilt has runway to play. */
  height: auto;
  padding: 2.5rem 0.625rem 3rem;
}
@media (min-width: 1024px) {
  .audit-reveal-sec { height: 80rem; padding: 0 2rem; }
}

.audit-reveal-inner {
  position: relative;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem 0;
}
@media (min-width: 1024px) {
  .audit-reveal-inner { height: 100%; perspective: 1100px; padding: 2rem 0; }
}

.audit-reveal-header {
  text-align: center;
  margin-bottom: 1.5rem;
  will-change: transform;
}

.audit-reveal-header .lbl {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent-light);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.audit-reveal-header .ttl {
  font-size: clamp(1.85rem, 5vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 0.85rem;
}
.audit-reveal-header .sub {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 36rem;
  margin: 0 auto;
  line-height: 1.55;
}

/* Card — the thing that tilts */
.audit-card {
  width: 100%;
  margin: -1rem auto 0;
  border-radius: 28px;
  background: linear-gradient(180deg, #1a1d22 0%, #0e1014 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 12px;
  will-change: transform;
  transform-origin: center center;
  transform: rotateX(20deg) scale(1.05);
  box-shadow:
    0 9px 20px rgba(0, 0, 0, 0.45),
    0 37px 37px rgba(0, 0, 0, 0.42),
    0 84px 50px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}
@media (max-width: 1023px) {
  /* scroll-reveal.js bails below 1024px, so a static rotateX/scale would just
     render permanently tilted + 30% smaller. Flatten + go full-bleed so the
     audit-report mock fills the viewport instead of floating in dead space.
     Use `transform: none` (not rotateX(0) scale(1)) so we don't create an
     orphan 3D rendering context, and drop `will-change` since nothing
     animates on mobile — both promote the element to its own GPU layer,
     which iOS Safari drifts during momentum scroll. */
  .audit-card {
    transform: none;
    will-change: auto;
    padding: 8px;
    border-radius: 22px;
  }
  .audit-reveal-header { will-change: auto; }
}

/* Live audit card (rendered after form submit) — reset the 3D tilt and
   the scaled-down preview look. The marketing card above the fold can stay
   tilted for visual flair, but the LIVE result has to be readable; a
   prospect should be able to scan their score + blockers without squinting
   at a perspective-warped phone-mock on desktop. */
.audit-reveal-live { height: auto; min-height: 0; padding-top: 2rem; padding-bottom: 2rem; }
.audit-reveal-live .audit-card {
  transform: none;
  margin-top: 0;
  /* Slightly soften the heavy stacked shadow that was tuned for the
     tilted preview — flat card needs less depth to look right. */
  box-shadow: 0 24px 60px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.04);
}
@media (max-width: 767px) {
  .audit-reveal-live .audit-card { transform: none; }
}
.audit-reveal-live .audit-card-inner {
  height: auto;
  min-height: 0;
}
@media (min-width: 768px) {
  .audit-reveal-live .audit-card-inner { height: auto; padding: 2rem 2.25rem; }
}

/* Service-mapping CTA panel that lives RIGHT under the live audit card.
   Each blocker the audit found gets paired with the BHG service that
   solves it, and a single primary CTA at the bottom converts. */
.audit-fixthis {
  max-width: 64rem;
  margin: 1.5rem auto 0;
  padding: 1.125rem 0.875rem 1.25rem;
  background: linear-gradient(135deg, rgba(255,107,107,0.06), rgba(140,90,240,0.04));
  border: 1px solid var(--accent-border, rgba(255,107,107,0.18));
  border-radius: 1rem;
  color: var(--text, rgba(255,255,255,0.92));
}
@media (min-width: 768px) {
  .audit-fixthis { padding: 2rem 2.25rem 2.25rem; }
}
.audit-fixthis-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent, #ff6b6b);
  margin-bottom: 0.5rem;
}
.audit-fixthis-h {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: white;
  margin-bottom: 0.5rem;
}
.audit-fixthis-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.55;
  margin-bottom: 1.5rem;
  max-width: 40rem;
}
.audit-fix-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}
@media (min-width: 768px) {
  .audit-fix-list { grid-template-columns: 1fr 1fr; gap: 1rem; }
}
.audit-fix-row {
  display: flex; align-items: flex-start; gap: 0.875rem;
  padding: 1rem 1.125rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 0.75rem;
}
.audit-fix-icon {
  flex-shrink: 0;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--accent-dim, rgba(255,107,107,0.12));
  border: 1px solid var(--accent-border, rgba(255,107,107,0.25));
  color: var(--accent, #ff6b6b);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.875rem;
}
.audit-fix-body { flex: 1; min-width: 0; }
.audit-fix-problem {
  font-weight: 600;
  font-size: 0.9375rem;
  color: white;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}
.audit-fix-solution {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.55;
}
.audit-fixthis-cta {
  display: flex; flex-direction: column; gap: 0.875rem; align-items: flex-start;
}
@media (min-width: 768px) {
  .audit-fixthis-cta { flex-direction: row; align-items: center; gap: 1.25rem; }
}
.audit-fixthis-pricing {
  font-size: 0.875rem; color: rgba(255,255,255,0.55);
  line-height: 1.5;
}
.audit-fixthis-pricing strong { color: white; font-weight: 600; }
.audit-fixthis-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent, #ff6b6b);
  color: var(--dark, #030712);
  font-weight: 700; font-size: 1rem;
  padding: 0.875rem 1.625rem;
  border-radius: 0.625rem;
  border: 1px solid var(--accent, #ff6b6b);
  cursor: pointer;
  text-decoration: none;
  min-height: 2.75rem;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.audit-fixthis-btn:hover { background: var(--accent-light, #ff8f8f); }
.audit-fixthis-btn:active { transform: translateY(1px); }

.audit-card-inner {
  background: radial-gradient(ellipse at top right, rgba(255, 107, 107, 0.06), transparent 60%), #0a0c10;
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  /* <1024px: size to content so all 3 blockers fit without "...much as count" crop. */
  height: auto;
}
@media (min-width: 1024px) {
  .audit-card-inner { height: 40rem; padding: 1.85rem 2.25rem; gap: 1.35rem; overflow: hidden; }
}

/* Document header */
.audit-doc-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.85rem;
  border-bottom: 1px dashed var(--border);
}
.audit-doc-id {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.audit-doc-meta {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

/* Score block — number on left, message on right */
.audit-score {
  display: flex;
  align-items: flex-end;
  gap: 1.25rem;
}
.audit-score-num {
  font-size: clamp(3rem, 7vw, 4.5rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.audit-score-num span {
  font-size: 0.45em;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0;
}
.audit-score-text {
  flex: 1;
  padding-bottom: 0.35rem;
}
.audit-score-eyebrow {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.audit-score-msg {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.4;
  font-weight: 500;
}
@media (min-width: 768px) {
  .audit-score-msg { font-size: 0.95rem; }
}

/* Score bars */
.audit-bars {
  display: grid;
  gap: 0.55rem;
}
@media (min-width: 768px) {
  .audit-bars { gap: 0.7rem; }
}
.audit-bar-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr 4.5rem;
  gap: 0.7rem;
  align-items: center;
  font-size: 0.72rem;
}
@media (min-width: 768px) {
  .audit-bar-row { grid-template-columns: 8.5rem 1fr 5.5rem; font-size: 0.78rem; }
}
.audit-bar-label {
  color: var(--text);
  font-weight: 500;
}
.audit-bar-track {
  display: block;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.045);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.audit-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transform-origin: left center;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  /* default: visible (no-JS / reduce-motion fallback) */
}
.js-bar-anim .audit-bar-fill { transform: scaleX(0); }
.js-bar-anim .audit-bar-row.in-view .audit-bar-fill { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) {
  .audit-bar-fill { transition: none; transform: scaleX(1) !important; }
}
.audit-bar-fill--critical { background: linear-gradient(90deg, var(--accent), var(--accent-light)); }
.audit-bar-fill--warn { background: linear-gradient(90deg, #ffb15c, #ffd28a); }
.audit-bar-fill--good { background: linear-gradient(90deg, #6bd99c, #8ce3b3); }
.audit-bar-status {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.audit-bar-status--critical { color: var(--accent); }
.audit-bar-status--warn { color: #ffb15c; }
.audit-bar-status--good { color: #6bd99c; }

/* Issue rows */
.audit-issues {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border);
}
.audit-issues h4 {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}
.audit-issue {
  display: flex;
  gap: 0.6rem;
  padding: 0.4rem 0;
  align-items: flex-start;
}
.audit-issue + .audit-issue { border-top: 1px solid rgba(255, 255, 255, 0.04); }
.audit-issue-arrow {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.audit-issue strong {
  font-size: 0.78rem;
  color: var(--text);
  font-weight: 600;
  display: block;
  margin-bottom: 1px;
}
@media (min-width: 768px) {
  .audit-issue strong { font-size: 0.86rem; }
}
.audit-issue p {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
}
@media (min-width: 768px) {
  .audit-issue p { font-size: 0.78rem; }
}

/* Footer */
.audit-foot {
  font-size: 0.65rem;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 0.4rem;
}
.audit-variance-note {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.28);
  text-align: center;
  padding: 0.5rem 0.75rem 0;
  line-height: 1.5;
}

/* Flat fallback: honor reduce-motion AND <1024px. The scroll-reveal JS bails
   below 1024px to kill scroll-jank on phones + tablets, so the JS never
   animates AWAY from the tilted entry pose. Without this override, the card
   would stay locked at rotateX(20deg) scale(0.7), the entry pose, looking
   like a broken half-rendered widget. */
@media (prefers-reduced-motion: reduce), (max-width: 1023px) {
  .audit-card { transform: none !important; will-change: auto !important; }
  .audit-reveal-header { transform: translateY(0) !important; will-change: auto !important; }
}
