/* ==========================================================================
   ООО «Сундырь-Хлеб» — стили сайта
   Токены → база → шапка → hero → секции → продукция → лайтбокс →
   услуги → контакты → подвал → анимации → печать
   ========================================================================== */

:root {
  /* Брендовая палитра */
  --flour: #f2e8d2;
  --paper: #fbf6ea;
  --crust: #8b4a2b;
  --crust-dark: #6e3a20;
  --wheat: #c89b3c;
  --field: #5c6b47;
  --rye: #2f2013;

  /* Семантические токены — их и переопределяет тёмная тема */
  --bg: var(--flour);
  --bg-alt: var(--paper);
  --surface: #fffdf7;
  --surface-2: #f3e9d5;
  --text: var(--rye);
  --text-muted: var(--field);
  --accent: var(--crust);
  --accent-strong: var(--crust-dark);
  --accent-contrast: var(--paper);
  --highlight: var(--wheat);
  --danger: #b3261e;
  --success: #3f6b3a;
  --line: rgb(47 32 19 / 14%);
  --line-strong: rgb(47 32 19 / 30%);
  --header-bg: rgb(242 232 210 / 92%);
  --footer-bg: var(--rye);
  --footer-text: var(--flour);
  --shadow-sm: 0 1px 2px rgb(47 32 19 / 8%);
  --shadow-md: 0 8px 20px -8px rgb(47 32 19 / 25%);
  --shadow-lg: 0 20px 44px -14px rgb(47 32 19 / 34%);

  /* Типографика */
  --font-display: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  /* Ритм и формы */
  --wrap: 1080px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(56px, 8vw, 96px);
  --header-h: 68px;
  --radius: 10px;
  --radius-lg: 16px;
  color-scheme: light;
}
/* Тёмная тема: по системной настройке и по ручному выбору (data-theme).
   Значения дублируются, потому что @media нельзя объединить в список селекторов. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #17110c;
    --bg-alt: #1e1610;
    --surface: #241a13;
    --surface-2: #2d2118;
    --text: #f2e8d2;
    --text-muted: #b8ad93;
    --accent: #d9905f;
    --accent-strong: #eaa878;
    --accent-contrast: #1a1209;
    --highlight: #e0b75c;
    --danger: #ff9b91;
    --success: #9ed49a;
    --line: rgb(242 232 210 / 14%);
    --line-strong: rgb(242 232 210 / 30%);
    --header-bg: rgb(23 17 12 / 90%);
    --footer-bg: #100c08;
    --footer-text: var(--flour);
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow-md: 0 8px 20px -8px rgb(0 0 0 / 60%);
    --shadow-lg: 0 20px 44px -14px rgb(0 0 0 / 70%);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #17110c;
  --bg-alt: #1e1610;
  --surface: #241a13;
  --surface-2: #2d2118;
  --text: #f2e8d2;
  --text-muted: #b8ad93;
  --accent: #d9905f;
  --accent-strong: #eaa878;
  --accent-contrast: #1a1209;
  --highlight: #e0b75c;
  --danger: #ff9b91;
  --success: #9ed49a;
  --line: rgb(242 232 210 / 14%);
  --line-strong: rgb(242 232 210 / 30%);
  --header-bg: rgb(23 17 12 / 90%);
  --footer-bg: #100c08;
  --footer-text: var(--flour);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
  --shadow-md: 0 8px 20px -8px rgb(0 0 0 / 60%);
  --shadow-lg: 0 20px 44px -14px rgb(0 0 0 / 70%);
  color-scheme: dark;
}
/* --------------------------------------------------------------- База ---- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Блокировка прокрутки под лайтбоксом и мобильным меню */
body.is-locked {
  overflow: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

a {
  color: var(--accent-strong);
  text-underline-offset: 2px;
}

:where(a, button, input, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Отступ под фиксированной шапкой при переходе по якорю */
[id] {
  scroll-margin-top: calc(var(--header-h) + 0px);
}

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

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  translate: 0 -160%;
  transition: translate .2s ease;
}

.skip-link:focus-visible {
  translate: 0;
}
/* ------------------------------------------------------------- Кнопки ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: none;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease,
    color .2s ease, translate .18s ease, box-shadow .2s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  background: var(--accent-strong);
  translate: 0 -2px;
  box-shadow: var(--shadow-lg);
}

.btn--outline {
  border-color: currentcolor;
  color: inherit;
}

.btn--outline:hover {
  background: rgb(255 255 255 / 12%);
  translate: 0 -2px;
}

.btn:active {
  translate: 0;
}
/* -------------------------------------------------------------- Шапка ---- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.site-header.is-solid {
  background: var(--header-bg);
  backdrop-filter: blur(12px) saturate(1.4);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

/* Пока шапка лежит поверх фото — светлая палитра для всего содержимого */
.site-header:not(.is-solid) {
  --text: #fff;
  --accent: #fff;
  --accent-strong: #fff;
  --line-strong: rgb(255 255 255 / 45%);

  color: #fff;
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-strong);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.brand__mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1.5px solid currentcolor;
  border-radius: 50%;
  color: var(--accent);
}

