/* ══════════════════════════════════════════════════════════════
   AjaxUploader — Site Design System
   ══════════════════════════════════════════════════════════════ */

:root {
  --accent: #6366f1;
  --accent-dark: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.12);
  --ink: #0a0f1e;
  --ink-soft: #1e293b;
  --muted: #64748b;
  --line: rgba(226, 232, 240, 0.7);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px -4px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.05), 0 20px 40px -8px rgba(0,0,0,0.1);
  --radius: 1rem;
  --radius-lg: 1.5rem;
}

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink-soft);
  background: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  letter-spacing: -0.025em;
}

a {
  color: var(--accent-dark);
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease, opacity 150ms ease;
}
a:hover { color: var(--accent); text-decoration: none; }

/* ── Brand icon ────────────────────────────────────────────── */

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
  flex-shrink: 0;
}

/* ── Nav pills ─────────────────────────────────────────────── */

.nav-pill {
  border-radius: 0.5rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  transition: all 150ms ease;
}
.nav-pill:hover { color: var(--ink); background: #f8fafc; }
.nav-pill.is-active { color: var(--ink); background: #f1f5f9; font-weight: 600; }

/* ── Buttons ──────────────────────────────────────────────── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 0.625rem;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 200ms ease;
}
.btn-primary:hover { background: #1e293b; color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-hover); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 0.625rem;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 200ms ease;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-dark); transform: translateY(-1px); box-shadow: var(--shadow-hover); }

.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 0.625rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
  transition: all 200ms ease;
}
.btn-accent:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35); }

/* ── Section labels ────────────────────────────────────────── */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  display: block;
  width: 1.5rem;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* ── Hero badge ────────────────────────────────────────────── */

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.06);
  color: var(--accent-dark);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
}

/* ── Metric pills ─────────────────────────────────────────── */

.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  box-shadow: var(--shadow-card);
}

/* ── Cards ─────────────────────────────────────────────────── */

.surface-panel {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.card-hover {
  transition: transform 250ms ease, box-shadow 250ms ease, border-color 250ms ease;
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(99, 102, 241, 0.2);
}

.feature-callout {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: all 250ms ease;
}
.feature-callout:hover {
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: var(--shadow-hover);
}

/* ── Showcase browser mockups ──────────────────────────────── */

.showcase-stack { display: grid; gap: 1rem; }

.showcase-browser {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: all 300ms ease;
}
.showcase-browser:hover { box-shadow: var(--shadow-hover); }
.showcase-browser.is-featured { border-radius: 1.75rem; }

.showcase-browser-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
  padding: 0.65rem 1rem;
}

.showcase-browser-dot {
  height: 0.6rem;
  width: 0.6rem;
  border-radius: 999px;
}

