/* StyleGenie — главный лендинг (index.html): сказка / джин / мечта */

:root {
  --bg-page: #f0f7ff;
  --text: #1a2b3c;
  --text-muted: rgba(26, 43, 60, 0.72);

  --grad-bot-start: #0095ff;
  --grad-bot-end: #7000ff;
  --bot-glow: 0 8px 28px rgba(0, 149, 255, 0.45),
    0 4px 40px rgba(112, 0, 255, 0.35);

  /* Чередующиеся фоны экранов */
  --bg-screen-main: #edf4ff; /* немного темнее базового, акцентные экраны 1/3/5 */
  --bg-screen-alt: #f8fbff;  /* ещё чуть светлее для 2/4 */

  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-blur: 14px;

  --radius: 16px;
  --container: 1120px;
  --space-section: clamp(56px, 8vw, 96px);
  --space-block: clamp(20px, 4vw, 36px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg-page);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

/* ——— Кнопки на бота ——— */
.btn-bot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  text-align: center;
  border-radius: var(--radius);
  border: none;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--grad-bot-start),
    var(--grad-bot-end)
  );
  box-shadow: var(--bot-glow);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.btn-bot:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn-bot:active {
  transform: translateY(0);
}

button.btn-bot {
  font-family: inherit;
}

.btn-bot:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
  filter: none;
  box-shadow: none;
}

.btn-bot--wide {
  width: 100%;
  max-width: 420px;
}

/* ——— Glass карточки ——— */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(26, 43, 60, 0.06);
}

/* ——— Хедер ——— */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 16px 0;
  background: rgba(240, 247, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.9);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand__lamp {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: linear-gradient(
    145deg,
    rgba(0, 149, 255, 0.25),
    rgba(112, 0, 255, 0.35)
  );
  border: 1px solid rgba(255, 255, 255, 0.9);
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
}

/* ——— Секции ——— */
.section {
  padding: var(--space-section) 0;
}

.section--half {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-block) 0 var(--space-section);
}

.section--full {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Full-bleed фон секций после блока шагов */
#screen-4,
#screen-5 {
  position: relative;
  z-index: 0;
}

#screen-4::before,
#screen-5::before {
  content: "";
  position: absolute;
  inset: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  z-index: -1;
}

#screen-4::before {
  background: var(--bg-screen-alt);
}

#screen-5::before {
  background: var(--bg-screen-main);
}

/* ——— Экран 1: герой + галерея ——— */
.hero-screen {
  width: 100%;
  max-width: 100%;
  --gallery-card-w: clamp(148px, 24vw, 210px);
  --gallery-card-used: min(
    var(--gallery-card-w),
    calc((100dvh - 220px) * 9 / 16)
  );

  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 68px 0 16px;
  gap: clamp(10px, 2vw, 18px);
  background: var(--bg-screen-main);
  position: relative;
  overflow: hidden;
}

.hero-screen::after {
  content: "";
  position: absolute;
  top: -8%;
  left: 18%;
  transform: translateX(-15%);
  width: min(420px, 80vw);
  height: min(420px, 80vw);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 252, 244, 1) 0%,
    rgba(255, 240, 215, 0.82) 22%,
    rgba(255, 217, 190, 0.28) 42%,
    rgba(255, 217, 190, 0.06) 70%,
    rgba(237, 244, 255, 0.0) 85%,
    rgba(237, 244, 255, 0) 100%
  );
  opacity: 0.95;
  pointer-events: none;
  z-index: 0;
}


.hero-screen > .container {
  position: relative;
  z-index: 1;
}

.hero-screen__text {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  padding-inline: 8px;
  flex: 0 0 auto;
}

