/* ==========================================================================
   АНО «ЦОСУР» — сайт-визитка
   Дизайн-система: палитра и типографика из руководства фирменного стиля v1.0
   NAVY #294194 · GREEN #7CBA46 · ORANGE #ED6C1E · Roboto
   Принципы: мобильный-first, контраст WCAG 2.2 AA, без внешних запросов
   ========================================================================== */

/* ── Шрифты (самохостинг, субсет латиница+кириллица) ─────────────────── */
@font-face {
  font-family: "Roboto";
  src: url("fonts/Roboto-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("fonts/Roboto-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("fonts/Roboto-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ── Токены ───────────────────────────────────────────────────────────── */
:root {
  /* фирменные цвета подложек с белым текстом: в тёмной теме не меняются */
  --brand-navy: #294194;
  --brand-navy-700: #1F3375;
  --brand-navy-900: #16224F;
  --brand-green-700: #5F9633;

  --navy: #294194;
  --navy-700: #1F3375;
  --navy-900: #16224F;
  --green: #7CBA46;
  --green-700: #5F9633;
  --orange: #ED6C1E;
  --ink: #1A1F2B;
  --muted: #5A6273;
  --line: #D9DDE5;
  --bg: #FFFFFF;
  --bg-soft: #F5F7FB;
  --card: #FFFFFF;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(26, 31, 43, .06), 0 4px 14px rgba(26, 31, 43, .05);
  --shadow-md: 0 8px 30px rgba(26, 31, 43, .10);
  --wrap: 1120px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --space: clamp(3.5rem, 8vw, 7rem);

  --font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #E9EDF6;
    --muted: #A7B0C2;
    --line: #2B3550;
    --bg: #0E1424;
    --bg-soft: #131A2C;
    --card: #161E31;
    --navy: #7E97E0;
    --navy-700: #A9BBEE;
    --navy-900: #C9D4F5;
    --green: #93CF5E;
    --green-700: #A9DC7B;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 10px 34px rgba(0, 0, 0, .5);
  }
}

/* ── База ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1rem, .96rem + .25vw, 1.0625rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(1.9rem, 1.2rem + 3.2vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); }
h3 { font-size: clamp(1.12rem, 1rem + .5vw, 1.35rem); }
p { margin: 0 0 1em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }
a { color: var(--navy); text-underline-offset: .18em; text-decoration-thickness: .06em; }
a:hover { color: var(--navy-700); }
img, svg { max-width: 100%; height: auto; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 700; }

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

/* Скрыто визуально, доступно скринридерам */
.visually-hidden {
  position: absolute !important; 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: 1rem; top: -4rem; z-index: 100;
  background: var(--brand-navy); color: #fff; padding: .75rem 1.1rem;
  border-radius: var(--radius-sm); font-weight: 700; text-decoration: none;
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 1rem; color: #fff; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

/* ── Шапка ────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: 4.5rem; padding-block: .55rem;
}
.brand { display: flex; align-items: center; text-decoration: none; color: inherit; margin-right: auto; }
.brand img { width: clamp(106px, 12vw, 150px); }

.nav { display: none; }
.nav ul { display: flex; align-items: center; gap: .25rem; }
.nav a {
  display: inline-block; padding: .55rem .62rem; border-radius: 8px; white-space: nowrap;
  color: var(--ink); text-decoration: none; font-size: .93rem; font-weight: 500;
}
.nav a:hover { background: var(--bg-soft); color: var(--navy); }
.nav a[aria-current="true"] { color: var(--navy); box-shadow: inset 0 -2px 0 var(--green); }

.site-header .header-cta { display: none; }

.burger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0 10px;
  background: transparent; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s var(--ease), opacity .2s var(--ease); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 4.5rem 0 auto; z-index: 45;
  background: var(--bg); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  padding: 1rem var(--gutter) 1.6rem;
  display: grid; gap: .15rem;
  max-height: calc(100dvh - 4.5rem); overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a {
  display: flex; align-items: center; min-height: 48px;
  padding: .6rem .25rem; text-decoration: none; color: var(--ink);
  font-size: 1.05rem; font-weight: 500; border-bottom: 1px solid var(--line);
}
.mobile-menu a:last-of-type { border-bottom: 0; }
.mobile-menu .btn { margin-top: .9rem; justify-content: center; color: #fff; }
.mobile-menu .btn:hover { color: #fff; }

/* затемнение страницы при открытом меню */
body.menu-open::after {
  content: ""; position: fixed; inset: 0; z-index: 40;
  background: rgba(10, 16, 32, .45);
}

@media (min-width: 900px) {
  .nav { display: block; }
  .site-header .header-cta { display: inline-flex; }
}
@media (min-width: 1060px) {
  .site-header .header-cta { display: inline-flex; }
  .burger, .mobile-menu { display: none !important; }
}

/* ── Кнопки ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  min-height: 48px; padding: .8rem 1.3rem;
  border-radius: 999px; border: 1.5px solid transparent;
  font: inherit; font-weight: 700; font-size: .98rem; text-decoration: none;
  cursor: pointer; transition: transform .18s var(--ease), background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--brand-navy); color: #fff; }
.btn--primary:hover { background: var(--brand-navy-700); color: #fff; }
.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn--on-dark { background: #fff; color: var(--brand-navy-900); }
.btn--on-dark:hover { background: var(--green); color: var(--brand-navy-900); }
.btn--outline-light { border-color: rgba(255,255,255,.45); color: #fff; }
.btn--outline-light:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ── Герой ────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background: var(--brand-navy-900);
  color: #fff;
  padding-block: clamp(2.2rem, 5vw, 4rem) clamp(3rem, 6vw, 4.6rem);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(90ch 50ch at 12% -10%, rgba(124,186,70,.20), transparent 60%),
    radial-gradient(70ch 40ch at 88% 10%, rgba(41,65,148,.75), transparent 62%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-logo { width: clamp(176px, 24vw, 236px); margin-bottom: clamp(1.2rem, 3vw, 2rem); }
.hero h1 { color: #fff; max-width: 20ch; }
.hero h1 em { font-style: normal; color: var(--green); }
.hero-lead {
  font-size: clamp(1.05rem, .95rem + .6vw, 1.3rem);
  color: rgba(255,255,255,.88); max-width: 52ch; margin-bottom: 1.9rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-facts {
  display: grid; gap: 1px; background: rgba(255,255,255,.18);
  border-radius: var(--radius); overflow: hidden;
  margin-top: clamp(1.8rem, 5vw, 3rem);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .hero-facts { grid-template-columns: repeat(3, 1fr); } }
.hero-facts div { background: rgba(255,255,255,.06); padding: 1rem 1.15rem; backdrop-filter: blur(2px); }
.hero-facts dt { font-size: .82rem; color: rgba(255,255,255,.72); margin-bottom: .25rem; }
.hero-facts dd { margin: 0; font-weight: 700; font-size: clamp(1rem, .9rem + .5vw, 1.2rem); }
.hero-facts .accent { color: var(--green); }

.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: auto; z-index: 0; }

/* ── Секции ───────────────────────────────────────────────────────────── */
section { padding-block: var(--space); }
.section--soft { background: var(--bg-soft); }
.section-head { max-width: 46rem; margin-bottom: clamp(1.8rem, 4vw, 2.8rem); }
.eyebrow {
  display: flex; align-items: center; gap: .6rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--navy); margin-bottom: .8rem;
}
.eyebrow::before { content: ""; width: 26px; height: 3px; border-radius: 2px; background: var(--green); }
.section-head p { color: var(--muted); font-size: 1.06rem; max-width: 58ch; }

/* ── Карточки ─────────────────────────────────────────────────────────── */
.grid { display: grid; gap: clamp(1rem, 2.4vw, 1.5rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.3rem, 2.6vw, 1.9rem);
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--navy) 30%, var(--line)); }
.card h3 { margin-bottom: .55rem; }
.card p { color: var(--muted); font-size: .98rem; }
.card-tag {
  display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--navy); margin-bottom: .7rem;
}

