/* ============================================
   1. VARIABLES & RESET
   ============================================ */
:root {
  --bg: #ffffff;
  --surface: #f7f7f7;
  --text: #0C0C0C;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --brand: #0c0c0c;
  --white: #ffffff;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
}

html {
  scroll-behavior: smooth;
}

/* ============================================
   2. HERO & SCROLL CTA (Fixes Text Color)
   ============================================ */
section[data-header-color="dark"] h1,
section[data-header-color="dark"] p {
  color: #ffffff !important;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4); /* Читаемость на фоне видео */
  position: relative;
  z-index: 20;
}

/* ============================================
   HOW IT WORKS: Step badges (1-4)
   Always readable, защищено от theme overrides
   ============================================ */
#how-it-works .step-badge{
  background: #0C0C0C !important;
  color: #ffffff !important;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

/* Кнопка скролла в Hero */
.scroll-cta {
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 30 !important; /* Поверх видео */
  position: relative;
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: #fff !important;
  backdrop-filter: blur(8px);
}

.scroll-cta:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-2px);
  border-color: #fff !important;
}

/* ============================================
   3. DARK CONTEXT FIXES (Earnings & Footer)
   ============================================ */
/* 
   Этот блок автоматически чинит текст в черных карточках и футере.
   Он срабатывает везде, где есть класс bg-[#0C0C0C]
*/
.bg-\[\#0C0C0C\] {
  color: #ffffff !important;
}

