/* НС Медика — сайт-визитка */
/* Golos Text (Paratype, SIL OFL 1.1) — локальные файлы: латиница, кириллица, расширенная кириллица (казахские буквы) */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/golos-text-cyrillic-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/golos-text-cyrillic-400-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/golos-text-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/golos-text-cyrillic-ext-500-normal.woff2) format('woff2');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/golos-text-cyrillic-500-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/golos-text-latin-500-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/golos-text-cyrillic-ext-600-normal.woff2) format('woff2');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/golos-text-cyrillic-600-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/golos-text-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --brand: #C8102E;       /* основной красный: логотип, кнопки, акценты */
  --brand-dark: #9D001F;  /* тёмно-красный: кнопки при наведении */
  --brand-light: #F9E7E7; /* светло-красный: фон акцентных блоков */
  --text: #272727;        /* графитовый: заголовки и основной текст */
  --muted: #5c5c5c;
  --line: #e2e2e2;
  --bg: #FFFFFF;          /* основной фон */
  --bg-alt: #F0F0F0;      /* светло-серый: фон секций */
  --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

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

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Шапка */
.header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
}
.header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 72px; flex-wrap: wrap;
}
.logo img { height: 44px; width: auto; }
.nav { display: flex; gap: 28px; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--brand); }

/* Баннер — однотонная заливка фирменным красным */
.hero {
  position: relative; overflow: hidden;
  background: var(--brand);
  color: #fff;
  padding: 104px 0 96px;
}
.hero .wrap { position: relative; z-index: 1; }
/* Лист из логотипа — декоративный фон баннера */
.hero-leaf {
  position: absolute; right: -40px; top: 50%;
  transform: translateY(-50%);
  height: 130%; width: auto;
  fill: #fff; opacity: .13;
  pointer-events: none;
}
.badge {
  display: inline-block;
  font-size: 13px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.6);
  padding: 6px 12px; margin-bottom: 24px;
}
.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.15;
  font-weight: 600;
  max-width: 760px;
}
.hero p { margin: 0 0 36px; font-size: 19px; color: rgba(255,255,255,.88); max-width: 660px; }
.btn {
  display: inline-block;
  background: var(--brand); color: #fff;
  padding: 13px 28px; border-radius: 4px;
  text-decoration: none; font-weight: 500;
}
.btn:hover { background: var(--brand-dark); color: #fff; }
.hero .btn { background: #fff; color: var(--brand); }
.hero .btn:hover { background: var(--brand-light); color: var(--brand-dark); }

/* Секции */
.section { padding: 80px 0; }
.section.alt { background: var(--bg-alt); }
.section h2 {
  margin: 0 0 32px;
  font-size: 30px; font-weight: 600; line-height: 1.2;
}
.section h2::after {
  content: ""; display: block;
  width: 66px; height: 18px; margin-top: 6px;
  /* черта + маленький лист из логотипа */
  background: linear-gradient(var(--brand), var(--brand)) left center / 48px 3px no-repeat,
              url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%22455%2058%2068%20104%22%3E%3Cg%20fill%3D%22%23C8102E%22%20fill-rule%3D%22evenodd%22%3E%3Cpath%20d%3D%22m%20459%2C119%20c%20-6%2C-30%2020%2C-52%2060%2C-57%20-3%2C33%20-25%2C55%20-56%2C58%20z%20m%2011%2C-10%20c%207%2C-21%2020%2C-31%2036%2C-36%20-5%2C19%20-17%2C31%20-36%2C36%20z%22/%3E%3Cpath%20d%3D%22m%20464%2C124%20c%2024%2C-1%2048%2C11%2051%2C34%20-25%2C0%20-41%2C-11%20-51%2C-34%20z%20m%2011%2C8%20c%2014%2C2%2027%2C11%2031%2C19%20-15%2C-4%20-25%2C-10%20-31%2C-19%20z%22/%3E%3C/g%3E%3C/svg%3E") right center / auto 18px no-repeat;
}
.lead { max-width: 760px; }
.lead p { margin: 0 0 16px; }

/* Продукты */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  padding: 24px;
  transition: box-shadow .2s;
}
.card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.06); }
.card img { margin: -24px -24px 20px; width: calc(100% + 48px); max-width: none; aspect-ratio: 4 / 3; object-fit: cover; }
.card h3 { margin: 0 0 8px; font-size: 19px; font-weight: 600; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }

/* Чем мы занимаемся */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.step .num { color: var(--brand); font-weight: 600; font-size: 15px; letter-spacing: .05em; }
.step h3 { margin: 6px 0 8px; font-size: 19px; font-weight: 600; }
.step p { margin: 0; color: var(--muted); font-size: 16px; }

/* Контакты */
.contacts-intro { max-width: 760px; margin-bottom: 40px; }
.contacts-intro p { margin: 0 0 16px; }
.callout {
  background: var(--brand-light);
  border-left: 4px solid var(--brand);
  padding: 16px 20px;
}
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contacts dl { margin: 0; }
.contacts dt { font-size: 14px; color: var(--muted); margin-top: 16px; }
.contacts dt:first-child { margin-top: 0; }
.contacts dd { margin: 2px 0 0; font-size: 18px; }
.contacts dd a { color: var(--text); text-decoration: none; }
.contacts dd a:hover { color: var(--brand); }
.requisites { font-size: 15px; color: var(--muted); }
.requisites h3 { font-size: 16px; color: var(--text); margin: 0 0 8px; font-weight: 600; }
.requisites p { margin: 0 0 4px; }

