/* ============================================================
   Pixotter — Main Stylesheet
   Mobile-first, dark mode, CSS custom properties
   ============================================================ */

/* ── Custom Properties ── */
:root {
  /* Brand — Teal/Ocean */
  --color-primary: #0d9488;
  --color-primary-hover: #0f766e;
  --color-primary-light: #f0fdfa;
  --color-primary-border: #99f6e4;
  --color-accent: #f97316;
  --color-accent-light: #fff7ed;
  --color-accent-border: #fed7aa;
  --color-danger: #ef4444;
  --color-danger-light: #fef2f2;
  --color-warning: #f59e0b;

  /* Neutral */
  --color-bg: #ffffff;
  --color-bg-subtle: #f8fafc;
  --color-bg-surface: #f1f5f9;
  --color-border: #e2e8f0;
  --color-border-subtle: #f1f5f9;
  --color-text: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #94a3b8;
  --color-text-invert: #ffffff;

  /* Typography */
  --font-heading: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;

  /* Sizing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.07);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.08);

  /* Transitions */
  --transition-fast: 120ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 350ms ease;

  /* Layout */
  --max-width: 1120px;
  --header-height: 60px;
}

/* ── Dark Mode ── */
/* Explicit toggle (highest priority) */
[data-theme="dark"] {
  --color-bg: #0f172a;
  --color-bg-subtle: #0f172a;
  --color-bg-surface: #1e293b;
  --color-border: #334155;
  --color-border-subtle: #1e293b;
  --color-text: #e2e8f0;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #475569;
  --color-text-invert: #0f172a;
  --color-primary-light: #134e4a;
  --color-primary-border: #115e59;
  --color-accent-light: #431407;
  --color-accent-border: #7c2d12;
  --color-danger-light: #450a0a;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.25), 0 2px 4px -2px rgb(0 0 0 / 0.25);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.35), 0 8px 10px -6px rgb(0 0 0 / 0.35);
}

/* System preference fallback (before JS loads) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #0f172a;
    --color-bg-subtle: #0f172a;
    --color-bg-surface: #1e293b;
    --color-border: #334155;
    --color-border-subtle: #1e293b;
    --color-text: #e2e8f0;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #475569;
    --color-text-invert: #0f172a;
    --color-primary-light: #134e4a;
    --color-primary-border: #115e59;
    --color-accent-light: #431407;
    --color-accent-border: #7c2d12;
    --color-danger-light: #450a0a;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.25), 0 2px 4px -2px rgb(0 0 0 / 0.25);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.35), 0 8px 10px -6px rgb(0 0 0 / 0.35);
  }
}

/* ── Base ── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ── Layout ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-6);
  }
}

/* ── Accessibility ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ============================================================
   Drop Zone
   ============================================================ */

.drop-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: var(--space-10) var(--space-8);
  margin: 0 auto;
  max-width: 720px;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-xl);
  background-color: var(--color-bg-subtle);
  cursor: pointer;
  transition:
    border-color var(--transition-base),
    background-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast);
  user-select: none;
  -webkit-user-select: none;
}

.drop-zone:hover,
.drop-zone:focus-visible {
  border-color: var(--color-primary);
  background-color: var(--color-primary-light);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 10%, transparent);
  outline: none;
}

.drop-zone.active,
.drop-zone[data-dragover] {
  border-color: var(--color-primary);
  border-style: solid;
  background-color: var(--color-primary-light);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 15%, transparent);
  transform: scale(1.01);
}

.drop-zone.has-files {
  border-style: solid;
  border-color: var(--color-accent);
  background-color: var(--color-accent-light);
}

.drop-zone.has-files:hover {
  border-color: var(--color-accent);
  background-color: var(--color-accent-light);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-accent) 12%, transparent);
}

.drop-zone-icon {
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-4);
  color: var(--color-primary);
  opacity: 0.7;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.drop-zone:hover .drop-zone-icon,
.drop-zone.active .drop-zone-icon {
  opacity: 1;
  transform: translateY(-4px);
}

.drop-zone-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.drop-zone-subtitle {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

.drop-zone-formats {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: var(--space-3);
}

.drop-zone-file-count {
  display: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent);
}

.drop-zone.has-files .drop-zone-file-count {
  display: block;
}

.drop-zone.has-files .drop-zone-subtitle {
  display: none;
}

.drop-zone-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* ── Drop Zone Loading State ── */
.drop-zone.loading {
  cursor: wait;
}

