:root {
  --ink: #12233a;
  --ink-soft: #3d4d5c;
  --muted: #62736b;
  --paper: #fbf9f4;
  --surface: #ffffff;
  --tint: #eef3ef;
  --accent: #1f6f5c;
  --accent-dark: #175747;
  --accent-light: #dcebe4;
  --amber: #d98e2b;
  --amber-light: #fbeed8;
  --blue: #2f6f9f;
  --blue-light: #e2edf6;
  --line: #e3ddd1;
  --danger: #b23a2e;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px -24px rgba(18, 35, 58, 0.35);
  --max: 1160px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: Georgia, "Times New Roman", "PT Serif", serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 16px/1.65 var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.4em;
  font-weight: 700;
}

h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.18rem; }

p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(100% - 40px, var(--max)); margin-inline: auto; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; color: #fff; }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 249, 244, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 76px;
  padding-block: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.brand:hover { color: var(--ink); }
.brand-mark { display: grid; place-items: center; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--font-head); font-size: 1.22rem; }
.brand-text small { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.02em; }

.site-nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--accent-dark); border-bottom-color: var(--accent-light); }
.site-nav .cta {
  background: var(--accent);
  color: #fff;
  padding: 9px 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.site-nav .cta:hover { background: var(--accent-dark); color: #fff; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.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); }

/* Shared bits */
.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--accent-dark); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-light); }
.btn-block { width: 100%; }

.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-tinted { background: var(--tint); }

.section-head { max-width: 720px; margin-bottom: 34px; }
.section-head h2 { margin-bottom: 12px; }
.section-sub { color: var(--muted); margin: 0; }

/* Hero */
.hero { padding: clamp(40px, 6vw, 76px) 0 clamp(48px, 6vw, 80px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.hero-text .lead {
  font-size: clamp(1.02rem, 1.4vw, 1.16rem);
  color: var(--ink-soft);
  max-width: 54ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 32px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hero-stats div { margin: 0; }
.hero-stats dt {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 700;
  color: var(--accent-dark);
  line-height: 1.1;
}
.hero-stats dd { margin: 4px 0 0; color: var(--muted); font-size: 0.88rem; }

.hero-figure { position: relative; margin: 0; }
.hero-figure img {
  width: 100%;
  border-radius: 22px;
  box-shadow: var(--shadow);
  border: 6px solid var(--surface);
}
.hero-badge {
  position: absolute;
  right: 18px;
  bottom: -22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-badge strong { font-size: 0.92rem; color: var(--accent-dark); }
.hero-badge span { font-size: 0.78rem; color: var(--muted); }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.about-figure { margin: 0; }
.about-figure img {
  width: 100%;
  border-radius: 22px;
  border: 6px solid var(--surface);
  box-shadow: var(--shadow);
}
.check-list { display: grid; gap: 10px; margin-top: 20px; }
.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--ink-soft);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.42em;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: inset 0 0 0 2px var(--accent);
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px 20px;
  box-shadow: 0 10px 24px -20px rgba(18, 35, 58, 0.45);
  border-top: 4px solid var(--accent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card[data-accent="amber"] { border-top-color: var(--amber); }
.card[data-accent="blue"] { border-top-color: var(--blue); }
.card-num {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.card h3 { margin-bottom: 2px; }
.card p { color: var(--ink-soft); font-size: 0.94rem; margin: 0; }
.card-meta { display: grid; gap: 6px; margin: 4px 0 0; }
.card-meta li {
  font-size: 0.83rem;
  color: var(--muted);
  padding-left: 18px;
  position: relative;
}
.card-meta li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--amber);
}
.card[data-accent="green"] .card-meta li::before { background: var(--accent); }
.card[data-accent="blue"] .card-meta li::before { background: var(--blue); }
.card-link {
  margin-top: auto;
  padding-top: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent-dark);
}
.card-link::after { content: " →"; }
.card-link:hover { text-decoration: underline; }

/* Staff */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.staff-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
}
.avatar {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
}
.staff-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.staff-role { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 6px; }
.staff-meta { font-size: 0.8rem; color: var(--muted); margin: 0; }

/* News */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.news-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.news-date { font-size: 0.78rem; color: var(--muted); margin: 0; text-transform: uppercase; letter-spacing: 0.06em; }
.news-date span { color: var(--accent); font-weight: 700; }
.news-card h3 { font-size: 1.08rem; margin: 0; }
.news-card p { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }
.news-card .card-link { padding-top: 8px; }

/* Lead form */
.lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.lead-text { position: sticky; top: 100px; }
.lead-points { display: grid; gap: 10px; margin: 20px 0 24px; }
.lead-points li { position: relative; padding-left: 26px; color: var(--ink-soft); }
.lead-points li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 0;
  color: var(--accent);
  font-weight: 700;
}
.lead-note { font-size: 0.92rem; color: var(--muted); }

.lead-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(22px, 3vw, 32px);
  box-shadow: var(--shadow);
}
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink-soft);
}
.field label span { color: var(--danger); }
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px #f6ded9;
}
.field-error {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--danger);
}
.field-trap {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 6px 0 4px;
  cursor: pointer;
}
.consent input {
  width: 18px; height: 18px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--accent);
}
.consent a { color: var(--accent-dark); }

.lead-form .btn { margin-top: 14px; }
.form-status { margin: 14px 0 0; font-size: 0.92rem; font-weight: 600; min-height: 1.4em; }
.form-status.is-success { color: var(--accent-dark); }
.form-status.is-error { color: var(--danger); }
.form-hint { margin: 10px 0 0; font-size: 0.76rem; color: var(--muted); }

/* Contacts */
.contacts-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(22px, 3vw, 30px);
}
.contact-list { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 26px; margin: 0 0 24px; }
.contact-list dt {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 3px;
}
.contact-list dd { margin: 0; font-size: 0.96rem; color: var(--ink); }

/* Footer */
.site-footer {
  background: var(--ink);
  color: #cfdad3;
  padding: 44px 0 36px;
  margin-top: 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 28px;
}
.footer-brand strong { font-family: var(--font-head); font-size: 1.15rem; color: #fff; }
.footer-brand p { font-size: 0.85rem; margin: 4px 0 0; }
.footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; align-content: start; }
.footer-nav a { color: #cfdad3; text-decoration: none; font-size: 0.88rem; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-contacts { display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; }
.footer-contacts a { color: #fff; text-decoration: none; }
.footer-contacts a:hover { text-decoration: underline; }
.footer-contacts p { margin: 8px 0 0; font-size: 0.78rem; color: #9fb0a7; }

/* Responsive */
@media (max-width: 980px) {
  .hero-grid,
  .about-grid,
  .lead-grid,
  .contacts-grid { grid-template-columns: 1fr; }
  .hero-figure { order: -1; }
  .lead-text { position: static; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-contacts { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 14px 20px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 10px 2px; border-bottom: 1px solid var(--line); }
  .site-nav .cta { text-align: center; margin-top: 8px; border-bottom: 0; }
  .header-inner { position: relative; }
  .hero-stats { gap: 10px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .contact-list { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
  .hero-badge { right: 10px; bottom: -16px; }
}

@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; }
  .staff-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .brand-text small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
