:root {
  --bg: #0a0b0d;
  --surface: #101316;
  --surface-2: #14191d;
  --line: #232a30;
  --line-soft: #1a2025;
  --text: #d4dade;
  --muted: #808b92;
  --dim: #566068;
  --accent: #ff3a2f;
  --accent-soft: rgba(255, 58, 47, 0.12);
  --accent-2: #a855f7;
  --accent-2-soft: rgba(168, 85, 247, 0.15);
  --ok: #35c08a;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-body: "Inter", system-ui, sans-serif;
  --wrap: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 74px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* static military topographic map backdrop (fixed = does not scroll) */
  background-image: url("topo.svg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* sections become spaced panels; the fixed topo map shows in the gaps */
#main { display: flex; flex-direction: column; gap: 28px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.08; margin: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  margin: 0 0 18px;
}

.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #0a0b0d; padding: 10px 16px; font-family: var(--font-mono);
}
.skip:focus { left: 12px; top: 12px; }

/* ---- top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 11, 13, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { font-family: var(--font-mono); font-size: 0.92rem; color: var(--text); display: inline-flex; align-items: center; }
.brand:hover { text-decoration: none; }
.brand-prompt { color: var(--text); }
.brand-sep { color: var(--accent); }
.brand-path { color: var(--muted); }
.brand-at { color: var(--accent); }
.caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; background: var(--accent-2); transform: translateY(2px); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.nav { display: flex; align-items: center; gap: 26px; font-family: var(--font-mono); font-size: 0.86rem; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav-cta { color: var(--accent) !important; border: 1px solid var(--line); padding: 8px 14px; border-radius: 3px; transition: border-color 0.15s, background 0.15s; }
.nav-cta:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ---- buttons ---- */
.btn {
  display: inline-block; font-family: var(--font-mono); font-size: 0.9rem; font-weight: 500;
  padding: 13px 24px; border-radius: 3px; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.12s ease, background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #0a0b0d; font-weight: 700; }
.btn-primary:hover { background: #ff5347; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent-2); color: var(--accent-2); }

/* ---- hero ---- */
.hero { padding: 40px 0 58px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 44px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); font-weight: 700; margin-bottom: 22px; }
.lede { color: var(--muted); font-size: 1.08rem; max-width: 46ch; margin: 0 0 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---- terminal signature ---- */
.terminal {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 58, 47, 0.04);
  overflow: hidden;
}
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(0,0,0,0.25); }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.dot:nth-child(3) { background: var(--accent); }
.term-title { order: -1; margin-left: 0; margin-right: auto; font-family: var(--font-mono); font-size: 0.74rem; color: var(--dim); letter-spacing: 0.04em; }
.term-body {
  margin: 0; padding: 22px 20px 26px; font-family: var(--font-mono); font-size: 0.86rem; line-height: 1.85;
  color: var(--text); white-space: pre-wrap; word-break: break-word; height: 308px; overflow: hidden;
}
.term-body .p { color: var(--accent); }
.term-body .u { color: var(--muted); }
.term-body .ok { color: var(--ok); }
.term-body .out { color: var(--text); }
.term-cursor { display: inline-block; width: 2px; height: 1.05em; background: var(--accent-2); transform: translateY(2px); animation: blink 1.1s steps(1) infinite; }

/* ---- section heads ---- */
.section-head { max-width: 620px; margin-bottom: 30px; }
.section-head h2, .approach-copy h2, .contact-intro h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.section-sub { color: var(--muted); margin: 16px 0 0; }

/* ---- services ---- */
.services { padding: 60px 0; background: radial-gradient(1100px 380px at 18% -8%, rgba(255,58,47,0.06), transparent), rgba(16, 19, 22, 0.5); }
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.svc { background: var(--surface-2); padding: 30px 26px 32px; transition: background 0.18s; position: relative; }
.svc::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); opacity: 0.55; transition: opacity 0.18s; }
.svc:hover { background: #181e23; }
.svc:hover::before { opacity: 1; }
.svc-cmd { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); margin: 0 0 16px; }
.svc h3 { font-size: 1.16rem; font-weight: 600; margin-bottom: 12px; }
.svc p { color: var(--muted); font-size: 0.96rem; margin: 0; }

