/* === BASE === */
html { scroll-behavior: smooth; }
body {
  font-feature-settings: "liga" 1, "kern" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Unbounded doesn't have italic — italic variants fall back to Inter italic */
.font-display.italic,
.italic.font-display {
  font-family: Inter, -apple-system, sans-serif;
  font-style: italic;
  letter-spacing: -0.01em;
}

/* Optical tuning for Unbounded display at large sizes */
.font-display {
  letter-spacing: -0.02em;
}

/* Selection */
::selection { background: #b8000f; color: #f6f3ee; }

/* === FOCUS VISIBLE (keyboard accessibility) === */
:focus-visible {
  outline: 2px solid #b8000f;
  outline-offset: 3px;
  border-radius: 2px;
}
button:focus-visible,
a:focus-visible {
  outline-offset: 4px;
}

/* === PRESS STATE (touch / mouse feedback) === */
a, button {
  transition: transform 0.12s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
a:active:not(.no-press):not(.carousel-arrow),
button:active:not(.no-press):not(.carousel-arrow) {
  transform: scale(0.97);
}
.carousel-arrow:active {
  transform: translateY(-50%) scale(0.94) !important;
}

/* === CUSTOM SCROLLBAR (desktop) === */
@media (min-width: 768px) {
  html { scrollbar-width: thin; scrollbar-color: rgba(184,0,15,0.4) rgba(10,10,10,0.9); }
  html::-webkit-scrollbar { width: 8px; }
  html::-webkit-scrollbar-track { background: rgba(10,10,10,0.9); }
  html::-webkit-scrollbar-thumb { background: rgba(184,0,15,0.35); }
  html::-webkit-scrollbar-thumb:hover { background: rgba(184,0,15,0.6); }
}

/* === SCROLL-SPY NAV ACTIVE STATE === */
#primary-nav a[data-nav-link] {
  position: relative;
  padding-bottom: 4px;
  color: rgba(246,243,238,0.7);
  transition: color 0.25s ease;
}
#primary-nav a[data-nav-link]:hover {
  color: #b8000f;
}
#primary-nav a[data-nav-link]::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: #b8000f;
  transition: width 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
#primary-nav a[data-nav-link].is-active {
  color: #f6f3ee;
}
#primary-nav a[data-nav-link].is-active::after {
  width: 100%;
}

/* === READABLE PARAGRAPH WIDTH === */
.prose-readable {
  max-width: 62ch;
}

/* === HERO TEXT SHADOW — keeps text readable over photo regardless of gradient === */
.hero-text-shadow {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 2px 16px rgba(0, 0, 0, 0.5);
}

/* === INTL-TEL-INPUT — адаптация под тёмный фон формы === */
.iti {
  width: 100%;
  display: block;
}
.iti__tel-input {
  width: 100% !important;
}
/* когда .quiz-input оборачивается в .iti, переносим border-bottom на контейнер,
   чтобы линия проходила под флажком тоже, и НЕ перебиваем padding-left от библиотеки */
.iti:has(.quiz-input) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: border-color 0.2s ease;
}
.iti:has(.quiz-input):focus-within {
  border-bottom-color: #b8000f;
}
.iti .quiz-input {
  border-bottom: none !important;
  padding-right: 12px; /* небольшой отступ справа; padding-left библиотека ставит inline под флажок + код */
}
.iti__country-list {
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f6f3ee;
  max-height: 280px;
}
.iti__country {
  padding: 8px 12px;
}
.iti__country.iti__highlight,
.iti__country:hover {
  background: rgba(184, 0, 15, 0.15);
}
.iti__dial-code {
  color: rgba(246, 243, 238, 0.55);
}
.iti__search-input {
  background: rgba(255, 255, 255, 0.05);
  color: #f6f3ee;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 12px;
}
.iti__search-input::placeholder {
  color: rgba(246, 243, 238, 0.4);
}
.iti--inline-dropdown .iti__dropdown-content {
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
/* флажок-кнопка не подсвечивается серым на тёмном */
.iti__selected-country:hover,
.iti__selected-country:focus {
  background: rgba(255, 255, 255, 0.06);
}

/* === ANCHOR OFFSET (so sticky nav doesn't cover section title on smooth scroll) === */
section[id],
[id="form"] {
  scroll-margin-top: 72px;
}

/* === REMOVE WIDOW (keep last word with previous) === */
h1, h2, h3 {
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}

/* === REVEAL ON SCROLL ===
   .js class added via inline <script> in <head>.
   Without JS (or if script fails) — elements stay visible (no FOUC / no blank page). */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}

/* === MOBILE STICKY CTA === */
#mobile-cta {
  box-shadow: 0 -8px 30px rgba(0,0,0,0.35);
  letter-spacing: 0.14em;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
#mobile-cta.is-hidden,
#mobile-cta.is-cookie-blocked {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}
@media (min-width: 768px) {
  #mobile-cta { display: none !important; }
}
/* Padding bottom so last content isn't hidden under sticky CTA on mobile.
   Apply to footer (not body) — body bg is ivory while footer is ink, so a body
   padding-bottom shows up as a white strip under the dark footer. */
@media (max-width: 767px) {
  footer { padding-bottom: 96px; }
}

