/* ==========================================================================
   DESIGN SYSTEM: EDITORIAL (white canvas, serif display, terracotta accent)
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-dark: #ffffff;                          /* Canvas background */
  --bg-card: #ffffff;                          /* Card panels */
  --bg-card-hover: #fafafa;

  /* Flat fills (переменные-«градиенты» сохранили имена, значения плоские) */
  --primary-gradient: #111111;
  --secondary-gradient: #111111;
  --accent-gradient: #b85c37;
  --glass-gradient: #ffffff;

  --primary: oklch(0.5 0.13 45);               /* Terracotta accent (тёмный вариант, AA на белом) */
  --primary-glow: rgba(184, 92, 55, 0.08);
  --secondary: oklch(0.5 0.13 45);
  --secondary-glow: rgba(184, 92, 55, 0.08);

  /* Typography Colors */
  --text-white: #111111;                       /* Primary heading text */
  --text-primary: #20242d;                     /* Body text */
  --text-secondary: #686d75;                   /* Supporting text */
  --text-muted: #6e7278;                       /* Muted, ≥4.5:1 на белом */

  /* Border & Dividers */
  --border-color: #e5e5e5;
  --border-glow: #c9c4bc;

  /* Status Colors */
  --success: oklch(0.45 0.08 145);             /* Muted sage для success-состояний */
  --success-glow: rgba(62, 101, 78, 0.12);
  --warning: oklch(0.5 0.13 45);
  --error: oklch(0.45 0.16 25);

  /* Fonts */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --container-width: 1200px;
  --header-height: 80px;

  /* Motion */
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Согласие на обработку персональных данных (152-ФЗ) */
.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.consent-check input {
  margin-top: 2px;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.consent-check a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Honeypot: поле-ловушка для ботов, люди его не видят */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Фирменное выделение текста */
::selection {
  background: rgba(184, 92, 55, 0.18);
  color: #111111;
}

html {
  scroll-behavior: smooth;
  /* Якорные секции не прячутся под фиксированной шапкой */
  scroll-padding-top: calc(var(--header-height) + 16px);
  font-size: 16px;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  /* clip вместо hidden: не создает скролл-контейнер и не ломает position: sticky */
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-x: clip;
}

/* ==========================================================================
   TYPOGRAPHY & UTILITIES
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.15;
}

p {
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 70ch; /* Cap body length for legibility */
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* Editorial kicker: без «пилюли», только шрифт и трекинг */
.badge {
  display: inline-block;
  padding: 0;
  border-radius: 0;
  background: none;
  border: none;
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 20px;
}

/* Терракотовый штрих перед кикером — editorial-подпись */
.badge::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: currentColor;
  vertical-align: middle;
  margin-right: 10px;
}

/* Чипы на карточках сравнения остаются чипами, но нейтральными */
.badge-warning,
.badge-success {
  padding: 5px 14px;
  border-radius: 2px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  letter-spacing: 1.5px;
}

.highlight {
  color: var(--primary);
  font-style: italic;
  display: inline;
  font-weight: 700;
  white-space: nowrap;
}

.glass-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: border-color 0.3s ease;
}

.glass-panel:hover {
  border-color: var(--border-glow);
}

/* Buttons */
/* Утилита: не разрывать фразу переносом строки */
.nowrap {
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 3px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
  border: none;
}

/* ==========================================================================
   MOTION: hero-хореография и scroll-reveal
   ========================================================================== */

