/*
Theme Name: NEXUSAI
Theme URI: https://royalblue-penguin-196057.hostingersite.com
Author: NEXUSAI
Author URI: https://royalblue-penguin-196057.hostingersite.com
Description: Cyberpunk dark blog theme. Neon red accents, glass cards, grid background, Syne + DM Mono typography.
Version: 1.9.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nexusai
Tags: dark, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, blog
*/

:root {
  --bg: #050508;
  --bg-elev: #0b0b12;
  --accent: #e8001d;
  --accent-glow: rgba(232, 0, 29, 0.55);
  --accent-soft: rgba(232, 0, 29, 0.12);
  --text: #e8e8ee;
  --text-dim: #8d8da0;
  --border: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(20, 20, 28, 0.5);
  --glass-border: rgba(232, 0, 29, 0.2);
  --grid-color: rgba(232, 0, 29, 0.045);
  --font-display: 'Syne', system-ui, sans-serif;
  --font-mono: 'DM Mono', 'JetBrains Mono', ui-monospace, monospace;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg { max-width: 100%; height: auto; display: block; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 56px 56px;
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(232, 0, 29, 0.10), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s, text-shadow 0.15s; }
a:hover, a:focus-visible { text-shadow: 0 0 8px var(--accent-glow); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.container {
  width: min(100% - 2.4rem, 1200px);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.custom-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.custom-logo {
  max-height: 48px;
  width: auto;
  display: block;
}

body.nav-open { overflow: hidden; }

/* ---------- Navbar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 8, 0.75);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-block: 1rem;
  gap: 1.5rem;
}
.site-nav { margin-left: auto; }
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
}
.site-logo:hover { text-shadow: none; }
.site-logo__hex {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 0 6px var(--accent-glow));
  flex-shrink: 0;
}
.site-logo__hex path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.site-logo__name { letter-spacing: 0.04em; }
.site-logo__name span { color: var(--accent); }

.nav__list {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__list a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
}
.nav__list a:hover,
.nav__list .current-menu-item > a {
  color: var(--accent);
  text-shadow: 0 0 6px var(--accent-glow);
}

/* ---------- Page hero ---------- */
.page-hero {
  padding-block: 4.5rem 3rem;
  text-align: center;
}
.page-hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.page-hero__title {
  font-size: clamp(2.2rem, 5.2vw, 3.8rem);
  margin: 0;
}

/* Home hero — large animated brand mark */
.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin: 0.25rem 0 0.5rem;
  font-weight: inherit;
}
.hero-brand__mark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.hero-brand__hex {
  width: clamp(56px, 12vw, 80px);
  height: clamp(56px, 12vw, 80px);
  flex-shrink: 0;
  background: transparent;
}
.hero-brand--icon-only {
  gap: 0;
  margin: 0.5rem 0 0.25rem;
}
.hero-brand--icon-only .hero-brand__mark {
  gap: 0;
}
.hero-brand--icon-only .hero-brand__hex {
  width: clamp(80px, 20vw, 112px);
  height: clamp(80px, 20vw, 112px);
}
.hero-brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5.2vw, 3.8rem);
  letter-spacing: 0.06em;
  color: var(--text);
  line-height: 1.1;
}
.hero-brand__name span { color: var(--accent); }
.hero-brand__tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.page-hero__lead {
  margin: 1rem auto 0;
  color: var(--text-dim);
  max-width: 60ch;
  font-size: 1.05rem;
}
.page-hero__cta {
  margin-top: 1.6rem;
}
.btn-shop {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 8px;
  box-shadow: 0 0 20px var(--accent-glow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-shop:hover,
.btn-shop:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--accent-glow);
  text-shadow: none;
}

/* ---------- Category product banner (SYSTEM 3C) ---------- */
.shop-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0 0 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 20px var(--accent-glow);
}
.shop-banner__text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.shop-banner__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.shop-banner__title {
  font-size: 1.15rem;
  color: var(--text);
}

