/* ==========================================================================
   Army Consulting — 2026 visual layer
   Loaded after the legacy template stylesheets on army.html only.
   Token system: ink / paper / steel / brass.
   ========================================================================== */

:root {
  --ink: #08080b;
  --ink-elev: #131317;
  --paper: #f5f5f7;
  --paper-2: #ffffff;
  --steel: #00283a;
  --mist: #86868b;
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(0, 0, 0, 0.08);
  --brass: #c9a24b;
  --brass-dim: rgba(201, 162, 75, 0.35);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Anchor targets sit behind the fixed glass header without this. */
#home, #our-services, #about-us, #contact-usnow, #features, #services {
  scroll-margin-top: 90px;
}

::selection {
  background: var(--brass);
  color: var(--ink);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4,
p.logo,
#first-block h1 {
  font-family: "Inter Tight", "Inter", -apple-system, sans-serif;
}

.eyebrow,
h2.section-title::before,
#about-us h2::before {
  display: block;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 0.72em;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.9em;
}

/* ---------- Nav ---------- */

header {
  background: rgba(0, 40, 58, 0.78);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

header.is-scrolled {
  background: rgba(0, 40, 58, 0.94);
  border-bottom-color: var(--brass-dim);
}

nav { background: transparent; }

#topbar { background: transparent; }

p.logo {
  font-weight: 400;
  letter-spacing: 0.02em;
  font-size: 1.15em;
}

.top-nav ul.right li a {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 0.85em;
  letter-spacing: 0.02em;
  position: relative;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.top-nav li a:hover,
.top-nav li.active-item a,
.top-nav .active-item a {
  background: var(--steel);
  border-top-color: var(--brass);
  color: var(--brass);
}

/* ---------- Mobile hamburger + off-canvas nav ---------- */

.nav-text {
  background: var(--steel) !important;
  border-radius: 0 0 12px 0;
}

.nav-text:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: -4px;
}

@media screen and (max-width: 768px) {
  /* backdrop-filter on an ancestor creates a new containing block for its
     position:fixed descendants (spec behavior, not a bug in the framework).
     .top-nav becomes position:fixed at this breakpoint to slide in as a
     full-screen off-canvas menu — but it lives inside <header>, so with
     the blur left on, it was fixing itself relative to header's own
     ~66px-tall box instead of the viewport, squashing the menu into a
     sliver instead of covering the screen. Drop the blur here; the solid
     --steel background already applied to header keeps it opaque. */
  header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--steel);
  }

  header.is-scrolled {
    background: var(--steel);
  }

  .top-nav {
    background: var(--steel) !important;
    transition: none !important;
  }

  .top-nav li a {
    background: transparent !important;
    font-family: "Inter", sans-serif;
    font-weight: 500;
    letter-spacing: 0.02em;
  }

  .top-nav li a:hover,
  .top-nav li.active-item a {
    background: rgba(201, 162, 75, 0.12) !important;
    color: var(--brass);
  }
}

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

#first-block {
  background: var(--steel);
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

#first-block .line { position: relative; z-index: 1; }

.hero-logo {
  position: relative;
}

/* Glow + radar ring sit centered behind the logo itself. */
.hero-logo::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(50% + 42px);
  width: 900px;
  height: 900px;
  max-width: 150vw;
  max-height: 150vw;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(201, 162, 75, 0.14), transparent 60%);
  pointer-events: none;
}

.hero-logo::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(50% + 42px);
  width: 620px;
  height: 620px;
  max-width: 92vw;
  max-height: 92vw;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(201, 162, 75, 0.14);
  border-radius: 50%;
  pointer-events: none;
}

.hero-logo img,
.hero-logo .eyebrow {
  position: relative;
  z-index: 1;
}

#first-block img {
  filter: drop-shadow(0 0 40px rgba(201, 162, 75, 0.12));
  animation: hero-in 1s var(--ease) both;
}

#first-block p {
  color: var(--mist);
  font-size: 1.02em;
  line-height: 1.7;
  max-width: 560px;
  margin: 1.4em auto 0;
  animation: hero-in 1s var(--ease) 0.15s both;
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 3.5em;
  color: var(--mist);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.68em;
  letter-spacing: 0.22em;
  text-decoration: none;
  animation: hero-in 1s var(--ease) 0.4s both;
}

