/* ==========================================================================
   Warmates — tactical field-briefing theme
   Palette   bg #0a0b0e · panel #111621 · friendly-blue #2f7dff · ember #ff6a2b
   Type      display Chakra Petch · body Inter · utility JetBrains Mono
   Signature blue HUD corner brackets + mono tactical readouts (blue = friendlies)
   ========================================================================== */

:root {
  --bg:        #0a0b0e;
  --bg-2:      #0c0f14;
  --panel:     #111621;
  --line:      rgba(120,140,170,.14);
  --line-2:    rgba(120,140,170,.30);
  --blue:      #2f7dff;   /* friendly forces / primary */
  --blue-lit:  #5c9bff;
  --blue-deep: #123f9e;
  --ember:     #ff6a2b;   /* used only for the live pulse */
  --text:      #e9edf3;
  --muted:     #949cad;
  --dim:       #626b7d;

  --maxw: 1140px;
  --pad: clamp(20px, 5vw, 56px);
  --r: 4px;                /* low radius = hard, tactical */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

a { color: var(--blue-lit); text-decoration: none; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--blue); color: #fff; padding: 10px 16px; border-radius: var(--r);
  transition: top .15s ease;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--blue-lit); outline-offset: 3px; }

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  --btn-fs: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "Chakra Petch", sans-serif;
  font-weight: 600; font-size: var(--btn-fs);
  letter-spacing: .06em; text-transform: uppercase;
  padding: 11px 20px; border-radius: var(--r);
  border: 1px solid transparent; cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.btn--solid { background: var(--blue); color: #fff; box-shadow: 0 0 0 1px rgba(47,125,255,.35), 0 8px 30px -12px rgba(47,125,255,.7); }
.btn--solid:hover { background: var(--blue-lit); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--blue); color: #fff; background: rgba(47,125,255,.08); }
.btn--lg { --btn-fs: 15px; padding: 15px 28px; }
.btn--sm { --btn-fs: 12px; padding: 8px 14px; }

/* ---- Nav ------------------------------------------------------------------ */
.nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease, backdrop-filter .2s ease;
}
.nav.is-stuck {
  background: rgba(10,11,14,.78);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
.nav__row { display: flex; align-items: center; gap: 24px; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.brand__word {
  font-family: "Chakra Petch", sans-serif; font-weight: 700;
  letter-spacing: .22em; font-size: 18px;
}
.brand__mark {
  width: 18px; height: 18px; flex: none; position: relative;
}
.brand__logo { width: 35px; height: 35px; flex: none; display: block; }
.brand__mark::before, .brand__mark::after {
  content: ""; position: absolute; width: 9px; height: 9px;
  border: 2px solid var(--blue);
}
.brand__mark::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.brand__mark::after { bottom: 0; right: 0; border-left: 0; border-top: 0; }

.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a {
  color: var(--muted); font-size: 14px; font-weight: 500; letter-spacing: .02em;
  padding: 6px 0; position: relative;
}
.nav__links a:hover { color: var(--text); }
.nav__cta { display: flex; gap: 12px; }

/* Mobile hamburger (hidden on desktop; shown in the ≤620px query) */
.nav__toggle { display: none; }
.nav__burger {
  display: none; width: 42px; height: 42px; margin-left: auto; flex: none;
  align-items: center; justify-content: center; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: var(--r); background: transparent;
}
.nav__burger:hover { border-color: var(--blue); }
.nav__burger span { position: relative; display: block; width: 20px; height: 2px; background: var(--text); transition: background .15s ease; }
.nav__burger span::before, .nav__burger span::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--text);
  transition: transform .18s ease, top .18s ease;
}
.nav__burger span::before { top: -6px; }
.nav__burger span::after { top: 6px; }
.nav__toggle:checked ~ .nav__burger span { background: transparent; }
.nav__toggle:checked ~ .nav__burger span::before { top: 0; transform: rotate(45deg); }
.nav__toggle:checked ~ .nav__burger span::after { top: 0; transform: rotate(-45deg); }