/* ---------- Card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
  padding-bottom: 3rem;
}

.post-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 16px 50px -16px var(--accent-glow);
}
.post-card__media-link { display: block; }
.post-card__media {
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, #20000a, #050508),
    radial-gradient(circle at 70% 30%, var(--accent-soft), transparent 60%);
  position: relative;
  overflow: hidden;
}
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body {
  padding: 1.4rem 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}
.post-card__meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
}
.post-card__meta::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  border-radius: 1px;
}
.post-card__title {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0;
}
.post-card__title a { color: var(--text); }
.post-card__title a:hover { color: var(--accent); }
.post-card__excerpt {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.6;
}
.post-card__cta {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
}

/* ---------- Pagination ---------- */
.nav-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding-block: 2rem 4rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav-links .page-numbers {
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
}
.nav-links .page-numbers:hover,
.nav-links .current {
  color: var(--accent);
  border-color: var(--accent);
  text-shadow: 0 0 6px var(--accent-glow);
}

/* ---------- Single article ---------- */
.article {
  padding-block: 3rem 2rem;
  max-width: 760px;
  margin-inline: auto;
}
.article__header { text-align: center; margin-bottom: 2.5rem; }
.article__title { font-size: clamp(2rem, 4.4vw, 3.2rem); margin: 0.4rem 0 0; }
.article__meta {
  margin-top: 1rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.75rem;
}
.article__featured {
  margin: 0 0 2rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px -20px var(--accent-glow);
}
.article__content { font-size: 1.05rem; line-height: 1.8; color: #d6d6dc; }
.article__content > * + * { margin-top: 1.2rem; }
.article__content h1, .article__content h2, .article__content h3, .article__content h4 {
  margin-top: 2.4rem; margin-bottom: 0.8rem;
}
.article__content h2 { font-size: 1.7rem; }
.article__content h3 { font-size: 1.3rem; }
.article__content a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); padding-bottom: 1px; }
.article__content a:hover { border-bottom-color: var(--accent); }
.article__content blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.4rem;
  background: var(--glass-bg);
  margin: 1.6rem 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text);
}
.article__content code {
  font-family: var(--font-mono);
  background: var(--bg-elev);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--accent);
  border: 1px solid var(--border);
}
.article__content pre {
  background: var(--bg-elev);
  padding: 1.2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow-x: auto;
}
.article__content pre code { background: transparent; padding: 0; border: 0; color: var(--text); }
.article__content ul, .article__content ol { padding-left: 1.6rem; }
.article__content li + li { margin-top: 0.4rem; }
.article__content img { border-radius: 8px; max-width: 100%; height: auto; }
.article__content .wp-block-image img,
.article__content figure { margin-inline: auto; }
.article__content .wp-block-button__link,
.article__content .wp-element-button {
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.75rem 1.4rem;
  border: none;
  box-shadow: 0 0 16px var(--accent-glow);
}
.article__content .wp-block-button__link:hover {
  color: #fff;
  text-shadow: none;
  filter: brightness(1.08);
}
.article__content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.article__content th,
.article__content td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.75rem;
  text-align: left;
}
.article__pages { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); margin-top: 2rem; }