.bg-\[\#0C0C0C\] h1,
.bg-\[\#0C0C0C\] h2,
.bg-\[\#0C0C0C\] h3,
.bg-\[\#0C0C0C\] div {
  color: #ffffff !important;
}

.bg-\[\#0C0C0C\] p,
.bg-\[\#0C0C0C\] li,
.bg-\[\#0C0C0C\] span,
.bg-\[\#0C0C0C\] .opacity-60,
.bg-\[\#0C0C0C\] .text-sm {
  color: rgba(255, 255, 255, 0.7) !important;
}

.bg-\[\#0C0C0C\] svg {
  stroke: currentColor !important;
  fill: none !important; /* безопасно для lucide-иконок */
}

/* Ссылки в черном футере */
.bg-\[\#0C0C0C\] a {
  color: rgba(255, 255, 255, 0.6) !important;
  transition: color 0.2s ease;
  text-decoration: none;
}
.bg-\[\#0C0C0C\] a:hover {
  color: #ffffff !important;
  text-decoration: underline;
}

.legal-footer__inner {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.15);
}

/* Карточка Most Popular (Tier 2) */
#earnings .scale-105 {
  transform: scale(1.05);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 10;
}
@media (max-width: 768px) {
  #earnings .scale-105 { transform: scale(1); margin: 2rem 0; }
}

/* ============================================
   4. REQUIREMENTS V2 (Organic Design)
   ============================================ */
.requirements-v2 {
  background: #fff;
  position: relative;
}

/* Background blob decoration */
.requirements-v2__bg {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at 0% 0%, rgba(0,0,0,0.03), transparent 40%),
              radial-gradient(circle at 100% 100%, rgba(0,0,0,0.03), transparent 40%);
  pointer-events: none; z-index: 0;
}

.requirements-v2__container { position: relative; z-index: 2; }

.requirements-v2__head {
  text-align: center; max-width: 700px; margin: 0 auto 4rem;
}
.requirements-v2__head h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; color: var(--brand); }
.requirements-v2__head p { font-size: 1.125rem; color: var(--text-muted); }

/* Grid Layout */
.requirements-v2__grid {
  display: grid; grid-template-columns: 1fr; gap: 2rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .requirements-v2__grid { grid-template-columns: 1.2fr 0.8fr; gap: 4rem; }
}

/* Left Column: Cards */
.requirements-v2__cards {
  display: flex; flex-direction: column; gap: 1.5rem;
}

.req-card {
  display: flex; align-items: flex-start; gap: 1.25rem;
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s var(--ease);
}

.req-card:hover {
  border-color: #9ca3af;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.req-card__icon {
  flex-shrink: 0; width: 48px; height: 48px;
  background: #f3f4f6; color: var(--brand);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.req-card__icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.75;
  stroke: currentColor;
  fill: none;
  shape-rendering: geometricPrecision;
}

/* убираем субпиксельный "ореол" */
.req-card__icon {
  box-shadow: none;
}

/* hover без смещения иконки */
.req-card:hover .req-card__icon {
  transform: none;
}

.req-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.25rem; color: var(--brand); }
.req-card p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.5; }

/* Right Column: Sticky Panel */
.requirements-v2__panel {
  background: #F9FAFB;
  border: 1px solid var(--border);
  border-radius: 20px; padding: 2rem;
  position: sticky; top: 120px;
}

.requirements-v2__panel {
  --check-icon-size: 20px;
  --check-gap: 0.75rem;
  --check-offset: calc(var(--check-icon-size) + var(--check-gap));
}

/* фиксированная колонка под иконку */
.req-checklist__dot {
  width: var(--check-icon-size);
  height: var(--check-icon-size);
  flex: 0 0 var(--check-icon-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

/* выравнивание текста пунктов */
.req-checklist li {
  align-items: flex-start;
}

/* выравнивание заголовка с текстом пунктов */
.requirements-v2__panel h3 {
  padding-left: var(--check-offset);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--brand);
  line-height: 1.25;
}

/* .requirements-v2__panel h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem; } */

.req-checklist { list-style: none; padding: 0; margin: 0 0 2rem 0; }
.req-checklist li {
  display: flex; gap: 0.75rem; margin-bottom: 1rem;
  font-size: 0.95rem; color: #374151;
}
.req-checklist__dot {
  color: var(--brand); margin-top: 2px;
}

.requirements-v2__note {
  font-size: 0.85rem; color: var(--text-muted);
  background: rgba(0,0,0,0.03); padding: 1rem;
  border-radius: 8px; margin-bottom: 1.5rem; text-align: center;
}

.requirements-v2__cta {
  width: 100%; display: flex; justify-content: center; align-items: center; gap: 0.5rem;
  padding: 1rem; border-radius: 10px;
  background: var(--brand); color: #fff;
  font-weight: 600; cursor: pointer;
  transition: opacity 0.2s;
}
.requirements-v2__cta:hover { opacity: 0.9; }

/* ============================================
   5. BENEFITS FIX (Video BG)
   ============================================ */
#benefits {
  position: relative; 
  overflow: hidden;
  color: #fff; 
  background: #000;
}
.benefits-bg { 
  position: absolute; 
  inset: 0; 
  z-index: 0; 
  width: 100%;
  height: 100%;
}
.next-video-container { 
  width: 100%; 
  height: 100%; 
  position: relative; /* Добавлено */
}

/* ЭТОТ КЛАСС БЫЛ ПРОБЛЕМНЫМ */
.next-video-bg {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.next-video-bg-video { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; /* Растягивает видео на весь блок, обрезая лишнее */
  position: absolute; /* Гарантирует позиционирование */
  top: 0;
  left: 0;
}

.benefits-gradient {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.8));
  pointer-events: none;
}
#benefits .rw-container { position: relative; z-index: 10; }

/* Карточки внутри Benefits (Стеклянный эффект) */
#benefits .bg-white {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(12px);
  color: #fff !important;
}
#benefits .text-\[\#0C0C0C\] { color: #fff !important; }
#benefits .bg-\[\#0C0C0C\] { background: #fff !important; color: #000 !important; } /* Icon bg */

