@import url("./assets/css/tokens.css");

:root {
  /* Legacy aliases kept so existing selectors below stay readable;
     all values now resolve to the locked Ahead Brand System V1 tokens. */
  --navy: var(--ahead-navy);
  --blue: var(--ahead-blue);
  --blue-dark: #0F5BB8;
  --body: var(--ahead-slate);
  --line: var(--ahead-border);
  --soft: var(--ahead-ice);
  --white: var(--ahead-white);
  --content-w: var(--reading-max);
  --gutter: var(--space-4);
}

@media (max-width: 640px) {
  :root { --gutter: var(--space-2); }
}
@media (max-width: 380px) {
  :root { --gutter: var(--space-2); }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ahead-ink);
  background: var(--ahead-white);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; transition: color var(--motion-fast); }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff;
  padding: var(--space-1) var(--space-2); z-index: 100;
}
.skip-link:focus { left: var(--gutter); }

/* ---------- Header ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 17px var(--gutter) 17px;
  position: relative;
}
.brand {
  font-size: 31px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.5px;
}
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: 15px;
  font-weight: 500;
  color: var(--navy);
}
.nav a:hover { color: var(--blue); }
.nav a[aria-current="page"], .mobile-nav a[aria-current="page"] { color: var(--blue); font-weight: 700; }
.nav a:focus-visible, .mobile-nav a:focus-visible, .actions a:focus-visible, .brand:focus-visible,
.menu-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.actions { display: flex; align-items: center; gap: var(--space-2); }

/* ---------- Buttons (Ahead Brand System V1: primary / dark / secondary / text-action) ---------- */
.btn-cta,
.btn-primary,
.btn-secondary,
.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  min-height: 48px;
  padding: 14px 22px;
  border-radius: var(--radius-button);
  border: none;
  white-space: nowrap;
  transition: background-color var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast);
}
.btn-cta,
.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-cta:hover,
.btn-primary:hover { background: var(--blue-dark); }
.btn-dark {
  background: var(--navy);
  color: #fff;
}
.btn-dark:hover { background: #0d2f52; }
.btn-secondary {
  background: transparent;
  color: var(--ahead-ink);
  border: 1px solid var(--line);
}
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); }
.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--blue);
  background: none;
  border: none;
  padding: 0;
}
.btn-text:hover { text-decoration: underline; }

.btn-cta { min-height: 44px; padding: 12px 20px; font-size: 14.5px; }

.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--navy);
  padding: 6px;
}
.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) var(--gutter) var(--space-3);
  z-index: 50;
  border-top: 1px solid var(--line);
}
.mobile-nav a { font-size: 15px; font-weight: 500; }
.mobile-nav .btn-cta { justify-content: center; margin-top: 4px; }

@media (max-width: 860px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .actions .btn-cta { display: none; }
  .mobile-nav:not([hidden]) { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  max-width: var(--content-max);
  margin: 0 auto;
  overflow: hidden;
  background: var(--ahead-white);
  isolation: isolate;
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  padding: clamp(72px, 12vw, 140px) var(--gutter) clamp(56px, 9vw, 96px);
  min-height: 340px;
}
.hero-copy { position: relative; z-index: 2; max-width: 700px; }
.hero-copy h1 {
  margin: 0 auto var(--space-3);
  max-width: 15ch;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -1.5px;
  color: var(--navy);
}
.hero-sub {
  margin: 0 auto var(--space-4);
  font-size: 19px;
  line-height: 1.5;
  color: var(--body);
  max-width: 46ch;
}
.hero-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
}
.btn-link:hover { color: var(--blue); }
.trust-line {
  margin: 0;
  font-size: 13px;
  color: var(--body);
  opacity: 0.8;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.14;
  filter: grayscale(0.15);
}
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.2) 0%, var(--ahead-white) 78%);
}

@media (max-width: 640px) {
  .hero-art img { opacity: 0.1; }
}

@media (max-width: 480px) {
  .hero-cta-row { flex-direction: column; }
  .btn-primary { width: 100%; }
}

/* ---------- Audience cards ---------- */
.cards {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-3) var(--gutter) 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}
.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  min-height: 365px;
  overflow: hidden;
  background: var(--ahead-cloud);
  display: flex;
}
.card-copy {
  position: relative;
  z-index: 2;
  padding: var(--space-3);
  width: 100%;
  display: flex;
  flex-direction: column;
}
.eyebrow {
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--blue);
}
.card h2 {
  margin: 0 0 var(--space-2);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
  max-width: 78%;
  color: var(--navy);
}
.feature-list { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-3); }
.feature-list li { display: flex; align-items: flex-start; gap: 12px; max-width: 82%; }
.feature-list svg { width: 20px; height: 20px; color: var(--blue); flex-shrink: 0; margin-top: 1px; }
.feature-list strong { display: block; font-size: 14.5px; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.feature-list span { display: block; font-size: 13px; line-height: 1.4; color: var(--body); }
.card-cta { margin-top: auto; width: 100%; }

.card-art {
  position: absolute;
  top: 168px;
  right: 0;
  bottom: 78px;
  width: 44%;
  z-index: 1;
}
.card-art--ops { top: 205px; }
.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 25%, #000 60%), linear-gradient(to bottom, #000 80%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 25%, #000 60%), linear-gradient(to bottom, #000 80%, transparent 100%);
  mask-composite: intersect;
}