.hero-cue::after {
  content: "";
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, var(--brass), transparent);
  animation: cue-drop 2.2s var(--ease) infinite;
}

.hero-cue:hover { color: var(--brass); }

@keyframes cue-drop {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- Section titles ---------- */

h2.section-title {
  font-size: 2.6em;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--steel);
}

h2.section-title:after {
  background: var(--brass);
  width: 40px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}

h2.section-title.is-visible:after,
h2.section-title:after {
  transform: scaleX(1);
}

#services h2.section-title { color: #fff; }

#services h2.section-title:after { background: var(--brass); }

/* ---------- Service pills / tabs ---------- */

.tabs { text-align: center; }

.tab-nav {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  padding: 4px;
  margin: 0 auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

a.tab-label,
a.tab-label:link,
a.tab-label:visited {
  background: transparent;
  color: var(--steel);
  border-radius: 999px;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 0.85em;
  padding: 0.6em 1.4em;
}

a.tab-label:hover {
  background: rgba(0, 40, 58, 0.06);
  color: var(--steel);
}

a.tab-label.active-btn {
  background: var(--steel);
  color: #fff;
}

.tab-item { background: transparent; }

/* The legacy .line/.grid system caps at max-width:71rem (710px) regardless
   of viewport, which made 6-in-a-row impossible at any width. Widen just
   the services container so wide screens have room to actually use it. */
.size-1140 .services-line {
  max-width: 1400px;
}

/* container-type establishes containment (contain:layout, among others).
   It must NOT sit on .services-line: that element is also the ancestor of
   the #our-services scroll anchor (h2#our-services and .tabs are siblings
   inside it), and containment on an anchor's ancestor breaks the browser's
   native scroll-to-fragment targeting for that anchor specifically — the
   scroll silently no-ops and the page just stays at the top. Scoping the
   container to .tabs instead keeps the exact same sizing context for the
   card grid (.tab-content .margin is still its descendant) without ever
   containing the heading. */
.tabs {
  container-type: inline-size;
  container-name: services;
}

/* Identical card size in every tab. Fixed, discrete column counts —
   6 / 3 / 2 / 1 — driven by a container query on the actual rendered
   width of the services section (not the raw viewport), so dragging the
   window never lands on an ugly in-between count like 4+2 or 5+1: it
   only ever shows one of these four exact layouts. On the narrowest tier
   the cards are also capped narrower and centered, instead of stretching
   edge-to-edge, so 6 stacked cards don't turn into a mile of scrolling. */
.tab-content .margin {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  padding: 0;
  margin: 0;
}

@container services (max-width: 959px) {
  .tab-content .margin { grid-template-columns: repeat(3, 1fr); }
}

@container services (max-width: 619px) {
  .tab-content .margin { grid-template-columns: repeat(2, 1fr); }
}

@container services (max-width: 399px) {
  .tab-content .margin {
    grid-template-columns: 1fr;
    max-width: 260px;
    margin: 0 auto;
  }
}

.tab-content .margin::after { display: none; }

.tab-content .margin br { display: none; }

.tab-content .margin > div {
  float: none;
  width: auto;
  padding: 0;
}

.tab-content .margin > div > .our-work-container {
  margin-bottom: 0;
}

/* ---------- Service cards ---------- */

.our-work-container {
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.our-work-container.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.our-work-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.our-work-container:hover img {
  transform: scale(1.06);
}

/* Title bar is static: no transitions, no hover changes, nothing moves. */
.our-work-text {
  opacity: 1;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 12, 18, 0.55) 55%, rgba(0, 12, 18, 0.92) 100%);
  text-align: left;
  padding: 1.4em;
  transition: none;
}

.our-work-container:hover > .our-work-text {
  opacity: 1;
  border-radius: 0;
}

.our-work-text h4 {
  font-size: 1.05em;
  letter-spacing: -0.01em;
  margin: 0;
  transition: none;
}

.our-work-text p { display: none; }

/* ---------- Features ---------- */

#features {
  padding: 8em 2em;
  background: var(--paper-2);
}

#features .s-12.m-6.l-3 {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

#features .s-12.m-6.l-3.is-visible {
  opacity: 1;
  transform: translateY(0);
}

