:root {
  --bg: #050507;
  --panel: rgba(255, 255, 255, 0.05);
  --panel-strong: rgba(255, 255, 255, 0.1);
  --text: #f5f6fb;
  --muted: #c1c4d0;
  --accent: #ff3b63;
  --accent-2: #5bc0ff;
  --outline: rgba(255, 255, 255, 0.18);
  --font-main: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
    "Noto Sans", sans-serif;
  /* Fluid type scale */
  --fs-body: clamp(14px, calc(1vw + 12px), 18px);
  --fs-body-sm: calc(var(--fs-body) * 0.9);
  --fs-body-xs: calc(var(--fs-body) * 0.82);
  --fs-body-lg: calc(var(--fs-body) * 1.12);
  --step-number-size: 64px;
}

body[data-page="stub"] {
  height: 100%;
  width: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  position: fixed;
  inset: 0;
  font-family: var(--font-main);
  color: #111;
  background: #fff;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

* {
  box-sizing: border-box;
  font-family: var(--font-main);
}

html {
  scrollbar-width: none; /* Firefox */
}

html::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

body {
  margin: 0;
  font-family: var(--font-main);
  font-size: var(--fs-body);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--text);
  text-decoration: none;
}

.head {
  /* position: absolute; */
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 10px 5vw;
  background: rgba(0, 0, 0, 0.01);
  display: flex;
  justify-content: center;
}

.logo-container {
  width: 30vw;
  height: auto;
}

.logo-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.page-container {
  width: 100%;
}

.main-content {
  position: relative;
  overflow: hidden;
}

