/* ===========================================================
   WARDSIGHT — tactical field-manual design system
   =========================================================== */

:root {
  --field:    #14130f;   /* warm near-black */
  --field-2:  #1b1a13;   /* raised panel on dark */
  --field-3:  #211f17;
  --sand:     #ddd2b8;   /* manual page */
  --sand-2:   #d3c7aa;
  --ink:      #16140e;   /* text on sand */
  --ink-2:    #4a4534;

  --bone:     #ece4d2;   /* text on dark */
  --bone-dim: #a89e86;   /* muted on dark */
  --bone-dim2:#736a55;

  --orange:   #ff7a1a;   /* safety orange */
  --orange-2: #ff9442;
  --olive:    #8a9555;   /* guard green */
  --red:      #cf3a2e;   /* medical / casualty */

  --line:      rgba(236,228,210,0.14);
  --line-2:    rgba(236,228,210,0.08);
  --line-ink:  rgba(22,20,14,0.20);

  --wrap: 1180px;
  --font-head: "Oswald", system-ui, sans-serif;
  --font-body: "Archivo", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  font-family: var(--font-body);
  background: var(--field);
  color: var(--bone);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.wrap { width: min(100% - 44px, var(--wrap)); margin-inline: auto; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.06; letter-spacing: 0.005em; }

/* ---------- Backdrop ---------- */
.bg-dots {
  position: fixed; inset: 0; z-index: -3;
  background-image: radial-gradient(rgba(236,228,210,0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}
.bg-vignette {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(120% 90% at 50% -10%, transparent 55%, rgba(0,0,0,0.45));
}

/* hazard stripe motif */
.hazard-strip {
  height: 5px; width: 100%;
  background: repeating-linear-gradient(-45deg, var(--orange) 0 14px, var(--field) 14px 28px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 12px 22px; cursor: pointer; border: 1.5px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s, color 0.2s, border-color 0.2s;
}
.btn svg { transition: transform 0.2s var(--ease); }
.btn-primary { background: var(--orange); color: var(--field); border-color: var(--orange); }
.btn-primary:hover { background: var(--orange-2); border-color: var(--orange-2); transform: translateY(-2px); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--bone); }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }

/* ---------- Nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: background 0.3s, border-color 0.3s; border-bottom: 1px solid transparent; }
.nav .hazard-strip { height: 4px; }
.nav.scrolled { background: rgba(20,19,15,0.92); backdrop-filter: blur(10px); border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.18em; color: var(--bone); }
.brand-accent { color: var(--orange); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-family: var(--font-head); font-weight: 500; font-size: 0.92rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--bone-dim); display: flex; align-items: baseline; gap: 6px; transition: color 0.2s; }
.nav-links a:hover { color: var(--bone); }
.nl-n { font-family: var(--font-mono); font-size: 0.62rem; color: var(--orange); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--bone); transition: 0.3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 132px 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 54px; align-items: center; }
.stamp {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em;
  color: var(--orange); text-transform: uppercase;
  padding: 7px 13px; border: 1px solid var(--orange); border-radius: 0;
}
.stamp-tick { width: 7px; height: 7px; background: var(--orange); }
.hero-title {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2.5rem, 5.6vw, 4.4rem); line-height: 0.98; letter-spacing: 0.01em;
  margin: 22px 0 20px;
}
.accent-text { color: var(--orange); }
.hero-sub { font-size: 1.06rem; color: var(--bone-dim); max-width: 540px; }
.hero-actions { display: flex; gap: 13px; margin: 30px 0 24px; flex-wrap: wrap; }
.hero-tags { list-style: none; display: flex; gap: 12px; }
.tag-key { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; color: var(--bone-dim); border: 1px solid var(--line); padding: 5px 11px; }

/* Figure panels */
.fig { border: 1.5px solid var(--line); background: var(--field-2); position: relative; }
.fig::before, .fig::after { content: ""; position: absolute; width: 12px; height: 12px; border: 2px solid var(--orange); }
.fig::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.fig::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.fig-head { display: flex; justify-content: space-between; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; color: var(--bone-dim); }
.fig-state { color: var(--orange); display: flex; align-items: center; gap: 7px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); animation: blink 1.6s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.fig-body { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 16px; align-items: center; }
.fig-figure { width: 100%; max-width: 240px; height: auto; }
.fig-scan { animation: scan 4s ease-in-out infinite; filter: drop-shadow(0 0 4px rgba(255,122,26,0.65)); }
@keyframes scan { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: 0.7; } 88% { opacity: 0.7; } 100% { transform: translateY(180px); opacity: 0; } }

/* active lock-on reticle (glowing HUD marker) */
.mk.active { filter: drop-shadow(0 0 5px rgba(255,122,26,0.85)) drop-shadow(0 0 14px rgba(255,122,26,0.4)); }
.mk.active .mk-num { filter: none; }
.mk.active text { font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.mk-halo, .mk-ring, .mk-bracket, .mk-core { transform-box: fill-box; transform-origin: center; }
.mk-halo { animation: mkHalo 2.1s ease-in-out infinite; }
@keyframes mkHalo { 0%,100% { opacity: 0.10; transform: scale(0.8); } 50% { opacity: 0.30; transform: scale(1.18); } }
.mk-ring { animation: mkSpin 6s linear infinite; }
@keyframes mkSpin { to { transform: rotate(360deg); } }
.mk-bracket { animation: mkBracket 2.1s ease-in-out infinite; }
@keyframes mkBracket { 0%,100% { transform: scale(1.05); opacity: 0.85; } 50% { transform: scale(0.8); opacity: 1; } }
.mk-core { animation: mkCore 1.25s ease-in-out infinite; }
@keyframes mkCore { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* MARCH legend */
.march { list-style: none; display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
.march li { display: grid; grid-template-columns: 22px 18px 1fr; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid var(--line-2); }
.march li.active { border-color: var(--orange); background: rgba(255,122,26,0.08); }
.m-k { font-family: var(--font-mono); font-size: 0.7rem; color: var(--bone-dim); text-align: center; }
.march li.active .m-k { color: var(--orange); }
.m-l { font-family: var(--font-head); font-weight: 700; font-size: 0.95rem; color: var(--bone); }
.march li.active .m-l { color: var(--orange); }
.m-t { font-size: 0.78rem; color: var(--bone-dim); }
.fig-action { display: flex; align-items: center; gap: 11px; margin: 0 16px 16px; padding: 11px 13px; border: 1px solid var(--orange); background: rgba(255,122,26,0.08); }
.fig-action-tag { font-family: var(--font-head); font-weight: 700; font-size: 0.66rem; letter-spacing: 0.12em; background: var(--orange); color: var(--field); padding: 3px 8px; }
.fig-action-text { font-size: 0.85rem; color: var(--bone); }

/* Marquee */
.marquee { margin-top: 64px; border-block: 1px solid var(--line); overflow: hidden; padding: 13px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 24px; white-space: nowrap; width: max-content; animation: marquee 34s linear infinite; }
.marquee-track span { font-family: var(--font-head); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.16em; color: var(--bone-dim2); text-transform: uppercase; }
.marquee-track .sep { color: var(--orange); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 78px 0; position: relative; }

/* manual "page" (sand) sections */
.page { background: var(--sand); color: var(--ink); }
.page::before, .page::after { content: ""; position: absolute; left: 0; right: 0; height: 5px; background: repeating-linear-gradient(-45deg, var(--ink) 0 14px, transparent 14px 28px); opacity: 0.12; }
.page::before { top: 0; } .page::after { bottom: 0; }

/* section header */
.sec-head { display: grid; grid-template-columns: 96px 1fr; gap: 22px; margin-bottom: 42px; align-items: start; }
.sec-head.bare { margin-bottom: 30px; }
.sec-no { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em; color: var(--orange); padding-top: 8px; border-top: 2px solid var(--orange); }
.sec-no.dark { color: var(--red); border-top-color: var(--red); }
.sec-kicker { display: block; font-family: var(--font-head); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--bone-dim); margin-bottom: 12px; }
.page .sec-kicker, .sec-kicker.dark { color: var(--ink-2); }
.sec-head h2 { font-size: clamp(1.7rem, 3.7vw, 2.7rem); text-transform: uppercase; max-width: 16ch; }
.sec-head h2 .accent-text, .page .accent-text { color: var(--red); }
.sec-lead { margin-top: 16px; color: var(--bone-dim); font-size: 1.04rem; max-width: 56ch; }
.page .sec-lead { color: var(--ink-2); }
strong { color: var(--bone); font-weight: 600; }
.page strong { color: var(--ink); }

/* data boxes */
.data-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.data-box { border: 1.5px solid var(--line); padding: 24px 22px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.data-box::before { content: ""; position: absolute; top: -1.5px; left: -1.5px; width: 28px; height: 4px; background: var(--orange); }
.data-tag { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.14em; color: var(--bone-dim2); }
.data-num { font-family: var(--font-head); font-weight: 700; text-transform: uppercase; font-size: clamp(1.6rem, 3vw, 2.1rem); color: var(--orange); }
.data-label { color: var(--bone-dim); font-size: 0.94rem; }
.note { display: flex; gap: 15px; align-items: flex-start; margin-top: 22px; border: 1px solid var(--orange); border-left-width: 4px; padding: 20px 22px; background: rgba(255,122,26,0.05); }
.note svg { flex-shrink: 0; margin-top: 2px; }
.note p { color: var(--bone-dim); }

/* capability grid */
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1.5px solid var(--line); }
.cap { padding: 28px 26px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); transition: background 0.25s; }
.cap-grid .cap:nth-child(3n) { border-right: none; }
.cap-grid .cap:nth-last-child(-n+3) { border-bottom: none; }
.cap:hover { background: var(--field-2); }
.cap-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; color: var(--orange); }
.cap-top svg { width: 26px; height: 26px; }
.cap-no { font-family: var(--font-mono); font-size: 0.72rem; color: var(--bone-dim2); }
.cap h3 { font-size: 1.18rem; text-transform: uppercase; margin-bottom: 8px; letter-spacing: 0.01em; }
.cap p { color: var(--bone-dim); font-size: 0.93rem; }

/* how it works (on sand page) */
.how-grid { display: grid; grid-template-columns: 1fr 0.82fr; gap: 50px; align-items: center; }
.proc { list-style: none; display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.proc li { display: grid; grid-template-columns: 42px 1fr; gap: 16px; padding: 16px; border: 1px solid transparent; transition: background 0.2s, border-color 0.2s; }
.proc li:hover { background: rgba(22,20,14,0.05); border-color: var(--line-ink); }
.proc-n { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: var(--red); }
.proc h4 { font-size: 1.1rem; text-transform: uppercase; margin-bottom: 4px; color: var(--ink); }
.proc p { color: var(--ink-2); font-size: 0.93rem; }
.fig-dark { background: var(--field); }
.fig-dark .fig-head { color: var(--bone-dim); border-color: var(--line); }
.orbit { transform-origin: 160px 150px; animation: spin 30s linear infinite; }
.orbit-2 { animation-direction: reverse; animation-duration: 46s; }
@keyframes spin { to { transform: rotate(360deg); } }

/* stack */
.stack-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1.5px solid var(--line); }
.stack-item { padding: 24px 22px; border-right: 1px solid var(--line-2); transition: background 0.25s; }
.stack-grid .stack-item:last-child { border-right: none; }
.stack-item:hover { background: var(--field-2); }
.stack-tag { display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.1em; color: var(--field); background: var(--orange); padding: 4px 10px; margin-bottom: 14px; }
.stack-item p { color: var(--bone-dim); font-size: 0.92rem; }

/* deployment */
.deploy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.deploy-card { border: 1.5px solid var(--line); padding: 28px 26px; transition: border-color 0.25s, transform 0.25s var(--ease); }
.deploy-card:hover { transform: translateY(-3px); }
.deploy-card.primary { border-color: var(--orange); background: rgba(255,122,26,0.05); }
.deploy-phase { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em; color: var(--orange); }
.deploy-card h3 { font-size: 1.4rem; text-transform: uppercase; margin: 10px 0 16px; }
.deploy-card ul { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-bottom: 16px; }
.deploy-card li { display: flex; align-items: center; gap: 10px; color: var(--bone-dim); font-size: 0.94rem; }
.deploy-card li::before { content: ""; width: 7px; height: 7px; background: var(--orange); flex-shrink: 0; }
.deploy-card li strong { color: var(--bone); }
.deploy-card > p { color: var(--bone-dim2); font-size: 0.87rem; border-top: 1px solid var(--line-2); padding-top: 14px; }

/* clinical (sand page) */
.anchor-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 52px; align-items: center; }
.anchor-visual { display: flex; justify-content: center; }
.emblem { width: min(300px, 78%); }
.page .sec-no.dark { color: var(--red); border-top-color: var(--red); }
.page .sec-head h2 { color: var(--ink); }
.anchor-copy p { color: var(--ink-2); margin-top: 16px; font-size: 1.02rem; }
.pills { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.pill { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink); border: 1px solid var(--line-ink); padding: 7px 13px; }

