/* Шрифты — свои, с этого же домена (не Google Fonts: ни лишнего сервера в
   пути, ни адресов посетителей у Google). Literata и Onest, лицензия SIL OFL;
   только кириллица и латиница. У Literata оптический размер закреплён на 36
   (заголовки) — файлы вдвое меньше переменных. Откуда и как обновить — README. */

@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/literata-italic-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/literata-italic-latin.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: "Literata";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/literata-normal-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/literata-normal-latin.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: "Onest";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/onest-normal-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/onest-normal-latin.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 {
  --paper: #ffffff;
  --stage: #f5f8fa;
  --band: #d9e3ec;
  --band-soft: #e8eef3;
  --ink: #231f20;
  --ink-2: #4a4e54;
  --ink-3: #5d6268;
  --line: rgba(35, 31, 32, 0.14);
  --line-2: rgba(35, 31, 32, 0.3);
  --accent: #a9583a;
  --accent-deep: #8f4a30;
  --accent-soft: #f6e8df;
  --accent-glow: #e9b195;
  --dark: #1c191a;
  --on-dark: #f5f1ee;
  --on-dark-2: #b8b2ad;
  --on-dark-line: rgba(245, 241, 238, 0.24);

  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --max: 1200px;
  --gutter: 20px;
  --header-h: 64px;
  --filters-h: 60px;
  --r-card: 4px;
  --r-pill: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-pack: 0 28px 48px rgba(35, 31, 32, 0.16), 0 8px 16px rgba(35, 31, 32, 0.08);

  color-scheme: light;
}

@media (min-width: 768px) {
  :root {
    --gutter: 40px;
    --header-h: 72px;
  }
}

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

/* scroll-padding — якоря и фокус с клавиатуры не уходят под липкую шапку */
html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
  scroll-padding-top: var(--header-h);
}

html:has(.dialog[open]) {
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

a,
button,
summary {
  touch-action: manipulation;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.nw {
  white-space: nowrap;
}

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

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.eyebrow--on-dark {
  color: var(--on-dark-2);
}

.section-head {
  max-width: 40em;
}

.section-head h2 {
  margin-top: 14px;
  font-size: clamp(32px, 4.2vw, 50px);
  line-height: 1.06;
}

.section-head p:not(.eyebrow) {
  margin-top: 16px;
  font-size: 17px;
  color: var(--ink-2);
}

/* Кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 200ms var(--ease),
    border-color 200ms var(--ease),
    color 200ms var(--ease),
    transform 120ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn--accent {
  background: var(--accent);
  color: #fff;
}

.btn--on-dark {
  border-color: var(--on-dark-line);
  color: var(--on-dark);
}

.btn--line {
  min-height: 40px;
  padding: 0 18px;
  border-color: var(--ink);
  background: transparent;
  font-size: 14px;
}

.btn--paper {
  background: var(--on-dark);
  color: var(--dark);
}

.btn--ghost-light {
  border-color: var(--on-dark-line);
  background: transparent;
  color: var(--on-dark);
}

.btn--small {
  min-height: 36px;
  padding: 0 16px;
  font-size: 14px;
}

@media (hover: hover) and (pointer: fine) {
  .btn--accent:hover {
    background: var(--accent-deep);
  }
  .btn--on-dark:hover {
    background: var(--on-dark);
    border-color: var(--on-dark);
    color: var(--dark);
  }
  .btn--line:hover {
    background: var(--ink);
    color: var(--paper);
  }
  .btn--paper:hover {
    background: #fff;
  }
  .btn--ghost-light:hover {
    border-color: var(--on-dark);
  }
}

/* Шапка */

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.1;
  margin-right: auto;
}

.brand__name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.brand__tail {
  color: var(--accent);
}

.brand__tagline {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

.nav {
  display: none;
  gap: 32px;
  font-size: 15px;
}

.nav a {
  position: relative;
  padding: 6px 0;
  text-decoration: none;
  color: var(--ink-2);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .nav a:hover {
    color: var(--ink);
  }
  .nav a:hover::after {
    transform: scaleX(1);
  }
}

.phone {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Меню на телефоне — <details>: открывается и без скрипта. */

.menu summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu__icon,
.menu__icon::before {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 250ms var(--ease);
}

.menu__icon {
  position: relative;
  transform: translateY(-4px);
}

.menu__icon::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
}

.menu[open] .menu__icon {
  transform: translateY(0) rotate(45deg);
}

.menu[open] .menu__icon::before {
  transform: translateY(-8px) rotate(-90deg);
}

.menu__panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: grid;
  padding: 8px var(--gutter) 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 40px rgba(35, 31, 32, 0.12);
}

.menu__panel a {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 24px;
  text-decoration: none;
}

@media (prefers-reduced-motion: no-preference) {
  .menu[open] .menu__panel {
    animation: drop-in 280ms var(--ease);
  }
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }
  .menu {
    display: none;
  }
}

