/* =========================================================================
   StratAIgen — Design tokens & base styles
   Modern, techy, black / red / silver. Light mode by default, dark on toggle.
   ========================================================================= */

:root {
  /* Brand */
  --color-black: #0b0b0d;
  --color-red: #e11d2e;
  --color-red-dark: #b3121f;
  --color-red-soft: rgba(225, 29, 46, 0.12);
  --color-silver: #9a9aa2;
  --color-silver-light: #d4d4d8;

  /* Surface tokens (light default) */
  --color-bg: #f6f6f7;
  --color-bg-alt: #ffffff;
  --color-surface: #ffffff;
  --color-surface-2: #f1f1f3;
  --color-border: #e2e2e5;
  --color-text: #131316;
  --color-text-muted: #55555c;

  /* Chrome (header/footer) — stays dark in both themes */
  --chrome-bg: #0b0b0d;
  --chrome-text: #f4f4f5;
  --chrome-text-muted: #a8a8b3;
  --chrome-border: #232328;

  --shadow-sm: 0 1px 2px rgba(11, 11, 13, 0.06);
  --shadow-md: 0 10px 30px rgba(11, 11, 13, 0.08);
  --shadow-lg: 0 24px 60px rgba(11, 11, 13, 0.16);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --max-width: 1180px;
  --transition: 180ms ease;
}

/* Dark mode: follow system preference unless overridden */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #0d0d0f;
    --color-bg-alt: #111114;
    --color-surface: #17171b;
    --color-surface-2: #1c1c21;
    --color-border: #26262c;
    --color-text: #eceef0;
    --color-text-muted: #a4a4ad;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  }
}

/* Explicit override (from the theme toggle) wins regardless of system pref */
:root[data-theme="dark"] {
  --color-bg: #0d0d0f;
  --color-bg-alt: #111114;
  --color-surface: #17171b;
  --color-surface-2: #1c1c21;
  --color-border: #26262c;
  --color-text: #eceef0;
  --color-text-muted: #a4a4ad;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
}

:root[data-theme="light"] {
  --color-bg: #f6f6f7;
  --color-bg-alt: #ffffff;
  --color-surface: #ffffff;
  --color-surface-2: #f1f1f3;
  --color-border: #e2e2e5;
  --color-text: #131316;
  --color-text-muted: #55555c;
  --shadow-sm: 0 1px 2px rgba(11, 11, 13, 0.06);
  --shadow-md: 0 10px 30px rgba(11, 11, 13, 0.08);
  --shadow-lg: 0 24px 60px rgba(11, 11, 13, 0.16);
}

/* =========================================================================
   Reset & base
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  transition: background-color var(--transition), color var(--transition);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.25rem, 4vw + 1rem, 3.5rem); }
h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.25rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--color-text-muted); }
button { font: inherit; }

:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 2px;
}

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

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: 1em;
}

.section { padding: 88px 0; }
.section--alt { background: var(--color-bg-alt); }
.section--tight { padding: 56px 0; }

.section-head { max-width: 640px; margin: 0 0 48px; }
.section-head p { margin-bottom: 0; }

@media (max-width: 720px) {
  .section { padding: 56px 0; }
}

/* =========================================================================
   Buttons
   ========================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), background-color var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--color-red); color: #fff; }
.btn--primary:hover { background: var(--color-red-dark); }
.btn--outline { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.btn--outline:hover { border-color: var(--color-red); color: var(--color-red); }
.btn--chrome { background: transparent; border-color: var(--chrome-border); color: var(--chrome-text); }
.btn--chrome:hover { border-color: var(--color-red); color: #fff; }
.btn--sm { padding: 9px 16px; font-size: 0.85rem; }
.btn--block { width: 100%; justify-content: center; }

/* =========================================================================
   Header
   ========================================================================= */

.site-header {
  background: var(--chrome-bg);
  color: var(--chrome-text);
  border-bottom: 1px solid var(--chrome-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--chrome-text);
  flex-shrink: 0;
}
.logo-mark { border-radius: 8px; }
.logo-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.logo-word__accent { color: var(--color-red); }

.nav { flex: 1; }
.nav ul { display: flex; gap: 28px; }
.nav a {
  color: var(--chrome-text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.nav a:hover { color: var(--chrome-text); }
.nav a.active { color: var(--chrome-text); border-color: var(--color-red); }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--chrome-border);
  background: transparent;
  color: var(--chrome-text);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.theme-toggle:hover { border-color: var(--color-red); color: var(--color-red); }
.theme-toggle .icon { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--chrome-border);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 0 auto;
  background: var(--chrome-text);
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--chrome-bg);
    border-bottom: 1px solid var(--chrome-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }
  .nav.is-open { max-height: 400px; }
  .nav ul { flex-direction: column; gap: 0; padding: 8px 24px 20px; }
  .nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--chrome-border); }
  .site-header__actions .btn--sm { display: none; }
}

/* =========================================================================
   Hero
   ========================================================================= */

.hero {
  position: relative;
  padding: 110px 0 96px;
  background:
    radial-gradient(circle at 85% 0%, var(--color-red-soft), transparent 45%),
    var(--color-bg);
  overflow: hidden;
}
.hero__content { max-width: 720px; }
.hero h1 { margin-bottom: 0.4em; }
.hero p.lede { font-size: 1.15rem; max-width: 560px; }
.hero__actions { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }

.hero--sm { padding: 72px 0 64px; }
.hero--sm .hero__content { max-width: 640px; }

@media (max-width: 720px) {
  .hero { padding: 72px 0 56px; }
}

/* Stats strip */
.stats { padding: 0 0 88px; }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 40px 0;
}
.stat { text-align: center; }
.stat__number {
  display: block;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-red);
}
.stat__label { font-size: 0.9rem; color: var(--color-text-muted); }
@media (max-width: 720px) {
  .stats__grid { grid-template-columns: 1fr; gap: 28px; }
}