.bg-parallax {
  position: fixed;
  inset: 0; /* без отрицательных отступов проще контролировать */
  background: linear-gradient(180deg, #0f131a, #0b0d10 56%, #0b0d10);
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bg-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 1;
  will-change: transform;
}

/* Тёплый круг снизу-слева */
.bg-circle.red {
  /* ширина: минимум 700px, «идеал» 55vw, максимум 1300px */
  width: clamp(1000px, 80vw, 1300px);
  aspect-ratio: 4 / 3; /* овальная форма */

  /* позиция относительно окна */
  top: 60%;
  left: -18%;
  transform: translate(-10%, -10%);

  background: radial-gradient(
    closest-side,
    rgba(227, 19, 40, 0.18),
    transparent 55%
  );
}

/* Холодный круг сверху-справа */
.bg-circle.blue {
  width: clamp(1000px, 80vw, 1300px);
  aspect-ratio: 4 / 3;

  top: -10%;
  right: -15%;
  transform: translate(10%, 0);

  background: radial-gradient(
    closest-side,
    rgba(33, 150, 243, 0.18),
    transparent 55%
  );
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 10px 5vw;
  background: rgba(5, 5, 7, 0.98);
  transform: translateY(-110%);
  opacity: 0;
  transition: transform 0.7s ease, opacity 0.7s ease;
}

.navbar.is-visible {
  transform: translateY(0);
  opacity: 1;
}

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

.navbar-inner {
  /* max-width: 1180px; */
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

@media (max-width: 900px) and (orientation: landscape) {
  .nav-right {
    max-height: calc(70dvh - 82px - env(safe-area-inset-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
}

.nav-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: var(--fs-body-sm);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.nav-links a {
  position: relative;
  color: var(--text);
  padding: 4px 0 4px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
  opacity: 0.85;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-links a.is-active {
  color: var(--accent);
}

.nav-links a.is-active::after {
  transform: scaleX(1);
}

.cta-button {
  border-radius: 24px;
  padding: 8px 18px;
  border: 1px solid var(--text);
  cursor: pointer;
  font-weight: 500;
  font-size: var(--fs-body-sm);
  background: transparent;
  color: var(--text);
  text-transform: uppercase;
}

.nav-toggle {
  display: none; /* по умолчанию скрыт (десктоп) */
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--text);
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease, width 0.2s ease;
  transform-origin: center; /* важно */
}

/* состояние "открыто" */
.nav-toggle.is-open span:nth-child(1),
.nav-toggle.is-open span:nth-child(3) {
  width: 20px; /* чуть короче чтобы влезало в круг */
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
  width: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero-section {
  position: relative;
  padding: 140px 5vw 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 70% 10%,
      rgba(106, 225, 255, 0.2),
      transparent 40%
    ),
    linear-gradient(
      180deg,
      rgba(12, 12, 16, 0.05) 0%,
      rgba(12, 12, 16, 0.75) 70%,
      var(--bg) 100%
    );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-subtitle {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: var(--fs-body-xs);
  margin: 0 0 12px;
}

.hero-title {
  font-family: var(--font-main);
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  margin-bottom: 14px;
}

.title-dark {
  color: var(--text);
}

.title-light {
  color: var(--accent);
}

.hero-description {
  color: var(--muted);
  font-size: var(--fs-body-lg);
  line-height: 1.6;
  margin: 72px 0 22px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.hero-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: var(--fs-body-sm);
}

section {
  position: relative;
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 34px;
}

.section-header h2,
.quality-title,
.story-title {
  font-family: var(--font-main);
  font-size: clamp(28px, 4vw, 46px);
  margin: 0;
}

.section-divider {
  width: 15vw;
  height: 3px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-radius: 2px;
  margin-top: 12px;
}

.process-section {
  padding: 100px 5vw 60px;
}

.process-content {
  margin-top: 32px;
}

.process-steps {
  position: relative;
  display: grid;
  gap: 36px;
  padding: 10px 0;
}

.process-steps::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(
    180deg,
    rgba(255, 59, 99, 0) 0%,
    rgba(255, 59, 99, 0.35) 12%,
    rgba(91, 192, 255, 0.35) 88%,
    rgba(91, 192, 255, 0) 100%
  );
  transform: translateX(-50%);
}

.step-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr);
  align-items: center;
  position: relative;
  gap: 10px;
}

.step-row.left .step-card,
.step-row.left .ai-analysis-card,
.step-row.left .selection-card,
.step-row.left .recommendations-card {
  grid-column: 3;
}

.step-row.right .step-card,
.step-row.right .ai-analysis-card,
.step-row.right .selection-card,
.step-row.right .recommendations-card {
  grid-column: 1;
}

.step-card,
.ai-analysis-card,
.selection-card,
.recommendations-card {
  background: var(--panel);
  padding: 20px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.step-content h3,
.ai-analysis-card h3,
.selection-card h3,
.recommendations-card h3 {
  margin: 8px 0 10px;
}

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

.step-icon,
.rec-icon,
.feature-icon,
.contact-icon {
  width: 32px;
  height: 32px;
}

.step-description {
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}

.important-description {
  margin-top: 12px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.important-description p {
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.step-number {
  justify-self: center;
  align-self: center;
  font-size: calc(var(--fs-body) * 2.2);
  font-weight: 700;
  color: var(--text);
  width: var(--step-number-size);
  height: var(--step-number-size);
  border-radius: 50%;
  background: transparent;
  backdrop-filter: blur(20px);
  border: 2px solid var(--text);
  display: grid;
  place-items: center;
  grid-column: 2;
}

.step-number p {
  margin: 0 0 4px 0;
}

.process-cta,
.quality-cta,
.partnership-cta {
  display: flex;
  justify-self: center;
  justify-content: center;
  text-transform: uppercase;
  margin-top: 50px;
  padding: 10px 16px;
  min-width: 250px;
  border-radius: 24px;
  border: 1px solid var(--text);
  cursor: pointer;
  font-weight: 400;
  font-size: calc(var(--fs-body) * 1.05);
  background: transparent;
  text-align: center;
  color: var(--text);
}

.quality-section {
  padding: 90px 5vw 70px;
  background: transparent;
}

.quality-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.08;
}

.quality-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 32px;
}

.quality-subtitle {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-size: var(--fs-body-xs);
  margin: 0 0 10px;
}

.quality-description {
  color: var(--muted);
  line-height: 1.6;
}

.quality-features {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.feature-card {
  background: var(--panel);
  padding: 16px;
  border-radius: 14px;
}

.feature-card p {
  color: var(--muted);
}

.quality-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.quality-circle {
  width: 240px;
  height: 240px;
}

.quality-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.faq-reviews-section {
  padding: 90px 5vw;
}

.faq-reviews-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
}

/* FAQ — аккордеон */

.faq-column {
  width: 100%;
}

.faq-items {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border-radius: 14px;
  padding: 14px;
  background: var(--panel);
  cursor: pointer;
}

.faq-question {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  cursor: pointer; /* важно для клика */
}

.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

/* блок с ответом — плавное раскрытие */
.faq-answer {
  color: var(--muted);
  line-height: 1.6;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
  transition: max-height 0.3s ease, opacity 0.25s ease;
}

/* когда пункт открыт */
.faq-item.is-open .faq-answer {
  opacity: 1;
}

/* поворот стрелки при открытии */
.faq-item.is-open .faq-icon {
  transform: rotate(180deg);
}

.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== TESTIMONIAL SLIDER ===== */

.testimonial-slider-wrapper {
  position: relative;
  width: 100%;
  margin: 0 auto;
  margin-top: 18px;
  padding: 18px 18px 22px;
  border-radius: 18px;
  background: transparent;
  overflow: hidden;
  touch-action: pan-y;
}

/* Навигация (стрелки) */
.testimonial-nav {
  position: relative;
  display: flex;
  gap: 12px;
  z-index: 5;
  margin-bottom: 14px;
}

.testimonial-arrow {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: none;
  background: var(--text);
  color: var(--bg);
  font-size: calc(var(--fs-body) * 2);
  padding-bottom: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.testimonial-arrow:hover {
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.testimonial-arrow:active {
  transform: translateY(0);
}

/* Трек и слайды */
.testimonial-slider-track {
  position: relative;
  display: flex;
  gap: 24px;
  min-height: 240px;
  width: max-content;
  will-change: transform;
}

.testimonial-slider-wrapper:hover .testimonial-slider-track,
.testimonial-slider-wrapper:focus-within .testimonial-slider-track {
  animation-play-state: paused;
}

.testimonial-slide {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  flex: 0 0 320px;
}

/* базовая видимость первой, если GSAP не подгрузился */
.testimonial-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* внутри используем существующий .review-card */
.testimonial-slide .review-card {
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* Review card visuals */
.review-card {
  background: var(--panel);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  backdrop-filter: blur(6px);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.reviewer-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reviewer-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
}

.reviewer-details h4 {
  margin: 0;
  font-size: calc(var(--fs-body) * 1.05);
}

.reviewer-details p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: var(--fs-body-xs);
}

.rating {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.review-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: var(--fs-body);

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

.product-logo {
  width: 120px;
  border-radius: 12px;
  height: auto;
  object-fit: contain;
}

.product-details .brand-name {
  font-weight: 700;
}

.product-details .product-name {
  color: var(--muted);
  font-size: var(--fs-body-xs);
}

@media (max-width: 900px) {
  .testimonial-slider-wrapper {
    max-width: 100%;
  }

  .testimonial-slider-track {
    gap: 16px;
  }

  .testimonial-slide {
    flex-basis: 280px;
  }

  .review-card {
    padding: 16px;
  }

  .review-text {
    font-size: var(--fs-body-sm);
    line-height: 1.5;
  }

  .reviewer-avatar {
    width: 52px;
    height: 52px;
  }

  .product-logo {
    width: 80px;
    border-radius: 12px;
    height: auto;
    object-fit: contain;
  }
}

@media (max-width: 600px) {
  .testimonial-slider-wrapper {
    padding: 14px 12px 18px;
  }

  .testimonial-slide {
    flex-basis: 220px;
  }

  .testimonial-slider-track {
    gap: 12px;
  }

  .review-card {
    padding: 14px;
  }

  .review-text {
    font-size: var(--fs-body-xs);
  }

  .reviewer-avatar {
    width: 48px;
    height: 48px;
  }
}

.partnership-section {
  padding: 90px 5vw;
  background: transparent;
}

.partnership-header h2 {
  margin: 0 0 12px;
}

.partnership-header p {
  color: var(--muted);
  line-height: 1.6;
  max-width: 720px;
}

.partnership-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.partnership-card {
  background: var(--panel);
  padding: 18px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
}

.partnership-card p {
  color: var(--muted);
}

.partnership-card h3 {
  text-align: start;
  margin: 0;
}

.learn-more {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-align: center;
  margin-top: auto;
}

.team-section {
  padding: 90px 5vw;
}

.team-content {
  display: grid;
  gap: 30px;
}

.team-story {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 20px;
  align-items: center;
}

.story-image {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--outline);
  object-fit: cover;
}

.story-title {
  font-size: clamp(26px, 4vw, 44px);
  display: block;
}

.story-title .title-accent {
  color: var(--accent);
  display: block;
}

.story-description p {
  color: var(--muted);
  line-height: 1.6;
}

.team-members {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.team-member {
  background: var(--panel);
  border: 1px solid var(--outline);
  padding: 16px;
  border-radius: 14px;
  text-align: center;
}

.member-avatar img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--outline);
}

.member-role {
  color: var(--muted);
  margin: 4px 0 6px;
}

.member-quote {
  color: var(--muted);
  font-size: var(--fs-body-sm);
  margin: 0;
}

.contact-section {
  padding: 90px 5vw;
  background: transparent;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.contact-description {
  color: var(--muted);
  line-height: 1.6;
}

.contact-details {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.contact-item {
  display: flex;
  gap: 10px;
  align-items: center;
}

.contact-icon {
  width: 28px;
  height: 28px;
}

.contact-label {
  color: var(--muted);
  font-size: var(--fs-body-xs);
}

.contact-value {
  font-weight: 700;
}

.contact-value a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 2px;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.contact-value a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.contact-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.contact-btn {
  border: 1px solid var(--outline);
  background: var(--panel);
  padding: 10px 16px;
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
}

.contact-btn.ghost {
  background: transparent;
}

.contact-form-container {
  background: var(--panel);
  padding: 18px;
  border-radius: 14px;
}

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

.contact-form .cta-button {
  border: 1px solid var(--outline);
}

.form-group {
  display: grid;
  gap: 6px;
}

label {
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--outline);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-family: var(--font-main);
  outline: 0;
}

.form-submit {
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #0c0c10;
  font-weight: 700;
  cursor: pointer;
}

.footer {
  padding: 28px 5vw 40px;
  background: rgba(12, 12, 16, 0.9);
}

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

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer a {
  color: var(--muted);
  font-size: var(--fs-body-sm);
}

@media (max-width: 1100px) {
  .process-step {
    grid-template-columns: 1fr;
  }

  .quality-content,
  .team-story,
  .contact-content {
    grid-template-columns: 1fr;
  }

  .faq-reviews-content {
    grid-template-columns: 1fr;
  }

  .bg-circle.red {
    top: 55%;
    left: -25%;
    /* width: clamp(480px, 90vw, 900px); */
  }

  .bg-circle.blue {
    top: -18%;
    right: -28%;
    /* width: clamp(520px, 95vw, 950px); */
  }

  .quality-visual {
    display: none;
  }
}

@media (max-width: 800px) {
  .process-steps::before {
    display: none;
  }

  .step-row {
    grid-template-columns: 1fr;
    max-width: 100vw;
  }

  .step-row .step-card,
  .step-row .ai-analysis-card,
  .step-row .selection-card,
  .step-row .recommendations-card {
    grid-column: 1;
  }

  .step-number {
    justify-self: start;
    margin-bottom: 10px;
  }

  .hero-section {
    padding-top: 180px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .contact-btn {
    width: 100%;
    text-align: center;
  }

  .bg-circle.red {
    top: 65%;
    left: -60%;
    /* width: clamp(480px, 90vw, 900px); */
  }

  .bg-circle.blue {
    top: -35%;
    right: -60%;
    /* width: clamp(520px, 95vw, 950px); */
  }

  .quality-visual {
    display: none;
  }

  .partnership-cards {
    grid-template-columns: 1fr;
  }
}

/* Мобильная/планшетная версия */
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  /* правая часть превращается в выпадающий блок */
  .nav-right {
    position: fixed;
    top: 82px; /* высота шапки */
    left: 0;
    right: 0;
    padding: 14px 16px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    border-radius: 0 0 18px 18px;
    background: rgba(5, 5, 7, 0.98);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .nav-right.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    border-bottom: 1px solid var(--outline);
  }

  .nav-links {
    flex-direction: column;
    gap: 10px;
  }

  .nav-links a {
    padding: 4px 0;
  }

  .cta-button {
    width: 100%;
    text-align: center;
  }

  /* чтобы hero не прилипал к самому верху */
  .hero-section {
    padding-top: 120px;
  }
}

/* Десктоп */
@media (min-width: 901px) {
  .nav-right {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}

/* ============ SWIPE NAVIGATION ============ */

/* Общий viewport для intro.html */
.swipe-viewport {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

/* Текущая заглушка */
.swipe-current {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Превью второй страницы (hero-section) */
.swipe-next-preview {
  position: absolute;
  inset: 0;
  z-index: 5;
  transform: translateY(100%);
  will-change: transform;
  background: #000;
}

/* затемнение под превью */
.swipe-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(
    circle at top,
    rgba(0, 0, 0, 0.35),
    rgba(0, 0, 0, 0.85)
  );
  opacity: 0;
  pointer-events: none;
}

/* контент заглушки */
.swipe-stub-screen {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 5vw;
}

.swipe-stub-header {
  max-width: 520px;
}

.swipe-stub-tagline {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--fs-body-xs);
  color: var(--muted);
  margin: 0 0 10px;
}

.swipe-stub-header h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 5vw, 34px);
}

.swipe-loading {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: var(--fs-body-sm);
}

/* Нижняя зона жеста на intro.html */
.swipe-drag-zone {
  position: absolute;
  left: 0;
  right: 0;
  height: 64px;
  bottom: 0;
  cursor: grab;
  touch-action: none;
  z-index: 4; /* выше контента, ниже превью, но она прозрачная */
}

.swipe-drag-zone--bottom {
  bottom: 0;
}

/* инфинитный мягкий баунс подсказки */
@keyframes swipeHintBounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-6px);
  }
}

.swipe-drag-hint {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  font-size: clamp(10px, 2.4vw, 14px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.9;
  pointer-events: none;
  white-space: nowrap;
  z-index: 3;
}

.swipe-drag-hint--sheet {
  top: 0;
  bottom: auto;
  transform: translate(-50%, 100vh);
  z-index: 10;
}

.swipe-drag-hint--sheet::before {
  content: "";
  display: block;
  width: 10vw;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  margin: 6px auto;
}

.swipe-drag-hint--bottom {
  animation: swipeHintBounce 1.6s ease-in-out infinite;
}

/* ===== Настройки превью hero + bg-parallax ===== */

.swipe-preview-root {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* bg-parallax внутри превью — НЕ fixed, а привязан к превью */
.swipe-next-preview .bg-parallax {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* hero в превью поверх фона; можно чуть убрать отступы, если нужно */
.swipe-next-preview .hero-section {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}
/* swipe �� index.html �����, ������� ������ ����� CTA */
body[data-page="main"] .swipe-back-zone {
  pointer-events: none;
  touch-action: auto;
  display: none;
}
/* ===== Оверлей интро-экрана на главной (index.html) ===== */

.intro-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 200; /* выше navbar */
  pointer-events: none; /* по умолчанию отключен */
  opacity: 0;
  transition: opacity 0.28s ease-out;
}

/* когда запускаем анимацию через JS */
.intro-preview-overlay.is-active {
  pointer-events: auto;
}

.intro-preview-overlay.is-visible {
  opacity: 1;
}

/* затемнение (используем уже имеющийся .swipe-scrim) */
.intro-preview-overlay .swipe-scrim {
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.16, 0.84, 0.44, 1);
}

.intro-preview-overlay.is-visible .swipe-scrim {
  opacity: 0.85;
}

/* панель со старой (интро) страницей: выезжает сверху вниз */
.intro-preview-panel {
  position: absolute;
  inset: 0;
  transform: translateY(-100%); /* спрятана над экраном */
  transition: transform 0.35s cubic-bezier(0.16, 0.84, 0.44, 1);
}

.intro-preview-overlay.is-visible .intro-preview-panel {
  transform: translateY(0);
}

/* чтобы интро-экран внутри панели занимал весь вьюпорт */
.intro-preview-panel .swipe-current,
.intro-preview-panel .swipe-stub-screen {
  min-height: 100vh;
}

/* ===== Intro wizard (shared between /ai and /home preview) ===== */
.swipe-viewport > .swipe-next-preview {
  position: relative;
  min-height: 100vh;
  background: #000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  /* padding-top: 20px; */
}

.swipe-viewport > .swipe-next-preview .swipe-hero-frame {
  flex: 1 1 auto;
  width: 100%;
  border: 0;
  border-radius: 36px 36px 0 0;
  min-height: 100vh;
  background: #0b0d10;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
}

.swipe-viewport > .swipe-next-preview .swipe-loading {
  position: absolute;
  z-index: 10;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  backdrop-filter: blur(8px);
}

.swipe-current {
  --ink: #0f1113;
  --muted: #6b7280;
  --line: #e9ecef;
  --brand: #e31328;
  --bg: #0b0d10;
  --glass: rgba(255, 255, 255, 0.78);
  --glass-b: rgba(17, 24, 39, 0.1);
  --shadow-xl: 0 18px 60px rgba(15, 23, 42, 0.12),
    0 6px 18px rgba(15, 23, 42, 0.08);
  --ring: conic-gradient(
    from 180deg at 50% 50%,
    #e31328,
    #ff6a88,
    #6ea8fe,
    #e31328
  );
}

.swipe-current .scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  /* background: #fff; */
}

.swipe-current .layer {
  position: absolute;
  inset: 0;
  display: block;
  will-change: transform;
  transition: transform 0.28s ease;
}

html.preinit .swipe-current .layer {
  transition: none !important;
}

.swipe-current .layer.no-transition {
  transition: none !important;
}

.swipe-current #heroLayer {
  overflow: visible;
  background: #fff;
  /* border-top: 1px solid var(--line); */
}

.swipe-current .hero {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(
      1200px 800px at 70% 30%,
      rgba(227, 19, 40, 0.18),
      transparent 40%
    ),
    radial-gradient(
      1200px 800px at 20% 70%,
      rgba(33, 150, 243, 0.18),
      transparent 42%
    ),
    linear-gradient(180deg, #12151a, #0b0d10 55%, #0b0d10);
  color: #fff;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
}

.swipe-current .hero-inner {
  display: flex;
  flex-direction: column;
  padding: 0px 0 120px;
}

.swipe-current .hero .container-xxl {
  max-width: 1080px;
}

.swipe-current .flow-progress {
  --h: 8px;
  height: var(--h);
  background: #1f2329;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 18px;
}

.swipe-current .flow-progress > .bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #fff, #bbb);
  transition: width 0.25s ease;
}

.swipe-current .step-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
  color: #ced4da;
  font-size: 0.9rem;
}

