/* ============================================
   REVEAL HELPERS (set by GSAP, fallback CSS)
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  will-change: opacity, transform;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   HERO SECTION SPECIFIC
   ============================================ */
.hero {
  position: relative;
  overflow: hidden;
}

.hero__bg {
  position: relative;
  z-index: 0;
  width: 100%;
  line-height: 0;
}

.hero__bg img {
  width: 100%;
  height: auto;
  display: block;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(13, 13, 13, 0.88) 0%,
    rgba(13, 13, 13, 0.60) 50%,
    rgba(13, 13, 13, 0.75) 100%
  );
  z-index: 1;
}

.hero__content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  padding: var(--nav-height) var(--container-pad) var(--space-12);
  max-width: 960px;
  width: 100%;
}

.hero__subtitle {
  font-size: var(--text-md);
  color: rgba(250, 250, 248, 0.7);
  max-width: 52ch;
  margin: 0 auto var(--space-10);
  line-height: 1.7;
}

.hero__search {
  max-width: 680px;
  margin: 0 auto var(--space-6);
}

.hero__scroll-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(250, 250, 248, 0.5);
  transition: color var(--transition-fast);
}

.hero__scroll-link:hover { color: var(--color-gold); }

.hero__scroll-arrow {
  animation: bounce 2s infinite;
}

/* ============================================
   STATS SECTION
   ============================================ */
.stats-section {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border-sub);
  border-bottom: 1px solid var(--color-border-sub);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  divide-x: var(--color-border-sub);
}

.stats-grid .stat {
  border-right: 1px solid var(--color-border-sub);
}

.stats-grid .stat:last-child { border-right: none; }

.media-strip {
  padding-block: var(--space-10);
  border-top: 1px solid var(--color-border-sub);
}

.media-strip__label {
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted-2);
  margin-bottom: var(--space-8);
}

/* ============================================
   CTA SECTION (gold bg)
   ============================================ */
.cta-section {
  background: var(--color-gold);
  overflow: hidden;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  pointer-events: none;
}

.cta-section__title {
  font-family: var(--font-serif);
  font-size: var(--text-h2);
  font-weight: 400;
  color: var(--color-bg);
  line-height: 1.1;
  margin-bottom: var(--space-4);
}

.cta-section__subtitle {
  font-size: var(--text-md);
  color: rgba(13, 13, 13, 0.65);
  max-width: 52ch;
  line-height: 1.6;
  margin-bottom: var(--space-10);
}

.cta-section .form-label { color: rgba(13,13,13,0.6); }
.cta-section .form-input {
  background: rgba(13,13,13,0.08);
  border-color: rgba(13,13,13,0.2);
  color: var(--color-bg);
}
.cta-section .form-input::placeholder { color: rgba(13,13,13,0.4); }
.cta-section .form-input:focus { border-color: var(--color-bg); }

.cta-section .form-type-btn {
  background: rgba(13,13,13,0.08);
  border-color: rgba(13,13,13,0.15);
}

.cta-section .form-type-btn:hover,
.cta-section .form-type-btn.selected {
  background: rgba(13,13,13,0.18);
  border-color: var(--color-bg);
}

.cta-section .form-type-btn svg { color: var(--color-bg); }
.cta-section .form-type-btn span { color: var(--color-bg); }

.cta-section .form-progress__dot { background: rgba(13,13,13,0.2); }
.cta-section .form-progress__dot.active { background: var(--color-bg); }

.cta-contacts {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid rgba(13,13,13,0.15);
}

.cta-contacts__or {
  font-size: var(--text-sm);
  color: rgba(13,13,13,0.5);
  white-space: nowrap;
}

.cta-contacts__phone {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--color-bg);
}

.cta-contacts__messengers {
  display: flex;
  gap: var(--space-3);
  margin-left: auto;
}

.messenger-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: rgba(13,13,13,0.1);
  border: 1px solid rgba(13,13,13,0.2);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-bg);
  transition: background var(--transition-fast);
}

.messenger-btn:hover { background: rgba(13,13,13,0.18); }

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   DARK OVERLAY SECTION
   ============================================ */
.section-dark { background: var(--color-bg); }
.section-alt  { background: var(--color-bg-alt); }

/* ============================================
   RESPONSIVE ANIMATIONS
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero__scroll-arrow { animation: none !important; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid .stat { border-right: none; border-bottom: 1px solid var(--color-border-sub); }
  .stats-grid .stat:nth-child(odd) { border-right: 1px solid var(--color-border-sub); }
  .stats-grid .stat:last-child,
  .stats-grid .stat:nth-last-child(2):nth-child(odd) { border-bottom: none; }

  /* Mobile hero: flex layout, content flows naturally instead of absolute centering */
  .hero {
    height: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--nav-height) + var(--space-6)) 0 var(--space-12);
  }
  .hero__bg { position: absolute; inset: 0; height: 100%; overflow: hidden; z-index: 0; }
  .hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }

  .hero__content {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    text-align: left;
    margin: 0;
    padding: 0 var(--container-pad);
    max-width: 100%;
  }
  .hero__subtitle {
    margin-inline: 0;
    text-align: left;
    max-width: 40ch;
    font-size: var(--text-base);
  }

  #hero-search { justify-content: flex-start !important; }

  .cta-contacts { flex-direction: column; align-items: flex-start; }
  .cta-contacts__messengers { margin-left: 0; }
}