/* Направления */
.direction { display: flex; flex-direction: column; gap: .75rem; }
.direction .card-top { display: flex; align-items: center; gap: .8rem; margin-bottom: .4rem; }
.direction .num {
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem; flex: none;
  border-radius: 12px; background: var(--brand-navy); color: #fff; font-weight: 700; font-size: .95rem;
}
.direction--green .num { background: var(--brand-green-700); }
.list-check { display: grid; gap: .55rem; margin-top: .9rem; }
.list-check li { position: relative; padding-left: 1.7rem; font-size: .97rem; color: var(--ink); }
.list-check li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: .85rem; height: .5rem;
  border-left: 2px solid var(--green-700); border-bottom: 2px solid var(--green-700);
  transform: rotate(-45deg);
}

/* ESG */
.esg-card { position: relative; padding-top: 1.5rem; }
.esg-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 4px; border-radius: var(--radius) var(--radius) 0 0;
  background: var(--navy);
}
.esg-card--e::before { background: var(--green-700); }
.esg-card--s::before { background: var(--navy); }
.esg-card--g::before { background: var(--orange); }
.esg-letter { font-size: 2.1rem; font-weight: 700; line-height: 1; color: var(--navy); margin-bottom: .2rem; }
.esg-card--e .esg-letter { color: var(--green-700); }
.esg-card--g .esg-letter { color: var(--orange); }
.esg-sub { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 1rem; }
.esg-card ul { display: grid; gap: .5rem; }
.esg-card li { position: relative; padding-left: 1.1rem; font-size: .96rem; color: var(--ink); }
.esg-card li::before { content: ""; position: absolute; left: 0; top: .62em; width: .4rem; height: .4rem; border-radius: 50%; background: var(--line); }

