/* ============================================================
   ARMYSARGE.CO.ZA — "SIGNAL & CODE"
   Phosphor terminal / radar aesthetic
   ============================================================ */

:root {
  --ink: #0a0e0a;
  --ink-2: #0e130e;
  --ink-3: #131a13;
  --line: rgba(158, 240, 26, 0.14);
  --line-strong: rgba(158, 240, 26, 0.35);
  --phos: #9ef01a;
  --phos-dim: #6aa813;
  --amber: #ffb000;
  --text: #c8d6c0;
  --text-dim: #7d8a78;
  --font-display: "Big Shoulders Display", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---------- skip link ---------- */
.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 400;
  background: var(--phos); color: var(--ink);
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  padding: 12px 20px; transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* ---------- scanlines + vignette ---------- */
.fx-scanlines {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.18) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
  opacity: .55;
}
.fx-scanlines::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(0,0,0,.5) 100%);
}

/* ---------- custom cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 200;
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  pointer-events: none; opacity: 0;
  border: 1px solid var(--phos);
  border-radius: 50%;
  transition: width .25s, height .25s, margin .25s, border-color .25s, background .25s;
}
.cursor__h, .cursor__v { position: absolute; background: var(--phos); }
.cursor__h { top: 50%; left: -6px; right: -6px; height: 1px; }
.cursor__v { left: 50%; top: -6px; bottom: -6px; width: 1px; }
.cursor.is-active {
  width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-color: var(--amber); background: rgba(255,176,0,.08);
}
.cursor.is-active .cursor__h, .cursor.is-active .cursor__v { background: var(--amber); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }
@media (hover: hover) and (pointer: fine) {
  body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }
}

/* ---------- boot overlay ---------- */
.boot {
  position: fixed; inset: 0; z-index: 300;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.boot__inner { width: min(560px, 86vw); }
.boot__log {
  font-family: var(--font-mono); font-size: 12px; line-height: 1.9;
  color: var(--phos); min-height: 9.5em; white-space: pre-wrap;
  text-shadow: 0 0 8px rgba(158,240,26,.5);
}
.boot__bar {
  height: 3px; margin-top: 16px; background: var(--line);
  overflow: hidden;
}
.boot__bar span { display: block; height: 100%; width: 0; background: var(--phos); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid transparent;
  transition: background .4s, border-color .4s, padding .4s;
}
/* blur lives on a pseudo-element: backdrop-filter on .nav itself would
   turn it into the containing block for the fixed mobile menu panel */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(10,14,10,.85);
  backdrop-filter: blur(12px);
  opacity: 0; transition: opacity .4s;
}
.nav.is-scrolled { border-bottom-color: var(--line); padding-top: 12px; padding-bottom: 12px; }
.nav.is-scrolled::before { opacity: 1; }
.nav__brand {
  font-family: var(--font-mono); font-weight: 600; letter-spacing: .14em;
  font-size: 13px; color: var(--phos);
  display: flex; align-items: center; gap: 10px;
}
.nav__call { color: var(--text-dim); font-weight: 400; }
.nav__sig {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--phos);
  box-shadow: 0 0 10px var(--phos);
  animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: .35; } }
