/* ============================================================
   SAASAF.AI - Main Stylesheet
   Dark-themed SaaS/AI tool marketplace
   ============================================================ */

/* ------------------------------------------------------------
   1. RESET & CSS VARIABLES
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ink: #0a0a0f;
  --ink2: #13131a;
  --card: #161622;
  --border: rgba(255, 255, 255, 0.07);
  --white: #ffffff;
  --off: #b0b0c8;
  --accent: #00f0a0;
  --accent2: #0af;
  --accent3: #f0f;
  --yellow: #ffe135;
  --red: #ff3c5f;
  --glow: rgba(0, 240, 160, 0.18);

  --font-heading: 'Bebas Neue', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 100px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ------------------------------------------------------------
   2. BODY
   ------------------------------------------------------------ */
body {
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  cursor: none;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ------------------------------------------------------------
   23. NOISE OVERLAY
   ------------------------------------------------------------ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ------------------------------------------------------------
   3. CUSTOM CURSOR
   ------------------------------------------------------------ */
.cursor {
  position: fixed;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
  mix-blend-mode: difference;
}

.cursor-ring {
  position: fixed;
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s, border-color 0.25s, opacity 0.25s;
  opacity: 0.5;
}

a:hover ~ .cursor,
button:hover ~ .cursor,
.cursor.hovering {
  width: 24px;
  height: 24px;
  background: var(--accent2);
}

a:hover ~ .cursor-ring,
button:hover ~ .cursor-ring,
.cursor-ring.hovering {
  width: 56px;
  height: 56px;
  border-color: var(--accent2);
  opacity: 0.3;
}

/* ------------------------------------------------------------
   4. NAVIGATION
   ------------------------------------------------------------ */
nav, .nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 2rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 15, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  color: var(--white);
  text-transform: uppercase;
}

.nav-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--off);
  transition: color var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  padding: 0.5rem 1.4rem;
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: var(--radius-pill);
  transition: background var(--transition), transform var(--transition);
}

.nav-cta:hover {
  background: var(--white);
  transform: translateY(-1px);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
  z-index: 1100;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(10, 10, 15, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--off);
  letter-spacing: 0.05em;
  transition: color var(--transition);
}

.mobile-menu a:hover {
  color: var(--accent);
}

/* ------------------------------------------------------------
   5. PAGE HERO SECTIONS
   ------------------------------------------------------------ */
.page-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10rem 2rem 5rem;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  color: var(--off);
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.page-title {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 7vw, 6rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1rem;
  max-width: 900px;
}

.page-title .accent {
  color: var(--accent);
}

.page-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--off);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1rem;
}

.section-body {
  font-size: 1.05rem;
  color: var(--off);
  max-width: 600px;
  line-height: 1.7;
}

section {
  padding: 5rem 2rem;
  position: relative;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

/* ------------------------------------------------------------
   6. BUTTONS
   ------------------------------------------------------------ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--accent);
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
  cursor: none;
}

.btn-primary:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 240, 160, 0.25);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  background: transparent;
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  cursor: none;
}

.btn-ghost:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.cta-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ------------------------------------------------------------
   7. CARDS
   ------------------------------------------------------------ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: rgba(0, 240, 160, 0.2);
  box-shadow: 0 0 40px var(--glow);
  transform: translateY(-4px);
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(0, 240, 160, 0.08);
  color: var(--accent);
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

.card h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
  color: var(--white);
}

.card p {
  color: var(--off);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ------------------------------------------------------------
   8. ORBS (Background Decorations)
   ------------------------------------------------------------ */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
  top: -200px;
  right: -150px;
  animation: drift1 14s ease-in-out infinite alternate;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 170, 255, 0.12) 0%, transparent 70%);
  bottom: -150px;
  left: -100px;
  animation: drift2 18s ease-in-out infinite alternate;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 0, 255, 0.08) 0%, transparent 70%);
  top: 40%;
  left: 50%;
  animation: drift1 20s ease-in-out infinite alternate-reverse;
}

/* ------------------------------------------------------------
   9. FOOTER
   ------------------------------------------------------------ */
footer {
  background: var(--ink2);
  border-top: 1px solid var(--border);
  padding: 4rem 2rem 2rem;
  position: relative;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-tagline {
  font-size: 0.9rem;
  color: var(--off);
  line-height: 1.6;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  font-size: 0.88rem;
  color: var(--off);
  margin-bottom: 0.6rem;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--off);
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

.footer-legal a {
  font-size: 0.82rem;
  color: var(--off);
  transition: color var(--transition);
}

.footer-legal a:hover {
  color: var(--white);
}

/* ------------------------------------------------------------
   10. GRID LAYOUTS
   ------------------------------------------------------------ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* ------------------------------------------------------------
   11. TOOL CARDS (Directory Listings)
   ------------------------------------------------------------ */
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  position: relative;
}