/* Первый экран */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--dark);
  color: var(--on-dark);
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__blob {
  position: absolute;
  border-radius: 50%;
}

.hero__blob--a {
  width: 900px;
  height: 900px;
  right: -260px;
  top: -320px;
  background: radial-gradient(circle, rgba(233, 177, 149, 0.34) 0%, rgba(233, 177, 149, 0) 62%);
}

.hero__blob--b {
  width: 760px;
  height: 760px;
  left: -300px;
  bottom: -420px;
  background: radial-gradient(circle, rgba(169, 193, 217, 0.26) 0%, rgba(169, 193, 217, 0) 62%);
}

.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero--photo .hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 18, 19, 0.88) 0%, rgba(20, 18, 19, 0.55) 55%, rgba(20, 18, 19, 0.1) 100%);
}

.hero__inner {
  position: relative;
  display: grid;
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 56px;
}

@media (min-width: 960px) {
  .hero__inner {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
    gap: 48px;
    min-height: min(760px, calc(100svh - var(--header-h) - 84px));
    padding-top: 80px;
    padding-bottom: 88px;
  }
}

.hero__kicker {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-2);
}

.hero__brand {
  margin-top: 18px;
  font-size: clamp(46px, 8.4vw, 104px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.hero__brand .brand__tail {
  color: var(--accent-glow);
}

.hero h1 {
  max-width: 15em;
  margin-top: 16px;
  font-size: clamp(27px, 3.4vw, 44px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.14;
}

.hero__lead {
  max-width: 33em;
  margin-top: 20px;
  font-size: 17px;
  color: var(--on-dark-2);
}

.hero__seal {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 32px;
}

.seal {
  position: relative;
  flex: none;
  width: 88px;
  height: 88px;
  border: 1px solid rgba(233, 177, 149, 0.45);
  border-radius: 50%;
}

.seal__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--accent-glow);
  font-size: 9.6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seal__mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 34px;
  font-style: italic;
  line-height: 1;
  color: var(--accent-glow);
}

.seal__title {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.25;
}

.seal__sub {
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-dark-2);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

/* Упаковки на первом экране */

/* Поле с пропорцией, а места упаковок — в процентах от него: композиция
   одна на любой ширине, надписи двух верхних не уходят под нижнюю. */
.hero__packs {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 25 / 27;
  margin-inline: auto;
}

@media (min-width: 600px) {
  .hero__packs {
    width: min(100%, 520px);
  }
}

/* .hero__packs .pack — сильнее .pack, у которого position: relative */
.hero__packs .pack {
  position: absolute;
  width: 40%;
}

.hero__packs .pack--sachet {
  width: 36%;
}

.hero__packs .pack--long {
  width: 64%;
}

.hero__pack--1 {
  left: 4%;
  top: 3%;
  rotate: -7deg;
}

.hero__pack--2 {
  right: 4%;
  top: 12%;
  rotate: 5deg;
  z-index: 1;
}

.hero__pack--3 {
  left: 32%;
  bottom: 0;
  rotate: -2deg;
  z-index: 2;
}

/* Бегущая строка производителей */

.marquee {
  --mq-gap: clamp(22px, 3vw, 44px);
  position: relative;
  background: var(--band);
  overflow: hidden;
}

.marquee__viewport {
  overflow: hidden;
  padding: clamp(16px, 2vw, 24px) 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
}

.marquee__list {
  display: flex;
  align-items: baseline;
  gap: var(--mq-gap);
  margin: 0;
  padding: 0 var(--mq-gap) 0 0;
  list-style: none;
}

.marquee__list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
}