/* ============================================
   6. MODAL & FORMS (Restored)
   ============================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(5px);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-content {
  background: #fff; width: 95%; max-width: 500px; padding: 2rem; border-radius: 16px;
  transform: translateY(20px); transition: 0.3s ease; max-height: 90vh; overflow-y: auto;
  position: relative;
}
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-close { position: absolute; top: 1.5rem; right: 1.5rem; cursor: pointer; }

/* Radio Grid */
.radio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.radio-option {
  border: 1px solid var(--border); padding: 10px; border-radius: 8px;
  text-align: center; cursor: pointer; font-size: 0.9rem; position: relative;
}
.radio-option:has(input:checked) { border-color: #000; background: #f3f4f6; color: #000; font-weight: 600; }
.radio-option input { position: absolute; opacity: 0; }
.form-input {
  width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; margin-top: 6px;
}

/* ============================================
   7. MARQUEE ANIMATION
   ============================================ */
.brand-marquee { overflow: hidden; }
.brand-marquee-track { display: flex; gap: 4rem; width: max-content; animation: scroll 30s linear infinite; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.theme-light.bg-\[\#0C0C0C\] {
  background: #ffffff !important;
  color: #0C0C0C !important;
  border: 1px solid #EAEAEA;
}

/* текст внутри */
.theme-light.bg-\[\#0C0C0C\] .opacity-60,
.theme-light.bg-\[\#0C0C0C\] .opacity-80 {
  opacity: 0.6;
}

/* бейдж MOST POPULAR */
.theme-light.bg-\[\#0C0C0C\] > .absolute {
  background: #0C0C0C !important;
  color: #ffffff !important;
}

section.bg-\[\#0C0C0C\] {
  background: #0C0C0C !important;
  color: #ffffff !important;
}

section.bg-\[\#0C0C0C\] a {
  color: #ffffff;
}

section.bg-\[\#0C0C0C\] a:hover {
  opacity: 0.8;
}

.theme-light .rw-badge{
  background: #0C0C0C !important;
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

.theme-light.bg-\[\#0C0C0C\]{
  color:#0C0C0C !important;
}

/* вторичный текст */
.theme-light.bg-\[\#0C0C0C\] .opacity-60,
.theme-light.bg-\[\#0C0C0C\] .opacity-80{
  color:rgba(12,12,12,.6) !important;
}

.theme-light.bg-\[\#0C0C0C\] .text-3xl,
.theme-light.bg-\[\#0C0C0C\] .text-4xl{
  color:#0C0C0C !important;
}

.theme-light.bg-\[\#0C0C0C\] ul,
.theme-light.bg-\[\#0C0C0C\] li,
.theme-light.bg-\[\#0C0C0C\] li span{
  color:#0C0C0C !important;
}

/* чек-иконки наследуют currentColor, но на всякий: */
.theme-light.bg-\[\#0C0C0C\] li svg{
  color:#0C0C0C !important;
  stroke: currentColor !important;
}

.theme-light.bg-\[\#0C0C0C\] button{
  border:1px solid #0C0C0C !important;
}

.earnings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2rem 0; /* Место для масштабирования */
}

@media (min-width: 768px) {
  .earnings-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: center; /* Центрирование по вертикали */
    gap: 1.5rem;
  }
}

/* Базовый стиль карточки */
.earning-card {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  border: 1px solid transparent; /* Резерв для бордера */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
  will-change: transform; /* Оптимизация анимации */
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Эффект наведения для обычных карточек */
.earning-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
  border-color: rgba(0,0,0,0.1);
  z-index: 2; /* Поднимаем над соседями */
}

/* === FEATURED CARD (TIER 2 / DARK) === */
.earning-card--featured {
  background: #0C0C0C;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  z-index: 10; /* Всегда выше остальных */
}

/* Масштаб для featured только на десктопе */
@media (min-width: 768px) {
  .earning-card--featured {
    transform: scale(1.1); /* Немного увеличиваем масштаб */
  }
  
  .earning-card--featured:hover {
    transform: scale(1.1) translateY(-5px); /* Сохраняем масштаб при ховере */
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5);
  }
}

/* === TYPOGRAPHY & INNER ELEMENTS FIXES === */

/* Цвета для темной карточки */
.earning-card--featured h1,
.earning-card--featured h2,
.earning-card--featured h3,
.earning-card--featured .amount-text {
  color: #ffffff !important;
}

.earning-card--featured p,
.earning-card--featured span,
.earning-card--featured li {
  color: rgba(255, 255, 255, 0.7);
}

.earning-card--featured svg {
  stroke: #ffffff;
}

/* Кнопка в темной карточке */
.earning-card--featured .btn-tier {
  background: #ffffff;
  color: #0C0C0C;
  border: 1px solid #ffffff;
}
.earning-card--featured .btn-tier:hover {
  background: #f0f0f0;
}

/* Бейдж MOST POPULAR */
.earning-card-badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  color: #0C0C0C;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  white-space: nowrap;
}

/* Стилизация списка галочек */
.earning-list {
  margin-bottom: 2.5rem;
  flex-grow: 1; /* Прижимает кнопку к низу */
}
.earning-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

/* Кнопки */
.btn-tier {
  width: 100%;
  padding: 0.875rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  margin-top: auto;
}

/* Светлая кнопка (Tier 1/3) */
.earning-card:not(.earning-card--featured) .btn-tier {
  background: transparent;
  color: #0C0C0C;
  border: 2px solid #E5E7EB;
}
.earning-card:not(.earning-card--featured) .btn-tier:hover {
  border-color: #0C0C0C;
  background: #0C0C0C;
  color: #ffffff;
}

.modal-overlay {
  background: rgba(12, 12, 12, 0.4); /* Темнее и благороднее */
  backdrop-filter: blur(8px); /* Сильный блюр фона */
}

.modal-content {
  border-radius: 24px; /* Более скругленные углы */
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(0,0,0,0.05);
  padding: 3rem 2.5rem;
  max-width: 540px;
  width: 95%;
}

/* Заголовок и Градиент */
.runway-gradient {
  background: linear-gradient(135deg, #0C0C0C 0%, #6b7280 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* Группы полей */
.form-group {
  margin-bottom: 1.75rem;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.75rem;
}

.form-label svg {
  color: #9CA3AF;
}

/* Поля ввода (Input) */
.form-input {
  width: 100%;
  padding: 14px 16px;
  background-color: #F9FAFB; /* Soft surface */
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  font-size: 1rem;
  color: #0C0C0C;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  outline: none;
}

.form-input:hover {
  border-color: #D1D5DB;
  background-color: #fff;
}

.form-input:focus {
  background-color: #fff;
  border-color: #0C0C0C;
  box-shadow: 0 0 0 4px rgba(12, 12, 12, 0.05);
}

.form-input::placeholder {
  color: #9CA3AF;
}

/* Сетка радио-кнопок (Selectable Cards) */
.radio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Сама карточка выбора */
.radio-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.radio-option span {
  font-size: 0.95rem;
  font-weight: 500;
  color: #4B5563;
  z-index: 2;
}

/* Скрываем нативный input */
.radio-option input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Ховер состояние */
.radio-option:hover {
  border-color: #9CA3AF;
  background: #F9FAFB;
  transform: translateY(-1px);
}

/* Активное (выбранное) состояние */
.radio-option:has(input:checked) {
  background: #0C0C0C;
  border-color: #0C0C0C;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

.radio-option:has(input:checked) span {
  color: #ffffff;
  font-weight: 600;
}

/* Главная кнопка */
.btn-primary {
  width: 100%;
  background: #0C0C0C;
  color: #fff;
  padding: 16px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1rem;
}

.btn-primary:hover {
  background: #222;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(0,0,0,0.2);
}

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

/* Кнопка закрытия */
.modal-close {
  top: 1.5rem;
  right: 1.5rem;
  background: #F3F4F6;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6B7280;
  transition: all 0.2s;
  border: none;
}

.modal-close:hover {
  background: #E5E7EB;
  color: #0C0C0C;
  transform: rotate(90deg);
}

header nav .rw-eyebrow {
  font-family: inherit;              /* использует текущий font-sans страницы */
  font-size: 13px;                   /* компактнее, ближе к “product UI” */
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;              /* оставляем естественный кейс */
  color: rgba(12, 12, 12, 0.78);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

/* Ховер/фокус — мягко и “дорого” */
header nav .rw-eyebrow:hover {
  color: rgba(12, 12, 12, 1);
}

header nav .rw-eyebrow:focus-visible {
  outline: 2px solid rgba(12, 12, 12, 0.25);
  outline-offset: 3px;
  border-radius: 8px;
}

header nav .rw-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 14px 16px;     /* <-- это вернёт “нормальную” высоту хедера */
  border-radius: 10px;
}

/* Optional: subtle hover background for premium feel */
header nav .rw-eyebrow:hover {
  background: rgba(12, 12, 12, 0.06);
}

/* На больших экранах — немного крупнее */
@media (min-width: 1024px) {
  header nav .rw-eyebrow {
    font-size: 14px;
    letter-spacing: 0.015em;
  }
}
/* ============================================
   8. BRAND MODAL & ARTICLE FIXES (FINAL)
   ============================================ */

body.brand-modal-open {
  overflow: hidden;
}

/* Modal Wrapper */
.brand-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.brand-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.brand-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.brand-modal__dialog {
  position: relative;
  width: min(800px, 100% - 32px);
  max-height: calc(100vh - 40px);
  background: #ffffff;
  border-radius: 24px;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.brand-modal.is-open .brand-modal__dialog {
  transform: translateY(0);
}

.brand-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  color: #000;
}
.brand-modal__close:hover { background: rgba(0, 0, 0, 0.12); }

/* =========================
   ARTICLE CONTENT STYLES
   ========================= */

.brand-article {
  padding: 48px; /* Единый отступ для всего контента */
  color: #0C0C0C;
  overflow-wrap: break-word;
}

@media (max-width: 640px) {
  .brand-article { padding: 24px; }
}

/* Header */
.brand-article__header {
  margin-bottom: 32px;
  text-align: center;
}

.brand-article__meta {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  background: #F3F4F6;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.brand-article__title {
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1.1;
  font-weight: 800;
  margin: 0;
  color: #000;
}

/* --- IMAGE FIX --- */
/* Убираем стандартные отступы figure */
.brand-article__media {
  display: block;
  margin: 0 0 32px 0; 
  padding: 0;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  line-height: 0;
}

.brand-article__media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Body Text */
.brand-article__body {
  font-size: 18px;
  line-height: 1.6;
  color: #222;
}

.brand-article__body p {
  margin-bottom: 24px;
}

.brand-article__body h2, 
.brand-article__body h3 {
  margin-top: 40px;
  margin-bottom: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.brand-article__body ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 24px;
}

.brand-article__body li {
  margin-bottom: 8px;
}

/* Loader */
.brand-article--loading { padding: 48px; }
.brand-article__skeleton {
  background: #f3f3f3;
  border-radius: 8px;
  animation: pulse 1.5s infinite ease-in-out;
}
@keyframes pulse { 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } }

.brand-article__skeleton.media { height: 280px; margin: 20px 0 30px; }
.brand-article__skeleton.title { height: 40px; width: 80%; margin: 0 auto 20px; }
.brand-article__skeleton.text { height: 16px; width: 100%; margin-bottom: 12px; }

#requirements {
  margin-top: -20px;
}

.vpv-overlay{
  position: fixed;
  inset: 0;
  z-index: 10050;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
}

/* само окно */
#vpvFrame {
  /* РАСТЯГИВАЕМ НА ВЕСЬ ЭКРАН */
  width: 100vw;  /* 100% ширины видимой области */
  height: 100vh; /* 100% высоты видимой области */
  
  /* Убираем ограничения, которые создавали "стены" */
  max-width: none; 
  max-height: none;

  border: 0;
  border-radius: 0; /* Скругления больше не нужны, так как это полный экран */
  
  background: transparent; 
  box-shadow: none; 
  
  /* Это позволяет фрейму быть поверх всего, но прозрачным */
  position: absolute;
  top: 0;
  left: 0;
}

/* --- VPV Success Screen Styles --- */
.vpv-success-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20; /* Поверх iframe */
    font-family: 'Google Sans', Roboto, Arial, sans-serif; /* Похожий шрифт */
}

.vpv-content {
    text-align: center;
    color: #202124;
}

.vpv-brand {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 40px;
    color: #5f6368;
    letter-spacing: -0.5px;
}

.vpv-spinner-wrapper {
    margin: 0 auto 30px;
    width: 48px;
    height: 48px;
}

.vpv-spinner {
    animation: rotate 2s linear infinite;
    width: 100%;
    height: 100%;
}

.vpv-spinner .path {
    stroke: #1a73e8; /* Google Blue */
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

.vpv-title {
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 10px;
    color: #202124;
}

.vpv-subtitle {
    font-size: 14px;
    color: #5f6368;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* ============================================
   MOBILE MENU & BURGER (FIXED)
   ============================================ */

/* Burger Button Style */
.burger-btn {
    position: relative;
    width: 32px;       /* Ширина кнопки */
    height: 32px;      /* Делаем квадратной для удобства нажатия */
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 60;
    padding: 0;
    display: block;    /* Убираем flex */
}

.burger-line {
    display: block;
    position: absolute; /* Фиксируем позиции */
    left: 0;
    width: 100%;       /* Длина линии */
    height: 2px;       /* Толщина линии */
    background-color: #0C0C0C;
    border-radius: 2px; /* Сглаживаем края */
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: center;
    
    /* Хак для четкости линий в Chrome/Safari */
    transform: translateZ(0); 
    -webkit-font-smoothing: antialiased;
}

/* Позиционируем линии вручную, чтобы они стояли четко по пикселям */
.burger-line.top {
    top: 10px; 
}

.burger-line.bottom {
    bottom: 10px;
}

/* Burger Active State (X shape) */
/* Центрируем обе линии и поворачиваем */
body.mobile-open .burger-line.top {
    top: 50%;
    margin-top: -1px; /* Поправка на половину высоты линии */
    transform: rotate(45deg);
}

body.mobile-open .burger-line.bottom {
    bottom: 50%;
    margin-bottom: -1px; /* Поправка на половину высоты линии */
    transform: rotate(-45deg);
}

/* Mobile Menu Overlay (без изменений, но для контекста) */
.mobile-menu {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    flex-direction: column;
    padding-top: 80px;
}

@media (min-width: 1024px){
  .burger-btn{
    display:none !important;
  }
}

body.mobile-open .mobile-menu {
    opacity: 1;
    visibility: visible;
}

/* Menu Inner Content */
.mobile-menu__inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem 1.5rem 3rem;
    overflow-y: auto;
}

/* Navigation Links */
.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav__link {
    font-size: 2rem;
    font-weight: 600;
    color: #0C0C0C;
    text-decoration: none;
    letter-spacing: -0.02em;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
}

/* Staggered Animation for Links */
body.mobile-open .mobile-nav__link {
    transform: translateY(0);
    opacity: 1;
}

body.mobile-open .mobile-nav__link:nth-child(1) { transition-delay: 0.1s; }
body.mobile-open .mobile-nav__link:nth-child(2) { transition-delay: 0.15s; }
body.mobile-open .mobile-nav__link:nth-child(3) { transition-delay: 0.2s; }
body.mobile-open .mobile-nav__link:nth-child(4) { transition-delay: 0.25s; }

/* Mobile Menu Footer (CTA Button) */
.mobile-menu__footer {
    margin-top: 2rem;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
    transition-delay: 0s;
}

body.mobile-open .mobile-menu__footer {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.3s;
}

/* Lock Scroll when menu open */
body.mobile-open {
    overflow: hidden;
}

@media (max-width: 1023px) {
  #main-header .header-apply-btn { display: none !important; }
  #main-header .burger-btn { display: block !important; }
}

/* desktop */
@media (min-width: 1024px) {
  #main-header .header-apply-btn { display: inline-flex !important; }
  #main-header .burger-btn { display: none !important; }
}

/* ==============================
   HEADER: органичный desktop size
   ============================== */
@media (min-width: 1024px) {
  /* было слишком жирно — делаем компактнее */
  #main-header {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }

  /* вместо 72px — аккуратная высота */
  #main-header .rw-container > .flex {
    min-height: 56px !important;
  }

  /* пункты меню: меньше паддинги */
  #main-header nav .rw-eyebrow {
    padding: 10px 12px !important;
    border-radius: 10px;
  }

  /* лого чуть меньше (если хочешь “как на скрине”) */
  #main-header svg[viewBox="0 0 84 19"] {
    width: 84px !important;
  }
}

/* CTA: делаем более органично (не огромная “капсула”) */
#main-header .header-apply-btn {
  padding: 8px 12px !important;
  font-size: 12.5px !important;
  border-radius: 9999px !important;

  /* визуально легче */
  box-shadow:
    0 8px 18px rgba(0,0,0,0.10),
    0 2px 6px rgba(0,0,0,0.06) !important;
}

