/* MailerBot — Design System Styles
   Linear/Modern dark theme with ambient lighting
   ─────────────────────────────────────────────── */

/* ── Design Tokens ──────────────────────────────── */
:root {
  --bg-deep: #020203;
  --bg-base: #050506;
  --bg-elevated: #0a0a0c;
  --surface: rgba(255,255,255,0.05);
  --surface-hover: rgba(255,255,255,0.08);
  --fg: #EDEDEF;
  --fg-muted: #8A8F98;
  --fg-subtle: rgba(255,255,255,0.60);
  --accent: #2563EB;
  --accent-bright: #3B82F6;
  --accent-glow: rgba(37,99,235,0.3);
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.10);
  --border-accent: rgba(37,99,235,0.30);
  --expo-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Scroll Progress Bar ──────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #60A5FA, var(--accent));
  z-index: 9990;
  transform-origin: left;
  box-shadow: 0 0 10px rgba(37,99,235,0.5), 0 0 30px rgba(37,99,235,0.2);
}

/* ── Ambient Cursor Glow ──────────────────────── */
.cursor-glow {
  position: fixed;
  width: 600px; height: 600px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, rgba(37,99,235,0.06) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  will-change: transform;
  filter: blur(40px);
}

/* ── Scroll Gradient Shift ────────────────────── */
.gradient-shift {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
  background: radial-gradient(
    ellipse 120% 60% at 50% 40%,
    rgba(37, 99, 235, 0.15) 0%,
    transparent 70%
  );
  will-change: filter;
  filter: hue-rotate(0deg);
}

/* ── Marquee Strip ────────────────────────────── */
.marquee-strip {
  overflow: hidden;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.01);
  position: relative;
}

.marquee-strip::before,
.marquee-strip::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}

.marquee-strip::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-base), transparent);
}

.marquee-strip::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg-base), transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 32px;
  white-space: nowrap;
  animation: marquee-scroll 30s linear infinite;
  width: max-content;
}

.marquee-item {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.marquee-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent-bright);
  opacity: 0.6;
  flex-shrink: 0;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Base ───────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Noise Texture Overlay ──────────────────────── */
.noise-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.03;
  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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Dark Glass Navigation (Landing) ────────────── */
.glass-nav-dark {
  background: rgba(5,5,6,0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}

.glass-nav-dark.scrolled {
  background: rgba(5,5,6,0.92);
  border-bottom-color: var(--border-hover);
}

/* ── Glass Navigation (Docs) ────────────────────── */
.glass-nav {
  background: rgba(5, 5, 6, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.3s, border-color 0.3s;
}

.glass-nav.scrolled {
  background: rgba(5, 5, 6, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.10);
}

.glass-nav.dark {
  background: rgba(15, 23, 42, 0.85);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.glass-nav.dark.scrolled {
  background: rgba(15, 23, 42, 0.97);
}

/* ── Hero Grid Canvas ───────────────────────────── */
#hero-grid-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ── Ambient Blobs ──────────────────────────────── */
.blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

.blob-1 {
  width: 900px;
  height: 1400px;
  background: radial-gradient(ellipse, rgba(37,99,235,0.2) 0%, transparent 70%);
  top: -400px;
  left: 50%;
  transform: translateX(-50%);
  filter: blur(150px);
  animation: float-blob-1 10s ease-in-out infinite;
}

.blob-2 {
  width: 600px;
  height: 800px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.12) 0%, transparent 70%);
  top: 10%;
  left: -200px;
  filter: blur(120px);
  animation: float-blob-2 8s ease-in-out infinite;
}

.blob-3 {
  width: 500px;
  height: 700px;
  background: radial-gradient(ellipse, rgba(59,130,246,0.10) 0%, transparent 70%);
  top: 30%;
  right: -200px;
  filter: blur(100px);
  animation: float-blob-3 9s ease-in-out infinite;
}

@keyframes float-blob-1 {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
  50%      { transform: translateX(-50%) translateY(-20px) rotate(1deg); }
}

@keyframes float-blob-2 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-15px) rotate(-1deg); }
}

@keyframes float-blob-3 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-18px) rotate(1deg); }
}

/* ── Floating Postcards ─────────────────────────── */
/* Positioned absolutely within the hero section,    */
/* flanking the centered text on left and right.     */

