/* ============================================================
   Mr.Dобряк — дизайн-система «Мастерская»
   Светлая тёплая база, графит, латунный акцент.
   ============================================================ */

:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --surface-sunken: #f3f1ec;
  --surface-ink: #1a1815;

  --ink: #1a1815;
  --ink-2: #55504a;
  /* ink-3 и accent подобраны под контраст 4.5:1 для мелкого текста на всех светлых фонах */
  --ink-3: #6f695f;
  --ink-on-dark: #faf9f7;
  --ink-on-dark-2: #a8a299;

  /* Латунь — акцент, используется скупо */
  --accent: #9a651e;
  --accent-ink: #7a4e14;
  --accent-soft: #f5ead7;

  --danger: #9b2c1f;

  --line: #e7e2d9;
  --line-strong: #d5cec2;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(26, 24, 21, 0.04), 0 2px 8px rgba(26, 24, 21, 0.04);
  --shadow-md: 0 2px 4px rgba(26, 24, 21, 0.04), 0 8px 24px rgba(26, 24, 21, 0.06);
  --shadow-lg: 0 4px 8px rgba(26, 24, 21, 0.04), 0 24px 56px rgba(26, 24, 21, 0.1);

  --gutter: 20px;
  --max: 1280px;
  --section-y: clamp(56px, 8vw, 112px);
  --header-h: 68px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  /* Системная гарнитура Apple: на iPhone и Mac это San Francisco, на остальных — Inter,
     ближайший к ней по рисунку. Имя Mr.Dобряк остаётся на Onest. */
  --font-brand: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, 'Segoe UI', Roboto, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, 'Segoe UI', Roboto, sans-serif;
  /* Мелкие подписи капсом: та же гарнитура, без моноширинного — как в интерфейсах Apple */
  --font-mono: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, 'Segoe UI', Roboto, sans-serif;
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

figure { margin: 0; }

/* Авторские display перебивают браузерное правило для [hidden] — возвращаем ему силу. */
[hidden] { display: none !important; }

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

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

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

/* ---------- Типографика ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

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

.h2 { font-size: clamp(1.9rem, 4.2vw, 3.25rem); }

.h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.lede {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 56ch;
}

/* ---------- Раскладка ---------- */

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

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

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

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: clamp(20px, 3vw, 32px);
}

.page-head {
  padding-top: calc(var(--header-h) + clamp(32px, 6vw, 72px));
  padding-bottom: clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.text-link {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: border-color 0.3s var(--ease-soft);
}

@media (hover: hover) {
  .text-link:hover { border-color: var(--accent); }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.4s var(--ease), background 0.3s var(--ease-soft),
    box-shadow 0.4s var(--ease), border-color 0.3s var(--ease-soft), opacity 0.3s;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; cursor: progress; }

.btn-primary {
  background: var(--surface-ink);
  color: var(--ink-on-dark);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: transparent;
}

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

.btn .arrow {
  transition: transform 0.45s var(--ease);
  display: inline-block;
}

@media (hover: hover) {
  .btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
  .btn-ghost:hover { border-color: var(--ink); background: rgba(26, 24, 21, 0.03); }
  .btn-accent:hover { background: var(--accent-ink); transform: translateY(-2px); }
  .btn:hover .arrow { transform: translateX(4px); }
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  font-size: 1.125rem;
  line-height: 1;
  background: var(--surface);
}

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

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.5s var(--ease-soft), border-color 0.5s var(--ease-soft);
}

.header.is-stuck {
  background: rgba(250, 249, 247, 0.84);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom-color: var(--line);
}

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

.brand {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 1.1875rem;
  letter-spacing: -0.04em;
  flex: none;
}

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: none;
}

