/* ==========================================================================
   ТЕНЛАБ — стили сайта. Без внешних зависимостей.
   ========================================================================== */

:root {
  --ink: #0a1327;
  --ink-2: #131f3b;
  --blue: #2c6bf5;
  --blue-dark: #1b4fd1;
  --blue-soft: #eaf1ff;
  --paper: #f4f7fd;
  --white: #fff;
  --text: #0f1b33;
  --muted: #5b6a88;
  --line: #e2eaf7;
  --ok: #17a673;
  --radius: 22px;
  --radius-lg: 30px;
  --shadow: 0 18px 48px rgba(12, 26, 58, 0.1);
  --shadow-sm: 0 6px 20px rgba(12, 26, 58, 0.07);
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 0.75, 0.28, 1);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  overflow-x: hidden;
  padding-top: var(--header-h);
}

/* Единственное правило, которого не хватало в старой версии —
   именно из-за него растягивались фото в блоке «О Тенлаб». */
img,
video,
svg,
iframe {
  max-width: 100%;
  display: block;
}

img {
  height: auto;
}

a {
  color: var(--blue);
  text-decoration: none;
}

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

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
}

h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

p {
  margin: 0 0 1em;
}

ul {
  margin: 0 0 1em;
  padding-left: 1.1em;
}

li {
  margin-bottom: 0.5em;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

/* --------------------------------- layout -------------------------------- */
.container {
  width: min(1240px, 100% - 2.5rem);
  margin-inline: auto;
}

.section {
  padding: clamp(56px, 8vw, 96px) 0;
}

.section--tight {
  padding-top: 0;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.9rem;
}

.eyebrow--light {
  color: #8fb6ff;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 62ch;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
}

.center {
  text-align: center;
}

/* --------------------------------- buttons ------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, color 0.2s, border-color 0.2s;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
}

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

.btn--primary:hover {
  background: var(--blue-dark);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn--outline {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn--outline:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.btn--block {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* --------------------------------- header -------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 19, 39, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
}

.brand img {
  height: 30px;
  width: auto;
  filter: brightness(0) invert(1);
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
}

.nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav a.is-active {
  color: #fff;
  background: rgba(44, 107, 245, 0.28);
}

.nav a.nav-cta {
  background: var(--blue);
  color: #fff;
  margin-left: 0.4rem;
}

.nav a.nav-cta:hover {
  background: var(--blue-dark);
}

.sk-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.9rem;
  padding-left: 0.9rem;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.sk-badge img {
  height: 26px;
  width: auto;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  position: relative;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  position: absolute;
  left: 50%;
  width: 20px;
  height: 2px;
  background: #fff;
  transform: translateX(-50%);
  transition: 0.25s var(--ease);
}

.nav-toggle span {
  top: 50%;
  margin-top: -1px;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  left: 0;
  transform: none;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] span::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ---------------------------------- hero --------------------------------- */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem;
  overflow: hidden;
  background: var(--ink);
}

.hero__bg,
.hero__bg video,
.hero__bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      180deg,
      rgba(6, 12, 26, 0.72) 0%,
      rgba(6, 12, 26, 0.66) 45%,
      rgba(6, 12, 26, 0.92) 100%
    ),
    radial-gradient(circle at 22% 20%, rgba(44, 107, 245, 0.28), transparent 45%);
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero__h1 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72);
  max-width: 46ch;
  margin: 0 0 1.4rem;
}

.hero__dir {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  margin-bottom: 1rem;
}

.hero__copy {
  max-width: 42rem;
  min-height: 13rem;
}

.hero__copy h1 {
  margin-bottom: 1rem;
}

.hero__copy p {
  font-size: 1.12rem;
  color: rgba(255, 255, 255, 0.86);
  max-width: 46ch;
}

.hero.is-switching .hero__copy,
.hero.is-switching .direction-card {
  opacity: 0;
  transform: translateY(10px);
}

.hero__copy,
.direction-card {
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

/* переключатель направлений */
.switcher {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: 2rem;
  /* запас снизу, чтобы карточка направления не наезжала на подписи */
  padding-bottom: 90px;
}

.switcher__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.6rem;
}

.chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 0.5rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: 0.25s var(--ease);
}

.chip:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  transform: translateY(-3px);
}

.chip.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 12px 30px rgba(44, 107, 245, 0.4);
}

.chip span {
  display: block;
  min-height: 2.5em;
}

.chip img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

.chip.is-active img {
  filter: brightness(0) invert(1);
}

