/* =========================================================================
   Reffstat — Affiliate Marketing Automation
   Mobile-first dark SaaS design system
   ========================================================================= */

:root {
  --bg: #070a17;
  --bg-soft: #0b1023;
  --surface: #0f1630;
  --surface-2: #141c3a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #eef1fb;
  --text-soft: #c3cae6;
  --text-muted: #8b93b5;
  --accent: #6366f1;
  --accent-2: #a855f7;
  --accent-3: #ec4899;
  --green: #10b981;
  --grad: linear-gradient(120deg, #6366f1, #a855f7 50%, #ec4899);
  --radius: 16px;
  --radius-sm: 10px;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --container: 1140px;
  --header-h: 68px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 600;
}
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
button { font-family: inherit; cursor: pointer; }

::selection { background: rgba(168, 85, 247, 0.35); color: #fff; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.site-main { min-height: 60vh; }

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 12px 30px -12px rgba(124, 58, 237, 0.7);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -14px rgba(124, 58, 237, 0.85); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 0.9rem 1.8rem; font-size: 1.05rem; }

/* =========================================================================
   Header / Navigation
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 10, 23, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background 0.25s ease, border-color 0.25s ease;
}
.site-header.is-scrolled { background: rgba(7, 10, 23, 0.92); border-color: var(--border-strong); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand-mark { display: inline-flex; filter: drop-shadow(0 6px 14px rgba(124, 58, 237, 0.5)); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--text); letter-spacing: -0.02em; }

.site-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 20px 1rem;
}
.site-nav.is-open { display: flex; }
.nav-link {
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-link.is-active { color: #fff; background: rgba(124, 58, 237, 0.18); }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }
.header-cta { display: none; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================================
   Language switcher
   ========================================================================= */
.lang-switcher { position: relative; }
.lang-current {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.lang-current:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--border-strong); }
.lang-current .caret { transition: transform 0.2s ease; }
.lang-switcher.is-open .caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 5;
}
.lang-switcher.is-open .lang-menu,
.lang-switcher:hover .lang-menu,
.lang-switcher:focus-within .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.lang-menu li a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 0.9rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-menu li a:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.lang-menu li a.is-active { color: #fff; background: rgba(124, 58, 237, 0.22); }

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  position: relative;
  padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(3rem, 8vw, 5rem);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(55% 45% at 18% 12%, rgba(99, 102, 241, 0.28), transparent 60%),
    radial-gradient(50% 40% at 82% 22%, rgba(236, 72, 153, 0.2), transparent 60%),
    radial-gradient(45% 45% at 50% 110%, rgba(16, 185, 129, 0.12), transparent 60%);
}
.hero-inner { position: relative; text-align: center; max-width: 820px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(124, 58, 237, 0.18);
  border: 1px solid rgba(124, 58, 237, 0.4);
  margin-bottom: 1.4rem;
}
.hero-title {
  font-size: clamp(2.1rem, 7vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5em;
  background: linear-gradient(180deg, #fff 30%, #c7cdf0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: clamp(1.02rem, 2.6vw, 1.22rem);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 1.8rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-bottom: 2.5rem; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 6vw, 4rem);
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 0.85rem; color: var(--text-muted); }

/* =========================================================================
   Sections
   ========================================================================= */
.section { padding: clamp(3rem, 8vw, 5rem) 0; }
.section-alt {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(2rem, 6vw, 3.5rem); }
.section-head h2 { font-size: clamp(1.6rem, 5vw, 2.3rem); letter-spacing: -0.02em; }
.section-head p { color: var(--text-muted); margin: 0; }
.section-foot { text-align: center; margin-top: clamp(1.75rem, 5vw, 2.75rem); }

/* =========================================================================
   Grids & cards
   ========================================================================= */
.grid { display: grid; gap: 1.25rem; }
.grid-features { grid-template-columns: 1fr; }
.grid-articles { grid-template-columns: 1fr; }
.grid-cats { grid-template-columns: 1fr 1fr; }

.feature-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.feature-card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.16);
  color: #c4b5fd;
  margin-bottom: 1rem;
}
.feature-card .icon svg { width: 24px; height: 24px; }
.feature-card h3 { font-size: 1.12rem; margin-bottom: 0.4em; }
.feature-card p { color: var(--text-muted); font-size: 0.94rem; margin: 0; }

