/* VisionHome AI — Landing tokens */
:root {
  --color-bg: #F5F4EB;
  --color-bg-alt: #EDEDED;
  --color-surface: #FFFFFF;
  --color-card-tan: #EEE7CF;
  --color-primary: #2E2203;
  --color-primary-soft: rgba(46, 34, 3, 0.6);
  --color-ink: #1E1E1E;
  --color-muted: #635B45;
  --color-accent: #FEDA6D;
  /* Тёплый «уголь» вместо холодного графита — для футера и нижней части CTA */
  --color-warm-void: #100d08;
  --color-warm-void-mid: #16120c;
  --color-cta-deep: #1a1308;
  --color-gold-glow: rgba(161, 121, 20, 0.16);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-soft: 0 8px 32px rgba(46, 34, 3, 0.08);
  --shadow-card: 0 12px 40px rgba(46, 34, 3, 0.12);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 244, 235, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(46, 34, 3, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  padding: 4px 0;
  background: transparent;
  border: none;
}

.logo:hover {
  text-decoration: none;
  opacity: 0.88;
}

.logo img {
  display: block;
  height: 44px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  object-position: left center;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-desktop a {
  color: var(--color-muted);
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.nav-desktop a:hover {
  color: var(--color-primary);
  background: var(--color-gold-glow);
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(46, 34, 3, 0.25);
}

/* Ссылки в навигации наследуют .nav-desktop a { color: muted } — явно задаём контраст */
.nav-desktop a.btn-primary,
.mobile-nav a.btn-primary {
  color: #ffffff;
}

.nav-desktop a.btn-primary:hover,
.mobile-nav a.btn-primary:hover {
  color: #ffffff;
  text-decoration: none;
}

.btn-primary:hover {
  background: #1a1302;
  text-decoration: none;
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-gold-glow);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: var(--color-card-tan);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 16px 0 24px;
  gap: 4px;
}

.mobile-nav a {
  padding: 12px 16px;
  color: var(--color-muted);
  font-weight: 500;
  border-radius: var(--radius-md);
}

.mobile-nav a:hover {
  background: var(--color-gold-glow);
  color: var(--color-primary);
  text-decoration: none;
}

.mobile-nav .btn-primary {
  margin-top: 8px;
  text-align: center;
}

@media (max-width: 900px) {
  .nav-desktop {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .site-header.is-open .mobile-nav {
    display: flex;
  }
}

/* Hero — отдельная «сцена»: свет, золото, контраст к следующей секции */
.hero {
  position: relative;
  isolation: isolate;
  padding: 104px 0 120px;
  overflow: hidden;
  background: linear-gradient(
    165deg,
    #fffefb 0%,
    var(--color-bg) 42%,
    #ebe4d6 100%
  );
  border-bottom: 1px solid rgba(46, 34, 3, 0.07);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 85% 65% at 92% 8%, rgba(254, 218, 109, 0.28) 0%, transparent 58%),
    radial-gradient(ellipse 55% 45% at 8% 88%, var(--color-gold-glow) 0%, transparent 52%),
    radial-gradient(ellipse 50% 40% at 70% 95%, rgba(46, 34, 3, 0.06) 0%, transparent 45%);
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath fill='%232E2203' fill-opacity='0.04' d='M0 0h40v40H0V0zm40 40h40v40H40V40z'/%3E%3C/svg%3E");
  background-size: 80px 80px;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(340px, 1.12fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
}

.hero__copy {
  max-width: 36rem;
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero__copy {
    max-width: none;
  }
}

.hero h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.15rem);
  font-weight: 700;
  letter-spacing: -0.038em;
  line-height: 1.1;
  margin: 0 0 20px;
  color: var(--color-ink);
  text-wrap: balance;
  max-width: 36rem;
}

.hero .lead {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--color-muted);
  margin: 0 0 28px;
  max-width: 32rem;
}