.hero-screen__title {
  margin: 0;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.hero-screen__title span {
  background: linear-gradient(
    135deg,
    var(--grad-bot-start),
    var(--grad-bot-end)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-screen__sub {
  margin: 0;
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.55;
}

/* Первый абзац подзаголовка — отступ от H1; второй — как продолжение блока */
.hero-screen__text > .hero-screen__sub:first-of-type {
  margin-top: 14px;
}

.hero-screen__sub + .hero-screen__sub {
  margin-top: 5px;
}

/* Подзаголовок экрана с шагами — больше воздуха до ряда карточек */
.hero-screen__sub--before-steps {
  margin-top: 4px;
  margin-bottom: clamp(22px, 3.5vw, 36px);
  text-align: center;
}

.hero-screen__cta {
  margin-top: clamp(8px, 1.5vw, 14px);
  text-align: center;
  width: 100%;
}

/* Горизонтальная галерея 9:16 (внутри .container — как остальной контент) */
.gallery-rail-wrap {
  width: 100%;
  min-width: 0;
  margin-top: clamp(18px, 3.5vw, 32px);
  margin-bottom: clamp(12px, 2.5vw, 22px);
  flex: 0 0 auto;
  display: block;
  /* Слабее слева — чтобы первое фото не «пряталось» за градиентом */
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 2%,
    #000 98%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 2%,
    #000 98%,
    transparent 100%
  );
}

.gallery-rail {
  display: flex;
  gap: clamp(14px, 2.2vw, 22px);
  overflow-x: auto;
  overflow-y: hidden;
  /* Без отступа 50% — иначе при загрузке слева пусто, первые карточки «уезжают» вправо */
  padding: clamp(16px, 2.8vw, 26px) max(12px, env(safe-area-inset-right))
    clamp(20px, 3.2vw, 32px) 0;
  scroll-padding-inline: 0;
  /* proximity: колёсико не «прилипает» к карточкам так агрессивно, как при mandatory */
  scroll-snap-type: x proximity;
  scroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
}

.gallery-rail::-webkit-scrollbar {
  display: none;
}

.gallery-card {
  flex: 0 0 auto;
  /* Не выше половины экрана — чтобы первый экран помещался на монитор */
  width: var(--gallery-card-used);
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  scroll-snap-align: start;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 16px 48px rgba(26, 43, 60, 0.1);
  background: linear-gradient(
    160deg,
    rgba(0, 149, 255, 0.2),
    rgba(112, 0, 255, 0.15),
    rgba(255, 255, 255, 0.5)
  );
  position: relative;
}

/* Фото в карточке: положите файлы в landing/images/gallery/ и подключите <img> первым ребёнком */
.gallery-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  display: block;
}

.gallery-card:has(> img) {
  background: #1a2b3c;
}

.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 30% 20%,
    rgba(255, 255, 255, 0.55),
    transparent 45%
  );
  pointer-events: none;
  z-index: 1;
}

.gallery-card:has(> img)::after {
  background: linear-gradient(
    180deg,
    transparent 55%,
    rgba(0, 0, 0, 0.35) 100%
  );
}

.gallery-card__label {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(10px, 2.4vw, 12px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(26, 43, 60, 0.45);
  z-index: 2;
}

.gallery-card:has(> img) .gallery-card__label {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

/* ——— Боли (3 в ряд) ——— */
.pain-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 860px) {
  .pain-row {
    grid-template-columns: 1fr;
  }
}

.pain-pill {
  padding: 22px 20px;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.95);
  position: relative;
  z-index: 0;
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Лёгкий «живой» фон: медленный дрейф градиента вместо вращающегося конуса */
.pain-pill::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: linear-gradient(
    115deg,
    rgba(0, 149, 255, 0.06) 0%,
    rgba(112, 0, 255, 0.1) 35%,
    rgba(0, 149, 255, 0.08) 55%,
    rgba(112, 0, 255, 0.06) 78%,
    rgba(255, 255, 255, 0.04) 100%
  );
  background-size: 220% 220%;
  animation: pain-shimmer 16s ease-in-out infinite;
  opacity: 0.85;
  pointer-events: none;
}

.pain-row .pain-pill:nth-child(2)::before {
  animation-delay: -5.5s;
}

.pain-row .pain-pill:nth-child(3)::before {
  animation-delay: -11s;
}

@media (hover: hover) {
  .pain-pill:hover {
    transform: translateY(-4px) scale(1.035);
    z-index: 2;
    box-shadow: 0 18px 44px rgba(0, 149, 255, 0.12),
      0 8px 24px rgba(112, 0, 255, 0.08);
  }

  .pain-pill:hover::before {
    opacity: 1;
  }
}