/* ---- Hero ----------------------------------------------------------------- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--bg); }
.hero__bg {
  position: absolute; inset: 0; z-index: -3;
  background: url("img/background.png") center / cover no-repeat;
  animation: drift 32s ease-in-out infinite alternate;
}
/* Spherical fade: the battlefield is crisp at the centre and dissolves into the
   page background at every edge. Static overlay, so it holds still while the
   image drifts underneath. */
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    /* top + bottom fade into the page */
    linear-gradient(180deg,
      var(--bg)         0%,
      rgba(10,11,14,0) 18%,
      rgba(10,11,14,0) 82%,
      var(--bg)        100%),
    /* spherical fade on the sides + corners */
    radial-gradient(circle at 50% 45%,
      rgba(10,11,14,0)    0%,
      rgba(10,11,14,0)    30%,
      rgba(10,11,14,.42) 56%,
      rgba(10,11,14,.86) 76%,
      var(--bg)          90%);
}
@keyframes drift { from { transform: scale(1.06) translateY(0); } to { transform: scale(1.14) translateY(-14px); } }

.hero__inner { position: relative; padding-top: clamp(64px, 13vw, 150px); padding-bottom: clamp(96px, 16vw, 190px); }

.eyebrow {
  font-family: "JetBrains Mono", monospace; font-size: 12.5px; letter-spacing: .28em;
  color: var(--blue-lit); text-transform: uppercase; margin: 0 0 22px;
  display: inline-flex; align-items: center; gap: 12px;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 0 rgba(255,106,43,.6); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,106,43,.55); } 70% { box-shadow: 0 0 0 9px rgba(255,106,43,0); } 100% { box-shadow: 0 0 0 0 rgba(255,106,43,0); } }