/* карточка активного направления */
.direction-shell {
  margin-top: -70px;
  position: relative;
  z-index: 5;
}

.direction-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(1.4rem, 3vw, 2.4rem);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.8rem;
}

.direction-card__media {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--blue-soft);
  aspect-ratio: 3 / 2;
}

.direction-card__media img,
.direction-card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.direction-card__sub {
  margin-top: 1rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.direction-card h2 {
  margin-bottom: 0.8rem;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: 0.2s var(--ease);
}

.pill:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
  transform: translateY(-2px);
}

/* --------------------------------- stats --------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
}

.stat b {
  display: block;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.02em;
}

.stat span {
  font-size: 0.88rem;
  color: var(--muted);
}

/* --------------------------------- cards --------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  /* height: 100% здесь не нужен: в сетке карточки и так растягиваются.
     Раньше это ломало колонки с двумя карточками — вторая получала
     высоту всей колонки и наезжала на подвал. */
}

.card--flat {
  box-shadow: none;
}

.panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(1.4rem, 3vw, 2.4rem);
}

/* блок «О Тенлаб» */
.about {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 1.8rem;
  align-items: start;
}

.about__gallery {
  display: grid;
  gap: 1rem;
}

.about__gallery figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
  aspect-ratio: 16 / 9;
}

/* Фото больше не растягиваются: жёсткая пропорция + object-fit */
.about__gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__text ul {
  padding-left: 1.15rem;
}

.about__text li::marker {
  color: var(--blue);
}

.creds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

.cred {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 0.85rem;
  font-weight: 600;
}

/* --------------------------------- cases --------------------------------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 2rem;
}

.filter {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s var(--ease);
}

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

.filter.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.case {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: 0.28s var(--ease);
}

.case:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: #cfdcf5;
}

.case__thumb {
  aspect-ratio: 16 / 10;
  background: var(--blue-soft);
  overflow: hidden;
}

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

/* карточка без фотографии — типографская плашка */
.case__thumb--empty {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.2rem;
  background: linear-gradient(140deg, #16264a 0%, var(--ink) 60%, #1b3a7a 100%);
  color: rgba(255, 255, 255, 0.9);
}

.case__thumb--empty i {
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8fb6ff;
}

.case__thumb--empty b {
  font-size: 1.15rem;
  line-height: 1.25;
  font-weight: 800;
}

.case__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.case__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}

.case__client {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.case h3 {
  font-size: 1.1rem;
  margin: 0;
}

.case p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--muted);
}

.case__result {
  margin-top: auto;
  padding-top: 0.9rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ok);
}

/* -------------------------------- products ------------------------------- */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.2rem, 3vw, 2rem);
  scroll-margin-top: 100px;
}

.product__badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: #fff5d6;
  color: #8a6100;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.spec-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.5rem;
}

.spec-list li {
  position: relative;
  padding-left: 1.6rem;
  margin: 0;
  font-size: 0.94rem;
  color: var(--muted);
}

.spec-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--blue);
}

.buy-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem;
  align-self: start;
}

.buy-option {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  font-size: 0.94rem;
}

.buy-option:last-of-type {
  border-bottom: 0;
}

.buy-option input {
  margin-top: 0.35rem;
  accent-color: var(--blue);
  flex-shrink: 0;
}

.buy-option .price {
  display: block;
  font-weight: 700;
  color: var(--text);
}

/* -------------------------------- events --------------------------------- */
.format {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.2rem, 3vw, 2rem);
  scroll-margin-top: 100px;
}

.format__price {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.02em;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  table-layout: fixed;
}

/* длинные реквизиты (счета, перечни ОКВЭД) переносятся, а не распирают строку */
.table td,
.table th {
  overflow-wrap: anywhere;
}

.table th,
.table td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-weight: 600;
  width: 45%;
}

.table td {
  font-weight: 600;
}

.table tr:last-child th,
.table tr:last-child td {
  border-bottom: 0;
}

.table--total td,
.table--total th {
  border-top: 2px solid var(--ink);
  font-weight: 800;
  color: var(--text);
}