/* =========================================================================
   Feature cards
   ========================================================================= */

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-card img { width: 48px; height: 48px; margin-bottom: 20px; }
.feature-card h3 { margin-bottom: 0.5em; }
.feature-card p { margin-bottom: 0; }

@media (max-width: 900px) {
  .features__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .features__grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   Team
   ========================================================================= */

.team__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}
.team-member { text-align: left; }
.team-member img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}
.team-member h3 { margin-bottom: 0.2em; }
.team-member p { margin-bottom: 0; font-family: var(--font-mono); font-size: 0.85rem; color: var(--color-red); }
.team-member .team-bio { font-family: var(--font-sans); color: var(--color-text-muted); margin-top: 10px; }

/* =========================================================================
   Testimonials
   ========================================================================= */

.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.testimonial {
  margin: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-red);
  border-radius: var(--radius-md);
  padding: 28px;
}
.testimonial p { color: var(--color-text); font-size: 1.05rem; margin-bottom: 16px; }
.testimonial cite { font-style: normal; font-family: var(--font-mono); font-size: 0.85rem; color: var(--color-text-muted); }

@media (max-width: 720px) {
  .testimonials__grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   Post grid (services & blog listing cards)
   ========================================================================= */

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.post-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-card > a { display: block; }
.post-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--color-black); }
.post-card__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { margin-bottom: 0.4em; font-size: 1.1rem; }
.post-card p { margin-bottom: 0; flex: 1; }
.post-card time { display: block; margin-top: 14px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--color-silver); }
.post-card [data-category] { display: inline-block; font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-red); margin-top: 14px; }

@media (max-width: 900px) {
  .post-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .post-grid { grid-template-columns: 1fr; }
}

/* Category filter bar (Modo-generated buttons) */
.modo-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}
.modo-filterbar button,
[data-modo-cat] {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
[data-modo-cat].is-active,
[data-modo-cat]:hover {
  border-color: var(--color-red);
  color: var(--color-red);
}

.listing__footer { margin-top: 40px; text-align: center; }
[data-modo-loadmore] {
  display: inline-flex;
  margin: 40px auto 0;
}

/* =========================================================================
   Single post / service article
   ========================================================================= */

.post { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.post-header { padding: 64px 0 40px; text-align: left; }
.post-meta {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.post-meta span, .post-meta time { color: inherit; }
.post-hero {
  width: 100%;
  border-radius: var(--radius-lg);
  margin-top: 28px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--color-black);
}
.post-body { padding: 8px 0 48px; }
.post-body h2 { margin-top: 1.6em; }
.post-body p { color: var(--color-text); }
.post-body ul, .post-body ol { margin: 0 0 1.2em 1.2em; list-style: disc; color: var(--color-text); }
.post-body li { margin-bottom: 0.4em; }

/* =========================================================================
   CTA banner
   ========================================================================= */

.cta {
  background: var(--color-black);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px;
  margin: 0 24px;
  max-width: calc(var(--max-width) - 48px);
  text-align: center;
  background-image: radial-gradient(circle at 20% 20%, rgba(225, 29, 46, 0.25), transparent 55%);
}
.cta.section { margin-left: auto; margin-right: auto; }
.cta h2 { color: #fff; margin-bottom: 0.4em; }
.cta p { color: var(--chrome-text-muted); max-width: 480px; margin: 0 auto 28px; }
.cta .btn--outline { border-color: var(--chrome-border); color: #fff; }
.cta .btn--outline:hover { border-color: var(--color-red); color: var(--color-red); }

@media (max-width: 720px) {
  .cta { padding: 40px 24px; margin: 0 16px; }
}

/* =========================================================================
   Contact form
   ========================================================================= */

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: start;
}
.contact-info h3 { margin-top: 1.6em; }
.contact-info a { color: var(--color-text); font-weight: 600; }
.contact-info a:hover { color: var(--color-red); }

.contact-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.form-field { margin-bottom: 20px; }
.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
  transition: border-color var(--transition);
}
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--color-red);
  outline: none;
}
.form-field textarea { min-height: 130px; resize: vertical; }
.form-honeypot { position: absolute; left: -9999px; }

/* =========================================================================
   Footer
   ========================================================================= */

.site-footer {
  background: var(--chrome-bg);
  color: var(--chrome-text-muted);
  border-top: 1px solid var(--chrome-border);
  margin-top: 96px;
}
.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.site-footer__brand .logo { margin-bottom: 16px; }
.site-footer__tagline { max-width: 320px; color: var(--chrome-text-muted); }
.site-footer h3 {
  color: var(--chrome-text);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  font-weight: 500;
  margin-bottom: 18px;
}
.footer-nav ul { display: flex; flex-direction: column; gap: 12px; }
.footer-nav a:hover { color: var(--chrome-text); }
.footer-contact p { color: var(--chrome-text-muted); margin-bottom: 10px; }
.footer-contact a:hover { color: var(--color-red); }
.footer-social { display: flex; gap: 16px; margin-top: 16px; }
.social-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border: 1px solid var(--chrome-border);
  border-radius: 999px;
  padding: 6px 14px;
}
.social-link:hover { border-color: var(--color-red); color: var(--color-red); }

.site-footer__bottom {
  border-top: 1px solid var(--chrome-border);
  padding: 20px 24px;
  text-align: center;
}
.footer-copy { margin: 0; font-size: 0.82rem; }

@media (max-width: 780px) {
  .site-footer__inner { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   Scroll reveal
   ========================================================================= */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 500ms ease, transform 500ms ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .feature-card:hover, .post-card:hover { transform: none; }
}