.app-store-link {
  display: inline-block;
  line-height: 0;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.app-store-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.app-store-link img,
.app-store-link svg {
  height: 54px;
  width: auto;
}

.hero .app-store-link {
  filter: drop-shadow(0 6px 20px rgba(46, 34, 3, 0.15));
}

.hero .app-store-link:hover {
  filter: drop-shadow(0 10px 28px rgba(46, 34, 3, 0.22));
}

/* Hero: визуал до/после (Picture-in-picture) */
.hero-visual {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* PiP: основной кадр + врезка «до» */
.hero-pip {
  margin: 0 auto;
  width: 100%;
  max-width: min(100%, 400px);
}

.hero-pip__frame {
  position: relative;
  margin: 0;
  padding: 0;
  background: transparent;
}

.hero-pip__main {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  outline: 1px solid rgba(46, 34, 3, 0.06);
  box-shadow:
    0 0 0 1px rgba(46, 34, 3, 0.05),
    0 20px 44px -14px rgba(46, 34, 3, 0.16);
}

.hero-pip__main > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-pip__inset {
  position: absolute;
  bottom: 18px;
  left: 18px;
  width: 34%;
  max-width: 140px;
  min-width: 72px;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.32);
  z-index: 2;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-pip__inset:hover {
  transform: scale(1.03);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.38);
}

.hero-pip__inset:focus {
  outline: none;
}

.hero-pip__inset:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

.hero-pip__inset img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-pip__tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 4px 8px;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 4px;
  pointer-events: none;
}

.hero-pip__tag--after {
  color: #fff;
  background: rgba(20, 18, 14, 0.75);
}

.hero-pip__tag--before {
  color: #fff;
  background: rgba(20, 18, 14, 0.8);
}

/* Section titles */
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.section-head h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--color-ink);
}

.section-head p {
  margin: 0;
  color: var(--color-primary-soft);
  font-size: 1.0625rem;
}

section {
  padding: 72px 0;
}

.section--surface {
  background: var(--color-surface);
}

.features-section {
  background: var(--color-bg);
  border-top: 1px solid rgba(46, 34, 3, 0.06);
}

/* Feature blocks */
.feature-block {
  margin-bottom: 96px;
}

.feature-block:last-child {
  margin-bottom: 0;
}

.feature-block__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

/* Заголовок и описание по центру, контент (картинки / сетка) строкой ниже */
.feature-block--stack .feature-block__inner {
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 48px);
  align-items: stretch;
  direction: ltr;
}

.feature-block--stack .feature-block__text {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
}

.feature-block--stack .feature-block__inner > div:last-child {
  width: 100%;
  min-width: 0;
}

.feature-block--stack .surfaces-diagonal-grid,
.feature-block--stack .staging-flow {
  max-width: min(100%, 1120px);
  margin-inline: auto;
}

.feature-block:nth-child(even) .feature-block__inner {
  direction: rtl;
}

.feature-block:nth-child(even) .feature-block__text {
  direction: ltr;
}

@media (max-width: 860px) {
  .feature-block__inner {
    grid-template-columns: 1fr;
  }

  .feature-block:nth-child(even) .feature-block__inner {
    direction: ltr;
  }
}

.feature-block h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--color-ink);
}

.feature-block p {
  margin: 0;
  color: var(--color-primary-soft);
  font-size: 1rem;
}

.feature-block__text {
  padding: 8px 0;
}

/* Reference Style Match: две колонки — текст слева, визуал справа (как Complete Space Restyle) */
.feature-block--reference .feature-block__inner {
  direction: ltr;
}

.feature-block--reference .feature-block__text {
  max-width: 38em;
}

/* Placeholder frame */
.media-frame {
  border-radius: var(--radius-lg);
  background: var(--color-bg-alt);
  border: 2px dashed rgba(99, 91, 69, 0.35);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.media-frame__tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.media-frame__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.media-frame__note {
  font-size: 0.8125rem;
  color: var(--color-muted);
  max-width: 280px;
}

/* Segmented control demo */
.segment-demo {
  width: 100%;
  max-width: 360px;
  margin-bottom: 16px;
}

.segment-demo__track {
  display: flex;
  padding: 4px;
  background: var(--color-card-tan);
  border-radius: var(--radius-pill);
  gap: 4px;
}

.segment-demo__btn {
  flex: 1;
  padding: 10px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.2s, color 0.2s;
}

.segment-demo__btn.is-active {
  background: var(--color-primary);
  color: #fff;
}

.preview-swap {
  border-radius: var(--radius-md);
  min-height: 220px;
  background: linear-gradient(160deg, #dcd4c4, #a89878);
  position: relative;
  overflow: hidden;
}

.preview-swap[data-mode="exterior"] {
  background: linear-gradient(160deg, #b8c4d4, #6b7a8a);
}

.preview-swap[data-mode="landscape"] {
  background: linear-gradient(160deg, #c4d4b8, #6a8a5a);
}

/* Complete Space Restyle: сравнение с ползунком, 1:1 */
.restyle-compare {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
}

.restyle-compare__track {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #1f1c18;
  box-shadow:
    0 0 0 1px rgba(46, 34, 3, 0.08),
    0 16px 40px -12px rgba(46, 34, 3, 0.2);
  user-select: none;
  -webkit-user-select: none;
}

.restyle-compare__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.restyle-compare__img--before {
  z-index: 1;
}

.restyle-compare__img--after {
  z-index: 2;
  -webkit-clip-path: inset(0 calc(100% - var(--split, 50%)) 0 0);
  clip-path: inset(0 calc(100% - var(--split, 50%)) 0 0);
}

.restyle-compare__label {
  position: absolute;
  bottom: 12px;
  padding: 5px 10px;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 4px;
  pointer-events: none;
  z-index: 4;
  color: #fff;
}

.restyle-compare__label--before {
  left: 12px;
  background: rgba(20, 18, 14, 0.82);
}

.restyle-compare__label--after {
  right: 12px;
  background: rgba(20, 18, 14, 0.75);
}

.restyle-compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split, 50%);
  width: 44px;
  margin-left: -22px;
  z-index: 5;
  cursor: ew-resize;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.restyle-compare__handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.95) 10%,
    rgba(255, 255, 255, 0.95) 90%,
    rgba(255, 255, 255, 0) 100%
  );
  box-shadow: 1px 0 0 rgba(0, 0, 0, 0.08), -1px 0 0 rgba(0, 0, 0, 0.05);
  pointer-events: none;
}

