:root {
  --bg: #fdf8f3;
  --bg-deep: #f5ebe0;
  --card: rgba(255, 255, 255, 0.88);
  --text: #2d2a26;
  --muted: #6b6560;
  --accent: #f28c74;
  --accent-dark: #e06b52;
  --purple: #6b4fbb;
  --purple-deep: #4a3289;
  --gold: #f4c430;
  --border: rgba(242, 140, 116, 0.2);
  --max: 1100px;
  --nav-h: 72px;
  --shadow: 0 20px 50px rgba(74, 50, 137, 0.12);
  --radius: 20px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

/* Animated background mesh */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(242, 140, 116, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(107, 79, 187, 0.25), transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(244, 196, 48, 0.15), transparent 45%),
    var(--bg);
}

#orb-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
}

/* Nav */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  background: rgba(253, 248, 243, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.site-nav.scrolled {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
}

.nav-brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(242, 140, 116, 0.45);
  animation: icon-pulse 3s ease-in-out infinite;
}

@keyframes icon-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-dark);
  background: rgba(242, 140, 116, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 55%, var(--purple) 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(242, 140, 116, 0.45);
  animation: btn-glow 2.5s ease-in-out infinite;
}

@keyframes btn-glow {
  0%, 100% { box-shadow: 0 12px 28px rgba(242, 140, 116, 0.4); }
  50% { box-shadow: 0 16px 36px rgba(107, 79, 187, 0.35); }
}

.btn-outline {
  background: var(--card);
  color: var(--accent-dark);
  border: 2px solid var(--accent);
}

.btn-nav {
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
}

/* Hero */
.hero {
  padding: calc(var(--nav-h) + 3rem) 1.25rem 4rem;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  min-height: 85vh;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 1rem;
  animation: float-badge 4s ease-in-out infinite;
}

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

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  background: linear-gradient(120deg, var(--text) 0%, var(--purple-deep) 50%, var(--accent-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
  max-width: 32rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.stat {
  text-align: left;
}

.stat strong {
  display: block;
  font-size: 1.35rem;
  color: var(--accent-dark);
}

.stat span {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Phone mockup */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-frame {
  position: relative;
  width: min(280px, 90vw);
  aspect-ratio: 9 / 19;
  background: linear-gradient(160deg, #1a1a2e 0%, #2d2a4a 100%);
  border-radius: 36px;
  padding: 12px;
  box-shadow:
    0 40px 80px rgba(74, 50, 137, 0.35),
    inset 0 0 0 2px rgba(255, 255, 255, 0.1);
  animation: phone-float 5s ease-in-out infinite;
}

@keyframes phone-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 26px;
  overflow: hidden;
  background: var(--bg);
}

.phone-notch {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 20px;
  background: #1a1a2e;
  border-radius: 0 0 12px 12px;
  z-index: 4;
  pointer-events: none;
}

.phone-carousel {
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: pan-y;
}

.phone-track {
  display: flex;
  height: 100%;
  transition: transform 0.65s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}

.phone-track.is-swiping {
  transition-duration: 0.45s;
}

.phone-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
}

.phone-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.phone-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
  z-index: 3;
  padding: 0 8px;
}

.phone-dot {
  width: 5px;
  height: 5px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(45, 42, 38, 0.25);
  cursor: pointer;
  transition: width 0.35s ease, background 0.35s ease, border-radius 0.35s ease;
}

.phone-dot.active {
  width: 16px;
  border-radius: 4px;
  background: var(--accent);
}

.phone-dot:hover {
  background: var(--accent-dark);
}

.float-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  animation: shape-drift 8s ease-in-out infinite;
}

.float-shape.s1 {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  top: -20px;
  right: -10px;
  opacity: 0.7;
  animation-delay: 0s;
}

.float-shape.s2 {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--purple), var(--accent));
  bottom: 40px;
  left: -30px;
  opacity: 0.6;
  animation-delay: -2s;
}

.float-shape.s3 {
  width: 40px;
  height: 40px;
  background: var(--gold);
  top: 50%;
  right: -40px;
  opacity: 0.5;
  animation-delay: -4s;
}

@keyframes shape-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(8px, -12px) scale(1.08); }
  66% { transform: translate(-6px, 8px) scale(0.95); }
}

/* Sections */
section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 0.5rem;
  color: var(--text);
}

.section-title p {
  color: var(--muted);
  margin: 0;
  max-width: 36rem;
  margin-inline: auto;
}