.showcase-shot { background: #f8fafc; padding: 0.5rem; }
.showcase-shot img {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

.showcase-caption { color: var(--muted); font-size: 0.85rem; line-height: 1.7; }

/* ── Hero section (dark) ──────────────────────────────────── */

.hero-dark {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #e2e8f0;
}

.hero-dark h1,
.hero-dark h2,
.hero-dark h3 { color: #ffffff; }

.hero-dark::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-dark::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Gradient text ────────────────────────────────────────── */

.text-gradient {
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 30%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Stats ─────────────────────────────────────────────────── */

.stat-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
}

/* ── Feature icon circle ───────────────────────────────────── */

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.875rem;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 700;
}

/* ── Code panels ───────────────────────────────────────────── */

.code-panel {
  margin-top: 1.5rem;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0f172a;
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.3);
}

.code-panel pre {
  margin: 0;
  overflow-x: auto;
  padding: 1.25rem 1.5rem;
  color: #e2e8f0;
  font-size: 0.875rem;
  line-height: 1.8;
}

/* ── Input fields ─────────────────────────────────────────── */

.input-field {
  min-height: 2.75rem;
  width: 100%;
  border-radius: 0.625rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 0.65rem 0.85rem;
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.textarea-field { min-height: 8rem; resize: vertical; }

/* ── Footer ────────────────────────────────────────────────── */

.footer-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}

.footer-stack-chip {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
  transition: all 150ms ease;
}
.footer-stack-chip:hover { border-color: rgba(255, 255, 255, 0.25); color: #e2e8f0; }

/* ── Legal copy ────────────────────────────────────────────── */

.legal-copy h2 { margin-top: 2rem; font-size: 1.5rem; font-weight: 700; color: var(--ink); }
.legal-copy p + p, .legal-copy ul + p, .legal-copy h2 + p, .legal-copy p + ul { margin-top: 1rem; }
.legal-copy ul { list-style: disc; padding-left: 1.5rem; }

/* ── Demo sidebar ──────────────────────────────────────────── */

.demo-sidebar {
  position: sticky;
  top: 5rem;
  align-self: start;
}

.demo-nav-group {
  margin-bottom: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-card);
  padding: 0.75rem;
}

.demo-nav-group-title {
  margin-bottom: 0.35rem;
  padding: 0 0.5rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.demo-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 0.5rem;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.65rem;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}
.demo-nav-link:hover { background: #f8fafc; color: var(--ink); }

.demo-nav-link.active {
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
}

.demo-nav-badge {
  display: inline-flex;
  height: 1.6rem;
  width: 1.6rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.4rem;
  background: #f1f5f9;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  font-weight: 600;
}

.demo-nav-link.active .demo-nav-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* ── Demo cards ───────────────────────────────────────────── */

.demo-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.demo-card-header {
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 1rem 1.5rem;
}

.demo-card-body { padding: 1.5rem; }

.demo-description {
  max-width: 52rem;
  color: #475569;
  font-size: 0.9375rem;
  line-height: 1.8;
}

.demo-subsection + .demo-subsection { margin-top: 1.75rem; }

/* ── Demo gallery links ────────────────────────────────────── */

.demo-gallery-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  background: #ffffff;
  color: #475569;
  padding: 0.75rem 0.85rem;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 200ms ease;
}
.demo-gallery-link:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 24px -8px rgba(99, 102, 241, 0.2);
  color: var(--ink);
}

.demo-gallery-badge {
  display: inline-flex;
  height: 1.6rem;
  width: 1.6rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.4rem;
  background: #f1f5f9;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  font-weight: 700;
}

/* ── Demo overview ────────────────────────────────────────── */

.demo-overview-group + .demo-overview-group { margin-top: 1.75rem; }

.demo-overview-title {
  margin-bottom: 0.65rem;
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.demo-overview-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.demo-overview-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #ffffff;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem 0.5rem 0.55rem;
  text-decoration: none;
  transition: all 200ms ease;
}
.demo-overview-link:hover {
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 20px -8px rgba(99, 102, 241, 0.2);
  color: var(--ink);
}

.demo-overview-badge {
  display: inline-flex;
  height: 1.5rem;
  min-width: 1.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  background: #f1f5f9;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0 0.35rem;
}

/* ── Drop zone ────────────────────────────────────────────── */

.demo-drop-zone { transition: border-color 180ms ease, background-color 180ms ease; }
.demo-drop-zone.is-active {
  border-color: var(--accent) !important;
  background: var(--accent-glow);
}

.queue-item {
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

/* ── Animations ───────────────────────────────────────────── */

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

.animate-on-scroll { opacity: 0; }
.animate-on-scroll.is-visible { animation: fadeInUp 0.45s ease-out forwards; }

/* ── Accordion ────────────────────────────────────────────── */

details summary {
  position: relative;
  padding-right: 2.5rem;
}

details summary::after {
  content: "";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.25s ease;
}

details[open] summary::after {
  transform: translateY(-35%) rotate(-135deg);
}

/* ── Mobile menu ──────────────────────────────────────────── */

#mobileMenu {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease;
}
#mobileMenu.is-open { opacity: 1; }

/* ── Focus ring ────────────────────────────────────────────── */

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

/* ── Section divider ──────────────────────────────────────── */

.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* ── Text utilities ───────────────────────────────────────── */

.text-balance { text-wrap: balance; }

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 640px) {
  .showcase-browser-bar { padding: 0.55rem 0.75rem; }
  .showcase-shot { padding: 0.4rem; }
}
