/* ========================================
   Привет, Касатики — Landing Page
   Lightweight, self-hosted, zero deps
   ======================================== */

:root {
  --bg: #0a0a0f;
  --bg-elevated: rgba(255,255,255,0.03);
  --bg-glass: rgba(255,255,255,0.06);
  --border-glass: rgba(255,255,255,0.08);
  --text: #f0f0f5;
  --text-muted: #8a8a9a;
  --accent-1: #6366f1;
  --accent-2: #a855f7;
  --accent-3: #ec4899;
  --gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,0.3);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ---------- Animated Background ---------- */
.bg-animation {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: float 20s ease-in-out infinite;
}

.blob-1 {
  width: 600px; height: 600px;
  background: var(--accent-1);
  top: -10%; left: -10%;
  animation-delay: 0s;
}

.blob-2 {
  width: 500px; height: 500px;
  background: var(--accent-2);
  bottom: -10%; right: -10%;
  animation-delay: -7s;
}

.blob-3 {
  width: 400px; height: 400px;
  background: var(--accent-3);
  top: 40%; left: 40%;
  animation-delay: -14s;
  opacity: 0.2;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(50px, -50px) scale(1.1); }
  50% { transform: translate(-30px, 30px) scale(0.95); }
  75% { transform: translate(20px, 40px) scale(1.05); }
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 4%;
  background: rgba(10,10,15,0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
}

.nav-emoji { font-size: 1.5rem; }

.nav-cta {
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  background: var(--gradient);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(99,102,241,0.5);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8rem 8% 4rem;
  gap: 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.hero-content { flex: 1; max-width: 600px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 100px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.pulse-dot {
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

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

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99,102,241,0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(99,102,241,0.5);
}

.btn-ghost {
  background: var(--bg-glass);
  color: var(--text);
  border: 1px solid var(--border-glass);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.15);
}

.btn-large { padding: 1rem 2.5rem; font-size: 1.125rem; }

/* Phone Mockup */
.hero-visual { flex: 0 0 auto; }

.phone-mockup {
  width: 280px;
  height: 560px;
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  border-radius: 40px;
  padding: 12px;
  box-shadow: var(--shadow), 0 0 60px rgba(99,102,241,0.15);
  border: 1px solid var(--border-glass);
  animation: phoneFloat 6s ease-in-out infinite;
}

@keyframes phoneFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(1deg); }
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--bg);
  border-radius: 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.screen-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-glass);
}

.screen-avatar {
  width: 36px; height: 36px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.screen-title { font-weight: 600; font-size: 0.9375rem; }

.screen-messages {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
}

.msg { display: flex; animation: msgSlide 0.5s ease-out both; }
.msg-in { justify-content: flex-start; }
.msg-out { justify-content: flex-end; }

.msg-bubble {
  max-width: 85%;
  padding: 0.625rem 1rem;
  border-radius: 18px;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.msg-in .msg-bubble {
  background: var(--bg-elevated);
  border: 1px solid var(--border-glass);
  border-bottom-left-radius: 4px;
}

.msg-out .msg-bubble {
  background: var(--gradient);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg:nth-child(1) { animation-delay: 0.5s; }
.msg:nth-child(2) { animation-delay: 1.2s; }
.msg:nth-child(3) { animation-delay: 2.0s; }
.msg:nth-child(4) { animation-delay: 2.8s; }

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

/* ---------- Stats ---------- */
.stats {
  position: relative;
  z-index: 1;
  padding: 4rem 8%;
  max-width: 1200px;
  margin: 0 auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.stat-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ---------- Features ---------- */
.features {
  position: relative;
  z-index: 1;
  padding: 6rem 8%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.feature-icon {
  width: 48px; height: 48px;
  background: var(--gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---------- Join ---------- */
.join {
  position: relative;
  z-index: 1;
  padding: 6rem 8%;
  max-width: 800px;
  margin: 0 auto;
}

.join-content { text-align: center; }

.steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 3rem;
  text-align: left;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 1.5rem;
  backdrop-filter: blur(10px);
}

.step-number {
  width: 40px; height: 40px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.step-text h4 { font-weight: 600; margin-bottom: 0.25rem; }
.step-text p { color: var(--text-muted); font-size: 0.9375rem; }
.step-text a { color: var(--accent-1); text-decoration: none; }
.step-text a:hover { text-decoration: underline; }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  z-index: 1;
  padding: 4rem 8%;
  max-width: 800px;
  margin: 0 auto;
}

.cta-box {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 4rem 2rem;
  text-align: center;
  backdrop-filter: blur(10px);
}

.cta-box h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cta-box p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.0625rem;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  padding: 3rem 8%;
  border-top: 1px solid var(--border-glass);
  background: rgba(0,0,0,0.2);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer-brand {
  font-weight: 700;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text); }

.footer-copy {
  font-size: 0.875rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ---------- Scroll Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 7rem;
  }
  .hero-actions { justify-content: center; }
  .hero-visual { order: -1; }
  .phone-mockup { width: 240px; height: 480px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav { padding: 0.75rem 1rem; }
  .nav-title { display: none; }
  .hero { padding: 6rem 1.5rem 3rem; }
  .phone-mockup { width: 200px; height: 400px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .stat-card { padding: 1.5rem 1rem; }
  .stat-number { font-size: 1.75rem; }
  .features-grid { grid-template-columns: 1fr; }
  .features { padding: 4rem 1.5rem; }
  .join { padding: 4rem 1.5rem; }
  .cta { padding: 2rem 1.5rem; }
  .cta-box { padding: 2.5rem 1.5rem; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
