:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #18181b;
  --text-muted: #71717a;
  --text-soft: #a1a1aa;
  --border: #e4e4e7;
  --border-soft: #f4f4f5;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.12);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html, body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
.container--narrow { max-width: 720px; }
.container--form { max-width: 880px; }

/* ---------- Header ---------- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  position: relative;
  z-index: 10;
}
.nav__brand {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.nav__brand span { color: var(--accent); }
.nav__sub {
  font-size: 14px;
  color: var(--text-muted);
}

/* ---------- HERO: split (slider | text) on desktop, stacked on mobile ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
  padding: 40px 64px 80px;
  min-height: calc(100vh - 64px);
  background:
    radial-gradient(ellipse 90% 60% at 0% 30%, rgba(79, 70, 229, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 80%, rgba(79, 70, 229, 0.08), transparent 60%),
    var(--bg);
}

.hero__media {
  width: 100%;
  display: flex;
  justify-content: center;
}

.hero__copy {
  max-width: 540px;
}

.hero__badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}
.hero p {
  font-size: clamp(16px, 1.4vw, 20px);
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.5;
}

/* ---------- Before/After slider ---------- */
.hero__preview-mobile {
  display: none;
}
.ba-slider {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  user-select: none;
  -webkit-user-select: none;
  background: #000;
}
.ba-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ba-before {
  clip-path: inset(0 50% 0 0);
  will-change: clip-path;
  z-index: 1;
}
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: white;
  transform: translateX(-50%);
  pointer-events: none;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
}
.ba-handle::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  background-image:
    linear-gradient(45deg, transparent 47%, var(--text) 47%, var(--text) 53%, transparent 53%),
    linear-gradient(-45deg, transparent 47%, var(--text) 47%, var(--text) 53%, transparent 53%);
  background-size: 14px 14px, 14px 14px;
  background-position: 6px 50%, 24px 50%;
  background-repeat: no-repeat;
}
.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  margin: 0;
  z-index: 2;
}
.ba-label {
  position: absolute;
  top: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: white;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 3;
}
.ba-label--before { left: 16px; }
.ba-label--after { right: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 150ms;
  text-align: center;
}
.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.25);
}
.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn--secondary:hover { background: var(--border-soft); box-shadow: none; }
.btn--full { width: 100%; }
.btn--lg {
  padding: 20px 40px;
  font-size: 18px;
}
.btn__hint {
  display: block;
  text-align: left;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ---------- Sections ---------- */
.section {
  padding: 72px 32px;
}
.section--alt {
  background: var(--surface);
}
.section__title {
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  text-align: center;
}
.section__lead {
  text-align: center;
  font-size: 17px;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 48px;
}

/* ---------- Examples grid (real photos) ---------- */
.examples {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
}
.example {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 200ms;
}
.example:hover { transform: translateY(-4px); }
.example__img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}
.example__label {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

/* ---------- Steps grid (horizontal on desktop) ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
}
.step {
  background: var(--surface);
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  text-align: left;
}
.step__num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.step__title {
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.step__desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---------- FAQ ---------- */
.faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 760px;
  margin: 0 auto;
}
.faq__item {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  overflow: hidden;
}
.faq__q {
  padding: 20px 24px;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq__q::after {
  content: '+';
  font-size: 24px;
  color: var(--text-muted);
  font-weight: 300;
  transition: transform 200ms;
}
.faq__item[open] .faq__q::after { transform: rotate(45deg); }
.faq__a {
  padding: 0 24px 20px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---------- Final CTA ---------- */
.final-cta {
  text-align: center;
  padding: 80px 32px;
  background: linear-gradient(135deg, var(--accent-soft), #f5f3ff);
}
.final-cta h2 {
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.final-cta p {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Footer ---------- */
.footer {
  padding: 40px 32px;
  text-align: center;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.8;
  border-top: 1px solid var(--border-soft);
}

/* ---------- Page headers (upload/result) ---------- */
.page-header {
  padding: 32px 32px 24px;
  text-align: center;
}
.page-header h1 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.page-header p {
  font-size: 16px;
  color: var(--text-muted);
}

/* ---------- Upload zone ---------- */
.upload-zone {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: all 150ms;
  margin-bottom: 16px;
  display: block;
}
.upload-zone:hover,
.upload-zone--active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.upload-zone__icon {
  font-size: 40px;
  margin-bottom: 14px;
}
.upload-zone__title {
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 6px;
}
.upload-zone__hint {
  font-size: 14px;
  color: var(--text-muted);
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}
.thumb {
  aspect-ratio: 1;
  background: var(--border-soft);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 26px;
  height: 100%;
}
.thumb__remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.styles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.style-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  transition: all 150ms;
  text-align: center;
}
.style-card--active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.style-card__img {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  overflow: hidden;
}
.style-card__img img {
  width: 100%; height: 100%; object-fit: cover;
}
.style-card__name {
  font-size: 13px;
  font-weight: 500;
}

.field {
  margin-bottom: 22px;
}
.field__label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}
.field__input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  background: var(--surface);
  outline: none;
  transition: border 150ms;
}
.field__input:focus { border-color: var(--accent); }
.field__checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  cursor: pointer;
}
.field__checkbox input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ---------- Result page ---------- */
.results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto 32px;
}
.result-img {
  position: relative;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--accent);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.result-img::after {
  content: 'PARADIGMA';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 26px;
  color: rgba(255, 255, 255, 0.42);
  transform: rotate(-30deg);
  letter-spacing: 0.05em;
  pointer-events: none;
}

