/* ============================================================
   НУТРИЛАК КОСТРОМА — стили
   Светлая «медицинская» тема: чистота, доверие, надёжность.
   База — спокойный медицинский синий, тёплый персиковый акцент.
   ============================================================ */

:root {
  /* Цветовые токены */
  --bg: #f7fafd;             /* очень светлый голубоватый фон */
  --bg-2: #eef4fb;           /* фон акцентных секций */
  --surface: #ffffff;
  --border: #dce7f3;
  --text: #17304f;           /* тёмно-синий вместо чёрного */
  --text-muted: #52677f;
  --primary: #2aa4de;        /* фирменный голубой (как «НУТРИТЕК» в логотипе) */
  --primary-dark: #1c7fb0;
  --primary-soft: #e6f4fc;
  --logo-black: #16181d;     /* чёрный из логотипа («КОСТРОМА») */
  --accent: #e8875a;         /* тёплый персиковый акцент */
  --accent-soft: #fdeee4;

  --shadow-soft: 0 6px 24px rgba(23, 58, 110, 0.08);
  --shadow-hover: 0 12px 32px rgba(23, 58, 110, 0.13);

  /* Типографика */
  --font-body: "Manrope", system-ui, sans-serif;

  /* Отступы (шкала 8px) */
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;

  --radius: 22px;
  --header-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(1160px, 100% - 48px);
  margin-inline: auto;
}

a { color: inherit; text-decoration: none; }
a, button { cursor: pointer; }

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

::selection { background: rgba(42, 164, 222, 0.18); }

/* Выделение важного в текстах */
strong {
  font-weight: 800;
  color: var(--text);
}
strong.hl {
  color: var(--primary);
  white-space: nowrap;
}

/* ---------- Карточки ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.25s ease,
              background-color 0.25s ease, border-color 0.25s ease,
              color 0.25s ease;
}
.btn--primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(42, 164, 222, 0.28);
}
.btn--primary:hover {
  transform: translateY(-2px);
  background: var(--primary-dark);
  box-shadow: 0 12px 28px rgba(42, 164, 222, 0.34);
}
.btn--ghost {
  border-color: var(--border);
  color: var(--primary);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.btn--ghost:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.btn--small {
  min-height: 42px;
  padding: 9px 22px;
  font-size: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  border-color: transparent;
}
.btn--small:hover { background: var(--primary); color: #fff; }
.btn:active { transform: scale(0.97); }

/* ---------- Шапка ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.header__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}
.header__logo:hover { opacity: 0.8; }
.logo-map {
  flex: none;
  width: 62px;
  height: auto;
  display: block;
}
.logo-map__land { fill: var(--primary); }
.logo-map__dot-ring { fill: #ffffff; stroke: #b9c3cd; stroke-width: 8; }
.logo-map__dot { fill: #f04438; }
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.logo-text__top { color: var(--primary); }
.logo-text__bottom { color: var(--logo-black); }
.header__links {
  display: flex;
  gap: var(--space-4);
  list-style: none;
}
.header__links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 2px;
  transition: color 0.2s ease;
}
.header__links a:hover { color: var(--primary); }

/* ---------- Боковые точки-индикаторы ---------- */
.dots {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dots a {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(82, 103, 127, 0.28);
  transition: background-color 0.25s ease, transform 0.25s ease;
}
.dots a:hover,
.dots a.is-active {
  background: var(--primary);
  transform: scale(1.35);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}
.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.hero__blob--blue {
  width: 560px; height: 560px;
  right: -180px; top: -160px;
  background: rgba(42, 164, 222, 0.10);
}
.hero__blob--peach {
  width: 420px; height: 420px;
  left: -160px; bottom: -140px;
  background: rgba(232, 135, 90, 0.10);
}
.hero__content {
  position: relative;
  z-index: 2;
  padding: calc(var(--header-h) + var(--space-6)) 0 var(--space-7);
}
.hero__eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 8px 18px;
  margin-bottom: var(--space-4);
}
.hero__title {
  font-size: clamp(42px, 7.5vw, 84px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
}
.hero__title-accent { color: var(--primary); }
.hero__title-dark { color: var(--logo-black); }
.hero__subtitle {
  max-width: 640px;
  margin-top: var(--space-4);
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-muted);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  list-style: none;
  margin-top: var(--space-6);
}
.hero__trust li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-muted);
  transition: transform 0.25s ease, color 0.25s ease;
}
.hero__trust li:hover {
  transform: translateY(-2px);
  color: var(--text);
}
.hero__trust svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--accent);
}