/* стрелку делаем меньше, чтобы не раздувала кнопку */
#main-header .header-apply-btn::after {
  margin-left: 8px !important;
  font-size: 12px;
  opacity: 0.85;
}

.legal-footer__inner.footer-v2{
  margin-top: 3.5rem;
  padding-top: 2.25rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  text-align: left;                 /* ключевой фикс из-за text-center у секции */
}

.footer-v2__grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px){
  .footer-v2__grid{
    grid-template-columns: 1fr 1fr; /* Connect | Legal */
    gap: 3rem;
    align-items: start;
  }
}

.footer-v2__title{
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.85);
  margin-bottom: 0.75rem;
}

.footer-v2__list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

@media (min-width: 768px){
  /* делаем Connect более компактным по высоте */
  .footer-v2__col:first-child .footer-v2__list{
    grid-template-columns: 1fr 1fr; /* 2 колонки ссылок на десктопе */
    column-gap: 1.5rem;
    row-gap: 0.45rem;
    max-width: 520px;
  }
}

.footer-v2__list a{
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 14px;
  line-height: 1.35;
  color: rgba(255,255,255,0.62);
  text-decoration: none;
  transition: color .2s ease, background .2s ease;
  padding: 4px 6px;
  border-radius: 8px;
}

.footer-v2__list a:hover{
  color: #fff;
  background: rgba(255,255,255,0.06); /* мягкий “пилюльный” ховер */
  text-decoration: none;              /* без “дёргающегося” underline */
}