.swipe-current .step-caption .current {
  color: #fff;
  font-weight: 600;
}

.swipe-current .muted {
  color: #adb5bd;
}

.swipe-current .gift-card {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  padding: 0;
}

.swipe-current .gift-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.swipe-current .gift-card.dark {
  background: #0f1012;
  color: #fff;
  background-image:
    radial-gradient(
      circle at 50% 50%,
      rgba(255, 255, 255, 0.06) 0%,
      transparent 60%
    ),
    repeating-radial-gradient(
      circle at 50% 50%,
      rgba(255, 255, 255, 0.04) 0 6px,
      transparent 6px 12px
    );
}

.swipe-current .gift-card.light {
  background: #ffffff;
  color: #111;
  background-image:
    radial-gradient(
      circle at 50% 50%,
      rgba(0, 0, 0, 0.05) 0%,
      transparent 60%
    ),
    repeating-radial-gradient(
      circle at 50% 50%,
      rgba(0, 0, 0, 0.04) 0 6px,
      transparent 6px 12px
    );
}

.swipe-current .ribbon {
  position: absolute;
  right: -28px;
  top: -28px;
  width: 160px;
  height: 160px;
  transform: rotate(30deg);
  background: linear-gradient(180deg, #ff2a3a, #c4121d);
  border-radius: 8px;
  filter: blur(12px);
  opacity: 0.75;
}

.swipe-current .gift-card-body {
  position: relative;
  padding: 42px 28px 36px;
}

.swipe-current .gift-card .subtitle {
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.8rem;
  opacity: 0.75;
  margin-bottom: 6px;
}

.swipe-current .gift-card .title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.swipe-current .gift-card.dark .title {
  color: #fafafa;
}

.swipe-current .gift-card.light .title {
  color: #e31328;
}

.swipe-current .brand-pill {
  display: inline-block;
  margin-top: 16px;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #ff2a3a;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
}

@media (max-width: 576px) {
  .swipe-current .gift-card .title {
    font-size: 1.6rem;
  }

  .swipe-current .gift-card-body {
    padding: 32px 22px 28px;
  }
}

.swipe-current .cards-grid .col-6 {
  padding: 0.4rem;
}

.swipe-current .rec-card,
.swipe-current .occ-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: 0.12s;
  user-select: none;
  color: #fff;
}

