/* ============================================
   Homepage Hero — Audit Report Preview Card
   All styles scoped under .hero-audit-tile so nothing leaks out.
   ============================================ */

.hero-audit-tile {
  /* Local design tokens */
  --ha-navy: #0F2B46;
  --ha-navy-deep: #0a1f33;
  --ha-teal: #00B4D8;
  --ha-teal-dim: rgba(0, 180, 216, 0.10);
  --ha-teal-glow: rgba(0, 180, 216, 0.18);
  --ha-orange: #FF6B2B;
  --ha-green: #10B981;
  --ha-green-dim: rgba(16, 185, 129, 0.08);
  --ha-blue: #2563EB;
  --ha-blue-dim: rgba(37, 99, 235, 0.08);
  --ha-amber: #D97706;
  --ha-amber-dim: rgba(217, 119, 6, 0.08);
  --ha-red: #EF4444;
  --ha-red-dim: rgba(239, 68, 68, 0.08);
  --ha-purple: #7C3AED;
  --ha-purple-dim: rgba(124, 58, 237, 0.08);
  --ha-white: #fff;
  --ha-g50: #F8FAFC;
  --ha-g100: #F1F5F9;
  --ha-g200: #E2E8F0;
  --ha-g300: #CBD5E1;
  --ha-g400: #94A3B8;
  --ha-g500: #64748B;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  text-decoration: none;
  color: inherit;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

.hero-audit-tile *,
.hero-audit-tile *::before,
.hero-audit-tile *::after {
  box-sizing: border-box;
}

/* Tile text above the card */
.hero-audit-tile .tile-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--ha-g300);
  text-align: center;
  letter-spacing: 0.2px;
  margin: 0;
}

.hero-audit-tile .tile-text span {
  font-weight: 800;
  background: linear-gradient(135deg, var(--ha-teal), #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Audit Card ── */
.hero-audit-tile .audit-card {
  width: 100%;
  background: var(--ha-white);
  border-radius: 18px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.30),
    0 4px 16px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  position: relative;
  animation: haFloatCard 6s ease-in-out infinite;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-audit-tile:hover .audit-card {
  transform: translateY(-4px) scale(1.01);
  box-shadow:
    0 32px 96px rgba(0, 0, 0, 0.36),
    0 6px 20px rgba(0, 0, 0, 0.22);
}

.hero-audit-tile .audit-card::before {
  content: '';
  position: absolute;
  top: -50px; left: -50px; right: -50px; bottom: -50px;
  background: radial-gradient(ellipse at center, var(--ha-teal-glow) 0%, transparent 70%);
  z-index: -1;
  filter: blur(40px);
}

/* Header */
.hero-audit-tile .ah {
  background: linear-gradient(135deg, var(--ha-navy), var(--ha-navy-deep));
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-audit-tile .ah-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-audit-tile .ah-icon {
  width: 30px;
  height: 30px;
  background: var(--ha-teal);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-audit-tile .ah-icon svg { width: 16px; height: 16px; color: var(--ha-white); }

.hero-audit-tile .ah-brand {
  font-size: 10px;
  font-weight: 600;
  color: var(--ha-g400);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.hero-audit-tile .ah-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ha-white);
}

.hero-audit-tile .ah-badge {
  background: var(--ha-green-dim);
  border: 1px solid rgba(16, 185, 129, 0.15);
  color: var(--ha-green);
  font-size: 9.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Score */
.hero-audit-tile .as {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--ha-g100);
  background: var(--ha-g50);
}

.hero-audit-tile .as-ring {
  width: 86px;
  height: 86px;
  position: relative;
  flex-shrink: 0;
}

.hero-audit-tile .as-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.hero-audit-tile .as-ring .track {
  fill: none;
  stroke: var(--ha-g200);
  stroke-width: 5.5;
}

.hero-audit-tile .as-ring .fill {
  fill: none;
  stroke: var(--ha-orange);
  stroke-width: 5.5;
  stroke-linecap: round;
  stroke-dasharray: 188.5;
  stroke-dashoffset: 188.5;
  animation: haDrawScore 2s ease-out 0.5s forwards;
}

.hero-audit-tile .as-num {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 26px;
  font-weight: 800;
  color: var(--ha-navy);
}

.hero-audit-tile .as-num small {
  font-size: 13px;
  color: var(--ha-g400);
  font-weight: 600;
}

.hero-audit-tile .as-info { flex: 1; }

.hero-audit-tile .as-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--ha-g400);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 3px;
}

.hero-audit-tile .as-rating {
  font-size: 15px;
  font-weight: 800;
  color: var(--ha-amber);
  margin-bottom: 3px;
}

.hero-audit-tile .as-desc {
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  color: var(--ha-g500);
  line-height: 1.5;
}

/* Category list */
.hero-audit-tile .ac { padding: 14px 22px 4px; }

.hero-audit-tile .ac-title {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--ha-g400);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.hero-audit-tile .ac-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--ha-g100);
  opacity: 0;
  animation: haSlideRow 0.4s ease forwards;
}