.brand__mark svg {
  width: 19px;
  height: 19px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}

.icon-btn:hover {
  border-color: var(--accent);
  background: rgb(139 74 43 / 10%);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}
/* Переключатель темы и бургер работают только со скриптом */
.theme-toggle,
.nav-toggle {
  display: none;
}

.js .theme-toggle {
  display: grid;
}

.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme='dark'] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme='dark'] .theme-toggle .icon-moon {
  display: none;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle[aria-expanded='true'] .icon-close {
  display: block;
}

.nav-toggle[aria-expanded='true'] .icon-burger {
  display: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav__link {
  position: relative;
  padding: 8px 12px;
  color: inherit;
  font-size: 14.5px;
  text-decoration: none;
  transition: color .2s ease;
}

.nav__link::after {
  content: '';
  position: absolute;
  right: 12px;
  bottom: 2px;
  left: 12px;
  height: 2px;
  border-radius: 2px;
  background: currentcolor;
  scale: 0 1;
  transform-origin: left;
  transition: scale .25s ease;
}

.nav__link:hover::after,
.nav__link:focus-visible::after,
.nav__link[aria-current='true']::after {
  scale: 1 1;
}
.nav__link[aria-current='true'] {
  color: var(--accent-strong);
  font-weight: 700;
}

@media (max-width: 880px) {
  .js .nav-toggle {
    display: grid;
  }

  /* Без скрипта меню остаётся обычной строкой ссылок и переносится */
  .site-header__bar {
    flex-wrap: wrap;
    padding-bottom: 4px;
  }

  /* Со скриптом — выпадающая панель */
  .js .nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    visibility: hidden;
    padding: 6px var(--gutter) 18px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-alt);
    box-shadow: var(--shadow-lg);
    color: var(--text);
    opacity: 0;
    translate: 0 -10px;
    transition: opacity .22s ease, translate .22s ease, visibility .22s;
  }

  .js .nav.is-open {
    visibility: visible;
    opacity: 1;
    translate: 0;
  }

  .js .nav__link {
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
  }

  .nav__link::after {
    display: none;
  }
}
/* --------------------------------------------------------------- Hero ---- */

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 100svh;
  padding-block: calc(var(--header-h) + 48px) 96px;
  color: #fff;
  isolation: isolate;
}

.hero__media,
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__media {
  z-index: -2;
  background: var(--rye);
}

.hero__media img {
  object-fit: cover;
}

/* Затемнение поверх фото — чтобы текст читался при любом кадре */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgb(15 10 6 / 62%) 0%,
    rgb(15 10 6 / 44%) 42%,
    rgb(15 10 6 / 84%) 100%
  );
}

.hero__inner {
  max-width: 44rem;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--highlight);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 18px;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(34px, 6.2vw, 58px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.hero__lede {
  max-width: 46ch;
  margin: 0 0 30px;
  color: rgb(255 255 255 / 88%);
  font-size: clamp(16px, 1.6vw, 18.5px);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 40px;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: rgb(255 255 255 / 78%);
}

.hero__facts li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero__facts li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--highlight);
}

.hero__scroll {
  position: absolute;
  bottom: 22px;
  left: 50%;
  translate: -50% 0;
  color: rgb(255 255 255 / 70%);
  animation: bob 2.4s ease-in-out infinite;
}