/* Город и метро в шапке: видно всегда, но тихо, чтобы не спорило с именем */
.brand-place {
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

.brand em {
  font-style: normal;
  color: var(--accent);
}

.header-nav {
  display: none;
  gap: 26px;
  margin-inline: auto;
}

.header-nav a {
  font-size: 0.9375rem;
  color: var(--ink-2);
  position: relative;
  padding-block: 4px;
  white-space: nowrap;
  transition: color 0.3s var(--ease-soft);
}

.header-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}

.header-nav a[aria-current='page'] { color: var(--ink); }
.header-nav a[aria-current='page']::after { transform: scaleX(1); }

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* Телефон в шапке прячем там, где рядом не помещается пять пунктов меню */
.header-phone {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

@media (min-width: 640px) and (max-width: 1179px) {
  .header-phone { display: block; }
}

@media (min-width: 1180px) {
  .header-nav { display: flex; }
  .header-actions { margin-left: 0; }
  .burger { display: none; }
}

@media (min-width: 1380px) {
  .header-phone { display: block; }
}

.header .btn { padding: 11px 20px; font-size: 0.875rem; }

@media (max-width: 400px) {
  .header .btn { padding-inline: 16px; }
}

/* ---------- Бургер и мобильное меню ---------- */

.burger {
  width: 42px;
  height: 42px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  flex: none;
}

.burger span {
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.45s var(--ease);
}

.burger[aria-expanded='true'] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.burger[aria-expanded='true'] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  display: flex;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.45s var(--ease-soft);
}

.menu.is-open { opacity: 1; }

.menu-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-top: calc(var(--header-h) + 12px);
}

.menu-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 6.5vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  transition-delay: var(--i, 0ms);
}

.menu.is-open .menu-link { opacity: 1; transform: none; }
.menu-link[aria-current='page'] { color: var(--accent-ink); }

.menu-link span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-ink);
  letter-spacing: 0.08em;
}

.menu-foot {
  margin-top: auto;
  padding-block: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.menu-phone {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 500;
}

.menu-address {
  font-size: 0.875rem;
  color: var(--ink-3);
  line-height: 1.5;
}

body.menu-open { overflow: hidden; }

/* ---------- Главная: имя и три входа ---------- */

.home-hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(28px, 6vw, 72px));
  padding-bottom: clamp(24px, 4vw, 40px);
  text-align: center;
  overflow: hidden;
}

/* Тёплое пятно света за именем — тот же свет из окна, что на фото мастерской */
.home-hero::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -40%;
  width: min(900px, 120vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(168, 111, 34, 0.12), transparent 62%);
  pointer-events: none;
}

.home-hero > * { position: relative; }

