/* ==========================================================================
   Phase II Staffing and Contracting — p2sc.net
   Design tokens are derived from the Phase II brand guide:
   charcoal #373d41 · olive #444a30 · gold #9d8444 · tan #b5a172
   Type: Rajdhani (display) · IBM Plex Sans (body) · IBM Plex Mono (data)
   ========================================================================== */

:root {
  --bg: #24282c;            /* deepened brand charcoal — page ground */
  --surface: #373d41;       /* brand charcoal — cards, panels */
  --surface-2: #2d3236;     /* intermediate panel */
  --olive: #444a30;         /* brand olive */
  --olive-deep: #363b26;
  --gold: #9d8444;          /* brand gold — rules, borders, large accents only */
  --gold-deep: #6f5c2a;     /* gold dark enough for small text on paper */
  --tan: #b5a172;           /* brand tan — eyebrows, links, small accents */
  --text: #e9e7e2;
  --text-dim: #b3b8b6;
  --paper: #f1eee6;         /* "printed form" sections */
  --paper-ink: #272a20;
  --paper-dim: #565a49;
  --line: rgba(181, 161, 114, 0.22);
  --line-strong: rgba(181, 161, 114, 0.45);

  --font-display: 'Rajdhani', 'Arial Narrow', sans-serif;
  --font-body: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --w-content: 1160px;
  --w-prose: 46rem;
}

/* --- Reset ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--tan); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--tan); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 0.6em; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* --- Utility -------------------------------------------------------------- */

.wrap { max-width: var(--w-content); margin: 0 auto; padding: 0 24px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--gold); color: #1c1f14; padding: 10px 18px;
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; text-decoration: none;
}
.skip-link:focus { left: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* Eyebrow: the double-chevron section marker (from the Phase II insignia) */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.38em; color: var(--tan);
  margin: 0 0 18px;
}
.eyebrow::before {
  content: ""; flex: none; width: 22px; height: 13px; background: var(--gold);
  clip-path: polygon(0 0, 25% 0, 50% 45%, 75% 0, 100% 0, 50% 100%);
}
.paper .eyebrow { color: var(--gold-deep); }
.paper .eyebrow::before { background: var(--gold-deep); }

/* Display headings */
.h-display {
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
}
.h-section {
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}
.lede { font-size: 1.15rem; color: var(--text-dim); max-width: var(--w-prose); }
.paper .lede { color: var(--paper-dim); }

/* Buttons */
.btn {
  display: inline-block; padding: 13px 28px 11px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  text-transform: uppercase; letter-spacing: 0.18em; text-decoration: none;
  border: 1px solid var(--gold); color: var(--tan); background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--gold); color: #1c1f14; }
