html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", Helvetica, Arial, sans-serif;
  background: #f5f7fb;
  color: #0f172a;
}

img {
  max-width: 100%;
}

.shadow-soft {
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.premium-shell {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(14, 165, 233, 0.04));
}

.tool-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  background: rgba(255, 255, 255, 0.9);
  animation: fadeUp 0.45s ease both;
}

.tool-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 18px 35px rgba(79, 70, 229, 0.12);
  border-color: rgba(99,102,241,0.35);
}

.hero-grid {
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.12), transparent 38%),
    radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.96));
}

.hero-card {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 28%, #1e1b4b 100%);
}

.float-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.float-card:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.12);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  background: rgba(16, 185, 129, 0.08);
  color: #047857;
}

.metric-card {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(8px);
}

.section-panel {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.tool-spotlight {
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.tool-spotlight:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(79, 70, 229, 0.12);
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  border: 1px solid transparent;
}

.badge-red { background: rgba(239, 68, 68, 0.1); color: #b91c1c; border-color: rgba(239, 68, 68, 0.12); }
.badge-amber { background: rgba(245, 158, 11, 0.12); color: #b45309; border-color: rgba(245, 158, 11, 0.18); }
.badge-emerald { background: rgba(16, 185, 129, 0.1); color: #047857; border-color: rgba(16, 185, 129, 0.14); }
.badge-sky { background: rgba(14, 165, 233, 0.1); color: #0369a1; border-color: rgba(14, 165, 233, 0.15); }

.eyebrow {
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.scrollbar-none::-webkit-scrollbar {
  display: none;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .tool-card {
    min-height: 0;
  }

  .hero-grid {
    border-radius: 1.25rem;
  }

  .hero-card {
    padding-top: 1.25rem;
  }

  .float-card {
    padding: 0.8rem;
  }

  .sticky.bottom-4 {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
  }
}

/* Mobile Ergonomics & WCAG AA Touch Targets (Min 44-48px) */
button, select, .tool-filter-btn, .badge-pill, a[role="button"] {
  min-height: 44px;
}

.dropzone-box, #dropzoneContainer, #dsDropzone {
  min-height: 160px;
  touch-action: manipulation;
}

button#universalHeroDropzone {
  min-height: 48px;
}

/* WCAG AA Compliance: Accessible Skip Links */
.sr-only:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* WCAG AA Compliance: 2px Visible Focus Rings (3:1+ Contrast Ratio) across all interactive elements */
:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #4338CA !important;
  outline-offset: 2px !important;
}

.theme-dark :focus-visible,
.theme-dark button:focus-visible,
.theme-dark a:focus-visible,
.theme-dark input:focus-visible,
.theme-dark select:focus-visible,
.theme-dark textarea:focus-visible,
.theme-dark [tabindex]:focus-visible,
[data-theme="dark"] :focus-visible,
.dark :focus-visible {
  outline-color: #818CF8 !important;
}

/* WCAG AA Compliance: prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Cumulative Layout Shift (CLS) Guards */
.docushrink-ad-card {
  min-height: 90px;
  contain: layout;
}

@media (min-width: 768px) {
  .docushrink-ad-card {
    min-height: 120px;
  }
}