.footer-v2__list a span[aria-hidden="true"]{
  font-size: 12px;
  opacity: 0.75;
  transform: translateY(-0.5px);
}

.footer-v2__legal{
  justify-self: start;
}

@media (min-width: 768px){
  .footer-v2__legal{
    justify-self: end;                /* Legal справа на десктопе */
    text-align: right;
  }
  .footer-v2__legal .footer-v2__list{
    justify-items: end;
  }
}

.footer-v2__bottom{
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.45);
  font-size: 12px;
  display: flex;
  justify-content: center;
}

/* ===== Disable blur for all modal backdrops ===== */
.modal-overlay,
.brand-modal__overlay,
.vpv-overlay {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* оставляем затемнение, но без blur */
.modal-overlay { background: rgba(12, 12, 12, 0.55) !important; }
.brand-modal__overlay { background: rgba(0, 0, 0, 0.70) !important; }
.vpv-overlay { background: rgba(0, 0, 0, 0.55) !important; }

#googleSignInBtn:disabled,
#googleSignInBtn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.15);
}

/* ===== Verification modal: strict centering ===== */
#verificationModal.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid !important;
  place-items: center !important;
  padding: 24px 16px;
  box-sizing: border-box;
  overflow-y: auto;
}

/* гарантируем нормальную карточку по центру */
#verificationModal .modal-content {
  margin: 0 !important;
  width: min(540px, calc(100vw - 32px)) !important;
  max-width: 540px !important;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
}