.pain-pill > span {
  position: relative;
  z-index: 1;
}

@keyframes pain-shimmer {
  0%,
  100% {
    background-position: 8% 40%;
  }
  50% {
    background-position: 92% 60%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pain-pill {
    transition: none;
  }

  .pain-pill:hover {
    transform: none;
    box-shadow: none;
  }

  .pain-pill::before {
    animation: none;
    background-position: 50% 50%;
    opacity: 0.55;
  }

  .pain-pill:hover::before {
    opacity: 0.55;
  }
}

.pain-pill__inner {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: calc(var(--radius) - 2px);
  padding: 18px 14px;
  margin: 2px;
  transition: background 0.35s ease;
}

@media (hover: hover) {
  .pain-pill:hover .pain-pill__inner {
    background: rgba(255, 255, 255, 0.94);
  }
}

/* ——— Утверждения ——— */
.assert {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 24px 28px;
  font-weight: 700;
  font-size: clamp(15px, 2vw, 18px);
  text-align: center;
  line-height: 1.5;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.88))
      padding-box,
    linear-gradient(135deg, rgba(0, 149, 255, 0.25), rgba(112, 0, 255, 0.3)) border-box;
  box-shadow: 0 14px 40px rgba(15, 35, 66, 0.14);
  width: min(720px, 100%);
  margin-inline: auto;
}

/* Тот же верхний цветовой эффект, что в хедере карточек шагов 1–3 (.step-card-mini::before) */
.assert::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 110px;
  background:
    linear-gradient(
      90deg,
      rgba(248, 251, 255, 0.38) 0%,
      rgba(248, 251, 255, 0.1) 8%,
      transparent 18%,
      transparent 82%,
      rgba(248, 251, 255, 0.1) 92%,
      rgba(248, 251, 255, 0.38) 100%
    ),
    radial-gradient(
      ellipse 100% 220% at 50% 0%,
      rgba(186, 106, 255, 0.26) 0%,
      rgba(151, 120, 255, 0.16) 28%,
      rgba(108, 132, 255, 0.08) 54%,
      rgba(248, 251, 255, 0) 88%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.36) 40%,
      rgba(255, 255, 255, 0.9) 100%
    );
  opacity: 0.98;
  pointer-events: none;
  filter: blur(8px);
  z-index: 0;
  border-radius: inherit;
}

.assert__body {
  position: relative;
  z-index: 1;
  display: block;
}

/* ——— Ряд CTA по центру ——— */
.row-center {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

/* ——— Тройной ряд загрузка / кнопка / результат ——— */
.triple-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(16px, 3vw, 28px);
  align-items: center;
  justify-items: stretch;
}

.triple-row__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 0;
  max-width: 320px;
  width: 100%;
  margin-inline: auto;
}

.triple-row__center .btn-bot {
  width: 100%;
  max-width: 320px;
}

.magic-progress-wrap {
  width: 100%;
  max-width: 320px;
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.magic-progress-wrap[hidden] {
  display: none !important;
}

.magic-progress {
  height: 12px;
  border-radius: 999px;
  background: rgba(26, 43, 60, 0.08);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.95);
}

.magic-progress__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--grad-bot-start),
    var(--grad-bot-end)
  );
  box-shadow: 0 0 14px rgba(0, 149, 255, 0.55);
  transition: width 0.08s linear;
}

.magic-progress__label {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.35;
}

