:root {
  --ink: #18211c;
  --muted: #627068;
  --line: #d8dfda;
  --paper: #f7f9f6;
  --white: #ffffff;
  --forest: #1d5f43;
  --forest-dark: #123524;
  --sea: #2b6f8f;
  --coral: #c85b4e;
  --gold: #b88a32;
  --soft-green: #e7f0ea;
  --soft-blue: #e9f1f5;
  --soft-gold: #f5efdf;
  --shadow: 0 18px 48px rgba(24, 33, 28, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--white);
  color: var(--ink);
  border-radius: 4px;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: absolute;
  z-index: 10;
  top: 0; left: 0; right: 0;
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}
.brand-script { font-size: 22px; }
.brand-ru { font-size: 14px; opacity: 0.78; font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.nav-links a { color: var(--white); text-decoration: none; opacity: 0.9; }
.nav-links a:hover, .nav-links a:focus-visible {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: max(560px, calc(100svh - 96px));
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background-image: url("abkhaz-language-hero.jpg");
  background-size: cover;
  background-position: center center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgba(7, 17, 13, 0.52);
}
.hero-content { padding: 132px 0 72px; max-width: 800px; }

.eyebrow {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1, h2, h3, p { overflow-wrap: anywhere; }

h1 {
  margin: 0;
  max-width: 760px;
  font-size: 96px;
  line-height: 0.96;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-lead {
  max-width: 700px;
  margin: 26px 0 0;
  font-size: 23px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 720;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--white); color: var(--forest-dark); }
.button-secondary { border-color: rgba(255, 255, 255, 0.64); color: var(--white); background: rgba(7, 17, 13, 0.18); }
.button-dark { background: var(--forest-dark); color: var(--white); }
.button-outline { border-color: var(--line); background: transparent; color: var(--ink); }

.hero-note {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}
.pulse {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #7bd59e;
  box-shadow: 0 0 0 6px rgba(123, 213, 158, 0.15);
  flex: 0 0 auto;
}

.signal-band { background: var(--white); border-bottom: 1px solid var(--line); }
.signals {
  min-height: 96px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
}
.signal { padding: 20px 28px; border-right: 1px solid var(--line); }
.signal:first-child { padding-left: 0; }
.signal:last-child { border-right: 0; padding-right: 0; }
.signal strong { display: block; font-size: 24px; line-height: 1.1; color: var(--forest); }
.signal span { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; }

.section { padding: 86px 0; }
.section-white { background: var(--white); }
.section-forest { color: var(--white); background: var(--forest-dark); }

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(300px, 1.2fr);
  gap: 56px;
  align-items: start;
  margin-bottom: 46px;
}
.section-heading h2 { margin: 0; font-size: 52px; line-height: 1.06; letter-spacing: 0; text-wrap: balance; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 18px; line-height: 1.65; }
.section-forest .section-heading p { color: rgba(255, 255, 255, 0.7); }

.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.product-card, .role-card, .doc-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 24px;
}
.product-card { min-height: 250px; display: flex; flex-direction: column; }
.card-number { font-size: 13px; font-weight: 760; color: var(--coral); }
.product-card h3, .role-card h3, .doc-card h3 { margin: 42px 0 10px; font-size: 22px; line-height: 1.2; }
.product-card p, .role-card p, .doc-card p { margin: 0; color: var(--muted); }
.product-card:nth-child(2) .card-number, .role-card:nth-child(2) .role-tag { color: var(--sea); }
.product-card:nth-child(3) .card-number, .role-card:nth-child(3) .role-tag { color: var(--gold); }

.timeline { border-top: 1px solid rgba(255, 255, 255, 0.16); }
.timeline-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 150px;
  gap: 22px;
  align-items: center;
  min-height: 94px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}
.timeline-phase { font-size: 14px; color: rgba(255, 255, 255, 0.58); }
.timeline-row strong { font-size: 18px; font-weight: 680; }
.status-pill {
  justify-self: end;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 760;
  border: 1px solid rgba(255, 255, 255, 0.24);
}
.status-done { color: #a7edbf; }
.status-next { color: #f1ce83; }

.roles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.role-card { min-height: 260px; }
.role-tag { color: var(--coral); font-size: 13px; font-weight: 760; text-transform: uppercase; letter-spacing: 0; }
.role-card h3 { margin-top: 40px; }
.role-card a {
  display: inline-block;
  margin-top: 22px;
  font-weight: 700;
  color: var(--forest);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.docs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.doc-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 18px;
  align-items: center;
  min-height: 126px;
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}
.doc-card:hover { transform: translateY(-2px); border-color: var(--forest); }
.doc-card h3 { margin: 0 0 6px; font-size: 18px; }
.doc-arrow {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--soft-green);
  color: var(--forest);
  font-size: 20px;
}

/* ====== Контактная секция с формой ====== */
.contact-band { padding: 72px 0; background: var(--soft-gold); border-top: 1px solid #e4d6b0; }
.contact-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.contact-shell h2 { margin: 0 0 14px; max-width: 760px; font-size: 44px; line-height: 1.06; text-wrap: balance; }
.contact-shell p { margin: 0; max-width: 720px; color: #665938; font-size: 17px; }
.contact-shell .alt-mail { margin-top: 18px; font-size: 15px; }
.contact-shell .alt-mail a { color: var(--forest); font-weight: 700; }

.form {
  background: var(--white);
  border: 1px solid #e4d6b0;
  border-radius: 12px;
  padding: 26px;
  box-shadow: var(--shadow);
}
.form-row { margin-bottom: 16px; }
.form-row:last-of-type { margin-bottom: 0; }
.form label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.form input[type="text"],
.form input[type="email"],
.form select,
.form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 13px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(29, 95, 67, 0.12);
}
.form .consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); font-weight: 400; }
.form .consent input { margin-top: 3px; flex: 0 0 auto; }
.form .consent a { color: var(--forest); }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .button { width: 100%; margin-top: 4px; }

