/* ═══════════════════════════════════════════════════════════
   DESKTOP — Large-screen layout & readability
   ═══════════════════════════════════════════════════════════ */

/* Light text on dark bg — same on mobile & desktop (dark theme) */
html:not([data-theme="light"]) {
  --text-primary: #ffffff;
  --text-body: #e4edf5;
  --text-secondary: #cdd9e5;
  --text-muted: #a8bdd0;
}

html:not([data-theme="light"]) body {
  color: var(--text-body) !important;
}

html:not([data-theme="light"]) h1,
html:not([data-theme="light"]) h2,
html:not([data-theme="light"]) h3,
html:not([data-theme="light"]) h4,
html:not([data-theme="light"]) h5 {
  color: var(--text-primary) !important;
}

html:not([data-theme="light"]) main p,
html:not([data-theme="light"]) main li,
html:not([data-theme="light"]) main .lead,
html:not([data-theme="light"]) .lead,
html:not([data-theme="light"]) .footer-brand p,
html:not([data-theme="light"]) .intro-content p,
html:not([data-theme="light"]) .service-card-content p,
html:not([data-theme="light"]) .work-item p,
html:not([data-theme="light"]) .contact-info p,
html:not([data-theme="light"]) .pain-card p,
html:not([data-theme="light"]) .how-step p,
html:not([data-theme="light"]) .faq-preview-item p,
html:not([data-theme="light"]) .cta-strip p,
html:not([data-theme="light"]) .hero-trust-item,
html:not([data-theme="light"]) .outcome-card span,
html:not([data-theme="light"]) .guarantee-item,
html:not([data-theme="light"]) .form-intro,
html:not([data-theme="light"]) .matcher-group-label,
html:not([data-theme="light"]) .sticky-cta-text,
html:not([data-theme="light"]) .compare-row span:first-child {
  color: var(--text-body) !important;
}

html:not([data-theme="light"]) .section-header .lead,
html:not([data-theme="light"]) .hero-content .lead,
html:not([data-theme="light"]) .page-hero-content .lead {
  color: #d6e3ef !important;
}

html:not([data-theme="light"]) .eyebrow--teal {
  color: #5eead4 !important;
}

html:not([data-theme="light"]) .stat-label {
  color: var(--text-body) !important;
}

html:not([data-theme="light"]) .testimonial-role,
html:not([data-theme="light"]) .compare-maybe {
  color: var(--text-muted) !important;
}