.marquee__list li::after {
  content: "·";
  margin-left: calc(var(--mq-gap) - 10px);
  font-size: 26px;
  line-height: 1;
  color: var(--accent);
}

.marquee__name {
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 500;
  line-height: 1.1;
  color: var(--ink);
}

.marquee__country {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Начертания брендов — как на упаковках, без логотипов */
.marquee__name.brand--polyphil {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.marquee__name.brand--mastelli {
  font-family: var(--serif);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.marquee__name.brand--croma {
  text-transform: lowercase;
  letter-spacing: 0.22em;
}

.marquee__name.brand--cgbio {
  font-weight: 600;
  letter-spacing: -0.03em;
}

.marquee__name.brand--wave-innovation-group {
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.marquee__name.brand--innoaesthetics {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

.marquee__toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 200ms var(--ease);
}

.marquee__toggle:focus-visible,
.marquee:hover .marquee__toggle {
  opacity: 1;
}

.marquee__toggle svg {
  width: 14px;
  height: 14px;
  fill: var(--ink);
}

.marquee__toggle .i-play,
.marquee__toggle[aria-pressed="true"] .i-pause {
  display: none;
}

.marquee__toggle[aria-pressed="true"] .i-play {
  display: inline;
}

@media (prefers-reduced-motion: no-preference) {
  .marquee__track {
    animation: marquee 42s linear infinite;
  }
  .marquee:hover .marquee__track,
  .marquee.is-paused .marquee__track,
  .marquee.is-offscreen .marquee__track {
    animation-play-state: paused;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__viewport {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
    padding-left: var(--gutter);
  }
  .marquee__list[aria-hidden="true"],
  .marquee__toggle {
    display: none;
  }
}

/* Подход и цифры */

.about {
  padding: 88px 0;
}

@media (min-width: 960px) {
  .about {
    padding: 128px 0 120px;
  }
}

.about__inner {
  display: grid;
  gap: 48px;
}

@media (min-width: 960px) {
  .about__inner {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: 96px;
    align-items: end;
  }
}

.about__copy h2 {
  margin-top: 14px;
  font-size: clamp(32px, 4.2vw, 50px);
  line-height: 1.06;
}

.about__copy p:not(.eyebrow) {
  max-width: 34em;
  margin-top: 18px;
  font-size: 17px;
  color: var(--ink-2);
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  display: grid;
  gap: 6px;
  padding: 22px 0 24px;
  border-top: 1px solid var(--line-2);
}

/* На 390 «Застосування» влезает в полколонки целиком; уже — перенос по слогам */
.facts__term {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 34px);
  font-weight: 400;
  line-height: 1.1;
  hyphens: auto;
  overflow-wrap: break-word;
}

.facts li:first-child .facts__term {
  color: var(--accent);
}

.facts__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Категории */

.cats {
  padding-bottom: 96px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 40px;
}

.tiles .tile:last-child:nth-child(odd) {
  grid-column: span 2;
  aspect-ratio: auto;
  min-height: 180px;
}

/* Плитка вдвое шире — значок той же величины, что у соседних */
.tiles .tile:last-child:nth-child(odd) .tile__glyph {
  width: 23%;
}

@media (min-width: 720px) {
  .tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tiles .tile:last-child:nth-child(odd) {
    grid-column: auto;
    aspect-ratio: 4 / 5;
  }
  .tiles .tile:last-child:nth-child(odd) .tile__glyph {
    width: 46%;
  }
}

/* Колонок — по числу разделов, чтобы ряды были ровными, когда их прибавится:
   до 4 → 4, 5 → 5, 6 → 6, 7–8 → 4 + 4, 9–10 → 5 + 5, 11–12 → 6 + 6. */
@media (min-width: 1100px) {
  .tiles {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
  }
  .tiles:has(> :last-child:nth-child(-n + 4)),
  .tiles:has(> :last-child:nth-child(7)),
  .tiles:has(> :last-child:nth-child(8)) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .tiles:has(> :last-child:nth-child(6)),
  .tiles:has(> :last-child:nth-child(11)),
  .tiles:has(> :last-child:nth-child(12)) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 4 / 5;
  padding: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--stage) 0%, var(--band) 100%);
  text-decoration: none;
  isolation: isolate;
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--accent-soft) 0%, #ecc9b6 100%);
  opacity: 0;
  transition: opacity 400ms var(--ease);
}

.tile__num {
  position: absolute;
  left: 18px;
  top: 16px;
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
}

.tile__glyph {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 46%;
  height: auto;
  translate: -50% -50%;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: scale 500ms var(--ease);
}

.tile__label {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.25;
}

@media (hover: hover) and (pointer: fine) {
  .tile:hover::after {
    opacity: 1;
  }
  .tile:hover .tile__glyph {
    scale: 1.1;
  }
}

.tile:active .tile__glyph {
  scale: 0.96;
}

/* Каталог */

.catalog {
  padding: 96px 0 88px;
  background: var(--band-soft);
}

.filters {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  margin-top: 32px;
  background: var(--band-soft);
  border-bottom: 1px solid var(--line);
}

.filters__row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--filters-h);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filters__row::-webkit-scrollbar {
  display: none;
}