/* Подвал */
.footer {
  background: var(--text);
  padding: 28px 0; font-size: 14px; color: rgba(255,255,255,.7);
}
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Иконки */
.icon { display: block; width: 44px; height: 44px; color: var(--brand); flex: none; }
.card .icon { width: 52px; height: 52px; margin-bottom: 14px; }

/* Полоса фактов под баннером */
.facts { background: var(--bg); border-bottom: 1px solid var(--line); }
.facts .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding-top: 28px; padding-bottom: 28px; }
.fact { display: flex; gap: 14px; align-items: center; }
.fact .icon { width: 40px; height: 40px; }
.fact span { font-size: 16px; font-weight: 500; line-height: 1.35; }

/* Маршрут «Чем мы занимаемся» */
.steps { position: relative; grid-template-columns: repeat(4, 1fr); }
.steps::before {
  content: ""; position: absolute; top: 21px; left: 22px; right: 0;
  height: 2px; background: rgba(200,16,46,.22);
}
.step { position: relative; }
.step .num {
  position: relative; z-index: 1;
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--brand); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0; margin-bottom: 14px;
}
.step h3 { margin-top: 0; }

/* Кнопка WhatsApp */
.wa {
  position: fixed; right: 20px; bottom: 20px; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  background: #25D366; color: #fff;
  padding: 12px 20px 12px 14px; border-radius: 999px;
  font-weight: 500; font-size: 15px; text-decoration: none;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.wa:hover { background: #1DA851; color: #fff; }
.wa .icon { width: 26px; height: 26px; color: #fff; }

/* Плавное появление при прокрутке */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.from-top { transform: translateY(-18px); }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 900px) {
  .facts .wrap { grid-template-columns: 1fr; gap: 16px; padding-top: 24px; padding-bottom: 24px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps::before { top: 22px; bottom: 22px; left: 21px; right: auto; width: 2px; height: auto; }
  .step { padding-left: 64px; min-height: 44px; }
  .step .num { position: absolute; left: 0; top: 0; margin: 0; }
}
@media (max-width: 720px) {
  .wa { padding: 14px; }
  .wa span { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  html { scroll-padding-top: 0; }
  .header { position: static; }
  .header .wrap { padding-top: 12px; padding-bottom: 12px; }
  .logo img { height: 36px; }
  .nav { gap: 18px; }
  .hero { padding: 56px 0 52px; }
  .hero-leaf { height: 70%; right: -60px; top: auto; bottom: -20px; transform: none; }
  .section { padding: 56px 0; }
  .contacts { grid-template-columns: 1fr; gap: 32px; }
}

/* Выравнивание по строкам: заголовки и тексты соседних колонок начинаются на одной линии */
.step h3, .card h3 { text-wrap: balance; }
.step p, .card p { text-wrap: pretty; }
@supports (grid-template-rows: subgrid) {
  .cards { grid-auto-rows: auto; }
  .card { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
  .card:not(:has(.icon)):not(:has(img)) { grid-row: span 2; }
  @media (min-width: 901px) {
    .steps { row-gap: 0; }
    .step { display: grid; grid-row: span 3; grid-template-rows: subgrid; }
  }
}

/* Лист как сквозной мотив: крупный бледный лист в углу блока контактов */
#contacts { position: relative; overflow: hidden; }
#contacts .wrap { position: relative; z-index: 1; }
#contacts::after {
  content: ""; position: absolute; right: -50px; bottom: -40px;
  width: 300px; height: 460px;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%22455%2058%2068%20104%22%3E%3Cg%20fill%3D%22%23C8102E%22%20fill-rule%3D%22evenodd%22%3E%3Cpath%20d%3D%22m%20459%2C119%20c%20-6%2C-30%2020%2C-52%2060%2C-57%20-3%2C33%20-25%2C55%20-56%2C58%20z%20m%2011%2C-10%20c%207%2C-21%2020%2C-31%2036%2C-36%20-5%2C19%20-17%2C31%20-36%2C36%20z%22/%3E%3Cpath%20d%3D%22m%20464%2C124%20c%2024%2C-1%2048%2C11%2051%2C34%20-25%2C0%20-41%2C-11%20-51%2C-34%20z%20m%2011%2C8%20c%2014%2C2%2027%2C11%2031%2C19%20-15%2C-4%20-25%2C-10%20-31%2C-19%20z%22/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  opacity: .06; pointer-events: none;
}
@media (max-width: 720px) { #contacts::after { width: 180px; height: 276px; right: -40px; bottom: -30px; } }

/* Карточки и шаги появляются по очереди */
@media (prefers-reduced-motion: reduce) { .reveal { transition-delay: 0s !important; } }

/* Текстовые блоки во всю ширину колонки, по той же сетке, что карточки и контакты */
@media (min-width: 901px) {
  #about .lead { max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
  #about .lead p { margin: 0; }
  .contacts-intro { max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
  .contacts-intro p { margin: 0; }
}
