/* ОкноГард — motion & WOW layer */

/* ---- Buttons: living CTA ---- */
.btn--primary {
  position: relative;
  overflow: hidden;
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
}

.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
}

.btn--primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 32px rgba(224, 122, 47, 0.5);
}

.btn--primary:hover::after {
  animation: cta-shine 0.85s ease;
}

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

.btn--pulse {
  animation: cta-pulse 2.4s ease-in-out infinite;
}

.btn--ghost {
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.btn--ghost:hover {
  transform: translateY(-2px);
  border-color: #fff;
}

@keyframes cta-shine {
  to { transform: translateX(120%); }
}

@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(224, 122, 47, 0.35); }
  50% { box-shadow: 0 8px 28px rgba(224, 122, 47, 0.55), 0 0 0 10px rgba(224, 122, 47, 0.12); }
}

/* ---- Hero entrance + atmosphere ---- */
.hero__media {
  will-change: transform;
}

.hero__media img {
  transform: scale(1.08);
  animation: hero-ken 18s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes hero-ken {
  from { transform: scale(1.08) translate3d(0, 0, 0); }
  to { transform: scale(1.16) translate3d(0, -2%, 0); }
}

.hero__glow {
  position: absolute;
  z-index: -1;
  width: min(55vw, 520px);
  height: min(55vw, 520px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 122, 47, 0.28) 0%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
  animation: glow-drift 8s ease-in-out infinite alternate;
}

.hero__glow--1 { top: 10%; right: 5%; }
.hero__glow--2 {
  bottom: 5%;
  left: 10%;
  width: min(40vw, 360px);
  height: min(40vw, 360px);
  background: radial-gradient(circle, rgba(45, 160, 190, 0.22) 0%, transparent 70%);
  animation-delay: -3s;
}

@keyframes glow-drift {
  from { transform: translate(0, 0) scale(1); opacity: 0.7; }
  to { transform: translate(-4%, 6%) scale(1.12); opacity: 1; }
}

.hero__badge,
.hero__title,
.hero__lead,
.hero__cta,
.hero__trust {
  opacity: 0;
  transform: translateY(28px);
  animation: rise-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero__badge { animation-delay: 0.1s; }
.hero__title { animation-delay: 0.25s; }
.hero__lead { animation-delay: 0.4s; }
.hero__cta { animation-delay: 0.55s; }
.hero__trust { animation-delay: 0.7s; }

@keyframes rise-in {
  to { opacity: 1; transform: translateY(0); }
}

.badge--promo {
  position: relative;
  overflow: hidden;
  animation: rise-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards, badge-glow 2.8s ease-in-out 1s infinite;
}

.badge--promo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.25) 50%, transparent 60%);
  transform: translateX(-100%);
  animation: badge-shimmer 3.5s ease-in-out 1.5s infinite;
}

@keyframes badge-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 122, 47, 0); }
  50% { box-shadow: 0 0 20px rgba(224, 122, 47, 0.35); }
}

@keyframes badge-shimmer {
  0%, 40% { transform: translateX(-100%); }
  70%, 100% { transform: translateX(100%); }
}

.hero__live {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.95);
}

.hero__live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6);
  animation: live-dot 1.6s ease-out infinite;
  flex-shrink: 0;
}

@keyframes live-dot {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(61, 220, 132, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); }
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--delay, 0ms);
}

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

.reveal--left {
  transform: translateX(-28px);
}

.reveal--right {
  transform: translateX(28px);
}

.reveal--left.is-visible,
.reveal--right.is-visible {
  transform: translateX(0);
}

.reveal--scale {
  transform: scale(0.94);
}

.reveal--scale.is-visible {
  transform: scale(1);
}

/* ---- Card hover life ---- */
.pain-card,
.benefit-card,
.testimonial,
.pricing-card,
.step-card {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s, border-color 0.3s;
}

.pain-card:hover,
.benefit-card:hover,
.testimonial:hover,
.step-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(15, 40, 51, 0.12);
  border-color: rgba(224, 122, 47, 0.35);
}

.benefit-card__icon,
.pain-card__icon {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s;
}

.benefit-card:hover .benefit-card__icon,
.pain-card:hover .pain-card__icon {
  transform: scale(1.08) rotate(-4deg);
  background: rgba(224, 122, 47, 0.15);
  color: var(--color-accent);
}

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 44px rgba(15, 40, 51, 0.14);
}

.services-list li {
  transition: background 0.2s ease;
}

.services-list li:hover {
  background: rgba(196, 146, 58, 0.08);
}

.extras-item__link {
  transition: gap 0.2s ease, color 0.2s ease;
}

.extras-item__link:hover {
  gap: 0.65rem;
}

.pricing-card--featured {
  animation: featured-glow 3.2s ease-in-out infinite;
}

.pricing-card--featured:hover {
  transform: translateY(-12px) scale(1.01);
}

