/* ==========================================================================
   Казаньоргсинтез — дизайн-система
   Токены сняты с оригинала: sibur.ru/kazanorgsintez
   ========================================================================== */

:root {
  /* Фирменная палитра */
  --dna:          #02818a;
  --dna-dark:     #016b73;
  --mint:         #1ddeb0;
  --mint-light:   #94f9da;
  --turquoise:    #009da8;
  --teal-dark:    #012b34;
  --menu-bg:      #073543;

  --black:        #000402;
  --gray-1:       #4a515a;
  --gray-2:       #686868;
  --gray-3:       #c0c1c4;
  --gray-4:       #e6e9ea;

  --bg:           #f1f2f4;
  --bg-alt:       #ebf3f3;
  --white:        #ffffff;

  --yellow:       #ffc94f;
  --red:          #fd5a42;

  --gradient:     linear-gradient(111.4deg, #02818a 12.32%, #1ddeb0 97.08%);

  /* Типографика */
  --font: "Roboto", "Helvetica Neue", Arial, sans-serif;

  /* Раскладка */
  --wrap:         1440px;
  --gutter:       40px;
  --header-h:     92px;
  --radius:       16px;
  --radius-lg:    32px;

  --ease:         cubic-bezier(.25, .1, .25, 1);
}

/* --------------------------------------------------------------- Сброс -- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--black);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 { margin: 0; font-weight: 400; letter-spacing: -.02em; }
p { margin: 0 0 20px; }
p:last-child { margin-bottom: 0; }

h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.02; }
h2 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.05; }
h3 { font-size: clamp(20px, 2vw, 26px); line-height: 1.2; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* -------------------------------------------------------------- Сетка --- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: clamp(48px, 7vw, 92px) 0; }
.section--tight { padding: clamp(32px, 4vw, 52px) 0; }
.section--alt { background: var(--bg-alt); }

.section__head { margin-bottom: clamp(28px, 4vw, 48px); max-width: 900px; }
.section__head p { color: var(--gray-1); font-size: clamp(16px, 1.4vw, 20px); }

/* ------------------------------------------------------------- Кнопки --- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 32px;
  border-radius: 100px;
  font-size: 14px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  transition: .25s var(--ease);
  white-space: nowrap;
}
.btn--primary { background: var(--dna); color: var(--white); }
.btn--primary:hover { background: var(--teal-dark); }

.btn--ghost { border: 1px solid rgba(255,255,255,.5); color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--teal-dark); border-color: var(--white); }

.btn--dark { border: 1px solid var(--gray-3); color: var(--black); }
.btn--dark:hover { background: var(--black); color: var(--white); border-color: var(--black); }

.btn--mint { background: var(--mint); color: var(--teal-dark); }
.btn--mint:hover { background: var(--mint-light); }

.btn__arrow { transition: transform .25s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* Текстовая ссылка со стрелкой */
.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--dna);
  transition: gap .25s var(--ease);
}
.link-arrow:hover { gap: 16px; }

/* ------------------------------------------------------------- Шапка ---- */

.header {
  position: sticky; top: 0; z-index: 60;
  background: var(--white);
  box-shadow: 0 1px 0 var(--gray-4);
}
.header__inner {
  display: flex; align-items: center; gap: 32px;
  height: var(--header-h);
}
.header__logo { flex-shrink: 0; display: block; }
.header__logo img { height: 64px; width: auto; }

.header__nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 28px; }
.nav-list a {
  position: relative;
  display: block; padding: 6px 0;
  font-size: 15px; color: var(--gray-1);
  transition: color .2s var(--ease);
}
.nav-list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--dna);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav-list a:hover { color: var(--black); }
.nav-list a:hover::after,
.nav-list a.is-active::after { transform: scaleX(1); }
.nav-list a.is-active { color: var(--black); }