/* калькулятор */
.calc {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.pack-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.pack {
  position: relative;
  display: block;
  padding: 1.1rem 1.2rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  transition: 0.2s var(--ease);
}

.pack:hover {
  border-color: #b9cdf3;
}

.pack input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pack:has(input:checked) {
  border-color: var(--blue);
  box-shadow: 0 10px 26px rgba(44, 107, 245, 0.16);
}

.pack__name {
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.pack__price {
  color: var(--blue);
  font-weight: 800;
  font-size: 1.15rem;
}

.pack__desc {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.stepper:last-of-type {
  border-bottom: 0;
}

.stepper__label {
  font-weight: 600;
  font-size: 0.95rem;
}

.stepper__hint {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 400;
}

.stepper__ctl {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.stepper button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--white);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  line-height: 1;
}

.stepper button:hover:not(:disabled) {
  border-color: var(--blue);
  color: var(--blue);
}

.stepper button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.stepper output {
  min-width: 2ch;
  text-align: center;
  font-weight: 700;
}

.total {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 1.6rem;
}

.total__rows {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
  font-size: 0.94rem;
  color: rgba(255, 255, 255, 0.75);
}

.total__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.total__sum {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.total__sum span:first-child {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}

/* --------------------------------- forms --------------------------------- */
.field {
  display: block;
  margin-bottom: 1rem;
}

.field span {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  font: inherit;
  font-size: 0.98rem;
  color: var(--text);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(44, 107, 245, 0.15);
}

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

.consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.6rem 0 1rem;
}

.consent input {
  margin-top: 0.25rem;
  accent-color: var(--blue);
  flex-shrink: 0;
}

.hp {
  position: absolute;
  left: -9999px;
}

.form-note {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.8rem;
}

/* -------------------------------- contacts ------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 1.5rem;
}

.contact-item {
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
  margin-bottom: 0.9rem;
}

.contact-item b {
  display: block;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.4rem;
}

.map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 380px;
  background: var(--paper);
}

.map iframe {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border: 0;
}

/* --------------------------------- footer -------------------------------- */
.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  padding: clamp(2.5rem, 6vw, 4rem) 0 2rem;
  font-size: 0.94rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.72);
}

.footer a:hover {
  color: #fff;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer__logo img {
  height: 30px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 1rem;
}

.footer h4 {
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer__list {
  display: grid;
  gap: 0.5rem;
}

.footer__note {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* --------------------------------- misc ---------------------------------- */
.page-hero {
  background: var(--ink);
  color: #fff;
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.page-hero h1 {
  max-width: 20ch;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 65ch;
  font-size: 1.08rem;
}

.notice {
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  background: #fff8e6;
  border: 1px solid #f2dfae;
  color: #6b5312;
  font-size: 0.92rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blue);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 200;
}

.skip-link:focus {
  left: 0;
  color: #fff;
}

/* ------------------------------ адаптивность ----------------------------- */
@media (max-width: 1100px) {
  .switcher__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .nav-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background: var(--ink);
    padding: 1rem 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.85rem 1rem;
    font-size: 1rem;
  }

  .sk-badge {
    margin: 0.5rem 0 0;
    padding: 0.5rem 0 0;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .direction-card,
  .about,
  .product,
  .format,
  .calc,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .direction-shell {
    margin-top: -40px;
  }

  .total {
    position: static;
  }

  .hero__copy {
    min-height: 0;
  }

  .hero {
    min-height: 0;
    padding-bottom: 1rem;
  }

  .product,
  .format {
    gap: 1.2rem;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  /* Экран больше не растягивается на всю высоту: на телефоне контент
     выше вьюпорта, и жёсткие 100svh обрезали переключатель. */
  .hero {
    min-height: 0;
    padding-bottom: 0.5rem;
  }

  .hero__h1 {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }

  /* Переключатель направлений — горизонтальная лента вместо 4 рядов */
  .switcher {
    padding-top: 1.5rem;
    margin-inline: calc(50% - 50vw);
    padding-inline: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  .switcher__grid {
    display: flex;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .chip {
    flex: 0 0 8.5rem;
    scroll-snap-align: start;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 0.85rem 0.6rem;
  }

  .chip img {
    width: 32px;
    height: 32px;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .pack-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer__grid,
  .footer__note {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Таблицы реквизитов и характеристик — в столбик, иначе колонки сжимаются */
  .table th,
  .table td {
    display: block;
    width: auto;
    padding: 0.35rem 0;
    border-bottom: 0;
  }

  .table th {
    padding-top: 0.8rem;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .table tr {
    display: block;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.6rem;
  }

  .table tr:last-child {
    border-bottom: 0;
  }

  .btn {
    width: 100%;
  }

  .btn-row {
    flex-direction: column;
  }

  .total__sum {
    font-size: 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .site-header,
  .footer,
  .hero__bg,
  .nav-toggle {
    display: none !important;
  }

  body {
    padding-top: 0;
    background: #fff;
  }
}