.restyle-compare__handle:focus {
  outline: none;
}

.restyle-compare__handle:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.restyle-compare__knob {
  position: relative;
  width: 36px;
  height: 104px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(46, 34, 3, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.restyle-compare__knob svg {
  color: rgba(46, 34, 3, 0.75);
}

/* Reference Style Match — 2 квадрата сверху, широкий результат снизу; чуть уже полной колонки */
.reference-match-visual {
  width: 100%;
  max-width: min(380px, 100%);
  margin-inline: auto;
}

.feature-block--reference .reference-match-visual {
  max-width: min(380px, 100%);
}

.reference-match-visual__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.reference-match-visual__shot {
  margin: 0;
  min-width: 0;
}

.reference-match-visual__shot--result {
  grid-column: 1 / -1;
}

.reference-match-visual__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #1f1c18;
  box-shadow:
    0 0 0 1px rgba(46, 34, 3, 0.08),
    0 16px 40px -12px rgba(46, 34, 3, 0.2);
}

.reference-match-visual__frame--result {
  aspect-ratio: 16 / 10;
  box-shadow:
    0 0 0 1px rgba(254, 218, 109, 0.35),
    0 16px 40px -12px rgba(46, 34, 3, 0.22);
}

.reference-match-visual__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

.reference-match-visual__tag {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 4;
  padding: 5px 10px;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(20, 18, 14, 0.82);
  border-radius: 4px;
  pointer-events: none;
}

.reference-match-visual__tag--accent {
  background: rgba(46, 34, 3, 0.88);
  box-shadow: 0 0 0 1px rgba(254, 218, 109, 0.35);
}

@media (max-width: 520px) {
  .reference-match-visual__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .reference-match-visual__shot--result {
    grid-column: auto;
  }

  .reference-match-visual__tag {
    font-size: 0.5rem;
    padding: 4px 8px;
    bottom: 8px;
    left: 8px;
  }

  .reference-match-visual__frame--result {
    aspect-ratio: 1 / 1;
  }

}

/* Premium Surfaces: сетка из 3 диагональных сравнений */
.surfaces-diagonal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.4vw, 14px);
  width: 100%;
  min-width: 0;
}

.surface-diagonal-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.surface-diagonal-card__title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-primary);
  text-align: center;
  letter-spacing: 0.02em;
}

.surfaces-diagonal-grid .restyle-diagonal {
  max-width: none;
  margin-inline: 0;
  width: 100%;
}

.surfaces-diagonal-grid .restyle-compare {
  max-width: none;
  margin-inline: 0;
  width: 100%;
}

/* Smart Object Control: компактный вертикальный сплит в сетке из 3 колонок */
.restyle-compare--smart .restyle-compare__handle {
  width: 36px;
  margin-left: -18px;
}

.restyle-compare--smart .restyle-compare__knob {
  width: 28px;
  height: 72px;
  border-radius: 14px;
}

@media (max-width: 900px) {
  .surfaces-diagonal-grid {
    grid-template-columns: 1fr;
    max-width: min(100%, 440px);
    margin-inline: auto;
  }
}

.restyle-diagonal {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
}

.restyle-diagonal__inner {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #1f1c18;
  box-shadow:
    0 0 0 1px rgba(46, 34, 3, 0.08),
    0 16px 40px -12px rgba(46, 34, 3, 0.2);
}