@media (min-width: 1024px) {
  :root {
    --container: min(1200px, 92vw);
    --section-pad: clamp(56px, 6vw, 88px);
    --header-h: 68px;
  }

  /* Nav — keep primary links visible on desktop */
  .nav-links {
    gap: 1.5rem;
  }

  .nav-links a.nav-link--featured {
    padding-right: 0.25rem;
  }

  .header-phone {
    margin-right: 0.25rem;
  }

  /* Hide injected extras until xl if crowded */
  .nav-links a[href$="blog.html"],
  .nav-links a[href$="faq.html"],
  .nav-links a[href$="quote.html"] {
    display: none;
  }

  /* Header */
  .site-header .container {
    gap: 2rem;
  }

  .nav-links {
    gap: 1.5rem;
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center;
  }

  .nav-links-wrap {
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }

  .nav-toggle {
    display: none !important;
  }

  /* Hero — full viewport on inner pages; homepage controls its own height */
  body:not(.page-home) .hero {
    min-height: 0;
  }

  body.page-home .hero-content {
    padding: 0 !important;
    max-width: none !important;
    text-align: left;
  }

  .hero-overlay {
    background:
      linear-gradient(105deg, rgba(6, 11, 20, 0.94) 0%, rgba(6, 11, 20, 0.78) 42%, rgba(6, 11, 20, 0.45) 68%, rgba(6, 11, 20, 0.55) 100%),
      radial-gradient(ellipse 55% 45% at 78% 35%, rgba(61, 184, 191, 0.1) 0%, transparent 60%);
  }

  .hero-content {
    padding: 0 0 2rem;
    max-width: 38rem !important;
    width: 100%;
  }

  .hero-content h1 {
    max-width: none !important;
    line-height: 1.05;
  }

  .hero-content .lead {
    max-width: 32rem;
    font-size: 1.12rem;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .hero-trust {
    max-width: 36rem;
    justify-content: flex-start;
  }

  /* 3D orb — subtle accent, not competing with copy (like mobile) */
  .hero-3d-wrap {
    width: min(34vw, 480px) !important;
    height: min(34vw, 480px) !important;
    right: 4% !important;
    opacity: 0.5 !important;
  }

  /* Inner page heroes — compact */
  .page-hero {
    min-height: 0;
    padding-bottom: 2rem;
  }

  .page-hero-content:has(.hero-actions) {
    display: block !important;
  }

  .page-hero h1 {
    max-width: 18ch;
  }

  /* Section headers — centred titles, comfortable width */
  .section-header--center {
    text-align: center;
  }

  .section-header--center h2 {
    max-width: 20ch !important;
    margin-inline: auto !important;
  }

  .section-header--center .lead {
    max-width: 40rem;
    margin-inline: auto !important;
  }

  .section-header--center .eyebrow {
    justify-content: center !important;
  }

  .section-header--center .eyebrow::before {
    display: none !important;
  }

  /* Non-centred headers (e.g. intro columns) stay natural */
  .section-header:not(.section-header--center) h2 {
    max-width: 22ch;
  }

  /* Stats */
  .stat-card {
    padding: 3rem 2rem;
  }

  /* Intro & contact */
  .intro-grid {
    gap: 5rem;
  }

  .contact-grid {
    grid-template-columns: minmax(280px, 1fr) minmax(420px, 1.35fr);
    gap: 4rem;
    align-items: start;
  }

  .contact-info {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }

  .contact-form-wrap {
    padding: 2.5rem 3rem;
  }

  /* Services */
  .service-card {
    min-height: 400px;
  }

  .service-card-content {
    padding: 2.25rem;
  }

  /* Bento */
  .bento-item--large {
    min-height: 460px;
  }

  .bento-item--wide {
    min-height: 280px;
  }

  /* AI lab */
  .ai-lab-grid {
    min-height: 480px;
  }

  .ai-core-wrap,
  #ai-core-3d {
    min-height: 480px;
  }

  /* Matcher */
  .matcher-grid {
    gap: 3rem;
  }

  .tech-matcher {
    padding: 2.5rem;
  }

  /* CTA — balanced: message left, actions right; banners centred */
  .cta-strip-inner {
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    text-align: left;
  }

  .cta-strip-actions {
    justify-content: flex-end;
    flex-shrink: 0;
  }

  .outcome-card {
    text-align: center;
  }

  .logos-section {
    text-align: center;
  }

  .logos-label {
    text-align: center;
  }

  .logos-track {
    justify-content: center !important;
  }

  .cta-banner-inner {
    padding: clamp(4rem, 5vw, 5.5rem) clamp(3rem, 6vw, 6rem);
    text-align: center;
  }

  .cta-banner-content {
    text-align: center;
    max-width: 36rem;
    margin-inline: auto;
  }

  .cta-banner p {
    max-width: 36rem;
    margin-inline: auto !important;
  }

  .cta-banner-actions {
    justify-content: center;
  }

  .guarantee-row {
    max-width: 52rem;
    margin-inline: auto;
    justify-content: center;
  }

  /* Compare */
  .compare-table {
    max-width: 920px;
    margin-inline: auto;
  }

  .section-actions {
    text-align: center;
  }

  .compare-row {
    padding: 1rem 1.75rem;
    font-size: 0.92rem;
  }

  /* FAQ preview — two columns */
  .faq-preview {
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 3rem;
    row-gap: 0;
  }

  .faq-preview-item:nth-child(odd) {
    border-right: 1px solid var(--border);
    padding-right: 1.5rem;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1.6fr repeat(4, 1fr);
    gap: 2.5rem;
  }

  /* Sticky bar */
  .sticky-cta {
    padding: 1rem 2rem;
  }

  .sticky-cta-inner {
    max-width: var(--container);
  }

  .sticky-cta-text {
    display: block;
  }

  body.sticky-cta-visible {
    padding-bottom: 5rem;
  }

  /* Work & services pages */
  .service-detail-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .work-item {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }

  .process-steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }

  .service-detail-img {
    min-height: 280px;
  }
}

@media (min-width: 1280px) {
  :root {
    --container: min(1200px, 90vw);
  }

  .nav-links a[href$="blog.html"],
  .nav-links a[href$="faq.html"],
  .nav-links a[href$="quote.html"] {
    display: inline-flex;
  }

  .nav-links {
    gap: 1.75rem;
  }

  .hero-content {
    max-width: 42rem !important;
  }

  .hero-content h1 {
    max-width: none !important;
    font-size: clamp(3rem, 4vw, 4.5rem);
  }

  .pain-grid {
    gap: 2rem;
  }

  .pain-card {
    padding: 2.25rem 2rem;
  }

  .how-steps {
    gap: 2rem;
  }

  .how-step {
    padding: 2rem 1.5rem;
  }

  .outcomes-grid {
    gap: 3rem;
  }

  .testimonial-card {
    padding: 3rem 3.5rem;
  }

  .testimonial-quote {
    font-size: 1.2rem;
    line-height: 1.75;
  }
}

@media (min-width: 1440px) {
  :root {
    --container: min(1280px, 88vw);
  }

  /* 2×2 services — full cards, not 4 thin columns */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .service-card {
    min-height: 400px;
  }

  .hero-3d-wrap {
    width: min(32vw, 520px) !important;
    height: min(32vw, 520px) !important;
  }

  .intro-features {
    gap: 1.25rem;
  }

  .logos-track {
    gap: 3rem;
    justify-content: center;
  }

  .logo-item {
    font-size: 1rem;
    padding: 0.65rem 1.25rem;
  }
}

@media (min-width: 1600px) {
  :root {
    --container: min(1320px, 86vw);
    --section-pad: 120px;
  }

  h1 { font-size: clamp(3.5rem, 4.5vw, 5rem); }
  h2 { font-size: clamp(2.25rem, 3vw, 3.25rem); }

  .hero-content .lead {
    font-size: 1.15rem;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }

  .bento-item--large {
    min-height: 480px;
  }
}

/* Wide screens — prevent orphan narrow columns */
@media (min-width: 1024px) and (max-width: 1439px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }

  .service-card {
    min-height: 420px;
  }
}