.alert { border-radius: 9px; padding: 14px 16px; margin-bottom: 18px; font-size: 14.5px; }
.alert-success { background: var(--soft-green); border: 1px solid #b6dcc4; color: #14492f; }
.alert-error { background: #fbe9e7; border: 1px solid #f0c4be; color: #8f342a; }

/* ====== Подвал ====== */
footer { background: var(--ink); color: rgba(255, 255, 255, 0.7); padding: 28px 0; font-size: 13px; }
.footer-shell { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-meta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-links { display: inline-flex; gap: 18px; }
footer a { color: var(--white); text-underline-offset: 4px; }

/* «нормальная кнопка» сделано силами 1977 */
.madeby {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}
.madeby:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-1px);
}
.madeby-label { font-size: 12px; letter-spacing: 0.01em; color: rgba(255, 255, 255, 0.62); }
.madeby:hover .madeby-label { color: rgba(255, 255, 255, 0.85); }
.madeby-logo { display: block; height: 18px; width: auto; }

/* ====== Страница документа ====== */
.doc-topbar { background: var(--forest-dark); color: var(--white); }
.doc-topbar-shell {
  max-width: 820px; margin: 0 auto; padding: 0 20px;
  min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.doc-topbar a { color: var(--white); text-decoration: none; font-weight: 700; font-size: 14px; }
.doc-topbar a:hover { text-decoration: underline; text-underline-offset: 4px; }
.doc-main { max-width: 820px; margin: 0 auto; padding: 42px 20px 64px; overflow-wrap: anywhere; }
.doc-main h1 { font-size: 40px; line-height: 1.1; margin: 8px 0 18px; max-width: none; }
.doc-main h2 { font-size: 26px; line-height: 1.2; margin: 38px 0 12px; }
.doc-main h3 { font-size: 19px; margin: 28px 0 10px; }
.doc-main p, .doc-main ul, .doc-main ol { margin: 0 0 14px; line-height: 1.65; }
.doc-main li { margin-bottom: 6px; }
.doc-main a { color: var(--forest); text-underline-offset: 3px; }
.doc-main code { background: var(--soft-green); border-radius: 4px; padding: 1px 6px; font-size: .9em; }
.doc-main pre { background: var(--soft-green); border-radius: 8px; padding: 14px 16px; overflow-x: auto; }
.doc-main pre code { background: none; padding: 0; }
.doc-main blockquote { margin: 0 0 14px; padding: 2px 18px; border-left: 3px solid var(--forest); color: var(--muted); background: var(--white); border-radius: 0 8px 8px 0; }
.doc-main table { width: 100%; border-collapse: collapse; margin: 0 0 18px; background: var(--white); border: 1px solid var(--line); font-size: 14.5px; display: block; overflow-x: auto; }
.doc-main th, .doc-main td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.doc-main th { background: var(--soft-green); font-weight: 700; }
.doc-main hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
.doc-foot { max-width: 820px; margin: 0 auto; padding: 22px 20px 48px; color: var(--muted); font-size: 13.5px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.doc-foot a { color: var(--forest); }
.doc-foot .madeby { border-color: var(--line); background: transparent; }
.doc-foot .madeby-label { color: var(--muted); }

@media (max-width: 900px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .hero { background-position: 58% center; }
  h1 { font-size: 72px; }
  .section-heading h2, .contact-shell h2 { font-size: 40px; }
  .signals, .product-grid, .roles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .signal:nth-child(2) { border-right: 0; }
  .signal:nth-child(3), .signal:nth-child(4) { border-top: 1px solid var(--line); }
  .section-heading { grid-template-columns: 1fr; gap: 18px; }
  .contact-shell { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1180px); }
  .nav-shell { min-height: 64px; }
  .brand-ru { display: none; }
  .nav-cta { font-size: 13px; }
  .hero { min-height: max(540px, calc(100svh - 76px)); background-position: 63% center; }
  .hero::before { background: rgba(7, 17, 13, 0.62); }
  .hero-content { padding: 108px 0 48px; }
  h1 { font-size: 54px; }
  .hero-lead { font-size: 18px; }
  .section-heading h2, .contact-shell h2 { font-size: 32px; }
  .hero-actions, .hero-actions .button { width: 100%; }
  .signals, .product-grid, .roles-grid, .docs-grid { grid-template-columns: 1fr; }
  .signal, .signal:first-child, .signal:last-child { padding: 17px 0; border-right: 0; border-top: 1px solid var(--line); }
  .signal:first-child { border-top: 0; }
  .section { padding: 62px 0; }
  .product-card, .role-card { min-height: 0; }
  .timeline-row { grid-template-columns: 1fr; gap: 7px; padding: 20px 0; }
  .status-pill { justify-self: start; }
  .footer-shell { align-items: flex-start; flex-direction: column; }
}

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