/* =============================================
   Buti — Посадочная страница веб-разработчика
   CSS-переменные темы + кастомные стили
   ============================================= */

:root {
  --color-bg: #FFFFFF;
  --color-bg-alt: #F9FAFB;
  --color-text: #1A1A1A;
  --color-text-muted: #6B7280;
  --color-accent: #E8A0BF;
  --color-accent-hover: #D4899F;
  --color-accent-light: #FDF2F8;
  --color-surface: #F5F5F5;
  --color-border: #E5E7EB;
  --color-success: #10B981;
  --color-error: #EF4444;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --shadow-card: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-card-hover: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
  --radius-card: 1rem;
  --radius-btn: 0.75rem;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth scroll + prevent horizontal overflow */
html, body {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

/* ---- Hero phone mockup ---- */
.phone-mockup {
  width: 280px;
  height: 560px;
  border-radius: 2.5rem;
  border: 6px solid #1A1A1A;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  position: relative;
  background: #000;
}
.phone-mockup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: #1A1A1A;
  border-radius: 0 0 1rem 1rem;
  z-index: 10;
}
.phone-mockup .swiper {
  width: 100%;
  height: 100%;
}
.phone-mockup .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Catalog full-screen sections ---- */
.catalog-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 0 4rem;
  position: relative;
  overflow-x: clip;
  overflow-y: visible;
}

/* 3D floating decorative elements */
.catalog-deco {
  position: absolute;
  font-size: 3.5rem;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
  animation: float-deco 6s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}
.catalog-deco:nth-child(2) { animation-delay: -1.5s; animation-duration: 7s; }
.catalog-deco:nth-child(3) { animation-delay: -3s; animation-duration: 5.5s; }
.catalog-deco:nth-child(4) { animation-delay: -4.5s; animation-duration: 8s; }
.catalog-deco:nth-child(5) { animation-delay: -2s; animation-duration: 6.5s; }

@keyframes float-deco {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%      { transform: translateY(-15px) rotate(5deg); }
  50%      { transform: translateY(-8px) rotate(-3deg); }
  75%      { transform: translateY(-20px) rotate(2deg); }
}

/* Catalog swiper */
.catalog-swiper {
  width: 100%;
  overflow: visible;
  padding-bottom: 2.5rem;
}
.catalog-swiper .swiper-slide {
  height: auto;
}
.catalog-swiper .swiper-pagination-bullet-active {
  background: var(--color-accent) !important;
}
.catalog-screen--barber .catalog-swiper .swiper-pagination-bullet {
  background: rgba(255,255,255,0.4);
}
.catalog-screen--barber .catalog-swiper .swiper-pagination-bullet-active {
  background: #D4AF37 !important;
}

