/* ── Kesy Website — Custom Styles ─────────────────────────────────────────── */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  --indigo: #4F46E5;
  --violet: #7C3AED;
  --indigo-light: #818CF8;
  --violet-light: #A78BFA;
  --indigo-dark: #3730A3;
  --violet-dark: #5B21B6;
  --navy: #1E1B4B;
  --emerald: #10B981;
  --emerald-dark: #059669;
  --off-white: #F5F5F7;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-500: #6B7280;
  --gray-800: #1F2937;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--navy);
  background: var(--off-white);
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  line-height: 1.2;
}

/* ── Glassmorphism ───────────────────────────────────────────────────────── */
.glass {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
  background: rgba(30, 27, 75, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 100;
  border-radius: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
}

.navbar.scrolled {
  top: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

.nav-link {
  position: relative;
  padding: 6px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  color: var(--indigo);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--indigo);
  border-radius: 1px;
  transition: width 0.2s;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero-section {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #EEF2FF 0%, #F5F3FF 30%, #FDF2F8 60%, #EFF6FF 100%);
  z-index: 0;
}

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

.hero-blob-1 {
  width: 500px;
  height: 500px;
  background: rgba(129, 140, 248, 0.3);
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.hero-blob-2 {
  width: 400px;
  height: 400px;
  background: rgba(167, 139, 250, 0.25);
  bottom: -50px;
  left: -50px;
  animation-delay: -3s;
}

.hero-blob-3 {
  width: 300px;
  height: 300px;
  background: rgba(16, 185, 129, 0.15);
  top: 40%;
  left: 50%;
  animation-delay: -5s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -30px) scale(1.05); }
  66% { transform: translate(-15px, 15px) scale(0.95); }
}

/* Avatar float */
.avatar-float {
  animation: avatarFloat 4s ease-in-out infinite;
}

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

/* Phone mockup */
.phone-mockup {
  position: relative;
  width: 260px;
  height: 530px;
  border-radius: 36px;
  border: 6px solid #1E1B4B;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(30, 27, 75, 0.2), 0 0 0 1px rgba(255,255,255,0.5);
}

.phone-mockup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: #1E1B4B;
  border-radius: 0 0 18px 18px;
  z-index: 2;
}

/* ── Gradient text ───────────────────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 15px;
  border-radius: 14px;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--indigo);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 15px;
  border-radius: 14px;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.btn-secondary:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* ── Feature Cards ───────────────────────────────────────────────────────── */
.feature-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  padding: 32px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(79, 70, 229, 0.1);
  border-color: rgba(79, 70, 229, 0.2);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

/* ── Steps ───────────────────────────────────────────────────────────────── */
.step-card {
  position: relative;
  text-align: center;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: #fff;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.step-connector {
  position: absolute;
  top: 28px;
  left: calc(50% + 36px);
  width: calc(100% - 72px);
  height: 2px;
  background: linear-gradient(90deg, var(--indigo-light), var(--violet-light));
  opacity: 0.3;
}

/* ── Screenshot Carousel ─────────────────────────────────────────────────── */
.screenshot-track {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 20px 0 40px;
}

.screenshot-track::-webkit-scrollbar {
  display: none;
}

.screenshot-item {
  flex: 0 0 auto;
  scroll-snap-align: center;
  transition: transform 0.3s;
}

.screenshot-item:hover {
  transform: scale(1.03);
}

.screenshot-phone {
  width: 220px;
  height: 448px;
  border-radius: 30px;
  border: 5px solid #1E1B4B;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 20px 50px rgba(30, 27, 75, 0.15);
  position: relative;
}

.screenshot-phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Pricing ─────────────────────────────────────────────────────────────── */
.pricing-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  padding: 36px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(79, 70, 229, 0.12);
}

.pricing-card.featured {
  border: 2px solid var(--indigo);
}

.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: 16px;
  right: -32px;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 40px;
  transform: rotate(45deg);
  font-family: 'Poppins', sans-serif;
}

.pricing-price {
  font-family: 'Poppins', sans-serif;
  font-size: 42px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}

.pricing-price span {
  font-size: 16px;
  font-weight: 500;
  color: var(--gray-500);
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--gray-800);
}

.check-list li svg {
  flex-shrink: 0;
  color: var(--emerald);
}

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
.faq-item {
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.2s;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--navy);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.faq-question:hover {
  background: rgba(255, 255, 255, 0.9);
}

.faq-question svg {
  flex-shrink: 0;
  transition: transform 0.3s;
  color: var(--indigo);
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--gray-500);
}

/* ── CTA Section ─────────────────────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  position: relative;
  overflow: hidden;
}

.cta-blob {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer-link {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
  cursor: pointer;
}

.footer-link:hover {
  color: #fff;
}

/* ── Scroll Animations ───────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Desktop: phone absolutely positioned behind avatar */
@media (min-width: 769px) {
  .reveal-right .hero-phone {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
  }
  .hero-avatar {
    z-index: 2;
    margin-right: 60px;
  }
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }

/* ── Stats counter ───────────────────────────────────────────────────────── */
.stat-number {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 36px;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Mobile menu ─────────────────────────────────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 80px;
  left: 16px;
  right: 16px;
  z-index: 99;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.mobile-menu.open {
  display: block;
}

/* ── Section pattern overlay ─────────────────────────────────────────────── */
.pattern-dots {
  background-image: radial-gradient(circle, rgba(79, 70, 229, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ── Legal Pages ─────────────────────────────────────────────────────────── */
.legal-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin-top: 36px;
  margin-bottom: 12px;
}

.legal-content h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--gray-800);
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal-content p {
  color: var(--gray-500);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal-content ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 12px;
}

.legal-content ul li {
  color: var(--gray-500);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 4px;
}

/* ── Reduced Motion ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1;
    transform: none;
  }
  .stagger-children > * {
    opacity: 1;
    transform: none;
  }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-section { min-height: auto; }
}

@media (max-width: 768px) {
  .navbar { top: 8px; left: 8px; right: 8px; }
  .phone-mockup { width: 200px; height: 408px; border-radius: 28px; }
  .hero-avatar { margin: -20px !important; width: auto !important; height: 438px !important; object-fit: contain; position: relative !important; z-index: 2; }
  .hero-phone.phone-mockup { height: 393px !important; aspect-ratio: 260 / 530; border-radius: 28px !important; position: relative !important; z-index: 1; margin-left: -20px; flex-shrink: 0; }
  .reveal-right { padding-top: 32px !important; padding-bottom: 32px !important; margin-right: 32px; }
  .screenshot-phone { width: 180px; height: 366px; border-radius: 24px; }
  .pricing-price { font-size: 34px; }
  .stat-number { font-size: 28px; }
}