.cta-card {
  background: var(--success-bg);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  margin-bottom: 20px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.cta-card__title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}
.cta-card__price {
  font-size: 42px;
  font-weight: 700;
  color: var(--success);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  line-height: 1;
}
.cta-card .btn { background: var(--success); }
.cta-card .btn:hover {
  background: #15803d;
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.25);
}

/* ---------- Tablet (769-1024) ---------- */
@media (max-width: 1024px) {
  .hero {
    padding: 32px 32px 56px;
    gap: 40px;
  }
}

/* ---------- Mobile (≤768) ---------- */
@media (max-width: 768px) {
  .nav {
    padding: 12px 16px;
  }
  .nav__brand { font-size: 14px; }
  .nav__sub { font-size: 12px; }

  /* Hero SPLIT даже на мобильном: пример слева | CTA справа */
  .hero {
    grid-template-columns: 1fr 1.1fr;
    gap: 14px;
    padding: 16px 16px 32px;
    min-height: auto;
    text-align: left;
    align-items: center;
  }
  /* На мобильном: слайдер скрыт, показывается одиночное фото */
  .hero__slider-desktop { display: none; }
  .hero__preview-mobile {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .hero__copy { max-width: 100%; }
  .hero__badge {
    margin-bottom: 10px;
    font-size: 10px;
    padding: 4px 10px;
    letter-spacing: 0.04em;
  }
  .hero h1 {
    font-size: 22px;
    line-height: 1.1;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
  }
  /* Описание на мобильном скрыто — пользователь сразу видит кнопку */
  .hero__desc-desktop { display: none; }
  .btn--hero {
    width: 100%;
    padding: 18px 16px;
    font-size: 16px;
    border-radius: 12px;
  }
  .btn__hint {
    text-align: left;
    font-size: 11px;
    margin-top: 8px;
    color: var(--text-muted);
  }

  .section { padding: 48px 18px; }
  .section__title { font-size: 22px; margin-bottom: 8px; }
  .section__lead { font-size: 15px; margin-bottom: 28px; }

  .examples,
  .steps,
  .results {
    grid-template-columns: 1fr;
    gap: 14px;
    max-width: 480px;
  }
  .step { padding: 22px; }
  .step__title { font-size: 16px; }
  .step__desc { font-size: 14px; }

  .faq { gap: 8px; }
  .faq__q { padding: 16px 18px; font-size: 15px; }
  .faq__a { padding: 0 18px 16px; font-size: 14px; }

  .final-cta {
    padding: 56px 18px;
  }
  .final-cta h2 { font-size: 24px; }
  .final-cta p { font-size: 15px; margin-bottom: 22px; }

  .footer { padding: 28px 18px; font-size: 12px; }

  .page-header { padding: 20px 18px 16px; }
  .page-header h1 { font-size: 24px; }
  .page-header p { font-size: 14px; }

  .upload-zone { padding: 32px 20px; }
  .upload-zone__icon { font-size: 32px; margin-bottom: 10px; }
  .upload-zone__title { font-size: 15px; }
  .upload-zone__hint { font-size: 13px; }

  .thumbs { gap: 6px; }
  .styles-grid { gap: 8px; }
  .style-card { padding: 8px; }
  .style-card__name { font-size: 12px; }

  .field { margin-bottom: 18px; }
  .field__label { font-size: 13px; }
  .field__input { padding: 12px 14px; font-size: 15px; }
  .field__checkbox { font-size: 13px; }

  .cta-card { padding: 24px 18px; }
  .cta-card__title { font-size: 17px; }
  .cta-card__price { font-size: 34px; margin-bottom: 16px; }

  .result-img::after { font-size: 18px; }
}

@media (max-width: 380px) {
  .hero {
    gap: 10px;
    padding: 12px 12px 24px;
  }
  .hero h1 { font-size: 19px; }
  .hero__badge { font-size: 9px; margin-bottom: 8px; padding: 3px 8px; }
  .btn--hero { padding: 15px 12px; font-size: 14px; }
  .btn__hint { font-size: 10px; }
  .section__title { font-size: 20px; }
  .ba-slider { max-width: 280px; }
}