@keyframes riseIn {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

/* Каскад загрузки hero: кикер → заголовок → подзаголовок → кнопки → телефон */
.hero-content .badge   { animation: riseIn 0.7s var(--ease-out-quint) 0.05s both; }
.hero-title            { animation: riseIn 0.8s var(--ease-out-quint) 0.15s both; }
.hero-subtitle         { animation: riseIn 0.8s var(--ease-out-quint) 0.25s both; }
.hero-actions          { animation: riseIn 0.8s var(--ease-out-quint) 0.35s both; }
.hero-mockup-wrapper   { animation: riseIn 0.9s var(--ease-out-quint) 0.3s both; }

/* На мобильном скролл-трансформация телефона отключена (JS),
   вместо неё — тихая левитация на месте */
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

@media (max-width: 992px) {
  .hero-phone {
    animation: heroFloat 6s ease-in-out infinite;
  }
  /* Карточка внутри не пульсирует поверх левитации — двойное движение дрожит */
  .demo-card-ui {
    animation: none;
  }
}

/* Видимый индикатор фокуса для клавиатурной навигации (WCAG 2.4.7) */
.btn:focus-visible,
.color-swatch:focus-visible,
.nav-toggle:focus-visible,
.main-nav a:focus-visible,
.messenger-btn:focus-visible,
.social-icon:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.btn-primary {
  background: #111111;
  color: #ffffff;
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: #000000;
}

.btn-secondary {
  background: #111111;
  color: #ffffff;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  background: #000000;
}

.btn-outline {
  background: transparent;
  border: 1px solid #111111;
  color: #111111;
}

.btn-outline:hover {
  background: rgba(0, 0, 0, 0.04);
  transform: translateY(-1px);
}

.btn-success {
  background: #111111;
  color: #ffffff;
}

.btn-success:hover {
  transform: translateY(-1px);
  background: #000000;
}

/* Тактильный отклик нажатия */
.btn:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.1s;
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

/* Spinner Animation */
.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--text-white);
  animation: spin 0.8s linear infinite;
  margin-left: 10px;
}

.btn-primary .spinner {
  border-color: rgba(255, 255, 255, 0.2);
  border-top-color: white;
}

.spinner-large {
  width: 40px;
  height: 40px;
  border-width: 3px;
  margin: 0 auto 15px;
}

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

/* Input Fields */
.form-group {
  margin-bottom: 22px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
  outline: none;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix {
  position: absolute;
  left: 18px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  user-select: none;
}

.input-wrapper .form-input {
  padding-left: 36px;
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* «Вес» шапки, когда под ней проезжает контент */
.main-header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.05);
}

.header-container {
  max-width: var(--container-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 1px;
  color: var(--text-white);
}

.logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.main-nav {
  display: flex;
  gap: 32px;
}

/* «Связаться» в меню — только для мобильного, на десктопе есть кнопка */
.main-nav .nav-contact {
  display: none;
}

@media (max-width: 768px) {
  .main-nav .nav-contact {
    display: block;
  }
}

.main-nav a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  position: relative;
}

/* Линия-подчёркивание вырастает слева направо */
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-out-quint);
}

.main-nav a:hover {
  color: var(--text-white);
}

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

/* Scrollspy: текущая секция подсвечена в меню */
.main-nav a.active {
  color: var(--primary);
}

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

.header-btn {
  padding: 8px 18px;
  font-size: 0.85rem;
}

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

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--text-white);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

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

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

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    padding: 12px 24px 20px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
  }
  .main-nav.open {
    display: flex;
  }
  .main-nav a {
    padding: 12px 0;
    font-size: 1rem;
  }
  /* Узкая шапка: логотип и кнопка компактнее, чтобы не слипались */
  .header-container {
    padding: 0 16px;
    gap: 10px;
  }
  .logo {
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    min-width: 0;
  }
  /* Гамбургер берёт навигацию на себя: кнопку «Связаться» из шапки прячем,
     чтобы не дублировать одноимённый пункт в меню. Контакт остаётся в меню
     и в секции «Контакты». */
  .header-btn {
    display: none;
  }
  .header-actions {
    gap: 6px;
    flex-shrink: 0;
  }
}

/* ==========================================================================
   HERO SECTION & METALLIC SMARTPHONE MOCKUP
   ========================================================================== */

.hero-section {
  padding-top: calc(var(--header-height) + 60px);
  padding-bottom: 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 60px;
  width: 100%;
}

/* Asymmetric Left Aligned Hero Layout */
.hero-content {
  max-width: 580px;
  z-index: 5;
  text-align: left;
}

.hero-title {
  font-size: clamp(2.8rem, 5vw, 3.8rem);
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 1.15rem;
  margin-bottom: 36px;
  color: var(--text-secondary);
}

.hero-actions {
  display: flex;
  gap: 16px 24px;
  flex-wrap: wrap;
  align-items: center;
}

/* Вторичное действие в герое — лёгкая текстовая ссылка,
   чтобы главная кнопка «Создать визитку» явно доминировала */