.nav__links { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 36px); }
.nav__links a {
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim); transition: color .25s;
  padding: 12px 4px; /* tap-target height */
}
.nav__links a span { color: var(--phos-dim); margin-right: 6px; font-size: 10px; }
.nav__links a:hover { color: var(--phos); }
.nav__cta {
  border: 1px solid var(--line-strong); padding: 8px 18px;
  color: var(--phos) !important;
}
.nav__cta:hover { background: var(--phos); color: var(--ink) !important; }
.nav__burger {
  display: none; background: none; border: 0; width: 36px; height: 30px;
  position: relative; z-index: 110;
}
.nav__burger span {
  position: absolute; left: 4px; right: 4px; height: 2px;
  background: var(--phos); transition: transform .3s, top .3s;
}
.nav__burger span:first-child { top: 10px; }
.nav__burger span:last-child { top: 18px; }
.nav__burger.is-open span:first-child { top: 14px; transform: rotate(45deg); }
.nav__burger.is-open span:last-child { top: 14px; transform: rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__grid {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgba(158,240,26,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(158,240,26,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.hero__hud {
  position: absolute; z-index: 5;
  font-size: 10px; letter-spacing: .18em; line-height: 1.9;
  color: var(--text-dim); text-transform: uppercase;
}
.hero__hud--tl { top: 86px; left: clamp(20px, 4vw, 56px); }
.hero__hud--tr { top: 86px; right: clamp(20px, 4vw, 56px); text-align: right; }

.hero__content {
  position: relative; z-index: 6; text-align: center;
  padding: 0 20px; max-width: 1100px;
}
.hero__kicker {
  font-size: clamp(10px, 1.4vw, 13px); letter-spacing: .3em;
  color: var(--amber); text-transform: uppercase; margin-bottom: 22px;
}
.blink { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero__title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(72px, 16.5vw, 230px);
  line-height: .86; letter-spacing: .01em;
  text-transform: uppercase; color: #e9f5dd;
}
.hero__line { display: block; overflow: hidden; }
.hero__line--accent {
  color: transparent;
  -webkit-text-stroke: 2px var(--phos);
  text-shadow: 0 0 40px rgba(158,240,26,.25);
}
.hero__line .char { display: inline-block; will-change: transform; }

.hero__sub { margin-top: 28px; }
.hero__role {
  font-size: clamp(13px, 2vw, 17px); letter-spacing: .42em;
  color: var(--phos); text-transform: uppercase; font-weight: 600;
}
.hero__quote {
  margin: 14px auto 0; max-width: 520px;
  color: var(--text-dim); font-size: 13px; font-style: italic;
}
.hero__actions {
  margin-top: 38px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
}
.btn {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; padding: 14px 28px;
  border: 1px solid var(--line-strong);
  position: relative; overflow: hidden; transition: color .3s, border-color .3s;
}
.btn::before {
  content: ""; position: absolute; inset: 0;
  background: var(--phos); transform: scaleX(0); transform-origin: left;
  transition: transform .35s cubic-bezier(.65,0,.35,1); z-index: -1;
}
.btn:hover::before { transform: scaleX(1); }
.btn:hover { color: var(--ink); border-color: var(--phos); }
.btn--solid { background: var(--phos); color: var(--ink); border-color: var(--phos); }
.btn--solid::before { background: var(--amber); }
.btn--solid:hover { border-color: var(--amber); }
.btn--ghost { color: var(--phos); }

.hero__scroll {
  position: absolute; bottom: 64px; left: clamp(20px, 4vw, 56px); z-index: 6;
  font-size: 10px; letter-spacing: .26em; color: var(--text-dim);
  display: flex; align-items: center; gap: 14px; text-transform: uppercase;
}
.hero__scroll-line { width: 56px; height: 1px; background: var(--phos); position: relative; overflow: hidden; }
.hero__scroll-line::after {
  content: ""; position: absolute; inset: 0; background: var(--amber);
  animation: scan 1.8s ease-in-out infinite;
}
@keyframes scan { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* morse ticker */
.ticker {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 6;
  border-top: 1px solid var(--line);
  background: rgba(10,14,10,.6); backdrop-filter: blur(6px);
  overflow: hidden; padding: 10px 0;
}
.ticker__track {
  display: flex; white-space: nowrap; width: max-content;
  font-size: 11px; letter-spacing: .3em; color: var(--phos-dim);
  animation: ticker 28s linear infinite;
}
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section {
  max-width: 1200px; margin: 0 auto;
  padding: clamp(80px, 12vw, 150px) clamp(20px, 4vw, 56px) 0;
}
.section__head { display: flex; align-items: baseline; gap: 20px; margin-bottom: clamp(36px, 6vw, 64px); }
.section__num {
  font-size: 12px; color: var(--amber); letter-spacing: .2em;
}
.section__num::after { content: " //"; color: var(--text-dim); }
.section__title {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(40px, 7vw, 84px); line-height: 1; color: #e9f5dd;
  letter-spacing: .015em;
}
.section__rule { flex: 1; height: 1px; background: var(--line); align-self: center; }

[data-reveal] { opacity: 0; transform: translateY(36px); }
.no-js [data-reveal], .reduced [data-reveal] { opacity: 1; transform: none; }

/* ---------- about ---------- */
.about__cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(32px, 5vw, 80px); }
.about__lede {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(24px, 3.4vw, 40px); line-height: 1.12; color: #e9f5dd;
  margin-bottom: 24px; letter-spacing: .02em;
}
.about__lede em { font-style: normal; color: var(--phos); }
.about__main p + p { margin-top: 16px; }
.about__main p:not(.about__lede) { color: var(--text-dim); max-width: 58ch; }
.about__meta dl { border: 1px solid var(--line); }
.about__meta dl div {
  display: flex; justify-content: space-between; padding: 14px 18px;
  font-size: 12px; letter-spacing: .08em;
}
.about__meta dl div + div { border-top: 1px solid var(--line); }
.about__meta dt { color: var(--text-dim); text-transform: uppercase; }
.about__meta dd { color: var(--text); font-weight: 500; }
.status-ok { color: var(--phos) !important; text-shadow: 0 0 8px rgba(158,240,26,.5); }

/* ---------- record ---------- */
.record__list { border-top: 1px solid var(--line); }
.record__item {
  display: grid; grid-template-columns: 180px 1fr;
  gap: clamp(16px, 3vw, 48px);
  padding: clamp(24px, 3.5vw, 40px) 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background .3s;
}
.record__item:hover { background: rgba(158,240,26,.025); }
.record__when { font-size: 12px; letter-spacing: .18em; color: var(--amber); padding-top: 6px; }
.record__body h3 {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(22px, 3vw, 34px); color: #e9f5dd; line-height: 1.1; letter-spacing: .02em;
}
.record__body h3 span { color: var(--phos); }
.record__body p { color: var(--text-dim); margin-top: 8px; max-width: 60ch; font-size: 13.5px; }

/* ---------- arsenal ---------- */
.arsenal__note { font-size: 11px; letter-spacing: .24em; color: var(--text-dim); margin-bottom: 28px; }
.arsenal__list { display: grid; grid-template-columns: 1fr 1fr; gap: 18px clamp(32px, 5vw, 72px); }
.arsenal__list li { display: grid; grid-template-columns: 150px 1fr 40px; align-items: center; gap: 16px; }
.skill__name { font-size: 13px; letter-spacing: .06em; color: var(--text); }
.skill__bar {
  height: 10px; border: 1px solid var(--line); position: relative;
  background:
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 10px);
}
.skill__bar i {
  position: absolute; inset: 1px auto 1px 1px; width: 0;
  background: repeating-linear-gradient(90deg, var(--phos) 0 6px, transparent 6px 10px);
  box-shadow: 0 0 12px rgba(158,240,26,.3);
}
.skill__val { font-size: 12px; color: var(--phos); text-align: right; }
.skill__val::after { content: "%"; color: var(--text-dim); }

.arsenal__note--extra { margin-top: clamp(40px, 6vw, 64px); }
.arsenal__extra { display: flex; flex-wrap: wrap; gap: 12px; }
.arsenal__extra li {
  border: 1px solid var(--line); background: var(--ink-2);
  padding: 10px 16px;
  display: flex; align-items: baseline; gap: 10px;
  transition: border-color .25s, background .25s, transform .25s;
}
.arsenal__extra li:hover {
  border-color: var(--line-strong); background: var(--ink-3);
  transform: translateY(-2px);
}
.arsenal__extra strong {
  font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--phos);
}
.arsenal__extra span { font-size: 10.5px; letter-spacing: .06em; color: var(--text-dim); }

/* ---------- deployments ---------- */
.deploy__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.deploy__card {
  border: 1px solid var(--line); padding: clamp(24px, 3vw, 36px);
  display: flex; flex-direction: column; gap: 14px;
  position: relative; background: var(--ink-2);
  transition: border-color .3s, transform .3s, background .3s;
  overflow: hidden;
}
.deploy__card::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--phos); transform: scaleX(0); transform-origin: left;
  transition: transform .4s cubic-bezier(.65,0,.35,1);
}
.deploy__card:hover { border-color: var(--line-strong); background: var(--ink-3); transform: translateY(-4px); }
.deploy__card:hover::after { transform: scaleX(1); }
.deploy__top { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .2em; }
.deploy__id { color: var(--amber); }
.deploy__lang { color: var(--text-dim); border: 1px solid var(--line); padding: 3px 10px; }
.deploy__card h3 {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(24px, 2.8vw, 32px); color: #e9f5dd; line-height: 1.05; letter-spacing: .02em;
}
.deploy__card p { color: var(--text-dim); font-size: 13px; flex: 1; }
.deploy__link { font-size: 11px; letter-spacing: .14em; color: var(--phos); text-transform: uppercase; }