.hero-postcards {
  perspective: 1200px;
}

.postcard-wrap {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  transform-style: preserve-3d;
}

.postcard-wrap img {
  display: block;
  width: 100%;
  border-radius: 6px;
  background: #ffffff;
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.6),
    0 8px 20px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255,255,255,0.06);
}

/* ── Clustered collage inside container ── */
/* Top row — pushed down */
.postcard-wrap-1 {
  width: 250px;
  top: 40px;
  right: 20px;
  z-index: 8;
}

.postcard-wrap-4 {
  width: 220px;
  top: 50px;
  left: 10px;
  z-index: 3;
}

/* Middle row */
.postcard-wrap-2 {
  width: 240px;
  top: 230px;
  left: -20px;
  z-index: 7;
}

.postcard-wrap-7 {
  width: 210px;
  top: 210px;
  left: 150px;
  z-index: 5;
}

.postcard-wrap-6 {
  width: 250px;
  top: 250px;
  right: -10px;
  z-index: 4;
}

/* Bottom row */
.postcard-wrap-5 {
  width: 230px;
  bottom: 0;
  left: 30px;
  z-index: 2;
}

.postcard-wrap-3 {
  width: 250px;
  bottom: -10px;
  right: 30px;
  z-index: 6;
}

/* Scale down on smaller large screens */
@media (min-width: 1024px) and (max-width: 1280px) {
  .postcard-wrap { transform-origin: center; }
  .hero-postcards { height: 360px !important; }
  .postcard-wrap img { transform: scale(0.8); }
}

/* ── Glass Cards ────────────────────────────────── */
.glass-card {
  background: linear-gradient(to bottom, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 2px 20px rgba(0,0,0,0.4),
    0 0 40px rgba(0,0,0,0.2);
  transition: all 0.3s var(--expo-out);
}

.glass-card:hover {
  border-color: var(--border-hover);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.1),
    0 8px 40px rgba(0,0,0,0.5),
    0 0 80px rgba(37,99,235,0.08);
  transform: translateY(-4px);
}

/* Inner top-edge highlight */
.glass-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  border-radius: 16px 16px 0 0;
  pointer-events: none;
}

/* ── Spotlight Effect (mouse-tracking glow) ─────── */
.spotlight-card {
  position: relative;
  overflow: hidden;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    300px circle at var(--mx, 50%) var(--my, 50%),
    rgba(37,99,235,0.12),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.spotlight-card:hover::before {
  opacity: 1;
}

/* ── Buttons ────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s var(--expo-out);
  box-shadow:
    0 0 0 1px rgba(37,99,235,0.5),
    0 4px 12px rgba(37,99,235,0.3),
    inset 0 1px 0 0 rgba(255,255,255,0.2);
}

.btn-primary:hover {
  background: var(--accent-bright);
  box-shadow:
    0 0 0 1px rgba(59,130,246,0.6),
    0 8px 24px rgba(37,99,235,0.5),
    0 0 40px rgba(37,99,235,0.35),
    inset 0 1px 0 0 rgba(255,255,255,0.2);
}

.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  color: var(--fg);
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all 0.2s var(--expo-out);
  box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.1);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  box-shadow:
    inset 0 1px 0 0 rgba(255,255,255,0.1),
    0 0 20px rgba(255,255,255,0.06),
    0 4px 16px rgba(0,0,0,0.3);
}

.btn-secondary:active { transform: scale(0.98); }

/* ── Section Divider ────────────────────────────── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

/* ── GSAP Initial States (hidden until animated) ── */
.hero-badge,
.hero-line,
.hero-sub,
.hero-cta { opacity: 0; }

.hero-line { overflow: visible; display: inline-block; padding-bottom: 0.1em; }
.hero-line-inner {
  display: inline-block;
  transform: translateY(110%);
  padding-bottom: 0.15em;
}

.postcard-wrap { opacity: 0; }

#features .grid {
  perspective: 1000px;
}

.stat-card,
.feature-card,
.step-card,
.pricing-card,
.api-text,
.api-code-block,
.section-header,
.cta-buttons,
.footer-grid,
.footer-bottom { opacity: 0; }

/* Lenis smooth scroll */
html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

/* ── Shimmer Text Animation ─────────────────────── */
@keyframes shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

.animate-shimmer {
  background-size: 200% auto;
  animation: shimmer 8s linear infinite;
}

