/* ========================================
   Custom CSS — Будь в ресурсе 2025/2026
   Glassmorphism · Aurora · Grain · Layered Shadows
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Tenor+Sans&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* === Base === */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Grain / Noise Texture Overlay === */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* === Marquee / Ticker === */
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-track {
  display: flex;
  gap: 0.75rem;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee-track:hover {
  animation-play-state: paused;
}

/* === Glassmorphism Cards === */
.glass {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 1px 2px rgba(0,0,0,0.02),
    0 4px 16px rgba(0,0,0,0.04),
    inset 0 1px 0 rgba(255,255,255,0.7);
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}
.glass:hover {
  background: rgba(255, 255, 255, 0.65);
  box-shadow:
    0 2px 4px rgba(0,0,0,0.03),
    0 8px 32px rgba(0,0,0,0.06),
    inset 0 1px 0 rgba(255,255,255,0.85);
  transform: translateY(-2px);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 1px 2px rgba(0,0,0,0.03),
    0 8px 32px rgba(0,0,0,0.05),
    inset 0 1px 0 rgba(255,255,255,0.85);
}

.glass-dark {
  background: rgba(131, 24, 67, 0.7);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 1px 2px rgba(0,0,0,0.1),
    0 8px 32px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

/* === Aurora Gradient Background === */
.aurora {
  position: relative;
  overflow: hidden;
}
.aurora::before {
  content: '';
  position: absolute;
  inset: -50%;
  z-index: 0;
  background: conic-gradient(
    from 180deg at 50% 50%,
    rgba(252,231,243,0.35) 0deg,
    rgba(251,207,232,0.15) 60deg,
    rgba(254,252,232,0.25) 120deg,
    rgba(232,208,220,0.25) 180deg,
    rgba(251,207,232,0.15) 240deg,
    rgba(252,231,243,0.35) 300deg,
    rgba(254,252,232,0.15) 360deg
  );
  animation: aurora-rotate 25s linear infinite;
  filter: blur(80px);
}
@keyframes aurora-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* === Mesh Gradient === */
.mesh-gradient {
  background:
    radial-gradient(ellipse at 15% 15%, rgba(252,231,243,0.4) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 80%, rgba(254,252,232,0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 55% 25%, rgba(232,208,220,0.25) 0%, transparent 45%),
    linear-gradient(180deg, #faf9f6 0%, #fdf2f8 100%);
}

/* === Dot Grid Pattern === */
.dot-grid {
  background-image: radial-gradient(circle, rgba(236,72,153,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* === Layered Shadows === */
.shadow-layered {
  box-shadow:
    0 1px 1px rgba(0,0,0,0.015),
    0 2px 4px rgba(0,0,0,0.02),
    0 4px 8px rgba(0,0,0,0.025),
    0 8px 16px rgba(0,0,0,0.025),
    0 16px 32px rgba(0,0,0,0.015);
}

/* === Glow === */
.glow-green {
  box-shadow: 0 0 24px rgba(236,72,153,0.07), 0 0 64px rgba(236,72,153,0.03);
}

/* === Divider Glow === */
.divider-glow {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(236,72,153,0.2) 30%, rgba(236,72,153,0.28) 50%, rgba(236,72,153,0.2) 70%, transparent 100%);
}

/* === Scroll Reveal Animations === */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* === SVG Check Draw === */
.check-draw path {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.16,1,0.3,1);
}
.visible .check-draw path, .check-draw.visible path {
  stroke-dashoffset: 0;
}

/* === Float / Pulse / Sway === */
@keyframes float      { 0%,100% { transform: translateY(0); }  50% { transform: translateY(-14px); } }
@keyframes float-slow { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
@keyframes pulse-soft { 0%,100% { opacity: 0.25; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.05); } }
@keyframes sway       { 0%,100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }

.animate-float      { animation: float 6s ease-in-out infinite; }
.animate-float-slow { animation: float-slow 8s ease-in-out infinite; }
.animate-pulse-soft { animation: pulse-soft 3s ease-in-out infinite; }
.animate-sway       { animation: sway 4s ease-in-out infinite; }

/* === Header glass === */
.header-scrolled {
  background: rgba(250,249,246,0.55);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid rgba(255,255,255,0.4);
  box-shadow: 0 1px 12px rgba(0,0,0,0.04);
}

/* === Glass Button === */
.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 2rem;
  background: rgba(219,39,119,0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow:
    0 2px 4px rgba(219,39,119,0.18),
    0 8px 24px rgba(219,39,119,0.14),
    inset 0 1px 0 rgba(255,255,255,0.1);
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  cursor: pointer;
  text-decoration: none;
}
.btn-glass:hover {
  background: rgba(236,72,153,0.92);
  transform: translateY(-2px);
  box-shadow:
    0 4px 8px rgba(219,39,119,0.22),
    0 16px 40px rgba(219,39,119,0.18),
    inset 0 1px 0 rgba(255,255,255,0.14);
}
.btn-glass:active { transform: translateY(0); }

/* Large variant */
.btn-glass-lg {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
}

/* === Language Switcher === */
.lang-btn { cursor: pointer; outline: none; border: none; transition: all 0.2s ease; }

/* === Mobile menu === */
#mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: auto;
}
#mobile-menu.open { opacity: 1; visibility: visible; pointer-events: auto; }

/* === Modal === */
.modal-open { display: flex !important; }

/* === Scrollbar === */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(236,72,153,0.18); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(236,72,153,0.3); }

/* === Selection === */
::selection { background: rgba(252,231,243,0.7); color: #9d174d; }

/* === Focus a11y === */
a:focus-visible, button:focus-visible {
  outline: 2px solid rgba(236,72,153,0.45);
  outline-offset: 2px;
  border-radius: 4px;
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale { opacity: 1; transform: none; transition: none; }
  .animate-float, .animate-float-slow, .animate-pulse-soft, .animate-sway { animation: none; }
  .aurora::before { animation: none; }
  .check-draw path { stroke-dashoffset: 0; transition: none; }
  html { scroll-behavior: auto; }
  [data-tilt] { transform: none !important; }
}

/* ========================================
   SCROLL PROGRESS BAR
   ======================================== */
#scroll-progress {
  transition: none;
  will-change: transform;
}

/* ========================================
   DOT NAVIGATION
   ======================================== */
.dot-nav-item.active .dot-nav-dot {
  background: rgba(219,39,119,0.9);
  transform: scale(1.4);
  box-shadow: 0 0 8px rgba(219,39,119,0.3);
  border-color: rgba(219,39,119,0.5);
}
.dot-nav-item.active .dot-nav-label {
  opacity: 0.85;
  translate: 0;
}

/* ========================================
   TILT EFFECT
   ======================================== */
[data-tilt] {
  transform-style: preserve-3d;
  will-change: transform;
}
[data-tilt] > * {
  transform: translateZ(20px);
}

/* ========================================
   COUNTER ANIMATION
   ======================================== */
[data-counter] {
  display: inline-block;
  min-width: 2ch;
  font-variant-numeric: tabular-nums;
}

/* ========================================
   MOBILE BOTTOM CTA BAR
   ======================================== */
.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
#mobile-cta-bar.show {
  transform: translateY(0);
}

/* ========================================
   MOBILE RESPONSIVE (< 768px)
   ======================================== */
@media (max-width: 767px) {
  /* Hero — compact for mobile */
  #hero {
    min-height: calc(100svh - 60px);
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
  #hero h1 {
    font-size: 2.5rem;
    line-height: 1.1;
  }
  #hero .text-lg.md\:text-xl {
    font-size: 1rem;
  }

  /* Smaller pills on mobile */
  #hero .flex-wrap span.glass {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    gap: 0.375rem;
  }

  /* Section padding — tighter */
  section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  /* Glass card — no hover lift on touch (handled by :active) */
  .glass:hover {
    transform: none;
  }
  .glass:active {
    transform: scale(0.98);
    transition-duration: 0.15s;
  }

  /* About cards — stack with less gap */
  .grid.md\\:grid-cols-2 {
    gap: 1.25rem;
  }

  /* Expert photo areas — smaller */
  .relative.h-64 {
    height: 12rem;
  }

  /* Card inner padding */
  .p-7 {
    padding: 1.25rem;
  }

  /* Headings smaller */
  h2 { font-size: 1.75rem !important; }
  h3.font-display.text-2xl { font-size: 1.35rem; }

  /* Meeting items — tighter */
  #meeting .space-y-3 > div {
    padding: 0.875rem 1rem;
  }

  /* Testimonials — horizontal scroll */
  #testimonials .grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    -webkit-overflow-scrolling: touch;
  }
  #testimonials .grid > div {
    flex: 0 0 80%;
    scroll-snap-align: center;
  }

  /* Footer — single col */
  footer .grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Dates — smaller price */
  .font-display.text-2xl.font-semibold.text-brand-600 {
    font-size: 1.5rem;
  }

  /* Dot grid smaller */
  .dot-grid {
    background-size: 20px 20px;
  }

  /* Blobs — reduce on mobile */
  .aurora::before {
    filter: blur(60px);
  }
  #hero .absolute .w-\\[500px\\] { width: 250px; height: 250px; }
  #hero .absolute .w-\\[600px\\] { width: 300px; height: 300px; }
  #hero .absolute .w-\\[300px\\] { width: 150px; height: 150px; }

  /* Button — full width on mobile */
  .btn-glass-lg {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
}