.btn-solid { background: var(--gold); color: #1c1f14; }
.btn-solid:hover { background: var(--tan); color: #1c1f14; }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }

/* Chevron text link */
.more {
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  text-transform: uppercase; letter-spacing: 0.14em; text-decoration: none;
}
.more::after { content: " \00BB"; color: var(--gold); }

/* --- Header --------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(36, 40, 44, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 66px; gap: 24px;
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 30px; width: auto; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-strong);
  color: var(--tan); padding: 8px 14px; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.14em;
}
.site-nav ul { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  font-family: var(--font-display); font-weight: 600; font-size: 0.92rem;
  text-transform: uppercase; letter-spacing: 0.14em; text-decoration: none;
  color: var(--text-dim); padding: 6px 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--tan); border-bottom-color: var(--gold); }

/* Eight nav items: tighten tracking and gaps on mid-width viewports so the
   row fits without wrapping before the mobile collapse takes over. */
@media (min-width: 901px) and (max-width: 1220px) {
  .site-nav ul { gap: 18px; }
  .site-nav a { font-size: 0.84rem; letter-spacing: 0.09em; }
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px 24px 16px; }
  .site-nav a { display: block; padding: 12px 0; }
  /* Without JS the toggle does nothing, so keep the nav visible */
  .no-js .site-nav { display: block; position: static; }
  .no-js .nav-toggle { display: none; }
}

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

.hero {
  position: relative; overflow: hidden;
  background:
    linear-gradient(100deg, rgba(36, 40, 44, 0.96) 38%, rgba(36, 40, 44, 0.72) 100%),
    url("../img/bg-texture.jpg") center / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.hero::after {
  /* Oversized Phase II insignia watermark */
  content: ""; position: absolute; right: -6%; top: 50%;
  width: min(46vw, 560px); aspect-ratio: 1;
  transform: translateY(-50%);
  background: url("../img/mark-olive.png") center / contain no-repeat;
  opacity: 0.55; pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; padding-top: 96px; padding-bottom: 96px; }
.hero-home .wrap { padding-top: 130px; padding-bottom: 130px; }
.hero .kicker {
  font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.08em;
  color: var(--tan); margin-bottom: 22px;
}
.hero h1 { max-width: 15em; margin-bottom: 0.4em; }
.hero .lede { margin-bottom: 0; }
.hero-in { animation: rise 0.7s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* --- Data strip: federal identifiers set like a form ----------------------- */

.data-strip { border-bottom: 1px solid var(--line); background: var(--surface-2); }
.data-strip ul {
  display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 14px 0;
  font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.02em;
  color: var(--text-dim);
}
.data-strip li { padding: 4px 0; }
.data-strip li + li::before { content: "/"; color: var(--gold); padding: 0 14px; }
.data-strip strong { color: var(--tan); font-weight: 500; }

/* --- Sections --------------------------------------------------------------- */

.section { padding: 88px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-olive { background: var(--olive-deep); }
.section-head { max-width: var(--w-prose); margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }

.paper { background: var(--paper); color: var(--paper-ink); }
.paper h2, .paper h3 { color: var(--paper-ink); }
.paper a { color: var(--gold-deep); }
.paper a:hover { color: var(--paper-ink); }
.paper .btn { border-color: var(--gold-deep); color: var(--gold-deep); }
.paper .btn:hover { background: var(--gold-deep); color: var(--paper); }

/* --- Card grids -------------------------------------------------------------- */

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  padding: 30px 28px 26px;
  display: flex; flex-direction: column;
}
.card h3 {
  font-weight: 600; font-size: 1.25rem; text-transform: uppercase;
  letter-spacing: 0.06em;
}
.card p { color: var(--text-dim); font-size: 0.98rem; }
.card .more { margin-top: auto; padding-top: 10px; }
.card-icon { height: 44px; width: 44px; margin-bottom: 20px; opacity: 0.9; }

/* Capability rows: capability + past-performance tags */
.cap { border-top: 1px solid var(--line); padding: 34px 0; display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr); gap: 18px 48px; }
.cap:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 800px) { .cap { grid-template-columns: 1fr; } }
.cap h3 { font-weight: 600; font-size: 1.3rem; text-transform: uppercase; letter-spacing: 0.05em; }
.cap p { color: var(--text-dim); margin-bottom: 0.7em; }
.cap ul { color: var(--text-dim); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.03em;
  color: var(--tan); border: 1px solid var(--line-strong);
  padding: 4px 10px; white-space: nowrap;
}

/* --- Split feature (image + copy) ------------------------------------------- */

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.split figure { margin: 0; border: 1px solid var(--line); }
.split figure img { width: 100%; object-fit: cover; }
.split blockquote {
  margin: 0 0 1em; padding-left: 18px; border-left: 3px solid var(--gold);
  font-family: var(--font-display); font-weight: 600; font-size: 1.3rem;
  text-transform: uppercase; letter-spacing: 0.05em; line-height: 1.35;
}

/* Before/after figure pair (Ridgeback chaos → order) */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.duo figure { margin: 0; border: 1px solid var(--line); background: #000; }
.duo img { width: 100%; }
.duo figcaption {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--tan); padding: 9px 12px;
  border-top: 1px solid var(--line);
}

/* --- Partner logo rows ------------------------------------------------------- */

.logo-card {
  background: #fff; border: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-around;
  gap: 28px 40px; padding: 34px 36px;
}
.logo-card img { max-height: 52px; width: auto; }
.logo-row-dark { display: flex; flex-wrap: wrap; align-items: center; gap: 28px 56px; }
.logo-row-dark img { max-height: 44px; width: auto; }

/* --- Contract vehicle blocks --------------------------------------------------- */

.vehicle {
  background: #fff; border: 1px solid #d9d4c5; border-left: 4px solid var(--gold);
  padding: 30px 32px; margin-bottom: 22px;
}
.vehicle h3 { text-transform: uppercase; letter-spacing: 0.05em; font-size: 1.3rem; font-weight: 600; }
.vehicle .contract-no {
  font-family: var(--font-mono); font-size: 1rem; color: var(--gold-deep);
  letter-spacing: 0.04em; margin-bottom: 14px;
}
.vehicle ul { color: var(--paper-dim); }
.vehicle p { color: var(--paper-dim); }

/* Identifier table (mono, like a federal form) */
.id-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.92rem; }
.id-table th, .id-table td { text-align: left; padding: 11px 16px; border: 1px solid #d9d4c5; }
.id-table th {
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 0.8rem; color: var(--paper-dim); width: 34%;
  background: #e9e5d9;
}
.id-table td { color: var(--paper-ink); background: #fff; }
.dark .id-table th { background: var(--surface-2); color: var(--text-dim); border-color: var(--line); }
.dark .id-table td { background: var(--surface); color: var(--text); border-color: var(--line); }
table.responsive { display: block; overflow-x: auto; }

/* --- Contact cards --------------------------------------------------------------- */

.contact-card {
  background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--gold);
  padding: 30px 28px;
}
.contact-card h3 { font-size: 1.3rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.contact-card .role { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 16px; }
.contact-card ul { list-style: none; padding: 0; margin: 0; font-family: var(--font-mono); font-size: 0.95rem; }
.contact-card li { padding: 5px 0; }

/* --- CTA band --------------------------------------------------------------------- */

.cta-band { background: var(--olive); border-top: 1px solid var(--line); }
.cta-band .wrap {
  padding-top: 72px; padding-bottom: 72px; text-align: center;
}
.cta-band h2 { max-width: 22em; margin-left: auto; margin-right: auto; }
.cta-band .btn-row { justify-content: center; }

/* --- Certifications band ------------------------------------------------------------ */

.cert-band { background: var(--paper); border-top: 1px solid var(--line); }
.cert-band .wrap { padding-top: 44px; padding-bottom: 44px; text-align: center; }
.cert-band img { margin: 0 auto; max-height: 96px; width: auto; }
.cert-band p {
  font-family: var(--font-display); font-weight: 600; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.3em; color: var(--paper-dim);
  margin: 0 0 18px;
}

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

.site-footer { background: #1d2124; border-top: 1px solid var(--line); }
.site-footer .wrap { padding-top: 64px; padding-bottom: 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.6fr; gap: 48px; margin-bottom: 48px; }
@media (max-width: 840px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
.site-footer h4 {
  font-weight: 600; font-size: 0.85rem; text-transform: uppercase;
  letter-spacing: 0.3em; color: var(--tan); margin-bottom: 18px;
}
.site-footer p, .site-footer li { color: var(--text-dim); font-size: 0.95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 4px 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-brand img { height: 34px; margin-bottom: 18px; }
.footer-ids { font-family: var(--font-mono); font-size: 0.85rem; }
.footer-ids li span { color: var(--tan); }
.footer-legal {
  border-top: 1px solid var(--line); padding-top: 24px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: 0.85rem; color: var(--text-dim);
}
.footer-legal p { margin: 0; }

/* --- Prose pages -------------------------------------------------------------------------- */

.prose { max-width: var(--w-prose); }
.prose h2 { margin-top: 1.8em; }
