/* ===== CATLY LANDING — Design System ===== */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=Caveat:wght@400;500;600;700&display=swap');

:root {
  /* Core palette — dark, calm, premium */
  --bg-deep: #0b1120;
  --bg-surface: #111a2e;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);

  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Accent colours — muted, sophisticated */
  --accent-sage: #7c9a8e;
  --accent-sage-glow: rgba(124,154,142,0.25);
  --accent-amber: #c4956a;
  --accent-amber-glow: rgba(196,149,106,0.2);
  --accent-lavender: #9b8ec4;
  --accent-lavender-glow: rgba(155,142,196,0.2);
  --accent-teal: #5b8a8a;

  /* Typography */
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-accent: 'Caveat', cursive;

  /* Spacing */
  --section-pad: clamp(80px, 10vw, 140px);
  --container-max: 1140px;

  /* Misc */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== NOISE OVERLAY ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--transition), transform 0.8s var(--transition);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background var(--transition), box-shadow var(--transition);
}
.navbar.scrolled {
  background: rgba(11,17,32,0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.2rem;
}
.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition);
  font-weight: 500;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-cta {
  display: flex;
  align-items: center;
}
.nav-cta img {
  height: 38px;
  transition: opacity var(--transition);
}
.nav-cta:hover img { opacity: 0.8; }

/* Mobile menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 100px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,17,32,0.3) 0%, var(--bg-deep) 90%);
}
.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-content { max-width: 540px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 100px;
  padding: 8px 18px;
  font-size: 0.82rem;
  color: var(--accent-sage);
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
}
.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-sage);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}
.hero h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hero h1 .accent {
  font-family: var(--font-accent);
  color: var(--accent-sage);
  font-size: 1.15em;
  font-weight: 600;
}
.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 460px;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.app-store-badge img {
  height: 52px;
  transition: transform var(--transition), opacity var(--transition);
}
.app-store-badge:hover img {
  transform: scale(1.04);
  opacity: 0.9;
}
.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.stat-item strong {
  display: block;
  font-size: 1.4rem;
  color: var(--text-primary);
  font-weight: 700;
}
.stat-item span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Hero visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.hero-glow {
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-sage-glow), transparent 70%);
  filter: blur(60px);
  z-index: 0;
}

/* Phone Mockup */
.phone-mockup {
  position: relative;
  z-index: 1;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 30px 80px rgba(0,0,0,0.5));
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.phone-frame {
  width: 280px;
  background: #1a1a2e;
  border-radius: 44px;
  padding: 14px;
  border: 2px solid rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.04),
    0 0 0 1px rgba(0,0,0,0.3),
    0 20px 60px rgba(0,0,0,0.4),
    0 0 120px rgba(124,154,142,0.08);
}
.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: #1a1a2e;
  border-radius: 0 0 18px 18px;
  z-index: 10;
}
.phone-screen {
  width: 100%;
  border-radius: 32px;
  display: block;
}

/* ===== SECTION HEADERS ===== */
.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 64px;
}
.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.section-header h2 .accent {
  font-family: var(--font-accent);
  color: var(--accent-sage);
  font-size: 1.15em;
}
.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* ===== FEATURES ===== */
.features {
  padding: var(--section-pad) 0;
  position: relative;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
  padding: 36px 28px;
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.1);
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-sage), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.4rem;
}
.feature-icon.sage { background: var(--accent-sage-glow); color: var(--accent-sage); }
.feature-icon.amber { background: var(--accent-amber-glow); color: var(--accent-amber); }
.feature-icon.lavender { background: var(--accent-lavender-glow); color: var(--accent-lavender); }
.feature-icon.teal { background: rgba(91,138,138,0.2); color: var(--accent-teal); }
.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.feature-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
  padding: var(--section-pad) 0;
  position: relative;
}
.steps-container {
  display: flex;
  flex-direction: column;
  gap: 80px;
}
.step-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.step-row:nth-child(even) { direction: rtl; }
.step-row:nth-child(even) > * { direction: ltr; }
.step-number {
  font-family: var(--font-accent);
  font-size: 4rem;
  color: var(--accent-sage);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 12px;
}
.step-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.step-content h3 .accent {
  font-family: var(--font-accent);
  color: var(--accent-amber);
  font-size: 1.1em;
}
.step-content p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
}
.step-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}
.step-visual img {
  width: 100%;
  border-radius: var(--radius-lg);
  transition: transform var(--transition);
}
.step-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.06);
  pointer-events: none;
}

