:root {
  /* Brand */
  --navy: #0b2d52;
  --navy-dark: #071f38;
  --red: #b31924;

  /* UI */
  --ink: #0f172a;
  --muted: #475569;
  --subtle: #64748b;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --border: rgba(15, 23, 42, 0.12);

  /* Layout */
  --max-width: 1180px;
  --header-width: 1320px;
  --header-h: 82px;

  /* Radii + shadow */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 18px 50px rgba(2, 6, 23, 0.18);

  /* Accessibility */
  --ring: rgba(179, 25, 36, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  line-height: 1.65;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

body.nav-open {
  overflow: hidden;
}


a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; height: auto; }

/* Better default selection */
::selection { background: rgba(179, 25, 36, 0.16); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 1.6rem);
}

.header-container {
  max-width: var(--header-width);
  margin: 0 auto;
  padding-inline: clamp(1rem, 3vw, 1.25rem);
}

/* Screen-reader utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  color: #111;
  padding: .6rem .85rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  z-index: 9999;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

/* -------------------------------------------------------------------------- */
/* Header + navigation                                                         */
/* -------------------------------------------------------------------------- */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

@supports ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
  header { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-right: auto;
  min-width: 220px;
}

.brand picture { display: block; }
.brand img {
  width: auto;
  height: 64px;
  filter: drop-shadow(0 2px 10px rgba(2, 6, 23, 0.10));
}

.brand .brand-text {
  display: none;
  font-weight: 900;
  letter-spacing: -0.2px;
  color: var(--navy);
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  font-weight: 650;
  color: var(--ink);
  padding: .4rem .25rem;
  border-bottom: 2px solid transparent;
  opacity: 0.92;
}

.nav-links a:hover { opacity: 1; border-bottom-color: rgba(179, 25, 36, 0.35); }
.nav-links a[aria-current="page"] { opacity: 1; border-bottom-color: var(--red); }

.nav-cta {
  display: flex;
  gap: .75rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .78rem 1.1rem;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: linear-gradient(135deg, #b31924 0%, #d31e2c 55%, #b31924 100%);
  color: #fff;
}

.btn-primary:hover { filter: brightness(.98); }

.btn-secondary {
  border-color: rgba(15, 23, 42, 0.14);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
}

.btn-secondary:hover { background: #fff; }

.mobile-toggle {
  display: none;
  align-items: center;
  gap: .65rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: .6rem .85rem;
  font-weight: 900;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.hamburger {
  width: 18px;
  height: 14px;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger span {
  height: 2px;
  width: 18px;
  background: currentColor;
  border-radius: 999px;
  transform-origin: center;
  transition: transform 200ms ease, opacity 200ms ease;
}

header[data-open="true"] .hamburger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
header[data-open="true"] .hamburger span:nth-child(2) { opacity: 0; }
header[data-open="true"] .hamburger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-backdrop {
  display: none;
}

@media (min-width: 1040px) {
  .brand .brand-text { display: inline; }
}

@media (max-width: 980px) {
  :root { --header-h: 76px; }
  .brand { min-width: unset; }
  .brand img { height: 56px; }

  .mobile-toggle { display: none; }
  .js .mobile-toggle { display: inline-flex; }

  /* If JS is disabled, keep the nav accessible (stacked). */
  .nav-panel {
    flex: 1 1 auto;
    justify-content: flex-end;
  }

  /* With JS enabled, switch to an off-canvas drawer. */
  .js .nav-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 88vw);
    height: 100dvh;
    background: rgba(255, 255, 255, 0.98);
    border-left: 1px solid rgba(15, 23, 42, 0.10);
    box-shadow: var(--shadow-lg);
    padding: calc(var(--header-h) + 1rem + env(safe-area-inset-top)) 1rem calc(1rem + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .85rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    transform: translateX(105%);
    transition: transform 220ms ease;
    z-index: 90;
  }

  .js header[data-open="true"] .nav-panel { transform: translateX(0); }

  .js .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
    padding-top: .25rem;
  }

  .js .nav-links a {
    padding: .9rem .85rem;
    border-bottom: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    opacity: 1;
  }

  .js .nav-links a:hover { background: var(--surface-3); }
  .js .nav-links a[aria-current="page"] { background: rgba(179, 25, 36, 0.10); color: var(--ink); }

  .js .nav-cta {
    flex-direction: column;
    align-items: stretch;
    margin-top: auto;
    gap: .6rem;
  }

  .js .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.50);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
    z-index: 80;
  }

  .js header[data-open="true"] .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
}

/* -------------------------------------------------------------------------- */
/* Hero                                                                        */
/* -------------------------------------------------------------------------- */

.hero {
  color: #fff;
  padding-block: clamp(3.75rem, 7vw, 6rem);
  background:
    radial-gradient(1200px circle at 10% 20%, rgba(255, 255, 255, 0.14), transparent 52%),
    radial-gradient(900px circle at 90% 0%, rgba(179, 25, 36, 0.22), transparent 55%),
    linear-gradient(110deg, var(--navy-dark), var(--navy));
}

.hero--compact { padding-block: clamp(3.15rem, 6vw, 4.25rem); }