.tool-card:hover {
  border-color: rgba(0, 240, 160, 0.2);
  box-shadow: 0 0 40px var(--glow);
  transform: translateY(-3px);
}

.tool-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tool-card-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px;
  flex-shrink: 0;
}

.tool-card-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  letter-spacing: 0.03em;
  color: var(--white);
}

.tool-card-tagline {
  font-size: 0.9rem;
  color: var(--off);
  line-height: 1.55;
}

.tool-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.tool-card-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--yellow);
}

.tool-card-rating .count {
  color: var(--off);
  font-size: 0.8rem;
}

.affiliate-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.7rem;
  background: rgba(0, 240, 160, 0.1);
  border: 1px solid rgba(0, 240, 160, 0.3);
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ------------------------------------------------------------
   12. CATEGORY / DIRECTORY
   ------------------------------------------------------------ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.category-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}

.category-card:hover {
  border-color: rgba(0, 240, 160, 0.2);
  transform: translateY(-3px);
}

.category-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--white);
  margin-bottom: 0.4rem;
}

.category-count {
  font-size: 0.82rem;
  color: var(--off);
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 0.65rem 1rem;
  background: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}

.search-input::placeholder {
  color: rgba(176, 176, 200, 0.5);
}

.search-input:focus {
  border-color: var(--accent);
}

/* ------------------------------------------------------------
   13. COMPARISON TABLES
   ------------------------------------------------------------ */
.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.compare-header {
  background: var(--ink2);
}

.compare-header th {
  padding: 1rem 1.25rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.compare-row {
  transition: background var(--transition);
}

.compare-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.compare-row:not(:last-child) .compare-cell {
  border-bottom: 1px solid var(--border);
}

.compare-cell {
  padding: 0.9rem 1.25rem;
  font-size: 0.9rem;
  color: var(--off);
  vertical-align: middle;
}

.compare-cell:first-child {
  color: var(--white);
  font-weight: 600;
}

.compare-check {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 700;
}

.compare-x {
  color: var(--red);
  font-size: 1.1rem;
  font-weight: 700;
}

/* ------------------------------------------------------------
   14. ALTERNATIVES PAGE
   ------------------------------------------------------------ */
.alt-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.alt-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition);
}

.alt-item:hover {
  border-color: rgba(0, 240, 160, 0.2);
  transform: translateX(4px);
}

.alt-rank {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 240, 160, 0.08);
  border: 1px solid rgba(0, 240, 160, 0.2);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--accent);
  flex-shrink: 0;
}

.alt-details {
  flex: 1;
}

.alt-details h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 0.3rem;
}

.alt-details p {
  font-size: 0.9rem;
  color: var(--off);
  line-height: 1.55;
}

/* ------------------------------------------------------------
   15. TOOL PROFILE PAGE
   ------------------------------------------------------------ */
.tool-hero {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 8rem 2rem 3rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.tool-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.tool-main {
  min-width: 0;
}

.tool-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tool-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.tool-features-grid .feature-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

.tool-features-grid .feature-item h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 0.4rem;
}

.tool-features-grid .feature-item p {
  font-size: 0.85rem;
  color: var(--off);
}

.tool-pricing-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.5rem 0;
}

.tool-pricing-table th {
  padding: 0.9rem 1.25rem;
  background: var(--ink2);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.tool-pricing-table td {
  padding: 0.8rem 1.25rem;
  font-size: 0.9rem;
  color: var(--off);
  border-bottom: 1px solid var(--border);
}

.tool-pricing-table tr:last-child td {
  border-bottom: none;
}

.tool-cta-box {
  background: var(--card);
  border: 1px solid rgba(0, 240, 160, 0.2);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.tool-cta-box h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.tool-cta-box p {
  font-size: 0.9rem;
  color: var(--off);
  margin-bottom: 1.25rem;
}

.tool-integrations {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
}

.tool-integrations .integration-chip {
  padding: 0.35rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  color: var(--off);
}

/* ------------------------------------------------------------
   16. TAGS & BADGES
   ------------------------------------------------------------ */
.tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.06);
  color: var(--off);
  border: 1px solid var(--border);
}