.home-title {
  font-family: var(--font-brand);
  margin-top: 10px;
  font-size: clamp(3.25rem, 12vw, 7.5rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.home-title em {
  font-style: normal;
  color: var(--accent);
}

.home-sub {
  margin: 14px auto 0;
  max-width: 40ch;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--ink-2);
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: clamp(28px, 5vw, 48px);
  text-align: left;
}

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

.action {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.3s;
}

.action-primary {
  background: var(--surface-ink);
  border-color: var(--surface-ink);
  color: var(--ink-on-dark);
}

.action-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.action-note {
  display: block;
  margin-top: 3px;
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.action-primary .action-note { color: var(--ink-on-dark-2); }

.action-arrow {
  margin-left: auto;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  transition: transform 0.5s var(--ease), background 0.3s;
}

.action-primary .action-arrow { border-color: rgba(250, 249, 247, 0.28); }

@media (min-width: 760px) {
  .action {
    flex-direction: column;
    align-items: flex-start;
    min-height: 176px;
    padding: 24px;
  }
  .action-arrow { margin-left: 0; margin-top: auto; }
}

@media (hover: hover) {
  .action:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
  .action:hover .action-arrow { transform: translateX(4px); }
}

/* ---------- Рекламная карусель ---------- */

.promo { padding-block: 0 clamp(40px, 6vw, 72px); }

.carousel { position: relative; }

.carousel-track {
  position: relative;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border-radius: var(--r-xl);
  background: var(--surface-sunken);
  box-shadow: var(--shadow-md);
}

.carousel-track::-webkit-scrollbar { display: none; }

.carousel-slide {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

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

/* Подпись нужна только временным кадрам; на готовых баннерах текст уже в картинке */
.carousel-caption {
  position: absolute;
  inset: auto 0 0;
  padding: clamp(40px, 8vw, 96px) clamp(16px, 3vw, 36px) clamp(16px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #fff;
  background: linear-gradient(to top, rgba(26, 24, 21, 0.62), transparent);
}

.carousel-kicker {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
}

.carousel-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.0625rem, 3vw, 2.25rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 24ch;
}

.carousel-text {
  font-size: clamp(0.75rem, 1.5vw, 1rem);
  line-height: 1.4;
  max-width: 46ch;
  opacity: 0.9;
}

.carousel-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.carousel-dots {
  display: flex;
  gap: 2px;
}

/* Сама точка маленькая, но зона касания — 24 px */
.carousel-dot {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.carousel-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--line-strong);
  transition: width 0.45s var(--ease), background 0.3s var(--ease-soft);
}

.carousel-dot[aria-current='true'] { width: 40px; }
.carousel-dot[aria-current='true']::after { width: 28px; background: var(--ink); }

.carousel-arrow { display: none; }

@media (hover: hover) and (min-width: 768px) {
  .carousel-arrow { display: grid; }
}

/* ---------- Витрина «Сейчас в наличии» ---------- */

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

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

.featured-card {
  display: flex;
  flex-direction: column;
  min-height: 150px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.3s;
}

/* Фото в карточке витрины: та же квадратная плашка, что и в каталоге */
.featured-media {
  position: relative;
  aspect-ratio: 1;
  margin: -16px -16px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  border-radius: var(--r-md) var(--r-md) 0 0;
  overflow: hidden;
}

.featured-media img {
  padding: 10px;
  transition: transform 0.6s var(--ease);
}

@media (hover: hover) {
  .featured-card:hover .featured-media img { transform: scale(1.04); }
}

.featured-name {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9375rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.featured-price {
  margin-top: auto;
  padding-top: 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1875rem;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) {
  .featured-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
}

/* ---------- Ремонт и сервис ---------- */

.band {
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* height: auto обязателен — иначе атрибут height у <img> задаёт высоту
   явно, обе стороны становятся определёнными и aspect-ratio не работает. */
.band img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

@media (min-width: 768px) {
  .band img { aspect-ratio: 21 / 9; }
}

.service-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.service-card h3 {
  font-size: 1.1875rem;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.service-card p {
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.service-card-more {
  background: var(--surface-ink);
  border-color: var(--surface-ink);
  color: var(--ink-on-dark);
}

.service-card-more p { color: var(--ink-on-dark-2); }
.service-card-more .btn-row { margin-top: auto; padding-top: 10px; }
.service-card-more .btn-ghost { color: var(--ink-on-dark); border-color: rgba(250, 249, 247, 0.3); }

/* ---------- Выездной ремонт ---------- */

.ways {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.way {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 26px 28px;
}

.way-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 5px 11px;
  border-radius: var(--r-pill);
  margin-bottom: 16px;
}

.way h3 { margin-bottom: 10px; }

.way p {
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Шаги лежат колодой внахлёст и разъезжаются: на компьютере — при наведении,
   на телефоне — когда блок доезжает до экрана или по касанию */
.steps {
  counter-reset: step;
  display: flex;
  flex-direction: column;
  perspective: 1200px;
}

.step {
  counter-increment: step;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 22px 24px;
  box-shadow: 0 18px 40px -30px rgba(26, 24, 21, 0.65);
  transition: margin 0.6s var(--ease), transform 0.6s var(--ease), box-shadow 0.4s var(--ease-soft);
}

/* Номера здесь по делу: шаги идут строго по порядку */
.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--accent-ink);
  letter-spacing: 0.1em;
}

.step-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.025em;
  margin-bottom: 6px;
}

.step-text {
  font-size: 0.875rem;
  color: var(--ink-2);
  line-height: 1.55;
}

/* Колода: каждая следующая карточка ложится поверх предыдущей */
.step:nth-child(1) { z-index: 1; transform: rotate(-1.1deg); }
.step:nth-child(2) { z-index: 2; transform: rotate(0.9deg); }
.step:nth-child(3) { z-index: 3; transform: rotate(-0.7deg); }
.step:nth-child(4) { z-index: 4; transform: rotate(1deg); }

.step + .step { margin-top: -58px; }

.steps.is-open .step { transform: none; }
.steps.is-open .step + .step { margin-top: 12px; }

@media (min-width: 760px) {
  .steps { flex-direction: row; align-items: stretch; }
  .step { flex: 1 1 0; min-width: 0; }
  .step + .step { margin-top: 0; margin-left: -16%; }
  .steps.is-open .step + .step { margin-top: 0; margin-left: 14px; }

  /* Там, где есть курсор, колода раскрывается сама под мышкой */
  @media (hover: hover) {
    .steps:hover .step { transform: none; }
    .steps:hover .step + .step { margin-left: 14px; }
    .steps:hover .step:hover { box-shadow: 0 26px 50px -30px rgba(26, 24, 21, 0.75); }
  }
}

/* Кому анимация мешает — карточки сразу разложены */
@media (prefers-reduced-motion: reduce) {
  .step { transition: none; transform: none; }
  .step + .step { margin-top: 12px; }
  @media (min-width: 760px) {
    .step + .step { margin-top: 0; margin-left: 14px; }
  }
}

.stack { display: grid; gap: clamp(28px, 4vw, 48px); }

/* ---------- Форма заявки ---------- */

.request {
  display: grid;
  gap: clamp(24px, 4vw, 56px);
}

@media (min-width: 1024px) {
  .request { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); align-items: start; }
}

.form,
.form-success {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(22px, 4vw, 40px);
}

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

.form-row { display: grid; gap: 16px; }

@media (min-width: 560px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
}

/* 16 px в полях — иначе iPhone приближает страницу при фокусе */
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  transition: border-color 0.3s var(--ease-soft), box-shadow 0.3s var(--ease-soft), background 0.3s;
}

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

.field select {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2355504a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background-color: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168, 111, 34, 0.14);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--ink-2);
  line-height: 1.45;
}