.restyle-diagonal__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.restyle-diagonal__img--before {
  z-index: 1;
  -webkit-clip-path: polygon(0 0, 0 100%, 100% 100%);
  clip-path: polygon(0 0, 0 100%, 100% 100%);
}

.restyle-diagonal__img--after {
  z-index: 2;
  -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.restyle-diagonal[data-view="split"] .restyle-diagonal__img {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.restyle-diagonal[data-view="before"] .restyle-diagonal__img--before {
  -webkit-clip-path: none;
  clip-path: none;
  z-index: 3;
}

.restyle-diagonal[data-view="before"] .restyle-diagonal__img--after {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.restyle-diagonal[data-view="after"] .restyle-diagonal__img--after {
  -webkit-clip-path: none;
  clip-path: none;
  z-index: 3;
}

.restyle-diagonal[data-view="after"] .restyle-diagonal__img--before {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.restyle-diagonal__edge {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
}

.restyle-diagonal[data-view="before"] .restyle-diagonal__edge,
.restyle-diagonal[data-view="after"] .restyle-diagonal__edge {
  opacity: 0;
}

.restyle-diagonal__hit {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 6;
  -webkit-tap-highlight-color: transparent;
}

.restyle-diagonal__hit--before {
  -webkit-clip-path: polygon(0 0, 0 100%, 100% 100%);
  clip-path: polygon(0 0, 0 100%, 100% 100%);
}

.restyle-diagonal__hit--after {
  -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.restyle-diagonal__hit--collapse {
  clip-path: none;
  z-index: 7;
}

.restyle-diagonal__hit:focus {
  outline: none;
}

.restyle-diagonal__hit:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: -3px;
}

/* Surfaces grid */
.surfaces-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

@media (max-width: 520px) {
  .surfaces-grid {
    grid-template-columns: 1fr;
  }
}

.surface-tile {
  border-radius: var(--radius-md);
  min-height: 100px;
  border: 2px dashed rgba(99, 91, 69, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary-soft);
  background: var(--color-surface);
}

.surface-tile:nth-child(1) {
  background: linear-gradient(180deg, #e8e0d4, #c4b8a8);
}

.surface-tile:nth-child(2) {
  background: linear-gradient(180deg, #d8d0c8, #9a8a78);
}

.surface-tile:nth-child(3) {
  background: linear-gradient(180deg, #c8d4e0, #7890a8);
}

/* Virtual Auto-Staging: 4 квадрата + стрелки между шагами */
/* direction: ltr — иначе у чётных блоков родитель с direction:rtl ломает порядок в колонке на мобилке */
.staging-flow {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(6px, 1.2vw, 12px);
  width: 100%;
  direction: ltr;
}

.staging-flow__card {
  margin: 0;
  flex: 1 1 0;
  min-width: 0;
  max-width: 240px;
}

.staging-flow__frame {
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-alt);
  box-shadow:
    0 0 0 1px rgba(46, 34, 3, 0.06),
    0 10px 28px -8px rgba(46, 34, 3, 0.15);
}

.staging-flow__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.staging-flow__caption {
  margin: 10px 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary-soft);
  text-align: center;
  line-height: 1.35;
}

.staging-flow__arrow {
  flex: 0 0 auto;
  align-self: center;
  margin-top: 0;
  color: var(--color-accent);
  opacity: 0.85;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.6));
}

@media (max-width: 820px) {
  .staging-flow {
    flex-direction: column;
    align-items: center;
    flex-wrap: nowrap;
    max-width: 320px;
    margin-inline: auto;
  }

  .staging-flow__card {
    max-width: 100%;
    width: 100%;
  }

  .staging-flow__arrow {
    transform: rotate(90deg);
    margin: 4px 0;
  }
}

/* Smart object row */
.smart-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}

@media (max-width: 600px) {
  .smart-row {
    grid-template-columns: 1fr;
  }
}

.smart-cell {
  border-radius: var(--radius-md);
  min-height: 100px;
  border: 2px dashed rgba(99, 91, 69, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-gold-glow);
}

.smart-cell em {
  font-style: normal;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  margin-top: 6px;
}

/* How it works */
.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .how-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .how-grid {
    grid-template-columns: 1fr;
  }
}

.how-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(46, 34, 3, 0.06);
  position: relative;
}

.how-card__num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.how-card strong {
  display: block;
  font-size: 1.0625rem;
  margin-bottom: 8px;
  color: var(--color-ink);
}

.how-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-primary-soft);
}

.how-section {
  background: var(--color-bg-alt);
}