.hero-secondary-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 6px 2px;
  position: relative;
  transition: color 0.3s var(--ease-out-quint);
}

.hero-secondary-link::after {
  content: '';
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-out-quint);
}

.hero-secondary-link:hover {
  color: var(--text-white);
}

.hero-secondary-link:hover::after {
  transform: scaleX(1);
}

/* 3D Smartphone Container */
.hero-mockup-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1200px;
  position: relative;
  z-index: 2;
}

.hero-mockup-container {
  width: 100%;
  height: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
  transform-style: preserve-3d;
}

/* Titanium/Metallic CSS Phone Mockup */
/* Реалистичная рамка в духе современного iPhone:
   титановый кант (border) + чёрный безель (padding на тёмном фоне) */
.phone-mockup {
  width: 280px;
  height: 570px;
  border-radius: 46px;
  background: #0d0d0f;
  border: 3px solid #c9cacd;
  padding: 7px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.10),
    0 24px 48px rgba(0, 0, 0, 0.10);
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.1s ease, box-shadow 0.3s ease;
}

/* Боковые кнопки: слева — mute и громкость, справа — питание */
.phone-mockup::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 104px;
  width: 3px;
  height: 24px;
  border-radius: 2px;
  background: #b7b8bb;
  box-shadow: 0 40px 0 #b7b8bb, 0 78px 0 #b7b8bb;
}

.phone-mockup::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 150px;
  width: 3px;
  height: 62px;
  border-radius: 2px;
  background: #b7b8bb;
}

/* Specific properties for Hero phone */
.hero-phone {
  transform: rotateY(-18deg) rotateX(12deg) rotateZ(3deg) scale(0.95);
  box-shadow: -15px 25px 50px rgba(0, 0, 0, 0.08), 
              0 0 0 1px oklch(0.9 0.005 80);
}

.phone-inner {
  width: 100%;
  height: 100%;
  border-radius: 36px;
  position: relative;
  overflow: hidden;
  background: #ffffff;
}

/* Dynamic Island с объективом */
.phone-camera {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 24px;
  border-radius: 999px;
  background: #050506;
  z-index: 10;
}

.phone-camera::after {
  content: '';
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #14161c;
  box-shadow: inset 1px 1px 2px rgba(96, 128, 200, 0.55);
}

.phone-speaker {
  display: none;
}

.phone-screen {
  width: 100%;
  height: 100%;
  position: relative;
  padding: 50px 18px 20px;
  display: flex;
  flex-direction: column;
}

/* Glare & Reflection overlay */
.phone-glare {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 8;
  transform: rotate(15deg);
}

/* Simulated digital business card inside hero phone screen */
.demo-card-ui {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  justify-content: center;
  animation: demoPulse 8s infinite ease-in-out;
}

.demo-card-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1px solid var(--primary);
  background: var(--primary-glow);
  margin-bottom: 16px;
  position: relative;
}

/* Монограмма вместо эмодзи-силуэта */
.demo-card-avatar::after {
  content: 'АС';
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.demo-card-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 4px;
}

.demo-card-title {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.demo-card-divider {
  width: 32px;
  height: 2px;
  background: var(--primary);
  margin-bottom: 16px;
  border-radius: 1px;
}

.demo-card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.demo-card-button {
  background: #111111;
  padding: 10px 22px;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-card-links {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.demo-link-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 15px 15px;
}

/* Линейные SVG-иконки: Telegram, мессенджер, сайт */
.demo-link-icon:nth-child(1) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23686d75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 2L11 13'/%3E%3Cpath d='M22 2l-7 20-4-9-9-4z'/%3E%3C/svg%3E");
  background-position: 8px center;
}

.demo-link-icon:nth-child(2) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23686d75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z'/%3E%3C/svg%3E");
}

.demo-link-icon:nth-child(3) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23686d75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E");
}

@keyframes demoPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .hero-content {
    margin: 0 auto;
    text-align: center;
  }
  .hero-title {
    font-size: 2.8rem;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-mockup-wrapper {
    margin-top: 20px;
  }
}

/* ==========================================================================
   COMPARISON SECTION (PAPER VS DIGITAL)
   ========================================================================== */