/* ---------- Newsletter CTA ---------- */
.newsletter-wrap {
  margin-top: 3rem;
  padding-inline: max(1.2rem, calc((100% - 1200px) / 2 + 1.2rem));
}
.newsletter {
  margin: 0 auto 3rem;
  padding: 3rem 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.newsletter::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 100% at 50% 0%, var(--accent-glow), transparent 65%);
  opacity: 0.22;
  pointer-events: none;
}
.newsletter > * { position: relative; }
.newsletter__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--accent);
  text-transform: uppercase;
}
.newsletter__title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin: 0.6rem 0 0.8rem;
}
.newsletter__lead {
  color: var(--text-dim);
  max-width: 52ch;
  margin: 0 auto 1.6rem;
}
.newsletter__form {
  display: flex;
  gap: 0.6rem;
  max-width: 480px;
  margin-inline: auto;
}
.newsletter__input {
  flex: 1;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.newsletter__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.newsletter__button {
  padding: 0.85rem 1.4rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 700;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.newsletter__button:hover {
  box-shadow: 0 0 22px var(--accent-glow);
  transform: translateY(-1px);
}

/* ---------- Animated hex logo ---------- */
@keyframes hexPulse {
  0%, 100% { stroke-dashoffset: 0;    opacity: 1; }
  50%       { stroke-dashoffset: -40; opacity: 0.6; }
}
@keyframes hexGlow {
  0%, 100% { filter: drop-shadow(0 0 4px var(--accent-glow)); }
  50%       { filter: drop-shadow(0 0 12px var(--accent-glow)); }
}
@keyframes hexRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.site-logo__hex, .footer-hex, .hero-brand__hex {
  animation: hexGlow 3s ease-in-out infinite;
}
.site-logo__hex .hex-outer,
.footer-hex .hex-outer,
.hero-brand__hex .hex-outer {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-dasharray: 140;
  animation: hexPulse 4s ease-in-out infinite;
}
.site-logo__hex .hex-inner,
.footer-hex .hex-inner,
.hero-brand__hex .hex-inner {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linejoin: round;
  opacity: 0.7;
  stroke-dasharray: 80;
  animation: hexPulse 4s ease-in-out infinite 0.8s;
}
.site-logo__hex .hex-dot,
.footer-hex .hex-dot,
.hero-brand__hex .hex-dot {
  fill: var(--accent);
  opacity: 0.9;
  animation: hexGlow 2.5s ease-in-out infinite 0.4s;
}
.site-logo__hex { width: 36px; height: 36px; flex-shrink: 0; }

/* ---------- Sticky header shadow ---------- */
.site-header--scrolled {
  box-shadow: 0 4px 32px -8px rgba(232, 0, 29, 0.25);
}

/* ---------- Nav active / hover ---------- */
.nav__list .current-menu-item > a,
.nav__list .current-menu-ancestor > a {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow);
}
.nav__list a::after {
  content: '';
  display: block;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
  margin-top: 2px;
}
.nav__list a:hover::after,
.nav__list .current-menu-item > a::after { transform: scaleX(1); }

/* ---------- Hamburger toggle button ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s;
  /* position required for z-index to apply — keeps the toggle on its own
     layer above the absolutely-positioned open dropdown (.nav__list--open). */
  position: relative;
  z-index: 110;
}
.nav-toggle:hover { border-color: var(--accent); }
.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.28s ease, opacity 0.2s ease, width 0.2s ease;
  transform-origin: center;
}
.nav-toggle--open .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle--open .nav-toggle__bar:nth-child(2) { opacity: 0; width: 0; }
.nav-toggle--open .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 3.5rem 2rem;
  color: var(--text-dim);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem 3rem;
  margin-bottom: 2.5rem;
}

/* Footer brand */
.footer-brand { display: flex; flex-direction: column; gap: 0.9rem; }
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.footer-logo__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--text);
}
.footer-logo__name span { color: var(--accent); }
.footer-hex { width: 36px; height: 36px; flex-shrink: 0; }
.footer-tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Social links */
.footer-social {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.2rem;
}
.footer-social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.footer-social__link svg { width: 16px; height: 16px; }
.footer-social__link:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  text-shadow: none;
}

/* Footer column */
.footer-col__title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.footer-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer-nav__list a {
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: color 0.15s;
  text-decoration: none;
}
.footer-nav__list a:hover {
  color: var(--accent);
  text-shadow: 0 0 6px var(--accent-glow);
}

