/* ── Design-system overrides & page-level customizations ── */

/* ── Skip to main content (accessibility) ── */
.skip-link {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 10001;
  padding: 0.8rem 1.6rem;
  background: #111;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0 0 0.4rem 0;
}
.skip-link:focus {
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  overflow: visible;
}
/* Google Fonts loaded via <link> in the HTML <head> — not here, to avoid CSS-blocking @import */

:root {
  --ns-content-max: 112rem;
  --ns-shell-max: calc(var(--ns-content-max) + 4.8rem);
}

/* ── Heading font normalization ── */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4,
.h1-alt, .h2-alt {
  font-family: 'DM Sans', sans-serif !important;
}

/* ── Typeface lock: use DM Sans everywhere ── */
html, body,
h1, h2, h3, h4, h5, h6,
p, a, li, span, label,
button, input, textarea, select, option {
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* ── Remove legacy secondary nav layers (single-nav system only) ── */
#sub-menu-wrap,
#sub-menu {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ── Header visibility fail-safe (ensures nav remains visible) ── */
.site-header .site-header-inner {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 0 !important;
}
.site-header nav,
.site-header .header-right,
.site-header .site-header-wordmark {
  visibility: visible !important;
  opacity: 1 !important;
}
.site-header .site-header-wordmark {
  display: inline-flex !important;
  align-items: center !important;
  flex-shrink: 0;
}
/* Centre nav links between logo and CTA */
.site-header nav {
  flex: 1 !important;
  display: flex !important;
  justify-content: center !important;
}
.site-header nav ul {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.6rem !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.site-header nav li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}
.site-header nav a {
  text-decoration: none !important;
}
.site-header .header-right {
  display: inline-flex !important;
  align-items: center !important;
  flex-shrink: 0;
}
@media (max-width: 950px) {
  .site-header .site-header-inner {
    padding-right: 1.6rem !important;
  }
  .site-header .header-right {
    margin-left: auto !important;
  }
  .site-header .mobile-nav-link {
    margin-left: 0.6rem !important;
    margin-right: 0.8rem !important;
    flex-shrink: 0;
  }
  .site-header .mobile-sub-menu {
    top: calc(100% + 0.8rem) !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    max-height: calc(100svh - 9.6rem) !important;
    border: none !important;
    border-radius: 1.4rem !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 245, 245, 0.9)) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1) !important;
    padding: 1rem 1.2rem !important;
  }
  .site-header .mobile-sub-menu > ul {
    padding: 0 0.6rem !important;
  }
  .site-header .mobile-sub-menu > ul > li > a {
    font-size: 1.5rem !important;
    font-weight: 500 !important;
    padding: 1.5rem 0.4rem 1.2rem !important;
  }
  .site-header .mobile-sub-menu > ul > li:after {
    left: 0.4rem !important;
    width: calc(100% - 0.8rem) !important;
    opacity: 0.08 !important;
  }
  .site-header .mobile-sub-menu > ul > li:last-child:after {
    display: none !important;
  }
}

/* ── Heading sizes: scaled down to work with longer, more direct copy ──
   Legacy's base sizes were set for short display headlines.
   These overrides bring things back into proportion. */

/* ── Body paragraph sizing: lighter reading density site-wide ── */
p {
  font-size: var(--font-size-body) !important;
  line-height: var(--line-height-body) !important;
}

h1, .h1 {
  font-size: clamp(3rem, 4.2vw, 4.6rem) !important;
  letter-spacing: -0.03em !important;
  line-height: 1.02 !important;
}

h2, .h2 {
  font-size: clamp(2.35rem, 3vw, 3.4rem) !important;
  letter-spacing: -0.025em !important;
  line-height: 1.1 !important;
}

h3, .h3 {
  font-size: clamp(1.8rem, 2.2vw, 2.2rem) !important;
  letter-spacing: -0.015em !important;
  line-height: 1.15 !important;
}

h4, .h4 {
  font-size: clamp(1.6rem, 2vw, 2rem) !important;
  letter-spacing: -0.01em !important;
  line-height: 1.2 !important;
}

h5, h6 {
  font-size: clamp(1.4rem, 1.6vw, 1.6rem) !important;
  letter-spacing: -0.01em !important;
  line-height: 1.2 !important;
}

/* ── Eyebrow label: tighter connection to the heading it introduces ── */
p.eyebrow {
  margin-bottom: 1.2rem !important;
}

/* ── Gap between a heading and the body copy that follows ──
   Base legacy CSS resets margin to 0 on all headings. */
h1 + p, h1 + .fade-8,
h2 + p, h2 + .fade-8, h2 + .margin-s {
  margin-top: 1.4rem !important;
}

/* ── Section vertical rhythm ──
   Symmetric padding so every section has equal space above and below.
   Gap between two adjacent sections = 10rem + 10rem = 20rem on desktop. */
