/* ==========================================================================
   ACAYSIA — Precision Industrial Theme
   Dual-tone: Dark (#0c0c0c) + Warm Cream (#f0ede6)
   Fonts: Syne (display) · Hanken Grotesk (body) · JetBrains Mono (technical)
   Accent: Emerald #059669
   ========================================================================== */

/* ==========================================================================
   1. RESET — Kill styles.css conflicts
   ========================================================================== */

body.page-home-dark,
body.page-home-dark main {
  background: #0c0c0c;
  color: #fff;
}

body.page-home-dark .hero { background: none; padding: 0; }
body.page-home-dark .hero::before { display: none; }

body.page-home-dark .hero-grid,
body.page-home-dark .hero-content,
body.page-home-dark .hero-visual,
body.page-home-dark .hero-eyebrow,
body.page-home-dark .hero-subtitle { all: unset; }

body.page-home-dark .section,
body.page-home-dark .section-alt,
body.page-home-dark .stats-section,
body.page-home-dark .vendors-section,
body.page-home-dark .cta-section,
body.page-home-dark .video-hero-section { background: transparent; }

body.page-home-dark .vendors-section::before,
body.page-home-dark .feature-grid::before,
body.page-home-dark .diagram-wrapper::before,
body.page-home-dark .vendor-item::before,
body.page-home-dark .section-eyebrow::before { display: none; }

body.page-home-dark .footer-transition { display: none; }