@media (max-width: 900px) {
  .triple-row {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .triple-row .upload-tile,
  .triple-row .result-tile {
    justify-self: center;
  }

  .triple-row .btn-bot {
    max-width: none;
    width: 100%;
  }

  .triple-row__center {
    max-width: none;
  }
}

.upload-tile,
.result-tile {
  aspect-ratio: 9 / 16;
  max-height: 320px;
  margin-inline: auto;
  width: 100%;
  max-width: 200px;
  border-radius: var(--radius);
  border: 2px dashed rgba(0, 149, 255, 0.35);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(var(--glass-blur));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
  overflow: hidden;
  position: relative;
}

.upload-tile:hover,
.result-tile:hover {
  border-color: rgba(112, 0, 255, 0.45);
  box-shadow: 0 8px 32px rgba(0, 149, 255, 0.15);
}

.upload-tile__label,
.result-tile__label {
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
}

.upload-tile input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-tile__preview {
  position: absolute;
  inset: 0;
  object-fit: cover;
  border-radius: var(--radius);
  display: none;
}

.upload-tile.has-preview .upload-tile__preview {
  display: block;
}

.upload-tile.has-preview .upload-tile__label {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  z-index: 2;
  text-shadow: 0 1px 8px #fff;
}

.result-tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  display: none;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.result-tile.has-result .result-tile__img {
  display: block;
}

.result-tile.has-result .result-tile__label {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  z-index: 2;
  text-shadow: 0 1px 8px #fff;
}

.result-tile {
  cursor: default;
}

/* Блоки загрузки / результата на 2-м экране: крупнее и ближе к центральной колонке */
.triple-row .upload-tile,
.triple-row .result-tile {
  max-width: min(260px, 100%);
  max-height: min(420px, 52vh);
  width: 100%;
}

.triple-row .upload-tile {
  justify-self: end;
  margin-inline: 0;
}

.triple-row .result-tile {
  justify-self: start;
  margin-inline: 0;
}

/* ——— Экран «как работает» ——— */
.steps-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

@media (max-width: 800px) {
  .steps-3 {
    grid-template-columns: 1fr;
  }
}

.step-col__title {
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 14px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.step-col__title::before {
  content: attr(data-step);
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--grad-bot-start), var(--grad-bot-end));
  box-shadow: 0 6px 16px rgba(0, 149, 255, 0.35);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* В шагах «Как это работает?» и в карточках «Возможности» заголовок и цифра выравниваются к левому краю карточки */
.steps-3 .step-col__title,
.extras-grid .step-col__title {
  justify-content: flex-start;
  text-align: left;
}

/* Плейсхолдер: размер задаётся в HTML через --ph-w и --ph-max-h */
.photo-placeholder {
  width: var(--ph-w, 100%);
  max-width: 100%;
  max-height: var(--ph-max-h, 280px);
  aspect-ratio: var(--ph-ar, 4 / 3);
  margin-inline: auto;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: linear-gradient(
    145deg,
    rgba(0, 149, 255, 0.12),
    rgba(112, 0, 255, 0.1),
    rgba(255, 255, 255, 0.75)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(26, 43, 60, 0.35);
  font-weight: 700;
  font-size: 13px;
  overflow: hidden;
}

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

/* Скриншоты вместо текста «фото позже»: положите файлы в landing/images/steps/ */
.photo-placeholder--image {
  position: relative;
  padding: 0;
  background: #0f172a;
}

.photo-placeholder--image > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: inherit;
}

.extras-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 800px) {
  .extras-grid {
    grid-template-columns: 1fr;
  }
}

.extra-card {
  border-radius: var(--radius);
  min-height: 148px;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.extra-card__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  padding: 22px 16px 24px;
  box-sizing: border-box;
  text-align: center;
}

.extra-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  color: var(--grad-bot-start);
  filter: drop-shadow(0 4px 12px rgba(0, 149, 255, 0.25));
}

.extra-card__icon svg {
  width: 100%;
  height: 100%;
}