.hero .kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .75rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-weight: 800;
  font-size: .9rem;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-size: clamp(2rem, 3.3vw, 3.05rem);
  line-height: 1.1;
  margin-bottom: 1.05rem;
  letter-spacing: -0.5px;
}

.hero p {
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  color: rgba(255, 255, 255, 0.92);
  max-width: 58rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 1.25rem;
  max-width: 720px;
  color: rgba(229, 231, 235, 0.95);
}

.hero-note a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 640px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
}

/* -------------------------------------------------------------------------- */
/* Sections + typography                                                       */
/* -------------------------------------------------------------------------- */

section { padding-block: clamp(3.15rem, 6vw, 4.75rem); }

main [id] { scroll-margin-top: calc(var(--header-h) + 1rem); }
.section-compact { padding-block: clamp(2.5rem, 5vw, 3.5rem); }

.section-title {
  font-size: clamp(1.55rem, 2.15vw, 2.15rem);
  color: var(--navy);
  letter-spacing: -0.3px;
  margin-bottom: .85rem;
}

.section-subtext {
  max-width: 60rem;
  color: var(--muted);
  font-size: 1.03rem;
  margin-bottom: 1.6rem;
}

.muted { color: var(--muted); }
.note { font-size: .95rem; color: var(--subtle); }

.divider {
  height: 1px;
  background: rgba(15, 23, 42, 0.10);
  margin: 2.25rem 0;
}

.highlight {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.75), rgba(241, 245, 249, 0.75));
}

/* -------------------------------------------------------------------------- */
/* Grid + cards                                                                */
/* -------------------------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 3vw, 1.5rem);
}

.card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: var(--radius-lg);
  padding: clamp(1.15rem, 2.4vw, 1.75rem);
  box-shadow: var(--shadow-sm);
}

.card h3 {
  color: var(--navy);
  margin-bottom: .55rem;
  font-size: 1.12rem;
  letter-spacing: -0.2px;
}

.card p { color: rgba(15, 23, 42, 0.86); }

@media (hover: hover) {
  .card, .btn, .nav-links a, .brand img, .mobile-toggle {
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease, opacity 180ms ease;
  }

  .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
  }

  .btn:hover { transform: translateY(-1px); }
}

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 900;
  font-size: .9rem;
  color: var(--ink);
  background: rgba(241, 245, 249, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.10);
  padding: .45rem .75rem;
  border-radius: 999px;
}

.list { margin-top: .65rem; display: grid; gap: .75rem; }
.list li { margin-left: 1.15rem; }

.callout {
  border-left: 4px solid var(--red);
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  padding: clamp(1.05rem, 2.2vw, 1.35rem);
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: var(--shadow-sm);
}

/* Compact, multi-column layouts for Competencies & Differentiators */
.competencies-grid,
.diff-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
}

/* Ignore span-based columns inside these grids so cards flow naturally */
.competencies-grid .card,
.diff-grid .card {
  grid-column: auto !important;
  padding: clamp(1.05rem, 2vw, 1.35rem);
}

.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.services-grid .card { grid-column: auto !important;
  padding: clamp(1.25rem, 2.4vw, 2rem); }

/* Certifications */
.cert-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.cert-logos .logo-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}

.cert-logos img { max-height: 150px; width: auto; }

/* Responsive column behavior */
@media (max-width: 980px) {
  .col-3, .col-4 { grid-column: span 6; }

  /* Home page story section reads better stacked on tablets */
  .story-grid .col-8,
  .story-grid .col-4 { grid-column: span 12; }
}

@media (max-width: 768px) {
  .col-6, .col-8 { grid-column: span 12; }
}

/* -------------------------------------------------------------------------- */
/* Footer                                                                      */
/* -------------------------------------------------------------------------- */

footer {
  background: radial-gradient(900px circle at 20% 0%, rgba(179, 25, 36, 0.20), transparent 55%),
    linear-gradient(180deg, var(--navy-dark), #05162a);
  color: #e5e7eb;
  padding-block: 3.25rem;
}

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

.footer-title { color: #fff; font-weight: 900; margin-bottom: .85rem; letter-spacing: -0.2px; }
.footer-small { font-size: .96rem; color: rgba(226, 232, 240, 0.92); }
.footer-small a { text-decoration: underline; text-underline-offset: 3px; }

/* -------------------------------------------------------------------------- */
/* Forms                                                                       */
/* -------------------------------------------------------------------------- */

.form { display: grid; gap: 1rem; }

.field {
  display: grid;
  gap: .4rem;
}

.field label {
  font-weight: 700;
  color: rgba(15, 23, 42, 0.88);
  font-size: .95rem;
}

.input {
  width: 100%;
  padding: .85rem .95rem;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02);
}

.input:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-color: rgba(179, 25, 36, 0.45);
}

textarea.input { min-height: 150px; resize: vertical; }

/* -------------------------------------------------------------------------- */
/* Subtle motion + reveal animations                                            */
/* -------------------------------------------------------------------------- */

/* Only hide when JS is available */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn, .nav-links a { transition: none !important; }
}