body.page-home-dark .vendor-item {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
body.page-home-dark .vendor-item:hover { transform: none; box-shadow: none; }

body.page-home-dark .section-eyebrow {
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
}

body.page-home-dark .feature-grid { background: transparent; }
body.page-home-dark .stat-item { background: transparent; }

body.page-home-dark .btn-primary:hover,
body.page-home-dark .btn-accent:hover { transform: none; box-shadow: none; }

/* ==========================================================================
   2. DESIGN TOKENS
   ========================================================================== */

body.page-home-dark {
  --font-display: 'Syne', sans-serif;
  --font-body: 'Hanken Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --accent: #059669;
  --accent-light: #10b981;
  --accent-dark: #047857;

  --bg-dark: #0c0c0c;
  --bg-cream: #f0ede6;

  /* Global defaults (outside sections) */
  --border: rgba(255, 255, 255, 0.1);
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-muted: rgba(255, 255, 255, 0.4);

  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}

@media (min-width: 1280px) {
  body.page-home-dark { font-size: calc(0.8vw + 5.76px); }
}
@media (min-width: 1920px) {
  body.page-home-dark { font-size: calc(0.5vw + 11.4px); }
}
@media (min-width: 2400px) {
  body.page-home-dark { font-size: 23px; }
}

/* ==========================================================================
   3. BASE TYPOGRAPHY
   ========================================================================== */

body.page-home-dark h1,
body.page-home-dark h2,
body.page-home-dark h3 {
  font-family: var(--font-display);
  color: var(--s-text, #fff);
}

body.page-home-dark h4,
body.page-home-dark h5,
body.page-home-dark h6 {
  font-family: var(--font-body);
  color: var(--s-text, #fff);
}

body.page-home-dark h1 {
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

body.page-home-dark h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

body.page-home-dark h3 {
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

body.page-home-dark h4 {
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

body.page-home-dark h5 {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.25;
}

body.page-home-dark h6 {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

body.page-home-dark p {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.65;
  color: var(--s-text-secondary, rgba(255, 255, 255, 0.55));
}

body.page-home-dark a {
  color: inherit;
  transition: opacity 0.3s ease-out;
}

/* ==========================================================================
   4. SECTION SYSTEM — Dark + Cream
   ========================================================================== */

/* --- Dark Section --- */
body.page-home-dark .dark-section {
  --s-bg: #0c0c0c;
  --s-text: #ffffff;
  --s-text-secondary: rgba(255, 255, 255, 0.55);
  --s-text-muted: rgba(255, 255, 255, 0.4);
  --s-border: rgba(255, 255, 255, 0.1);
  --s-surface: rgba(255, 255, 255, 0.03);
  --s-surface-hover: rgba(255, 255, 255, 0.06);
  --s-accent-text: rgba(255, 255, 255, 0.4);

  background: var(--s-bg);
  color: var(--s-text);
  padding: 7rem 2rem;
  border-top: 1px solid var(--s-border);
  position: relative;
}

/* --- Cream Section --- */
body.page-home-dark .cream-section {
  --s-bg: #f0ede6;
  --s-text: #1a1a1a;
  --s-text-secondary: rgba(0, 0, 0, 0.55);
  --s-text-muted: rgba(0, 0, 0, 0.35);
  --s-border: rgba(0, 0, 0, 0.08);
  --s-surface: rgba(0, 0, 0, 0.03);
  --s-surface-hover: rgba(0, 0, 0, 0.06);
  --s-accent-text: #059669;

  background: var(--s-bg);
  color: var(--s-text);
  padding: 7rem 2rem;
  border-top: none;
  position: relative;
}

body.page-home-dark .dark-section.no-border,
body.page-home-dark .cream-section.no-border { border-top: none; }

/* Headings inherit section context */
body.page-home-dark .dark-section h1,
body.page-home-dark .dark-section h2,
body.page-home-dark .dark-section h3,
body.page-home-dark .dark-section h4,
body.page-home-dark .dark-section h5,
body.page-home-dark .dark-section h6,
body.page-home-dark .cream-section h1,
body.page-home-dark .cream-section h2,
body.page-home-dark .cream-section h3,
body.page-home-dark .cream-section h4,
body.page-home-dark .cream-section h5,
body.page-home-dark .cream-section h6 { color: var(--s-text); }

body.page-home-dark .dark-section p,
body.page-home-dark .cream-section p { color: var(--s-text-secondary); }

@media (max-width: 768px) {
  body.page-home-dark .dark-section,
  body.page-home-dark .cream-section {
    padding: 4rem 1.25rem;
  }
}

/* ==========================================================================
   5. NAVIGATION
   ========================================================================== */

body.page-home-dark nav {
  background: rgba(12, 12, 12, 0.88);
  backdrop-filter: blur(3rem);
  -webkit-backdrop-filter: blur(3rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.page-home-dark .logo {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

body.page-home-dark .logo:hover { opacity: 0.7; }

body.page-home-dark .nav-links a {
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  transition: color 0.3s ease-out;
}

body.page-home-dark .nav-links a:hover,
body.page-home-dark .nav-links a.active { color: #fff; }
body.page-home-dark .nav-links a::after { background: #fff; }

body.page-home-dark .nav-dropdown-toggle {
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
}
body.page-home-dark .nav-dropdown-toggle:hover { color: #fff; }

body.page-home-dark .nav-dropdown-menu {
  background: transparent !important;
  border: none !important;
}

body.page-home-dark .nav-dropdown-menu-inner {
  background: rgba(12, 12, 12, 0.98) !important;
  backdrop-filter: blur(2rem);
  -webkit-backdrop-filter: blur(2rem);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
}

body.page-home-dark .nav-dropdown-menu-inner::before {
  border-bottom-color: rgba(12, 12, 12, 0.98);
}
body.page-home-dark .nav-dropdown-menu-inner::after {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.page-home-dark .nav-dropdown-menu a {
  color: rgba(255, 255, 255, 0.55) !important;
}
body.page-home-dark .nav-dropdown-menu a:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.06) !important;
}
body.page-home-dark .nav-dropdown-menu a.active {
  color: var(--accent-light) !important;
  background: rgba(5, 150, 105, 0.1) !important;
}

body.page-home-dark .nav-toggle span { background: #fff; }

@media (max-width: 768px) {
  body.page-home-dark .nav-links {
    background: #0c0c0c;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  body.page-home-dark .nav-dropdown-menu {
    background: transparent !important;
    border: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  body.page-home-dark .nav-dropdown-menu-inner {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
}

/* ==========================================================================
   6. BUTTONS
   ========================================================================== */

body.page-home-dark .action-btn {
  color: var(--s-text, #fff);
  opacity: 0.6;
  cursor: pointer;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: opacity 0.3s ease-out;
  display: inline-flex;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0;
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
}
body.page-home-dark .action-btn:hover { opacity: 1; }
body.page-home-dark .action-btn svg { width: 0.55rem; height: 0.55rem; }

/* Filled — dark bg on cream, white bg on dark */
body.page-home-dark .action-btn.secondary {
  opacity: 1;
  color: #0c0c0c;
  background: #fff;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.25s ease-out;
}
body.page-home-dark .action-btn.secondary:hover { background: rgba(255, 255, 255, 0.85); }

body.page-home-dark .cream-section .action-btn.secondary {
  color: #f0ede6;
  background: #1a1a1a;
}
body.page-home-dark .cream-section .action-btn.secondary:hover { background: #333; }

/* Green accent */
body.page-home-dark .action-btn.accent {
  opacity: 1;
  color: #fff;
  background: var(--accent);
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.25s ease-out;
}
body.page-home-dark .action-btn.accent:hover { background: var(--accent-dark); }

/* Outline */
body.page-home-dark .action-btn.outline {
  opacity: 1;
  background: transparent;
  outline: 1px solid var(--s-border, rgba(255, 255, 255, 0.2));
  color: var(--s-text, #fff);
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.25s ease-out;
}
body.page-home-dark .action-btn.outline:hover { outline-color: var(--s-text, #fff); }

/* Old .btn patterns */
body.page-home-dark .btn { font-family: var(--font-body); border-radius: 0; }
body.page-home-dark .btn-primary { background: #fff; color: #0c0c0c; border: none; }
body.page-home-dark .btn-primary:hover { background: rgba(255, 255, 255, 0.85); }
body.page-home-dark .btn-accent { background: var(--accent); color: #fff; }
body.page-home-dark .btn-accent:hover { background: var(--accent-dark); }
body.page-home-dark .btn-secondary,
body.page-home-dark .btn-outline {
  background: transparent;
  color: var(--s-text, #fff);
  border: 1px solid var(--s-border, rgba(255, 255, 255, 0.2));
}
body.page-home-dark .btn-secondary:hover,
body.page-home-dark .btn-outline:hover { border-color: var(--s-text, #fff); }

/* ==========================================================================
   7. VIDEO PATTERNS
   ========================================================================== */

body.page-home-dark .vid-section {
  position: relative;
  overflow: hidden;
}

body.page-home-dark .vid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

body.page-home-dark .vid-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.page-home-dark .vid-bg-overlay {
  position: absolute;
  inset: 0;
}

body.page-home-dark .vid-content {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   8. HERO
   ========================================================================== */

body.page-home-dark .hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 0 2rem 7rem;
  background: #0c0c0c;
}

body.page-home-dark .hero .vid-bg video { opacity: 0.3; }

body.page-home-dark .hero .vid-bg-overlay {
  background: linear-gradient(
    180deg,
    rgba(12, 12, 12, 0.1) 0%,
    rgba(12, 12, 12, 0.5) 55%,
    #0c0c0c 100%
  );
}

body.page-home-dark .hero .vid-content { max-width: 55rem; }
body.page-home-dark .hero h1 { margin: 0 0 1.5rem; color: #fff; }

body.page-home-dark .hero p {
  max-width: 36rem;
  margin: 0 0 2.5rem;
  color: rgba(255, 255, 255, 0.6);
}

body.page-home-dark .hero .hero-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
}

@media (max-width: 768px) {
  body.page-home-dark .hero { padding: 0 1.25rem 4rem; }
  body.page-home-dark .hero .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* Sub-page hero (shorter than homepage) */
body.page-home-dark .hero.hero-sub {
  min-height: 70vh;
}

body.page-home-dark .hero.hero-sub .vid-bg video {
  opacity: 0.25;
}

@media (max-width: 768px) {
  body.page-home-dark .hero.hero-sub { min-height: 60vh; }
}

/* ==========================================================================
   9. STATS
   ========================================================================== */

body.page-home-dark .stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  max-width: 72rem;
  margin: 0 auto;
}

body.page-home-dark .stat-block .stat-num {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--s-text);
}

body.page-home-dark .stat-block .stat-desc {
  margin-top: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--s-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

/* Green accent bar above stat numbers */
body.page-home-dark .stat-block .stat-num::before {
  content: '';
  display: block;
  width: 2rem;
  height: 3px;
  background: var(--accent);
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  body.page-home-dark .stats-row {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* ==========================================================================
   10. SPLIT SECTIONS (text + media)
   ========================================================================== */

body.page-home-dark .split-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  max-width: 72rem;
  margin: 0 auto;
  align-items: start;
}

body.page-home-dark .split-section.reverse {
  grid-template-columns: 1fr 2fr;
}

body.page-home-dark .split-section .split-text h2 {
  margin: 0 0 1.5rem;
  color: var(--s-text);
}

body.page-home-dark .split-section .split-text p {
  color: var(--s-text-secondary);
  margin: 0 0 2rem;
  max-width: 36rem;
}

body.page-home-dark .split-section .split-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-dark, #0c0c0c);
}

body.page-home-dark .split-section .split-media video,
body.page-home-dark .split-section .split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Eliminate edge flicker: extend video past container, clip with overflow:hidden */
body.page-home-dark .split-section .split-media video {
  position: absolute;
  inset: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  object-fit: cover;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

/* Equal columns for sections with prominent media */
body.page-home-dark .split-section.media-lg {
  grid-template-columns: 1fr 1fr;
}
body.page-home-dark .split-section.reverse.media-lg {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 768px) {
  body.page-home-dark .split-section,
  body.page-home-dark .split-section.reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ==========================================================================
   11. FEATURE GRID (2-col with internal borders)
   ========================================================================== */

body.page-home-dark .feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 72rem;
  margin: 0 auto;
}

body.page-home-dark .feature-block {
  padding: 2.5rem 2rem 2.5rem 0;
  border-bottom: 1px solid var(--s-border);
}

body.page-home-dark .feature-block:nth-child(even) {
  padding-left: 2rem;
  padding-right: 0;
  border-left: 1px solid var(--s-border);
}

body.page-home-dark .feature-block:nth-last-child(-n+2) { border-bottom: none; }

body.page-home-dark .feature-block h4 {
  margin: 0 0 0.75rem;
  color: var(--s-text);
}

body.page-home-dark .feature-block p {
  color: var(--s-text-secondary);
  max-width: 28rem;
}

/* Eyebrow labels — green on cream, muted on dark */
body.page-home-dark .eyebrow,
body.page-home-dark .feature-block .eyebrow,
body.page-home-dark .cta-dark .eyebrow,
body.page-home-dark .split-text .eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--s-accent-text, var(--s-text-muted));
  margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
  body.page-home-dark .feature-row { grid-template-columns: 1fr; }
  body.page-home-dark .feature-block { padding: 2rem 0; }
  body.page-home-dark .feature-block:nth-child(even) { padding-left: 0; border-left: none; }
  body.page-home-dark .feature-block:nth-last-child(-n+2) { border-bottom: 1px solid var(--s-border); }
  body.page-home-dark .feature-block:last-child { border-bottom: none; }
}

/* ==========================================================================
   12. FULL-BLEED VIDEO
   ========================================================================== */

body.page-home-dark .fullbleed-video {
  width: 100%;
  aspect-ratio: 16 / 7;
  position: relative;
  overflow: hidden;
}

body.page-home-dark .fullbleed-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.page-home-dark .fullbleed-video .vid-bg-overlay {
  background: linear-gradient(
    180deg,
    rgba(12, 12, 12, 0.4) 0%,
    transparent 15%,
    transparent 85%,
    rgba(12, 12, 12, 0.4) 100%
  );
}

/* Transitions from cream to dark */
body.page-home-dark .fullbleed-video.from-cream .vid-bg-overlay {
  background: linear-gradient(
    180deg,
    rgba(240, 237, 230, 0.5) 0%,
    transparent 18%,
    transparent 82%,
    rgba(12, 12, 12, 0.5) 100%
  );
}

/* Transitions from dark to cream */
body.page-home-dark .fullbleed-video.to-cream .vid-bg-overlay {
  background: linear-gradient(
    180deg,
    rgba(12, 12, 12, 0.5) 0%,
    transparent 18%,
    transparent 82%,
    rgba(240, 237, 230, 0.5) 100%
  );
}

/* ==========================================================================
   13. VENDOR STRIP
   ========================================================================== */

body.page-home-dark .vendors-section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

body.page-home-dark .vendor-heading {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--s-text-secondary);
  margin: 0 0 2rem;
}

body.page-home-dark .vendor-item {
  border: 1px solid var(--s-border);
}

/* Dark section: ghost white logos */
body.page-home-dark .dark-section .vendor-item svg {
  filter: grayscale(100%) brightness(0) invert(1);
  opacity: 0.25;
  transition: opacity 0.3s ease-out;
}

/* Cream section: ghost dark logos */
body.page-home-dark .cream-section .vendor-item svg {
  filter: grayscale(100%) brightness(0);
  opacity: 0.25;
  transition: opacity 0.3s ease-out;
}

body.page-home-dark .vendor-item:hover svg { opacity: 0.6; }

/* ==========================================================================
   14. CTA
   ========================================================================== */

body.page-home-dark .cta-dark {
  text-align: left;
  max-width: 72rem;
  margin: 0 auto;
}

body.page-home-dark .cta-dark h2 {
  margin: 0 0 1.25rem;
  max-width: 36rem;
  color: var(--s-text);
}

body.page-home-dark .cta-dark p {
  color: var(--s-text-secondary);
  max-width: 36rem;
  margin: 0 0 2rem;
}

/* ==========================================================================
   15. FOOTER
   ========================================================================== */

body.page-home-dark footer {
  background: #0c0c0c;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3rem 0;
}

body.page-home-dark footer .logo { color: #fff; }
body.page-home-dark footer .logo:hover { opacity: 0.7; }

body.page-home-dark footer p {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.875rem;
}

body.page-home-dark .footer-tagline {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.35);
}

body.page-home-dark .footer-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

body.page-home-dark .footer-links a {
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
  text-decoration: none;
  transition: color 0.2s;
}

body.page-home-dark .footer-links a:hover {
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   16. SCROLL ANIMATIONS
   ========================================================================== */

body.page-home-dark .reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

body.page-home-dark .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered feature reveals */
body.page-home-dark .feature-block {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

body.page-home-dark .reveal.visible .feature-block,
body.page-home-dark .feature-block.visible {
  opacity: 1;
  transform: translateY(0);
}

body.page-home-dark .reveal.visible .feature-block:nth-child(1) { transition-delay: 0s; }
body.page-home-dark .reveal.visible .feature-block:nth-child(2) { transition-delay: 0.1s; }
body.page-home-dark .reveal.visible .feature-block:nth-child(3) { transition-delay: 0.2s; }
body.page-home-dark .reveal.visible .feature-block:nth-child(4) { transition-delay: 0.3s; }
body.page-home-dark .reveal.visible .feature-block:nth-child(5) { transition-delay: 0.4s; }
body.page-home-dark .reveal.visible .feature-block:nth-child(6) { transition-delay: 0.5s; }

/* Word reveal */
body.page-home-dark .word-reveal .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.4rem);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

body.page-home-dark .word-reveal.revealed .word {
  opacity: 1;
  transform: translateY(0);
}

/* Typewriter cursor — green accent */
.typed-cursor::after {
  content: '|';
  color: var(--accent, #059669);
  font-weight: 300;
  animation: cursorBlink 1s step-end infinite;
  margin-left: 2px;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ==========================================================================
   17. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  body.page-home-dark .reveal,
  body.page-home-dark .feature-block {
    opacity: 1;
    transform: none;
    transition: none;
  }
  body.page-home-dark .word-reveal .word {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .typed-cursor::after { animation: none; }
  body.page-home-dark .vid-bg video { display: none; }
  body.page-home-dark .page-transition { display: none; }
  body.page-home-dark .section-divider::after,
  body.page-home-dark .section-divider-full::after {
    transform: scaleX(1);
    transition: none;
  }
}

/* ==========================================================================
   18. ARTICLE CONTENT
   ========================================================================== */

body.page-home-dark .article-content { max-width: 720px; }

body.page-home-dark .article-content h2 { margin-top: 3rem; margin-bottom: 1rem; }

body.page-home-dark .article-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

body.page-home-dark .article-content h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

body.page-home-dark .article-content p {
  color: var(--s-text-secondary);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

body.page-home-dark .article-content ul,
body.page-home-dark .article-content ol {
  color: var(--s-text-secondary);
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

body.page-home-dark .article-content li { margin-bottom: 0.5rem; }
body.page-home-dark .article-content strong { color: var(--s-text); }

body.page-home-dark .article-content a {
  color: var(--s-text);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--s-text-muted);
  transition: text-decoration-color 0.3s ease-out;
}

body.page-home-dark .article-content a:hover {
  text-decoration-color: var(--s-text);
}

body.page-home-dark .article-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--s-surface);
  padding: 0.15em 0.4em;
  border-radius: 2px;
  color: var(--s-text-secondary);
}

/* ==========================================================================
   19. DOC LAYOUT (sidebar + main)
   ========================================================================== */

body.page-home-dark .doc-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 4rem;
  max-width: 72rem;
  margin: 0 auto;
}

body.page-home-dark .doc-sidebar {
  position: sticky;
  top: 8rem;
  align-self: start;
  background: transparent;
  border: none;
}

body.page-home-dark .doc-sidebar h4 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--s-text-muted);
  margin-bottom: 1rem;
  font-weight: 600;
}

body.page-home-dark .doc-sidebar ul { list-style: none; padding: 0; margin: 0; }
body.page-home-dark .doc-sidebar li { margin-bottom: 0.5rem; }

body.page-home-dark .doc-sidebar a {
  color: var(--s-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.3s ease-out;
}

body.page-home-dark .doc-sidebar a:hover { color: var(--s-text); }

@media (max-width: 768px) {
  body.page-home-dark .doc-layout { grid-template-columns: 1fr; gap: 2rem; }
  body.page-home-dark .doc-sidebar {
    position: static;
    border-bottom: 1px solid var(--s-border);
    padding-bottom: 1.5rem;
  }
}

/* ==========================================================================
   20. CASE STUDY LAYOUT (main + sidebar)
   ========================================================================== */

body.page-home-dark .case-study-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 4rem;
}

body.page-home-dark .case-study-sidebar {
  background: transparent;
  border: none;
}

body.page-home-dark .case-study-sidebar dt { color: var(--s-text-muted); }
body.page-home-dark .case-study-sidebar dd { color: var(--s-text); }

body.page-home-dark .sidebar-card {
  padding: 1.25rem;
  border-bottom: 1px solid var(--s-border);
}

body.page-home-dark .sidebar-card h4 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--s-text-muted);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

body.page-home-dark .sidebar-card p {
  color: var(--s-text);
  font-size: 0.95rem;
  margin: 0;
}

body.page-home-dark .sidebar-card.highlight { background: var(--s-surface); }

@media (max-width: 768px) {
  body.page-home-dark .case-study-layout { grid-template-columns: 1fr; gap: 2rem; }
}

/* ==========================================================================
   21. CONTENT BOXES
   ========================================================================== */

/* Quote — green left accent */
body.page-home-dark .quote-box {
  border-left: 3px solid var(--accent);
  padding: 1.5rem 0 1.5rem 1.5rem;
  margin: 2rem 0;
  background: transparent;
}

body.page-home-dark .quote-box p {
  color: var(--s-text-secondary);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

body.page-home-dark .quote-box cite {
  color: var(--s-text-muted);
  font-style: normal;
  font-size: 0.85rem;
}

/* Equation */
body.page-home-dark .equation-box {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  padding: 1.5rem;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
}

body.page-home-dark .equation-box p {
  color: var(--s-text-secondary);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
body.page-home-dark .equation-box p:last-child { margin-bottom: 0; }

body.page-home-dark .equation-box .equation-caption {
  color: var(--s-text-muted);
  font-size: 0.8rem;
  font-family: var(--font-body);
}

/* Info — green left accent */
body.page-home-dark .info-box {
  background: var(--s-surface);
  border-left: 3px solid var(--accent);
  padding: 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--s-text-secondary);
  line-height: 1.6;
}
body.page-home-dark .info-box strong { color: var(--s-text); }

/* Warning — amber left accent */
body.page-home-dark .warning-box {
  background: var(--s-surface);
  border-left: 3px solid #d97706;
  padding: 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--s-text-secondary);
  line-height: 1.6;
}
body.page-home-dark .warning-box strong { color: var(--s-text); }

/* Algorithm */
body.page-home-dark .algorithm-box {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

body.page-home-dark .algorithm-box h4 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--s-text-muted);
  margin-bottom: 1rem;
  margin-top: 0;
  font-weight: 600;
}

body.page-home-dark .algorithm-box ol {
  color: var(--s-text-secondary);
  padding-left: 1.25rem;
  margin: 0;
}
body.page-home-dark .algorithm-box li { margin-bottom: 0.5rem; }

/* ==========================================================================
   22. TABLES
   ========================================================================== */

body.page-home-dark table {
  width: 100%;
  border-collapse: collapse;
  border-color: var(--s-border);
}

body.page-home-dark th {
  background: var(--s-surface);
  font-family: var(--font-body);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--s-text-muted);
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--s-border);
}

body.page-home-dark td {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--s-text-secondary);
  border-bottom: 1px solid var(--s-border);
}

body.page-home-dark tr:last-child td { border-bottom: none; }
body.page-home-dark tr:hover td { background: var(--s-surface); }
body.page-home-dark .doc-table { margin: 1.5rem 0; }

/* ==========================================================================
   23. CODE BLOCKS
   ========================================================================== */

body.page-home-dark .code-block,
body.page-home-dark pre {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  overflow: hidden;
  margin: 1.5rem 0;
}

body.page-home-dark code {
  font-family: var(--font-mono);
  background: var(--s-surface);
  color: var(--s-text-secondary);
}

body.page-home-dark pre code { background: transparent; padding: 0; }

body.page-home-dark .code-block pre {
  padding: 1.5rem;
  margin: 0;
  overflow-x: auto;
  background: transparent;
  border: none;
}

body.page-home-dark .code-block code {
  font-size: 0.85rem;
  line-height: 1.6;
  background: transparent;
}

body.page-home-dark .code-box {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  overflow: hidden;
}

body.page-home-dark .code-box-header {
  padding: 0.75rem 1rem;
  background: var(--s-surface-hover);
  border-bottom: 1px solid var(--s-border);
  color: var(--s-text-secondary);
  font-size: 0.875rem;
}

body.page-home-dark .code-box pre {
  padding: 1.5rem;
  margin: 0;
  overflow-x: auto;
  background: transparent;
  border: none;
}

body.page-home-dark .code-box code {
  font-size: 0.85rem;
  line-height: 1.6;
  background: transparent;
}

/* Syntax — dark */
body.page-home-dark .dark-section .comment { color: rgba(255, 255, 255, 0.3); }
body.page-home-dark .dark-section .keyword { color: #c792ea; }
body.page-home-dark .dark-section .function { color: #82aaff; }
body.page-home-dark .dark-section .variable { color: #f78c6c; }
body.page-home-dark .dark-section .string { color: #c3e88d; }
body.page-home-dark .dark-section .number { color: #f78c6c; }

/* Syntax — cream */
body.page-home-dark .cream-section .comment { color: rgba(0, 0, 0, 0.35); }
body.page-home-dark .cream-section .keyword { color: #7c4dff; }
body.page-home-dark .cream-section .function { color: #0055cc; }
body.page-home-dark .cream-section .variable { color: #c25100; }
body.page-home-dark .cream-section .string { color: #2e7d32; }
body.page-home-dark .cream-section .number { color: #c25100; }

/* ==========================================================================
   24. FORMS
   ========================================================================== */

body.page-home-dark .form-group label {
  color: var(--s-text-muted);
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

body.page-home-dark input,
body.page-home-dark textarea,
body.page-home-dark select {
  background: var(--s-surface, rgba(255, 255, 255, 0.04));
  color: var(--s-text, #fff);
  border: 1px solid var(--s-border, rgba(255, 255, 255, 0.1));
  border-radius: 0;
  font-family: var(--font-body);
}

body.page-home-dark input:focus,
body.page-home-dark textarea:focus,
body.page-home-dark select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: none;
}

body.page-home-dark input::placeholder,
body.page-home-dark textarea::placeholder {
  color: var(--s-text-muted, rgba(255, 255, 255, 0.4));
}

body.page-home-dark .form-group input,
body.page-home-dark .form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

body.page-home-dark .form-group textarea { min-height: 120px; resize: vertical; }
body.page-home-dark .form-group { margin-bottom: 1.5rem; }

body.page-home-dark .contact-card,
body.page-home-dark .contact-single {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  box-shadow: none;
}

body.page-home-dark .contact-card h3,
body.page-home-dark .contact-single h3 { color: var(--s-text); }

/* ==========================================================================
   25. BREADCRUMB / ARTICLE META / LEAD
   ========================================================================== */

body.page-home-dark .breadcrumb {
  font-family: var(--font-body);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--s-text-muted);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

body.page-home-dark .breadcrumb a {
  color: var(--s-text-muted);
  text-decoration: none;
  transition: color 0.3s ease-out;
}
body.page-home-dark .breadcrumb a:hover { color: var(--s-text); }
body.page-home-dark .breadcrumb span { color: var(--s-text-secondary); }

body.page-home-dark .article-meta {
  font-family: var(--font-body);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--s-text-muted);
  margin-bottom: 1rem;
  font-weight: 500;
}

body.page-home-dark .lead {
  font-size: 1.15rem;
  color: var(--s-text-secondary);
  line-height: 1.7;
  max-width: 640px;
}

/* ==========================================================================
   26. BLOG / DOC / CONTENT FOOTERS
   ========================================================================== */

body.page-home-dark .blog-author {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--s-border);
  color: var(--s-text-secondary);
}

body.page-home-dark .blog-cta {
  margin-top: 1.5rem;
  color: var(--s-text-secondary);
  background: var(--s-surface);
  border: 1px solid var(--s-border);
}
body.page-home-dark .blog-cta a { color: var(--s-text); }

body.page-home-dark .references {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--s-border);
}
body.page-home-dark .references h2 { font-size: 1.25rem; }
body.page-home-dark .references ol { font-size: 0.85rem; color: var(--s-text-muted); line-height: 1.6; }

body.page-home-dark .doc-footer,
body.page-home-dark .whitepaper-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--s-border);
  color: var(--s-text-secondary);
  font-size: 0.9rem;
}

body.page-home-dark .doc-footer a,
body.page-home-dark .whitepaper-footer a {
  color: var(--s-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.page-home-dark .checklist { list-style: none; padding-left: 0; }
body.page-home-dark .checklist li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--s-text-secondary);
}
body.page-home-dark .checklist li::before {
  content: '☐';
  position: absolute;
  left: 0;
  color: var(--s-text-muted);
}

/* ==========================================================================
   27. FAQ / DETAILS-SUMMARY
   ========================================================================== */

body.page-home-dark details {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border-radius: 0;
}

body.page-home-dark details summary { color: var(--s-text); font-weight: 500; cursor: pointer; }
body.page-home-dark details[open] summary { color: var(--s-text); }
body.page-home-dark details p { color: var(--s-text-secondary); margin-top: 1rem; }

body.page-home-dark details.faq-item {
  border: none;
  background: transparent;
  border-bottom: 1px solid var(--s-border);
  padding: 1rem 0;
}

body.page-home-dark details.faq-item summary {
  font-weight: 400;
  font-size: 1rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

body.page-home-dark details.faq-item summary::before {
  content: '+';
  font-size: 1.2rem;
  color: var(--s-text-muted);
  flex-shrink: 0;
}
body.page-home-dark details.faq-item[open] summary::before { content: '−'; }
body.page-home-dark details.faq-item summary::-webkit-details-marker { display: none; }

body.page-home-dark details.faq-item p {
  margin-top: 0.75rem;
  padding-left: 1.75rem;
  line-height: 1.7;
}

/* ==========================================================================
   28. RESOURCE PAGE
   ========================================================================== */

body.page-home-dark .resource-category {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
}
body.page-home-dark .resource-category h2 { color: var(--s-text); }
body.page-home-dark .resource-category a { color: var(--s-text-secondary); }
body.page-home-dark .resource-category a:hover { color: var(--s-text); }

body.page-home-dark .resource-link {
  color: var(--s-text);
  text-decoration: none;
  transition: opacity 0.3s ease-out;
}
body.page-home-dark .resource-link:hover { opacity: 0.7; }
body.page-home-dark .resource-list-section .feature-block h4 { font-size: 1.5rem; }

body.page-home-dark .access-modal-content {
  background: #111 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

/* ==========================================================================
   29. CARDS (old styles.css patterns)
   ========================================================================== */

body.page-home-dark .feature-card,
body.page-home-dark .value-card,
body.page-home-dark .prop-card,
body.page-home-dark .stat-card,
body.page-home-dark .mv-card {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  color: var(--s-text);
  box-shadow: none;
}

body.page-home-dark .feature-card:hover,
body.page-home-dark .value-card:hover,
body.page-home-dark .prop-card:hover,
body.page-home-dark .stat-card:hover,
body.page-home-dark .mv-card:hover {
  border-color: var(--s-text-muted);
  box-shadow: none;
  transform: none;
}

body.page-home-dark .feature-card h3,
body.page-home-dark .value-card h3,
body.page-home-dark .prop-card h3,
body.page-home-dark .stat-card h3,
body.page-home-dark .mv-card h3 { color: var(--s-text); }

body.page-home-dark .feature-card p,
body.page-home-dark .value-card p,
body.page-home-dark .prop-card p,
body.page-home-dark .stat-card p,
body.page-home-dark .mv-card p { color: var(--s-text-secondary); }

body.page-home-dark .feature-card svg,
body.page-home-dark .value-card svg {
  color: var(--accent);
  fill: var(--accent);
  stroke: var(--accent);
}

body.page-home-dark .stat-card .stat-value { color: var(--s-text); }
body.page-home-dark .stat-value { color: var(--s-text, #fff); }
body.page-home-dark .stat-label { color: var(--s-text-muted, rgba(255, 255, 255, 0.4)); }

/* ==========================================================================
   30. ENGINE PAGES
   ========================================================================== */

body.page-home-dark .engine-hero { background: #0c0c0c; }
body.page-home-dark .engine-hero h1 { color: #fff; }
body.page-home-dark .engine-hero img { border: 1px solid var(--s-border); }
body.page-home-dark .engine-stats { background: var(--s-bg, #0c0c0c); }
body.page-home-dark .engine-specs { background: var(--s-bg, #0c0c0c); }

body.page-home-dark .spec-block {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
}
body.page-home-dark .spec-block h3 { color: var(--s-text); }
body.page-home-dark .spec-block li { color: var(--s-text-secondary); }

body.page-home-dark .benchmark-grid { background: var(--s-bg); }
body.page-home-dark .benchmark-card {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
}

body.page-home-dark .dark-section .benchmark-card img,
body.page-home-dark .dark-section .prop-image img {
  filter: invert(0.85) hue-rotate(180deg);
}

body.page-home-dark .use-case-grid { background: var(--s-bg); }
body.page-home-dark .use-case-card {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
}
body.page-home-dark .use-case-card h3 { color: var(--s-text); }
body.page-home-dark .code-section { background: var(--s-bg); }
body.page-home-dark .future-integration { background: var(--s-bg); }

body.page-home-dark .timeline { border-color: var(--s-border); }
body.page-home-dark .timeline-item {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
}
body.page-home-dark .timeline-item h3 { color: var(--s-text); }
body.page-home-dark .timeline-item::before {
  background: var(--accent);
  border-color: var(--s-bg);
}

/* ==========================================================================
   31. ABOUT PAGE
   ========================================================================== */

body.page-home-dark .about-intro { background: var(--s-bg); }
body.page-home-dark .about-intro svg { filter: invert(0.85) hue-rotate(180deg); opacity: 0.7; }
body.page-home-dark .mission-vision { background: var(--s-bg); }

/* ==========================================================================
   32. PRODUCT PAGE
   ========================================================================== */

body.page-home-dark .hardware-viewer-section { background: var(--s-bg); }

body.page-home-dark #model-viewer-container {
  background: #0c0c0c;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  border-radius: 0;
}

body.page-home-dark #model-canvas {
  background: #0c0c0c !important;
  width: 100%;
  height: 500px;
}

body.page-home-dark .loading-indicator {
  background: #0c0c0c;
  color: var(--s-text-muted);
}
body.page-home-dark .loading-indicator p { color: var(--s-text-muted); }

body.page-home-dark .spinner {
  border-color: rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
}

body.page-home-dark .architecture-diagram-container {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
}
body.page-home-dark .dark-section .architecture-diagram-container img {
  filter: invert(0.85) hue-rotate(180deg);
}
body.page-home-dark .diagram-watermark { color: var(--s-surface-hover); }
body.page-home-dark .diagram-note {
  background: var(--s-surface);
  border-left-color: var(--s-border);
  color: var(--s-text-secondary);
}

/* ==========================================================================
   33. OLD CTA SECTION / PAGE HERO
   ========================================================================== */

body.page-home-dark .cta-section {
  background: var(--s-bg, #0c0c0c);
  border-top: 1px solid var(--s-border, rgba(255, 255, 255, 0.1));
}
body.page-home-dark .cta-section h2 { color: var(--s-text, #fff); }
body.page-home-dark .cta-section p { color: var(--s-text-secondary); }

body.page-home-dark .page-hero { background: #0c0c0c; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
body.page-home-dark .page-hero h1 { color: #fff; }
body.page-home-dark .page-hero p,
body.page-home-dark .page-hero .lead { color: rgba(255, 255, 255, 0.55); }

body.page-home-dark .section { background: var(--s-bg, #0c0c0c); }
body.page-home-dark .section-alt { background: var(--s-bg, #0c0c0c); }
body.page-home-dark .section-header h2 { color: var(--s-text, #fff); }
body.page-home-dark .section-header p { color: var(--s-text-secondary); }
body.page-home-dark .section-eyebrow { color: var(--s-accent-text, var(--s-text-muted)); }

/* ==========================================================================
   34. BLOG / DOC CONTENT (old patterns)
   ========================================================================== */

body.page-home-dark .blog-content,
body.page-home-dark .doc-content,
body.page-home-dark .case-study-content,
body.page-home-dark .whitepaper-content { color: var(--s-text-secondary); }

body.page-home-dark .blog-content h2,
body.page-home-dark .doc-main h2,
body.page-home-dark .case-study-main h2,
body.page-home-dark .whitepaper-content h2 { color: var(--s-text); font-family: var(--font-display); }

body.page-home-dark .blog-content h3,
body.page-home-dark .doc-main h3,
body.page-home-dark .case-study-main h3,
body.page-home-dark .whitepaper-content h3 { color: var(--s-text); font-family: var(--font-display); }

body.page-home-dark .blog-date { color: var(--s-text-muted); }

/* ==========================================================================
   35. LABELS / METRICS
   ========================================================================== */

body.page-home-dark .case-study-label,
body.page-home-dark .whitepaper-label {
  color: var(--s-text-muted);
  border: 1px solid var(--s-border);
  font-family: var(--font-body);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

body.page-home-dark .results-grid .stat-value { color: var(--s-text); }
body.page-home-dark .metrics-comparison {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
}

/* ==========================================================================
   36. ADMIN PAGE
   ========================================================================== */

body.page-home-dark .admin-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
  color: #fff;
}

body.page-home-dark .admin-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 24px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.page-home-dark .admin-controls input[type="password"] {
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  min-width: 200px;
}

body.page-home-dark .admin-controls input:focus { outline: none; border-color: var(--accent); }

body.page-home-dark .admin-btn {
  padding: 12px 20px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.3s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.55);
}
body.page-home-dark .admin-btn:hover { opacity: 0.7; }
body.page-home-dark .admin-btn.primary { background: #fff; border-color: #fff; color: #0c0c0c; }
body.page-home-dark .admin-btn.danger {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.5);
}

body.page-home-dark .admin-tabs { display: flex; gap: 8px; margin-bottom: 32px; }

body.page-home-dark .admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: opacity 0.3s ease-out;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
}
body.page-home-dark .admin-tab:hover { color: #fff; }
body.page-home-dark .admin-tab.active { background: #fff; border-color: #fff; color: #0c0c0c; }

body.page-home-dark .table-container {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

body.page-home-dark #status { margin-left: auto; font-size: 14px; color: rgba(255, 255, 255, 0.4); }
body.page-home-dark .ok { color: var(--accent); }

body.page-home-dark .admin-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}
body.page-home-dark .admin-footer p { font-size: 13px; color: rgba(255, 255, 255, 0.35); }
body.page-home-dark .small-btn { padding: 6px 12px; font-size: 12px; }

/* ==========================================================================
   37. LISTS
   ========================================================================== */

body.page-home-dark ul li,
body.page-home-dark ol li { color: var(--s-text-secondary, rgba(255, 255, 255, 0.55)); }
body.page-home-dark ul li::marker { color: var(--s-text-muted, rgba(255, 255, 255, 0.4)); }

/* ==========================================================================
   38. SCROLLBAR
   ========================================================================== */

body.page-home-dark ::-webkit-scrollbar { width: 6px; }
body.page-home-dark ::-webkit-scrollbar-track { background: #0c0c0c; }
body.page-home-dark ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); }
body.page-home-dark ::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* ==========================================================================
   39. 404 PAGE
   ========================================================================== */

body.page-home-dark .error-content h1,
body.page-home-dark .error-content h2 { color: var(--s-text, #fff); }
body.page-home-dark .error-content p { color: var(--s-text-secondary); }

/* ==========================================================================
   40. CONTACT SPLIT
   ========================================================================== */

body.page-home-dark .split-section > .split-text + .split-text { padding-left: 0; }

/* ==========================================================================
   41. PAGE TRANSITION (diagonal wipe)
   ========================================================================== */

body.page-home-dark .page-transition {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  overflow: hidden;
  display: none;
}

/* JS adds .reveal or .cover to show the overlay */
body.page-home-dark .page-transition.reveal,
body.page-home-dark .page-transition.cover {
  display: block;
}

body.page-home-dark .page-transition.active {
  pointer-events: all;
}

/* Wipe shapes — oversized + rotated for subtle diagonal edge */
body.page-home-dark .pt-wipe {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  transform: rotate(14deg);
  will-change: transform;
}

body.page-home-dark .pt-wipe-1 { background: #222; }
body.page-home-dark .pt-wipe-2 { background: var(--bg-dark, #0c0c0c); z-index: 1; }

/* Centered wordmark */
body.page-home-dark .pt-logo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
}

/* REVEAL — hold logo, then shapes sweep right with gap for gray flash */
body.page-home-dark .page-transition.reveal .pt-wipe-2 {
  animation: ptWipeOut 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.35s forwards;
}
body.page-home-dark .page-transition.reveal .pt-wipe-1 {
  animation: ptWipeOut 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.55s forwards;
}
body.page-home-dark .page-transition.reveal .pt-logo {
  animation: ptFadeOut 0.3s ease 0.15s forwards;
}

/* COVER — shapes enter from left, logo fades in while covered */
body.page-home-dark .page-transition.cover .pt-wipe-1 {
  animation: ptWipeIn 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
body.page-home-dark .page-transition.cover .pt-wipe-2 {
  animation: ptWipeIn 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.12s forwards;
}
body.page-home-dark .page-transition.cover .pt-logo {
  opacity: 0;
  animation: ptFadeIn 0.35s ease 0.3s forwards;
}

@keyframes ptWipeOut {
  from { transform: translateX(0%) rotate(14deg); }
  to   { transform: translateX(110%) rotate(14deg); }
}
@keyframes ptWipeIn {
  from { transform: translateX(-110%) rotate(14deg); }
  to   { transform: translateX(0%) rotate(14deg); }
}
@keyframes ptFadeOut { to { opacity: 0; } }
@keyframes ptFadeIn  { to { opacity: 1; } }

/* ==========================================================================
   42. SECTION DIVIDER LINES (scroll-triggered)
   ========================================================================== */

body.page-home-dark .section-divider {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  height: 1px;
  position: relative;
  overflow: hidden;
}

body.page-home-dark .section-divider::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--s-border, rgba(255, 255, 255, 0.1));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

body.page-home-dark .section-divider.drawn::after {
  transform: scaleX(1);
}

/* Cream variant */
body.page-home-dark .cream-section .section-divider::after {
  background: rgba(0, 0, 0, 0.1);
}

/* Dark variant */
body.page-home-dark .dark-section .section-divider::after {
  background: rgba(255, 255, 255, 0.1);
}

/* Between-section dividers (full-width, placed between sections) */
body.page-home-dark .section-divider-full {
  width: 100%;
  height: 1px;
  position: relative;
  overflow: hidden;
  background: transparent;
}

body.page-home-dark .section-divider-full::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

body.page-home-dark .section-divider-full.drawn::after {
  transform: scaleX(1);
}

/* ==========================================================================
   43. RESOURCE PAGES — DESKTOP BASE STYLES (unstyled components)
   ========================================================================== */

/* Principles grid (safety-architecture.html) */
body.page-home-dark .principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

body.page-home-dark .principle-card {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  padding: 1.5rem;
}

body.page-home-dark .principle-card h4 {
  font-size: 0.95rem;
  margin: 0 0 0.75rem;
  color: var(--s-text);
}

body.page-home-dark .principle-card p {
  font-size: 0.9rem;
  color: var(--s-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Layers diagram (safety-architecture.html) */
body.page-home-dark .layers-diagram {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

body.page-home-dark .layer {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--s-border);
  border-bottom: none;
  background: var(--s-surface);
}

body.page-home-dark .layer:last-child {
  border-bottom: 1px solid var(--s-border);
}

body.page-home-dark .layer h4 {
  font-size: 0.9rem;
  margin: 0 0 0.25rem;
  color: var(--s-text);
}

body.page-home-dark .layer p {
  font-size: 0.85rem;
  color: var(--s-text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Blog CTA box padding */
body.page-home-dark .blog-cta {
  padding: 1.5rem;
}

/* Comparison diagram (federated-learning.html) */
body.page-home-dark .comparison-diagram {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

body.page-home-dark .comparison-item {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  padding: 1.5rem;
}

body.page-home-dark .comparison-item h4 {
  font-size: 0.95rem;
  margin: 0 0 0.75rem;
  color: var(--s-text);
}

body.page-home-dark .comparison-item ol {
  color: var(--s-text-secondary);
  padding-left: 1.25rem;
  margin: 0 0 1rem;
  line-height: 1.7;
}

body.page-home-dark .comparison-item .warning-text {
  color: #d97706;
  font-size: 0.85rem;
  font-weight: 500;
}

body.page-home-dark .comparison-item .success-text {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Calculation box (economics-of-yield.html) */
body.page-home-dark .calculation-box {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  padding: 1.5rem;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
}

body.page-home-dark .calculation-box h4 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--s-text-muted);
  margin: 0 0 1rem;
  font-weight: 600;
  font-family: var(--font-body);
}

body.page-home-dark .calculation-box p {
  color: var(--s-text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

body.page-home-dark .calculation-box p:last-child { margin-bottom: 0; }

/* ==========================================================================
   44. RESOURCE PAGES — MOBILE RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {

  /* --- Hero sections with inline padding-top: 12rem --- */
  body.page-home-dark .dark-section[style*="padding-top: 12rem"] {
    padding-top: 8rem !important;
  }

  /* --- Article content (blog, whitepaper, doc main) --- */
  body.page-home-dark .article-content {
    max-width: 100%;
    overflow-x: hidden;
  }

  body.page-home-dark .article-content h2 {
    font-size: 1.35rem;
    margin-top: 2.5rem;
  }

  body.page-home-dark .article-content h3 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
  }

  body.page-home-dark .article-content p,
  body.page-home-dark .article-content li {
    font-size: 0.95rem;
  }

  /* --- Doc layout sidebar on mobile --- */
  body.page-home-dark .doc-sidebar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  body.page-home-dark .doc-sidebar li {
    margin-bottom: 0;
  }

  body.page-home-dark .doc-sidebar a {
    display: block;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    background: var(--s-surface);
    border: 1px solid var(--s-border);
  }

  /* --- Tables: scrollable on mobile --- */
  body.page-home-dark .doc-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.page-home-dark .doc-table table,
  body.page-home-dark .metrics-comparison table,
  body.page-home-dark .article-content table {
    min-width: 500px;
  }

  body.page-home-dark .article-content th,
  body.page-home-dark .article-content td,
  body.page-home-dark .doc-table th,
  body.page-home-dark .doc-table td {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  /* --- Metrics comparison table --- */
  body.page-home-dark .metrics-comparison {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* --- Code blocks --- */
  body.page-home-dark .code-block pre,
  body.page-home-dark .code-box pre,
  body.page-home-dark pre {
    padding: 1rem;
  }

  body.page-home-dark .code-block code,
  body.page-home-dark .code-box code {
    font-size: 0.75rem;
  }

  /* --- Equation boxes --- */
  body.page-home-dark .equation-box {
    padding: 1rem;
    overflow-x: auto;
  }

  body.page-home-dark .equation-box p {
    font-size: 0.85rem;
    white-space: nowrap;
  }

  /* --- Info / Warning / Algorithm boxes --- */
  body.page-home-dark .info-box,
  body.page-home-dark .warning-box {
    padding: 1rem;
    font-size: 0.85rem;
  }

  body.page-home-dark .algorithm-box {
    padding: 1rem;
  }

  /* --- Principles grid → single column --- */
  body.page-home-dark .principles-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  body.page-home-dark .principle-card {
    padding: 1.25rem;
  }

  /* --- Layers diagram --- */
  body.page-home-dark .layer {
    padding: 1rem;
  }

  /* --- Case study layout → single column --- */
  body.page-home-dark .case-study-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  body.page-home-dark .case-study-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  body.page-home-dark .sidebar-card {
    padding: 1rem;
  }

  body.page-home-dark .sidebar-card h4 {
    font-size: 0.65rem;
  }

  body.page-home-dark .sidebar-card p {
    font-size: 0.85rem;
  }

  /* --- Resource hub: feature-block headings --- */
  body.page-home-dark .resource-list-section .feature-block h4 {
    font-size: 1.15rem;
  }

  /* --- Lead text --- */
  body.page-home-dark .lead {
    font-size: 1rem;
  }

  /* --- Blog CTA --- */
  body.page-home-dark .blog-cta {
    padding: 1.25rem;
  }

  /* --- References --- */
  body.page-home-dark .references ol {
    padding-left: 1.25rem;
    font-size: 0.8rem;
  }

  /* --- Checklist --- */
  body.page-home-dark .checklist li {
    font-size: 0.9rem;
  }

  /* --- FAQ details --- */
  body.page-home-dark details {
    padding: 1rem;
  }

  body.page-home-dark details.faq-item summary {
    font-size: 0.95rem;
  }

  body.page-home-dark details.faq-item p {
    font-size: 0.9rem;
    padding-left: 1.5rem;
  }

  /* --- Breadcrumb + article meta --- */
  body.page-home-dark .breadcrumb {
    font-size: 0.65rem;
  }

  body.page-home-dark .article-meta {
    font-size: 0.65rem;
  }

  /* --- Doc/whitepaper footers --- */
  body.page-home-dark .doc-footer,
  body.page-home-dark .whitepaper-footer {
    font-size: 0.85rem;
  }

  /* --- Blog author --- */
  body.page-home-dark .blog-author {
    font-size: 0.9rem;
  }

  /* --- Comparison diagram → single column --- */
  body.page-home-dark .comparison-diagram {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  body.page-home-dark .comparison-item {
    padding: 1.25rem;
  }

  /* --- Calculation box --- */
  body.page-home-dark .calculation-box {
    padding: 1rem;
    overflow-x: auto;
  }

  body.page-home-dark .calculation-box p {
    font-size: 0.85rem;
  }
}

/* Extra small screens */
@media (max-width: 480px) {

  body.page-home-dark .dark-section[style*="padding-top: 12rem"] {
    padding-top: 7rem !important;
  }

  body.page-home-dark .case-study-sidebar {
    grid-template-columns: 1fr;
  }

  body.page-home-dark .cta-dark h1 {
    font-size: 1.75rem;
  }

  body.page-home-dark .cta-dark h2 {
    font-size: 1.35rem;
  }

  body.page-home-dark .doc-table table,
  body.page-home-dark .metrics-comparison table,
  body.page-home-dark .article-content table {
    min-width: 400px;
  }

  body.page-home-dark .article-content th,
  body.page-home-dark .article-content td,
  body.page-home-dark .doc-table th,
  body.page-home-dark .doc-table td {
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
  }

  body.page-home-dark .equation-box {
    padding: 0.75rem;
  }
}
