/* ==========================================================
   ACENTEDESTEK V2 — PREMIUM DESIGN TOKENS
   Inspired by: Linear, Vercel, Stripe, Raycast
   A design system built for a serious tech company.
   ========================================================== */

/* ===== LIGHT MODE ===== */
:root {
  /* — Brand — */
  --ads-primary: #059669;
  --ads-primary-hover: #047857;
  --ads-primary-active: #065f46;
  --ads-primary-light: rgba(5, 150, 105, 0.08);
  --ads-primary-lighter: rgba(5, 150, 105, 0.04);
  --ads-primary-glow: rgba(5, 150, 105, 0.22);
  --ads-accent: #0d9488;
  --ads-accent-hover: #0f766e;
  --ads-accent-light: rgba(13, 148, 136, 0.08);

  /* — Semantic — */
  --ads-success: #10b981;
  --ads-success-bg: rgba(16, 185, 129, 0.08);
  --ads-success-border: rgba(16, 185, 129, 0.2);
  --ads-danger: #ef4444;
  --ads-danger-bg: rgba(239, 68, 68, 0.08);
  --ads-danger-border: rgba(239, 68, 68, 0.2);
  --ads-warning: #f59e0b;
  --ads-warning-bg: rgba(245, 158, 11, 0.08);
  --ads-warning-border: rgba(245, 158, 11, 0.2);
  --ads-info: #3b82f6;
  --ads-info-bg: rgba(59, 130, 246, 0.08);
  --ads-info-border: rgba(59, 130, 246, 0.2);

  /* — Surface — */
  --ads-bg: #f1f5f9;
  --ads-bg-alt: #e2e8f0;
  --ads-bg-subtle: #f8fafc;
  --ads-surface: #ffffff;
  --ads-surface-raised: #ffffff;
  --ads-surface-glass: rgba(255, 255, 255, 0.82);
  --ads-overlay: rgba(15, 15, 35, 0.5);
  --ads-backdrop: saturate(180%) blur(20px);

  /* — Text — */
  --ads-text: #0f172a;
  --ads-text-secondary: #334155;
  --ads-text-muted: #64748b;
  --ads-text-disabled: #94a3b8;
  --ads-text-inverse: #ffffff;
  --ads-text-gradient: linear-gradient(135deg, #059669, #0d9488);

  /* — Border — */
  --ads-border: rgba(15, 23, 42, 0.07);
  --ads-border-strong: rgba(15, 23, 42, 0.13);
  --ads-border-focus: #059669;
  --ads-border-subtle: rgba(15, 23, 42, 0.03);

  /* — Typography — */
  --ads-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ads-font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --ads-font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --ads-text-xs: 0.6875rem;
  --ads-text-sm: 0.8125rem;
  --ads-text-base: 0.875rem;
  --ads-text-md: 0.9375rem;
  --ads-text-lg: 1.125rem;
  --ads-text-xl: 1.375rem;
  --ads-text-2xl: 1.75rem;
  --ads-text-3xl: 2.25rem;
  --ads-text-4xl: 3rem;
  --ads-lh: 1.6;
  --ads-lh-tight: 1.15;
  --ads-lh-snug: 1.35;

  /* — Spacing (4px base) — */
  --ads-sp-0: 0;
  --ads-sp-px: 1px;
  --ads-sp-0\.5: 2px;
  --ads-sp-1: 4px;
  --ads-sp-1\.5: 6px;
  --ads-sp-2: 8px;
  --ads-sp-2\.5: 10px;
  --ads-sp-3: 12px;
  --ads-sp-4: 16px;
  --ads-sp-5: 20px;
  --ads-sp-6: 24px;
  --ads-sp-8: 32px;
  --ads-sp-10: 40px;
  --ads-sp-12: 48px;
  --ads-sp-16: 64px;
  --ads-sp-20: 80px;

  /* — Radius — */
  --ads-radius-xs: 4px;
  --ads-radius-sm: 6px;
  --ads-radius: 8px;
  --ads-radius-lg: 12px;
  --ads-radius-xl: 16px;
  --ads-radius-2xl: 20px;
  --ads-radius-3xl: 24px;
  --ads-radius-full: 9999px;

  /* — Shadows (layered, tinted) — */
  --ads-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --ads-shadow-sm:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 2px 4px rgba(0, 0, 0, 0.02);
  --ads-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.03),
    0 1px 2px rgba(0, 0, 0, 0.02);
  --ads-shadow-md:
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.06);
  --ads-shadow-lg:
    0 4px 8px rgba(0, 0, 0, 0.04),
    0 16px 48px rgba(0, 0, 0, 0.08);
  --ads-shadow-xl:
    0 8px 16px rgba(0, 0, 0, 0.06),
    0 32px 80px rgba(0, 0, 0, 0.12);
  --ads-shadow-primary:
    0 4px 14px rgba(99, 102, 241, 0.25),
    0 1px 3px rgba(99, 102, 241, 0.12);
  --ads-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.06);
  --ads-ring-focus: 0 0 0 3px var(--ads-primary-glow);

  /* — Transitions — */
  --ads-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ads-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ads-ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ads-ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ads-dur-instant: 80ms;
  --ads-dur-fast: 150ms;
  --ads-dur: 200ms;
  --ads-dur-slow: 350ms;
  --ads-dur-slower: 500ms;

  /* — Z-index — */
  --ads-z-base: 1;
  --ads-z-dropdown: 100;
  --ads-z-sticky: 200;
  --ads-z-overlay: 300;
  --ads-z-modal: 400;
  --ads-z-popover: 500;
  --ads-z-toast: 600;
  --ads-z-max: 9999;

  /* — Layout — */
  --ads-sidebar-w: 256px;
  --ads-sidebar-collapsed-w: 68px;
  --ads-topbar-h: 56px;
  --ads-content-max: 1440px;

  /* — Sidebar — */
  --ads-sidebar-bg: #1e293b;
  --ads-sidebar-text: rgba(255, 255, 255, 0.55);
  --ads-sidebar-text-active: #ffffff;
  --ads-sidebar-hover: rgba(255, 255, 255, 0.06);
  --ads-sidebar-active: rgba(5, 150, 105, 0.18);
  --ads-sidebar-accent: #34d399;
  --ads-sidebar-border: rgba(255, 255, 255, 0.07);
  --ads-sidebar-gradient: linear-gradient(180deg, #1e293b 0%, #162032 100%);
}