.filter {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: transparent;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 200ms var(--ease),
    border-color 200ms var(--ease),
    color 200ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.filter[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

@media (hover: hover) and (pointer: fine) {
  .filter[aria-pressed="false"]:hover {
    border-color: var(--ink);
  }
}

.category {
  padding-top: 48px;
  scroll-margin-top: var(--filters-h);
}

.category__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 16px;
  align-items: baseline;
  margin-bottom: 22px;
}

.category__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--accent);
}

.category__head h3 {
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.18;
}

.grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

.card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  scroll-margin-top: calc(var(--filters-h) + 16px);
  transition:
    transform 400ms var(--ease),
    border-color 300ms var(--ease);
}

/* Тень при наведении — отдельным слоем: анимируется только прозрачность. */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  box-shadow: 0 22px 44px rgba(35, 31, 32, 0.14);
  opacity: 0;
  transition: opacity 400ms var(--ease);
  pointer-events: none;
}

.grid {
  isolation: isolate;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
  }
  .card:hover::after {
    opacity: 1;
  }
  .card:hover .card__media .pack {
    scale: 1.05;
  }
}

.card.is-added {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.card__media {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-card) var(--r-card) 0 0;
  background: linear-gradient(180deg, var(--stage) 0%, var(--band) 100%);
}