@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .card h2, .feature-list li { max-width: 100%; }
  .card-art { display: none; }
}

/* ---------- Specialization strip ---------- */
.specialization {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-4) var(--gutter) var(--space-4);
}
.specialization-label {
  margin: 0 0 var(--space-2);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--blue);
}
.specialization-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.specialization-grid li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-right: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}
.specialization-grid li:first-child { padding-left: 0; }
.specialization-grid li:last-child { border-right: none; }
.specialization-grid svg { width: 26px; height: 26px; color: var(--blue); flex-shrink: 0; }

@media (max-width: 900px) {
  .specialization-grid { grid-template-columns: 1fr 1fr; gap: 20px 12px; }
  .specialization-grid li { border-right: none; padding: 0; }
}

/* ---------- Get Ahead (Navy section — background rhythm: White > Ice > White > Navy > White) ---------- */
.get-ahead {
  position: relative;
  background: var(--navy);
  color: var(--ahead-white);
  overflow: hidden;
  margin-top: var(--space-1);
}
.get-ahead-art {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 360px;
  z-index: 1;
}
.get-ahead-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  -webkit-mask-image: linear-gradient(to right, #000 30%, transparent 92%);
  mask-image: linear-gradient(to right, #000 30%, transparent 92%);
}
.get-ahead-inner {
  position: relative;
  z-index: 2;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-8) var(--gutter);
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: var(--space-4);
  align-items: start;
}
.get-ahead-copy { padding-top: 10px; padding-left: 300px; }
.rule {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--blue);
  margin-bottom: var(--space-2);
  border-radius: 2px;
}
.get-ahead-copy h2 {
  margin: 0 0 var(--space-2);
  font-size: 40px;
  font-weight: 700;
  color: var(--ahead-white);
  letter-spacing: -0.8px;
}
.get-ahead-sub {
  margin: 0 0 var(--space-4);
  font-size: 18px;
  line-height: 1.5;
  color: rgba(255,255,255,0.72);
  max-width: 380px;
}
.get-ahead-list { display: flex; flex-direction: column; gap: var(--space-2); }
.get-ahead-list li { display: flex; align-items: flex-start; gap: 14px; }
.get-ahead-list svg { width: 20px; height: 20px; color: var(--blue); flex-shrink: 0; margin-top: 2px; }
.get-ahead-list strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--blue);
  margin-bottom: 3px;
}
.get-ahead-list span { display: block; font-size: 13.5px; color: rgba(255,255,255,0.72); }

.get-ahead-inner > * { min-width: 0; }

@media (max-width: 980px) {
  .get-ahead-inner { grid-template-columns: 1fr; padding-top: var(--space-6); padding-bottom: var(--space-6); }
  .get-ahead-copy { padding-left: 0; }
  .get-ahead-art { position: static; width: 100%; height: 220px; margin-bottom: var(--space-2); }
  .get-ahead-art img { mask-image: linear-gradient(to bottom, #000 60%, transparent 100%); -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%); }
}

/* ---------- Pipeline card ---------- */
.pipeline-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-3);
}
.pipeline-eyebrow {
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--blue);
}
.pipeline-desc {
  margin: 0 0 var(--space-2);
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--body);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.field { display: flex; flex-direction: column; margin-bottom: 14px; }
.field-row .field { margin-bottom: 0; }
.field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.field label .optional { font-weight: 400; color: var(--body); }
.field input,
.field select {
  font-family: var(--font);
  font-size: 13.5px;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: var(--radius-button);
  padding: 11px 12px;
  background: #fff;
  outline: none;
  width: 100%;
  transition: border-color var(--motion-fast);
}
.field input:focus,
.field select:focus { border-color: var(--blue); }
.field input:focus-visible,
.field select:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.field input::placeholder { color: #9AA7BD; }
.field small { margin-top: 6px; font-size: 11.5px; color: var(--body); line-height: 1.3; }
.input-icon { position: relative; }
.input-icon svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--body);
}
.input-icon input { padding-left: 34px; }