#features .s-12.m-6.l-3:nth-child(2) { transition-delay: 0.08s; }
#features .s-12.m-6.l-3:nth-child(3) { transition-delay: 0.16s; }
#features .s-12.m-6.l-3:nth-child(4) { transition-delay: 0.24s; }

#features i {
  background: var(--steel);
  color: var(--brass);
  width: 68px;
  height: 68px;
  line-height: 68px;
  font-size: 1.4em;
  box-shadow: none;
  border: 1px solid var(--brass-dim);
}

#features h2 {
  font-size: 1.05em;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--steel);
}

#features p { color: var(--mist); }

/* ---------- About / mission ---------- */

#about-us {
  background: var(--steel);
  padding: 7em 2em;
  display: block;
}

.about-flex {
  display: flex;
  align-items: center;
  gap: 3em;
  flex-wrap: wrap;
  max-width: 1140px;
  margin: 0 auto;
}

.about-copy {
  flex: 1 1 280px;
  text-align: left;
}

.about-media { flex: 1 1 340px; }

.about-media video {
  display: block;
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

#about-us h2 {
  color: #fff;
  font-size: 2.4em;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
}

#about-us h2::before {
  content: "// 02 — MISSION";
}

#about-us p {
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.75;
  margin: 0 0 2em;
  max-width: 34em;
}

.about-us-icons {
  display: flex;
  gap: 1em;
}

#about-us article { padding: 0; }

.about-us-icons i {
  color: var(--brass);
  float: none;
  margin: 0;
  width: 54px;
  height: 54px;
  line-height: 52px;
  text-align: center;
  font-size: 1.15em;
  border: 1px solid var(--brass-dim);
  border-radius: 50%;
}

h2.section-title#our-services::before {
  content: "// 01 — CAPABILITIES";
  text-align: center;
}

#services h2.section-title::before {
  content: "// 03 — DOCTRINE";
  text-align: center;
}

#contact-usnow h2.section-title::before {
  content: "// 04 — CONTACT";
  text-align: center;
}

/* ---------- Dark manifesto (doctrine: find → create → future) ---------- */

#services {
  background: var(--steel) !important;
  padding: 7em 2em;
}

#services .margin > div {
  padding: 2em 1.8em;
}

#services i {
  background: transparent;
  border: 1px solid var(--brass-dim);
  color: var(--brass);
}

#services .service-text { display: block; }

#services h3 {
  font-size: 1.2em;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-transform: none;
  margin: 0 0 0.6em;
}

#services p {
  color: var(--mist);
  line-height: 1.75;
  font-size: 0.88em;
  max-width: 34em;
  margin-left: auto;
  margin-right: auto;
}

#services .s-12.m-12.l-4,
#services .s-12.m-6.l-4 {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

#services .s-12.m-12.l-4.is-visible,
#services .s-12.m-6.l-4.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Contact wrap ---------- */

#contact-usnow { background: var(--paper); padding: 4em 0; }

#contact-usnow .line {
  background: var(--paper-2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 40px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--line-soft);
}

.iframecallback { border-radius: 16px; }

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

footer {
  background: var(--steel);
  border-top: 1px solid var(--line);
  padding: 4.5em 2em 2.5em;
}

footer .footer-wordmark {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-size: 1.5em;
  font-weight: 400;
  color: #fff;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 0.4em;
}

footer .footer-wordmark strong { font-weight: 700; }

footer .footer-tag {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.7em;
  letter-spacing: 0.18em;
  color: var(--brass);
  margin-bottom: 2.5em;
}

footer .footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2em;
  margin-bottom: 3em;
}

footer .footer-links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85em;
  font-weight: 500;
  text-decoration: none;
}

footer .footer-legal {
  border-top: 1px solid var(--line);
  padding-top: 1.8em;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1em;
  max-width: 1140px;
  margin: 0 auto;
}

footer .footer-legal p,
footer .footer-legal a {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78em;
  margin: 0;
}

footer p { color: rgba(255, 255, 255, 0.55); font-size: 0.85em; }

footer a { color: #fff; transition: color 0.2s var(--ease); text-decoration: none; }

footer a:hover { color: var(--brass); }

/* ---------- Motion accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
  #first-block img,
  #first-block p,
  .our-work-container,
  #features > .line > .margin > div,
  #services .s-12 {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- Focus states ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}