.hero__scroll svg {
  width: 26px;
  height: 26px;
}

@keyframes bob {
  0%,
  100% {
    translate: -50% 0;
  }

  50% {
    translate: -50% 7px;
  }
}

/* ------------------------------------------------------------- Секции ---- */

.section {
  padding-block: var(--section-y);
}

.section--alt {
  border-block: 1px solid var(--line);
  background: var(--bg-alt);
}

.section__head {
  max-width: 64ch;
  margin-bottom: clamp(26px, 4vw, 44px);
}

.section__head .eyebrow {
  color: var(--text-muted);
}
.section h2 {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-family: var(--font-display);
  font-size: clamp(26px, 4.2vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
}

.section__note {
  margin: 0;
  color: var(--text-muted);
  font-size: 15.5px;
}

/* --------------------------------------------------------- О компании ---- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}

.about__text > p {
  max-width: 62ch;
  margin: 0 0 16px;
  font-size: 16px;
}

.stats {
  display: grid;
  /* Ровно два столбца: четыре показателя ложатся сеткой 2×2 без сироты. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 20px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.stat {
  border-left: 3px solid var(--highlight);
  padding-left: 14px;
}
.stat__num {
  display: block;
  color: var(--accent-strong);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}

.stat__label {
  color: var(--text-muted);
  font-size: 12.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.figure__frame {
  aspect-ratio: 4 / 3;
}

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

.figure figcaption {
  padding: 12px 16px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
}

@media (max-width: 860px) {
  .about {
    grid-template-columns: 1fr;
  }
}
/* ---------------------------------------------------------- Продукция ---- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: clamp(20px, 3vw, 30px);
}

.filter {
  padding: 9px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.filter:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.filter[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: clamp(16px, 2.4vw, 26px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.card.is-hidden {
  display: none;
}
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: translate .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.card:hover,
.card:focus-within {
  translate: 0 -4px;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
}

.card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: var(--surface-2);
  cursor: zoom-in;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale .5s ease;
}

.card:hover .card__media img {
  scale: 1.05;
}
.card__zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgb(20 14 9 / 62%);
  color: #fff;
  opacity: 0;
  translate: 0 6px;
  transition: opacity .25s ease, translate .25s ease;
}

.card__zoom svg {
  width: 17px;
  height: 17px;
}

.card:hover .card__zoom,
.card__media:focus-visible .card__zoom {
  opacity: 1;
  translate: 0;
}

.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  padding: 15px 18px 19px;
}

.card__cat {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.card__title {
  margin: 0;
  color: var(--accent-strong);
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.25;
}

.card__desc {
  margin: 0;
  color: var(--text);
  font-size: 14.5px;
  opacity: .85;
}

.products-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* ---------------------------------------------------------- Лайтбокс ----- */

.lightbox {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  visibility: hidden;
  place-items: center;
  padding: clamp(14px, 4vw, 44px);
  background: rgb(10 7 4 / 92%);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .25s ease, visibility .25s;
}

.lightbox.is-open {
  visibility: visible;
  opacity: 1;
}

.lightbox__figure {
  position: relative;
  display: grid;
  gap: 14px;
  justify-items: center;
  margin: 0;
  max-height: 100%;
}
.lightbox__img {
  max-width: min(100%, 1100px);
  max-height: 74svh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transition: opacity .2s ease;
}

/* Пока грузится следующий снимок, предыдущий не показываем. */
.lightbox.is-loading .lightbox__img {
  opacity: 0;
  transition: none;
}

.lightbox.is-loading .lightbox__figure::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 2px solid rgb(255 255 255 / 25%);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lightbox-spin .7s linear infinite;
}

@keyframes lightbox-spin {
  to { rotate: 360deg; }
}

.lightbox__caption {
  max-width: 56ch;
  color: rgb(255 255 255 / 82%);
  font-size: 14.5px;
  text-align: center;
}

.lightbox__caption strong {
  display: block;
  margin-bottom: 2px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 19px;
}

.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 50%;
  background: rgb(255 255 255 / 12%);
  color: #fff;
  cursor: pointer;
  transition: background-color .2s ease;
}

.lightbox__btn:hover {
  background: rgb(255 255 255 / 26%);
}