.hero-audit-tile .ac-row:last-child { border-bottom: none; }

.hero-audit-tile .ac-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-audit-tile .ac-icon svg { width: 14px; height: 14px; }

.hero-audit-tile .ac-icon.i1 { background: var(--ha-green-dim);  color: var(--ha-green); }
.hero-audit-tile .ac-icon.i2 { background: var(--ha-blue-dim);   color: var(--ha-blue); }
.hero-audit-tile .ac-icon.i3 { background: rgba(255,107,43,0.08); color: var(--ha-orange); }
.hero-audit-tile .ac-icon.i4 { background: var(--ha-teal-dim);   color: var(--ha-teal); }
.hero-audit-tile .ac-icon.i5 { background: var(--ha-purple-dim); color: var(--ha-purple); }
.hero-audit-tile .ac-icon.i6 { background: var(--ha-amber-dim);  color: var(--ha-amber); }
.hero-audit-tile .ac-icon.i7 { background: rgba(0,180,216,0.06); color: #0891B2; }
.hero-audit-tile .ac-icon.i8 { background: var(--ha-red-dim);    color: var(--ha-red); }
.hero-audit-tile .ac-icon.i9 { background: rgba(59,130,246,0.08); color: #3B82F6; }

.hero-audit-tile .ac-info { flex: 1; min-width: 0; }

.hero-audit-tile .ac-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--ha-navy);
}

.hero-audit-tile .ac-desc {
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  color: var(--ha-g400);
  margin-top: 1px;
}

.hero-audit-tile .ac-wt {
  font-size: 9px;
  font-weight: 700;
  color: var(--ha-g400);
  background: var(--ha-g50);
  border: 1px solid var(--ha-g200);
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

.hero-audit-tile .ac-sc {
  font-size: 12.5px;
  font-weight: 800;
  min-width: 26px;
  text-align: right;
}

.hero-audit-tile .ac-sc.g { color: var(--ha-green); }
.hero-audit-tile .ac-sc.m { color: var(--ha-amber); }
.hero-audit-tile .ac-sc.l { color: var(--ha-red); }

.hero-audit-tile .ac-bar {
  width: 44px;
  height: 4px;
  background: var(--ha-g100);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.hero-audit-tile .ac-bf {
  height: 100%;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  animation: haGrowBar 0.7s ease forwards;
}

.hero-audit-tile .ac-bf.g { background: var(--ha-green); }
.hero-audit-tile .ac-bf.m { background: var(--ha-amber); }
.hero-audit-tile .ac-bf.l { background: var(--ha-red); }

/* Action plan teaser */
.hero-audit-tile .ap {
  margin: 10px 22px 0;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(0,180,216,0.05), rgba(0,180,216,0.02));
  border: 1px solid rgba(0,180,216,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-audit-tile .ap-icon {
  width: 30px;
  height: 30px;
  background: var(--ha-teal);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-audit-tile .ap-icon svg { width: 14px; height: 14px; color: var(--ha-white); }

.hero-audit-tile .ap-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ha-navy);
}

.hero-audit-tile .ap-desc {
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  color: var(--ha-g500);
  margin-top: 1px;
}

/* Footer */
.hero-audit-tile .af {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  margin-top: 10px;
  border-top: 1px solid var(--ha-g100);
  background: var(--ha-g50);
  border-radius: 0 0 18px 18px;
}

.hero-audit-tile .af-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-audit-tile .af-left svg {
  width: 15px;
  height: 15px;
  color: var(--ha-green);
  flex-shrink: 0;
}

.hero-audit-tile .af-text {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--ha-g500);
  font-weight: 500;
}

.hero-audit-tile .af-text b {
  color: var(--ha-navy);
  font-weight: 700;
}

.hero-audit-tile .af-right {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--ha-g400);
  font-weight: 500;
}