/* ---------- Общее для секций ---------- */
.section { padding: var(--space-8) 0; position: relative; }
.section__eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-3);
}
.section__title {
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-4);
}
.section__lead {
  max-width: 680px;
  color: var(--text-muted);
  font-size: 17px;
  margin-bottom: var(--space-6);
}

/* ---------- О компании ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-top: var(--space-4);
}
.about__text { color: var(--text-muted); font-size: 17px; }

/* ---------- Складская сеть ---------- */
.section--network {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.network__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  align-items: start;
  margin-bottom: var(--space-4);
}
.network__map {
  padding: var(--space-4);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.network__map:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.network__map svg { width: 100%; height: auto; display: block; }

.map-land {
  fill: #e8f5fc;
  stroke: rgba(42, 164, 222, 0.45);
  stroke-width: 1.4;
  stroke-linejoin: round;
}

/* Маркеры складов: спокойная точка с кольцом, без пульсации */
.map-marker__ring {
  fill: rgba(42, 164, 222, 0.14);
  stroke: rgba(42, 164, 222, 0.35);
  stroke-width: 1.5;
}
.map-marker__core { fill: var(--primary); }
.map-marker__label {
  fill: var(--text);
  font-family: var(--font-body);
  font-size: 27px;
  font-weight: 700;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 8px;
  stroke-linejoin: round;
}

/* Маршруты: тонкий пунктир, медленное спокойное движение */
.map-route {
  fill: none;
  stroke: rgba(42, 164, 222, 0.4);
  stroke-width: 2.4;
  stroke-dasharray: 8 14;
  animation: routeFlow 6s linear infinite;
}
@keyframes routeFlow {
  to { stroke-dashoffset: -88; }
}

.network__cities {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  align-content: start;
}
.city-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.city-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.city-card__dot {
  flex: none;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--primary);
}
.city-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.city-card__name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.city-card__badge {
  font-style: normal;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 3px 10px;
}
.city-card__addr {
  font-weight: 500;
  font-size: 13px;
  color: var(--text-muted);
}
.city-card--central {
  grid-column: 1 / -1;
  border-color: rgba(232, 135, 90, 0.45);
}

.network__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
.stat-card {
  padding: 18px 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.stat-card__value {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat-card__label {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ---------- Лента брендов ---------- */
.section--brands { padding-bottom: var(--space-7); }
.marquee {
  margin-top: var(--space-5);
  overflow: hidden;
  position: relative;
  padding: var(--space-3) 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
/* Движением трека управляет JS (плавное торможение при наведении) */
.marquee__track {
  display: flex;
  gap: var(--space-3);
  width: max-content;
  will-change: transform;
}
.brand-chip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 26px 14px 20px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.brand-chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.brand-chip__img {
  flex: none;
  display: block;
  height: 36px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
}
.brand-chip__name { font-weight: 700; font-size: 16px; }

/* Сворачиваемый полный список брендов */
.brands-list {
  margin-top: var(--space-5);
  overflow: hidden;
}
.brands-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 20px 26px;
  font-weight: 800;
  font-size: 16px;
  list-style: none;
  cursor: pointer;
  transition: color 0.2s ease;
}
.brands-list summary::-webkit-details-marker { display: none; }
.brands-list summary:hover { color: var(--primary); }
.brands-list__chevron {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--primary);
  transition: transform 0.25s ease;
}
.brands-list[open] .brands-list__chevron { transform: rotate(180deg); }
.brands-list__items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-3);
  list-style: none;
  padding: 0 26px 24px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.brands-list__items li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.brands-list__name {
  font-weight: 800;
  font-size: 15.5px;
}
.brands-list__detail {
  font-weight: 500;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* ---------- Почему мы ---------- */
.why__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.why-card {
  padding: var(--space-4);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.why-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.why-card__icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 15px;
  color: var(--primary);
  background: var(--primary-soft);
  margin-bottom: var(--space-3);
}
.why-card__icon svg { width: 26px; height: 26px; }
.why-card h3 {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 10px;
}
.why-card p { font-size: 14.5px; color: var(--text-muted); }

/* ---------- Контакты ---------- */
.section--contacts { padding-bottom: var(--space-8); }
.contacts-card {
  padding: clamp(32px, 6vw, 72px);
  text-align: center;
}
.contacts-card .section__title { margin-inline: auto; }
.contacts-card__lead {
  max-width: 560px;
  margin: 0 auto var(--space-5);
  color: var(--text-muted);
  font-size: 17px;
}
.contacts-card__people {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.person-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 26px 18px 18px;
  border-radius: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  text-align: left;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.person-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
}
.person-card__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
}
.person-card__icon svg { width: 21px; height: 21px; }
.person-card__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.person-card__name { font-weight: 800; font-size: 15.5px; }
.person-card__role {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
}
.person-card__phone {
  font-weight: 800;
  font-size: 16px;
  color: var(--primary);
  margin-top: 4px;
}

.contacts-card__rows {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 12px 28px 12px 14px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: clamp(16px, 2.4vw, 19px);
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.contact-row:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
}
.contact-row__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
}
.contact-row__icon svg { width: 20px; height: 20px; }