.consent input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--accent);
}

.form-fine {
  font-size: 0.75rem;
  color: var(--ink-3);
  line-height: 1.5;
}

.form-status { font-size: 0.875rem; line-height: 1.5; }
.form-status.is-error { color: var(--danger); }

.form .btn { width: 100%; padding-block: 17px; }

.form-success {
  display: grid;
  gap: 12px;
}

.form-success:focus { outline: none; }

.hp { display: none; }

/* ---------- Контакты и подвал ---------- */

.contacts-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.contact {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 24px;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}

.contact-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.025em;
  line-height: 1.4;
}

.contact-note {
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--ink-2);
  line-height: 1.5;
}

/* Кнопки мессенджеров живут в той же карточке, что и номер */
.contact-actions {
  margin-top: 16px;
  flex-wrap: wrap;
}

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

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}

.footer-note {
  font-size: 0.8125rem;
  color: var(--ink-3);
  margin-left: auto;
  line-height: 1.5;
}

.footer-note a {
  color: var(--accent-ink);
  border-bottom: 1px solid currentColor;
}

/* ---------- Каталог ---------- */

.filters {
  position: sticky;
  top: var(--header-h);
  z-index: 60;
  background: rgba(250, 249, 247, 0.92);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
  padding-block: 14px;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
}

.search input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 13px 44px 13px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.3s var(--ease-soft), box-shadow 0.3s var(--ease-soft);
}

.search input::placeholder { color: var(--ink-3); }

.search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168, 111, 34, 0.12);
}