.extra-card__text {
  font-weight: 700;
  font-size: clamp(14px, 1.45vw, 16px);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* Скрины в блоках «Возможности telegram бота»: выше и на всю ширину карточки */
.extras-placeholder {
  /* Переопределяем базовый плейсхолдер: даём блоку расти по высоте под полный скрин */
  width: 100%;
  max-width: 100%;
  max-height: none;
  aspect-ratio: auto;
  height: auto;
  background: transparent;
  border: none;
}

.extras-placeholder > img {
  /* Важнее показать весь скрин без обрезаний */
  position: static;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Точно такое же поведение для скринов под заголовком «Как это работает в нашем telegram боте» */
.steps-placeholder {
  width: 100%;
  max-width: 100%;
  max-height: none;
  aspect-ratio: auto;
  height: auto;
  background: transparent;
  border: none;
}

.steps-placeholder > img {
  position: static;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* В секциях «Как это работает…» и «Возможности telegram бота» стеклянные карточки визуально сливаются с фоном */
.steps-3 .glass,
.extras-grid .glass {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

/* В карточках «Возможности» контент выравниваем по левому краю, как в шагах выше */
.extras-grid .extra-card__inner {
  align-items: flex-start;
  text-align: left;
}

/* ——— Почему мы ——— */
.why-title {
  text-align: center;
  font-weight: 800;
  font-size: clamp(22px, 3.5vw, 30px);
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 28px;
  margin-top: 0;
  letter-spacing: -0.02em;
}

.why-title--tight {
  margin-bottom: 6px;
}

.steps-row-mini {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
  align-items: stretch;
}

.steps-row-mini > .step-card-mini {
  min-height: 0;
}

@media (max-width: 900px) {
  .steps-row-mini {
    grid-template-columns: 1fr;
  }
}

.step-card-mini {
  border-radius: var(--radius);
  padding: 0;
  border-width: 0;
  cursor: default;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: visible;
}

.step-card-mini__inner {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  /* Единый отступ сверху — иконки в ряду 1/2/3 на одной высоте (как в шаге 3) */
  padding: 12px 16px 20px;
  box-sizing: border-box;
  min-height: calc(3.6 * 140px);
  position: relative;
  z-index: 1;
}

/* Шаг 2: текст + иконка в одной строке, фото — на всю ширину карточки по центру */
.step-card-mini__inner--with-bottom-photo {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.step-card-mini__top-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}

.step-card-mini__content {
  flex: 1 1 auto;
  min-width: 0;
}

.step-card-mini__icon {
  flex: 0 0 auto;
  margin-left: 12px;
}

.step-card-mini__icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
}

/* Иконки в шагах 1–3: один размер и положение относительно текста (база .why-card__icon 48px) */
.step-card-mini .step-card-mini__icon.why-card__icon {
  width: 96px;
  height: 96px;
}

/* Хедер 1/2/3: верхний подкрас; по краям лёгкое смягчение, центр насыщеннее */
.step-card-mini::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 110px;
  background:
    linear-gradient(
      90deg,
      rgba(248, 251, 255, 0.38) 0%,
      rgba(248, 251, 255, 0.1) 8%,
      transparent 18%,
      transparent 82%,
      rgba(248, 251, 255, 0.1) 92%,
      rgba(248, 251, 255, 0.38) 100%
    ),
    radial-gradient(
      ellipse 100% 220% at 50% 0%,
      rgba(186, 106, 255, 0.26) 0%,
      rgba(151, 120, 255, 0.16) 28%,
      rgba(108, 132, 255, 0.08) 54%,
      rgba(248, 251, 255, 0) 88%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.36) 40%,
      rgba(255, 255, 255, 0.9) 100%
    );
  opacity: 0.98;
  pointer-events: none;
  filter: blur(8px);
}

.step-card-mini__label {
  width: 100%;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(26, 43, 60, 0.7);
  margin-top: 0;
  margin-bottom: 4px;
  text-align: left;
}

.step-card-mini__text {
  width: 100%;
  margin: 0;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.4;
  text-align: left;
  letter-spacing: 0;
  color: var(--text);
}

.step-card-mini__variants {
  margin: 52px 0 0;
  padding-left: 18px;
  list-style: disc;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
}

.step-card-mini__variants li + li {
  margin-top: 2px;
}

/* Шаг 3: минимальная высота в ряду с шагами 1–2; сетка фото — квадратная, не растягивается от картинок */
.step-card-mini--step3.step-card-mini {
  display: flex;
  flex-direction: column;
  min-height: calc(3.6 * 140px);
}

/* Шаг 3: inner растягивается по высоте карточки (padding-top — общий у .step-card-mini__inner) */
.step-card-mini--step3 .step-card-mini__inner {
  flex: 1 1 auto;
  min-height: 0;
}

/* Шаг 3: список ближе к заголовку и хедеру карточки */
.step-card-mini--step3 .step-card-mini__variants {
  margin-top: 28px;
  font-size: 13px;
  line-height: 1.55;
}

/* Квадрат под текстом во 2-м шаге — фото без рамки; при hover — лёгкое увеличение и тень */
.step-card-mini__photo-slot {
  margin-top: 0;
  width: min(100%, 232px);
  margin-inline: auto;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  border: none;
  background: transparent;
  box-sizing: border-box;
  overflow: hidden;
  flex-shrink: 0;
  isolation: isolate;
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease;
  will-change: transform, box-shadow;
}

.step-card-mini__photo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

@media (hover: hover) {
  .step-card-mini__photo-slot:hover,
  .step-card-mini__photo-square:hover {
    transform: scale(1.08);
    box-shadow:
      0 22px 44px rgba(26, 43, 60, 0.2),
      0 10px 28px rgba(0, 149, 255, 0.22),
      0 4px 12px rgba(112, 0, 255, 0.12);
    z-index: 2;
  }
}

/* Шаг 3: сетка 2×2, ячейки делят всё оставшееся место под блоком с текстом */
.step-card-mini--step3 .step-card-mini__top-row {
  flex-shrink: 0;
}

.step-card-mini__photo-grid {
  display: grid;
  width: 100%;
}

.step-card-mini--step3 .step-card-mini__photo-grid {
  flex: 0 0 auto;
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  /* Строки по высоте квадратов — без раздувания от intrinsic height картинки (9:16 и т.п.) */
  grid-template-rows: repeat(2, auto);
  gap: 10px;
  align-self: stretch;
}

/* Шаг 3: те же приёмы, что у фото во 2-м шаге — без рамки, скругление 8px, hover scale + тень */
.step-card-mini__photo-square {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  min-width: 0;
  min-height: 0;
  border-radius: 8px;
  border: none;
  background: transparent;
  box-sizing: border-box;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease;
  will-change: transform, box-shadow;
}

/* Картинка не участвует в расчёте высоты ячейки — квадрат задаётся aspect-ratio родителя */
.step-card-mini__photo-square .step-card-mini__photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.step-card-mini__note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
  color: var(--text-muted);
}