/* ---------- Реквизиты компании ---------- */
.requisites {
  margin-top: var(--space-3);
  overflow: hidden;
  text-align: left;
}
.requisites summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 20px 26px;
  font-weight: 800;
  font-size: 16px;
  list-style: none;
  cursor: pointer;
  transition: color 0.2s ease;
}
.requisites summary::-webkit-details-marker { display: none; }
.requisites summary:hover { color: var(--primary); }
.requisites__chevron {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--primary);
  transition: transform 0.25s ease;
}
.requisites[open] .requisites__chevron { transform: rotate(180deg); }
.requisites__list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 28px;
  padding: 20px 26px 24px;
  border-top: 1px solid var(--border);
  margin: 0;
}
.requisites__list dt {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
}
.requisites__list dd {
  margin: 0;
  font-weight: 700;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

/* ---------- Всплывающее окно преимуществ ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: var(--space-4);
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 48, 79, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.modal__card {
  position: relative;
  max-width: 540px;
  width: 100%;
  padding: var(--space-5) var(--space-5) var(--space-4);
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal.is-open .modal__backdrop { opacity: 1; }
.modal.is-open .modal__card { opacity: 1; transform: none; }
.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.modal__close:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: scale(1.06);
}
.modal__close svg { width: 20px; height: 20px; }
.modal__title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
  padding-right: 48px;
}
.modal__text {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: var(--space-2);
}

/* ---------- Футер ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-5) 0;
  background: var(--surface);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: 14px;
  color: var(--text-muted);
}
.footer__name {
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
}
.footer__legal { margin-top: 4px; font-size: 13px; }

/* ---------- Анимация появления при скролле ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Уважение к reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .map-route { animation: none !important; }
  .modal__backdrop,
  .modal__card { transition: none; opacity: 1; transform: none; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
  .network__layout { grid-template-columns: 1fr; }
  .network__cities { grid-template-columns: 1fr 1fr; }
  .network__stats { grid-template-columns: repeat(2, 1fr); }
  .why__grid { grid-template-columns: repeat(2, 1fr); }
  .dots { display: none; }
}

@media (max-width: 720px) {
  .header__links { display: none; }
  .about__grid { grid-template-columns: 1fr; gap: var(--space-3); }
  .section { padding: var(--space-7) 0; }
  .network__stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 14px 8px; }
  .why__grid { grid-template-columns: 1fr; }
  .network__cities { grid-template-columns: 1fr; }
  .network__map { padding: var(--space-3); }
  .map-marker__label { font-size: 42px; }
  .contacts-card__people { flex-direction: column; align-items: stretch; }
  .contacts-card__rows { flex-direction: column; align-items: center; }
  .requisites__list { grid-template-columns: 1fr; gap: 2px; }
  .requisites__list dd { margin-bottom: 12px; }
  .modal__card { padding: var(--space-4); }
}
