/* ================================================================
   STACKBUILT AI — DARK MODE EDITORIAL DESIGN SYSTEM
   ================================================================ */

/* ---- CSS Custom Properties for Animated Gradient ---- */
@property --gradient-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Brand Colors */
  --navy: #0A0A1A;
  --navy-deep: #06060F;
  --orange: #FF6B35;
  --orange-hover: #FF8555;
  --blue: #2563EB;
  --emerald: #10B981;
  --purple: #7C3AED;
  --magenta: #DB2777;
  --charcoal: #181838;
  --charcoal-light: #1E1E42;

  /* Glass */
  --glass-bg: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.06);
  --glass-hover: rgba(255,255,255,0.08);

  /* Text */
  --text-primary: rgba(255,255,255,0.85);
  --text-secondary: rgba(255,255,255,0.5);
  --text-tertiary: rgba(255,255,255,0.3);

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Sizing */
  --max-width: 1200px;
  --carousel-max: 1100px;
  --nav-height: 64px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Brand Gradient */
  --gradient-brand: linear-gradient(135deg, #7C3AED 0%, #DB2777 40%, #FF6B35 100%);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--navy);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* ---- Container ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* ---- Gradient Text ---- */
.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ================================================================
   READING PROGRESS BAR
   ================================================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--gradient-brand);
  z-index: 1000;
  transition: width 50ms linear;
}

/* ================================================================
   NOISE TEXTURE OVERLAY
   ================================================================ */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ================================================================
   ANIMATED BACKGROUND ORBS
   ================================================================ */
.orb-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
  animation: orbFloat 20s ease-in-out infinite;
}

.orb--blue {
  width: 600px;
  height: 600px;
  background: #2563EB;
  top: -10%;
  left: -5%;
  animation-delay: 0s;
  animation-duration: 25s;
}

.orb--green {
  width: 500px;
  height: 500px;
  background: #10B981;
  top: 40%;
  right: -10%;
  animation-delay: -8s;
  animation-duration: 22s;
}

.orb--orange {
  width: 550px;
  height: 550px;
  background: #FF6B35;
  bottom: -10%;
  left: 30%;
  animation-delay: -15s;
  animation-duration: 28s;
}

@keyframes orbFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    filter: blur(120px) hue-rotate(0deg);
  }
  25% {
    transform: translate(80px, -60px) scale(1.1);
    filter: blur(130px) hue-rotate(15deg);
  }
  50% {
    transform: translate(-40px, 40px) scale(0.95);
    filter: blur(110px) hue-rotate(-10deg);
  }
  75% {
    transform: translate(60px, 80px) scale(1.05);
    filter: blur(125px) hue-rotate(20deg);
  }
}

/* ================================================================
   FLOATING PARTICLES
   ================================================================ */
.particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-10vh) rotate(360deg);
    opacity: 0;
  }
}

/* ================================================================
   NAVIGATION
   ================================================================ */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 32px);
  max-width: 900px;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-radius: 9999px;
  background: rgba(10, 10, 26, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid transparent;
  position: relative;
}

/* Animated Gradient Border */
.nav__inner::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 9999px;
  padding: 1px;
  background: conic-gradient(
    from var(--gradient-angle),
    #7C3AED,
    #2563EB,
    #10B981,
    #FF6B35,
    #DB2777,
    #7C3AED
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotateGradient 4s linear infinite;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.nav:hover .nav__inner::before {
  opacity: 1;
}

@keyframes rotateGradient {
  to { --gradient-angle: 360deg; }
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1;
}

.nav__logo-icon {
  flex-shrink: 0;
  width: 22px;
  height: auto;
}

.nav__logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1;
}

.nav__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 9999px;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav__link:hover,
.nav__link--active {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1;
}

.nav__search {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--transition-fast);
  color: var(--text-secondary);
}

.nav__search:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}

.nav__search i,
.nav__search svg {
  width: 18px;
  height: 18px;
}

/* Mobile Toggle */
.nav__mobile-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-secondary);
}

.nav__mobile-toggle .close-icon {
  display: none;
}

