/* audit.css — NearGrid fluid 2.5D audit page styles */

:root {
  --bg:        #0a0a0f;
  --bg-card:   #1a1a2e;
  --bg-glass:  rgba(26, 26, 46, 0.7);
  --cyan:      #00f5d4;
  --cyan-dim:  rgba(0, 245, 212, 0.15);
  --cyan-glow: rgba(0, 245, 212, 0.35);
  --magenta:   #f15bb5;
  --mag-dim:   rgba(241, 91, 181, 0.15);
  --yellow:    #fee440;
  --yel-dim:   rgba(254, 228, 64, 0.15);
  --red:       #ff3860;
  --red-dim:   rgba(255, 56, 96, 0.15);
  --border:    rgba(255, 255, 255, 0.06);
  --radius:    16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: #e8e8f0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── GRAIN OVERLAY ─── */
#grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ─── AMBIENT PARTICLES ─── */
#particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: floatParticle var(--dur, 8s) var(--delay, 0s) ease-in-out infinite;
}
@keyframes floatParticle {
  0%   { opacity: 0; transform: translateY(100vh) scale(0); }
  10%  { opacity: 0.3; }
  90%  { opacity: 0.15; }
  100% { opacity: 0; transform: translateY(-20vh) scale(1); }
}

/* ─── LOADING SCREEN ─── */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: opacity 0.8s ease;
}
#loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Scan rings */
.scan-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--cyan);
  opacity: 0;
  animation: scanExpand 2.4s ease-out infinite;
  width: 80px; height: 80px;
}
.scan-ring--2 { animation-delay: 0.8s; }
.scan-ring--3 { animation-delay: 1.6s; }

@keyframes scanExpand {
  0%   { width: 40px; height: 40px; opacity: 0.8; border-color: var(--cyan); }
  100% { width: 300px; height: 300px; opacity: 0; border-color: var(--magenta); }
}

#loading-logo {
  font-family: 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--cyan);
  letter-spacing: 0.04em;
  position: relative;
  z-index: 1;
}
#loading-logo span { color: var(--magenta); }

#loading-phase {
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  min-height: 18px;
}

#loading-bar-wrap {
  width: 200px; height: 2px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}
#loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  border-radius: 999px;
  transition: width 0.15s linear;
}

/* Mascot on loading screen */
.mascot--loading {
  position: relative;
  z-index: 1;
  transform: scale(0.7);
}

/* ─── HEADER ─── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  background: linear-gradient(to bottom, rgba(10, 10, 15, 0.9), transparent);
  pointer-events: none;
}
#site-header > * { pointer-events: auto; }

#logo {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--cyan);
  text-decoration: none;
  transition: opacity 0.2s;
}
#logo:hover { opacity: 0.8; }
#logo span { color: var(--magenta); }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

#mute-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
  transition: background 0.2s, color 0.2s;
}
#mute-btn:hover {
  background: rgba(0, 245, 212, 0.1);
  color: var(--cyan);
  border-color: var(--cyan-glow);
}

/* ─── MAIN (hidden initially) ─── */
#audit-main {
  position: relative;
  z-index: 10;
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 28px 80px;
}
#audit-main.hidden {
  display: none;
}

/* ─── MASCOT ─── */
.mascot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;
}

.mascot-body {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #1a1a2e, #2a1a3e);
  border: 2px solid var(--cyan);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  box-shadow: 0 0 20px var(--cyan-dim), inset 0 0 20px rgba(0, 245, 212, 0.05);
  animation: mascotFloat 3s ease-in-out infinite;
}

@keyframes mascotFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.mascot-eye {
  width: 10px;
  height: 10px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan);
  animation: eyeBlink 4s ease-in-out infinite;
}
.mascot-eye--right { background: var(--magenta); box-shadow: 0 0 8px var(--magenta); }

@keyframes eyeBlink {
  0%, 94%, 100% { transform: scaleY(1); }
  95%, 97%      { transform: scaleY(0.1); }
}

.mascot-mouth {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 4px;
  border-radius: 0 0 10px 10px;
  border: 2px solid var(--cyan);
  border-top: none;
  opacity: 0.7;
}

.mascot-speech {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 245, 212, 0.25);
  border-radius: 12px 12px 12px 4px;
  padding: 10px 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 220px;
  line-height: 1.4;
  margin-top: 8px;
  position: relative;
  min-height: 40px;
  animation: speechBounce 3s ease-in-out infinite;
  animation-delay: 0.5s;
}
@keyframes speechBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-3px); }
}

.cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
  color: var(--cyan);
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ─── AUDIT HERO ─── */
.audit-hero {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 72px;
}

.audit-hero-left {
  display: flex;
  justify-content: center;
  padding-top: 40px;
}

.audit-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(0, 245, 212, 0.25);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 20px;
}

.audit-store-name {
  font-family: 'Inter', sans-serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 8px;
}

.audit-category {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Fira Code', monospace;
  margin-bottom: 28px;
}

/* Score ring */
.score-ring-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.score-ring {
  transform: rotate(-90deg);
}

.score-ring-bg {
  stroke: rgba(255, 255, 255, 0.06);
}

.score-ring-fill {
  stroke: var(--cyan);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 8px var(--cyan));
}
.score-ring-fill.mid  { stroke: var(--yellow); filter: drop-shadow(0 0 8px var(--yellow)); }
.score-ring-fill.bad  { stroke: var(--red);    filter: drop-shadow(0 0 8px var(--red)); }

