/* ============================================================
   Alfa Defense — design system
   Dark intelligence-agency aesthetic. Sans-serif only.
   No backdrop-filter on fixed/sticky elements (GPU crash trap).
   ============================================================ */

@font-face {
  font-family: 'Lexend';
  src: url('../fonts/lexend.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('../fonts/source-sans-3.woff2') format('woff2');
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --bg: #0a0a0c;
  --bg-raise: #101014;
  --panel: #141419;
  --panel-2: #191920;
  --line: #26262e;
  --line-soft: #1d1d24;
  --text: #e8e8ec;
  --muted: #a2a2ae;
  --accent: #c9a13d;         /* primary actions — brand gold */
  --accent-bright: #edcf7e;  /* small accents, kickers */
  --accent-dark: #8a6b25;
  --accent-glow: rgba(201, 161, 61, .35);
  --font-head: 'Lexend', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --header-h: 72px;
  --radius: 10px;
  --radius-lg: 16px;
  --container: 1200px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--text); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent-bright); }
ul { margin: 0; padding: 0; }
strong { font-weight: 600; }

.muted { color: var(--muted); }
.lead { font-size: 1.2rem; color: var(--muted); line-height: 1.6; max-width: 44em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* Kicker — small red overline label */
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head);
  font-size: .8rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 14px;
}
.kicker::before { content: ""; width: 26px; height: 2px; background: var(--accent); }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #16120a; padding: 10px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #16120a; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn, .btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  padding: 13px 26px; border-radius: var(--radius);
  cursor: pointer; border: 1px solid transparent;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn { background: var(--accent); color: #16120a; }
.btn:hover { background: var(--accent-bright); color: #16120a; box-shadow: 0 6px 24px var(--accent-glow); }
.btn-outline { border-color: var(--line); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-bright); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 12, .96);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; letter-spacing: .08em; }
.brand-text small { color: var(--muted); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.brand:hover .brand-text strong { color: var(--accent-bright); }

.site-nav ul { list-style: none; display: flex; align-items: center; gap: 6px; }
.site-nav a {
  display: block; padding: 10px 14px; border-radius: 8px;
  font-family: var(--font-head); font-size: .92rem; font-weight: 500; color: var(--muted);
}
.site-nav a:hover { color: var(--text); background: var(--panel); }
.site-nav .nav-cta a.btn { color: #16120a; padding: 11px 20px; }
.site-nav .nav-cta a.btn:hover { background: var(--accent-bright); }

.has-sub { position: relative; }
.has-sub .sub {
  position: absolute; top: 100%; left: 0; min-width: 260px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px; margin-top: 6px; list-style: none;
  display: none; flex-direction: column; gap: 2px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
}
.has-sub:hover .sub, .has-sub:focus-within .sub { display: flex; }
/* invisible bridge over the 6px gap so hover survives the mouse travel */
.has-sub .sub::before {
  content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px;
}
.has-sub .sub li { align-self: stretch; }
.has-sub .sub a { color: var(--muted); font-weight: 500; padding: 10px 14px; white-space: nowrap; border-radius: 8px; }
.has-sub .sub a:hover { color: var(--text); background: var(--panel-2); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px;
  background: none; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.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 (home) ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: min(88vh, 820px);
  display: flex; align-items: center;
  border-bottom: 1px solid var(--line-soft);
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 22% center; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(10,10,12,.55) 0%, rgba(10,10,12,.82) 46%, rgba(10,10,12,.96) 100%);
}
.hero .container { position: relative; z-index: 1; }
.hero-content { max-width: 640px; margin-left: auto; padding: 96px 0; }
.hero-content h1 { text-transform: uppercase; letter-spacing: .04em; }
.hero-content h1 em { font-style: normal; color: var(--accent-bright); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}
.page-hero-bg { position: absolute; inset: 0; }
.page-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,12,.78) 0%, rgba(10,10,12,.9) 70%, var(--bg) 100%);
}
.page-hero .container { position: relative; z-index: 1; padding-top: 92px; padding-bottom: 72px; }
.page-hero .lead { margin-top: 6px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; font-size: .85rem; color: var(--muted); margin-bottom: 22px; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--line); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent-bright); }
.breadcrumb [aria-current] { color: var(--text); }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-tight { padding: 72px 0; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-alt { background: var(--bg-raise); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

/* ---------- Grids & cards ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px; position: relative;
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card h3 { margin-top: 18px; }
a.card { display: block; }
a.card:hover { border-color: var(--accent); color: var(--text); box-shadow: 0 14px 40px rgba(0,0,0,.45); }
a.card:hover h3 { color: var(--accent-bright); }
.card .icon {
  width: 46px; height: 46px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(201, 161, 61, .12); border: 1px solid rgba(201, 161, 61, .35);
  color: var(--accent-bright);
}
.card .icon svg { width: 22px; height: 22px; }
.card-list { list-style: none; color: var(--muted); display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.card-list li { padding-left: 22px; position: relative; }
.card-list li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 2px; background: var(--accent);
}
.card-more { display: inline-block; margin-top: 18px; font-family: var(--font-head); font-size: .88rem; font-weight: 600; color: var(--accent-bright); }

/* Numbered feature (LBS 01-04) */
.num { font-family: var(--font-head); font-weight: 700; font-size: 1rem; color: var(--accent-bright); letter-spacing: .08em; }

/* ---------- Split (media + text alternating) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split + .split { margin-top: 96px; }
.split-media { position: relative; }
.split-media img { border-radius: var(--radius-lg); border: 1px solid var(--line); width: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.split-media::before {
  content: ""; position: absolute; inset: auto -14px -14px auto; width: 56%; height: 56%;
  border: 1px solid var(--accent-dark); border-radius: var(--radius-lg); z-index: -1;
}
.split.rev .split-media { order: 2; }
.split.rev .split-media::before { inset: auto auto -14px -14px; }
.split-media img.portrait { aspect-ratio: 3 / 4; max-height: 540px; object-fit: cover; object-position: center 20%; }

.checklist { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 18px; color: var(--muted); }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist svg { flex: none; width: 20px; height: 20px; margin-top: 3px; color: var(--accent-bright); }

/* ---------- Stat band ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.stat { border-left: 2px solid var(--accent); padding-left: 22px; }
.stat .value { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.9rem, 3.4vw, 2.7rem); color: var(--text); line-height: 1.1; }
.stat .label { font-family: var(--font-head); font-weight: 600; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-bright); margin: 6px 0 8px; }
.stat p { color: var(--muted); font-size: .96rem; }

/* ---------- Quote ---------- */
.quote {
  max-width: 880px; margin: 0 auto; text-align: center;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem); line-height: 1.6; color: var(--text);
}
.quote::before {
  content: ""; display: block; width: 48px; height: 3px; background: var(--accent); margin: 0 auto 30px;
}

/* ---------- Timeline (locations) ---------- */
.timeline { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.tl-item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; }
.tl-year { font-family: var(--font-head); font-weight: 700; font-size: 2rem; color: var(--accent-bright); }
.tl-item h3 { margin-top: 8px; }
.tl-item p { color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; text-align: center;
  border-top: 1px solid var(--line-soft);
  background:
    radial-gradient(600px 200px at 50% 120%, rgba(201,161,61,.22), transparent 70%),
    var(--bg-raise);
  padding: 88px 0;
}
.cta-band h2 { max-width: 640px; margin: 0 auto .4em; }
.cta-band p { color: var(--muted); max-width: 520px; margin: 0 auto 30px; }

/* ---------- Prev / next ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; border-top: 1px solid var(--line-soft); padding: 40px 0; }
.pager a {
  font-family: var(--font-head); font-weight: 600; color: var(--muted);
  display: flex; flex-direction: column; gap: 4px;
}
.pager a span { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-bright); }
.pager a:hover { color: var(--text); }
.pager .next { text-align: right; margin-left: auto; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-family: var(--font-head); font-size: .85rem; font-weight: 600; letter-spacing: .04em; margin-bottom: 8px; }
.field label .req { color: var(--accent-bright); }
.field input, .field textarea {
  width: 100%; padding: 13px 16px;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; font-size: 1rem;
  transition: border-color .2s var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { min-height: 150px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .88rem; color: var(--muted); }

.banner { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 24px; font-weight: 600; }
.banner.ok { background: rgba(22, 101, 52, .25); border: 1px solid #16653480; color: #86efac; }
.banner.err { background: rgba(153, 27, 27, .25); border: 1px solid #991b1b80; color: #fca5a5; }
[hidden] { display: none !important; }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 64px; align-items: start; }
.office { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }
.office + .office { margin-top: 20px; }
.office h3 { display: flex; align-items: center; gap: 10px; }
.office h3 .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-bright); }
.office p, .office a { color: var(--muted); }
.office a:hover { color: var(--accent-bright); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); background: var(--bg-raise); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1.4fr; gap: 40px; padding: 64px 24px; }
.footer-brand p { color: var(--muted); font-size: .95rem; margin-top: 16px; max-width: 30em; }
.footer-nav h2, .footer-contact h2 {
  font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px;
}
.footer-nav ul, .footer-contact ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-nav a, .footer-contact a { color: var(--text); font-size: .95rem; }
.footer-nav a:hover, .footer-contact a:hover { color: var(--accent-bright); }
.footer-contact .muted { font-size: .88rem; }
.footer-bottom { border-top: 1px solid var(--line-soft); padding-top: 22px; padding-bottom: 26px; }
.footer-bottom p { color: var(--muted); font-size: .85rem; }

/* ---------- Global cyber grid backdrop ---------- */
/* Static CSS only — no filters, no background-attachment:fixed (GPU trap). */
.cyber-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 480px at 80% -10%, rgba(201, 161, 61, .12), transparent 70%),
    radial-gradient(700px 420px at 8% 110%, rgba(201, 161, 61, .08), transparent 70%),
    repeating-linear-gradient(0deg, rgba(201, 161, 61, .065) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(90deg, rgba(201, 161, 61, .065) 0 1px, transparent 1px 56px);
}