/* Drop zone inner — old tool pages */
.drop-zone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.drop-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.drop-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
}

.drop-hint {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ============================================================
   Auto-Detect / Smart Suggestions
   ============================================================ */

.auto-detect {
  max-width: 720px;
  margin: var(--space-4) auto 0;
  padding: var(--space-4) var(--space-5);
  background-color: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  animation: slideDown var(--transition-slow) ease;
}

.auto-detect-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.auto-detect-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auto-detect-dismiss {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.auto-detect-dismiss:hover {
  color: var(--color-text-secondary);
}

/* ============================================================
   Pipeline Configurator
   ============================================================ */

.tool-config {
  padding: var(--space-8) 0;
}

/* ============================================================
   Loading Overlay
   ============================================================ */

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  background-color: rgb(255 255 255 / 0.85);
  backdrop-filter: blur(4px);
}

.loading-overlay[hidden] {
  display: none;
}

[data-theme="dark"] .loading-overlay {
  background-color: rgb(15 23 42 / 0.85);
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-message {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.loading-submessage {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

/* Inline spinner */
.spinner-sm {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-border);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

/* ============================================================
   Results Section
   ============================================================ */

.results {
  padding: var(--space-8) 0;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-3);
}

.results-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* ============================================================
   Toast Notifications
   ============================================================ */

.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 380px;
  pointer-events: all;
  animation: toastIn var(--transition-base) ease;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.toast.toast-out {
  opacity: 0;
  transform: translateX(100%);
}

.toast-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1.4;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
}

.toast-message {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

.toast-action {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-top: var(--space-2);
  display: block;
}

.toast-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
  transition: color var(--transition-fast);
}

.toast-close:hover {
  color: var(--color-text-secondary);
}

/* Toast variants */
.toast-success { border-left: 3px solid var(--color-accent); }
.toast-error { border-left: 3px solid var(--color-danger); }
.toast-warning { border-left: 3px solid var(--color-warning); }
.toast-info { border-left: 3px solid var(--color-primary); }

@media (max-width: 480px) {
  .toast-container {
    left: var(--space-4);
    right: var(--space-4);
    bottom: var(--space-4);
  }

  .toast {
    max-width: 100%;
  }
}

/* ============================================================
   Crop Tool Buttons
   ============================================================ */

/* ── Crop Ratio Buttons ── */
.crop-ratio-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.crop-ratio-btn {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.crop-ratio-btn:hover {
  border-color: var(--color-primary-border);
  background-color: var(--color-primary-light);
}

.crop-ratio-btn.active {
  border-color: var(--color-primary);
  background-color: var(--color-primary);
  color: white;
}

/* ── Crop Shape Buttons ── */
.crop-shape-buttons {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.crop-shape-btn {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.crop-shape-btn:hover {
  border-color: var(--color-primary-border);
  background-color: var(--color-primary-light);
}

.crop-shape-btn--active {
  border-color: var(--color-primary);
  background-color: var(--color-primary);
  color: white;
}

/* ============================================================
   Utilities
   ============================================================ */

.divider {
  height: 1px;
  background-color: var(--color-border);
  border: none;
  margin: var(--space-6) 0;
}

/* Ensure HTML hidden attribute always works — author CSS display values
   override the UA stylesheet's [hidden] { display: none } at equal specificity.
   This rule prevents that. See learnings/failed.md: CSS hidden attribute bug. */
[hidden] { display: none !important; }

/* ============================================================
   Animations
   ============================================================ */

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fade-in {
  animation: fadeIn 0.4s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── Drop zone idle pulse ── */
@keyframes dropZonePulse {
  0%, 100% { border-color: var(--color-border); }
  50% { border-color: var(--color-primary-border); }
}

.drop-zone:not(.has-files):not(.loading):not(.active):not(:hover) {
  animation: dropZonePulse 3s ease-in-out infinite;
}

/* ── Drop zone icon float ── */
@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.drop-zone:not(.has-files):not(.loading) .drop-zone-icon {
  animation: iconFloat 2.5s ease-in-out infinite;
}

.drop-zone:hover .drop-zone-icon,
.drop-zone.active .drop-zone-icon {
  animation: none;
}

/* ── Drop zone dragover scale ── */
.drop-zone[data-dragover] {
  transform: scale(1.02);
}

.drop-zone[data-dragover] .drop-zone-icon {
  animation: none;
  transform: scale(1.2) translateY(-4px);
}

/* ── Results section reveal ── */
@keyframes sectionReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.results:not([hidden]) {
  animation: sectionReveal 0.4s ease-out;
}

/* ── Go button pulse after file drop ── */
@keyframes pulseOnce {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(13, 148, 136, 0); }
  25% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(13, 148, 136, 0.25); }
  50% { transform: scale(1); box-shadow: 0 0 0 0 rgba(13, 148, 136, 0); }
  75% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(13, 148, 136, 0.25); }
}

.animate-pulse-once {
  animation: pulseOnce 1.6s ease-in-out;
}

/* ── Reduce motion ── */
@media (prefers-reduced-motion: reduce) {
  .drop-zone:not(.has-files):not(.loading):not(.active):not(:hover),
  .drop-zone:not(.has-files):not(.loading) .drop-zone-icon,
  .results:not([hidden]) {
    animation: none;
  }
}

/* ============================================================
   D-029: Design Polish V1
   ============================================================ */

/* ── Item 1: Section Alternating Backgrounds ── */
.section-alt {
  background-color: oklch(var(--b2) / 0.5);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-6) var(--space-8);
}

@media (min-width: 1024px) {
  .section-alt {
    padding: var(--space-8) var(--space-8) var(--space-10);
  }
}

/* ── Item 2: Celebratory Savings Banner ── */
.savings-banner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg, oklch(var(--su) / 0.08), oklch(var(--su) / 0.02));
  border: 1px solid oklch(var(--su) / 0.2);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  animation: sectionReveal 0.4s ease-out;
}