@keyframes featured-glow {
  0%, 100% { box-shadow: 0 10px 30px rgba(15, 40, 51, 0.08), 0 0 0 0 rgba(224, 122, 47, 0); }
  50% { box-shadow: 0 14px 36px rgba(224, 122, 47, 0.22), 0 0 0 6px rgba(224, 122, 47, 0.08); }
}

.pricing-card__badge {
  animation: badge-bounce 2.5s ease-in-out infinite;
}

@keyframes badge-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ---- Solution promo ---- */
.solution__promo {
  position: relative;
  overflow: hidden;
  transition: transform 0.35s;
}

.solution__promo::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -40px;
  top: -40px;
  border-radius: 50%;
  background: rgba(224, 122, 47, 0.25);
  animation: promo-orb 5s ease-in-out infinite alternate;
}

.solution__promo:hover {
  transform: translateY(-4px);
}

@keyframes promo-orb {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.25) translate(-12px, 16px); }
}

.solution__price-now {
  animation: price-pop 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes price-pop {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ---- Stats ---- */
.stat {
  transition: transform 0.3s, box-shadow 0.3s;
}

.stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(15, 40, 51, 0.1);
}

.stat__num {
  background: linear-gradient(120deg, var(--color-primary), #2d8aa8 45%, var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Case before/after ---- */
.case-card__shot img {
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.case-card__label--after {
  box-shadow: 0 0 0 rgba(196, 146, 58, 0);
}

@keyframes label-fade {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; box-shadow: 0 0 12px rgba(196, 146, 58, 0.35); }
}

.case-card__label {
  animation: label-fade 2.4s ease-in-out infinite;
}

/* ---- Lead form ---- */
.lead {
  position: relative;
  overflow: hidden;
}

.lead::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 122, 47, 0.2), transparent 70%);
  top: -120px;
  right: -80px;
  animation: glow-drift 7s ease-in-out infinite alternate;
  pointer-events: none;
}

.lead-form {
  transition: transform 0.35s, box-shadow 0.35s;
}

.lead-form:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.lead-form__input {
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.lead-form__input:focus {
  transform: scale(1.01);
}

.lead-form.is-success {
  animation: success-flash 0.6s ease;
}

@keyframes success-flash {
  0%, 100% { box-shadow: 0 10px 30px rgba(15, 40, 51, 0.08); }
  50% { box-shadow: 0 0 0 4px rgba(39, 174, 96, 0.35), 0 16px 40px rgba(39, 174, 96, 0.2); }
}

/* ---- Call bar (mobile) ---- */
.callbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 95;
  display: none;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom));
  background: rgba(15, 40, 51, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.callbar.is-visible {
  display: grid;
  grid-template-columns: auto 1fr 1.15fr;
  gap: 0.45rem;
  transform: translateY(0);
}

.callbar .btn {
  width: 100%;
  min-height: 46px;
  font-size: 0.92rem;
}

.callbar .btn--call {
  background: #fff;
  color: var(--color-primary);
}

@media (max-width: 767px) {
  body.has-callbar {
    padding-bottom: 72px;
  }
}

@media (min-width: 768px) {
  .callbar {
    display: none !important;
  }
}

/* ---- Header phone (desktop block in header.css) ---- */
.header__phone-wrap:hover .header__phone {
  color: var(--color-accent-dark);
}

/* ---- FAQ ---- */
.faq__item {
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.faq__item:hover {
  border-color: rgba(224, 122, 47, 0.4);
}

.faq__item.is-open {
  border-color: var(--color-accent);
  box-shadow: 0 10px 28px rgba(224, 122, 47, 0.12);
  transform: translateY(-2px);
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  display: block !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.3s ease;
}

.faq__item.is-open .faq__answer {
  max-height: 900px;
  opacity: 1;
  padding-bottom: 0.35rem !important;
}

/* ---- Messenger chips ---- */
.contacts__messengers a {
  transition: transform 0.25s, border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.contacts__messengers a:hover {
  transform: translateY(-3px);
  border-color: var(--color-accent);
  background: rgba(224, 122, 47, 0.08);
  box-shadow: 0 8px 20px rgba(15, 40, 51, 0.1);
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .hero__media img,
  .hero__glow,
  .badge--promo,
  .badge--promo::before,
  .btn--pulse,
  .pricing-card--featured,
  .pricing-card__badge,
  .solution__promo::before,
  .hero__live-dot,
  .header__phone::before,
  .floating-cta__main,
  .floating-cta__pulse,
  .case-card__label,
  .lead::before {
    animation: none !important;
  }

  .hero__badge,
  .hero__title,
  .hero__lead,
  .hero__cta,
  .hero__trust {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn--primary:hover,
  .pain-card:hover,
  .benefit-card:hover,
  .pricing-card:hover {
    transform: none;
  }

  .faq__answer {
    transition: none;
  }
}