.lightbox__btn svg {
  width: 22px;
  height: 22px;
}
.lightbox__close {
  top: 16px;
  right: 16px;
}

.lightbox__prev {
  top: 50%;
  left: 14px;
  translate: 0 -50%;
}

.lightbox__next {
  top: 50%;
  right: 14px;
  translate: 0 -50%;
}

.lightbox__counter {
  position: absolute;
  top: 26px;
  left: 50%;
  translate: -50% 0;
  color: rgb(255 255 255 / 70%);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

@media (max-width: 620px) {
  .lightbox__prev,
  .lightbox__next {
    top: auto;
    bottom: 14px;
    translate: 0;
  }

  .lightbox__prev {
    left: 22%;
  }

  .lightbox__next {
    right: 22%;
  }

  .lightbox__figure {
    padding-bottom: 56px;
  }
}
/* ------------------------------------------------------------- Услуги ---- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.feature__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.feature__icon svg {
  width: 22px;
  height: 22px;
}

.feature h3 {
  margin: 0;
  color: var(--accent-strong);
  font-family: var(--font-display);
  font-size: 17px;
}

.feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
}
/* ----------------------------------------------------------- Контакты ---- */

.contacts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: start;
}

@media (max-width: 900px) {
  .contacts {
    grid-template-columns: 1fr;
  }
}

.contact-list {
  display: grid;
  gap: 18px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.contact {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.contact__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.contact__icon svg {
  width: 20px;
  height: 20px;
}
.contact__k {
  display: block;
  margin-bottom: 2px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.contact__v {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.5;
}

.contact__v a {
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}

.contact__v a:hover {
  border-color: var(--accent);
}

.contact__hint {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 400;
}

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

.form {
  display: grid;
  gap: 16px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.form h3 {
  margin: 0;
  color: var(--accent-strong);
  font-family: var(--font-display);
  font-size: 21px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 13.5px;
  font-weight: 600;
}

.field .req {
  color: var(--accent);
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-alt);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.field textarea {
  min-height: 104px;
  resize: vertical;
}
.field__error {
  min-height: 1.2em;
  color: var(--danger);
  font-size: 12.5px;
}

.field.has-error input,
.field.has-error textarea {
  border-color: var(--danger);
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 520px) {
  .form__row {
    grid-template-columns: 1fr;
  }
}

.form__note {
  margin: 0;
  color: var(--text-muted);
  font-size: 12.5px;
}

.form__status {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.form__status[data-state='ok'] {
  color: var(--success);
}

.form__status[data-state='error'] {
  color: var(--danger);
}

.form .btn--primary {
  justify-self: start;
}
/* -------------------------------------------------------------- Подвал --- */

.site-footer {
  padding-block: clamp(36px, 5vw, 56px) 26px;
  background: var(--footer-bg);
  color: var(--footer-text);
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
  gap: 28px;
}

@media (max-width: 780px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--highlight);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.site-footer p {
  margin: 0 0 10px;
  line-height: 1.6;
  opacity: .88;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  opacity: .88;
}

.site-footer a:hover {
  opacity: 1;
  text-decoration: underline;
}
.footer-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgb(242 232 210 / 16%);
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: .8;
}

/* ------------------------------------------------------- Кнопка «вверх» --- */

.to-top {
  position: fixed;
  z-index: 40;
  right: clamp(14px, 3vw, 26px);
  bottom: clamp(14px, 3vw, 26px);
  display: grid;
  visibility: hidden;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  translate: 0 8px;
  transition: opacity .25s ease, translate .25s ease, visibility .25s;
}

.to-top.is-visible {
  visibility: visible;
  opacity: 1;
  translate: 0;
}
.to-top svg {
  width: 20px;
  height: 20px;
}

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

/* Появление при прокрутке включаем только при работающем скрипте,
   иначе контент остался бы невидимым. */
.js .reveal {
  opacity: 0;
  translate: 0 18px;
  transition: opacity .6s ease, translate .6s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  translate: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .js .reveal {
    opacity: 1;
    translate: none;
  }
}

/* -------------------------------------------------------------- Печать --- */

@media print {
  .site-header,
  .hero__scroll,
  .to-top,
  .lightbox,
  .filters,
  .form {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}