.hero__title {
  font-family: "Chakra Petch", sans-serif; font-weight: 700;
  font-size: clamp(56px, 15vw, 168px); line-height: .92; letter-spacing: .02em;
  margin: 0; color: #fff;
  text-shadow: 0 2px 40px rgba(0,0,0,.72), 0 1px 3px rgba(0,0,0,.55);
}
.hero__tag {
  font-family: "Chakra Petch", sans-serif; font-weight: 600;
  font-size: clamp(21px, 3.6vw, 34px); letter-spacing: .01em;
  margin: 18px 0 0; color: var(--text);
}
.hero__sub { max-width: 46ch; color: var(--muted); font-size: clamp(16px, 2vw, 19px); margin: 18px 0 0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero__readout {
  position: absolute; left: 0; right: 0; bottom: 20px;
  display: flex; justify-content: center; gap: 14px; flex-wrap: wrap;
  font-size: 11.5px; letter-spacing: .22em; color: var(--dim); text-transform: uppercase;
}
.hero__readout b { color: var(--blue-lit); font-weight: 500; }
.hero__readout .sep { color: var(--line-2); }

/* Signature: blue HUD corner brackets framing the hero */
.brackets { position: absolute; inset: clamp(14px, 2.4vw, 30px); z-index: -1; pointer-events: none; }
.brackets i { position: absolute; width: 34px; height: 34px; }
.brackets i::before, .brackets i::after { content: ""; position: absolute; background: var(--blue); opacity: .7; }
.brackets i::before { width: 34px; height: 2px; }
.brackets i::after { width: 2px; height: 34px; }
.brackets i:nth-child(1) { top: 0; left: 0; }
.brackets i:nth-child(1)::before { top: 0; left: 0; } .brackets i:nth-child(1)::after { top: 0; left: 0; }
.brackets i:nth-child(2) { top: 0; right: 0; }
.brackets i:nth-child(2)::before { top: 0; right: 0; } .brackets i:nth-child(2)::after { top: 0; right: 0; }
.brackets i:nth-child(3) { bottom: 0; left: 0; }
.brackets i:nth-child(3)::before { bottom: 0; left: 0; } .brackets i:nth-child(3)::after { bottom: 0; left: 0; }
.brackets i:nth-child(4) { bottom: 0; right: 0; }
.brackets i:nth-child(4)::before { bottom: 0; right: 0; } .brackets i:nth-child(4)::after { bottom: 0; right: 0; }

/* ---- Sections ------------------------------------------------------------- */
.section { padding-block: clamp(72px, 11vw, 128px); border-top: 1px solid var(--line); }
.section--alt { background:
  linear-gradient(180deg, var(--bg-2), var(--bg));
}
.sect-eyebrow { color: var(--blue); font-size: 12px; letter-spacing: .26em; margin: 0 0 14px; }
.sect-title {
  font-family: "Chakra Petch", sans-serif; font-weight: 600;
  font-size: clamp(28px, 4.6vw, 46px); line-height: 1.08; letter-spacing: .01em;
  margin: 0 0 clamp(36px, 5vw, 56px); max-width: 20ch; color: #fff;
}

/* Feature cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 26px 24px 28px;
  position: relative; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 22px; width: 3px; height: 26px; background: var(--blue);
}
.card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 24px 50px -30px rgba(47,125,255,.5); }
.card__label { color: var(--blue-lit); font-size: 11.5px; letter-spacing: .22em; margin: 0 0 16px; }
.card__title { font-family: "Chakra Petch", sans-serif; font-weight: 600; font-size: 22px; margin: 0 0 10px; color: #fff; }
.card__body { color: var(--muted); font-size: 15.5px; margin: 0; }

/* Deploy steps (ordered process) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: 760px; }
.step { display: grid; grid-template-columns: 88px 1fr; gap: 22px; padding: 26px 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; }
.step__num {
  font-size: 34px; font-weight: 500; color: transparent;
  -webkit-text-stroke: 1.3px var(--blue); text-stroke: 1.3px var(--blue);
  letter-spacing: .04em; line-height: 1;
}
.step__title { font-family: "Chakra Petch", sans-serif; font-weight: 600; font-size: 21px; margin: 0 0 6px; color: #fff; }
.step__body p { margin: 0; color: var(--muted); }
.step__body .mono { color: var(--text); }
.step__dl { display: flex; gap: 10px; margin-top: 14px; }

/* Comms */
.comms__inner { text-align: center; }
.comms .sect-title { margin-inline: auto; }
.comms__lede { color: var(--muted); max-width: 52ch; margin: 0 auto 34px; }
.addr {
  display: inline-flex; align-items: stretch; gap: 0;
  border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden;
  background: var(--panel);
}
.addr__text {
  display: flex; align-items: center; padding: 0 22px;
  font-size: clamp(18px, 3vw, 26px); color: #fff; letter-spacing: .04em;
}
.addr__copy { border-radius: 0; }
.addr__copy.is-done { background: #1e7d47; }
.addr__hint { margin-top: 16px; color: var(--dim); font-size: 11.5px; letter-spacing: .22em; }

/* ---- Fixed battlefield background (subpages) ------------------------------ */
/* Applied to <main> only, so it sits behind the page body but never under the
   header or footer. background-attachment: fixed keeps it locked while the
   content scrolls. The black gradients mirror the hero fade on the home page. */
.main--bg {
  background-image:
    linear-gradient(180deg,
      var(--bg)          0%,
      rgba(10,11,14,.55) 20%,
      rgba(10,11,14,.55) 80%,
      var(--bg)         100%),
    radial-gradient(circle at 50% 42%,
      rgba(10,11,14,.20)  0%,
      rgba(10,11,14,.20) 30%,
      rgba(10,11,14,.55) 60%,
      rgba(10,11,14,.88) 84%,
      var(--bg)          96%),
    url("img/background.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}
/* Let the fixed image show through the alt section on these pages. */
.main--bg .section--alt { background: rgba(10,11,14,.34); }

/* ---- Media page ----------------------------------------------------------- */
.media-head { border-top: 0; padding-bottom: clamp(20px, 4vw, 44px); }
.media-head .hero__sub { max-width: 60ch; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.shot { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.shot:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 24px 50px -30px rgba(47,125,255,.5); }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.shot figcaption { padding: 12px 16px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

/* Video cards */
.vid { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; color: var(--text); transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.vid:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: 0 24px 50px -30px rgba(47,125,255,.5); }
.vid__thumb { position: relative; display: block; }
.vid__thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.vid__play { position: absolute; inset: 0; margin: auto; width: 60px; height: 60px; border-radius: 50%; background: rgba(47,125,255,.9); box-shadow: 0 8px 30px -8px rgba(47,125,255,.8); transition: transform .18s ease, background .18s ease; }
.vid__play::after { content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%,-50%); border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; }
.vid:hover .vid__play { transform: scale(1.08); background: var(--blue-lit); }
.vid__meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
.vid__title { font-family: "Chakra Petch", sans-serif; font-weight: 600; font-size: 16px; color: #fff; }
.vid__dur { color: var(--dim); font-size: 12px; letter-spacing: .1em; flex: none; }

/* ---- Under construction --------------------------------------------------- */
.construction { border-top: 0; position: relative; isolation: isolate; text-align: center; padding-block: clamp(96px, 18vw, 200px); }
.construction__inner { position: relative; max-width: 640px; margin-inline: auto; }
.brackets--static { position: absolute; inset: clamp(-24px, -3vw, -12px); z-index: -1; }
.construction .sect-eyebrow { text-align: center; }
.construction__title { font-family: "Chakra Petch", sans-serif; font-weight: 700; font-size: clamp(40px, 9vw, 84px); line-height: 1; letter-spacing: .02em; margin: 0 0 20px; color: #fff; text-shadow: 0 2px 40px rgba(0,0,0,.6); }
.construction__lede { color: var(--muted); font-size: clamp(16px, 2vw, 19px); margin: 0 auto 34px; max-width: 46ch; }
.construction__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

@media (max-width: 860px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; }
}

/* ---- Footer --------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding-top: 56px; padding-bottom: 40px; background: var(--bg-2); }
.footer__row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer__tag { color: var(--muted); font-size: 14px; margin: 12px 0 0; max-width: 34ch; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__head { color: var(--dim); font-size: 11px; letter-spacing: .24em; margin: 0 0 4px; }
.footer__col a { color: var(--muted); font-size: 14.5px; }
.footer__col a:hover { color: var(--text); }
.footer__base {
  display: flex; justify-content: space-between; margin-top: 44px; padding-top: 22px;
  border-top: 1px solid var(--line); color: var(--dim); font-size: 11.5px; letter-spacing: .18em;
}

/* ---- Responsive ----------------------------------------------------------- */
@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .footer__row { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  /* Collapse the header into a hamburger dropdown */
  .nav__row { flex-wrap: wrap; height: auto; min-height: 60px; padding-block: 10px; gap: 10px 16px; }
  .nav__burger { display: inline-flex; }
  .nav__links,
  .nav__cta { display: none; flex-basis: 100%; }
  .nav__toggle:checked ~ .nav__links,
  .nav__toggle:checked ~ .nav__cta { display: flex; }
  .nav__links { flex-direction: column; gap: 2px; margin: 4px 0 0; }
  .nav__links a { font-size: 16px; padding: 12px 2px; border-top: 1px solid var(--line); }
  .nav__cta { flex-direction: column; gap: 10px; padding-bottom: 8px; }
  .nav__cta .btn { width: 100%; }
  /* Solid backdrop while the menu is open so it reads over the hero */
  .nav:has(.nav__toggle:checked) {
    background: rgba(10,11,14,.96);
    backdrop-filter: blur(10px);
    border-bottom-color: var(--line);
  }

  .step { grid-template-columns: 64px 1fr; gap: 16px; }
  .addr { flex-direction: column; }
  .addr__text { padding: 16px 20px; justify-content: center; }
  /* iOS ignores fixed attachment; use scroll for predictable rendering */
  .main--bg { background-attachment: scroll; }
}

/* ---- Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__bg { animation: none; }
  .pulse { animation: none; }
  * { transition: none !important; }
}