/* assessment (vs) */
.vs-table { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--line); }
.vs-col { padding: 30px 28px; }
.vs-col.them { border-right: 1px solid var(--line-2); }
.vs-col.us { background: rgba(255,122,26,0.05); }
.vs-head { font-family: var(--font-head); font-weight: 600; text-transform: uppercase; font-size: 1.15rem; letter-spacing: 0.04em; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.vs-col.them .vs-head { color: var(--bone-dim); }
.vs-col.us .vs-head { color: var(--orange); }
.vs-col ul { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.vs-col li { display: flex; gap: 11px; font-size: 0.95rem; }
.vs-col li::before { width: 18px; height: 18px; flex-shrink: 0; background-repeat: no-repeat; background-position: center; }
.vs-col.them li { color: var(--bone-dim); }
.vs-col.them li::before { content: ""; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cpath d='M5 5l8 8M13 5l-8 8' stroke='%23cf3a2e' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.vs-col.us li { color: var(--bone); }
.vs-col.us li::before { content: ""; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cpath d='M4 9.5l3.2 3.2L14 6' stroke='%23ff7a1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E"); }

/* personnel (dossier) */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dossier { border: 1.5px solid var(--line); padding: 26px 24px; transition: border-color 0.25s, transform 0.25s var(--ease); position: relative; }
.dossier::before { content: ""; position: absolute; top: -1.5px; right: -1.5px; width: 4px; height: 24px; background: var(--orange); }
.dossier:hover { transform: translateY(-3px); border-color: var(--orange); }
.dossier-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.dossier-id { width: 56px; height: 56px; flex-shrink: 0; border: 1.5px solid var(--line); display: grid; place-items: center; background: var(--field-2); }
.dossier-id span { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: var(--orange); letter-spacing: 0.04em; }
.dossier-role { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; color: var(--bone-dim); }
.dossier h3 { font-size: 1.3rem; text-transform: uppercase; margin-bottom: 10px; }
.dossier p { color: var(--bone-dim); font-size: 0.91rem; }

/* CTA */
.section-cta { padding-bottom: 96px; }
.cta-card { position: relative; text-align: center; padding: 66px 40px 56px; border: 1.5px solid var(--line); background: var(--field-2); overflow: hidden; }
.cta-card .hazard-strip { position: absolute; top: 0; left: 0; height: 5px; }
.cta-card .sec-kicker { text-align: center; color: var(--orange); margin-top: 6px; }
.cta-card h2 { font-size: clamp(1.8rem, 4.2vw, 3rem); text-transform: uppercase; }
.cta-card > p { color: var(--bone-dim); max-width: 560px; margin: 16px auto 0; }
.cta-actions { display: flex; gap: 13px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 44px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: flex-start; }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-tag { color: var(--bone-dim2); font-size: 0.86rem; margin-top: 6px; max-width: 320px; }
.footer-meta { display: flex; flex-direction: column; gap: 7px; text-align: right; }
.footer-meta a { color: var(--orange); font-family: var(--font-mono); font-size: 0.84rem; }
.footer-meta a:hover { text-decoration: underline; }
.footer-dim { color: var(--bone-dim2); font-size: 0.8rem; }

/* reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* responsive */
@media (max-width: 940px) {
  .hero-grid, .how-grid, .anchor-grid { grid-template-columns: 1fr; gap: 38px; }
  .hero-visual { max-width: 480px; }
  .data-row, .cap-grid, .stack-grid, .deploy-grid, .team-grid { grid-template-columns: 1fr 1fr; }
  .cap-grid, .stack-grid { border: 1.5px solid var(--line); }
  .cap, .stack-item { border-right: 1px solid var(--line-2) !important; border-bottom: 1px solid var(--line-2) !important; }
  .cap-grid .cap:nth-child(2n), .stack-grid .stack-item:nth-child(2n) { border-right: none !important; }
  .nav-links, .nav-btn { display: none; }
  .nav-toggle { display: flex; }
  .nav.open .nav-links { display: flex; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; background: rgba(20,19,15,0.98); padding: 18px 22px; gap: 16px; border-bottom: 1px solid var(--line); }
  .sec-head { grid-template-columns: 1fr; gap: 12px; }
  .sec-no { width: max-content; }
}
@media (max-width: 600px) {
  .hero { padding-top: 110px; }
  .data-row, .cap-grid, .stack-grid, .deploy-grid, .team-grid, .vs-table { grid-template-columns: 1fr; }
  .cap, .stack-item, .vs-col.them { border-right: none !important; }
  .fig-body { grid-template-columns: 1fr; justify-items: center; }
  .footer-meta { text-align: left; }
  .footer-inner { flex-direction: column; }
  .section { padding: 60px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