/* Feature grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  opacity: 0;
  transform: translateY(28px);
}

.feature-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 56px rgba(107, 79, 187, 0.18);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  animation: icon-wiggle 4s ease-in-out infinite;
}

.feature-card:nth-child(1) .feature-icon { background: linear-gradient(135deg, #e06b52, #f28c74); }
.feature-card:nth-child(2) .feature-icon { background: linear-gradient(135deg, #6b4fbb, #9b7fd4); }
.feature-card:nth-child(3) .feature-icon { background: linear-gradient(135deg, #4a3289, #e06b52); }
.feature-card:nth-child(4) .feature-icon { background: linear-gradient(135deg, #f4c430, #e06b52); }
.feature-card:nth-child(5) .feature-icon { background: linear-gradient(135deg, #2d8f6f, #6b4fbb); }
.feature-card:nth-child(6) .feature-icon { background: linear-gradient(135deg, #e06b52, #f4c430); }

.feature-card:nth-child(2) .feature-icon { animation-delay: -0.5s; }
.feature-card:nth-child(3) .feature-icon { animation-delay: -1s; }

@keyframes icon-wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-4deg); }
  75% { transform: rotate(4deg); }
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Marquee */
.marquee-wrap {
  overflow: hidden;
  padding: 1.5rem 0;
  background: linear-gradient(90deg, var(--purple-deep), var(--accent-dark));
  margin: 2rem 0;
}

.marquee {
  display: flex;
  gap: 3rem;
  animation: marquee 25s linear infinite;
  white-space: nowrap;
}

.marquee span {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  font-size: 0.95rem;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Download CTA */
.download-section {
  background: linear-gradient(135deg, var(--purple-deep) 0%, var(--accent-dark) 50%, var(--accent) 100%);
  border-radius: 28px;
  padding: 3rem 2rem;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(74, 50, 137, 0.35);
}

.download-section::before {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  animation: cta-shine 6s linear infinite;
}

@keyframes cta-shine {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.download-section > * {
  position: relative;
  z-index: 1;
}

.download-section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
}

.download-section p {
  margin: 0 auto 1.75rem;
  max-width: 28rem;
  opacity: 0.92;
}

.download-badges,
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.store-badge {
  display: inline-block;
  line-height: 0;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.store-badge:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.store-badge img {
  height: 56px;
  width: auto;
  display: block;
  border-radius: 14px;
  object-fit: contain;
}

.store-badge[data-store="app-store"] img {
  height: 56px;
}

.store-badge[data-store="google-play"] img {
  height: 56px;
}

.download-badges .btn {
  min-width: 200px;
}

.btn-light {
  background: #fff;
  color: var(--purple-deep);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Page content (legal) */
.page-wrap {
  padding: calc(var(--nav-h) + 2rem) 1.25rem 4rem;
  max-width: var(--max);
  margin: 0 auto;
}

.page-hero-band {
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  margin-bottom: 1.5rem;
}

.page-hero-band img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin-bottom: 1rem;
  box-shadow: 0 12px 32px rgba(242, 140, 116, 0.4);
  animation: icon-pulse 3s ease-in-out infinite;
}

.page-hero-band h1 {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
}

.page-hero-band p {
  margin: 0;
  color: var(--muted);
}

article.content-card {
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

article.content-card.visible {
  opacity: 1;
  transform: translateY(0);
}

article.content-card h2 {
  color: var(--accent-dark);
  font-size: 1.2rem;
  margin-top: 0;
}

article.content-card h3 {
  font-size: 1rem;
  margin: 1.25rem 0 0.5rem;
}

.muted { color: var(--muted); font-size: 0.9rem; }
.updated { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; }

.badge {
  display: inline-block;
  background: rgba(242, 140, 116, 0.15);
  color: var(--accent-dark);
  padding: 0.2rem 0.65rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Sticky CTA bar */
.cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99;
  padding: 0.75rem 1rem;
  background: rgba(253, 248, 243, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.cta-bar.visible {
  transform: translateY(0);
}

.cta-bar p {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.cta-bar .btn {
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 3rem 1.25rem 5rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.site-footer a {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 600;
}

.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* Reveal utility */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    min-height: auto;
  }

  .hero-lead,
  .hero-stats {
    margin-inline: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .nav-links a:not(.btn-nav) {
    display: none;
  }

  .nav-links .btn-nav {
    margin-left: auto;
  }
}

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

  #orb-canvas {
    display: none;
  }
}
