:root {
  --brand: #1a6b4a;
  --brand-strong: #125238;
  --accent: #2f9e69;
  --text: #1f2a23;
  --muted: #5f6b64;
  --bg: #f4f7f6;
  --card: #ffffff;
  --border: #d8e2dd;
  --shadow: 0 18px 44px rgba(18, 46, 34, 0.08);
  --shadow-soft: 0 10px 26px rgba(18, 46, 34, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Roboto, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 400px at 10% 0%, rgba(47, 158, 105, 0.10) 0%, rgba(244, 247, 246, 0) 55%),
    radial-gradient(900px 400px at 90% 10%, rgba(26, 107, 74, 0.10) 0%, rgba(244, 247, 246, 0) 60%),
    var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("/assets/img/noise.svg");
  opacity: 0.9;
  mix-blend-mode: multiply;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid rgba(216, 226, 221, 0.75);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--brand);
}

.brand-icon { height: 36px; width: auto; display: block; }
.brand-text { height: 19px; width: 125px; display: block; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  font-size: 14px;
}

.site-nav a {
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
  transition: 0.2s ease;
}

.site-nav a.active,
.site-nav a:hover {
  color: var(--brand);
  background: rgba(26, 107, 74, 0.07);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
  white-space: nowrap;
}

.btn.primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 14px 28px rgba(26, 107, 74, 0.20);
}

.btn.primary:hover {
  background: var(--brand-strong);
  transform: translateY(-1px);
}

.btn.secondary {
  border-color: var(--brand);
  color: var(--brand);
  background: #fff;
}

.btn.secondary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

/* HERO */
.hero {
  padding: 80px 0 60px;
  background: linear-gradient(rgba(18, 46, 34, 0.85), rgba(18, 46, 34, 0.85)), url("/assets/img/hero-bg.svg") center / cover no-repeat;
  color: #f4faf7;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* GRID SYSTEM - УМНАЯ АДАПТИВНОСТЬ 2.0 (Защита от вылезания) */
.grid {
  display: grid;
  gap: 24px;
  width: 100%;
}

.grid-2 { 
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)) !important; 
}

.grid-3 { 
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)) !important; 
  gap: 24px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* CARDS */
.card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  width: 100% !important;
  min-width: 0 !important; 
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  padding: 24px !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden !important; 
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.card-excerpt {
  flex-grow: 1;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-wrap: break-word;
}

.card h3 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.3;
  min-height: 2.6em; 
  white-space: normal;
  word-break: break-word;
}

/* KPI */
.kpi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.kpi .card strong {
  display: block;
  font-size: 28px;
  color: var(--brand);
  margin-bottom: 4px;
}

/* FORMS */
.cta-panel {
  background: var(--brand);
  color: #fff;
  border-radius: 20px;
  padding: 40px;
  display: grid;
  gap: 32px;
  grid-template-columns: 1.8fr 1fr;
  box-shadow: var(--shadow);
}

.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font: inherit;
}

.field input::placeholder { color: rgba(255,255,255,0.5); }

/* MOBILE RESPONSIVENESS */
@media (max-width: 992px) {
  .cta-panel { grid-template-columns: 1fr; padding: 24px; }
}

@media (max-width: 640px) {
  .header-inner { padding: 12px 0; }
  .site-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero { padding: 60px 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr !important; }
  .card h3 { min-height: auto; }
}

/* UTILS */
.section { padding: 60px 0; }
.muted { color: var(--muted); }
.section-icon { width: 32px; height: 32px; color: var(--brand); margin-bottom: 8px; display: block; }