/* ---------- stats ---------- */
.stats {
  margin-top: clamp(80px, 12vw, 150px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background:
    linear-gradient(rgba(158,240,26,.03), transparent);
}
.stats__item {
  padding: clamp(32px, 4vw, 56px) 20px; text-align: center;
}
.stats__item + .stats__item { border-left: 1px solid var(--line); }
.stats__item strong {
  display: block; font-family: var(--font-display); font-weight: 900;
  font-size: clamp(44px, 6vw, 76px); color: var(--phos); line-height: 1;
  text-shadow: 0 0 24px rgba(158,240,26,.25);
}
.stats__item span {
  display: block; margin-top: 10px; font-size: 11px;
  letter-spacing: .22em; text-transform: uppercase; color: var(--text-dim);
}

/* ---------- capabilities ---------- */
.caps__grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.caps__grid li {
  padding: clamp(24px, 3vw, 40px);
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(18px, 2.4vw, 26px); color: #e9f5dd; letter-spacing: .03em;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px;
  transition: background .3s, color .3s;
}
.caps__grid li:nth-child(3n) { border-right: 0; }
.caps__grid li:nth-child(n+4) { border-bottom: 0; }
.caps__grid li span {
  font-family: var(--font-mono); font-size: 11px; font-weight: 400;
  color: var(--amber); border: 1px solid var(--line); padding: 4px 9px;
}
.caps__grid li:hover { background: rgba(158,240,26,.04); color: var(--phos); }

/* ---------- contact ---------- */
.contact { text-align: center; padding-bottom: clamp(80px, 10vw, 140px); }
.contact .section__head { justify-content: center; }
.contact .section__rule { display: none; }
.contact__lede { color: var(--text-dim); margin-bottom: 36px; }

/* contact form — posts to the existing inc/sendEmail.php backend */
.contact__form {
  max-width: 720px; margin: 0 auto; text-align: left;
  display: flex; flex-direction: column; gap: 20px;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form__field { display: flex; flex-direction: column; gap: 8px; }
.form__field span {
  font-size: 10px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--amber);
}
.form__field input,
.form__field textarea {
  font-family: var(--font-mono); font-size: 14px;
  color: var(--text); background: var(--ink-2);
  border: 1px solid var(--line); padding: 14px 16px;
  border-radius: 0; appearance: none; resize: vertical;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.form__field input::placeholder,
.form__field textarea::placeholder { color: var(--text-dim); opacity: .8; }
.form__field input:focus,
.form__field textarea:focus {
  outline: none; border-color: var(--line-strong);
  background: var(--ink-3);
  box-shadow: 0 0 0 1px var(--line-strong), 0 0 18px rgba(158,240,26,.12);
}
.form__field input:user-invalid,
.form__field textarea:user-invalid { border-color: rgba(255,80,60,.5); }
.form__captcha { min-height: 78px; }
.form__foot { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.form__foot .btn:disabled {
  opacity: .35; pointer-events: none; filter: grayscale(.6);
}
.form__status { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.form__status.is-ok { color: var(--phos); text-shadow: 0 0 10px rgba(158,240,26,.4); }
.form__status.is-err { color: #ff6b52; }
.contact__social {
  margin-top: 48px; display: flex; justify-content: center; flex-wrap: wrap;
  gap: clamp(16px, 3vw, 40px);
}
.contact__social a {
  display: inline-block; padding: 12px 8px; /* tap-target size */
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-dim); transition: color .25s;
}
.contact__social a:hover { color: var(--amber); }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 24px clamp(20px, 4vw, 56px);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 10px; letter-spacing: .2em; color: var(--text-dim); text-transform: uppercase;
}
.footer__morse { color: var(--phos-dim); }

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

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .arsenal__list { grid-template-columns: 1fr; }
  .deploy__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats__item:nth-child(3) { border-left: 0; }
  .stats__item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .caps__grid { grid-template-columns: 1fr 1fr; }
  .caps__grid li { border-right: 1px solid var(--line) !important; border-bottom: 1px solid var(--line) !important; }
  .caps__grid li:nth-child(2n) { border-right: 0 !important; }
  .caps__grid li:nth-child(n+5) { border-bottom: 0 !important; }
}

@media (max-width: 760px) {
  .nav__links {
    position: fixed; inset: 0; z-index: 105;
    background: rgba(10,14,10,.97);
    flex-direction: column; justify-content: center; gap: 32px;
    transform: translateY(-100%); visibility: hidden;
    transition: transform .45s cubic-bezier(.65,0,.35,1), visibility 0s .45s;
  }
  .nav__links.is-open {
    transform: translateY(0); visibility: visible;
    transition: transform .45s cubic-bezier(.65,0,.35,1), visibility 0s 0s;
  }
  .nav__links a { font-size: 18px; }
  .nav__burger { display: block; }

  .about__cols { grid-template-columns: 1fr; }
  .record__item { grid-template-columns: 1fr; gap: 8px; }
  .arsenal__list li { grid-template-columns: 110px 1fr 36px; }
  .hero__hud--tr { display: none; }
  .hero__hud--tl { top: 78px; }
  .hero__scroll { bottom: 54px; }
  .hero__line--accent { -webkit-text-stroke: 1.2px var(--phos); }
}

@media (max-width: 600px) {
  .form__row { grid-template-columns: 1fr; }
  .form__foot { justify-content: center; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .caps__grid { grid-template-columns: 1fr; }
  .caps__grid li { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .caps__grid li:last-child { border-bottom: 0 !important; }
  .section__head { flex-wrap: wrap; gap: 10px 14px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