/* Шаг 1: подпись на всю ширину карточки, по центру */
.step-card-mini__note--full {
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-inline: 6px;
  box-sizing: border-box;
}

/*
 * Шаг 1: в ряду карточки одной высоты с шагом 3 — inner на всю высоту,
 * примечание в нижней зоне по центру по вертикали и горизонтали (не у нижнего края).
 */
.step-card-mini--step1.step-card-mini {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.step-card-mini--step1 .step-card-mini__inner.step-card-mini__inner--with-bottom-photo {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-card-mini--step1 .step-card-mini__top-row {
  flex-shrink: 0;
}

.step-card-mini--step1 .step-card-mini__note-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 4px 6px;
  box-sizing: border-box;
}

.step-card-mini--step1 .step-card-mini__note {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: rgba(26, 43, 60, 0.68);
  text-align: center;
  max-width: 100%;
}

.step-card-mini__hint,
.step-card-mini__hint-title {
  margin: 52px 0 4px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
}

.step-card-mini__hint-title {
  margin-top: 10px;
  margin-bottom: 4px;
  font-weight: 700;
}

.step-card-mini__tips {
  margin: 0;
  padding-left: 18px;
  list-style: disc;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
}

.step-card-mini__tips li + li {
  margin-top: 2px;
}

@media (hover: hover) {
  .step-card-mini:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 60px rgba(0, 149, 255, 0.18),
      0 10px 30px rgba(112, 0, 255, 0.16);
  }
}

/* После ряда со скриншотами (иначе margin из .why-title перебивал бы отступ — не используйте margin shorthand на базовом .why-title для top) */
.why-title--after-steps {
  /* Чуть ближе к блоку со скринами, чем обычная секция */
  margin-top: calc(var(--space-section) * 0.6);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  max-width: 1100px;
  margin-inline: auto;
}