/* ---- approach ---- */
.approach { padding: 60px 0; background: radial-gradient(1000px 360px at 15% -6%, rgba(255,58,47,0.06), transparent), rgba(16, 19, 22, 0.5); }
.approach-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 44px; align-items: center; }
.approach-copy p { color: var(--muted); margin: 20px 0 0; max-width: 52ch; }
.principles { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.principles li { display: flex; flex-direction: column; gap: 4px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.p-key { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text); }
.p-key::before { content: "> "; color: var(--accent); }
.p-val { color: var(--dim); font-size: 0.9rem; }

/* ---- contact ---- */
.contact { padding: 60px 0; background: radial-gradient(1000px 380px at 85% -6%, rgba(168,85,247,0.08), transparent), rgba(16, 19, 22, 0.5); }
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 44px; align-items: start; }
.contact-intro p { color: var(--muted); margin: 18px 0 0; max-width: 40ch; }
.contact-direct { font-family: var(--font-mono); font-size: 0.9rem; }
.form { display: flex; flex-direction: column; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 30px 28px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.04em; color: var(--muted); text-transform: uppercase; }
.field input, .field textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px;
  color: var(--text); font-family: var(--font-body); font-size: 0.98rem; resize: vertical; transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn-primary { align-self: flex-start; margin-top: 4px; }
.form-status { font-family: var(--font-mono); font-size: 0.86rem; margin: 2px 0 0; min-height: 1.2em; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--accent); }

/* ---- footer ---- */
.footer { border-top: 1px solid var(--line); padding: 26px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; font-family: var(--font-mono); font-size: 0.82rem; }
.foot-dim { color: var(--dim); }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .hero-grid, .approach-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 64px 0 60px; }
  .services, .approach, .contact { padding: 64px 0; }
}
@media (max-width: 640px) {
  .nav a:not(.nav-cta) { display: none; }
  .svc-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .wrap { padding: 0 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret, .term-cursor { animation: none; }
  .btn:hover { transform: none; }
}


/* ---- conversion components ---- */
.hero { position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; top: -140px; right: -100px; width: 560px; height: 560px; background: radial-gradient(circle, rgba(255,58,47,0.10), transparent 68%); pointer-events: none; z-index: 0; }
.hero-grid { position: relative; z-index: 1; }
.microcopy { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); margin: 18px 0 0; }
.microcopy::before { content: "> "; color: var(--accent); }

.authority { background: rgba(16, 19, 22, 0.5); }
.authority-inner { display: flex; flex-wrap: wrap; gap: 12px 26px; padding: 18px 0; align-items: center; }
.chip { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); letter-spacing: 0.03em; display: inline-flex; align-items: center; gap: 9px; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); flex: none; }

.problem { padding: 58px 0; background: radial-gradient(1000px 340px at 82% -6%, rgba(168,85,247,0.08), transparent), rgba(16, 19, 22, 0.5); }
.problem-inner { max-width: 820px; }
.problem h2 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); margin-bottom: 22px; }
.problem p { color: var(--muted); font-size: 1.1rem; margin: 0; max-width: 64ch; line-height: 1.65; }
.problem .accent-word { color: var(--accent-2); font-weight: 600; }

.assurances { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.assurances li { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); display: flex; align-items: flex-start; gap: 10px; }
.assurances li::before { content: "+"; color: var(--accent); font-weight: 700; flex: none; }

/* ---- security specialty band ---- */
.spec { padding: 62px 0; background: radial-gradient(1100px 380px at 82% -8%, rgba(168,85,247,0.10), transparent), rgba(16, 19, 22, 0.5); }
.svc--spec { background: var(--surface-2); }
.svc--spec::before { background: var(--accent-2); opacity: 0.85; }

/* ---- red primary + vibrant purple secondary accents ---- */
.dot:nth-child(2) { background: var(--accent-2); }
.hero::after { content: ""; position: absolute; bottom: -160px; left: -120px; width: 520px; height: 520px; background: radial-gradient(circle, rgba(168,85,247,0.11), transparent 66%); pointer-events: none; z-index: 0; }