.nav__mobile-toggle[aria-expanded="true"] .menu-icon {
  display: none;
}

.nav__mobile-toggle[aria-expanded="true"] .close-icon {
  display: block;
}

.nav__mobile-toggle i,
.nav__mobile-toggle svg {
  width: 20px;
  height: 20px;
}

/* ================================================================
   HERO SECTION
   ================================================================ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
}

.hero__content {
  max-width: 800px;
  margin: 0 auto;
}

.hero__title {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 16px;
  line-height: 1.7;
  font-weight: 400;
}

.hero__tagline {
  font-size: 15px;
  color: var(--text-tertiary);
  margin-bottom: 40px;
  font-weight: 400;
}

.hero__tagline em {
  font-style: italic;
}

.hero__ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  transition: transform var(--transition-fast),
              box-shadow var(--transition-fast),
              background var(--transition-fast),
              border-color var(--transition-fast);
  cursor: pointer;
}

.btn i, .btn svg {
  width: 18px;
  height: 18px;
}

.btn--primary {
  background: var(--orange);
  color: #fff;
  border: 1px solid var(--orange);
}

.btn--primary:hover {
  background: var(--orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 107, 53, 0.3);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--glass {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
}

.btn--glass:hover {
  background: var(--glass-hover);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.btn--glass:active {
  transform: translateY(0);
}

/* ================================================================
   SECTIONS (shared)
   ================================================================ */
.section {
  position: relative;
  z-index: 1;
  padding: clamp(60px, 8vw, 120px) 0;
}

.section__header {
  text-align: center;
  margin-bottom: 48px;
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 12px;
}

.section__subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

/* ================================================================
   ARTICLES — Editorial Grid
   ================================================================ */
.articles__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 24px;
}

.article-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast),
              transform var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.08),
              0 0 80px rgba(255, 107, 53, 0.04);
  transform: translateY(-2px);
}

.article-card--featured {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}

.article-card__image {
  height: 200px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.article-card--featured .article-card__image {
  height: 100%;
  min-height: 280px;
  flex: 1;
}

.article-card__category {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  color: #fff;
}

.article-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.article-card--featured .article-card__body {
  padding: 24px;
  gap: 12px;
}

.article-card__date {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.article-card__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.article-card--featured .article-card__title {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

.article-card__excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.article-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--orange);
  transition: gap var(--transition-fast);
  margin-top: auto;
}

.article-card__link:hover {
  gap: 10px;
}

.article-card__link i,
.article-card__link svg {
  width: 16px;
  height: 16px;
}

/* ================================================================
   TOOL CAROUSEL
   ================================================================ */
.carousel-section .container {
  max-width: var(--carousel-max);
}

.carousel {
  border: 1px solid var(--orange);
  border-radius: 16px;
  padding: 24px 0;
  overflow: hidden;
  position: relative;
  background: rgba(255, 107, 53, 0.03);
}

/* Fade edges */
.carousel::before,
.carousel::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.carousel::before {
  left: 0;
  background: linear-gradient(to right, var(--navy), transparent);
}

.carousel::after {
  right: 0;
  background: linear-gradient(to left, var(--navy), transparent);
}

.carousel__track {
  display: flex;
  gap: 20px;
  animation: carouselScroll 30s linear infinite;
  width: max-content;
  padding: 0 10px;
}

.carousel__track:hover {
  animation-play-state: paused;
}

@keyframes carouselScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.tool-card {
  flex-shrink: 0;
  width: 200px;
  padding: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  text-align: center;
  transition: border-color var(--transition-fast),
              background var(--transition-fast),
              transform var(--transition-fast);
  cursor: pointer;
}

.tool-card:hover {
  border-color: rgba(255,255,255,0.12);
  background: var(--glass-hover);
  transform: translateY(-4px);
}

.tool-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: #fff;
}

.tool-card__name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.tool-card__desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.tool-card__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  padding: 3px 10px;
  border-radius: 9999px;
  border: 1px solid var(--glass-border);
}

/* ================================================================
   WHAT WE COVER — Pillar Cards
   ================================================================ */
.pillars__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.pillar-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast),
              transform var(--transition-fast);
}