/* Footer bottom */
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  text-align: center;
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .container { width: min(100% - 1.6rem, 1200px); }
  .page-hero { padding-block: 3rem 2rem; }
  .page-hero__lead { font-size: 1rem; }

  /* Show hamburger, hide inline nav */
  .nav-toggle {
    display: flex;
    margin-left: auto;
  }
  .site-nav {
    position: static;
    margin-left: 0;
    order: 3;
    width: 100%;
  }
  .nav__list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(5, 5, 8, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    z-index: 999;
    max-height: min(70vh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav__list--open { display: flex; }
  .nav__list li { border-bottom: 1px solid var(--border); }
  .nav__list a {
    display: block;
    padding: 0.85rem 1.4rem;
    font-size: 12px;
    letter-spacing: 0.14em;
  }
  .nav__list a::after { display: none; }

  .site-header { position: sticky; z-index: 1000; }
  .site-header__inner {
    position: relative;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    padding-block: 0.85rem;
  }

  .shop-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.15rem;
  }
  .shop-banner .btn-shop { width: 100%; text-align: center; }

  .card-grid { gap: 1.15rem; padding-bottom: 2rem; }
  .post-card__body { padding: 1.15rem 1.15rem 1.35rem; }
  .nav-links { flex-wrap: wrap; padding-block: 1.5rem 3rem; }

  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .article { padding-inline: 0.25rem; }
  .newsletter-wrap { padding-inline: 0.8rem; }
  .newsletter { padding: 2.2rem 1.25rem; margin-bottom: 2rem; }
  .newsletter__form { flex-direction: column; }
  .newsletter__button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Sticky header height — updated by JS for scroll-margin accuracy. */
:root { --header-h: 68px; }

/* TOC / heading anchors must not land hidden behind the sticky header. */
.article__content [id],
.article__content :is(h1, h2, h3, h4) {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* Newsletter submit status */
.newsletter__status {
  margin: 0.75rem 0 0;
  min-height: 1.2em;
  font-size: 0.9rem;
  color: var(--text-dim);
}
.newsletter__status.is-success { color: var(--ok, #22c55e); }
.newsletter__status.is-error { color: var(--accent); }

/* ---------- Homepage shop section ---------- */
.home-shop {
  width: 100%;
  background: #0a0a0a;
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 4rem;
  margin-top: 1rem;
}
.home-shop__inner {
  width: min(100% - 2.4rem, 1200px);
  margin-inline: auto;
}
.home-shop__header {
  text-align: center;
  max-width: 52ch;
  margin: 0 auto 2.5rem;
}
.home-shop__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.65rem;
}
.home-shop__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 0.75rem;
  color: var(--text);
}
.home-shop__subtitle {
  margin: 0;
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.6;
}
.home-shop__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.home-shop__card {
  background: #111;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.home-shop__card:hover {
  border-color: rgba(204, 34, 34, 0.45);
  box-shadow: 0 12px 40px -16px rgba(204, 34, 34, 0.35);
}
.home-shop__carousel {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #000;
}
.home-shop__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.55s ease;
}
.home-shop__slide.is-active { opacity: 1; }
.home-shop__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  padding: 0.35rem 0.55rem;
  background: #cc2222;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  line-height: 1.1;
  pointer-events: none;
}
.home-shop__badge-code {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}
.home-shop__badge-off {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
}
.home-shop__body {
  padding: 1.15rem 1.2rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}
.home-shop__name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.3;
}
.home-shop__price {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: #cc2222;
}
.home-shop__desc {
  margin: 0 0 0.35rem;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.55;
  flex: 1;
}
.home-shop__btn {
  display: inline-block;
  margin-top: auto;
  padding: 0.7rem 1rem;
  background: #cc2222;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}
.home-shop__btn:hover {
  color: #fff;
  filter: brightness(1.08);
  box-shadow: 0 0 18px rgba(204, 34, 34, 0.45);
  text-shadow: none;
}

@media (max-width: 900px) {
  .home-shop__grid { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
}

@media (max-width: 720px) {
  .home-shop { padding: 2.5rem 0 3rem; }
  .home-shop__inner { width: min(100% - 1.6rem, 1200px); }
}

/* Hide the HubSpot branding footer on the inline newsletter form.
   The form is mounted inline (v2.js forms.create, not the .hs-form-frame
   iframe embed), so it renders in this document and parent CSS can reach it. */
.newsletter__form .hs-form__footer,
.newsletter__form .hs-form__virality-link { display: none !important; }

/* =========================================================================
 * NexusAI front-page landing — matrix-green particle aesthetic
 * Scoped under .nxs-* so it never affects the blog/article styling above.
 * ====================================================================== */
.nxs-hero,
.nxs-services,
.nxs-stats,
.nxs-cta {
  --nxs-bg: #050a05;
  --nxs-bg-2: #0a0f0a;
  --nxs-green: #00ff41;
  --nxs-green-2: #39ff14;
  --nxs-purple: #6366f1;
  --nxs-text: #ffffff;
  --nxs-dim: #b4d6bf;
  --nxs-line: rgba(0, 255, 65, 0.14);
  --nxs-shell: 1120px;
}

.nxs-shell {
  width: 100%;
  max-width: var(--nxs-shell);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

.nxs-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--nxs-green-2);
  margin: 0 0 1.2rem;
  text-shadow: 0 0 14px rgba(0, 255, 65, 0.6);
}

/* ---- HERO ------------------------------------------------------------- */
.nxs-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(60% 50% at 50% 18%, rgba(0, 255, 65, 0.08), transparent 70%),
    radial-gradient(50% 50% at 82% 88%, rgba(99, 102, 241, 0.10), transparent 70%),
    var(--nxs-bg);
}