/* ---- rotating problem slides ---- */
.problem-inner { min-height: 200px; }
.slides { position: relative; isolation: isolate; }
.slide { position: absolute; top: 0; left: 0; width: 100%; opacity: 0; pointer-events: none; transition: opacity 0.6s ease; will-change: opacity; }
.slide.is-active { position: relative; opacity: 1; pointer-events: auto; }
.slide-dots { display: flex; gap: 10px; margin-top: 28px; }
.slide-dot { width: 26px; height: 3px; padding: 0; border: none; border-radius: 2px; background: var(--line); cursor: pointer; transition: background 0.2s; }
.slide-dot:hover { background: var(--muted); }
.slide-dot.is-active, .slide-dot.is-active:hover { background: var(--accent); }
@media (prefers-reduced-motion: reduce) { .slide { transition: none; } }

/* ---- overflow safety + mobile hardening ---- */
body { overflow-x: hidden; }
.terminal { min-width: 0; max-width: 100%; }
#main > * { min-width: 0; }
.hero-grid > *, .approach-grid > *, .contact-grid > * { min-width: 0; }
.svc-grid, .svc { min-width: 0; }
@media (max-width: 640px) {
  html { font-size: 15px; scroll-padding-top: 64px; }
  body { background-attachment: scroll; }
  #main { gap: 18px; }
  .wrap { padding: 0 18px; }
  .hero { padding: 24px 0 38px; }
  .services, .approach, .contact, .spec, .problem { padding: 38px 0; }

  .topbar-inner { height: 54px; }
  .brand { font-size: 0.82rem; }
  .nav-cta { font-size: 0.78rem; padding: 7px 11px; }

  .hero h1 { font-size: 1.6rem; margin-bottom: 14px; }
  .lede { font-size: 0.98rem; margin-bottom: 22px; }
  .microcopy { font-size: 0.72rem; }
  .eyebrow { font-size: 0.68rem; margin-bottom: 12px; }
  .btn { font-size: 0.82rem; padding: 11px 18px; }

  .term-body { font-size: 0.7rem; height: 226px; padding: 14px 12px 16px; }
  .term-title { font-size: 0.66rem; }
  .dot { width: 9px; height: 9px; }

  .chip { font-size: 0.72rem; }
  .authority-inner { gap: 8px 18px; padding: 14px 0; }

  .problem h2 { font-size: 1.28rem; margin-bottom: 14px; }
  .problem p { font-size: 0.95rem; }

  .section-head { margin-bottom: 20px; }
  .section-head h2, .approach-copy h2, .contact-intro h2 { font-size: 1.28rem; }
  .section-sub, .svc p, .approach-copy p, .contact-intro p { font-size: 0.9rem; }
  .svc { padding: 20px 18px 22px; }
  .svc h3 { font-size: 1rem; margin-bottom: 8px; }
  .svc-cmd { font-size: 0.72rem; margin-bottom: 10px; }

  .p-key, .p-val { font-size: 0.82rem; }
  .principles li { padding: 13px 0; }
  .assurances li { font-size: 0.78rem; }

  .field label { font-size: 0.72rem; }
  .field input, .field textarea { font-size: 0.92rem; padding: 10px 12px; }
  .form { padding: 22px 18px; gap: 14px; }
  .footer-inner { font-size: 0.74rem; }

  .contact-intro p, .lede { max-width: none; }
}

/* avoid orphaned single-word wraps on headings/body */
h1, h2, h3 { text-wrap: balance; }
.lede, .problem p, .svc p, .section-sub, .contact-intro p, .approach-copy p { text-wrap: pretty; }

