/* =========================================================
   AI TOOLS DIRECTORY — CORE STYLESHEET
   Design tokens, resets, base typography & layout primitives
   ========================================================= */

/* ---------- Design Tokens ---------- */
:root{
  /* Surfaces */
  --color-bg:#000000;
  --color-bg-alt:#0a0a0a;
  --color-surface-1:#111111;
  --color-surface-2:#171717;
  --color-surface-3:#202020;
  --color-border:rgba(255,255,255,0.08);
  --color-border-strong:rgba(255,255,255,0.14);

  /* Text */
  --color-text-primary:#f5f5f7;
  --color-text-secondary:#a1a1aa;
  --color-text-muted:#71717a;

  /* Accents */
  --accent-cyan:#00e5ff;
  --accent-violet:#7c3aed;
  --accent-blue:#3b82f6;
  --accent-gradient:linear-gradient(135deg,var(--accent-cyan) 0%,var(--accent-blue) 50%,var(--accent-violet) 100%);
  --accent-gradient-soft:linear-gradient(135deg,rgba(0,229,255,.15),rgba(124,58,237,.15));

  /* Glass */
  --glass-bg:rgba(255,255,255,0.04);
  --glass-bg-strong:rgba(255,255,255,0.06);
  --glass-border:rgba(255,255,255,0.10);
  --glass-blur:blur(16px);

  /* Typography */
  --font-display:'Poppins', 'Inter', system-ui, sans-serif;
  --font-body:'Inter', system-ui, -apple-system, sans-serif;
  --font-alt:'Manrope', 'Inter', sans-serif;

  /* Radii */
  --radius-sm:8px;
  --radius-md:14px;
  --radius-lg:20px;
  --radius-xl:28px;
  --radius-full:999px;

  /* Shadows */
  --shadow-sm:0 2px 8px rgba(0,0,0,.35);
  --shadow-md:0 8px 30px rgba(0,0,0,.45);
  --shadow-lg:0 20px 60px rgba(0,0,0,.55);
  --shadow-glow-cyan:0 0 40px rgba(0,229,255,.18);
  --shadow-glow-violet:0 0 40px rgba(124,58,237,.18);

  /* Layout */
  --container-max:1280px;
  --header-height:76px;
  --transition-fast:160ms cubic-bezier(.4,0,.2,1);
  --transition-base:280ms cubic-bezier(.4,0,.2,1);
  --transition-slow:480ms cubic-bezier(.4,0,.2,1);

  color-scheme: dark;
}

/* ---------- Reset ---------- */
*,*::before,*::after{ box-sizing:border-box; margin:0; padding:0; }
html{
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
}
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *,*::before,*::after{ animation-duration:0.01ms !important; animation-iteration-count:1 !important; transition-duration:0.01ms !important; scroll-behavior:auto !important; }
}
body{
  background:var(--color-bg);
  color:var(--color-text-primary);
  font-family:var(--font-body);
  line-height:1.6;
  min-height:100vh;
  overflow-x:hidden;
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(124,58,237,.16), transparent),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(0,229,255,.10), transparent);
  background-repeat:no-repeat;
  background-attachment:fixed;
}
img,svg,video,canvas{ display:block; max-width:100%; height:auto; }
a{ color:inherit; text-decoration:none; }
button,input,textarea,select{ font:inherit; color:inherit; }
button{ cursor:pointer; background:none; border:none; }
ul,ol{ list-style:none; }
h1,h2,h3,h4,h5,h6{ font-family:var(--font-display); font-weight:600; line-height:1.2; letter-spacing:-0.02em; }
::selection{ background:var(--accent-violet); color:#fff; }

/* Focus visibility for accessibility / keyboard nav */
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,[tabindex]:focus-visible{
  outline:2px solid var(--accent-cyan);
  outline-offset:3px;
  border-radius:4px;
}
.skip-link{
  position:absolute; left:-999px; top:0; background:var(--accent-cyan); color:#000;
  padding:.75rem 1.25rem; z-index:9999; border-radius:0 0 8px 0; font-weight:600;
}
.skip-link:focus{ left:0; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-track{ background:var(--color-bg); }
::-webkit-scrollbar-thumb{ background:var(--color-surface-3); border-radius:var(--radius-full); border:2px solid var(--color-bg); }
::-webkit-scrollbar-thumb:hover{ background:#333; }

/* ---------- Layout Helpers ---------- */
.container{
  width:100%;
  max-width:var(--container-max);
  margin-inline:auto;
  padding-inline:24px;
}
.section{ padding-block:88px; position:relative; }
.section--tight{ padding-block:56px; }
.grid{ display:grid; gap:24px; }
.flex{ display:flex; }
.flex-center{ display:flex; align-items:center; justify-content:center; }
.flex-between{ display:flex; align-items:center; justify-content:space-between; }
.text-center{ text-align:center; }
.text-gradient{
  background:var(--accent-gradient);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.text-muted{ color:var(--color-text-secondary); }
.mt-1{margin-top:8px;} .mt-2{margin-top:16px;} .mt-3{margin-top:24px;} .mt-4{margin-top:40px;}
.mb-1{margin-bottom:8px;} .mb-2{margin-bottom:16px;} .mb-3{margin-bottom:24px;} .mb-4{margin-bottom:40px;}
.hidden{ display:none !important; }
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* ---------- Section Heading ---------- */
.section-heading{ max-width:680px; margin-inline:auto; text-align:center; margin-bottom:48px; }
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--font-alt); font-size:.78rem; font-weight:700; letter-spacing:.14em;
  text-transform:uppercase; color:var(--accent-cyan);
  padding:6px 14px; border-radius:var(--radius-full);
  background:var(--accent-gradient-soft); border:1px solid var(--glass-border);
  margin-bottom:16px;
}
.section-heading h2{ font-size:clamp(1.75rem,3.4vw,2.6rem); margin-bottom:12px; }
.section-heading p{ color:var(--color-text-secondary); font-size:1.05rem; }

/* ---------- Typography scale ---------- */
h1{ font-size:clamp(2.2rem,5.6vw,4rem); }
h2{ font-size:clamp(1.7rem,3.4vw,2.4rem); }
h3{ font-size:clamp(1.25rem,2.2vw,1.6rem); }
p{ color:var(--color-text-secondary); }

/* ---------- Utility: Glass Card ---------- */
.glass{
  background:var(--glass-bg);
  border:1px solid var(--glass-border);
  backdrop-filter:var(--glass-blur);
  -webkit-backdrop-filter:var(--glass-blur);
  border-radius:var(--radius-lg);
}

/* ---------- Skeleton loading ---------- */
.skeleton{
  background:linear-gradient(90deg, var(--color-surface-1) 25%, var(--color-surface-2) 37%, var(--color-surface-1) 63%);
  background-size:400% 100%;
  animation:skeleton-loading 1.4s ease infinite;
  border-radius:var(--radius-md);
}
@keyframes skeleton-loading{ 0%{background-position:100% 50%;} 100%{background-position:0 50%;} }