.pillar-card:hover {
  transform: translateY(-4px);
}

.pillar-card[data-accent="blue"]:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 0 30px rgba(37, 99, 235, 0.1);
}

.pillar-card[data-accent="emerald"]:hover {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.1);
}

.pillar-card[data-accent="orange"]:hover {
  border-color: rgba(255, 107, 53, 0.4);
  box-shadow: 0 0 30px rgba(255, 107, 53, 0.1);
}

.pillar-card[data-accent="purple"]:hover {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.1);
}

.pillar-card[data-accent="magenta"]:hover {
  border-color: rgba(219, 39, 119, 0.4);
  box-shadow: 0 0 30px rgba(219, 39, 119, 0.1);
}

.pillar-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
}

.pillar-card[data-accent="blue"] .pillar-card__icon { color: var(--blue); }
.pillar-card[data-accent="emerald"] .pillar-card__icon { color: var(--emerald); }
.pillar-card[data-accent="orange"] .pillar-card__icon { color: var(--orange); }
.pillar-card[data-accent="purple"] .pillar-card__icon { color: var(--purple); }
.pillar-card[data-accent="magenta"] .pillar-card__icon { color: var(--magenta); }

.pillar-card__icon i,
.pillar-card__icon svg {
  width: 24px;
  height: 24px;
}

.pillar-card__title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pillar-card__desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ================================================================
   TRUST / AUTHORITY
   ================================================================ */
.trust {
  text-align: center;
}

.trust__content {
  max-width: 640px;
  margin: 0 auto 48px;
}

.trust__statement {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 16px;
}

.trust__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 700px;
  margin: 0 auto;
}

.stat-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 32px 20px;
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast);
}

.stat-card:hover {
  border-color: rgba(255, 107, 53, 0.3);
  box-shadow: 0 0 30px rgba(255, 107, 53, 0.08);
}

.stat-card__number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}

.stat-card__label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ================================================================
   NEWSLETTER CTA
   ================================================================ */
.newsletter__inner {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: clamp(32px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.newsletter__inner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,107,53,0.08), transparent 70%);
  pointer-events: none;
}

.newsletter__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 12px;
}

.newsletter__desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.newsletter__lead-magnet {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--orange);
  font-weight: 500;
}

.newsletter__lead-magnet i,
.newsletter__lead-magnet svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.newsletter__form {
  position: relative;
  z-index: 1;
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--glass-border);
  padding: 48px 0 32px;
}

.footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.footer__brand {
  flex-shrink: 0;
}

.footer__tagline {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: 12px;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer__link {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--text-primary);
}

.footer__social {
  display: flex;
  gap: 12px;
}

.footer__social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  transition: color var(--transition-fast),
              border-color var(--transition-fast),
              background var(--transition-fast);
}

.footer__social-link:hover {
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.12);
  background: var(--glass-hover);
}

.footer__social-link i,
.footer__social-link svg {
  width: 18px;
  height: 18px;
}