/* mobile: tighter vertical rhythm */
@media (max-width: 640px) {
  #main { gap: 12px; }
  .hero { padding: 18px 0 26px; }
  .services, .approach, .contact, .spec, .problem { padding: 26px 0; }
  .hero-grid, .approach-grid, .contact-grid { gap: 20px; }
  .hero h1 { margin-bottom: 10px; }
  .lede { margin-bottom: 16px; }
  .eyebrow { margin-bottom: 8px; }
  .microcopy { margin-top: 12px; }
  .hero-actions { gap: 10px; }
  .authority-inner { gap: 6px 16px; padding: 10px 0; }
  .problem h2 { margin-bottom: 10px; }
  .problem-inner { min-height: 0; }
  .slide-dots { margin-top: 16px; }
  .section-head { margin-bottom: 14px; }
  .section-sub { margin-top: 10px; }
  .svc { padding: 15px 16px 17px; }
  .svc-cmd { margin-bottom: 8px; }
  .svc h3 { margin-bottom: 6px; }
  .approach-copy p { margin-top: 12px; }
  .principles li { padding: 10px 0; }
  .contact-intro p { margin-top: 12px; }
  .assurances { margin-top: 16px; gap: 8px; }
  .form { padding: 18px 16px; gap: 11px; }
  .footer { padding: 16px 0; }
}

/* mobile: shorter header, larger logo, smaller buttons */
@media (max-width: 640px) {
  html { scroll-padding-top: 56px; }
  .topbar-inner { height: 46px; }
  .brand { font-size: 0.95rem; }
  .nav-cta { font-size: 0.72rem; padding: 6px 10px; }
  .btn { font-size: 0.76rem; padding: 9px 14px; }
}

/* credentials strip: centered, with a closing dot after the last chip */
.authority-inner { justify-content: center; }
.chip:last-child::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); flex: none; }

/* mobile: credentials read as one clean scrollable line, not ragged wrapped rows */
@media (max-width: 640px) {
  .authority { overflow: hidden; }
  .authority-inner {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 0 15px;
    padding: 9px 0;
    -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent);
    mask-image: linear-gradient(90deg, #000 86%, transparent);
  }
  .authority-inner::-webkit-scrollbar { display: none; }
  .chip { white-space: nowrap; flex: none; font-size: 0.7rem; gap: 7px; }
}

/* dots evenly spaced: chip's internal gap == gap between chips, so text sits
   centered between the purple dots */
.chip { gap: 14px; }
.authority-inner { gap: 12px 14px; }
@media (max-width: 640px) {
  .chip { gap: 11px; }
  .authority-inner { gap: 0 11px; }
}

/* tighten the gap between the credentials strip and the hero */
.authority-inner { padding: 12px 0; }
.hero { padding-top: 12px; margin-top: -16px; }
@media (max-width: 640px) {
  .authority-inner { padding: 7px 0; }
  .hero { padding-top: 8px; margin-top: -6px; }
}

/* credentials: static centered on desktop, seamless auto-scroll marquee on mobile */
.authority-inner { display: flex; justify-content: center; overflow: hidden; flex-wrap: nowrap; gap: 0;
  -webkit-mask-image: none; mask-image: none; }
.chip-track { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 0; }
.chip-set { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 12px 14px; }
.chip-dup { display: none; }

@media (max-width: 640px) {
  .authority-inner { justify-content: flex-start; overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
  .chip-track { flex-wrap: nowrap; width: max-content; animation: marquee 34s linear infinite; }
  /* padding-right makes each set carry its own trailing gap, so -50% is seamless */
  .chip-set { flex-wrap: nowrap; gap: 0 11px; padding-right: 11px; }
  .chip-dup { display: flex; }
  .chip:last-child::after { display: none; }
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .chip-track { animation: none; }
  .authority-inner { overflow-x: auto; }
}

/* mobile: smaller credentials banner, larger hero headline */
@media (max-width: 640px) {
  .authority-inner { padding: 5px 0; }
  .chip { font-size: 0.62rem; gap: 9px; }
  .chip::before, .chip:last-child::after { width: 5px; height: 5px; }
  .chip-set { gap: 0 9px; padding-right: 9px; }
  .hero h1 { font-size: 2rem; margin-bottom: 12px; }
}

/* mobile: larger logo */
@media (max-width: 640px) { .brand { font-size: 1.15rem; } }

/* privacy note under the contact form */
.form-note { font-family: var(--font-mono); font-size: 0.72rem; color: var(--dim); margin: 2px 0 0; }
@media (max-width: 640px) { .form-note { font-size: 0.66rem; } }