.header__aside { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.header__lang {
  font-size: 14px; font-weight: 500; letter-spacing: .06em;
  color: var(--gray-1);
}
.header__site {
  font-size: 14px; color: var(--dna); border-bottom: 1px solid rgba(2,129,138,.35);
  padding-bottom: 1px;
}
.header__site:hover { border-color: var(--dna); }

/* Бургер */
.burger {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  flex-shrink: 0; margin-left: auto;
}
.burger span {
  display: block; position: relative;
  width: 24px; height: 2px; background: var(--black);
  transition: .25s var(--ease);
}
.burger span::before, .burger span::after {
  content: ""; position: absolute; left: 0;
  width: 24px; height: 2px; background: var(--black);
  transition: .25s var(--ease);
}
.burger span::before { top: -7px; }
.burger span::after  { top: 7px; }
.burger.is-open span { background: transparent; }
.burger.is-open span::before { top: 0; transform: rotate(45deg); }
.burger.is-open span::after  { top: 0; transform: rotate(-45deg); }

/* Мобильное меню */
.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0; z-index: 55;
  background: var(--menu-bg); color: var(--white);
  padding: 32px var(--gutter) 48px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .35s var(--ease);
  visibility: hidden;
}
.mobile-menu.is-open { transform: translateX(0); visibility: visible; }
.mobile-menu a { display: block; padding: 16px 0; font-size: 22px; border-bottom: 1px solid rgba(255,255,255,.12); }
.mobile-menu a.is-active { color: var(--mint); }
.mobile-menu__foot { margin-top: 32px; font-size: 15px; color: rgba(255,255,255,.7); }
.mobile-menu__foot a { display: inline; padding: 0; border: 0; font-size: 15px; color: var(--mint); }

/* -------------------------------------------------------------- Герой --- */

.hero {
  position: relative;
  min-height: clamp(420px, 62vh, 660px);
  display: flex; align-items: flex-end;
  color: var(--white);
  overflow: hidden;
}
.hero--home { min-height: clamp(520px, 82vh, 820px); }

.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(1,43,52,.15) 0%, rgba(1,43,52,.55) 55%, rgba(1,43,52,.85) 100%);
}
/* .wrap задаёт горизонтальные отступы — здесь переопределяем только вертикальные */
.hero__inner { position: relative; width: 100%; padding-top: 64px; padding-bottom: clamp(48px, 6vw, 80px); }
.hero__title { max-width: 15ch; }
.hero__lead {
  max-width: 62ch; margin-top: 28px;
  font-size: clamp(14px, 1.15vw, 17px);
  line-height: 1.6; letter-spacing: .04em; text-transform: uppercase;
  color: rgba(255,255,255,.88);
}
.hero__actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 16px; }

/* Хлебные крошки */
.crumbs {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: 14px; color: rgba(255,255,255,.65);
  padding-top: 28px;
}
.crumbs a:hover { color: var(--white); }
.crumbs span[aria-current] { color: var(--white); }
.crumbs__sep { opacity: .5; }

/* --------------------------------------------------- Полоса-уведомление - */

.notice {
  background: var(--gradient); color: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 52px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 24px;
}
.notice h3 { max-width: 42ch; }

/* ---------------------------------------------------- Карточки продукции  */

.cards {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(1,43,52,.14); }
.card__media { aspect-ratio: 1 / 1; overflow: hidden; background: var(--gray-4); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card__title { font-size: 19px; line-height: 1.25; }
.card__text { font-size: 15px; color: var(--gray-1); margin: 0; }
.card__more { margin-top: auto; padding-top: 8px; }

/* Слайдер-лента (горизонтальная прокрутка) */
.slider { position: relative; }
.slider__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 320px;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-3) transparent;
}
.slider__track > * { scroll-snap-align: start; }
.slider__track::-webkit-scrollbar { height: 4px; }
.slider__track::-webkit-scrollbar-thumb { background: var(--gray-3); border-radius: 4px; }

.slider__nav { display: flex; gap: 12px; margin-top: 28px; }
.slider__btn {
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--gray-3);
  display: grid; place-items: center;
  transition: .25s var(--ease);
}
.slider__btn:hover { background: var(--dna); border-color: var(--dna); color: var(--white); }

/* --------------------------------------------------------- Показатели --- */