.footer__bottom {
  border-top: 1px solid var(--glass-border);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ================================================================
   SCROLL REVEAL
   ================================================================ */
.reveal {
  opacity: 0;
  clip-path: inset(8% 0 0 0);
  transition: opacity 0.8s var(--ease-out),
              clip-path 0.8s var(--ease-out);
}

.reveal.revealed {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

/* Stagger children */
.reveal:nth-child(2) { transition-delay: 0.05s; }
.reveal:nth-child(3) { transition-delay: 0.1s; }
.reveal:nth-child(4) { transition-delay: 0.15s; }
.reveal:nth-child(5) { transition-delay: 0.2s; }

/* ================================================================
   MOBILE MENU OVERLAY
   ================================================================ */
.mobile-menu-open .nav__links {
  display: flex !important;
  position: fixed;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(6, 6, 15, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 99;
}

.mobile-menu-open .nav__link {
  font-size: 24px;
  font-family: var(--font-display);
  font-weight: 700;
}

/* ================================================================
   RESPONSIVE — Tablet (768px)
   ================================================================ */
@media (max-width: 1024px) {
  .pillars__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

  .nav__mobile-toggle {
    display: flex;
  }

  .hero__title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

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

  .btn {
    justify-content: center;
  }

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

  .article-card--featured {
    grid-column: auto;
    grid-row: auto;
  }

  .article-card--featured .article-card__image {
    height: 220px;
    min-height: auto;
    flex: initial;
  }

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

  .trust__stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .newsletter__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .newsletter__lead-magnet {
    justify-content: center;
  }

  .footer__top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer__nav {
    justify-content: center;
  }

  .footer__social {
    justify-content: center;
  }
}

/* ================================================================
   RESPONSIVE — Mobile (375px)
   ================================================================ */
@media (max-width: 480px) {
  .nav {
    top: 8px;
    width: calc(100% - 16px);
  }

  .nav__inner {
    padding: 10px 16px;
  }

  .hero {
    padding: 100px 16px 60px;
    min-height: auto;
    min-height: 85vh;
  }

  .container {
    padding: 0 16px;
  }

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

  .trust__stats {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .stat-card {
    padding: 24px 16px;
  }

  .carousel__track {
    gap: 12px;
  }

  .tool-card {
    width: 170px;
    padding: 16px;
  }

  .orb--blue { width: 300px; height: 300px; }
  .orb--green { width: 250px; height: 250px; }
  .orb--orange { width: 280px; height: 280px; }
}

/* ================================================================
   REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  .orb,
  .particle,
  .carousel__track {
    animation: none !important;
  }

  .reveal {
    opacity: 1 !important;
    clip-path: none !important;
    transition: none !important;
  }

  .nav__inner::before {
    animation: none !important;
  }

  .reading-progress {
    transition: none !important;
  }
}

/* ================================================================
   SKIP LINK (Accessibility)
   ================================================================ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--orange);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  z-index: 9999;
  font-weight: 600;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

/* ================================================================
   ARTICLE PAGE — Hero
   ================================================================ */
.article-hero {
  position: relative;
  z-index: 1;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.article-hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0a2540 0%, #0d3b66 25%, #14536e 50%, #1a6e5c 75%, #0ea5e9 100%);
  z-index: 0;
}

.article-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--navy) 0%, rgba(10,10,26,0.6) 40%, rgba(10,10,26,0.2) 100%);
  z-index: 1;
}

.article-hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 160px 24px 48px;
  width: 100%;
}

.article-hero__category {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--orange);
  color: #fff;
  margin-bottom: 20px;
}

.article-hero__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 820px;
  margin-bottom: 20px;
  color: #fff;
}

.article-hero__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  flex-wrap: wrap;
}

.article-hero__meta-sep {
  color: rgba(255,255,255,0.25);
}

/* ================================================================
   ARTICLE PAGE — Layout (TOC + Body)
   ================================================================ */
.article-layout {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 0;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
}

/* ---- Table of Contents ---- */
.toc {
  position: sticky;
  top: 100px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.toc__mobile-toggle {
  display: none;
}

.toc__nav {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.toc__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toc__link {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  padding: 6px 12px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
  line-height: 1.4;
}

.toc__link:hover {
  color: var(--text-secondary);
  background: rgba(255,255,255,0.03);
}

.toc__link.active {
  color: var(--orange);
  background: rgba(255, 107, 53, 0.06);
  border-left-color: var(--orange);
}

/* ================================================================
   ARTICLE PAGE — Body Typography
   ================================================================ */
.article-body {
  max-width: 720px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-primary);
  padding-bottom: 64px;
}

.article-body p {
  margin-bottom: 1.5em;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-top: 2.5em;
  margin-bottom: 0.8em;
  padding-bottom: 12px;
  position: relative;
}

.article-body h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--gradient-brand);
  border-radius: 2px;
}

.article-body h3 {
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2em;
  margin-bottom: 0.6em;
}