.nxs-hero .nxs-particles,
.nxs-cta .nxs-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

/* Dark contrast scrim between the particle canvas and the hero text. */
.nxs-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(60% 55% at 50% 48%, rgba(2, 6, 3, 0.78), rgba(2, 6, 3, 0.35) 55%, transparent 80%);
}

.nxs-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 940px;
  /* Symmetric padding so the flex-centred block stays at the true centre. */
  padding: 2rem clamp(20px, 5vw, 40px);
}

.nxs-hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-size: clamp(3.1rem, 9vw, 6.6rem);
  color: #ffffff;
  margin: 0 0 1.5rem;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.85), 0 0 50px rgba(0, 255, 65, 0.18);
}

.nxs-hero__accent {
  display: block;
  color: var(--nxs-green-2);
  text-shadow: 0 0 30px rgba(0, 255, 65, 0.75), 0 0 70px rgba(0, 255, 65, 0.4);
}

.nxs-hero__sub {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  line-height: 1.55;
  color: #e7f6ec;
  max-width: 680px;
  margin: 0 auto 2.6rem;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
}

.nxs-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ---- Buttons ---------------------------------------------------------- */
.nxs-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  padding: 1.15rem 2.3rem;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.18s ease;
  will-change: transform;
}
.nxs-btn span { transition: transform 0.18s ease; }
.nxs-btn:hover span { transform: translateX(3px); }

/* Primary: solid bright green, dark text — maximum prominence & contrast. */
.nxs-btn--glow {
  color: #03140a;
  font-weight: 700;
  border-color: var(--nxs-green-2);
  background: var(--nxs-green);
  box-shadow: 0 0 26px rgba(0, 255, 65, 0.55), 0 0 64px rgba(0, 255, 65, 0.3);
}
.nxs-btn--glow:hover,
.nxs-btn--glow:focus-visible {
  background: var(--nxs-green-2);
  box-shadow: 0 0 34px rgba(57, 255, 20, 0.8), 0 0 80px rgba(0, 255, 65, 0.45);
  transform: translateY(-3px);
  text-shadow: none;
}

/* Secondary: bold outline, bright text. */
.nxs-btn--ghost {
  color: #ffffff;
  border-color: var(--nxs-green);
  background: rgba(0, 255, 65, 0.08);
}
.nxs-btn--ghost:hover,
.nxs-btn--ghost:focus-visible {
  color: #ffffff;
  border-color: var(--nxs-green-2);
  background: rgba(0, 255, 65, 0.16);
  box-shadow: 0 0 24px rgba(0, 255, 65, 0.4);
  transform: translateY(-3px);
  text-shadow: none;
}

/* ---- Scroll cue ------------------------------------------------------- */
.nxs-hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 2;
  width: 24px;
  height: 40px;
  border: 1px solid rgba(0, 255, 65, 0.4);
  border-radius: 14px;
}
.nxs-hero__scroll span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--nxs-green);
  box-shadow: 0 0 8px var(--nxs-green);
  animation: nxs-scroll 1.8s ease-in-out infinite;
}
@keyframes nxs-scroll {
  0%   { opacity: 0; transform: translateY(0); }
  40%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(16px); }
}