.frameworks { margin-top: clamp(1.6rem, 4vw, 2.4rem); display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.frameworks span { font-size: .85rem; color: var(--muted); }
.chip {
  display: inline-block; padding: .4rem .75rem; border: 1px solid var(--line); border-radius: 999px;
  font-size: .82rem; font-weight: 500; color: var(--ink); background: var(--card);
}

/* Этапы */
.steps { counter-reset: step; display: grid; gap: clamp(1rem, 2vw, 1.4rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.step { position: relative; padding-top: 2.9rem; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  position: absolute; top: 0; left: 0;
  font-size: 1.6rem; font-weight: 700; color: var(--navy);
}
.step::after {
  content: ""; position: absolute; top: 2.05rem; left: 0; right: 0; height: 1px; background: var(--line);
}
.step h3 { font-size: 1.08rem; margin-bottom: .35rem; }
.step p { color: var(--muted); font-size: .95rem; }

/* Документы */
.doc-list { display: grid; gap: .75rem; }
.doc {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--card); text-decoration: none; color: inherit;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.doc:hover { border-color: var(--navy); background: var(--bg-soft); }
.doc-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 10px; background: var(--bg-soft); color: var(--navy); }
.doc-icon svg { width: 20px; height: 20px; }
.doc-title { display: block; font-weight: 700; font-size: .98rem; }
.doc-meta { display: block; font-size: .84rem; color: var(--muted); margin-top: .15rem; }

/* Реквизиты */
.facts { display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; gap: .2rem; padding: .95rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) {
  .facts div { grid-template-columns: 14rem 1fr; gap: 1.5rem; align-items: baseline; }
}
.facts dt { font-size: .85rem; color: var(--muted); }
.facts dd { margin: 0; font-size: .98rem; }

/* Контакты */
.contact-grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.contact-item { display: flex; gap: .9rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.contact-item:first-of-type { border-top: 1px solid var(--line); }
.contact-item svg { width: 20px; height: 20px; flex: none; margin-top: .3rem; color: var(--navy); }
.contact-item dt { font-size: .82rem; color: var(--muted); }
.contact-item dd { margin: 0; font-weight: 500; }
.contact-item a { text-decoration: none; }
.contact-item a:hover { text-decoration: underline; }

/* Подвал */
.site-footer { background: var(--brand-navy-900); color: rgba(255,255,255,.82); padding-block: clamp(2.5rem, 6vw, 4rem) 1.6rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-top { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); margin-bottom: 2.2rem; }
.footer-logo { width: 168px; margin-bottom: 1rem; }
.footer-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.6); margin-bottom: .8rem; }
.footer-links { display: grid; gap: .45rem; font-size: .95rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.16); padding-top: 1.2rem;
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between;
  font-size: .84rem; color: rgba(255,255,255,.62);
}

/* Печать */
@media print {
  .site-header, .mobile-menu, .hero-actions, .btn, .hero-wave { display: none !important; }
  body { font-size: 11pt; color: #000; background: #fff; }
  .hero { background: #fff; color: #000; padding-block: 1rem; }
  .hero h1, .hero-lead { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; }
  section { padding-block: 1rem; break-inside: avoid; }
}