.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-button);
  overflow: hidden;
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  margin: 0;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy);
  padding: 11px 4px;
  border-left: 1px solid var(--line);
  cursor: pointer;
  transition: background-color var(--motion-fast), color var(--motion-fast);
}
.segmented label[for="pf-clr-none"] { border-left: none; }
.segmented input:checked + label { background: var(--blue); color: #fff; }

.pipeline-submit {
  width: 100%;
  margin-top: 6px;
  padding: 15px 22px;
}
.pipeline-privacy {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin: var(--space-2) 0 0;
  font-size: 12px;
  color: var(--body);
}
.pipeline-privacy svg { width: 14px; height: 14px; color: var(--body); flex-shrink: 0; }

@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .segmented { grid-template-columns: repeat(2, 1fr); }
  .segmented label[for="pf-clr-tssci"] { border-left: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-3) var(--gutter) var(--space-4);
}
.footer-top {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.footer-left { display: flex; align-items: center; gap: var(--space-3); }
.footer-brand { font-size: 22px; font-weight: 800; color: var(--navy); }
.footer-left nav, .footer-right nav { display: flex; gap: var(--space-2); font-size: 14px; font-weight: 500; color: var(--navy); }
.footer-left nav a:hover, .footer-right nav a:hover { color: var(--blue); }
.footer-rule { flex: 1; height: 1px; background: var(--line); }
.footer-right { display: flex; align-items: center; gap: var(--space-2); }
.footer-divider { width: 1px; height: 18px; background: var(--line); }
.footer-social { display: flex; align-items: center; gap: 14px; }
.footer-social svg { width: 18px; height: 18px; fill: var(--navy); stroke: none; }
.footer-social a:hover svg { fill: var(--blue); }

@media (max-width: 860px) {
  .footer-top { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
  .footer-rule { display: none; }
  .footer-right { flex-wrap: wrap; }
}

/* ---------- Audience pages (Veterans / Companies / Workforce Development / Government) ---------- */
.audience-hero { padding: var(--space-3) var(--gutter) 10px; }
.audience-hero .hero-sub { max-width: 620px; }
.audience-hero .hero-inner { grid-template-columns: 1fr; }
.audience-hero .hero-copy { max-width: 680px; }
.audience-body {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 10px var(--gutter) var(--space-8);
}
.audience-body h2 { font-size: 32px; font-weight: 600; margin: 0 0 var(--space-2); color: var(--navy); }
.audience-body p { font-size: 18px; line-height: 1.5; color: var(--body); max-width: var(--reading-max); margin: 0 0 var(--space-2); }
.audience-list { display: grid; gap: 10px; max-width: var(--reading-max); margin: 0 0 var(--space-3); }
.audience-list li { font-size: 16px; line-height: 1.5; color: var(--body); padding-left: 18px; position: relative; }
.audience-list li::before { content: "—"; position: absolute; left: 0; color: var(--blue); }

/* Audience pages: Ice proof/context section */
.proof-section { background: var(--soft); padding: var(--space-4) 0; }
.proof-inner { max-width: var(--content-w); margin: 0 auto; padding: 0 var(--gutter); }
.proof-inner h2 { font-size: 28px; font-weight: 600; color: var(--navy); margin: 0 0 var(--space-2); max-width: var(--reading-max); }
.proof-inner p { font-size: 16px; line-height: 1.55; color: var(--body); max-width: var(--reading-max); margin: 0; }

/* Audience pages: 3-up card grid variant (reuses .cards/.card/.card-copy) */
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-3 .card { min-height: 0; }
.cards-3 .card-copy { padding: var(--space-3); }
.cards-3 .card-copy svg { width: 28px; height: 28px; color: var(--blue); margin-bottom: var(--space-2); }
.cards-3 .card h2 { font-size: 19px; max-width: 100%; margin: 0 0 8px; }
.cards-3 .card-copy p { font-size: 14px; line-height: 1.5; color: var(--body); margin: 0; }
@media (max-width: 900px) { .cards-3 { grid-template-columns: 1fr; } }

/* Audience pages: simplified Navy CTA (no side art/form, reuses .get-ahead) */
.get-ahead--simple .get-ahead-inner { grid-template-columns: 1fr; padding-top: var(--space-6); padding-bottom: var(--space-6); }
.get-ahead-cta { max-width: 640px; }
.get-ahead-cta h2 { margin: 0 0 var(--space-2); font-size: 36px; font-weight: 700; color: var(--ahead-white); letter-spacing: -0.6px; }
.get-ahead-cta p { margin: 0 0 var(--space-3); font-size: 17px; line-height: 1.5; color: rgba(255,255,255,0.72); max-width: 520px; }
.get-ahead--simple .btn-secondary { color: #fff; border-color: rgba(255,255,255,0.4); }
.get-ahead--simple .btn-secondary:hover { border-color: #fff; color: #fff; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