@media (min-width: 1100px) {
  .card__media {
    aspect-ratio: 16 / 10;
  }
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card__media .pack--box {
  width: 38%;
}

.card__media .pack--sachet {
  width: 48%;
}

.card__media .pack--long {
  width: 72%;
}

/* В две колонки карточка шире — упаковка той же величины при меньшей доле */
@media (min-width: 720px) {
  .card__media .pack--box {
    width: 30%;
  }
  .card__media .pack--sachet {
    width: 40%;
  }
  .card__media .pack--long {
    width: 60%;
  }
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 22px;
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  padding: 3px 10px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.badge--soft {
  border-color: transparent;
  background: var(--band-soft);
  white-space: normal;
}

.card__name {
  margin-top: 4px;
  font-size: 25px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.card__sub {
  font-size: 14px;
  color: var(--ink-3);
}

.card__desc {
  font-size: 15px;
  color: var(--ink-2);
}

.card__details summary,
.card__more {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  cursor: pointer;
  list-style: none;
  align-self: flex-start;
}

.card__details summary::-webkit-details-marker {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .card__details summary:hover,
  .card__more:hover {
    color: var(--accent-deep);
  }
}

.spec {
  margin: 8px 0 0;
}

.spec > div {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.spec dt {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.spec dd {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.5;
}

.card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.card__price,
.dialog__price {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--ink);
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--paper);
}

.qty button {
  width: 40px;
  height: 38px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--r-pill);
  -webkit-tap-highlight-color: transparent;
}

.qty output {
  min-width: 28px;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Рисованная упаковка (пока нет фото). Размер текста — от ширины упаковки. */

.pack {
  --pack-bg: #ffffff;
  --pack-ink: var(--ink);
  --pack-accent: var(--accent);
  --pack-muted: rgba(35, 31, 32, 0.6);
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  container-type: inline-size;
  overflow: hidden;
  border-radius: 3px;
  /* Полоса — между значком (вверху слева) и надписью (внизу): не под текстом */
  background:
    linear-gradient(152deg, transparent 26%, var(--pack-accent) 26% 35%, transparent 35%),
    linear-gradient(90deg, transparent 88%, rgba(0, 0, 0, 0.07) 88%),
    var(--pack-bg);
  color: var(--pack-ink);
  box-shadow: var(--shadow-pack);
  transition: scale 500ms var(--ease);
}

.pack--sachet {
  aspect-ratio: 4 / 5;
  border-radius: 10px;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.08) 0 2px, transparent 2px 6px) top / 100% 6% no-repeat,
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.08) 0 2px, transparent 2px 6px) bottom / 100% 6% no-repeat,
    radial-gradient(circle at 78% 22%, var(--pack-accent) 0 22%, transparent 22.5%),
    var(--pack-bg);
}

.pack--long {
  aspect-ratio: 16 / 7;
  background:
    linear-gradient(90deg, transparent 62%, var(--pack-accent) 62% 66%, transparent 66%),
    linear-gradient(180deg, transparent 84%, rgba(0, 0, 0, 0.07) 84%),
    var(--pack-bg);
}

.pack__glyph {
  position: absolute;
  top: 10cqw;
  left: 10cqw;
  width: 20cqw;
  height: 20cqw;
  fill: none;
  stroke: var(--pack-accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pack--sachet .pack__glyph {
  stroke: var(--pack-bg);
  top: 12cqw;
  left: auto;
  right: 12cqw;
  width: 20cqw;
  height: 20cqw;
}

.pack--long .pack__glyph {
  top: 50%;
  left: auto;
  right: 6cqw;
  width: 14cqw;
  height: 14cqw;
  translate: 0 -50%;
}

/* cqw внутри — от ширины самой упаковки (она контейнер). */
.pack__text {
  position: absolute;
  left: 10cqw;
  right: 10cqw;
  bottom: 11cqw;
  display: flex;
  flex-direction: column;
  gap: 1.5cqw;
}

.pack--long .pack__text {
  left: 6cqw;
  right: 24cqw;
  bottom: 7cqw;
  gap: 1cqw;
}

.pack__brand {
  font-size: 7cqw;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pack-muted);
}

.pack__title {
  font-size: 13cqw;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.pack--long .pack__title {
  max-width: 54cqw;
  font-size: 7.5cqw;
}

.pack--long .pack__brand,
.pack--long .pack__vol {
  font-size: 4cqw;
}

.pack--sachet .pack__title {
  font-size: 9.5cqw;
}

.pack__vol {
  margin-top: 0.4em;
  font-size: 7cqw;
  color: var(--pack-muted);
}

/* Цвета упаковок по бренду — условные, не фирменные */
.pack.brand--polyphil {
  --pack-bg: #2b2829;
  --pack-ink: #f5f1ee;
  --pack-accent: #e0763f;
  --pack-muted: rgba(245, 241, 238, 0.62);
}

.pack.brand--mastelli {
  --pack-accent: #3fa38c;
}

.pack.brand--croma {
  --pack-bg: #f2f4ee;
  --pack-accent: #7d9a6b;
}

.pack.brand--cgbio {
  --pack-ink: #1e3557;
  --pack-accent: #2f6db5;
  --pack-muted: rgba(30, 53, 87, 0.6);
}

.pack.brand--wave-innovation-group {
  --pack-bg: #1f2b44;
  --pack-ink: #f2f5fa;
  --pack-accent: #6fa8dc;
  --pack-muted: rgba(242, 245, 250, 0.62);
}

.pack.brand--innoaesthetics {
  --pack-bg: #faf7f2;
  --pack-accent: #c3a46b;
}

/* Окно «Детальніше» */

.dialog {
  width: min(920px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: var(--r-card);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 40px 80px rgba(20, 18, 19, 0.3);
  overscroll-behavior: contain;
}

.dialog::backdrop {
  background: rgba(28, 25, 26, 0.6);
}

.dialog__inner {
  display: grid;
}

@media (min-width: 760px) {
  .dialog__inner {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }
}

.dialog__close {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.dialog__close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linecap: round;
}

@media (hover: hover) and (pointer: fine) {
  .dialog__close:hover {
    background: var(--band);
  }
}

.dialog__media {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 32px;
  background: linear-gradient(180deg, var(--stage) 0%, var(--band) 100%);
}

.dialog__media .pack--box {
  width: min(46%, 220px);
}

.dialog__media .pack--sachet {
  width: min(56%, 260px);
}

.dialog__media .pack--long {
  width: min(86%, 380px);
}

.dialog__media img {
  width: 100%;
  max-width: 420px;
  height: auto;
}

.dialog__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 24px 28px;
}

@media (min-width: 760px) {
  .dialog__body {
    padding: 48px 40px 40px;
  }
}

.dialog__title {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.12;
}

.dialog__price {
  margin-top: 8px;
}

@media (prefers-reduced-motion: no-preference) {
  .dialog[open] {
    animation: dialog-in 320ms var(--ease);
  }
  .dialog[open]::backdrop {
    animation: fade-in 320ms var(--ease);
  }
}

/* Как заказать и запрос — только когда указан телефон */

.how {
  padding: 96px 0;
}

.steps {
  display: grid;
  gap: 32px;
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
  }
}

.steps li {
  padding-top: 18px;
  border-top: 1px solid var(--ink);
}

.steps__num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
}