/* ===== TESTIMONIALS ===== */
.testimonials {
  padding: var(--section-pad) 0;
  overflow: hidden;
}
.testimonials-track {
  display: flex;
  gap: 24px;
  animation: marquee 35s linear infinite;
  width: max-content;
}
.testimonials-track:hover { animation-play-state: paused; }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.testimonial-card {
  flex: 0 0 360px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: border-color var(--transition);
}
.testimonial-card:hover {
  border-color: rgba(255,255,255,0.12);
}
.testimonial-stars {
  color: var(--accent-amber);
  font-size: 0.9rem;
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.testimonial-card blockquote {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
  font-style: italic;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
}
.author-info strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}
.author-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== CTA ===== */
.cta {
  padding: var(--section-pad) 0;
}
.cta-box {
  text-align: center;
  padding: 80px 40px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid rgba(255,255,255,0.06);
}
.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, var(--accent-sage-glow), transparent 50%),
              radial-gradient(circle at 70% 60%, var(--accent-lavender-glow), transparent 50%);
  opacity: 0.6;
  animation: cta-glow 8s ease-in-out infinite alternate;
}
@keyframes cta-glow {
  0% { transform: rotate(0deg) scale(1); }
  100% { transform: rotate(5deg) scale(1.05); }
}
.cta-box > * { position: relative; z-index: 1; }
.cta-box h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 16px;
}
.cta-box h2 .accent {
  font-family: var(--font-accent);
  color: var(--accent-sage);
  font-size: 1.15em;
}
.cta-box p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 36px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}
.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cta-actions .app-store-badge img { height: 56px; }

/* ===== FOOTER ===== */
.footer {
  padding: 60px 0 32px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 280px;
  line-height: 1.7;
}
.footer-brand .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.15rem;
}
.footer-brand .logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 6px 0;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===== BREATHING ANIMATION (hero decorative) ===== */
.breathing-circle {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 1px solid rgba(124,154,142,0.15);
  animation: breathe 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes breathe {
  0%, 100% { transform: scale(0.8); opacity: 0.3; }
  50% { transform: scale(1.15); opacity: 0.08; }
}

/* ===== PARALLAX ORBS ===== */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.orb-1 {
  width: 400px; height: 400px;
  background: var(--accent-sage-glow);
  top: 10%; left: -5%;
}
.orb-2 {
  width: 300px; height: 300px;
  background: var(--accent-lavender-glow);
  top: 60%; right: -8%;
}
.orb-3 {
  width: 250px; height: 250px;
  background: var(--accent-amber-glow);
  bottom: 10%; left: 30%;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content { max-width: 100%; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { margin-top: 40px; }
  .phone-frame { width: 240px; }

  .features-grid { grid-template-columns: 1fr 1fr; }

  .step-row,
  .step-row:nth-child(even) {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 32px;
  }
  .step-visual { max-width: 400px; margin: 0 auto; }

  .footer-content { grid-template-columns: 1fr 1fr; }

  .nav-links { display: none; }
  .menu-toggle { display: flex; }

  /* Mobile menu open */
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(11,17,32,0.95);
    backdrop-filter: blur(20px);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
}

@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr; }
  .testimonial-card { flex: 0 0 300px; }
  .cta-box { padding: 48px 24px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