.figures {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: clamp(32px, 4vw, 52px);
}
.figure {
  padding: 36px 32px;
  background: var(--white);
  border-radius: var(--radius);
  border-top: 4px solid var(--mint);
}
.figure__value {
  font-size: clamp(38px, 4.4vw, 56px); line-height: 1;
  letter-spacing: -.03em; color: var(--dna);
}
.figure__label { margin-top: 16px; font-size: 16px; color: var(--gray-1); }

/* ------------------------------------------------- Крупные блоки-баннеры  */

.feature {
  display: grid; gap: clamp(24px, 4vw, 64px);
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
.feature__media { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 3; }
.feature__media img { width: 100%; height: 100%; object-fit: cover; }
.feature__body p { color: var(--gray-1); font-size: clamp(16px, 1.3vw, 18px); }
.feature__body h2 { margin-bottom: 24px; }
.feature--rev .feature__media { order: 2; }

/* Баннер с фоном-картинкой */
.banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 420px;
  display: flex; align-items: flex-end;
  color: var(--white);
}
.banner__media { position: absolute; inset: 0; }
.banner__media img { width: 100%; height: 100%; object-fit: cover; }
.banner__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(1,43,52,0) 25%, rgba(1,43,52,.82) 100%);
}
.banner__body { position: relative; padding: clamp(28px, 4vw, 48px); max-width: 620px; }
.banner__body p { margin-top: 16px; color: rgba(255,255,255,.85); font-size: 16px; }
.banner__body .btn { margin-top: 28px; }

.banner--split {
  display: grid; grid-template-columns: 1fr 1fr; align-items: stretch;
  background: var(--gradient); min-height: 0; color: var(--white);
}
.banner--split .banner__body { max-width: none; padding: clamp(32px, 4vw, 56px); align-self: center; }
/* Картинка заполняет колонку, но не задаёт высоту строки — иначе портретное
   изображение растягивает баннер на всю свою натуральную высоту. */
.banner--split .banner__pic { position: relative; min-height: 320px; }
.banner--split .banner__pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.banner-grid { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }

/* ------------------------------------------------------------ Плитки ---- */

.tiles { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tile {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 32px;
  background: var(--white);
  border-radius: var(--radius);
  font-size: clamp(18px, 1.8vw, 22px);
  transition: .25s var(--ease);
}
.tile:hover { background: var(--dna); color: var(--white); }
.tile svg { flex-shrink: 0; transition: transform .25s var(--ease); }
.tile:hover svg { transform: translateX(6px); }

/* ------------------------------------------------------------- Списки --- */

.bullets { display: grid; gap: 16px; margin-top: 8px; }
.bullets li {
  position: relative; padding-left: 34px;
  font-size: clamp(16px, 1.3vw, 18px); color: var(--gray-1);
}
.bullets li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 18px; height: 2px; background: var(--mint);
}

.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  padding: 12px 22px; border-radius: 100px;
  background: var(--white); border: 1px solid var(--gray-4);
  font-size: 15px; color: var(--gray-1);
  transition: .2s var(--ease);
}
.chip:hover { border-color: var(--dna); color: var(--dna); }

/* ------------------------------------------------------------ Контакты -- */

.contact-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.contact-card {
  padding: 36px 32px; background: var(--white); border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 12px;
}
.contact-card__label {
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--gray-2);
}
.contact-card__value { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.35; }
.contact-card__value a:hover { color: var(--dna); }

/* width обязателен: без него min-height + aspect-ratio вычисляют ШИРИНУ
   (320 × 21/9 ≈ 747px) и карта выпирает за пределы экрана на мобильных. */
.map {
  margin-top: 32px; width: 100%;
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--gray-4); aspect-ratio: 21 / 9; min-height: 320px;
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* --------------------------------------------------------------- Форма -- */