.comparison-section {
  padding: clamp(48px, 7vw, 72px) 0;
  position: relative;
}

.section-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: left; /* Left align for asymmetric layout */
  max-width: 700px;
  margin-bottom: 60px;
}

.section-title {
  font-size: 2.6rem;
  margin-bottom: 20px;
  letter-spacing: 0;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.comparison-card {
  position: relative;
  background: var(--bg-card);
  border-radius: 24px;
  border: 1px solid var(--border-color);
  padding: 40px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.comparison-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.04);
}

.card-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  z-index: 1;
}

.card-content-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.comparison-card .card-title {
  font-size: 1.6rem;
  margin-bottom: 12px;
  padding-right: 80px;
}

.comparison-card .card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

/* Paper Card Interactive Visual */
.paper-card-visual {
  height: 170px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  color: #333333;
  padding: 24px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  margin-bottom: 35px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.paper-card-visual:hover {
  transform: translateY(-3px) rotate(-0.5deg);
}

.paper-card-front {
  display: flex;
  gap: 16px;
  height: 100%;
}

/* Скучная серая монограмма — намеренно «бумажный» вид */
.paper-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8d5cf;
  border-radius: 4px;
  background: #f2f0ec;
  color: #8a8578;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.paper-info {
  display: flex;
  flex-direction: column;
}

.paper-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111111;
  margin-bottom: 2px;
}

.paper-job {
  font-size: 0.75rem;
  color: #666666;
  margin-bottom: 12px;
}

.paper-divider {
  width: 30px;
  height: 2px;
  background: #333333;
  margin-bottom: 12px;
}

.paper-contact {
  font-size: 0.7rem;
  color: #444444;
  margin-bottom: 2px;
}

.blur-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  cursor: pointer;
}

.blur-message {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--error);
}

/* Trigger blur on hover */
.paper-card-visual:hover .blur-overlay {
  opacity: 1;
}

/* Digital Card Visual Mock */
/* Мини-версия настоящей визитки: вертикальная, с тёплой подложкой */
.digital-card-visual {
  background: #faf4f0;
  border-radius: 14px;
  border: 1px solid #efe2da;
  padding: 28px 24px;
  margin-bottom: 35px;
}

.digital-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.digital-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.digital-avatar {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

.digital-header h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.digital-header p {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--text-secondary);
}

.digital-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 14px;
}

.btn-digital-save {
  background: #111111;
  color: white;
  border: none;
  width: 100%;
  max-width: 240px;
  padding: 10px 20px;
  border-radius: 3px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  height: 38px;
  min-width: 140px;
}

.btn-digital-save:hover {
  transform: translateY(-1px);
  background: #000000;
}

.btn-digital-save .success-icon {
  width: 18px;
  height: 18px;
  fill: white;
  display: none;
}

.btn-digital-save .spinner {
  width: 14px;
  height: 14px;
  border-width: 2px;
  border-top-color: white;
}

/* Success state of Save Button */
.btn-digital-save.success {
  background: var(--success);
}

.btn-digital-save.success .btn-text {
  display: none;
}

.btn-digital-save.success .success-icon {
  display: block;
}

.btn-digital-save.loading .btn-text {
  display: none;
}

.btn-digital-save.loading .spinner {
  display: block;
  margin-left: 0;
}

.digital-links-row {
  display: flex;
  gap: 8px;
}

.social-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 15px 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Текст TG/WA/WWW скрыт — вместо него линейные SVG-иконки */
  font-size: 0;
  color: transparent;
}

.social-icon.tg {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23686d75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 2L11 13'/%3E%3Cpath d='M22 2l-7 20-4-9-9-4z'/%3E%3C/svg%3E");
  background-position: 8px center;
}

.social-icon.wa {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23686d75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z'/%3E%3C/svg%3E");
}

.social-icon.web {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23686d75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E");
}

.social-icon:hover {
  background: rgba(0, 0, 0, 0.02);
  transform: translateY(-2px);
  border-color: var(--text-white);
}

/* Bullet list comparisons */
.comparison-list {
  list-style: none;
  margin-top: auto;
}