/* ---- Section shells --------------------------------------------------- */
.nxs-services,
.nxs-stats,
.nxs-cta {
  position: relative;
  background: var(--nxs-bg);
  color: var(--nxs-text);
}
.nxs-services { padding: clamp(4rem, 9vw, 7rem) 0; }

.nxs-section__title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.015em;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  color: var(--nxs-text);
  margin: 0 0 0.8rem;
}
.nxs-section__lead {
  font-family: var(--font-body);
  color: var(--nxs-dim);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 560px;
  margin: 0 0 3rem;
}

/* ---- Service cards ---------------------------------------------------- */
.nxs-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.nxs-card {
  position: relative;
  padding: 1.9rem 1.7rem;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--nxs-bg-2), #070c07);
  border: 1px solid var(--nxs-line);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.3s ease;
}
.nxs-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 255, 65, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.25), 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 34px rgba(0, 255, 65, 0.22);
}
.nxs-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  color: var(--nxs-green);
  background: rgba(0, 255, 65, 0.08);
  border: 1px solid rgba(0, 255, 65, 0.25);
  margin-bottom: 1.1rem;
}
.nxs-card__icon svg { width: 22px; height: 22px; }
.nxs-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--nxs-text);
  margin: 0 0 0.5rem;
}
.nxs-card__text {
  font-family: var(--font-body);
  color: var(--nxs-dim);
  font-size: 0.96rem;
  line-height: 1.6;
  margin: 0;
}

/* ---- Stats ------------------------------------------------------------ */
.nxs-stats {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  border-top: 1px solid var(--nxs-line);
  border-bottom: 1px solid var(--nxs-line);
  background:
    radial-gradient(60% 120% at 50% 50%, rgba(0, 255, 65, 0.05), transparent 70%),
    var(--nxs-bg-2);
}
.nxs-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}
.nxs-stat__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1;
  color: var(--nxs-green);
  text-shadow: 0 0 22px rgba(0, 255, 65, 0.4);
}
.nxs-stat__label {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nxs-dim);
}

/* ---- Closing CTA ------------------------------------------------------ */
.nxs-cta {
  position: relative;
  overflow: hidden;
  padding: clamp(4.5rem, 10vw, 7.5rem) 0;
  text-align: center;
  background:
    radial-gradient(60% 80% at 50% 50%, rgba(99, 102, 241, 0.12), transparent 70%),
    var(--nxs-bg);
}
.nxs-cta__inner { position: relative; z-index: 2; }
.nxs-cta__title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.015em;
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  color: var(--nxs-text);
  margin: 0 0 1rem;
}
.nxs-cta__sub {
  font-family: var(--font-body);
  color: var(--nxs-dim);
  font-size: 1.06rem;
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto 2.2rem;
}
.nxs-cta .nxs-hero__cta { justify-content: center; }

/* ---- Feature-card background video ------------------------------------ */
.nxs-card--video {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.nxs-card__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  border: 0;
  pointer-events: none;
}
/* Dark scrim over the video so the icon/title/copy stay readable. */
.nxs-card__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.65);
  pointer-events: none;
}
/* Lift card content above both the video and the scrim. */
.nxs-card--video .nxs-card__icon,
.nxs-card--video .nxs-card__title,
.nxs-card--video .nxs-card__text {
  position: relative;
  z-index: 2;
}
/* Stronger green glow on hover reads well over moving video. */
.nxs-card--video:hover .nxs-card__scrim { background: rgba(0, 0, 0, 0.55); }

/* ---- Homepage navbar overlay ------------------------------------------ *
 * On the homepage the navbar floats transparently over the hero (absolute, out
 * of normal flow) so the hero fills the full viewport and "automate the digital.
 * on the dot." sits at the true vertical centre of the screen. Scoped to .home,
 * so interior pages (block-theme header) are unaffected. */