.form { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
/* min-width: 0 гасит авто-минимум грид-элемента: длинные <option> иначе
   растягивают колонку до своей min-content ширины. */
.form__field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.form__field--wide { grid-column: 1 / -1; }
.form label { font-size: 14px; color: var(--gray-2); }
.form input, .form textarea, .form select {
  font: inherit; font-size: 16px;
  width: 100%; max-width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--gray-4); border-radius: 10px;
  background: var(--white); color: var(--black);
  transition: border-color .2s var(--ease);
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-color: var(--dna);
}
.form textarea { resize: vertical; min-height: 130px; }
.form__consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--gray-2); }
.form__consent input { width: 18px; height: 18px; margin-top: 2px; padding: 0; flex-shrink: 0; }

/* -------------------------------------------------------------- Подвал -- */

.footer { background: var(--menu-bg); color: rgba(255,255,255,.78); padding: clamp(48px, 6vw, 72px) 0 32px; }
.footer a:hover { color: var(--mint); }

.footer__top { display: grid; gap: 40px; grid-template-columns: 1.2fr 1fr 1fr; }
.footer__brand { font-size: 20px; color: var(--white); margin-bottom: 16px; }
.footer__addr { font-style: normal; line-height: 1.7; }
.footer__addr a { color: var(--white); }

.footer__title { font-size: 15px; color: var(--white); margin-bottom: 18px; }
.footer__nav { display: grid; gap: 12px; font-size: 15px; }

.footer__sub { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.footer__sub input {
  flex: 1 1 180px; min-width: 0;
  font: inherit; font-size: 15px; padding: 13px 18px;
  border: 1px solid rgba(255,255,255,.25); border-radius: 100px;
  background: transparent; color: var(--white);
}
.footer__sub input::placeholder { color: rgba(255,255,255,.45); }
.footer__sub input:focus { outline: none; border-color: var(--mint); }

.footer__bottom {
  margin-top: clamp(40px, 5vw, 64px); padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,.14);
  display: flex; flex-wrap: wrap; gap: 20px 32px; justify-content: center;
  font-size: 14px; color: rgba(255,255,255,.55);
  text-align: center;
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 12px 28px; }

/* -------------------------------------------------------------- Cookie -- */

.cookies {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 70;
  background: var(--white); border-radius: var(--radius);
  box-shadow: 0 16px 44px rgba(1,43,52,.22);
  padding: 22px 26px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 20px; justify-content: space-between;
  max-width: 900px; margin: 0 auto;
  font-size: 14px; color: var(--gray-1);
}
.cookies[hidden] { display: none; }
.cookies p { margin: 0; max-width: 60ch; }

/* ---------------------------------------------------------- Анимации ---- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------- Адаптивность --- */

@media (max-width: 1200px) {
  .nav-list { gap: 18px; }
  .nav-list a { font-size: 14px; }
  .header__site { display: none; }
}

@media (max-width: 1024px) {
  :root { --gutter: 24px; --header-h: 72px; }

  .header__nav, .header__aside { display: none; }
  .burger { display: flex; }
  .header__logo img { height: 48px; }

  .feature { grid-template-columns: 1fr; }
  .feature--rev .feature__media { order: 0; }
  .banner-grid { grid-template-columns: 1fr; }
  .banner--split { grid-template-columns: 1fr; }
  .banner--split .banner__pic { order: -1; min-height: 260px; }

  .footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  :root { --radius-lg: 20px; }

  /* длинные надписи («Продукция в интернет-магазине») не помещаются в строку */
  .btn { white-space: normal; padding: 14px 24px; text-align: center; }

  .hero { min-height: 440px; }
  .hero--home { min-height: 520px; }
  .hero__lead { letter-spacing: .03em; }
  .hero__actions .btn { flex: 1 1 100%; justify-content: center; }

  .notice { flex-direction: column; align-items: flex-start; }
  .notice .btn { width: 100%; justify-content: center; }

  .cards { grid-template-columns: 1fr; }
  .slider__track { grid-auto-columns: min(78vw, 300px); }
  .map { aspect-ratio: 3 / 4; }
  .figures { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }

  .footer__top { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; }

  .cookies { left: 12px; right: 12px; bottom: 12px; padding: 18px; }
  .cookies .btn { width: 100%; justify-content: center; }
}