/* Turnstile контейнер по центру */
#verificationModal #cf-turnstile,
#verificationModal .cf-turnstile {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* ===== Google button state (visual + real lock) ===== */
#googleSignInBtn {
  transition: opacity .18s ease, transform .12s ease, filter .18s ease;
}

#googleSignInBtn:disabled,
#googleSignInBtn[aria-disabled="true"] {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  filter: grayscale(0.2) !important;
  pointer-events: none !important;
  transform: none !important;
}

/* чтобы hover/active .btn-primary не "делал активной" disabled */
#googleSignInBtn:disabled:hover,
#googleSignInBtn[aria-disabled="true"]:hover,
#googleSignInBtn:disabled:active,
#googleSignInBtn[aria-disabled="true"]:active {
  transform: none !important;
}

.turnstile-hint {
  margin: 12px auto 16px;
  max-width: 380px;
  padding: 0 8px;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
  color: #6b7280; /* neutral gray */
  text-align: center;
  opacity: 0.72;
  transition: opacity .2s ease, color .2s ease, transform .2s ease;
  text-wrap: balance;
}

.turnstile-hint--center {
  display: block;
}

/* Когда JS повышает opacity (ошибка/успех), будет выглядеть чище */
#verificationModal .turnstile-hint[style*="0.75"] {
  color: #4b5563;
}

/* Мобильная подстройка */
@media (max-width: 640px) {
  .turnstile-hint {
    max-width: 100%;
    margin: 10px auto 14px;
    font-size: 14px;
    line-height: 1.4;
    padding: 0 4px;
  }
}