/* ========================================
   EXTRA SMALL SCREENS (< 380px)
   ======================================== */
@media (max-width: 379px) {
  #hero h1 { font-size: 2rem; }
  .btn-glass-lg { font-size: 0.9rem; padding: 0.75rem 1.25rem; }
  h2 { font-size: 1.5rem !important; }
  .px-6 { padding-left: 1rem; padding-right: 1rem; }
}

/* ========================================
   TABLET (768px — 1023px)
   ======================================== */
@media (min-width: 768px) and (max-width: 1023px) {
  #hero h1 { font-size: 3.5rem; }
  .grid.lg\\:grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ========================================
   HORIZONTAL SCROLL INDICATORS
   ======================================== */
.scroll-container {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll-container::-webkit-scrollbar { display: none; }

/* Scroll indicators (dots below carousel) */
.scroll-dots {
  display: flex;
  justify-content: center;
  gap: 0.375rem;
  padding-top: 0.75rem;
}
.scroll-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(236,72,153,0.2);
  transition: all 0.3s ease;
}
.scroll-dot.active {
  background: rgba(236,72,153,0.7);
  transform: scale(1.3);
}

/* ========================================
   SWIPE HINT (horizontal swipe indicator for mobile)
   ======================================== */
@keyframes swipe-hint {
  0%, 100% { transform: translateX(0); opacity: 0.5; }
  50% { transform: translateX(8px); opacity: 1; }
}
.swipe-hint {
  animation: swipe-hint 2s ease-in-out 3;
}

/* ========================================
   TOUCH RIPPLE
   ======================================== */
.touch-ripple {
  position: relative;
  overflow: hidden;
}
.touch-ripple::after {
  content: '';
  position: absolute;
  left: var(--ripple-x, 50%);
  top: var(--ripple-y, 50%);
  border-radius: 50%;
  background: rgba(236,72,153,0.12);
  width: 100px;
  height: 100px;
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s ease, opacity 0.5s ease;
}
.touch-ripple.rippling::after {
  transform: scale(3);
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.8s ease;
}