/* ===== DARK MODE ===== */
.theme-dark,
[data-theme="dark"] {
  --ads-primary: #34d399;
  --ads-primary-hover: #6ee7b7;
  --ads-primary-active: #a7f3d0;
  --ads-primary-light: rgba(52, 211, 153, 0.1);
  --ads-primary-lighter: rgba(52, 211, 153, 0.05);
  --ads-primary-glow: rgba(52, 211, 153, 0.2);
  --ads-accent: #2dd4bf;
  --ads-accent-hover: #5eead4;
  --ads-accent-light: rgba(45, 212, 191, 0.1);

  --ads-success: #34d399;
  --ads-success-bg: rgba(52, 211, 153, 0.1);
  --ads-success-border: rgba(52, 211, 153, 0.2);
  --ads-danger: #f87171;
  --ads-danger-bg: rgba(248, 113, 113, 0.1);
  --ads-danger-border: rgba(248, 113, 113, 0.2);
  --ads-warning: #fbbf24;
  --ads-warning-bg: rgba(251, 191, 36, 0.1);
  --ads-warning-border: rgba(251, 191, 36, 0.2);
  --ads-info: #60a5fa;
  --ads-info-bg: rgba(96, 165, 250, 0.1);
  --ads-info-border: rgba(96, 165, 250, 0.2);

  --ads-bg: #0d1520;
  --ads-bg-alt: #132030;
  --ads-bg-subtle: #0f1a28;
  --ads-surface: #162032;
  --ads-surface-raised: #1e293b;
  --ads-surface-glass: rgba(22, 32, 50, 0.85);
  --ads-overlay: rgba(0, 0, 0, 0.65);

  --ads-text: #f1f5f9;
  --ads-text-secondary: #94a3b8;
  --ads-text-muted: #64748b;
  --ads-text-disabled: #475569;
  --ads-text-inverse: #0f172a;

  --ads-border: rgba(255, 255, 255, 0.07);
  --ads-border-strong: rgba(255, 255, 255, 0.12);
  --ads-border-focus: #34d399;
  --ads-border-subtle: rgba(255, 255, 255, 0.03);

  --ads-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --ads-shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.35);
  --ads-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  --ads-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --ads-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
  --ads-shadow-xl: 0 32px 80px rgba(0, 0, 0, 0.7);
  --ads-shadow-primary:
    0 4px 14px rgba(129, 140, 248, 0.2),
    0 1px 3px rgba(129, 140, 248, 0.1);
  --ads-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.3);

  --ads-sidebar-bg: #0d1520;
  --ads-sidebar-gradient: linear-gradient(180deg, #0d1520 0%, #0f1a28 100%);
  --ads-sidebar-text: rgba(255, 255, 255, 0.45);
  --ads-sidebar-border: rgba(255, 255, 255, 0.04);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  height: 100%;
  font-family: var(--ads-font);
  font-size: var(--ads-text-base);
  line-height: var(--ads-lh);
  color: var(--ads-text);
  background: var(--ads-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ===== KEYFRAMES ===== */
@keyframes adsFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes adsFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes adsFadeDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes adsScaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes adsSlideRight {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes adsPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}
@keyframes adsSkeleton {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes adsSpin {
  to { transform: rotate(360deg); }
}
@keyframes adsGlow {
  0%, 100% { box-shadow: 0 0 20px var(--ads-primary-glow); }
  50%      { box-shadow: 0 0 40px var(--ads-primary-glow), 0 0 60px rgba(99, 102, 241, 0.1); }
}
@keyframes adsGradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes adsFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