.savings-banner-icon {
  flex-shrink: 0;
}

.savings-banner-text {
  flex: 1;
  min-width: 0;
}

.savings-banner-headline {
  font-size: 1.125rem;
  font-weight: 700;
  color: oklch(var(--bc));
}

.savings-banner-detail {
  font-size: 0.875rem;
  color: oklch(var(--bc) / 0.6);
}

.savings-banner-otter {
  width: 48px;
  height: 48px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: var(--radius-md);
}

@media (max-width: 480px) {
  .savings-banner {
    flex-wrap: wrap;
    gap: var(--space-3);
  }
  .savings-banner-otter {
    display: none;
  }
}

/* ── Item 3: How It Works Section ── */
.how-it-works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  max-width: 640px;
  margin: 0 auto;
}

.how-it-works-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.how-it-works-step .step-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(13, 148, 136, 0.1);
  color: #0d9488;
  margin-bottom: var(--space-2);
}

.how-it-works-step .step-number {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0d9488;
  margin-bottom: 2px;
}

.how-it-works-step .step-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: oklch(var(--bc));
  margin-bottom: 2px;
}

.how-it-works-step .step-desc {
  font-size: 0.75rem;
  color: oklch(var(--bc) / 0.5);
  line-height: 1.4;
}

/* Arrow connectors between steps */
.how-it-works-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 24px;
  right: -18%;
  width: 36%;
  height: 2px;
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.15), rgba(13, 148, 136, 0.3), rgba(13, 148, 136, 0.15));
}

@media (max-width: 640px) {
  .how-it-works {
    gap: var(--space-2);
  }
  .how-it-works-step .step-icon {
    width: 36px;
    height: 36px;
  }
  .how-it-works-step .step-icon svg,
  .how-it-works-step .step-icon i {
    width: 18px;
    height: 18px;
  }
  .how-it-works-step .step-number {
    font-size: 0.5625rem;
  }
  .how-it-works-step .step-label {
    font-size: 0.8125rem;
  }
  .how-it-works-step .step-desc {
    display: none;
  }
  .how-it-works-step:not(:last-child)::after {
    top: 18px;
  }
}

/* ── Item 4: Enhanced Trust Badges ── */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background-color: oklch(var(--b1));
  border: 1px solid oklch(var(--bc) / 0.1);
  border-radius: var(--radius-lg);
  transition: box-shadow var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
}

.trust-badge:hover {
  border-color: oklch(var(--p) / 0.3);
  box-shadow: 0 2px 8px oklch(var(--p) / 0.08);
  transform: translateY(-1px);
}

.trust-badge-icon {
  color: oklch(var(--p));
  flex-shrink: 0;
}

.trust-badge-text {
  display: flex;
  flex-direction: column;
}

.trust-badge-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: oklch(var(--bc));
  line-height: 1.2;
}

.trust-badge-desc {
  font-size: 0.6875rem;
  color: oklch(var(--bc) / 0.5);
  line-height: 1.3;
}