.score-ring-inner {
  position: absolute;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.score-number {
  font-family: 'Fira Code', monospace;
  font-size: 28px;
  font-weight: 600;
  color: #fff;
}

.score-label {
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}

.score-verdict {
  display: inline-block;
  font-size: 13px;
  font-family: 'Fira Code', monospace;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(255, 56, 96, 0.2);
}
.score-verdict.mid  { background: var(--yel-dim);  color: var(--yellow);  border-color: rgba(254, 228, 64, 0.2); }
.score-verdict.good { background: var(--cyan-dim); color: var(--cyan);   border-color: rgba(0, 245, 212, 0.2); }

/* ─── GAP CARDS ─── */
.gaps-section {
  margin-bottom: 72px;
}

.gaps-title {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.gaps-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 28px;
}

.gaps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.gap-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
  cursor: default;
  transform: translateY(20px);
  opacity: 0;
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.gap-card.visible {
  transform: translateY(0);
  opacity: 1;
}

.gap-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.gap-card--critical {
  border-color: rgba(255, 56, 96, 0.25);
}
.gap-card--critical:hover {
  border-color: rgba(255, 56, 96, 0.5);
  box-shadow: 0 8px 32px rgba(255, 56, 96, 0.12);
}
.gap-card--critical .gap-card-icon { color: var(--red); }
.gap-card--critical .gap-severity-tag { color: var(--red); }

.gap-card--warning {
  border-color: rgba(254, 228, 64, 0.2);
}
.gap-card--warning:hover {
  border-color: rgba(254, 228, 64, 0.4);
  box-shadow: 0 8px 32px rgba(254, 228, 64, 0.08);
}
.gap-card--warning .gap-card-icon { color: var(--yellow); }
.gap-card--warning .gap-severity-tag { color: var(--yellow); }

.gap-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gap-severity-tag {
  font-family: 'Fira Code', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.gap-label {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.2;
}

.gap-detail {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
}

/* Glow effect on hover */
.gap-card-glow {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.04), transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gap-card:hover .gap-card-glow { opacity: 1; }

/* ─── CTA SECTION ─── */
.cta-section {
  margin-bottom: 60px;
}

.cta-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 245, 212, 0.2);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.6;
}
.cta-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 40% at 50% 0%, rgba(0, 245, 212, 0.06), transparent);
  pointer-events: none;
}

.cta-badge {
  display: inline-block;
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(0, 245, 212, 0.25);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.cta-headline {
  font-family: 'Inter', sans-serif;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.cta-body {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.55);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.stripe-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--cyan) 0%, #00c9b0 100%);
  color: #0a0a0f;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 18px 40px;
  border-radius: 999px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 0 30px var(--cyan-glow), 0 0 60px rgba(0, 245, 212, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stripe-btn:hover {
  transform: scale(1.04) translateY(-2px);
  box-shadow: 0 0 50px rgba(0, 245, 212, 0.6), 0 0 80px rgba(0, 245, 212, 0.2);
}
.stripe-btn:active {
  transform: scale(0.98);
}

/* Ripple */
.btn-ripple {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  pointer-events: none;
}
.stripe-btn.rippling .btn-ripple::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.4) 0%, transparent 70%);
  animation: rippleOut 0.4s ease-out forwards;
  border-radius: 999px;
}
@keyframes rippleOut {
  0%   { transform: scale(0); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

.cta-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 16px;
  position: relative;
  z-index: 1;
}

/* ─── MASCOT CORNER ─── */
#mascot-corner {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 40;
}
#mascot-corner.hidden { display: none; }
.mascot--corner .mascot-body {
  width: 48px; height: 48px;
  border-radius: 14px;
  cursor: pointer;
}
.mascot--corner .mascot-body:hover {
  box-shadow: 0 0 28px var(--cyan-glow);
}

/* ─── FIXED STRIPE BAR ─── */
#stripe-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 14px 24px;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(0, 245, 212, 0.2);
  box-shadow: 0 -4px 30px rgba(0, 245, 212, 0.06);
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
#stripe-bar.visible {
  transform: translateY(0);
}
#stripe-bar.hidden {
  display: none;
}
.stripe-bar-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Fira Code', monospace;
  letter-spacing: 0.03em;
}
.stripe-bar-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, var(--cyan) 0%, #00c9b0 100%);
  color: #0a0a0f;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 0 20px var(--cyan-glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}
.stripe-bar-link:hover {
  transform: scale(1.04) translateY(-1px);
  box-shadow: 0 0 35px rgba(0, 245, 212, 0.55);
}

@media (max-width: 600px) {
  #stripe-bar { flex-direction: column; gap: 10px; text-align: center; padding: 16px 20px; }
  .stripe-bar-text { font-size: 11px; }
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  .mascot-body, .mascot-speech, .scan-ring, .particle, .cursor { animation: none; }
  .gap-card { transition: none; opacity: 1; transform: none; }
}

/* ─── MOBILE ─── */
@media (max-width: 768px) {
  #audit-main { padding: 80px 20px 60px; }
  .audit-hero { grid-template-columns: 1fr; gap: 28px; }
  .audit-hero-left { padding-top: 0; }
  .gaps-grid { grid-template-columns: 1fr; }
  .cta-card { padding: 32px 24px; }
  .stripe-btn { font-size: 14px; padding: 16px 28px; }
}

@media (max-width: 480px) {
  .audit-store-name { font-size: 28px; }
  .gap-card { flex-direction: column; gap: 12px; }
}