.search-clear {
  position: absolute;
  right: 6px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font-size: 1.0625rem;
  line-height: 1;
}

.chips {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

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

@media (min-width: 768px) {
  .chips { flex-wrap: wrap; overflow: visible; }
}

.chip {
  flex: none;
  padding: 8px 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 0.8125rem;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background 0.3s var(--ease-soft), color 0.3s var(--ease-soft),
    border-color 0.3s var(--ease-soft);
}

.chip[aria-pressed='true'] {
  background: var(--surface-ink);
  border-color: var(--surface-ink);
  color: var(--ink-on-dark);
}

.chip span {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  opacity: 0.6;
  margin-left: 5px;
}

/* Подгруппы визуально подчинены основным кнопкам */
.chips-sub {
  margin-top: 8px;
  padding-left: 14px;
  border-left: 2px solid var(--accent);
}

.chips-sub .chip {
  border-style: dashed;
  font-size: 0.78125rem;
  padding-block: 7px;
}

.chips-sub .chip[aria-pressed='true'] {
  border-style: solid;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.result-line {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-block: 22px 18px;
}

.product-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 262px), 1fr));
  padding-bottom: clamp(56px, 8vw, 96px);
}

.product {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.4s var(--ease-soft), box-shadow 0.5s var(--ease), transform 0.5s var(--ease);
}

/* Латунная полоса при наведении — единственный цветной акцент карточки */
.product::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--ease);
}

@media (hover: hover) {
  .product:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
  .product:hover::before { transform: scaleX(1); }
  .product:hover .product-media img { transform: scale(1.04); }
}

.product-media {
  position: relative;
  aspect-ratio: 1;
  margin: -20px -20px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

/* Снимок позиционируется абсолютно: свои пропорции у него какие угодно, и
   без этого высокий кадр растягивал бы плашку, а с ней и всю карточку. */
.product-media img,
.featured-media img,
.sheet-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-media img {
  padding: 12px;
  transition: transform 0.6s var(--ease);
}

/* Товар без снимка получает такую же плашку со знаком мастерской —
   иначе в ряду часть карточек с фото, часть без, и сетка «рвётся». */
.product-media.is-blank,
.featured-media.is-blank,
.sheet-media.is-blank {
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, #fdfdfc 0%, var(--surface-sunken) 100%);
}

.media-icon {
  width: 38%;
  max-width: 88px;
  height: auto;
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Сколько ещё цветов и объёмов у этой модели */
.product-variants {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  margin: -8px 0 14px;
}

.product-cat {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}

.product-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9375rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}

.product-price {
  margin-top: auto;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.375rem;
  letter-spacing: -0.035em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.product-wholesale {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--ink-3);
  margin-top: 5px;
}

.product-actions {
  display: flex;
  gap: 7px;
  margin-top: 16px;
}

.product-actions .btn {
  padding: 11px 16px;
  font-size: 0.8125rem;
  flex: 1;
}

.product-actions .btn-ghost { flex: none; padding-inline: 13px; }

.load-more {
  display: flex;
  justify-content: center;
  padding-bottom: clamp(56px, 8vw, 96px);
}

.empty {
  padding: 60px 0 100px;
  text-align: center;
  color: var(--ink-3);
}

/* ---------- Окно товара ---------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 16px;
}

.sheet-scrim {
  position: absolute;
  inset: 0;
  background: rgba(26, 24, 21, 0.4);
  opacity: 0;
  transition: opacity 0.4s var(--ease-soft);
}

.sheet-panel {
  position: relative;
  width: min(900px, 100%);
  /* Выше прежнего: под названием и ценой теперь ещё и выбор цвета, памяти и SIM */
  max-height: min(860px, 92vh);
  overflow-y: auto;
  background: var(--bg);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.4s var(--ease-soft);
}

.sheet.is-open .sheet-scrim { opacity: 1; }
.sheet.is-open .sheet-panel { transform: none; opacity: 1; }

.sheet-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.sheet-grid { display: grid; }