@media (max-width: 640px) {
  .trust-badges {
    gap: var(--space-2);
  }
  .trust-badge {
    padding: var(--space-1) var(--space-2);
  }
  .trust-badge-icon {
    width: 16px;
    height: 16px;
  }
  .trust-badge-title {
    font-size: 0.75rem;
  }
  .trust-badge-desc {
    font-size: 0.5625rem;
  }
}

/* ── Hero Otter (accent near drop zone) ── */
/* On tool pages, the otter is absolutely positioned near the drop zone.
   Hidden on mobile, visible on desktop. Sizing handled by Tailwind classes. */
.hero-otter {
  display: none;
}

@media (min-width: 1024px) {
  .hero-otter {
    display: block;
  }
}

/* ── Preset Pills (visible above fold) ── */
.hero-presets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.hero-presets .preset-pill {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid oklch(var(--bc) / 0.15);
  background: oklch(var(--b1));
  color: oklch(var(--bc) / 0.7);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.hero-presets .preset-pill:hover,
.hero-presets .preset-pill.active {
  border-color: oklch(var(--p));
  background: oklch(var(--p) / 0.1);
  color: oklch(var(--p));
}

.hero-presets .preset-pill.active {
  font-weight: 600;
}

/* ── Item 5: Drop Zone Enhanced Animations ── */
@keyframes dropZoneBorderPulse {
  0%, 100% { border-color: rgba(45, 212, 191, 0.3); }
  50% { border-color: rgba(20, 184, 166, 0.55); }
}

#dropZone:not(.active):not(:hover) {
  animation: dropZoneBorderPulse 3s ease-in-out infinite;
}

#dropZone:hover {
  animation: none;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(13, 148, 136, 0.15), 0 0 0 3px rgba(13, 148, 136, 0.08) !important;
}

#dropZone.active {
  animation: none;
  border-style: solid !important;
  border-color: #0d9488 !important;
  background-color: oklch(var(--p) / 0.04);
  box-shadow: 0 10px 30px -5px rgba(13, 148, 136, 0.2), 0 0 0 4px rgba(13, 148, 136, 0.12) !important;
  transform: scale(1.01);
}

[data-theme="dark"] #dropZone.active {
  background-color: oklch(var(--p) / 0.08);
}

#dropZone .lucide-upload-cloud {
  transition: transform 0.3s ease;
}

#dropZone:hover i[data-lucide="upload-cloud"] {
  transform: translateY(-4px);
}

#dropZone.active i[data-lucide="upload-cloud"] {
  transform: scale(1.15) translateY(-4px);
}

@media (prefers-reduced-motion: reduce) {
  #dropZone:not(.active):not(:hover) {
    animation: none;
  }
}

/* ============================================================
   FAQ Accordion (seo-faq)
   ============================================================ */

.seo-faq { margin: var(--space-12) 0; }
.seo-faq h2 { margin-bottom: var(--space-6); }
.seo-faq details { border-bottom: 1px solid var(--color-border); }
.seo-faq summary { padding: var(--space-4) 0; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.seo-faq summary::after { content: '+'; font-size: 1.25rem; color: var(--color-text-muted); transition: transform var(--transition-fast); }
.seo-faq details[open] summary::after { content: '\2212'; }
.seo-faq .faq-answer { padding: 0 0 var(--space-4); color: var(--color-text-secondary); line-height: 1.7; }
.seo-faq .faq-answer p { margin-bottom: var(--space-3); }

/* ============================================================
   Sticky Mobile Download Bar
   ============================================================ */

.sticky-download-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  pointer-events: none;
}

.sticky-download-bar--visible {
  transform: translateY(0);
  pointer-events: auto;
}

.sticky-download-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: oklch(var(--b1) / 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid oklch(var(--bc) / 0.1);
  box-shadow: 0 -2px 12px oklch(var(--bc) / 0.08);
}

.sticky-download-info {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: oklch(var(--bc) / 0.7);
}

.sticky-download-btn {
  white-space: nowrap;
}

/* Hide on desktop when results are in view (auto-scroll handles it) */
@media (min-width: 1024px) {
  .sticky-download-bar {
    display: none;
  }
}

/* ============================================================
   Print
   ============================================================ */

@media print {
  .drop-zone {
    display: none;
  }

  .sticky-download-bar {
    display: none;
  }

  body {
    color: black;
    background: white;
  }
}