.comparison-list li {
  position: relative;
  padding-left: 28px;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.comparison-list li::before {
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 1rem;
}

.list-negative li::before {
  content: '✕';
  color: var(--error);
  font-weight: 700;
}

.list-positive li::before {
  content: '✓';
  color: var(--success);
  font-weight: bold;
}

@media (max-width: 768px) {
  .comparison-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* ==========================================================================
   CONSTRUCTOR SECTION
   ========================================================================== */

.constructor-section {
  padding: clamp(48px, 7vw, 72px) 0;
  position: relative;
}

.constructor-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 40px;
  align-items: flex-start;
}

/* Editor Panel styling */
.editor-panel {
  display: flex;
  flex-direction: column;
  height: 600px;
  overflow: hidden;
}

.editor-panel h3 {
  padding: 24px 30px;
  font-size: 1.4rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.01);
}

.editor-scroll-area {
  flex-grow: 1;
  overflow-y: auto;
  padding: 30px;
}

/* Custom Scrollbar for editor scroll area */
.editor-scroll-area::-webkit-scrollbar {
  width: 6px;
}
.editor-scroll-area::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.01);
}
.editor-scroll-area::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
.editor-scroll-area::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.editor-group {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.editor-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.editor-group-title {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary);
  margin-bottom: 20px;
}

/* Color swatch picker grid */
.color-picker-grid {
  display: flex;
  gap: 14px;
  margin-top: 8px;
}

.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  border: 3px solid transparent;
}

.color-swatch:hover {
  transform: scale(1.15);
}

.color-swatch.active {
  border-color: var(--text-white);
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.avatar-custom-input {
  width: 160px !important;
  text-align: center;
  padding: 8px 12px !important;
  height: 44px;
}

.form-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.editor-footer {
  padding: 20px 30px;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.02);
}

/* Live Preview Sticky Wrap */
.preview-panel {
  width: 100%;
}

.preview-sticky-wrap {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.preview-phone {
  width: 250px;
  height: 510px;
  border-radius: 40px;
  padding: 5px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.10),
    0 15px 40px rgba(0, 0, 0, 0.05);
}

.preview-phone .phone-inner {
  border-radius: 32px;
}

.preview-phone .phone-camera {
  width: 72px;
  height: 20px;
  top: 8px;
}

.preview-phone .phone-screen {
  padding: 40px 14px 14px;
  background: oklch(0.99 0.002 80);
  display: flex;
  flex-direction: column;
}

/* Theme color definitions for Preview Phone */
.preview-phone.theme-violet {
  --theme-accent: oklch(0.48 0.18 275);
  --theme-glow: rgba(74, 58, 255, 0.1);
  --theme-gradient: linear-gradient(135deg, oklch(0.48 0.18 275) 0%, oklch(0.38 0.15 285) 100%);
}

.preview-phone.theme-cyan {
  --theme-accent: oklch(0.5 0.15 220);
  --theme-glow: rgba(0, 160, 200, 0.1);
  --theme-gradient: linear-gradient(135deg, oklch(0.5 0.15 220) 0%, oklch(0.4 0.12 230) 100%);
}

.preview-phone.theme-amber {
  --theme-accent: oklch(0.58 0.14 45);
  --theme-glow: rgba(184, 92, 55, 0.1);
  --theme-gradient: linear-gradient(135deg, oklch(0.58 0.14 45) 0%, oklch(0.48 0.12 40) 100%);
}

.preview-phone.theme-rose {
  --theme-accent: oklch(0.42 0.11 330);
  --theme-glow: rgba(124, 59, 104, 0.1);
  --theme-gradient: linear-gradient(135deg, oklch(0.42 0.11 330) 0%, oklch(0.35 0.08 340) 100%);
}

.preview-phone.theme-emerald {
  --theme-accent: oklch(0.45 0.08 145);
  --theme-glow: rgba(62, 101, 78, 0.1);
  --theme-gradient: linear-gradient(135deg, oklch(0.45 0.08 145) 0%, oklch(0.35 0.06 150) 100%);
}

/* Constructed UI Screen Content */
.constructed-card-ui {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  justify-content: center;
  position: relative;
}

.constructed-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1px solid var(--theme-accent);
  background: var(--theme-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

/* Монограмма из инициалов (пока не выбран эмодзи-аватар) */
.constructed-avatar.monogram {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--theme-accent);
}