.article-body a {
  color: var(--orange);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.article-body a:hover {
  text-decoration: underline;
}

.article-internal-link {
  color: var(--orange) !important;
  text-decoration: none !important;
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.article-internal-link::after {
  content: ' \2192';
  display: inline;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.article-internal-link:hover::after {
  opacity: 1;
}

.article-internal-link:hover {
  text-decoration: underline !important;
}

.article-body strong {
  color: rgba(255,255,255,0.95);
  font-weight: 700;
}

.article-body em {
  font-style: italic;
}

.article-body ul, .article-body ol {
  margin-bottom: 1.5em;
  padding-left: 1.5em;
}

.article-body ul {
  list-style: none;
}

.article-body ul li {
  position: relative;
  padding-left: 1.2em;
  margin-bottom: 0.6em;
}

.article-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}

.article-body ol li {
  margin-bottom: 0.6em;
}

.article-body blockquote {
  border-left: 3px solid var(--orange);
  padding: 4px 0 4px 20px;
  margin: 1.5em 0;
  font-style: italic;
  color: var(--text-secondary);
}

/* ================================================================
   ARTICLE PAGE — Images (gradient placeholders)
   ================================================================ */
.article-img {
  margin: 2em 0;
}

.article-img__placeholder {
  width: 100%;
  height: 0;
  padding-bottom: 52%;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-img__alt {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 0 24px;
  width: 100%;
  max-width: 400px;
  line-height: 1.5;
}

/* ================================================================
   ARTICLE PAGE — Tables
   ================================================================ */
.article-table-wrap {
  margin: 1.5em 0 2em;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}

.article-table thead {
  background: rgba(255, 107, 53, 0.08);
  border-bottom: 1px solid rgba(255, 107, 53, 0.15);
}

.article-table th {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  padding: 14px 16px;
  text-align: left;
  white-space: nowrap;
}

.article-table td {
  padding: 12px 16px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--glass-border);
}

.article-table tbody tr:nth-child(even) {
  background: rgba(255,255,255,0.015);
}

.article-table tbody tr:last-child td {
  border-bottom: none;
}

.article-table tbody tr:hover {
  background: rgba(255,255,255,0.03);
}

.article-table td:first-child {
  font-weight: 600;
}

/* ================================================================
   ARTICLE PAGE — Source Line
   ================================================================ */
.article-source {
  font-size: 13px;
  color: var(--text-tertiary);
  font-style: italic;
  margin-top: -0.5em;
  margin-bottom: 1.5em;
}

/* ================================================================
   ARTICLE PAGE — Affiliate Disclosure
   ================================================================ */
.article-affiliate {
  margin-top: 3em;
  padding: 16px 20px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--glass-border);
}

.article-affiliate p {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 0;
  line-height: 1.6;
}

.article-affiliate a {
  color: var(--text-secondary);
  text-decoration: underline;
}

/* ================================================================
   ARTICLE PAGE — Keep Reading Grid
   ================================================================ */
.keep-reading {
  position: relative;
  z-index: 1;
}

.keep-reading__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ================================================================
   ARTICLE PAGE — Responsive (Tablet)
   ================================================================ */
@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 0;
  }

  .toc {
    position: relative;
    top: 0;
    max-height: none;
    margin-bottom: 32px;
    padding-top: 32px;
  }

  .toc__mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .toc__mobile-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
  }

  .toc__mobile-icon {
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
    transition: transform 0.3s var(--ease-out);
  }

  .toc__nav {
    display: none;
    margin-top: 8px;
  }

  .toc.toc--open .toc__nav {
    display: block;
  }

  .toc.toc--open .toc__mobile-icon {
    transform: rotate(180deg);
  }

  .article-body {
    max-width: 100%;
  }

  .keep-reading__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .article-hero {
    min-height: 360px;
  }

  .article-hero__content {
    padding: 120px 16px 36px;
  }

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

  .article-body {
    font-size: 16px;
  }

  .article-table {
    font-size: 13px;
  }

  .article-table th,
  .article-table td {
    padding: 10px 12px;
  }

  .article-layout {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 480px) {
  .article-hero {
    min-height: 300px;
  }

  .article-hero__content {
    padding: 100px 16px 28px;
  }

  .article-hero__meta {
    font-size: 12px;
  }

  .keep-reading__grid {
    grid-template-columns: 1fr;
  }
}