/* Swiper nav arrows */
.catalog-swiper-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.catalog-swiper-nav .swiper-pagination {
  position: static !important;
  width: auto !important;
}
.catalog-swiper-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  background: transparent;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.catalog-swiper-arrow:hover {
  background: var(--color-accent);
  color: #fff;
}
.catalog-swiper-arrow svg {
  width: 18px;
  height: 18px;
}
.catalog-screen--barber .catalog-swiper-arrow {
  border-color: #D4AF37;
  color: #D4AF37;
}
.catalog-screen--barber .catalog-swiper-arrow:hover {
  background: #D4AF37;
  color: #0F0F1A;
}
.catalog-screen__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 0.5rem;
}
.catalog-screen__sub {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 1.05rem;
  opacity: 0.7;
}
/* Theme: Маникюр — розовый */
.catalog-screen--manicure {
  background: linear-gradient(170deg, #FDF2F8 0%, #FCE7F3 40%, #FFFFFF 100%);
  color: var(--color-text);
}
/* Theme: Брови — тёплый беж */
.catalog-screen--brows {
  background: linear-gradient(170deg, #FFF8F0 0%, #FDEBD0 40%, #FAF7F2 100%);
  color: var(--color-text);
}
/* Theme: Барберы — тёмный */
.catalog-screen--barber {
  background: linear-gradient(170deg, #1A1A2E 0%, #16213E 40%, #0F0F1A 100%);
  color: #F5F5F5;
}
.catalog-screen--barber .template-card {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
}
.catalog-screen--barber .template-card h3,
.catalog-screen--barber .template-card p { color: #E0E0E0; }
.catalog-screen--barber .template-card p { opacity: 0.7; }
.catalog-screen--barber .btn-outline { border-color: rgba(255,255,255,0.3); color: #E0E0E0; }
.catalog-screen--barber .btn-outline:hover { background: rgba(255,255,255,0.1); }
/* Theme: Другое — лавандовый/мятный */
.catalog-screen--other {
  background: linear-gradient(170deg, #F5F3FF 0%, #EDE9FE 30%, #F0FDFA 100%);
  color: var(--color-text);
}

/* Dots navigation (right side) */
.catalog-dots {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.catalog-dots.visible { opacity: 1; }
.catalog-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.catalog-dot::after {
  content: attr(data-label);
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  background: var(--color-text);
  color: #fff;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  transition: opacity 0.2s ease;
}
.catalog-dot:hover::after { opacity: 1; }
.catalog-dot.active {
  background: var(--color-accent);
  transform: scale(1.3);
}
@media (max-width: 768px) {
  /* Hide dots nav on mobile — swipe is enough */
  .catalog-dots { display: none !important; }

  /* Catalog screens: no forced height, compact padding */
  .catalog-screen {
    min-height: auto !important;
    padding: 2.5rem 0 2rem !important;
    justify-content: flex-start;
  }
  .catalog-screen__title { font-size: 1.5rem; word-wrap: break-word; overflow-wrap: break-word; }
  .catalog-screen__sub { font-size: 0.875rem; margin-bottom: 1.5rem; padding: 0 0.5rem; }

  /* Contain catalog within viewport */
  .catalog-screen > .max-w-6xl { max-width: 100% !important; width: 100% !important; }

  /* Only clip on the swiper container — NOT on wrapper (Swiper needs overflow:visible on wrapper) */
  .catalog-swiper { overflow: hidden !important; padding-bottom: 2rem; width: 100% !important; }
  .catalog-swiper .swiper-wrapper { overflow: visible !important; }

  /* Swiper manages slide width via slidesPerView — no fixed CSS width */

  /* Preview fills card width, horizontal on small screens */
  .card-preview { aspect-ratio: 16/10 !important; max-height: 200px; width: 100% !important; }

  /* Smaller 3D emoji decorations */
  .catalog-deco { font-size: 1.8rem !important; opacity: 0.12 !important; }
  .catalog-deco:nth-child(n+4) { display: none !important; }

  /* Compact nav arrows */
  .catalog-swiper-arrow { width: 36px; height: 36px; }
  .catalog-swiper-arrow svg { width: 14px; height: 14px; }
}

/* ---- Template card ---- */
.template-card {
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}
.template-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}
.template-card img {
  aspect-ratio: 3/4;
  object-fit: cover;
  width: 100%;
}

/* Color palette circles */
.color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  display: inline-block;
}

/* ---- Badge ---- */
.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-manicure { background: #FDF2F8; color: #BE185D; }
.badge-brows { background: #FFF7ED; color: #C2410C; }
.badge-barber { background: #F0F9FF; color: #0369A1; }
.badge-cosmetology { background: #F0FDF4; color: #15803D; }
.badge-permanent { background: #FAF5FF; color: #7E22CE; }
.badge-studio { background: #FFFBEB; color: #B45309; }

/* ---- Pricing card ---- */
.pricing-card {
  border-radius: var(--radius-card);
  padding: 2rem;
  border: 1px solid var(--color-border);
  transition: var(--transition);
  background: var(--color-bg);
}
.pricing-card.featured {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent), var(--shadow-card-hover);
  transform: scale(1.03);
  position: relative;
}

/* ---- Timeline / process steps ---- */
.step-connector {
  position: absolute;
  top: 24px;
  left: calc(50% + 24px);
  right: calc(-50% + 24px);
  height: 2px;
  background: var(--color-border);
}

/* ---- Accent button ---- */
.btn-accent {
  background: var(--color-accent);
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-btn);
  font-weight: 600;
  transition: var(--transition);
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.btn-accent:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-btn);
  font-weight: 600;
  border: 2px solid var(--color-accent);
  transition: var(--transition);
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
}
.btn-outline:hover {
  background: var(--color-accent-light);
}

/* ---- FAQ accordion ---- */
details {
  border-bottom: 1px solid var(--color-border);
}
details summary {
  cursor: pointer;
  padding: 1.25rem 0;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--color-accent);
  transition: var(--transition);
}
details[open] summary::after {
  content: '−';
}
details div, details p {
  padding-bottom: 1.25rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ---- Form ---- */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--color-bg);
  color: var(--color-text);
}
.form-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(232,160,191,0.2);
}
.form-input.error {
  border-color: var(--color-error);
}
.form-error {
  color: var(--color-error);
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: none;
}
.form-input.error + .form-error {
  display: block;
}

/* ---- Swiper custom overrides ---- */
.swiper-pagination-bullet-active {
  background: var(--color-accent) !important;
}

/* ---- Section divider gradient ---- */
.section-gradient {
  background: linear-gradient(135deg, var(--color-accent-light) 0%, var(--color-bg) 100%);
}

/* =============================================
   WOW-ЭФФЕКТЫ: @keyframes
   ============================================= */

@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes text-reveal {
  0%   { opacity: 0; transform: translateY(30px); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

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

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.5); }
}

@keyframes border-glow {
  0%, 100% { border-color: var(--color-accent); box-shadow: 0 0 15px rgba(232,160,191,0.15), 0 0 0 2px var(--color-accent); }
  50%      { border-color: #D4899F; box-shadow: 0 0 30px rgba(232,160,191,0.35), 0 0 0 2px #D4899F; }
}

@keyframes price-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes icon-bounce {
  0%, 100% { transform: scale(1); }
  40%      { transform: scale(1.2); }
  60%      { transform: scale(0.9); }
}

/* ---- Hero animated gradient ---- */
.hero-gradient-animated {
  background: linear-gradient(135deg, #FDF2F8 0%, #FCE7F3 25%, #FFFFFF 50%, #F0F9FF 75%, #FDF2F8 100%);
  background-size: 300% 300%;
  animation: gradient-shift 8s ease infinite;
}

/* ---- Hero text stagger reveal ---- */
.hero-text-reveal > * {
  opacity: 0;
  animation: text-reveal 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
.hero-text-reveal > *:nth-child(1) { animation-delay: 0.1s; }
.hero-text-reveal > *:nth-child(2) { animation-delay: 0.3s; }
.hero-text-reveal > *:nth-child(3) { animation-delay: 0.5s; }
.hero-text-reveal > *:nth-child(4) { animation-delay: 0.7s; }

/* ---- Floating phone mockup ---- */
.phone-float {
  animation: float 4s ease-in-out infinite;
}

/* ---- Glassmorphism cards ---- */
.glass-card {
  background: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  transition: var(--transition);
}
.glass-card:hover {
  background: rgba(255, 255, 255, 0.85) !important;
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(232,160,191,0.15);
}
.glass-card:hover .icon-animate {
  animation: icon-bounce 0.5s ease;
}

/* ---- 3D Card shine overlay ---- */
.card-shine {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
  border-radius: var(--radius-card);
}

/* ---- Pricing featured glow ---- */
.pricing-card.featured {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent), var(--shadow-card-hover);
  transform: scale(1.03);
  position: relative;
  animation: border-glow 3s ease-in-out infinite;
}
.price-shimmer {
  background: linear-gradient(90deg, var(--color-text) 40%, var(--color-accent) 50%, var(--color-text) 60%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: price-shimmer 3s linear infinite;
}

/* ---- Scroll progress bar ---- */
.scroll-progress {
  position: fixed;
  top: 64px;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), #D4899F, var(--color-accent));
  background-size: 200% 100%;
  animation: gradient-shift 3s ease infinite;
  z-index: 51;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* =============================================
   CONTACT CTA WIDGET
   ============================================= */

.contact-widget {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 2.5rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(232, 160, 191, 0.2);
  box-shadow: 0 8px 32px rgba(232, 160, 191, 0.12);
  transition: var(--transition);
}
.contact-widget:hover {
  box-shadow: 0 16px 48px rgba(232, 160, 191, 0.2);
  transform: translateY(-2px);
}

.contact-widget__photo {
  flex-shrink: 0;
  text-align: center;
}
.contact-widget__avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent-light), var(--color-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.875rem;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 4px 20px rgba(232, 160, 191, 0.3);
}
.contact-widget__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-widget__status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--color-success);
  font-weight: 600;
}
.contact-widget__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  animation: pulse-dot 2s ease-in-out infinite;
}

.contact-widget__content {
  flex: 1;
}
.contact-widget__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  color: #fff;
  transition: var(--transition);
}
.contact-btn--telegram {
  background: #2AABEE;
}
.contact-btn--telegram:hover {
  background: #229ED9;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(42, 171, 238, 0.4);
}
.contact-btn--whatsapp {
  background: #25D366;
}
.contact-btn--whatsapp:hover {
  background: #1DA851;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

/* ---- Responsive helpers ---- */
@media (max-width: 768px) {
  .phone-mockup {
    width: 220px;
    height: 440px;
    border-radius: 2rem;
  }
  .pricing-card.featured {
    transform: scale(1);
    animation: border-glow 3s ease-in-out infinite;
  }
  .contact-widget {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
  }
  .contact-widget__buttons {
    justify-content: center;
  }
  .hero-text-reveal > * {
    animation-delay: 0s !important;
    animation-duration: 0.6s;
  }
}