.swipe-current .rec-ico,
.swipe-current .occ-ico {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 18px;
  transition: 0.12s;
}

.swipe-current .rec-card:hover,
.swipe-current .occ-card:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.25);
}

.swipe-current .rec-card.active,
.swipe-current .occ-card.active {
  border-color: #fff;
  background: #fff;
  color: #111;
}

.swipe-current .rec-card.active .rec-ico,
.swipe-current .occ-card.active .occ-ico {
  background: #f1f3f5;
  color: #111;
}

.swipe-current .card.shadow-sm {
  border-radius: 16px;
  background: #0f1012;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}

.swipe-current .card.shadow-sm .form-control {
  background: #15171b;
  color: #fff;
  border-color: #2b2f36;
}

.swipe-current .card.shadow-sm .form-text {
  color: #adb5bd;
}

.swipe-current .upload-box {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  transition: 0.12s;
}

.swipe-current .upload-box.dragover {
  border-color: #111;
  background: #fafbfc;
}

.swipe-current .preview {
  display: none;
  margin-top: 12px;
}

.swipe-current .preview img {
  max-width: min(100%, 360px);
  max-height: 280px;
  width: auto;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.swipe-current .preview .file-fallback {
  display: none;
  margin-top: 8px;
  font-size: 0.9rem;
  color: #6c757d;
  word-break: break-word;
}

.swipe-current .step-actions {
  display: none;
}

.swipe-current .step-actions.active {
  display: block;
  position: sticky;
  bottom: 0;
  z-index: 1020;
  padding: 12px 0;
  margin-top: 12px;
}

.swipe-current .step-actions .wrap {
  display: flex;
  gap: 12px;
}

.swipe-current .step-actions .btn-half {
  flex: 1 1 0;
  padding: 0.9rem 1rem;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

@media (max-width: 576px) {
  .swipe-current .step-actions .btn-half {
    width: 100%;
  }
}

.swipe-current .pref-list {
  display: grid;
  gap: 14px;
}

.swipe-current .pref-add,
.swipe-current .pref-value {
  width: 100%;
  border-radius: 16px;
  padding: 22px 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
  transition: 0.15s border-color, 0.15s box-shadow, 0.15s transform;
}

.swipe-current .pref-add:hover,
.swipe-current .pref-add:focus-visible,
.swipe-current .pref-value:hover,
.swipe-current .pref-value:focus-visible {
  border-color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  outline: 0;
}

.swipe-current .pref-add:focus-visible,
.swipe-current .pref-value:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.swipe-current .pref-plus {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  font-size: 20px;
}

.swipe-current .pref-label {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.swipe-current .pref-value-title {
  font-weight: 700;
  color: #fff;
}

.swipe-current .pref-value-text {
  white-space: pre-wrap;
  word-break: break-word;
  color: #e5e9ef;
  font-size: 0.95rem;
}

.swipe-current .pref-edit {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
}

.swipe-current .pref-modal-ico {
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ai-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background: radial-gradient(
    1200px 800px at 50% 50%,
    rgba(0, 0, 0, 0.75),
    rgba(0, 0, 0, 0.95)
  );
  backdrop-filter: blur(4px);
}

.ai-overlay.d-none {
  display: none !important;
}

.ai-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.ai-grid {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(
      circle at 20% 30%,
      rgba(227, 19, 40, 0.25),
      transparent 30%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(33, 150, 243, 0.2),
      transparent 35%
    ),
    radial-gradient(
      circle at 50% 50%,
      rgba(255, 255, 255, 0.06),
      transparent 45%
    );
  filter: blur(40px);
  animation: floatBg 18s ease-in-out infinite alternate;
}

@keyframes floatBg {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }

  100% {
    transform: translate3d(2%, 1%, 0) scale(1.03);
  }
}

.ai-pulse {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-radial-gradient(
      circle at 50% 50%,
      rgba(255, 255, 255, 0.05) 0 2px,
      transparent 2px 6px
    ),
    linear-gradient(
      to bottom right,
      rgba(255, 255, 255, 0.06),
      transparent 60%
    );
  mix-blend-mode: overlay;
  animation: mesh 4s linear infinite;
  opacity: 0.55;
}

@keyframes mesh {
  0% {
    background-position: 0 0, 0 0;
  }

  100% {
    background-position: 120px 120px, 0 0;
  }
}

.ai-panel {
  position: relative;
  width: min(820px, calc(100vw - 32px));
  border-radius: 16px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ai-heading {
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 14px 0 6px;
}

.ai-spinner {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-top-color: #fff;
  animation: spin 1s linear infinite;
}

.ai-hint {
  flex: 1;
  word-break: break-word;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.ai-result-scroll {
  max-height: 48vh;
  overflow: auto;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 14px;
}

.ai-result pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;
}

#aiBuy.fade {
  opacity: 0;
  transition: opacity 0.5s ease;
}

#aiBuy.fade.show {
  display: inline-block !important;
  opacity: 1;
}

.swipe-current input::placeholder,
.swipe-current textarea::placeholder {
  color: #adb5bd;
  opacity: 1;
}

.swipe-current .card.shadow-sm .form-control::placeholder {
  color: #6c757d;
}

.swipe-current .upload-loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(2px);
  border-radius: 14px;
  z-index: 5;
  text-align: center;
}

.swipe-current .upload-loading .spinner {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000;
  animation: uploadspin 0.9s linear infinite;
}

@keyframes uploadspin {
  to {
    transform: rotate(360deg);
  }
}