.badge-free {
  background: rgba(0, 240, 160, 0.08);
  color: var(--accent);
  border-color: rgba(0, 240, 160, 0.2);
}

.badge-ai {
  background: rgba(0, 170, 255, 0.08);
  color: var(--accent2);
  border-color: rgba(0, 170, 255, 0.2);
}

.badge-affiliate {
  background: rgba(0, 240, 160, 0.06);
  color: var(--accent);
  border-color: rgba(0, 240, 160, 0.3);
}

.pricing-badge {
  background: rgba(255, 225, 53, 0.08);
  color: var(--yellow);
  border-color: rgba(255, 225, 53, 0.2);
}

/* ------------------------------------------------------------
   17. STATS BAR
   ------------------------------------------------------------ */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--accent);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--off);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

/* ------------------------------------------------------------
   18. INTERNAL LINKING
   ------------------------------------------------------------ */
.related-tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--off);
  padding: 1rem 0;
}

.breadcrumbs a {
  color: var(--off);
  transition: color var(--transition);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs .separator {
  color: rgba(176, 176, 200, 0.3);
}

.breadcrumbs .current {
  color: var(--white);
}

/* ------------------------------------------------------------
   19. FORMS
   ------------------------------------------------------------ */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input::placeholder,
textarea::placeholder {
  color: rgba(176, 176, 200, 0.4);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23b0b0c8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--off);
  margin-bottom: 0.4rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

button[type="submit"],
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-pill);
  transition: background var(--transition), transform var(--transition);
  cursor: none;
}

button[type="submit"]:hover,
.btn-submit:hover {
  background: var(--white);
  transform: translateY(-2px);
}

/* ------------------------------------------------------------
   20. UTILITY CLASSES
   ------------------------------------------------------------ */
.text-accent { color: var(--accent); }
.text-accent2 { color: var(--accent2); }
.text-accent3 { color: var(--accent3); }
.text-off { color: var(--off); }
.text-white { color: var(--white); }
.text-yellow { color: var(--yellow); }
.text-red { color: var(--red); }
.text-center { text-align: center; }
.text-left { text-align: left; }

.font-heading { font-family: var(--font-heading); }
.font-mono { font-family: var(--font-mono); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }
.mb-6 { margin-bottom: 4rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mt-6 { margin-top: 4rem; }

.mx-auto { margin-left: auto; margin-right: auto; }

.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;
}

.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.w-full { width: 100%; }
.max-w-narrow { max-width: 640px; }
.max-w-medium { max-width: 900px; }
.max-w-wide { max-width: var(--max-width); }

/* ------------------------------------------------------------
   21. RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-top {
    flex-direction: column;
  }

  .footer-cols {
    grid-template-columns: repeat(2, 1fr);
  }

  .tool-layout {
    grid-template-columns: 1fr;
  }

  .tool-sidebar {
    order: -1;
  }

  .tool-hero {
    flex-direction: column;
    padding-top: 6rem;
  }

  .tool-features-grid {
    grid-template-columns: 1fr;
  }

  .stats-bar {
    gap: 2rem;
  }

  .alt-item {
    flex-direction: column;
    text-align: center;
  }

  .compare-table {
    display: block;
    overflow-x: auto;
  }

  .page-hero {
    padding: 8rem 1.5rem 3rem;
    min-height: 50vh;
  }

  section {
    padding: 3rem 1.5rem;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-cols {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .cta-group {
    flex-direction: column;
    width: 100%;
  }

  .cta-group .btn-primary,
  .cta-group .btn-ghost {
    width: 100%;
    justify-content: center;
  }

  .page-title {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .section-title {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }

  nav, .nav {
    padding: 0 1rem;
  }

  .stats-bar {
    flex-direction: column;
    gap: 1.5rem;
  }

  .breadcrumbs {
    font-size: 0.75rem;
    flex-wrap: wrap;
  }

  body {
    cursor: auto;
  }

  .cursor,
  .cursor-ring {
    display: none;
  }
}

/* ------------------------------------------------------------
   22. ANIMATIONS
   ------------------------------------------------------------ */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

@keyframes drift1 {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(60px, 40px) scale(1.1);
  }
}

@keyframes drift2 {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-50px, -30px) scale(1.15);
  }
}

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

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

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation utility classes */
.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.slide-up {
  animation: slideUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Scroll reveal base state */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------------------------------------
   SELECTION & SCROLLBAR
   ------------------------------------------------------------ */
::selection {
  background: rgba(0, 240, 160, 0.25);
  color: var(--white);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--ink);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
}