/* CTA band — тёплый градиент, низ совпадает по тону с футером (без скачка в холодный серый) */
.cta-band {
  position: relative;
  background: linear-gradient(
    165deg,
    #3a2f18 0%,
    var(--color-primary) 38%,
    var(--color-cta-deep) 78%,
    var(--color-warm-void-mid) 100%
  );
  color: #fff;
  padding: 88px 0 72px;
  text-align: center;
}

.cta-band::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(254, 218, 109, 0.35) 50%,
    transparent
  );
}

.cta-band .container {
  position: relative;
  z-index: 1;
}

.cta-band h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin: 0 0 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cta-band p {
  margin: 0 auto 32px;
  max-width: 560px;
  opacity: 0.94;
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* Бейдж App Store: светлый вариант на тёмном фоне CTA (контраст с hero — там чёрный бейдж) */
.cta-band .btn-primary.app-store-link {
  padding: 0;
  background: transparent;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.cta-band .btn-primary.app-store-link:hover {
  background: transparent;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.5);
}

.cta-band .btn-primary.app-store-link svg rect {
  transition: fill 0.2s;
  fill: #fff;
}

.cta-band .btn-primary.app-store-link:hover svg rect {
  fill: #f2f0eb;
}

.cta-band .btn-primary.app-store-link svg g {
  fill: #1a1308;
}

.cta-band .btn-primary.app-store-link svg text {
  fill: #1a1308;
}

.cta-band .btn-primary.app-store-link svg {
  display: block;
  height: 48px;
  width: auto;
}

/* Footer — тот же тёплый «void», что и низ CTA; визуально один блок с разделителем */
.site-footer {
  background: var(--color-warm-void);
  color: rgba(255, 255, 255, 0.78);
  padding: 44px 0 28px;
  border-top: 1px solid rgba(254, 218, 109, 0.1);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.site-footer .logo:hover {
  opacity: 0.92;
}

.site-footer .logo img {
  object-position: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9375rem;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* —— Inner pages (Support, Legal) —— */
.page-sub {
  padding: 40px 0 80px;
  min-height: 55vh;
}

/* Support: контент по центру экрана */
.page-sub--center .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-sub--center .page-sub__header {
  max-width: 560px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 40px;
  text-align: center;
}

.page-sub--center #support-form-wrap {
  width: 100%;
  max-width: 560px;
}

.page-sub--center .support-form {
  max-width: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.page-sub--center .support-form .btn-primary {
  align-self: center;
}

.page-sub--center .support-success {
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.page-sub__header {
  max-width: 640px;
  margin-bottom: 40px;
}

.page-sub__header h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  color: var(--color-ink);
}

.page-sub__lead {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-primary-soft);
}

/* Support form */
.support-form {
  position: relative;
  max-width: 560px;
}

.support-form__hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.support-form__error {
  margin: 0 0 16px;
  padding: 12px 14px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #7f1d1d;
  background: rgba(180, 35, 24, 0.08);
  border: 1px solid rgba(180, 35, 24, 0.25);
  border-radius: var(--radius-sm);
}

.support-form .btn-primary:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.support-form .form-row {
  margin-bottom: 20px;
}

.support-form label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.support-form .req {
  color: #b42318;
  font-weight: 700;
}

.input-field {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font);
  font-size: 0.9375rem;
  border-radius: var(--radius-md);
  border: 2px solid rgba(46, 34, 3, 0.12);
  background: var(--color-surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-gold-glow);
}

textarea.input-field {
  min-height: 160px;
  resize: vertical;
}

.support-form .btn-primary {
  margin-top: 8px;
  min-width: 180px;
}

.support-success {
  max-width: 560px;
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid rgba(46, 34, 3, 0.08);
  box-shadow: var(--shadow-soft);
}

.support-success h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--color-ink);
  letter-spacing: -0.02em;
}

.support-success p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-primary-soft);
}

/* Legal documents */
.legal-doc {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 48px;
}

.legal-doc > h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  color: var(--color-ink);
}

.legal-doc__meta {
  font-size: 0.9375rem;
  color: var(--color-muted);
  margin: 0 0 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(46, 34, 3, 0.1);
}

.legal-doc h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 36px 0 14px;
  color: var(--color-ink);
  letter-spacing: -0.02em;
}

.legal-doc h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--color-primary);
}

.legal-doc p {
  margin: 0 0 14px;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-primary-soft);
}

.legal-doc ul {
  margin: 0 0 16px;
  padding-left: 1.35rem;
}

.legal-doc li {
  margin-bottom: 8px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-primary-soft);
}

.legal-doc strong {
  font-weight: 600;
  color: var(--color-ink);
}

.legal-doc a {
  word-break: break-word;
}
