/* ==========================================================================
   СТИЛИ ПРОЕКТА «АВТОМАЛЯР АЛЕКСЕЙ» (ПО СТАНДАРТУ VERSTORIA-SG v2.6)
   Методология: БЭМ, адаптивность, центрированные заголовки и чистая сетка
   ========================================================================== */

/* ЛОКАЛЬНЫЕ ШРИФТЫ: кириллица и латиница из Geist Variable */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/geist/cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/geist/cyrillic.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/geist/latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/geist/latin.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --bg-main: #0d0f12;
  --bg-alt: #14181e;
  --bg-card: #1b2028;
  --bg-card-hover: #222934;
  --text-main: #f3f5f8;
  --text-muted: #9aa4b2;
  --accent: #ff5e1a;
  --accent-hover: #ff7438;
  --color-on-accent: #08090b;
  --accent-glow: rgba(255, 94, 26, 0.25);
  --border-color: rgba(255, 255, 255, 0.08);
  --radius-md: 14px;
  --radius-lg: 20px;
  --container-width: 1240px;
  --font-base: 'Geist', 'Segoe UI', Arial, sans-serif;
  --font-display: 'Geist', 'Segoe UI', Arial, sans-serif;
  --transition: 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

.page__top-anchor {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
}

.page {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

section[id] { scroll-margin-top: 96px; }

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

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

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

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

/* ==================== КНОПКИ ==================== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--transition), background-color var(--transition), box-shadow var(--transition);
}

.button--primary {
  background: linear-gradient(135deg, var(--accent) 0%, #e04400 100%);
  color: var(--color-on-accent);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.button--primary:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255, 94, 26, 0.4);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: var(--border-color);
}

.button--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.button--large {
  padding: 16px 32px;
  font-size: 16px;
}

.button--full {
  width: 100%;
}

/* ==================== ШАПКА (HEADER) ==================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 15, 18, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 16px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header__logo-badge {
  background: var(--accent);
  color: var(--color-on-accent);
  font-family: var(--font-display);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  letter-spacing: 0.05em;
}

.header__logo-text {
  display: flex;
  flex-direction: column;
}

.header__logo-title {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.03em;
}

.header__logo-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav__link {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav__link:hover {
  color: var(--accent);
}

.nav__link:focus-visible,
.header__burger:focus-visible,
.header__phone:focus-visible,
.contacts__phone:focus-visible,
.button:focus-visible,
.messenger-btn:focus-visible,
.portfolio__filter-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header__phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.header__burger {
  display: none;
  width: 44px;
  height: 44px;
  place-content: center;
  gap: 5px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  padding: 0;
  transition: border-color var(--transition), background-color var(--transition);
}

.header__burger:hover,
.header__burger[aria-expanded="true"] { border-color: rgba(255, 94, 26, 0.5); background: rgba(255, 94, 26, 0.08); }

.header__burger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-main);
  transition: var(--transition);
}

.header__burger[aria-expanded="true"] .header__burger-line:first-child { transform: translateY(7px) rotate(45deg); }
.header__burger[aria-expanded="true"] .header__burger-line:nth-child(2) { opacity: 0; }
.header__burger[aria-expanded="true"] .header__burger-line:last-child { transform: translateY(-7px) rotate(-45deg); }
.nav__item--mobile-cta { display: none; }

/* ==================== СЕКЦИИ И ЦЕНТРИРОВАННЫЕ ЗАГОЛОВКИ ==================== */
.section {
  padding: 96px 0;
}

.section[id] {
  scroll-margin-top: 96px;
}

.section--alt {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section__header--centered {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section__eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 40px);
  line-height: 1.2;
  margin-bottom: 16px;
  font-weight: 400;
}

.section__subtitle {
  color: var(--text-muted);
  font-size: 17px;
}

/* ==================== ПЕРВЫЙ ЭКРАН (HERO) ==================== */
.hero {
  position: relative;
  padding: 56px 0 72px;
  overflow: hidden;
}

.hero__bg-glow {
  position: absolute;
  top: -120px;
  right: 10%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(255, 94, 26, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: stretch;
}

.hero__content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(255, 94, 26, 0.12);
  border: 1px solid rgba(255, 94, 26, 0.3);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  color: #ff9d73;
  margin-bottom: 20px;
  align-self: flex-start;
  max-width: 100%;
}

.hero__tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.15;
  margin-bottom: 22px;
  font-weight: 400;
}