/* ---------- Hero scanline sweep ---------- */
.hero-bg::before, .page-hero-bg::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 1;
  background: linear-gradient(90deg, transparent 0%, rgba(237, 207, 126, .55) 50%, transparent 100%);
  box-shadow: 0 0 18px 2px rgba(201, 161, 61, .35);
}
@media (prefers-reduced-motion: no-preference) {
  .hero-bg::before { animation: scanline 8s linear infinite; }
  .page-hero-bg::before { animation: scanline 6s linear infinite; }
}
@keyframes scanline {
  0% { transform: translateY(-4px); opacity: 0; }
  6% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(880px); opacity: 0; }
}

/* ---------- Card targeting brackets (hover) ---------- */
.card::before, .card::after {
  content: ""; position: absolute; width: 20px; height: 20px; z-index: 1;
  opacity: 0; transition: opacity .25s var(--ease), transform .25s var(--ease);
  pointer-events: none;
}
.card::before {
  top: 10px; left: 10px;
  border-top: 2px solid var(--accent-bright); border-left: 2px solid var(--accent-bright);
  transform: translate(4px, 4px);
}
.card::after {
  bottom: 10px; right: 10px;
  border-bottom: 2px solid var(--accent-bright); border-right: 2px solid var(--accent-bright);
  transform: translate(-4px, -4px);
}
a.card:hover::before, a.card:hover::after, .card:hover::before, .card:hover::after {
  opacity: .9; transform: translate(0, 0);
}

/* ---------- Stat value glow ---------- */
.stat .value { text-shadow: 0 0 26px rgba(201, 161, 61, .45); }

/* ---------- Animated network background ---------- */
.netbg { position: relative; overflow: hidden; }
.netbg > .container { position: relative; z-index: 1; }
.netbg-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: .55;
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1020px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .split.rev .split-media { order: 0; }
  .split-media img { aspect-ratio: 16 / 9; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .section-tight { padding: 48px 0; }
  .grid-2, .grid-3, .stats, .timeline, .form-grid, .pager { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .hero { min-height: 70vh; }
  .hero-content { padding: 72px 0; margin-left: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; padding: 48px 24px; }

  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--bg-raise); border-bottom: 1px solid var(--line);
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 12px 16px 20px; }
  .site-nav a { padding: 14px 12px; font-size: 1rem; }
  .has-sub .sub {
    position: static; display: flex; min-width: 0; box-shadow: none;
    background: transparent; border: none; border-left: 1px solid var(--line); border-radius: 0;
    margin: 0 0 6px 14px; padding: 0;
  }
  .has-sub .sub a { font-size: .92rem; white-space: normal; }
  .nav-cta { margin-top: 10px; }
  .nav-cta a.btn { justify-content: center; }
}