/* Category cards */
.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.cat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.cat-card:hover::before { opacity: 0.12; }
.cat-name { position: relative; font-family: var(--font-display); font-weight: 600; color: var(--text); font-size: 0.98rem; }
.cat-count {
  position: relative;
  align-self: flex-start;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
}

/* Article cards */
.card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.card-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.16);
  border: 1px solid rgba(124, 58, 237, 0.35);
  transition: background 0.15s ease;
}
.chip:hover { background: rgba(124, 58, 237, 0.28); }
.card-time { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
.card-title { font-size: 1.18rem; line-height: 1.3; margin: 0; }
.card-title a { transition: color 0.15s ease; }
.card-title a:hover { color: #c4b5fd; }
.card-desc { color: var(--text-muted); font-size: 0.93rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: auto; }
.card-link { font-weight: 600; font-size: 0.9rem; color: #a78bfa; transition: color 0.15s ease; }
.card-link:hover { color: #c4b5fd; }
.card-date { font-size: 0.78rem; color: var(--text-muted); }

/* Steps */
.steps { display: grid; gap: 1.25rem; }
.step {
  position: relative;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  background: var(--grad);
  margin-bottom: 0.9rem;
}
.step h3 { font-size: 1.1rem; }
.step p { color: var(--text-muted); font-size: 0.94rem; margin: 0; }

/* CTA band */
.cta { padding: clamp(3rem, 8vw, 5rem) 0; }
.cta-inner {
  text-align: center;
  padding: clamp(2rem, 6vw, 3.5rem) clamp(1.25rem, 4vw, 3rem);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
}
.cta-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 80% at 50% 0%, rgba(124, 58, 237, 0.28), transparent 60%);
  pointer-events: none;
}
.cta-inner > * { position: relative; }
.cta-inner h2 { font-size: clamp(1.5rem, 5vw, 2.1rem); }
.cta-inner p { color: var(--text-muted); max-width: 560px; margin: 0 auto 1.6rem; }

/* =========================================================================
   Page hero & breadcrumbs (list / taxonomy / article)
   ========================================================================= */
.page-hero {
  padding: clamp(2.5rem, 7vw, 4.5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(99, 102, 241, 0.16), transparent 60%);
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}
.breadcrumbs a { color: var(--text-muted); transition: color 0.15s ease; }
.breadcrumbs a:hover { color: #c4b5fd; }
.page-title { font-size: clamp(1.8rem, 6vw, 2.8rem); letter-spacing: -0.02em; }
.page-subtitle { color: var(--text-muted); max-width: 640px; font-size: 1.05rem; }
.empty { color: var(--text-muted); text-align: center; padding: 2rem 0; }

/* =========================================================================
   Article
   ========================================================================= */
.post { padding: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(3rem, 8vw, 5rem); }
.post-inner { max-width: 760px; }
.post-header { margin-bottom: 1.5rem; }
.post-title { font-size: clamp(1.7rem, 6vw, 2.6rem); letter-spacing: -0.02em; margin-bottom: 0.6rem; }
.post-meta { display: flex; flex-direction: column; gap: 0.75rem; }
.post-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.post-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.post-meta-line .dot { color: var(--text-muted); }
.post-lede {
  font-size: 1.12rem;
  color: var(--text-soft);
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1.5rem;
}

/* Table of contents */
.toc {
  margin-bottom: 1.75rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.toc-title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}
.toc #TableOfContents ul { list-style: none; margin: 0; padding: 0; }
.toc #TableOfContents > ul > li { margin: 0.25rem 0; }
.toc #TableOfContents ul ul { padding-left: 1rem; margin-top: 0.2rem; }
.toc #TableOfContents a { color: var(--text-muted); font-size: 0.9rem; transition: color 0.15s ease; }
.toc #TableOfContents a:hover { color: #c4b5fd; }

/* Article typography */
.post-content { color: var(--text-soft); font-size: 1.03rem; }
.post-content h2 {
  font-size: 1.6rem;
  margin: 2rem 0 0.75rem;
  padding-top: 0.5rem;
  scroll-margin-top: calc(var(--header-h) + 12px);
}
.post-content h3 { font-size: 1.25rem; margin: 1.5rem 0 0.6rem; }
.post-content p { margin-bottom: 1.1rem; }
.post-content a { color: #a78bfa; text-decoration: underline; text-underline-offset: 2px; }
.post-content a:hover { color: #c4b5fd; }
.post-content ul, .post-content ol { padding-left: 1.4em; }
.post-content li { margin-bottom: 0.4rem; }
.post-content blockquote {
  margin: 1.4rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent-2);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
}
.post-content code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  font-size: 0.9em;
}
.post-content pre {
  background: #0b0f1f;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  overflow-x: auto;
}
.post-content pre code { background: transparent; padding: 0; }
.post-content img { border-radius: var(--radius); }
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* FAQ */
.faq { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.faq-title { font-size: 1.6rem; margin-bottom: 1rem; }
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.1rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-display);
  position: relative;
  padding-right: 3rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: #a78bfa;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-answer { padding: 0 1.1rem 1.1rem; color: var(--text-muted); font-size: 0.96rem; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 2.5rem;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.page-btn:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.page-btn.is-current { background: var(--grad); color: #fff; border-color: transparent; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: clamp(2.5rem, 6vw, 3.5rem) 20px;
}
.footer-brand .brand { margin-bottom: 0.8rem; }
.footer-tagline { color: var(--text-muted); font-size: 0.92rem; max-width: 320px; margin: 0; }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.45rem; }
.footer-col a { color: var(--text-soft); font-size: 0.92rem; transition: color 0.15s ease; }
.footer-col a:hover { color: #c4b5fd; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
}
.footer-bottom .container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-bottom p { margin: 0; color: var(--text-muted); font-size: 0.85rem; }
.footer-disclosure { max-width: 640px; }

/* =========================================================================
   404
   ========================================================================= */
.page-404 { display: flex; }
.notfound-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 3rem 20px; }
.notfound { text-align: center; max-width: 560px; }
.notfound-brand { justify-content: center; margin-bottom: 2rem; }
.notfound-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 16vw, 7rem);
  font-weight: 700;
  line-height: 1;
  margin: 0 0 0.25rem;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.notfound-title { font-size: clamp(1.5rem, 5vw, 2rem); }
