/* =========================================================
   КОНТУР — общие стили
   ========================================================= */

/* -------- Fonts -------- */
@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@400;500;600;700;800&family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* -------- CSS Variables -------- */
:root {
  /* Dark surface (hero, footer) */
  --ink: #1D1D1B;            /* ZT brand black PANTONE BLACK */
  --ink-2: #252523;
  --ink-3: #2E2E2B;
  --ink-line: #3A3A37;

  /* Light surface (content pages) */
  --paper: #F4F4F0;
  --paper-2: #EAEAE4;
  --paper-3: #DEDED6;
  --paper-line: #C8C8BE;

  /* Text */
  --text-on-dark: #E8E8E4;
  --text-on-dark-dim: #9A9E9A;
  --text-on-light: #1A1C20;
  --text-on-light-dim: #5A5D62;

  /* Accents */
  --amber: #EC671A;          /* primary accent — ZT brand orange PANTONE 165 C */
  --amber-2: #F47F3A;
  --amber-deep: #C04E0E;
  --steel: #3A5468;           /* secondary — cool blue-steel */
  --signal: #C6D63B;           /* subtle lime signal (for indicators) */
  --danger: #B83232;

  /* Misc */
  --radius: 2px;
  --radius-lg: 4px;
  --shadow-soft: 0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.08);
  --shadow-sharp: 0 0 0 1px rgba(0,0,0,0.08);

  /* Fonts */
  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Layout */
  --container: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
}

/* -------- Reset / Base -------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-on-light);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* -------- Container -------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* -------- Typography -------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--amber);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 .4em;
}
h1 { font-size: clamp(40px, 6vw, 84px); font-weight: 700; }
h2 { font-size: clamp(28px, 3.6vw, 46px); }
h3 { font-size: clamp(20px, 2.2vw, 28px); }

p { margin: 0 0 1em; }

.mono { font-family: var(--font-mono); }

/* -------- Header -------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: var(--text-on-dark);
  border-bottom: 1px solid var(--ink-line);
}
.site-header.light {
  background: var(--paper);
  color: var(--text-on-light);
  border-bottom: 1px solid var(--paper-line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
}
.logo-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  position: relative;
}
.logo-mark::before,
.logo-mark::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.logo-mark::before { width: 14px; height: 1px; }
.logo-mark::after { width: 1px; height: 14px; }
.logo-mark svg {
  width: 18px;
  height: 18px;
  position: relative;
  z-index: 1;
}
.logo small {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.15em;
  opacity: 0.6;
  display: block;
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: var(--radius);
  position: relative;
  transition: color .2s ease;
}
.nav a:hover { color: var(--amber); }
.nav a.active { color: var(--amber); }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 4px;
  height: 1px;
  background: var(--amber);
}

.nav-cta {
  margin-left: 12px;
  padding: 10px 18px !important;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all .2s ease;
}
.nav-cta:hover {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink) !important;
}

/* Mobile nav toggle */
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle {
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border: 1px solid currentColor;
  }
  .nav-toggle span {
    display: block; width: 18px; height: 1px;
    background: currentColor;
    position: relative;
  }
  .nav-toggle span::before,
  .nav-toggle span::after {
    content: ""; position: absolute; left: 0;
    width: 18px; height: 1px; background: currentColor;
  }
  .nav-toggle span::before { top: -5px; }
  .nav-toggle span::after  { top:  5px; }

  .nav {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--ink-line);
    padding: 8px 0;
    transform: translateY(-10px);
    opacity: 0; pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .site-header.light .nav { background: var(--paper); }
  .nav.open {
    opacity: 1; pointer-events: auto; transform: translateY(0);
  }
  .nav a { padding: 14px var(--gutter); }
  .nav-cta { margin: 8px var(--gutter); text-align: center; }
}

/* -------- Buttons -------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: all .2s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--amber);
  color: var(--ink);
}
.btn-primary:hover {
  background: var(--amber-2);
  transform: translateY(-1px);
}
.btn-outline {
  border-color: currentColor;
  color: inherit;
  background: transparent;
}
.btn-outline:hover {
  background: currentColor;
  color: var(--ink);
}
.btn-outline-light {
  border-color: var(--text-on-light);
  color: var(--text-on-light);
}
.btn-outline-light:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* -------- Sections -------- */
.section {
  padding: clamp(60px, 8vw, 120px) 0;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: clamp(32px, 5vw, 64px);
  flex-wrap: wrap;
}
.section-head h2 { max-width: 720px; }