@media (min-width: 1100px) {
  .why-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .why-grid {
    grid-template-columns: 1fr;
  }

  .why-card {
    min-height: 0;
  }

  .why-card__inner {
    padding: 22px 18px 24px;
  }
}

.why-card {
  padding: 0;
  border-radius: var(--radius);
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.why-card__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  padding: 24px 18px 26px;
  box-sizing: border-box;
  text-align: center;
}

.why-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  color: var(--grad-bot-start);
  filter: drop-shadow(0 4px 12px rgba(0, 149, 255, 0.25));
}

.why-card__icon svg {
  width: 100%;
  height: 100%;
}

.why-card__title,
.why-card__text {
  font-weight: 700;
  font-size: clamp(15px, 1.55vw, 17px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
}

.why-card__desc {
  margin: 0;
  max-width: 42ch;
  font-weight: 500;
  font-size: clamp(13px, 1.35vw, 15px);
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}

.why-card__desc strong {
  font-weight: 700;
  color: var(--text);
}

/* ——— Тарифы ——— */
/* Внутри .stack gap дублировался с margin заголовка; блок в .tariffs-section без лишнего gap между h2 и плиткой */
.tariffs-section {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Отступ сверху после ассертов; снизу у заголовка — как у «Почему выбирают нас?» (.why-title = 28px) */
.why-title.why-title--tariffs {
  margin-top: clamp(20px, 4vw, 40px);
}

/* Как у кнопки под why-grid на экране «Почему выбирают нас?» (row-center margin-top: 28px) */
.tariffs-section__cta {
  margin-top: 28px;
}

.tariff-intro {
  max-width: 480px;
  width: 100%;
  margin-inline: auto;
  box-sizing: border-box;
  padding: 26px 24px;
  text-align: center;
  font-weight: 800;
  font-size: clamp(17px, 2.4vw, 20px);
  line-height: 1.5;
  border-radius: var(--radius);
  white-space: pre-line;
}

.pricing-grid {
  display: grid;
  /* Сохраняем исходную «пятирядную» сетку по ширине — карточки остаются того же размера,
     даже если сейчас используем только три тарифа. */
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

/* Когда в сетке осталось 3 тарифа — центрируем их, занимая колонки 2–4 */
.pricing-grid .price-card:nth-child(1) {
  grid-column: 2;
}
.pricing-grid .price-card:nth-child(2) {
  grid-column: 3;
}
.pricing-grid .price-card:nth-child(3) {
  grid-column: 4;
}

@media (max-width: 1000px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

.price-card {
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  font-weight: 800;
  font-size: 17px;
  line-height: 1.55;
  border: 1px solid rgba(255, 255, 255, 0.95);
  white-space: pre-line;
}

.price-card--1 {
  background: linear-gradient(160deg, #e8f4ff, #fff);
}
.price-card--2 {
  background: linear-gradient(160deg, #f0e8ff, #fff);
}
.price-card--3 {
  background: linear-gradient(160deg, #e8fff5, #fff);
}
.price-card--4 {
  background: linear-gradient(160deg, #fff5e8, #fff);
}
.price-card--5 {
  background: linear-gradient(160deg, #ffe8f4, #fff);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-block);
}

.footer-mini {
  text-align: center;
  padding: 32px 16px 48px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

/* ——— Модалка выбора пола (как gender_male / gender_female в боте → male / female в промпте) ——— */
.gender-modal[hidden] {
  display: none !important;
}

.gender-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

.gender-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 43, 60, 0.45);
  backdrop-filter: blur(6px);
}

.gender-modal__panel {
  position: relative;
  z-index: 1;
  width: min(400px, 100%);
  padding: 28px 24px 22px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  text-align: center;
}

.gender-modal__title {
  margin: 0;
  font-size: clamp(20px, 4vw, 24px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.gender-modal__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  font-weight: 600;
}

.gender-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gender-modal__actions .btn-bot {
  width: 100%;
}

.gender-modal__cancel {
  margin-top: 4px;
  align-self: center;
  padding: 10px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gender-modal__cancel:hover {
  color: var(--text);
}