/* === VIDEO ERROR FALLBACK === */
.video-card.has-error .video-player { display: none; }
.video-card.has-error::after {
  content: attr(data-error-msg);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: rgba(246,243,238,0.7);
  font-family: Inter, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background: linear-gradient(135deg, #0a0a0a 0%, #2a0005 100%);
}

/* === QUIZ === */
.quiz-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
  color: rgba(246,243,238,0.88);
}
.quiz-option:hover {
  border-color: rgba(184, 0, 15, 0.5);
  background: rgba(184, 0, 15, 0.06);
}
.quiz-option input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
}
.quiz-option input[type="radio"]:checked {
  border-color: #b8000f;
}
.quiz-option input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: #b8000f;
  border-radius: 50%;
}
.quiz-option:has(input:checked) {
  border-color: #b8000f;
  background: rgba(184, 0, 15, 0.08);
  color: #f6f3ee;
}

.quiz-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding: 12px 0;
  color: #f6f3ee;
  font-family: Inter, -apple-system, sans-serif;
  font-size: 18px;
  transition: border-color 0.2s ease;
}
.quiz-input:focus {
  outline: none;
  border-bottom-color: #b8000f;
}
.quiz-input::placeholder {
  color: rgba(246,243,238,0.3);
}

/* === VIDEO CARDS === */
.video-card {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  background: #0a0a0a;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.35);
  border: 1px solid rgba(10,10,10,0.08);
}
/* Smaller variant for the dual cards (Diana + Lena) */
.video-card.video-card--sm {
  max-width: 240px;
}
@media (min-width: 1024px) {
  /* On lg+ each card has video left + text right; shrink video so text has room */
  .video-card.video-card--sm {
    max-width: 160px;
    margin-left: 0;
    margin-right: 0;
  }
}
.video-card .video-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-card .video-badge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 48px 16px 16px;
  background: linear-gradient(180deg, rgba(10,10,10,0) 0%, rgba(10,10,10,0.85) 100%);
  color: #f6f3ee;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  pointer-events: none;
  z-index: 2;
  text-align: center;
}

/* === REVIEWS CAROUSEL === */
.reviews-carousel {
  position: relative;
  padding: 0 0 56px;
}
.carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 0;
}
.carousel-track::-webkit-scrollbar { display: none; }

.carousel-track .review-card {
  flex: 0 0 calc((100% - 16px * 2) / 3);
  scroll-snap-align: center;
  aspect-ratio: 3 / 4;
  background: rgba(10,10,10,0.04);
  border: 1px solid rgba(10,10,10,0.08);
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
  transition: border-color 0.3s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
  padding: 0;
  min-height: 1px;
}
.carousel-track .review-card:hover {
  border-color: #b8000f;
}
.carousel-track .review-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
  display: block;
}
.carousel-track .review-card:hover img {
  transform: scale(1.05);
}

/* Arrows (desktop) */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #0a0a0a;
  color: #f6f3ee;
  border: 1px solid rgba(10,10,10,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: all 0.25s ease;
  box-shadow: 0 10px 30px rgba(10,10,10,0.2);
}
.carousel-arrow:hover {
  background: #b8000f;
  transform: translateY(-50%) scale(1.06);
}
.carousel-arrow:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  transform: translateY(-50%);
}
.carousel-arrow--prev { left: -24px; }
.carousel-arrow--next { right: -24px; }

/* Dots */
.carousel-dots {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 8px;
  justify-content: center;
}
.carousel-dots button {
  width: 24px;
  height: 2px;
  background: rgba(10,10,10,0.15);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s ease, width 0.25s ease;
}
.carousel-dots button.is-active {
  background: #b8000f;
  width: 36px;
}

/* Responsive slide widths */
@media (max-width: 1024px) {
  .carousel-track .review-card {
    flex-basis: calc((100% - 16px) / 2);
  }
}
@media (max-width: 640px) {
  .carousel-track {
    gap: 12px;
    padding-left: 6vw;
    padding-right: 6vw;
    scroll-padding: 0 6vw;
  }
  .carousel-track .review-card {
    flex-basis: 70%;
  }
  .carousel-arrow {
    width: 40px;
    height: 40px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(6px);
    border-color: rgba(246, 243, 238, 0.18);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  }
  .carousel-arrow--prev { left: 8px; }
  .carousel-arrow--next { right: 8px; }
  .carousel-arrow svg {
    width: 18px;
    height: 18px;
  }
}

/* === LIGHTBOX === */
#lightbox.open {
  display: flex;
}
#lightbox img,
#lightbox video {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  box-shadow: 0 20px 80px rgba(0,0,0,0.5);
}

/* === TYPOGRAPHY POLISH === */
.font-display {
  font-feature-settings: "liga" 1, "dlig" 1;
}
h1, h2, h3 {
  text-rendering: optimizeLegibility;
}

/* === UTILITIES === */
.divider-luxe {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.divider-luxe::before,
.divider-luxe::after {
  content: '';
  width: 40px;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
}

/* === RESPONSIVE TWEAKS === */
@media (max-width: 640px) {
  .quiz-option { font-size: 15px; padding: 14px 16px; }
  .quiz-input { font-size: 16px; }
}
