/* Scorelens — light theme (white + blue) */

html { font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif; }
body { background: linear-gradient(180deg, #f8fafc 0%, #ffffff 600px); }

/* Subtle blue dotted grid for hero */
.bg-grid {
  background-image:
    linear-gradient(rgba(37, 99, 235, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, .07) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
}

/* Soft colored blobs in hero — much lower opacity on light bg */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .22;
  pointer-events: none;
}

/* Score ring tracks on light bg */
.ring-track { stroke: rgba(15, 23, 42, .08); }
.ring-fill { transition: stroke-dashoffset 1.2s cubic-bezier(.4, 0, .2, 1); }

/* Gradient text */
.grad-text {
  background: linear-gradient(90deg, #2563eb 0%, #0ea5e9 60%, #1d4ed8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Card hover lift — soft blue glow */
.card-lift {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card-lift:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, .35);
  box-shadow: 0 30px 60px -25px rgba(37, 99, 235, .25), 0 8px 16px -8px rgba(15, 23, 42, .08);
}

/* Scrolling marquee */
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}

/* Loading shimmer */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
.shimmer {
  background: linear-gradient(90deg, rgba(15, 23, 42, .04) 0%, rgba(15, 23, 42, .08) 50%, rgba(15, 23, 42, .04) 100%);
  background-size: 800px 100%;
  animation: shimmer 1.5s linear infinite;
}

/* Progress bars */
.pbar-track { background: rgba(15, 23, 42, .07); }
.pbar-fill  { transition: width .8s cubic-bezier(.4, 0, .2, 1); }

/* Severity dots */
.sev-ok   { background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, .12); }
.sev-warn { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, .12); }
.sev-bad  { background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .12); }
.sev-info { background: #3b82f6; box-shadow: 0 0 0 4px rgba(59, 130, 246, .12); }

/* Smooth fade-in for sections */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.fade-up    { animation: fadeUp .6s ease both; }
.fade-up.d1 { animation-delay: .08s; }
.fade-up.d2 { animation-delay: .16s; }
.fade-up.d3 { animation-delay: .24s; }
.fade-up.d4 { animation-delay: .32s; }

/* Score color helpers */
.score-good { color: #059669; }
.score-mid  { color: #d97706; }
.score-bad  { color: #dc2626; }

/* Light-theme card panel default (used via Tailwind class `shadow-card` too) */
.panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .08);
}

/* details/summary indicator — Tailwind reset removed default marker, restore subtle one */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* ──────────────────────────────────────────────────────────────────────────
   PRINT STYLESHEET (audit reports → branded PDF via browser print-to-PDF)
   ──────────────────────────────────────────────────────────────────────── */
@media print {
  /* Page setup */
  @page {
    size: A4;
    margin: 18mm 14mm 22mm 14mm;
    @bottom-left {
      content: "Scorelens · scorelens.space";
      font-family: 'Inter', sans-serif;
      font-size: 9pt;
      color: #64748b;
    }
    @bottom-right {
      content: "Page " counter(page) " of " counter(pages);
      font-family: 'Inter', sans-serif;
      font-size: 9pt;
      color: #64748b;
    }
  }
  @page :first { margin-top: 14mm; }

  /* Force light theme + readable colors regardless of dark-mode etc */
  html, body { background: #fff !important; color: #0f172a !important; }
  body { font-size: 10pt; line-height: 1.45; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* Hide chrome that doesn't belong in a PDF */
  header, footer, nav, .print-hidden,
  [data-waitlist], form[data-waitlist],
  .blob, .bg-grid,
  button,
  details > summary { display: none !important; }

  /* But: show details bodies expanded (e.g. extracted text panel) */
  details { display: block !important; border: 1px solid #e2e8f0; padding: 8pt; border-radius: 6pt; margin-top: 8pt; }
  details[open] > * { display: block !important; }
  details:not([open]) > :not(summary) { display: none !important; }

  /* Strip animations + transitions for print clarity */
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  /* Cards: stop them looking like floating dark blocks */
  .shadow-card, .panel, [class*="rounded-2xl"], [class*="rounded-xl"] {
    box-shadow: none !important;
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    color: #0f172a !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Headlines pinned to next section, no orphan headers */
  h1, h2, h3 { page-break-after: avoid; break-after: avoid; }

  /* Issue lists — each issue stays whole on a page */
  [data-issue-card] {
    page-break-inside: avoid;
    break-inside: avoid;
    margin-bottom: 4pt;
  }

  /* Score ring + bars stay colored */
  .ring-fill, .pbar-fill { stroke-opacity: 1 !important; opacity: 1 !important; }

  /* Branded print header injected at top of report — see .print-banner element */
  .print-banner { display: block !important; }
  .print-banner-link::after { content: " · " attr(data-url); color: #2563eb; font-weight: 600; }

  a { color: #1d4ed8 !important; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #64748b; }

  /* Hide the inline runtime <style> print blocks added per report — our global one covers it */
}

/* Out-of-print: the print-only banner is hidden so it doesn't show on screen */
.print-banner { display: none; }