.steps h3 {
  margin: 10px 0 8px;
  font-size: 24px;
  line-height: 1.2;
}

.steps p {
  color: var(--ink-2);
}

.request {
  padding: 96px 0 104px;
  background: var(--dark);
  color: var(--on-dark);
}

.request__inner {
  display: grid;
  gap: 40px;
}

@media (min-width: 960px) {
  .request__inner {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 72px;
    align-items: start;
  }
}

.request h2 {
  margin-top: 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
}

.request__intro p:not(.eyebrow) {
  max-width: 30em;
  margin-top: 18px;
  color: var(--on-dark-2);
}

.request__phone {
  display: inline-block;
  margin-top: 28px;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 34px);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--on-dark-line);
}

.panel {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--on-dark-line);
  border-radius: var(--r-card);
  background: rgba(245, 241, 238, 0.05);
}

@media (min-width: 768px) {
  .panel {
    padding: 32px;
  }
}

.panel__empty {
  color: var(--on-dark-2);
}

.panel__list {
  display: grid;
  list-style: none;
  margin: 0;
  padding: 0;
}

.panel__list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--on-dark-line);
}

.panel__list li:first-child {
  border-top: 1px solid var(--on-dark-line);
}

.panel__item-name {
  font-weight: 500;
  overflow-wrap: anywhere;
}

.panel__item-volume {
  display: block;
  font-size: 13px;
  color: var(--on-dark-2);
}

.panel .qty {
  background: transparent;
  border-color: var(--on-dark-line);
}

.panel .qty button {
  width: 36px;
  height: 34px;
}

.field {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--on-dark-2);
}

.field em {
  font-style: normal;
  opacity: 0.7;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--on-dark-line);
  border-radius: 4px;
  background: rgba(245, 241, 238, 0.06);
  color: var(--on-dark);
  font-size: 16px;
  transition: border-color 200ms var(--ease);
}

.field input {
  min-height: 48px;
}

.field textarea {
  resize: vertical;
  min-height: 88px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--on-dark);
}

.panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.panel__actions [aria-disabled="true"],
.panel__actions [disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.panel__status {
  min-height: 1.5em;
  font-size: 14px;
  color: var(--on-dark-2);
}

.request-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px 10px 10px 20px;
  border-radius: var(--r-pill);
  background: var(--dark);
  color: var(--on-dark);
  box-shadow: 0 16px 40px rgba(20, 18, 19, 0.3);
  font-size: 14px;
}

/* Подвал */

.footer {
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 40px;
  padding-top: 36px;
  padding-bottom: 40px;
}

.brand--footer {
  margin-right: auto;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 14px;
}

/* Цель нажатия — не меньше 24 px в высоту (WCAG 2.5.8) */
.footer__nav a {
  display: inline-block;
  padding-block: 6px;
  text-decoration: none;
  color: var(--ink-2);
}

@media (hover: hover) and (pointer: fine) {
  .footer__nav a:hover {
    color: var(--ink);
  }
}

.footer__meta {
  flex-basis: 100%;
  font-size: 13px;
  color: var(--ink-3);
}

/* Кнопка «нагору» */

.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 45;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--dark);
  box-shadow: 0 12px 28px rgba(20, 18, 19, 0.28);
  opacity: 0;
  translate: 0 12px;
  visibility: hidden;
  transition:
    opacity 300ms var(--ease),
    translate 300ms var(--ease),
    visibility 0s linear 300ms;
}

/* visibility — чтобы невидимая кнопка не ловила Tab. */
.to-top.is-visible {
  opacity: 1;
  translate: 0 0;
  visibility: visible;
  transition-delay: 0s;
}

.to-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--on-dark);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body:has(.request-bar:not([hidden])) .to-top {
  bottom: 84px;
}

@media (hover: hover) and (pointer: fine) {
  .to-top:hover {
    background: var(--accent);
  }
}

/* Движение: только transform/opacity; всё — при разрешённой анимации */

@media (prefers-reduced-motion: no-preference) {
  .hero__text {
    animation: rise-in 800ms var(--ease) both;
  }
  .hero__packs {
    animation: fade-in 1000ms var(--ease) 150ms both;
  }
  .hero__pack {
    animation: float 7s ease-in-out infinite alternate;
  }
  .hero__pack--2 {
    animation-duration: 8s;
    animation-delay: -3s;
  }
  .hero__pack--3 {
    animation-duration: 6.5s;
    animation-delay: -5s;
  }
  .hero__blob--a {
    animation: drift-a 22s ease-in-out infinite alternate;
  }
  .hero__blob--b {
    animation: drift-b 26s ease-in-out infinite alternate;
  }
  .seal {
    animation: seal-settle 900ms var(--ease) 300ms both;
  }
  .seal__ring {
    animation: spin 28s linear infinite;
  }
  .hero.is-offscreen .hero__pack,
  .hero.is-offscreen .hero__blob,
  .hero.is-offscreen .seal__ring {
    animation-play-state: paused;
  }

  /* Появление при прокрутке — средствами CSS (scroll-driven), без скрипта.
     Браузер без поддержки просто показывает всё сразу. */
  @supports (animation-timeline: view()) {
    .reveal,
    .card {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    translate: 0 18px;
  }
  to {
    opacity: 1;
    translate: none;
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    translate: 0 32px;
  }
  to {
    opacity: 1;
    translate: none;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes drop-in {
  from {
    opacity: 0;
    translate: 0 -8px;
  }
  to {
    opacity: 1;
    translate: none;
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    translate: 0 16px;
    scale: 0.98;
  }
  to {
    opacity: 1;
    translate: none;
    scale: none;
  }
}

@keyframes float {
  from {
    translate: 0 0;
  }
  to {
    translate: 0 -14px;
  }
}

@keyframes drift-a {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(-120px, 80px) scale(1.12);
  }
}

@keyframes drift-b {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(140px, -60px) scale(1.08);
  }
}

@keyframes seal-settle {
  from {
    opacity: 0;
    scale: 0.86;
    rotate: -10deg;
  }
  to {
    opacity: 1;
    scale: none;
    rotate: none;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}