.hero__lead {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 580px;
}

.hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 0;
}

.hero__buttons .button {
  min-width: 203px;
}

.service-ticker {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--border-color);
  background: rgba(20, 24, 30, 0.62);
  isolation: isolate;
}

.service-ticker::before,
.service-ticker::after {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  width: min(10vw, 120px);
  content: "";
  pointer-events: none;
}

.service-ticker::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-main), transparent);
}

.service-ticker::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg-main), transparent);
}

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

.service-ticker__track,
.service-ticker__group {
  display: flex;
  width: max-content;
  align-items: center;
}

.service-ticker__track {
  animation: service-ticker-scroll 34s linear infinite;
  will-change: transform;
}

.service-ticker__group {
  flex: 0 0 auto;
  gap: clamp(20px, 3vw, 42px);
  padding: 17px clamp(20px, 3vw, 42px);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.service-ticker__group i {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(255, 94, 26, 0.45);
}

@keyframes service-ticker-scroll {
  to { transform: translateX(-50%); }
}

/* Фото первого экрана */
.hero__visual {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: auto;
  border: 1px solid var(--border-color);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

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

/* ==================== О МАСТЕРЕ (ABOUT) ==================== */
.about__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: stretch;
}

.about__story {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.about__photo-card { min-width: 0; min-height: 0; }

.about__photo-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1.55;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.about__photo {
  width: 100%;
  height: 100%;
  aspect-ratio: 1.55;
  object-fit: cover;
  object-position: 50% 50%;
}

.about__greeting {
  font-size: 22px;
  line-height: 1.4;
  margin-bottom: 20px;
  color: var(--text-main);
}

.about__paragraph {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.about__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.about__actions .button {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

.about__arsenal {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.about__tool {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 13px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.about__tool-title {
  display: block;
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 11px;
}

.about__tool-val {
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.about__tool:last-child .about__tool-val { white-space: nowrap; }

/* ==================== ПРЕИМУЩЕСТВА (ADVANTAGES) ==================== */
.advantages__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.adv-card {
  background: var(--bg-card);
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: transform var(--transition), border-color var(--transition);
}

.adv-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 94, 26, 0.45);
}

.adv-card__num {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--accent);
  margin-bottom: 16px;
  opacity: 0.9;
}

.adv-card__title {
  font-size: 19px;
  margin-bottom: 12px;
}

.adv-card__text {
  color: var(--text-muted);
  font-size: 15px;
}

/* ==================== ПОРТФОЛИО (PORTFOLIO) ==================== */
.portfolio__filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.portfolio__filter-btn {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.portfolio__filter-btn:hover,
.portfolio__filter-btn--active {
  background: var(--accent);
  color: var(--color-on-accent);
  border-color: var(--accent);
}

@media (max-width: 767px) {
  .portfolio__filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .portfolio__filter-btn {
    width: 100%;
    min-width: 0;
    padding: 10px 4px;
    font-size: clamp(10px, 3.4vw, 13px);
    white-space: nowrap;
  }
}

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

.work-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}

.work-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.work-card--hidden {
  display: none;
}

.work-card__img-wrap {
  position: relative;
  overflow: hidden;
}

.work-card__comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  background: var(--bg-main);
}

.work-card__state {
  position: relative;
  min-width: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.work-card__state figcaption {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(13, 15, 18, 0.82);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.work-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.work-card:hover .work-card__img {
  transform: scale(1.06);
}

.work-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.work-card__title {
  font-size: 18px;
  margin-bottom: 10px;
}

/* ==================== ЦЕНЫ И КАЛЬКУЛЯТОР (PRICES) ==================== */
.prices__layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: stretch;
}

.prices__table-card {
  display: flex;
  flex-direction: column;
}

.price-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
}

.prices__table-card,
.calc-card {
  min-width: 0;
  background: var(--bg-card);
  padding: 36px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.prices__card-title,
.calc-card__title {
  font-size: 22px;
  margin-bottom: 24px;
}

.price-list__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border-color);
  gap: 12px;
}

.price-list__name {
  font-weight: 500;
}

.price-list__dots {
  flex-grow: 1;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.15);
}

.price-list__cost {
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
}

.calc-card {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.calc-card__title { margin-bottom: 10px; }

.calc-card__desc {
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.calc-form {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.calc-form__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calc-form__summary {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.calc-form__add {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 94, 26, 0.38);
  border-radius: 11px;
  background: rgba(255, 94, 26, 0.1);
  color: #ff9d73;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition), opacity var(--transition);
}

.calc-form__add:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(255, 94, 26, 0.18);
}

.calc-form__add:disabled { cursor: not-allowed; opacity: 0.45; }

.calc-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 188px;
  max-height: 250px;
  flex: 1 1 220px;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  margin-top: 10px;
  padding: 4px 5px 4px 0;
  overscroll-behavior: contain;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  scrollbar-width: thin;
}

.calc-items--empty::before {
  content: 'Пока нет деталей. Нажмите «Добавить деталь», чтобы начать расчёт.';
  display: grid;
  grid-column: 1 / -1;
  align-self: stretch;
  min-height: 170px;
  place-items: center;
  padding: 22px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

/* Пустой список не должен перехватывать жест прокрутки страницы на телефоне. */
.calc-items--empty {
  overflow: visible;
  overscroll-behavior: auto;
}

.calc-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.calc-item__main { display: contents; }
.calc-item__info { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 8px; min-width: 0; }
.calc-item__title { color: var(--text-main); font-size: 12px; font-weight: 700; line-height: 1.3; }
.calc-item__price { color: var(--text-muted); font-size: 10px; line-height: 1.3; white-space: nowrap; }
.calc-item__controls { display: flex; grid-column: 2; grid-row: 2; justify-content: flex-end; align-items: center; gap: 3px; }

.calc-item__quantity,
.calc-item__remove {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-main);
  color: var(--text-main);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.calc-item__quantity:hover:not(:disabled),
.calc-item__remove:hover { border-color: var(--accent); color: var(--accent); }
.calc-item__quantity:disabled { cursor: not-allowed; opacity: 0.4; }
.calc-item__count { min-width: 16px; color: var(--text-main); font-size: 12px; font-weight: 700; text-align: center; }
.calc-item__remove { color: var(--text-muted); }

.calc-item__extras { grid-column: 1; grid-row: 2; align-self: center; margin: 0; }
.calc-item__extras summary { width: fit-content; color: var(--text-muted); font-size: 11px; cursor: pointer; }
.calc-item__extras-list { display: grid; gap: 5px; padding-top: 8px; }

.calc-form__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
  cursor: pointer;
}

.calc-form__checkbox input { flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--accent); }

.calc-form__result {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.calc-form__result-info { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.calc-form__result-copy { display: grid; gap: 3px; }
.calc-form__result-label { font-size: 13px; font-weight: 700; }
.calc-form__count-label { color: var(--text-muted); font-size: 11px; }
.calc-form__result-sum { color: var(--accent); font-family: var(--font-display); font-size: 25px; white-space: nowrap; }

.calc-form__note {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
}

.calc-dialog {
  position: fixed;
  inset: 0;
  height: fit-content;
  margin: auto;
  width: min(520px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  max-height: min(86dvh, 620px);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  scrollbar-width: thin;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: linear-gradient(155deg, #20242b 0%, var(--bg-card) 45%);
  color: var(--text-main);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
}

.calc-dialog::backdrop { background: rgba(5, 7, 10, 0.78); backdrop-filter: blur(8px); }
.calc-dialog__panel { display: grid; gap: 13px; padding: 22px; }
.calc-dialog__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.calc-dialog__header .section__eyebrow { display: block; margin-bottom: 6px; }
.calc-dialog__title { margin: 0; font-size: 21px; }
.calc-dialog__close { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid var(--border-color); border-radius: 50%; background: transparent; color: var(--text-main); font: inherit; font-size: 25px; cursor: pointer; }
.calc-dialog__field { display: grid; gap: 7px; color: var(--text-muted); font-size: 12px; font-weight: 700; }
.calc-dialog__native-select { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.calc-dialog__picker { position: relative; }
.calc-dialog__select,
.calc-dialog__quantity { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: 10px; background: var(--bg-main); color: var(--text-main); font: inherit; font-size: 14px; }
.calc-dialog__select { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; cursor: pointer; transition: border-color var(--transition), background-color var(--transition); }
.calc-dialog__select:hover,
.calc-dialog__picker--open .calc-dialog__select { border-color: var(--accent); background: #1b2027; }
.calc-dialog__select svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--accent); transition: transform var(--transition); }
.calc-dialog__picker--open .calc-dialog__select svg { transform: rotate(180deg); }
.calc-dialog__options { position: absolute; z-index: 5; top: calc(100% + 7px); right: 0; left: 0; display: grid; gap: 3px; max-height: min(185px, 28dvh); overflow-y: auto; padding: 6px; border: 1px solid var(--border-color); border-radius: 13px; background: #171a1f; box-shadow: 0 18px 38px rgba(0, 0, 0, 0.48); overscroll-behavior: contain; scrollbar-color: rgba(255, 255, 255, 0.22) transparent; scrollbar-width: thin; }
.calc-dialog__options[hidden] { display: none; }
.calc-dialog__option { min-height: 38px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text-main); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.calc-dialog__option:hover:not(:disabled),
.calc-dialog__option:focus-visible,
.calc-dialog__option[aria-selected="true"] { outline: none; background: rgba(255, 94, 26, 0.15); color: #ff9d73; }
.calc-dialog__option:disabled { color: var(--text-muted); opacity: 0.4; cursor: not-allowed; }
.calc-dialog__field--quantity { width: min(150px, 100%); }
.calc-dialog__availability { min-height: 18px; margin: -6px 0 0; color: var(--text-muted); font-size: 12px; line-height: 1.45; }
.calc-dialog__actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding-top: 4px; }
.calc-dialog__actions .button { min-height: 44px; padding: 10px 15px; font-size: 13px; }

/* ==================== ЭТАПЫ (PROCESS) ==================== */
.process__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.step-card {
  background: var(--bg-card);
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.step-card__badge {
  display: inline-block;
  background: rgba(255, 94, 26, 0.15);
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.step-card__title {
  font-size: 18px;
  margin-bottom: 10px;
}

.step-card__text {
  color: var(--text-muted);
  font-size: 14px;
}

/* ==================== КОНТАКТЫ И МЕССЕНДЖЕРЫ (CONTACTS) ==================== */
.contacts__grid {
  display: flex;
  justify-content: center;
}

.contacts__info-card {
  width: 100%;
  max-width: 780px;
  text-align: center;
  background: var(--bg-card);
  padding: 38px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.contacts__card-title {
  font-size: 22px;
  margin-bottom: 10px;
}

.contacts__card-sub {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 28px;
}

.messengers {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.messenger-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-height: 60px;
  padding: 9px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-color);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition);
}

.messenger-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent);
}

.messenger-btn__name {
  display: block;
  font-weight: 700;
  font-size: 15px;
}

.messenger-btn__icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  overflow: hidden;
  border: 0;
  border-radius: 11px;
  background: transparent;
  object-fit: contain;
}

.contacts__phone {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  margin: 18px auto 24px;
  color: var(--text-main);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: color var(--transition);
  padding: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.contacts__phone:hover { color: var(--accent); }
.contacts__phone-icon { width: 20px; height: 20px; object-fit: contain; }

.contacts__details {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

.contacts__detail-item {
  min-width: 0;
  margin-bottom: 0;
  text-align: center;
}

.contacts__detail-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.contacts__detail-val {
  font-weight: 600;
}

/* ==================== ПОДВАЛ (FOOTER) ==================== */
.footer {
  padding: 36px 0;
  border-top: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-muted);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__brand {
  display: grid;
  gap: 5px;
}

.footer__studio {
  width: fit-content;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer__studio:hover,
.footer__studio strong { color: var(--accent); }

.footer__demo { font-size: 12px; color: var(--text-muted); }

.footer__meta { display: flex; align-items: center; gap: 18px; }

.footer__up {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-main);
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition), background-color var(--transition);
}

.footer__up:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 94, 26, 0.1);
}

.footer__up svg { width: 20px; height: 20px; }

.footer__title {
  font-family: var(--font-display);
  color: var(--text-main);
  margin-right: 16px;
}

/* ==================== ДИАЛОГ ДЕМО-САЙТА ==================== */
/* ==================== ПРОСМОТР ФОТОГРАФИЙ ==================== */
.hero__photo,
.about__photo,
.work-card__comparison img { cursor: zoom-in; }

.photo-viewer {
  position: fixed;
  inset: 0;
  width: min(56vw, 680px);
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: #11151b;
  color: var(--text-main);
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.62);
}

.photo-viewer::backdrop { background: rgba(5, 7, 10, 0.82); backdrop-filter: blur(12px); }
.photo-viewer__panel { display: grid; grid-template-rows: auto auto auto; gap: 12px; padding: 16px 20px 14px; }
.photo-viewer__header, .photo-viewer__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.photo-viewer__caption { margin: 0; color: #e8ebef; font-size: 14px; }
.photo-viewer__close, .photo-viewer__nav, .photo-viewer__zoom-controls button {
  display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); background: rgba(28,33,40,.82); color: #fff; cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition), color var(--transition);
}
.photo-viewer__close:hover, .photo-viewer__nav:hover, .photo-viewer__zoom-controls button:hover { border-color: var(--accent); color: var(--accent); }
.photo-viewer__close { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; font-size: 30px; line-height: 1; }
.photo-viewer__stage { position: relative; display: grid; width: min(100%, calc(100dvh - 160px)); aspect-ratio: 1 / 1; min-height: 0; place-items: center; overflow: hidden; margin-inline: auto; touch-action: none; border-radius: 12px; background: #0d0f12; }
.photo-viewer__image { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; cursor: zoom-out; transform-origin: center; }
.photo-viewer__nav { position: absolute; z-index: 1; top: 50%; width: 48px; height: 58px; border-radius: 16px; font-size: 38px; line-height: 1; transform: translateY(-50%); }
.photo-viewer__nav--prev { left: 10px; }
.photo-viewer__nav--next { right: 10px; }
.photo-viewer__zoom-controls { display: flex; align-items: center; gap: 8px; }
.photo-viewer__zoom-controls button { min-width: 42px; height: 40px; padding: 0 10px; border-radius: 12px; font-size: 18px; }
.photo-viewer__zoom-controls [data-zoom="reset"] { min-width: 64px; font-size: 12px; }
.photo-viewer__counter { color: #f6f7f8; font-size: 13px; font-variant-numeric: tabular-nums; }
.photo-viewer__tip { color: var(--text-muted); font-size: 12px; }
.photo-viewer :focus-visible, .footer__up:focus-visible, .footer__studio:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ==================== АНИМАЦИЯ ПОЯВЛЕНИЯ ПРИ СКРОЛЛЕ ==================== */
.reveal {
  transition: opacity 0.65s ease, transform 0.65s ease;
}

html.reveal-enabled .reveal {
  opacity: 0;
  transform: translateY(28px);
}

html.reveal-enabled .reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== ДЕМО-ОКНО КОНТАКТОВ ==================== */
.demo-dialog {
  width: min(440px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: linear-gradient(155deg, #20242b 0%, var(--bg-card) 52%, #171a1f 100%);
  color: var(--text-main);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62), 0 0 42px rgba(255, 94, 26, 0.12);
}

.demo-dialog::backdrop {
  background: rgba(5, 7, 10, 0.8);
  backdrop-filter: blur(10px);
}

.demo-dialog__panel {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 16px;
  padding: 34px;
}

.demo-dialog__badge {
  padding: 6px 10px;
  border: 1px solid rgba(255, 94, 26, 0.3);
  border-radius: 999px;
  background: rgba(255, 94, 26, 0.1);
  color: var(--accent-hover);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.demo-dialog__title {
  max-width: 330px;
  padding-right: 16px;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: clamp(21px, 6vw, 28px);
  line-height: 1.2;
}

.demo-dialog__text {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
}

.demo-dialog__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.demo-dialog__close:hover { border-color: var(--accent); color: var(--accent-hover); }
.demo-dialog__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.demo-dialog__confirm { min-height: 46px; }

/* ==================== КЛАВИАТУРНЫЙ ПЕРЕХОД К СОДЕРЖИМОМУ ==================== */
.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  transform: translateY(calc(-100% - 20px));
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.skip-link:focus { transform: translateY(0); outline: 2px solid var(--accent); outline-offset: 3px; }

/* ==================== АДАПТИВНАЯ ВЁРСТКА ==================== */
@media (max-width: 1280px) and (min-width: 1101px) {
  .nav__list {
    gap: 12px;
  }

  .nav__link {
    font-size: 13px;
  }

  .header__inner {
    gap: 12px;
  }

  .header__logo-title {
    font-size: 15px;
  }

  .header__cta {
    padding-right: 14px;
    padding-left: 14px;
  }
}

@media (min-width: 1025px) and (max-height: 760px) {
  .hero { padding-top: 28px; }
}

@media (max-width: 1100px) {
  .header__nav,
  .header__actions {
    display: none;
  }

  .header__burger {
    display: grid;
  }

  .header__nav--open {
    display: block;
    position: absolute;
    z-index: 101;
    top: calc(100% + 8px);
    right: 12px;
    left: auto;
    width: min(420px, calc(100% - 24px));
    max-height: calc(100dvh - 96px);
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: linear-gradient(155deg, #20242b 0%, var(--bg-card) 48%);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.48);
    scrollbar-width: thin;
  }

  .header__nav--open .nav__list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 4px;
    margin: 0;
    padding: 0;
  }

  .header__nav--open .nav__link {
    display: flex;
    min-height: 44px;
    align-items: center;
    padding: 10px 13px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: var(--text-main);
    font-size: 14px;
    white-space: normal;
    transition: color var(--transition), background-color var(--transition), border-color var(--transition);
  }

  .header__nav--open .nav__link:hover,
  .header__nav--open .nav__link:focus-visible {
    border-color: rgba(255, 94, 26, 0.18);
    background: rgba(255, 94, 26, 0.08);
    color: #ff9d73;
  }

  .header__nav--open .nav__item--mobile-cta {
    display: block;
    margin-top: 7px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
  }

  .header__nav--open .header__cta--mobile {
    display: flex;
    width: 100%;
    min-height: 46px;
    justify-content: center;
    padding: 11px 14px;
    border-radius: 11px;
    font-size: 14px;
    box-shadow: 0 8px 20px rgba(255, 94, 26, 0.2);
  }
}

@media (max-width: 1024px) {
  .hero__inner,
  .about__grid,
  .prices__layout {
    grid-template-columns: 1fr;
  }

  .hero__inner {
    gap: 36px;
  }

  .hero__visual {
    order: -1;
  }

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

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

@media (max-width: 768px) {
  .hero {
    padding: 20px 0 48px;
  }

  .hero__inner {
    gap: 24px;
  }

  .hero__visual {
    aspect-ratio: 1.62;
    border-radius: 20px;
  }

  .hero__photo {
    object-position: 48% center;
  }

  .hero__tag {
    margin-bottom: 14px;
    font-size: 12px;
  }

  .hero__title {
    font-size: clamp(32px, 8.8vw, 42px);
    line-height: 1.08;
    margin-bottom: 14px;
  }

  .hero__lead {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 18px;
  }

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

  .hero__buttons .button {
    min-width: 0;
    padding: 12px 10px;
    font-size: 13px;
    text-align: center;
  }

  .service-ticker__group { gap: 18px; padding-block: 14px; font-size: 12px; }

  .contacts__info-card {
    padding: 28px 16px;
  }

  .contacts__detail-val {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
  }

  .messengers { gap: 8px; }
  .messenger-btn { min-height: 48px; gap: 5px; padding: 6px 7px; border-radius: 12px; }
  .messenger-btn__icon { width: 28px; height: 28px; flex-basis: 28px; border-radius: 9px; }
  .messenger-btn__name { font-size: 12px; }

  .advantages__grid,
  .portfolio__grid,
  .process__steps {
    grid-template-columns: 1fr;
  }

  .about__arsenal { grid-template-columns: 1fr; }
  .about__tool { grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 12px; }
  .about__tool-title { margin: 0; }

  .calc-dialog__panel { padding: 20px; }
  .calc-dialog__actions { justify-content: stretch; }
  .calc-dialog__actions .button { flex: 1 1 130px; }

  .photo-viewer__panel {
    gap: 8px;
    padding: 12px 12px max(12px, env(safe-area-inset-bottom));
  }
  .photo-viewer__stage { min-height: 0; }
  .photo-viewer__nav { width: 40px; height: 48px; border-radius: 13px; font-size: 32px; }
  .photo-viewer__nav--prev { left: 4px; }
  .photo-viewer__nav--next { right: 4px; }
  .photo-viewer__toolbar { flex-wrap: wrap; justify-content: center; gap: 8px 14px; }
  .photo-viewer__tip { display: none; }
  .photo-viewer__caption { max-width: calc(100% - 60px); font-size: 12px; line-height: 1.35; }
}

@media (max-width: 767px) {
  .photo-viewer {
    box-sizing: border-box;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .photo-viewer__panel {
    width: 100%;
    height: 100%;
    grid-template-rows: auto auto auto;
    align-content: center;
    gap: 8px;
    padding: 10px 0 max(10px, env(safe-area-inset-bottom));
  }

  .photo-viewer__header,
  .photo-viewer__toolbar { padding-inline: 12px; }
  .photo-viewer__stage { width: 100%; max-width: 100%; max-height: min(100vw, calc(100dvh - 150px)); align-self: center; aspect-ratio: 1 / 1; border-radius: 0; }

  .footer {
    padding: 12px 0;
  }

  .footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr);
    align-items: center;
    gap: 8px 10px;
    font-size: 11px;
  }

  .footer__brand,
  .footer__meta {
    display: contents;
  }

  .footer__studio {
    grid-column: 1;
    grid-row: 1;
    max-width: 100%;
    line-height: 1.3;
  }

  .footer__studio strong {
    display: inline-block;
    white-space: nowrap;
  }

  .footer__demo {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    max-width: 100%;
    text-align: right;
    line-height: 1.3;
  }

  .footer__up {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    width: 42px;
    height: 42px;
  }

  .footer__copy {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: center;
    font-size: 11px;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 480px) {
  .contacts__info-card { padding: 26px 14px; }
  .messengers { gap: 6px; }
  .messenger-btn { gap: 4px; padding: 6px; }

  .calc-items { grid-template-columns: 1fr; }
  .calc-card__title { font-size: 18px; line-height: 1.3; }
  .calc-form__toolbar { align-items: flex-start; flex-direction: column; }
  .calc-form__add { width: 100%; }
  .calc-item__main { align-items: flex-start; }
  .calc-item__info { flex-direction: column; align-items: flex-start; gap: 3px; }
  .calc-item__controls { gap: 3px; }
  .calc-item__quantity,
  .calc-item__remove { width: 28px; height: 28px; }
  .calc-form__result-sum { font-size: 22px; }
  .about__tool { grid-template-columns: 96px minmax(0, 1fr); }

  .photo-viewer__header { gap: 8px; }
  .photo-viewer__close { width: 40px; height: 40px; }
  .photo-viewer__zoom-controls { gap: 6px; }
  .photo-viewer__zoom-controls button { min-width: 38px; height: 38px; }
  .photo-viewer__zoom-controls [data-zoom="reset"] { min-width: 56px; }
  .photo-viewer__counter { font-size: 12px; }

  .footer__inner {
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 8px;
  }

  .footer__studio {
    grid-column: 1;
    grid-row: 1;
    font-size: clamp(9px, 3vw, 11px);
    white-space: nowrap;
  }

  .footer__studio strong { white-space: nowrap; }

  .footer__demo {
    grid-column: 2;
    grid-row: 1;
    max-width: none;
    font-size: clamp(9px, 3vw, 11px);
    white-space: nowrap;
  }

  .footer__up {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .footer__copy {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

@media (max-width: 340px) {
  .messenger-btn { width: 42px; min-width: 42px; justify-content: center; padding: 5px; }
  .messenger-btn__text { display: none; }
  .messenger-btn__icon { width: 26px; height: 26px; flex-basis: 26px; }
  .portfolio__filters { width: calc(100% + 24px); margin-inline: -12px; gap: 6px; }
  .portfolio__filter-btn { padding-inline: 2px; font-size: 10px; letter-spacing: -0.025em; }
  .footer__up { width: 38px; height: 38px; }
}

@media (max-width: 280px) {
  .header__inner { gap: 6px; }
  .header__logo { min-width: 0; flex: 1 1 auto; gap: 6px; }
  .header__logo-badge { flex: 0 0 auto; padding: 5px 7px; font-size: 11px; }
  .header__logo-text { min-width: 0; }
  .header__logo-title { font-size: 12px; line-height: 1.1; letter-spacing: 0; overflow-wrap: anywhere; }
  .header__logo-subtitle { font-size: 9px; line-height: 1.2; }
  .header__burger { flex: 0 0 40px; width: 40px; height: 40px; }
  .header__burger-line { width: 18px; }

  .portfolio__filters { gap: 4px; }
  .portfolio__filter-btn { padding: 8px 2px; font-size: 9px; letter-spacing: 0; line-height: 1.15; white-space: normal; }

  .about__tool { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .about__tool-val,
  .about__tool:last-child .about__tool-val { white-space: normal; overflow-wrap: anywhere; }

  .section__title { font-size: 21px; line-height: 1.16; overflow-wrap: anywhere; }
  .prices__table-card,
  .calc-card { padding: 20px 12px; }
  .prices__card-title,
  .calc-card__title { font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
  .price-list__name,
  .price-list__cost,
  .calc-item__title,
  .calc-item__price { overflow-wrap: anywhere; white-space: normal; }
  .calc-form__result-info { flex-wrap: wrap; justify-content: center; text-align: center; }
  .calc-form__result-copy { min-width: 0; text-align: center; }
  .calc-form__result-sum { font-size: 18px; }

  .contacts__card-title { font-size: 19px; line-height: 1.25; }
  .contacts__card-sub { font-size: 13px; }
  .contacts__detail-val { overflow-wrap: anywhere; }

  .footer__inner { padding-right: 16px; padding-left: 16px; }
  .footer__studio,
  .footer__demo,
  .footer__copy { font-size: 9px; overflow-wrap: anywhere; }
  .footer__studio,
  .footer__studio strong,
  .footer__demo { white-space: nowrap; }
  .footer__up { width: 34px; height: 34px; }
}

@media (max-width: 260px) {
  .footer__inner { grid-template-columns: minmax(0, 1fr); }
  .footer__studio,
  .footer__demo,
  .footer__up,
  .footer__copy { grid-column: 1; justify-self: center; }
  .footer__studio { grid-row: 1; }
  .footer__demo { grid-row: 2; }
  .footer__up { grid-row: 3; }
  .footer__copy { grid-row: 4; text-align: center; }
}

@media (max-width: 900px) and (max-height: 500px) {
  .photo-viewer {
    box-sizing: border-box;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .photo-viewer__panel {
    width: 100%;
    height: 100%;
    grid-template-rows: auto auto auto;
    align-content: center;
    gap: 8px;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  }

  .photo-viewer__header,
  .photo-viewer__toolbar { padding-inline: 12px; }
  .photo-viewer__stage { width: 100%; max-width: 100%; max-height: calc(100dvh - 130px); align-self: center; aspect-ratio: 1 / 1; border-radius: 0; }
}

@media (max-width: 480px) {
  .price-list__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .price-list__dots { display: none; }
  .price-list__cost { white-space: normal; }

  .container {
    padding-right: 18px;
    padding-left: 18px;
  }

  .header__inner {
    min-height: 70px;
  }

  .hero__visual {
    aspect-ratio: 1.48;
  }

  .hero__title {
    font-size: clamp(31px, 9vw, 36px);
  }

}

@media (max-width: 700px) and (max-height: 700px) {
  .hero {
    padding-top: 12px;
    padding-bottom: 32px;
  }

  .hero__inner {
    gap: 12px;
  }

  .hero__visual {
    aspect-ratio: 1.9;
  }

  .hero__title {
    font-size: clamp(28px, 7.6vw, 32px);
    margin-bottom: 10px;
  }

  .hero__lead {
    font-size: 15px;
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  .demo-dialog__panel { gap: 14px; padding: 28px 22px 22px; }
  .demo-dialog__close { top: 10px; right: 10px; }
}

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

  .service-ticker { overflow: visible; }
  .service-ticker::before,
  .service-ticker::after { display: none; }
  .service-ticker__track { width: 100%; animation: none; transform: none; }
  .service-ticker__group { width: 100%; flex-wrap: wrap; justify-content: center; gap: 12px 18px; white-space: normal; }
  .service-ticker__group:nth-child(2) { display: none; }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