.home .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ---- Header logo video (navbar) --------------------------------------- *
 * Looping muted logo video, responsive and capped at 150px tall. The static
 * NEXUSAI text fallback is hidden while the video plays and revealed by JS
 * (onerror -> .is-video-failed) if the video can't load. */
.site-logo--video {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.site-logo__video {
  display: block;
  height: clamp(40px, 9vw, 150px);
  max-height: 150px;
  width: auto;
  object-fit: contain;
}
.site-logo__name--fallback { display: none; }
.site-logo--video.is-video-failed .site-logo__video { display: none; }
.site-logo--video.is-video-failed .site-logo__name--fallback { display: inline-flex; }

/* ---- Latest-from-engine heading (above the blog grid) ----------------- */
.nxs-latest-head {
  max-width: var(--nxs-shell, 1120px);
  margin: clamp(3rem, 7vw, 5rem) auto 0;
  padding: 0 clamp(20px, 5vw, 48px);
}
.nxs-latest-head .nxs-eyebrow { color: #00ff41; }
.nxs-latest-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin: 0;
}

@media (max-width: 720px) {
  .nxs-stats__grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
  .nxs-hero__inner { padding-top: 3.5rem; padding-bottom: 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .nxs-hero__scroll span { animation: none; }
  .nxs-btn,
  .nxs-card { transition: none; }
}

/* ---- Injected particle canvas on the Elementor front-page hero ---------
 * home-hero-particles.js drops a .nxs-particles canvas into the builder's
 * hero section (.hostinger-ai-background-image). `isolation: isolate` makes the
 * hero its own stacking context, so the canvas's negative z-index stays scoped
 * to this section — painted above the hero background image but behind ALL of
 * the hero content (no dependence on a specific text wrapper). Click-through so
 * the CTA stays interactive. */
.hostinger-ai-background-image {
  position: relative;
  isolation: isolate;
}
.hostinger-ai-background-image > canvas.nxs-particles--injected {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: -1;
  pointer-events: none;
}

/* ── Contact page (page-contact.php) ───────────────────────────────── */
.nxs-contact-section {
  background: var(--nxs-bg, #050a05);
  padding: 4rem 1.25rem 4.5rem;
}

.nxs-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-inline: auto;
}

.nxs-contact-card {
  border: 1px solid var(--nxs-line, rgba(0, 255, 65, 0.14));
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(0, 255, 65, 0.04), rgba(0, 255, 65, 0));
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.nxs-contact-card__eyebrow {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--nxs-green, #00ff41);
}

.nxs-contact-card__title {
  margin: 0;
  font-size: 1.3rem;
  color: var(--nxs-text, #fff);
}

.nxs-contact-card__body {
  margin: 0;
  color: var(--nxs-dim, #b4d6bf);
  line-height: 1.55;
}

.nxs-contact-card__link {
  margin-top: auto;
  font-weight: 600;
  color: var(--nxs-green, #00ff41);
  word-break: break-word;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.nxs-contact-card__link:hover,
.nxs-contact-card__link:focus-visible {
  border-bottom-color: var(--nxs-green, #00ff41);
}

.nxs-contact-card .footer-social {
  margin-top: auto;
}

.nxs-contact-body {
  padding-block: 2rem 1rem;
}

/* ── Related articles (single.php) ─────────────────────────────────── */
.related-posts {
  max-width: var(--nxs-shell, 1120px);
  margin: 3rem auto 0;
  padding: 2rem 1.25rem 0;
  border-top: 1px solid var(--nxs-line, rgba(0, 255, 65, 0.14));
}

.related-posts__eyebrow {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--nxs-green, #00ff41);
  margin: 0 0 1.1rem;
}

.related-posts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.related-posts__card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--nxs-line, rgba(0, 255, 65, 0.14));
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(0, 255, 65, 0.04), rgba(0, 255, 65, 0));
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.related-posts__card:hover,
.related-posts__card:focus-visible {
  border-color: var(--nxs-green, #00ff41);
  transform: translateY(-2px);
}

.related-posts__cat {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--nxs-green, #00ff41);
}

.related-posts__headline {
  color: var(--nxs-text, #fff);
  font-weight: 600;
  line-height: 1.35;
}