.hero-audit-tile .af-right svg { width: 13px; height: 13px; color: var(--ha-teal); }

/* Animations */
@keyframes haFloatCard { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes haDrawScore { to { stroke-dashoffset: 109.3; } }
@keyframes haSlideRow  { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: translateX(0); } }
@keyframes haGrowBar   { to { transform: scaleX(var(--s, 1)); } }

/* Row stagger */
.hero-audit-tile .ac-row:nth-child(1) { animation-delay: 0.30s; }
.hero-audit-tile .ac-row:nth-child(2) { animation-delay: 0.38s; }
.hero-audit-tile .ac-row:nth-child(3) { animation-delay: 0.46s; }
.hero-audit-tile .ac-row:nth-child(4) { animation-delay: 0.54s; }
.hero-audit-tile .ac-row:nth-child(5) { animation-delay: 0.62s; }
.hero-audit-tile .ac-row:nth-child(6) { animation-delay: 0.70s; }
.hero-audit-tile .ac-row:nth-child(7) { animation-delay: 0.78s; }
.hero-audit-tile .ac-row:nth-child(8) { animation-delay: 0.86s; }
.hero-audit-tile .ac-row:nth-child(9) { animation-delay: 0.94s; }

/* Bar stagger */
.hero-audit-tile .ac-row:nth-child(1) .ac-bf { animation-delay: 1.10s; }
.hero-audit-tile .ac-row:nth-child(2) .ac-bf { animation-delay: 1.18s; }
.hero-audit-tile .ac-row:nth-child(3) .ac-bf { animation-delay: 1.26s; }
.hero-audit-tile .ac-row:nth-child(4) .ac-bf { animation-delay: 1.34s; }
.hero-audit-tile .ac-row:nth-child(5) .ac-bf { animation-delay: 1.42s; }
.hero-audit-tile .ac-row:nth-child(6) .ac-bf { animation-delay: 1.50s; }
.hero-audit-tile .ac-row:nth-child(7) .ac-bf { animation-delay: 1.58s; }
.hero-audit-tile .ac-row:nth-child(8) .ac-bf { animation-delay: 1.66s; }
.hero-audit-tile .ac-row:nth-child(9) .ac-bf { animation-delay: 1.74s; }

/* Hero visual wrapper — keep visible on mobile */
.hero-section .hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  min-width: 0;
}

@media (max-width: 991px) {
  .hero-audit-tile { max-width: 380px; }
}

@media (max-width: 640px) {
  .hero-audit-tile { max-width: 340px; }
  .hero-audit-tile .audit-card { border-radius: 14px; }
  .hero-audit-tile .ah { padding: 14px 16px; }
  .hero-audit-tile .as { padding: 16px 16px; gap: 14px; }
  .hero-audit-tile .as-ring { width: 68px; height: 68px; }
  .hero-audit-tile .as-num { font-size: 20px; }
  .hero-audit-tile .as-num small { font-size: 11px; }
  .hero-audit-tile .ac { padding: 10px 16px 2px; }
  .hero-audit-tile .ac-row { gap: 8px; }
  .hero-audit-tile .ac-wt { display: none; }
  .hero-audit-tile .ap { margin: 8px 16px 0; padding: 10px 12px; }
  .hero-audit-tile .af { padding: 10px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-audit-tile .audit-card,
  .hero-audit-tile .ac-row,
  .hero-audit-tile .as-ring .fill,
  .hero-audit-tile .ac-bf {
    animation: none !important;
  }
  .hero-audit-tile .as-ring .fill { stroke-dashoffset: 109.3; }
  .hero-audit-tile .ac-bf { transform: scaleX(var(--s, 1)); }
  .hero-audit-tile .ac-row { opacity: 1; }
}