/* ── Step Connector ─────────────────────────────── */
.step-card {
  position: relative;
}

.step-connector-line {
  display: none;
}

@media (min-width: 768px) {
  .step-connector-line {
    display: block;
    position: absolute;
    top: 28px;
    left: calc(100% + 4px);
    width: calc(100% - 48px);
    height: 2px;
    background: linear-gradient(90deg, rgba(37,99,235,0.4), rgba(37,99,235,0.05));
  }
}

/* ── Pricing Card Accent Border ─────────────────── */
.pricing-popular {
  border-color: var(--border-accent) !important;
  box-shadow:
    0 0 0 1px rgba(37,99,235,0.3),
    0 2px 20px rgba(0,0,0,0.4),
    0 0 60px rgba(37,99,235,0.1) !important;
}

.pricing-popular:hover {
  box-shadow:
    0 0 0 1px rgba(37,99,235,0.5),
    0 8px 40px rgba(0,0,0,0.5),
    0 0 100px rgba(37,99,235,0.15) !important;
}

/* ── Code Blocks (shared landing + docs) ────────── */
.code-block {
  background: var(--bg-elevated);
  border-radius: 12px;
  overflow: hidden;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid var(--border);
}

.code-block pre {
  padding: 20px 24px;
  overflow-x: auto;
  margin: 0;
  color: #E2E8F0;
}

.code-block .code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--fg-muted);
}