.dark { background: var(--ink); color: var(--text-on-dark); }
.dark p { color: var(--text-on-dark-dim); }

/* -------- Footer -------- */
.site-footer {
  background: var(--ink);
  color: var(--text-on-dark);
  padding: 80px 0 40px;
  border-top: 1px solid var(--ink-line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-on-dark-dim);
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; font-size: 14px; }
.footer-col a { color: var(--text-on-dark); transition: color .2s ease; }
.footer-col a:hover { color: var(--amber); }
.footer-about p { font-size: 14px; color: var(--text-on-dark-dim); max-width: 340px; }
.footer-bottom {
  border-top: 1px solid var(--ink-line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-on-dark-dim);
}

/* -------- Utility -------- */
.grid { display: grid; gap: 32px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 600px) and (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}

.divider {
  height: 1px;
  background: var(--paper-line);
  border: none;
  margin: 0;
}
.dark .divider { background: var(--ink-line); }

/* -------- Reveal animation --------
   By default visible. JS adds .js-reveal-enabled on <html>
   to opt into the hidden initial state. This ensures content is
   still visible if JS is disabled or fails. */
.reveal { transition: opacity .7s ease, transform .7s ease; }
html.js-reveal-enabled .reveal {
  opacity: 0;
  transform: translateY(16px);
}
html.js-reveal-enabled .reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* -------- Features / Capabilities (used on multiple pages) -------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--paper-line);
  border: 1px solid var(--paper-line);
}
@media (max-width: 900px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
}
.feature {
  background: var(--paper);
  padding: 32px 28px;
  transition: background .25s ease;
}
.feature:hover { background: var(--paper-2); }
.feature-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber);
  letter-spacing: 0.15em;
  margin-bottom: 20px;
}
.feature h3 {
  font-size: 20px;
  margin-bottom: 12px;
}
.feature p {
  font-size: 14px;
  color: var(--text-on-light-dim);
  line-height: 1.6;
  margin: 0;
}

/* -------- Tag / Badge -------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  border-radius: var(--radius);
}
.tag-civil { color: var(--amber); }
.tag-military { color: var(--danger); }
.tag-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* -------- Blog -------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--paper-line); border-radius: var(--radius-lg); padding: 26px 24px; text-decoration: none; color: inherit; transition: border-color .2s ease, transform .2s ease; }
.blog-card:hover { border-color: var(--amber); transform: translateY(-2px); }
.blog-card-meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); margin-bottom: 14px; }
.blog-card-title { font-family: var(--font-display); font-weight: 500; font-size: 19px; line-height: 1.25; margin: 0 0 12px; color: var(--text-on-light); }
.blog-card-excerpt { font-size: 14px; color: var(--text-on-light-dim); line-height: 1.6; margin: 0 0 18px; }
.blog-card-link { margin-top: auto; font-family: var(--font-mono); font-size: 13px; color: var(--text-on-light); display: inline-flex; align-items: center; gap: 8px; }

/* -------- Article -------- */
.article-wrap { max-width: 760px; margin: 0 auto; }
.article-head .meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); margin-bottom: 16px; }
.article-body { font-size: 17px; line-height: 1.75; color: var(--text-on-light); }
.article-body h2 { font-size: clamp(22px, 2.6vw, 30px); margin: 40px 0 16px; }
.article-body h3 { font-size: 20px; margin: 28px 0 12px; }
.article-body p { margin: 0 0 20px; }
.article-body ul { margin: 0 0 20px; padding-left: 22px; }
.article-body li { margin-bottom: 8px; color: var(--text-on-light-dim); }
.article-cta { margin-top: 44px; padding: 28px; background: var(--paper-2); border: 1px solid var(--paper-line); border-radius: var(--radius-lg); }
.article-cta h3 { margin: 0 0 10px; }
.article-cta p { margin: 0 0 18px; color: var(--text-on-light-dim); }