.notfound-text { color: var(--text-muted); margin-bottom: 1.75rem; }
.notfound-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-bottom: 1.75rem; }
.notfound-langs { display: flex; flex-direction: column; gap: 0.4rem; color: var(--text-muted); font-size: 0.9rem; }
.notfound-langs a { color: #a78bfa; }
.notfound-langs a:hover { color: #c4b5fd; }

/* =========================================================================
   Reveal animations (only when JS is available)
   ========================================================================= */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================================
   Responsive breakpoints (mobile-first)
   ========================================================================= */
@media (min-width: 640px) {
  .grid-features { grid-template-columns: 1fr 1fr; }
  .grid-articles { grid-template-columns: 1fr 1fr; }
  .grid-cats { grid-template-columns: 1fr 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr 1fr; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .grid-features { grid-template-columns: repeat(3, 1fr); }
  .grid-articles { grid-template-columns: repeat(3, 1fr); }
  .grid-cats { grid-template-columns: repeat(4, 1fr); }
  .header-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .site-nav {
    display: flex;
    flex-direction: row;
    gap: 0.25rem;
    position: static;
    background: transparent;
    border: none;
    padding: 0;
  }
  .footer-inner { flex-direction: row; justify-content: space-between; }
  .footer-cols { min-width: 420px; }
}

@media (min-width: 1100px) {
  .post-inner { max-width: 800px; }
}

/* =========================================================================
   Reduced motion
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
}