@media (min-width: 720px) {
  /* minmax(0, …), а не 1fr: у снимка есть свои пропорции, и без явного нуля
     колонка растягивается под них и выдавливает вторую половину окна. */
  .sheet-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* На телефоне квадратный снимок занял бы почти весь экран, и до выбора цвета
   пришлось бы долго листать — на узких экранах плашка ниже. */
.sheet-media {
  position: relative;
  height: min(42vh, 330px);
  min-width: 0;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 720px) {
  .sheet-media { height: auto; aspect-ratio: 1; }
}

@media (min-width: 720px) {
  /* align-self, иначе колонка со снимком тянется под высоту описания и квадрат
     превращается в полосу, у которой не видно низа. */
  .sheet-media { border-bottom: 0; border-right: 1px solid var(--line); align-self: start; }
}

.sheet-media img { padding: 24px; }

/* Если фотографии нет ни у одной вариации — окно узкое, в одну колонку:
   пустая плашка во всю половину выглядела бы недоделкой. */
.sheet-panel.no-media { width: min(560px, 100%); }
.sheet-panel.no-media .sheet-grid { grid-template-columns: minmax(0, 1fr); }
.sheet-panel.no-media .sheet-media { display: none; }

/* Смена цвета или объёма: снимок, название и цена мягко проявляются заново,
   чтобы переключение читалось, но не дёргало страницу. */
@keyframes swap-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.is-changed { animation: swap-in 0.42s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  .is-changed { animation: none; }
}

/* ---------- Выбор вариации ---------- */

.sheet-options {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.option-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.option-title {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.option-value {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
}

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

.option-swatches { gap: 10px; }

.option-pill {
  min-width: 78px;
  padding: 10px 15px;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.32s var(--ease-soft), color 0.32s var(--ease-soft),
    border-color 0.32s var(--ease-soft), transform 0.32s var(--ease);
}

@media (hover: hover) {
  .option-pill:not([disabled]):not([aria-pressed='true']):hover {
    border-color: var(--ink-3);
    transform: translateY(-1px);
  }
}

.option-pill:active:not([disabled]) { transform: scale(0.97); }

.option-pill[aria-pressed='true'] {
  background: var(--surface-ink);
  border-color: var(--surface-ink);
  color: var(--ink-on-dark);
}

/* Сочетания нет в прайсе: кнопка гаснет и перечёркивается тонкой диагональю */
.option-pill[disabled],
.swatch[disabled] {
  cursor: not-allowed;
  opacity: 0.4;
}

.option-pill[disabled] {
  color: var(--ink-3);
  background: linear-gradient(
    to top left,
    transparent calc(50% - 0.5px), var(--line-strong) calc(50% - 0.5px),
    var(--line-strong) calc(50% + 0.5px), transparent calc(50% + 0.5px)
  );
}

.swatch {
  position: relative;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--swatch, var(--line-strong));
  box-shadow: inset 0 0 0 1px rgba(26, 24, 21, 0.14);
  cursor: pointer;
  transition: transform 0.32s var(--ease);
}

/* Обводка активного цвета — отдельным кольцом, чтобы не спорить с самим цветом */
.swatch::after {
  content: '';
  position: absolute;
  inset: -5px;
  border: 1.5px solid transparent;
  border-radius: 50%;
  transition: border-color 0.32s var(--ease-soft);
}

.swatch[aria-pressed='true']::after { border-color: var(--ink); }

@media (hover: hover) {
  .swatch:not([disabled]):not([aria-pressed='true']):hover { transform: scale(1.09); }
}

.swatch:active:not([disabled]) { transform: scale(0.94); }

/* Общая обводка фокуса скругляется по 4px — кружку и капсуле возвращаем их форму */
.swatch:focus-visible { border-radius: 50%; outline-offset: 6px; }
.option-pill:focus-visible { border-radius: 12px; }

.swatch[disabled]::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(
    to top left,
    transparent calc(50% - 0.5px), rgba(26, 24, 21, 0.5) calc(50% - 0.5px),
    rgba(26, 24, 21, 0.5) calc(50% + 0.5px), transparent calc(50% + 0.5px)
  );
}

.sheet-body {
  padding: 26px 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sheet-body > :first-child { padding-right: 44px; }

.sheet-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.375rem;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.sheet-price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.sheet-wholesale {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink-2);
  margin-top: 6px;
}

.specs {
  display: grid;
  gap: 1px;
  margin: 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
  background: var(--bg);
  font-size: 0.875rem;
}

.spec-row dt { color: var(--ink-3); }

.spec-row dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
}