.constructed-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 2px;
  word-break: break-word;
}

.constructed-title {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  word-break: break-word;
}

.constructed-divider {
  width: 32px;
  height: 2px;
  background: var(--theme-accent);
  margin-bottom: 12px;
  border-radius: 1px;
  transition: all 0.3s ease;
}

.constructed-bio {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 16px;
  max-height: 48px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.constructed-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.constructed-info span {
  display: block;
  word-break: break-all;
}

.btn-constructed-save {
  background: var(--theme-accent);
  color: white;
  border: none;
  padding: 9px 20px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-constructed-save:hover {
  transform: translateY(-1px);
}

.constructed-links-row {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.constructed-links-row .social-icon {
  width: 30px;
  height: 30px;
  background-size: 13px 13px;
}

.constructed-links-row .social-icon.tg {
  background-position: 7px center;
}

/* QR Code show panel */
.qr-show-panel {
  width: 100%;
  max-width: 250px;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-header h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.qr-header p {
  font-size: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.3;
  margin-bottom: 15px;
}

.qr-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-code-img-wrap {
  width: 150px;
  height: 150px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Устаревший QR: данные визитки изменились после генерации */
.qr-code-img-wrap.stale img {
  opacity: 0.3;
  filter: grayscale(1);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.btn-open-preview {
  margin-top: 8px;
}

.qr-stale-note {
  font-size: 0.72rem;
  color: var(--primary);
  margin: -6px 0 10px;
}

.qr-code-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-placeholder-spinner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: opacity 0.3s ease;
}

.qr-code-placeholder-text {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.35;
  padding: 0 4px;
}

.qr-placeholder-spinner .spinner {
  border-color: rgba(0, 0, 0, 0.05);
  border-top-color: var(--primary);
  margin-left: 0;
}

@media (max-width: 992px) {
  .constructor-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .editor-panel {
    height: 520px;
  }
  .preview-sticky-wrap {
    position: relative;
    top: 0;
    width: 100%;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap;
  }
  .qr-show-panel {
    max-width: 280px;
  }
}

@media (max-width: 600px) {
  .preview-sticky-wrap {
    flex-direction: column;
    align-items: center;
  }
}

/* ==========================================================================
   SHOWROOM PORTFOLIO SECTION
   ========================================================================== */

.showroom-section {
  padding: clamp(48px, 7vw, 72px) 0;
  position: relative;
}

.showroom-container {
  margin-top: 40px;
  position: relative;
}

/* Showroom: телефон слева, описание справа */
.showroom-slider {
  display: grid;
  grid-template-columns: minmax(0, 860px);
  justify-content: center;
  gap: 30px;
}

.showroom-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(32px, 6vw, 64px);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: clamp(24px, 4vw, 48px);
  transition: border-color 0.3s ease;
}

.showroom-item:hover {
  border-color: var(--border-glow);
}

.showroom-phone-wrap {
  flex-shrink: 0;
}

.showroom-phone {
  width: 310px;
  height: 620px;
  border-radius: 46px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.10),
    0 10px 25px rgba(0, 0, 0, 0.04);
}

.showroom-phone .phone-camera {
  width: 80px;
  height: 22px;
  top: 9px;
}

.showroom-phone .phone-screen {
  padding: 44px 0 0;
}

@media (max-width: 380px) {
  .showroom-phone {
    width: 260px;
    height: 540px;
  }
}

/* Showroom iframe: рендерим в ширину реального смартфона (390px)
   и масштабируем под экран мокапа, чтобы контент не теснился */
.showroom-iframe {
  width: 390px;
  height: 748px;
  flex: none; /* phone-screen — flex-колонка: без этого iframe сжимается и внизу остаётся пустота */
  transform: scale(0.7436);
  transform-origin: 0 0;
  border: none;
  background: #ffffff;
  display: none;
}

.showroom-phone .phone-screen {
  overflow: hidden;
}

@media (max-width: 380px) {
  .showroom-iframe {
    height: 774px;
    transform: scale(0.6154);
  }
}

/* Placeholder for Lazy loaded iframes */
.iframe-placeholder {
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
}

.iframe-placeholder:hover {
  background: oklch(0.95 0.004 80);
}

.placeholder-content {
  text-align: center;
  padding: 20px;
}

.icon-click {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.placeholder-content p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.showroom-info {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-grow: 1;
}

.showroom-info h3 {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.showroom-info p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
  max-width: 42ch;
}

@media (max-width: 720px) {
  .showroom-item {
    flex-direction: column;
  }
  .showroom-info {
    text-align: center;
    align-items: center;
  }
}

.btn-fullscreen {
  margin-top: auto;
}

@media (max-width: 600px) {
  .showroom-container {
    padding: 0 10px;
  }
}

/* ==========================================================================
   QUIZ CALCULATOR SECTION
   ========================================================================== */

.quiz-section {
  padding: clamp(48px, 7vw, 72px) 0;
  position: relative;
}

.quiz-box {
  max-width: 750px;
  margin: 0 auto;
  padding: 50px;
  overflow: hidden;
  position: relative;
}

.quiz-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.03);
}

.quiz-progress-fill {
  height: 100%;
  width: 100%;
  background: var(--primary);
  transform: scaleX(0.33);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Step wrapper animations */
.quiz-step {
  display: none;
  opacity: 0;
  transform: translateX(15px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.quiz-step.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

.step-num {
  font-family: var(--font-display);
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 12px;
}

.quiz-step-title {
  font-size: 1.8rem;
  margin-bottom: 24px;
}

.quiz-step-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* Custom Select styling */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.form-select {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  appearance: none;
  outline: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.custom-select-wrapper::after {
  content: '▼';
  font-size: 0.7rem;
  color: var(--text-secondary);
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Custom Range Input */
.range-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.range-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
}

.form-range {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: 5px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.1s;
}

.form-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.form-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.form-range::-moz-range-track {
  height: 6px;
  background: var(--border-color);
  border-radius: 5px;
}

.range-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.quiz-actions {
  display: flex;
  gap: 16px;
  margin-top: 40px;
}

/* Step 3: Result Dashboard styling */
.quiz-results-dashboard {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
  margin-bottom: 30px;
}

.result-metric {
  background: rgba(0, 0, 0, 0.015);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-white);
}

/* Сдержанная подача: цифры чернилами */
.metric-value.text-danger,
.metric-value.text-warning {
  color: var(--text-white);
}

.metric-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.recommendation-box {
  background: none;
  border-left: 2px solid var(--primary);
  border-radius: 0;
  padding: 16px 0 16px 20px;
  margin: 24px 0;
}

.recommendation-box h3 {
  font-size: 0.95rem;
  color: var(--text-white);
  margin-bottom: 6px;
}

.recommendation-box p {
  font-size: 0.85rem;
  color: var(--text-primary);
}

/* Quiz Inline lead capture */
.quiz-lead-form {
  background: rgba(0, 0, 0, 0.005);
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
  margin-top: 20px;
}

.quiz-lead-form h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.quiz-lead-form p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.form-group-inline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.quiz-form-error {
  display: none;
  font-size: 0.8rem;
  color: var(--error);
  margin-top: 8px;
}

/* Success View inside Quiz */
.quiz-success-view {
  text-align: center;
  padding: 40px 10px;
}

.success-icon-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--success-glow);
  border: 2px solid var(--success);
  color: var(--success);
  font-size: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  animation: scaleIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes scaleIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.quiz-success-view h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.quiz-success-view p {
  font-size: 0.95rem;
  max-width: 500px;
  margin: 0 auto 30px;
}

@media (max-width: 768px) {
  .quiz-box {
    padding: 30px 20px;
  }
  .quiz-results-dashboard {
    grid-template-columns: 1fr;
  }
  .form-group-inline {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */

.contact-section {
  padding: clamp(48px, 7vw, 72px) 0;
  position: relative;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 60px;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.contact-info-panel h2 {
  font-size: 2.6rem;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.contact-info-panel p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 35px;
}

.messenger-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 45px;
}

.messenger-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-radius: 16px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  transition: all 0.3s ease;
}

.messenger-btn:hover {
  transform: translateY(-2px);
  border-color: var(--text-white);
}

.tg-btn:hover {
  background: rgba(0, 136, 204, 0.02);
  box-shadow: 0 5px 15px rgba(0, 136, 204, 0.05);
}

.wa-btn:hover {
  background: rgba(37, 211, 102, 0.02);
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.05);
}

.m-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
}

.m-icon-tg {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 2L11 13'/%3E%3Cpath d='M22 2l-7 20-4-9-9-4z'/%3E%3C/svg%3E");
  background-position: 9px center;
}

.m-icon-wa {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z'/%3E%3C/svg%3E");
}

.m-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.m-text span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.m-text strong {
  font-size: 1.15rem;
  color: var(--text-white);
  font-family: var(--font-display);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.detail-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}

.detail-icon-mail {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23686d75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-10 6L2 7'/%3E%3C/svg%3E");
}

.detail-icon-clock {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23686d75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");
}

.detail-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-white);
  margin-bottom: 2px;
}

.detail-item span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Contact Form Panel */
.contact-form-panel {
  padding: 40px;
  position: relative;
}

.contact-form-panel h3 {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.form-intro {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.form-message {
  margin-top: 15px;
  font-size: 0.85rem;
  display: none;
}

.error-message {
  color: var(--error);
}

.form-success-state {
  display: none;
  text-align: center;
  padding: 30px 10px;
}

.form-success-state h3 {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.form-success-state p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Loading state of submit buttons */
.btn.loading .btn-text {
  visibility: hidden;
}

.btn.loading .spinner {
  display: inline-block;
}

@media (max-width: 992px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }
}

@media (max-width: 600px) {
  .contact-form-panel {
    padding: 30px 20px;
  }
}

/* ==========================================================================
   FULLSCREEN MODAL FOR PORTFOLIO SHOWROOM
   ========================================================================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 29, 36, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-container {
  position: relative;
  width: 90%;
  max-width: 950px;
  height: 85%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.08);
  z-index: 10;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalEnter 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes modalEnter {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  height: 60px;
  padding: 0 24px;
  background: rgba(0,0,0,0.01);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.btn-close-modal {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 1.5px solid var(--border-color);
  color: var(--text-white);
  font-size: 1.4rem;
  line-height: 26px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-close-modal:hover {
  background: var(--error);
  border-color: var(--error);
  color: white;
}

.modal-body {
  flex-grow: 1;
  position: relative;
  background: #ffffff;
}

#modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.modal-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: opacity 0.3s ease;
}

.modal-loader p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */

.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ==========================================================================
   REDUCED MOTION (WCAG 2.3.3)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .demo-card-ui,
  .success-icon-large,
  .modal-container {
    animation: none;
  }
  .quiz-step,
  .quiz-progress-fill,
  .btn,
  .glass-panel,
  .showroom-item,
  .paper-card-visual,
  .blur-overlay {
    transition-duration: 0.01ms;
  }
  .hero-content .badge,
  .hero-title,
  .hero-subtitle,
  .hero-actions,
  .hero-mockup-wrapper,
  .hero-phone {
    animation: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   FAQ SECTION (editorial accordion on native details/summary)
   ========================================================================== */

.faq-section {
  padding: clamp(48px, 7vw, 72px) 0;
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  border-top: 1px solid var(--border-color);
  /* Плавное раскрытие в браузерах с поддержкой анимируемых размеров */
  interpolate-size: allow-keywords;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
}

.faq-question {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-white);
  padding: 22px 40px 22px 0;
  cursor: pointer;
  position: relative;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--primary);
  transition: transform 0.25s ease;
}

.faq-item[open] .faq-question::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-question:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.faq-item::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size 0.3s ease, content-visibility 0.3s ease allow-discrete;
}

.faq-item[open]::details-content {
  block-size: auto;
}

.faq-answer {
  padding: 0 40px 22px 0;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 65ch;
}

@media (prefers-reduced-motion: reduce) {
  .faq-item::details-content,
  .faq-question::after {
    transition: none;
  }
}

/* ==========================================================================
   SCROLL REVEAL (в конце файла: transition должен перебивать собственные
   transition блоков вроде .glass-panel и .showroom-item)
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s var(--ease-out-quint) var(--reveal-delay, 0s),
    transform 0.7s var(--ease-out-quint) var(--reveal-delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.footer-link {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-link:hover {
  color: var(--primary);
}