/* Syntax tokens */
.t-kw     { color: #C084FC; }
.t-str    { color: #34D399; }
.t-num    { color: #FBBF24; }
.t-prop   { color: #60A5FA; }
.t-cmt    { color: #64748B; font-style: italic; }
.t-punc   { color: #94A3B8; }
.t-method { color: #F472B6; }
.t-url    { color: #38BDF8; }

/* Copy button */
.copy-btn {
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--fg-muted);
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: all 0.2s;
}

.copy-btn:hover {
  color: var(--fg);
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--surface);
}

.copy-btn.copied {
  color: #34D399;
  border-color: #34D399;
}

/* ── Mobile Menu ────────────────────────────────── */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--expo-out);
  background: rgba(5,5,6,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.mobile-menu.open {
  max-height: 400px;
}

/* ── CTA Ambient Glow ───────────────────────────── */
.cta-glow {
  position: relative;
}

.cta-glow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(37,99,235,0.15), transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

/* ══════════════════════════════════════════════════
   API Docs — Preserved styles
   ══════════════════════════════════════════════════ */

/* Method Badges */
.method-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  letter-spacing: 0.5px;
  min-width: 56px;
  justify-content: center;
}

.method-get    { background: rgba(34, 197, 94, 0.15); color: #4ADE80; }
.method-post   { background: rgba(59, 130, 246, 0.15); color: #60A5FA; }
.method-put    { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }
.method-delete { background: rgba(239, 68, 68, 0.15); color: #F87171; }

.method-get.dark    { background: rgba(34, 197, 94, 0.15); color: #4ADE80; }
.method-post.dark   { background: rgba(59, 130, 246, 0.15); color: #60A5FA; }
.method-put.dark    { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }
.method-delete.dark { background: rgba(239, 68, 68, 0.15); color: #F87171; }

/* Auth badge */
.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.auth-jwt     { background: rgba(245, 158, 11, 0.12); color: #FBBF24; }
.auth-api-key { background: rgba(99, 102, 241, 0.12); color: #818CF8; }
.auth-public  { background: rgba(34, 197, 94, 0.12); color: #4ADE80; }

/* Docs Sidebar */
.docs-sidebar {
  position: sticky;
  top: 73px;
  height: calc(100vh - 73px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}

.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-track { background: transparent; }
.docs-sidebar::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }

.sidebar-group-header {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}

.sidebar-group-header:hover { color: #2563EB; }

.sidebar-group-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.sidebar-group.open .sidebar-group-items { max-height: 600px; }
.sidebar-group.open .sidebar-chevron { transform: rotate(90deg); }
.sidebar-chevron { transition: transform 0.2s ease; }

.sidebar-link {
  display: block;
  padding: 4px 12px 4px 24px;
  font-size: 13px;
  color: #8A8F98;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all 0.15s;
}

.sidebar-link:hover {
  color: #EDEDEF;
  background: rgba(37, 99, 235, 0.06);
}

.sidebar-link.active {
  color: #3B82F6;
  border-left-color: #2563EB;
  background: rgba(37, 99, 235, 0.08);
  font-weight: 500;
}

/* Endpoint Sections */
.endpoint-section {
  border-color: rgba(255, 255, 255, 0.06);
}

.endpoint-header {
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 8px;
}

.endpoint-header:hover { background: rgba(255, 255, 255, 0.03); }

.endpoint-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.endpoint-section.open .endpoint-details { max-height: 3000px; }
.endpoint-section.open .endpoint-chevron { transform: rotate(180deg); }
.endpoint-chevron { transition: transform 0.25s ease; }

/* Schema table */
.schema-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.schema-table th { text-align: left; padding: 8px 12px; background: rgba(255, 255, 255, 0.03); border-bottom: 1px solid rgba(255, 255, 255, 0.06); font-weight: 600; color: #8A8F98; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.schema-table td { padding: 8px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); color: #EDEDEF; }
.schema-table .field-name { font-family: 'JetBrains Mono', monospace; color: #60A5FA; font-size: 12px; }
.schema-table .field-type { font-family: 'JetBrains Mono', monospace; color: #A78BFA; font-size: 12px; }
.schema-table .field-required { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 3px; }

/* Code Tabs */
.code-tabs { display: flex; gap: 0; border-bottom: 1px solid #334155; }
.code-tab { padding: 8px 16px; font-size: 12px; font-weight: 500; color: #64748B; cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.15s; background: none; border-top: none; border-left: none; border-right: none; }
.code-tab:hover { color: #CBD5E1; }
.code-tab.active { color: #E2E8F0; border-bottom-color: #2563EB; }
.code-panel { display: none; }
.code-panel.active { display: block; }

/* Docs Search */
.docs-search { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 8px; padding: 8px 12px 8px 36px; font-size: 13px; width: 100%; outline: none; transition: border-color 0.2s, box-shadow 0.2s; color: #EDEDEF; }
.docs-search::placeholder { color: #8A8F98; }
.docs-search:focus { border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }

/* Docs Mobile Sidebar */
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 40; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.sidebar-overlay.open { opacity: 1; pointer-events: auto; }
.sidebar-drawer { position: fixed; top: 0; left: 0; bottom: 0; width: 280px; background: #0a0a0c; z-index: 50; transform: translateX(-100%); transition: transform 0.3s ease; overflow-y: auto; }
.sidebar-drawer.open { transform: translateX(0); }

/* ══════════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .step-connector-line { display: none; }
}

/* ── Drag-and-Drop Demo Animation ──────────────── */
.drag-demo-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 200px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
}

.drag-demo-el {
  position: absolute;
  border-radius: 6px;
}

/* Static image placeholder */
.drag-demo-img {
  width: 72px;
  height: 52px;
  top: 20px;
  left: 20px;
  background: linear-gradient(135deg, rgba(37,99,235,0.25), rgba(96,165,250,0.15));
  border: 1px solid rgba(37,99,235,0.3);
}

.drag-demo-img::after {
  content: '';
  position: absolute;
  inset: 6px;
  background: linear-gradient(135deg, rgba(37,99,235,0.15), rgba(96,165,250,0.1));
  border-radius: 3px;
}

/* Static text block */
.drag-demo-text {
  top: 20px;
  left: 108px;
  width: 100px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
}

.drag-demo-text-line {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.12);
}

/* Static QR code placeholder */
.drag-demo-qr {
  width: 36px;
  height: 36px;
  bottom: 20px;
  left: 20px;
  background:
    linear-gradient(to right, rgba(255,255,255,0.1) 33%, transparent 33%, transparent 66%, rgba(255,255,255,0.1) 66%),
    linear-gradient(to bottom, rgba(255,255,255,0.1) 33%, transparent 33%, transparent 66%, rgba(255,255,255,0.1) 66%);
  background-size: 12px 12px;
  border: 1px solid rgba(255,255,255,0.08);
}

/* The element being dragged */
.drag-demo-dragged {
  width: 52px;
  height: 42px;
  background: rgba(37,99,235,0.15);
  border: 1.5px dashed rgba(59,130,246,0.5);
  box-shadow: 0 4px 16px rgba(37,99,235,0.2);
  animation: drag-element 4s ease-in-out infinite;
}

/* Mouse cursor */
.drag-demo-cursor {
  position: absolute;
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  animation: drag-cursor 4s ease-in-out infinite;
  z-index: 10;
}

/* Cursor: approach, click, drag, release, retreat */
@keyframes drag-cursor {
  0%       { top: 75%; left: 35%; opacity: 1; transform: scale(1); }
  10%      { top: 55%; left: 50%; opacity: 1; transform: scale(1); }
  15%      { top: 55%; left: 50%; transform: scale(0.85); }
  20%      { top: 55%; left: 50%; transform: scale(0.85); }
  65%      { top: 30%; left: 75%; transform: scale(0.85); }
  70%      { top: 30%; left: 75%; transform: scale(1); }
  85%      { top: 55%; left: 60%; opacity: 1; transform: scale(1); }
  100%     { top: 75%; left: 35%; opacity: 1; transform: scale(1); }
}

/* Dragged element follows cursor */
@keyframes drag-element {
  0%       { top: 58%; left: 42%; opacity: 0.6; }
  10%      { top: 58%; left: 42%; opacity: 0.6; }
  15%      { top: 58%; left: 42%; opacity: 1; border-color: rgba(59,130,246,0.8); box-shadow: 0 6px 24px rgba(37,99,235,0.35); }
  20%      { top: 58%; left: 42%; opacity: 1; }
  65%      { top: 32%; left: 68%; opacity: 1; box-shadow: 0 6px 24px rgba(37,99,235,0.35); }
  70%      { top: 32%; left: 68%; opacity: 0.8; border-color: rgba(59,130,246,0.5); box-shadow: 0 4px 16px rgba(37,99,235,0.2); }
  85%      { top: 32%; left: 68%; opacity: 0.6; }
  100%     { top: 58%; left: 42%; opacity: 0.6; }
}

/* ── Smart Contacts Animation ──────────────────── */
.anim-contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 4px;
  opacity: 0;
  transform: translateY(8px);
}

.anim-contact-row-1 { animation: contact-slide-in 3s ease-out infinite; }
.anim-contact-row-2 { animation: contact-slide-in 3s ease-out 0.3s infinite; }
.anim-contact-row-3 { animation: contact-slide-in 3s ease-out 0.6s infinite; }

@keyframes contact-slide-in {
  0%   { opacity: 0; transform: translateY(8px); }
  15%  { opacity: 1; transform: translateY(0); }
  70%  { opacity: 1; transform: translateY(0); }
  90%  { opacity: 0; transform: translateY(-4px); }
  100% { opacity: 0; transform: translateY(8px); }
}

.anim-contact-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(52,211,153,0.4), rgba(52,211,153,0.15));
  border: 1px solid rgba(52,211,153,0.3);
  flex-shrink: 0;
}

.anim-contact-name {
  height: 4px;
  width: 65%;
  border-radius: 2px;
  background: rgba(255,255,255,0.1);
}

.anim-contact-check {
  margin-left: auto;
  flex-shrink: 0;
  opacity: 0;
  animation: check-pop 3s ease-out infinite;
}
.anim-contact-row-1 .anim-contact-check { animation-delay: 0.5s; }
.anim-contact-row-2 .anim-contact-check { animation-delay: 0.8s; }
.anim-contact-row-3 .anim-contact-check { animation-delay: 1.1s; }

@keyframes check-pop {
  0%   { opacity: 0; transform: scale(0); }
  20%  { opacity: 0; transform: scale(0); }
  25%  { opacity: 1; transform: scale(1.2); }
  30%  { opacity: 1; transform: scale(1); }
  70%  { opacity: 1; transform: scale(1); }
  90%  { opacity: 0; }
  100% { opacity: 0; }
}

/* ── Merge Personalization Animation ───────────── */
.anim-merge-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  line-height: 1.8;
  white-space: nowrap;
}

.anim-merge-static {
  color: rgba(255,255,255,0.35);
}

.anim-merge-tag {
  position: relative;
  display: inline-block;
}

.anim-merge-placeholder,
.anim-merge-value {
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
}

.anim-merge-placeholder {
  color: #A78BFA;
  background: rgba(167,139,250,0.1);
  animation: merge-swap-out 4s ease-in-out infinite;
}

.anim-merge-value {
  position: absolute;
  left: 0;
  top: 0;
  color: #EDEDEF;
  background: rgba(167,139,250,0.15);
  animation: merge-swap-in 4s ease-in-out infinite;
}

.anim-merge-tag-2 .anim-merge-placeholder { animation-delay: 0.5s; }
.anim-merge-tag-2 .anim-merge-value { animation-delay: 0.5s; }

@keyframes merge-swap-out {
  0%   { opacity: 1; }
  25%  { opacity: 1; }
  35%  { opacity: 0; }
  75%  { opacity: 0; }
  85%  { opacity: 1; }
  100% { opacity: 1; }
}

@keyframes merge-swap-in {
  0%   { opacity: 0; transform: translateY(4px); }
  25%  { opacity: 0; transform: translateY(4px); }
  35%  { opacity: 1; transform: translateY(0); }
  75%  { opacity: 1; transform: translateY(0); }
  85%  { opacity: 0; transform: translateY(-4px); }
  100% { opacity: 0; transform: translateY(4px); }
}

/* ── Campaign Analytics Animation ──────────────── */
.anim-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 40px;
}

.anim-chart-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, rgba(245,158,11,0.3), rgba(245,158,11,0.6));
  animation: bar-grow 3s ease-in-out infinite;
}

.anim-chart-bar-1 { --bar-h: 45%; animation-delay: 0s; }
.anim-chart-bar-2 { --bar-h: 70%; animation-delay: 0.1s; }
.anim-chart-bar-3 { --bar-h: 55%; animation-delay: 0.2s; }
.anim-chart-bar-4 { --bar-h: 85%; animation-delay: 0.3s; }
.anim-chart-bar-5 { --bar-h: 60%; animation-delay: 0.4s; }
.anim-chart-bar-6 { --bar-h: 90%; animation-delay: 0.5s; }
.anim-chart-bar-7 { --bar-h: 100%; animation-delay: 0.6s; }

@keyframes bar-grow {
  0%   { height: 0; opacity: 0; }
  15%  { opacity: 1; }
  30%  { height: var(--bar-h); }
  70%  { height: var(--bar-h); opacity: 1; }
  90%  { height: 0; opacity: 0; }
  100% { height: 0; opacity: 0; }
}

/* ── QR Code Tracking Animation ────────────────── */
.anim-qr {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

/* Left: scrolling event feed */
.anim-qr-feed {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
  min-width: 0;
}

.anim-qr-event {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(6px);
}

.anim-qr-event-1 { animation: qr-event-pop 8s ease-out infinite; animation-delay: 0s; }
.anim-qr-event-2 { animation: qr-event-pop 8s ease-out infinite; animation-delay: 1s; }
.anim-qr-event-3 { animation: qr-event-pop 8s ease-out infinite; animation-delay: 2s; }
.anim-qr-event-4 { animation: qr-event-pop 8s ease-out infinite; animation-delay: 3.5s; }
.anim-qr-event-5 { animation: qr-event-pop 8s ease-out infinite; animation-delay: 5s; }
.anim-qr-event-6 { animation: qr-event-pop 8s ease-out infinite; animation-delay: 6s; }

@keyframes qr-event-pop {
  0%   { opacity: 0; transform: translateY(6px); }
  5%   { opacity: 1; transform: translateY(0); }
  20%  { opacity: 1; transform: translateY(0); }
  28%  { opacity: 0; transform: translateY(-4px); }
  100% { opacity: 0; transform: translateY(6px); }
}

.anim-qr-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #22D3EE;
  flex-shrink: 0;
  box-shadow: 0 0 4px rgba(34,211,238,0.5);
}

.anim-qr-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(34,211,238,0.7);
  white-space: nowrap;
}

/* Right: USA map */
.anim-usa-map {
  position: relative;
  flex: 1;
  min-width: 80px;
  max-width: 180px;
  aspect-ratio: 960 / 600;
}

.anim-usa-outline {
  width: 100%;
  height: 100%;
}

/* Scan ping dots on the map */
.anim-map-ping {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22D3EE;
  opacity: 0;
  transform: scale(0);
}

.anim-map-ping::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(34,211,238,0.4);
  opacity: 0;
}

.anim-map-ping-1 { animation: map-ping 8s ease-out infinite; animation-delay: 0s; }
.anim-map-ping-2 { animation: map-ping 8s ease-out infinite; animation-delay: 1s; }
.anim-map-ping-3 { animation: map-ping 8s ease-out infinite; animation-delay: 2s; }
.anim-map-ping-4 { animation: map-ping 8s ease-out infinite; animation-delay: 3.5s; }
.anim-map-ping-5 { animation: map-ping 8s ease-out infinite; animation-delay: 5s; }
.anim-map-ping-6 { animation: map-ping 8s ease-out infinite; animation-delay: 6s; }

.anim-map-ping-1::before { animation: map-ping-ring 8s ease-out infinite; animation-delay: 0s; }
.anim-map-ping-2::before { animation: map-ping-ring 8s ease-out infinite; animation-delay: 1s; }
.anim-map-ping-3::before { animation: map-ping-ring 8s ease-out infinite; animation-delay: 2s; }
.anim-map-ping-4::before { animation: map-ping-ring 8s ease-out infinite; animation-delay: 3.5s; }
.anim-map-ping-5::before { animation: map-ping-ring 8s ease-out infinite; animation-delay: 5s; }
.anim-map-ping-6::before { animation: map-ping-ring 8s ease-out infinite; animation-delay: 6s; }

@keyframes map-ping {
  0%   { opacity: 0; transform: scale(0); }
  3%   { opacity: 1; transform: scale(1.4); }
  6%   { transform: scale(1); }
  40%  { opacity: 1; }
  50%  { opacity: 0; transform: scale(1); }
  100% { opacity: 0; transform: scale(0); }
}

@keyframes map-ping-ring {
  0%   { opacity: 0; transform: scale(0.5); }
  3%   { opacity: 0.8; transform: scale(1); }
  15%  { opacity: 0; transform: scale(2.5); }
  100% { opacity: 0; }
}

/* ── Developer API Terminal Animation ──────────── */
.anim-terminal-window {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  overflow: hidden;
}

.anim-terminal-dots {
  display: flex;
  gap: 5px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.anim-terminal-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}

.anim-terminal-dots span:first-child { background: rgba(239,68,68,0.5); }
.anim-terminal-dots span:nth-child(2) { background: rgba(245,158,11,0.5); }
.anim-terminal-dots span:last-child { background: rgba(34,197,94,0.5); }

.anim-terminal-body {
  padding: 6px 8px 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
  overflow: hidden;
}

.anim-terminal-prompt {
  color: #34D399;
  margin-right: 6px;
}

.anim-terminal-cmd {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  animation: terminal-type 4s steps(28) infinite;
}

@keyframes terminal-type {
  0%   { width: 0; }
  5%   { width: 0; }
  40%  { width: 100%; }
  80%  { width: 100%; }
  90%  { width: 0; }
  100% { width: 0; }
}

.anim-terminal-cursor {
  display: inline-block;
  width: 6px;
  height: 12px;
  background: rgba(59,130,246,0.7);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: cursor-blink 0.8s step-end infinite;
}

@keyframes cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.anim-terminal-response {
  padding: 2px 8px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  opacity: 0;
  animation: terminal-response 4s ease infinite;
}

.anim-terminal-ok {
  color: #34D399;
}

@keyframes terminal-response {
  0%   { opacity: 0; }
  42%  { opacity: 0; }
  48%  { opacity: 1; }
  80%  { opacity: 1; }
  88%  { opacity: 0; }
  100% { opacity: 0; }
}

/* ── Reduced Motion ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none !important; }
  [data-animate] { opacity: 1; transform: none; transition: none; }
  .animate-shimmer { animation: none; }
  #hero-grid-canvas { display: none; }
  .cursor-glow { display: none; }
  .marquee-track { animation: none; }
  .drag-demo-cursor, .drag-demo-dragged { animation: none; }
  .anim-contact-row, .anim-contact-check { animation: none; opacity: 1; transform: none; }
  .anim-merge-placeholder, .anim-merge-value { animation: none; }
  .anim-chart-bar { animation: none; height: var(--bar-h); opacity: 1; }
  .anim-qr-event, .anim-map-ping { animation: none; opacity: 1; transform: none; }
  .anim-map-ping::before { animation: none; }
  .anim-terminal-cmd { animation: none; width: 100%; }
  .anim-terminal-cursor { animation: none; }
  .anim-terminal-response { animation: none; opacity: 1; }
}