section {
  padding-top: clamp(4.8rem, 6vw, 7.2rem) !important;
  padding-bottom: clamp(4.8rem, 6vw, 7.2rem) !important;
}
@media (max-width: 950px) {
  section { padding-top: 5.6rem !important; padding-bottom: 5.6rem !important; }
}
@media (max-width: 640px) {
  section { padding-top: 4.4rem !important; padding-bottom: 4.4rem !important; }
}
/* ── Reusable section wrapper primitives ── */
.ns-section-container {
  width: 100%;
  max-width: var(--ns-content-max);
  margin-inline: auto;
}
.ns-section-container--narrow {
  max-width: 78rem;
}
.ns-section-block--muted {
  background: #f6f5f4;
}
.ns-section-block--dark {
  background: #111;
  color: #fff;
}
.columns {
  max-width: calc(var(--ns-content-max) + (var(--page-margin-total, 0rem) * 2)) !important;
}
.wrap {
  max-width: calc(var(--ns-content-max) + (var(--page-margin-total, 0rem) * 2)) !important;
}

/* ── Remove default body margins ── */
body,
html {
  margin: 0 !important;
  padding: 0 !important;
}

/* ── Prevent horizontal overflow from edge cases ── */
html {
  overflow-x: hidden;
}

/* ── Fixed header positioning (applies to all pages) ── */
.site-header,
header.site-header {
  position: fixed !important;
  z-index: var(--z-header, 2000) !important;
  will-change: auto !important;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* ── Logo swap on scroll (shared across all pages) ── */
.site-header-wordmark .logo-dark  { display: none  !important; }
.site-header-wordmark .logo-light { display: block !important; }
.site-header.scrolled .site-header-wordmark .logo-dark  { display: block !important; }
.site-header.scrolled .site-header-wordmark .logo-light { display: none  !important; }

/* ── Footer shared styles ── */
footer.site-footer {
  border-top: none;
}
.site-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}
.footer-left  { display: flex; flex-direction: column; gap: 0.8rem; }
.footer-right { display: flex; flex-direction: column; gap: 0.4rem; text-align: right; }
@media (max-width: 640px) { .footer-right { text-align: left; } }

/* ── Button text centering fix: ensure text sits dead-center vertically ── */
.btn,
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.site-header .header-right > a.btn,
.site-header .header-right > .ns-btn {
  min-height: 3.4rem !important;
  padding: 0 1rem !important;
  line-height: 1 !important;
  vertical-align: middle;
}

/* ── Reusable CTA button primitive ── */
.ns-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 4.1rem;
  padding: 0 1.8rem;
  border-radius: 999px;
  border: none;
  font-family: inherit;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.ns-btn:focus-visible {
  outline: 2px solid #111;
  outline-offset: 3px;
}
.ns-btn--light:focus-visible {
  outline-color: #fff;
}
.ns-btn:active {
  transform: scale(0.97);
}
.ns-btn--full {
  width: 100%;
}
.ns-btn--sm {
  min-height: 3.3rem;
  padding: 0 1rem;
  font-size: 1.2rem;
}
.ns-btn--md {
  min-height: 4.1rem;
  padding: 0 1.8rem;
  font-size: 1.4rem;
}
.ns-btn--lime {
  background: #cef79e;
  color: #222f30;
}
.ns-btn--lime:hover {
  background: #a7e26e;
}
.ns-btn--dark {
  background: #111;
  color: #fff;
}
.ns-btn--dark:hover {
  background: #2a2a2a;
}
.ns-btn--light {
  background: #fff;
  color: #111;
}
.ns-btn--light:hover {
  background: #f0ece8;
}