.sheet-text {
  font-size: 0.9375rem;
  color: var(--ink-2);
  line-height: 1.6;
}

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.sheet-actions .btn { flex: 1 1 160px; }

.disclaimer {
  font-size: 0.75rem;
  color: var(--ink-3);
  line-height: 1.45;
}

/* ---------- Корзина ---------- */

.cart-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 20px;
  border-radius: var(--r-pill);
  background: var(--surface-ink);
  color: var(--ink-on-dark);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  transform: translateY(90px);
  opacity: 0;
  transition: transform 0.55s var(--ease), opacity 0.4s var(--ease-soft);
}

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

.cart-fab b {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  background: var(--accent);
  border-radius: var(--r-pill);
  padding: 2px 8px;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  justify-content: flex-end;
}

.drawer-scrim {
  position: absolute;
  inset: 0;
  background: rgba(26, 24, 21, 0.35);
  opacity: 0;
  transition: opacity 0.45s var(--ease-soft);
}

.drawer-panel {
  position: relative;
  width: min(430px, 100%);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.55s var(--ease);
}

.drawer.is-open .drawer-scrim { opacity: 1; }
.drawer.is-open .drawer-panel { transform: none; }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px;
}

.drawer-foot {
  padding: 20px 24px 26px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}

.cart-row:last-child { border-bottom: 0; }

.cart-row-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.35;
}

.cart-row-price {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink-2);
  margin-top: 4px;
}

.qty {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 3px;
}

.qty button {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1;
  transition: background 0.25s var(--ease-soft);
}

@media (hover: hover) {
  .qty button:hover { background: var(--surface-sunken); }
}

.qty output {
  min-width: 22px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.cart-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.cart-total-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.035em;
}

/* ---------- Текстовые страницы и 404 ---------- */

.prose {
  max-width: 72ch;
  padding-bottom: var(--section-y);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.prose h2 {
  margin-top: 18px;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.prose p,
.prose li {
  color: var(--ink-2);
  line-height: 1.65;
}

.prose ul {
  margin: 0;
  padding-left: 1.2em;
  display: grid;
  gap: 6px;
}

.prose a,
.consent a {
  color: var(--accent-ink);
  border-bottom: 1px solid currentColor;
}

.notfound {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  padding-block: 48px;
}

.notfound .brand { margin-bottom: 20px; }

/* Кнопка заказа при пустой корзине */
.btn[aria-disabled='true'] {
  opacity: 0.45;
  pointer-events: none;
}

/* ---------- Появление при скролле ---------- */

/* Контент виден всегда. Появление — анимация поверх видимого состояния,
   а не условие видимости: не отработал скрипт — страница просто без анимации. */
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

.js .reveal.is-in {
  animation: reveal 0.9s var(--ease) backwards;
  animation-delay: var(--delay, 0ms);
}

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

/* ---------- Уведомление о cookie ---------- */

.cookie-notice {
  position: fixed;
  z-index: 95;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  max-width: 460px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 60px -34px rgba(26, 24, 21, 0.8);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease-soft), transform 0.5s var(--ease);
}

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

.cookie-text {
  flex: 1 1 220px;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.cookie-accept { flex: none; }

@media (prefers-reduced-motion: reduce) {
  .cookie-notice { transition: none; transform: none; }
}
