:root {
  --ink: #12261a;
  --ink-2: #1c3a27;
  --text: #1f2937;
  --muted: #5b6676;
  --line: #e3e8e4;
  --bg: #f5f8f5;
  --card: #ffffff;
  --accent: #2f7d1f;
  --accent-dark: #1f5a18;
  --accent-soft: #e8f3e3;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--accent-dark); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
[hidden] { display: none !important; }

/* шапка */
.site-header { background: #fff; position: sticky; top: 0; z-index: 10; border-bottom: 3px solid var(--accent); box-shadow: 0 1px 8px rgba(18,38,26,.06); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { display: block; height: 46px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 26px; font-weight: 600; letter-spacing: .12em; color: var(--accent-dark); }
.brand-text small { font-size: 12px; color: var(--muted); letter-spacing: .01em; }
.main-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.main-nav a {
  color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 15px; font-weight: 500;
}
.main-nav a:hover { background: var(--accent-soft); color: var(--accent-dark); }
.main-nav a.active { background: var(--accent-soft); color: var(--accent-dark); box-shadow: inset 0 -2px 0 var(--accent); }

/* главная */
.hero {
  background:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(135deg, #0f2417 0%, #1e4d2a 100%);
  color: #e6efe8;
  padding: 72px 0 64px;
}
.eyebrow { margin: 0 0 12px; text-transform: uppercase; letter-spacing: .14em; font-size: 13px; color: #a6d98f; }
.hero h1 { margin: 0 0 20px; font-size: clamp(30px, 5vw, 46px); line-height: 1.15; color: #fff; max-width: 18ch; }
.hero-text { max-width: 720px; }
.hero-text p { margin: 0 0 12px; font-size: 18px; }
.hero-text ul { margin: 0 0 8px; padding-left: 0; list-style: none; }
.hero-text li { position: relative; padding-left: 22px; margin: 6px 0; }
.hero-text li::before { content: ""; position: absolute; left: 0; top: .7em; width: 10px; height: 3px; background: #6cc04a; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 0; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px; background: #3f9a2b; color: #fff;
  text-decoration: none; font-weight: 600;
}
.btn:hover { background: #2f7d1f; color: #fff; }
.btn.ghost { background: transparent; border: 1px solid #6f9279; color: #e6efe8; }
.btn.ghost:hover { background: rgba(255,255,255,.08); color: #fff; }

.stats { background: #fff; border-bottom: 1px solid var(--line); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0; }
.stat-grid > * { padding: 22px 18px; text-decoration: none; color: var(--text); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.stat-grid > *:first-child { border-left: 0; padding-left: 0; }
.stat-grid b { font-size: 24px; line-height: 1.2; color: var(--accent-dark); }
.stat-grid span { font-size: 14px; color: var(--muted); line-height: 1.4; }
a.stat-link:hover b, .stat-grid a:hover b { text-decoration: underline; }

.cards-section { padding: 56px 0 24px; }
.cards-section h2 { margin: 0 0 24px; font-size: 28px; color: var(--ink); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.card {
  display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(18,38,26,.10); border-color: var(--accent); color: var(--text); }
.card h3 { margin: 0; font-size: 19px; color: var(--ink); line-height: 1.3; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .more { margin-top: auto; padding-top: 6px; color: var(--accent-dark); font-weight: 600; font-size: 15px; }

/* внутренние страницы */
.page { padding: 40px 0 64px; }
.page h1 { margin: 0 0 24px; font-size: clamp(28px, 4vw, 38px); line-height: 1.2; color: var(--ink); }
.back { margin: 0 0 8px; font-size: 15px; }
.back a { text-decoration: none; }
.prose {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px);
  max-width: 860px;
}
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 16px; }
.prose h2 { margin: 32px 0 12px; font-size: 22px; color: var(--ink); }
.prose h3 { margin: 24px 0 8px; font-size: 18px; color: var(--ink); }
.prose ul { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--accent); }
.prose.intro { max-width: none; padding: 20px 24px; }

/* проекты */
.filter { margin: 24px 0 8px; max-width: 560px; }
.filter label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.filter input {
  width: 100%; padding: 12px 14px; font: inherit; border: 1px solid #c9d3cb; border-radius: 10px; background: #fff;
}
.filter input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.muted { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.year-group { margin-top: 28px; }
.year-group h2 { margin: 0 0 12px; font-size: 26px; color: var(--accent-dark); display: flex; align-items: center; gap: 14px; }
.year-group h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.proj {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px;
  padding: 16px 20px; margin-bottom: 12px;
}
.proj header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.proj h3 { margin: 0; font-size: 17px; line-height: 1.4; color: var(--ink); }
.proj .yrs { flex: none; font-size: 13px; font-weight: 600; background: var(--accent-soft); color: var(--accent-dark); padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.proj .cust { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.proj ul { margin: 10px 0 0; padding-left: 20px; font-size: 15px; }
.proj li { margin: 3px 0; }
.proj li::marker { color: var(--accent); }

/* подвал */
.site-footer { background: var(--ink); color: #b4c6b9; margin-top: 24px; font-size: 15px; }
.foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 32px 0 16px; }
.foot strong { color: #fff; }
.foot p { margin: 6px 0 0; max-width: 460px; }
.site-footer a { color: #a6d98f; }
.copy { padding: 12px 0 28px; font-size: 13px; color: #7f9686; border-top: 1px solid #27442f; margin-top: 8px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 48px 0 44px; }
  .brand img { height: 36px; }
  .brand-text strong { font-size: 21px; }
  .brand-text small { display: none; }
  .main-nav a { padding: 7px 9px; font-size: 14px; }
  .stat-grid > * { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .stat-grid > *:first-child { border-top: 0; }
  .proj header { flex-direction: column; gap: 6px; }
}

.foot .req { font-size: 13px; color: #8fa596; }

/* изображения в тексте */
.prose .plogo { margin: 8px 0 14px; }
.prose .plogo img { display: block; height: 56px; width: auto; max-width: 100%; }
.prose .fig { margin: 20px 0; }
.prose .fig img { display: block; width: min(420px, 100%); height: auto; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 14px rgba(18,38,26,.08); }
.prose .fig figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