/* ── Glass card section (homepage) ── */
.ns-glass-section {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2.4rem, 4vw, 4.4rem) 0 !important;
  overflow: hidden;
  background-color: #d4e8c4;
}
.ns-glass-columns {
  width: 100%;
  row-gap: 0;
}
.ns-glass-section-bg {
  position: absolute;
  inset: 0;
  background-color: #d4e8c4;
  background-image: url('/img/home/sprint.jpg');
  background-size: cover;
  background-position: center;
  filter: saturate(1.2);
}
.ns-glass-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 112rem;
  margin-inline: auto;
  min-height: auto;
  border-radius: 1.8rem;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.3)), linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.15));
  backdrop-filter: blur(27px) saturate(180%);
  -webkit-backdrop-filter: blur(27px) saturate(180%);
  border: none;
  box-shadow: none !important;
}
.ns-glass-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2.4rem, 4vw, 4.8rem);
  align-items: start;
  width: 100%;
}
.ns-glass-col {
  display: flex;
  flex-direction: column;
}
.ns-glass-col--1 {
  gap: 1.6rem;
}
.ns-glass-col--2 {
  gap: 0;
}
.ns-glass-title {
  font-size: clamp(2.2rem, 2.6vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  color: #fff !important;
  font-weight: 600;
}
.ns-glass-subtitle {
  font-size: 1.55rem;
  line-height: 1.5;
  margin: 0;
  color: rgba(255, 255, 255, 0.9) !important;
  max-width: 28ch;
}
.ns-glass-lead {
  font-size: 1.4rem;
  line-height: 1.55;

  margin: 0;
  color: #fff !important;
  max-width: 42ch;
}
.ns-glass-deliverables {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: none;
}
.ns-glass-deliverables-label {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 1.2rem 0;
  color: rgba(255, 255, 255, 0.85) !important;
}
.ns-glass-deliverables-list {
  margin: 0;
  padding-left: 1.8rem;
  font-size: 1.55rem;
  line-height: 1.65;
  color: #fff !important;
}
.ns-glass-deliverables-list li {
  margin-bottom: 0.5rem;
}
.ns-glass-deliverables-list li:last-child {
  margin-bottom: 0;
}
.ns-glass-specs {
  margin-bottom: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2rem;
  padding: 1.1rem 1.3rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
}
.ns-glass-grid .ns-glass-specs p {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.45;
  font-weight: 500;
  color: #fff !important;
}
.ns-glass-spec-label {
  display: inline-block;
  font-weight: 600;
  min-width: 6.5rem;
  color: rgba(255, 255, 255, 0.95) !important;
}
.ns-glass-col--2 .ns-btn {
  align-self: flex-start;
}
@media (max-width: 950px) {
  .ns-glass-grid {
    grid-template-columns: 1fr;
    gap: 2.4rem;
  }
}
@media (max-width: 640px) {
  .ns-glass-section {
    min-height: auto;
    padding: clamp(2.5rem, 4vw, 4rem) 0 !important;
  }
  .ns-glass-card {
    min-height: auto;
    border-radius: 1.6rem;
  }
  .ns-glass-grid {
    align-items: start;
  }
  .ns-glass-title {
    font-size: clamp(2.2rem, 7vw, 3.2rem);
  }
  .ns-glass-subtitle {
    max-width: none;
  }
  .ns-glass-lead,
  .ns-glass-deliverables-list,
  .ns-glass-grid .ns-glass-specs p {
    font-size: 1.5rem !important;
  }
}

/* ── Smooth scrolling ── */
html {
  scroll-behavior: smooth;
}

/* ── Page transition microinteraction (internal navigation only) ──
   IMPORTANT: transforms must NEVER be applied to body or html — doing so creates a new
   stacking/containing block that breaks position:fixed on the site header.
   Target .main (the content wrapper) instead. ── */
@media (prefers-reduced-motion: no-preference) {
  body.ns-page-ready .main {
    animation: ns-page-enter 500ms ease both;
  }
  html.ns-page-transitioning .main {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 180ms ease, transform 180ms ease;
  }
}
@keyframes ns-page-enter {
  from {
    opacity: 0.15;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  body.ns-page-ready .main {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ── Global link transitions ── */
a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

/* ── Footer link hover ── */
footer.site-footer a {
  text-decoration: none;
}
footer.site-footer a:hover {
  color: var(--color-text-primary) !important;
  opacity: 0.7;
}

/* ── Button hover micro-interaction ── */
.btn,
a.btn,
.ns-service-cta,
.bf-submit {
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.btn:active,
a.btn:active,
.ns-service-cta:active {
  transform: scale(0.97);
}

/* ── Services section header ── */
#services .ns-services-intro {
  font-size: 1.45rem;
  line-height: 1.55;
  margin: 0 auto;
  max-width: 58rem;
  color: #555;
}

/* ── Card hover micro-interactions ── */
.ns-service-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.ns-service-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

/* ── Certificate card hover lift ── */
.ba-cert-card,
.mission-cert-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ba-cert-card:hover,
.mission-cert-card:hover {
  transform: translateY(-2px);
}

/* ── Mission value cards subtle hover ── */
.mission-value {
  transition: transform 0.2s ease;
}
.mission-value:hover {
  transform: translateY(-2px);
}

/* ── FAQ row cursor and hover ── */
.faq-row {
  cursor: pointer;
  transition: background 0.15s ease;
  border-radius: 0.6rem;
  padding: 0.25rem;
  margin: -0.25rem;
}
.faq-row:hover {
  background: rgba(0, 0, 0, 0.025);
}

/* ── Form success fade-in ── */
@keyframes ns-success-in {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.book-form-success[style*="display: block"],
.book-form-success[style*="display:block"] {
  animation: ns-success-in 0.4s ease-out both;
}

/* ── Reduce motion for users who prefer it ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body { animation: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
