/* ============================================================
   Loopjam.app — static site stylesheet
   Design tokens mirror loopjam.events (the web app) exactly.
   Do not invent new colours: extend from these variables.
   ============================================================ */

:root {
  --primary: #4318FF;
  --primary-pressed: #3612D4;
  --tint: #F5F3FF;
  --lavender: #E0D9FF;
  --ink: #1A1A1A;
  --muted: #6B7280;
  --bg: #FAFAFA;
  --bg-alt: #F9FAFB;
  --card-border: #E5E7EB;
  --danger: #DC2626;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --shadow-card: 0 10px 40px rgba(67, 24, 255, 0.10);
  --shadow-float: 0 24px 60px rgba(26, 26, 26, 0.18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* Entrances/reveals: a long, soft ease-out. */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Hovers: symmetric ease-in-out — starts gently, lands gently. */
  --ease-soft: cubic-bezier(0.45, 0.05, 0.25, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--primary); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 14px 24px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.45s var(--ease-soft), background-color 0.3s var(--ease-soft), box-shadow 0.45s var(--ease-soft);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-pressed);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.btn-secondary {
  background: #F3F4F6;
  color: var(--primary);
  border: 1px solid var(--card-border);
}
.btn-secondary:hover { background: #E5E7EB; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.7);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 30px rgba(26, 26, 26, 0.08);
}

/* Header compacts as you scroll down and relaxes back at the top —
   height and logo ease together on the shared curve. */
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  transition: height 0.45s var(--ease);
}
.site-header.scrolled .container { height: 62px; }
.site-header.scrolled .logo img { height: 38px; }

/* Same rendered size as loopjam.events' public pages (h-14 = 56px,
   the wordmark SVG's natural height). */
.logo img {
  height: 56px;
  width: auto;
  transition: height 0.45s var(--ease);
}

.main-nav {
  display: none;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.25s ease;
}
.main-nav a:hover { color: var(--primary); }
/* Beat the `.main-nav a` colour above — button text stays white on purple. */
.main-nav a.btn-primary { color: #fff; }
.main-nav a.btn-primary:hover { color: #fff; }

.nav-cta { margin-left: 4px; }

/* Mobile nav */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 20px 20px;
  background: #fff;
  border-bottom: 1px solid var(--card-border);
}
body.nav-open .mobile-nav { display: flex; }
.mobile-nav a {
  padding: 12px;
  border-radius: var(--r-sm);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.mobile-nav a:hover { background: var(--tint); color: var(--primary); }
.mobile-nav .mobile-nav-group {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 12px 12px 2px;
}

@media (min-width: 900px) {
  .main-nav { display: flex; }
  .nav-toggle, .mobile-nav { display: none !important; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 40px;
}

/* Drifting brand-tint blobs give the hero its motion without a video asset.
   A real background video/motion loop can replace .hero-blobs later:
   drop a <video> into .hero-media (slot marked in index.html). */
.hero-blobs { position: absolute; inset: 0; pointer-events: none; }
.hero-blobs::before,
.hero-blobs::after {
  content: "";
  position: absolute;
  width: 55vw;
  height: 55vw;
  min-width: 420px;
  min-height: 420px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
}
.hero-blobs::before {
  background: radial-gradient(circle, var(--lavender) 0%, transparent 65%);
  top: -18%;
  right: -12%;
  animation: blob-drift 16s ease-in-out infinite alternate;
}
.hero-blobs::after {
  background: radial-gradient(circle, var(--tint) 0%, transparent 65%);
  bottom: -25%;
  left: -15%;
  animation: blob-drift 20s ease-in-out infinite alternate-reverse;
}
@keyframes blob-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-6%, 6%) scale(1.12); }
}

.hero-inner {
  position: relative;
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 20px;
}
.hero h1 .accent { color: var(--primary); }

.hero .subhead {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--muted);
  max-width: 34em;
  margin: 0 0 32px;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.store-badges img { height: 52px; width: auto; }
.store-badges a {
  display: inline-block;
  transition: transform 0.45s var(--ease-soft);
  border-radius: var(--r-md);
}
.store-badges a:hover { transform: translateY(-3px); }

/* Floating photo-card collage (parallax via [data-depth] in main.js) */
.hero-visual {
  position: relative;
  height: 380px;
}
.float-card {
  position: absolute;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-float);
  will-change: transform;
}
.float-card img { width: 100%; height: 100%; object-fit: cover; }

/* Parallax: main.js sets --py from scroll position; rotation stays intact. */
.float-card.fc-1 { width: 46%; height: 78%; left: 4%;  top: 2%;  transform: translateY(var(--py, 0px)) rotate(-4deg); }
.float-card.fc-2 { width: 38%; height: 46%; right: 6%; top: 0;   transform: translateY(var(--py, 0px)) rotate(3deg); }
.float-card.fc-3 { width: 34%; height: 52%; right: 14%; bottom: 0; transform: translateY(var(--py, 0px)) rotate(-2deg); }
.float-card.fc-4 { width: 26%; height: 34%; left: 40%; bottom: 6%; transform: translateY(var(--py, 0px)) rotate(5deg); }
.float-card.fc-5 { width: 24%; height: 30%; left: 9%; bottom: -3%; transform: translateY(var(--py, 0px)) rotate(-7deg); }

@media (min-width: 900px) {
  .hero { padding: 96px 0 72px; }
  .hero-inner { grid-template-columns: 1.05fr 0.95fr; }
  .hero-visual { height: 520px; }
}

/* ---------- Section basics ---------- */

section { padding: 72px 0; }
@media (min-width: 900px) { section { padding: 96px 0; } }

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 12px;
  text-align: center;
}
.section-lede {
  text-align: center;
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 40em;
  margin: 0 auto 48px;
}

/* Scroll reveal — long soft glide upward into place. */
.reveal {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* Staggered variant: the CONTAINER stays put; its children glide in one
   after another (each carries --i inline). */
.reveal-stagger { opacity: 1; transform: none; }
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 110ms);
}
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }

/* ---------- Category strip (tabbed showcase) ---------- */

.categories { background: var(--bg-alt); }

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}
.category-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.category-tab svg { width: 18px; height: 18px; }
.category-tab:hover { border-color: var(--primary); color: var(--primary); }
.category-tab[aria-selected="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* True carousel: one card-styled viewport, all four panels side by side on
   a track that glides left/right to the selected tab. */
.carousel {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.carousel-track {
  display: flex;
  align-items: stretch;
  transition: transform 0.7s var(--ease);
}
.category-panel {
  flex: 0 0 100%;
  min-width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
  padding: 28px;
}
/* Inactive panels fade slightly so the glide reads as focus shifting. */
.category-panel { opacity: 0.35; transition: opacity 0.5s ease 0.15s; }
.category-panel.active { opacity: 1; }
.panel-media {
  border-radius: var(--r-lg);
  overflow: hidden;
}
.panel-media img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}
/* The active preview gently zooms in — restarts each time a panel is
   selected, easing off as it grows. */
.category-panel.active .panel-media img {
  animation: panel-zoom 8s var(--ease) forwards;
}
@keyframes panel-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.1); }
}
.category-panel h3 {
  font-size: 1.6rem;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.category-panel p { color: var(--muted); font-size: 1.1rem; margin: 0; }

@media (min-width: 800px) {
  .category-panel { grid-template-columns: 1.1fr 0.9fr; padding: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track { transition: none; }
}

/* ---------- How it works ---------- */

.steps {
  display: grid;
  gap: 28px;
  counter-reset: step;
}
.step {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  position: relative;
  transition: transform 0.5s var(--ease-soft), box-shadow 0.5s var(--ease-soft), border-color 0.35s var(--ease-soft);
}
.step:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-card);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--primary);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 18px;
}
.step h3 { margin: 0 0 8px; font-size: 1.25rem; }
.step p { margin: 0; color: var(--muted); }

@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Stat callout + avatar stack ---------- */

.stats { background: var(--bg-alt); text-align: center; }

.avatar-stack {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.avatar-stack img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(26, 26, 26, 0.12);
}
.avatar-stack img + img { margin-left: -12px; }

.stat-big {
  font-size: clamp(4rem, 14vw, 8.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--primary);
  margin: 8px 0 4px;
}
.stat-big sub {
  font-size: 0.35em;
  font-weight: 700;
  vertical-align: baseline;
}
.stat-caption { font-size: 1.15rem; color: var(--muted); margin: 0 0 40px; }

.stat-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.stat-chip {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  padding: 16px 28px;
  min-width: 180px;
  transition: transform 0.45s var(--ease-soft), border-color 0.35s var(--ease-soft);
}
.stat-chip:hover { transform: translateY(-4px); border-color: var(--lavender); }
.stat-chip strong { display: block; font-size: 1.5rem; color: var(--ink); letter-spacing: -0.02em; }
.stat-chip span { color: var(--muted); font-size: 0.92rem; }

/* ---------- Host features ---------- */

.features-grid {
  display: grid;
  gap: 24px;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: transform 0.5s var(--ease-soft), box-shadow 0.5s var(--ease-soft), border-color 0.35s var(--ease-soft);
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--lavender);
  box-shadow: var(--shadow-card);
}
.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--lavender);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: 0.98rem; }

.features-note {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  margin-top: 36px;
}

@media (min-width: 640px)  { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Moments marquee ---------- */

.marquee-section { padding-bottom: 0; overflow: hidden; }

.marquee {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  padding: 24px 0 72px;
}
.marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: marquee-scroll 38s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.moment-card {
  width: 200px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(26, 26, 26, 0.06);
}
.moment-card img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.moment-card figcaption {
  padding: 12px 14px;
  font-size: 0.88rem;
  font-weight: 600;
}
.moment-card figcaption span {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---------- Download CTA ---------- */

.download-cta .cta-card {
  background: linear-gradient(135deg, var(--primary) 0%, #7C5CFF 100%);
  border-radius: var(--r-xl);
  padding: 56px 28px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.download-cta .cta-card::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, transparent 70%);
  top: -160px;
  right: -120px;
}
.download-cta h2 {
  font-size: clamp(1.9rem, 5vw, 3rem);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  position: relative;
}
.download-cta p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  margin: 0 auto 32px;
  max-width: 36em;
  position: relative;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 28px;
  position: relative;
}
/* ---------- Footer ---------- */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--card-border);
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid;
  gap: 36px;
  margin-bottom: 40px;
}
.footer-brand img { height: 32px; margin-bottom: 14px; }
.footer-brand p { color: var(--muted); font-size: 0.95rem; max-width: 26em; margin: 0; }
.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 14px;
}
.footer-col a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  padding: 6px 0;
  font-size: 0.95rem;
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid var(--card-border);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.88rem;
}
@media (min-width: 800px) {
  .footer-grid { grid-template-columns: 1.6fr 1fr; }
}

/* ---------- Inner pages (support / partners) ---------- */

.page-hero {
  padding: 64px 0 24px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.page-hero p { color: var(--muted); font-size: 1.15rem; max-width: 38em; margin: 0 auto; }

.faq-list { max-width: 800px; margin: 0 auto; display: grid; gap: 14px; }
.faq-item {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] summary { color: var(--primary); }
.faq-body { padding: 0 24px 22px; color: var(--muted); }
.faq-body ul { padding-left: 20px; margin: 12px 0; }
.faq-body li { margin-bottom: 8px; }
.faq-body strong { color: var(--ink); }

/* Legal pages (/privacy/, /terms/) — mirrors loopjam.events' document styling. */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 0 96px;
}
.legal h1 {
  font-size: clamp(2rem, 5vw, 2.6rem);
  letter-spacing: -0.02em;
  margin: 0;
}
.legal .updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 8px 0 0;
}
.legal-body {
  margin-top: 40px;
  color: #4B5563;
}
.legal-body > p:first-child { margin-top: 0; }
/* Neutralise the global section padding inside the document body. */
.legal-body section { padding: 0; margin-top: 36px; }
.legal-body h2 {
  font-size: 1.5rem;
  color: var(--ink);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.legal-body h3 {
  font-size: 1.05rem;
  color: var(--ink);
  margin: 18px 0 8px;
}
.legal-body ul {
  padding-left: 24px;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-body a {
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.legal-body a:hover { text-decoration: underline; }

/* Contact / partner forms */
.form-card {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
}
.form-field { margin-bottom: 20px; }
.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 6px;
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
  font: inherit;
  color: var(--ink);
  background: var(--bg-alt);
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: 2px solid var(--primary);
  outline-offset: 0;
  border-color: var(--primary);
  background: #fff;
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input[type="file"] { padding: 10px; background: #fff; }
.form-status { margin-top: 16px; font-weight: 600; display: none; }
.form-status.ok { display: block; color: #047857; }
.form-status.err { display: block; color: var(--danger); }

/* ============================================================
   Animation layer — entrance choreography, ambient motion,
   and hover micro-interactions. Everything here is decorative:
   reduced-motion (below) and <noscript> keep content readable.
   ============================================================ */

/* Load-time entrance: hero blocks rise in with a per-element delay (--d).
   `backwards` fill hides them only during the delay; after the animation
   the base styles (incl. parallax transforms) take over untouched. */
.anim-rise {
  animation: rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: var(--d, 0s);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
}

.float-card {
  animation: card-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: var(--d, 0.4s);
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(56px) scale(0.9); }
}

/* Ambient bob on the collage photos (inner img so the parallax transform
   on the card itself is never fought). Slight scale hides the travel. */
.float-card img { animation: bob 7s ease-in-out infinite alternate; }
.float-card.fc-2 img { animation-duration: 5.5s; animation-delay: -2s; }
.float-card.fc-3 img { animation-duration: 6.2s; animation-delay: -1s; }
.float-card.fc-4 img { animation-duration: 4.8s; animation-delay: -3s; }
.float-card.fc-5 img { animation-duration: 5.9s; animation-delay: -4s; }
@keyframes bob {
  from { transform: translateY(-5px) scale(1.06); }
  to   { transform: translateY(5px) scale(1.06); }
}

/* Category tab auto-advance progress: fills over the 5s cycle. JS restarts
   it each rotation and hides it once the visitor takes over. */
.category-tab { position: relative; overflow: hidden; }
.tab-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left;
  background: rgba(255, 255, 255, 0.65);
  pointer-events: none;
}
.category-tab[aria-selected="true"] .tab-progress.run {
  animation: tab-progress 5s linear forwards;
}
@keyframes tab-progress {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.category-tabs.tabs-manual .tab-progress { display: none; }

/* Step numbers pop in sequence once the section reveals. */
.step-num { transition: background-color 0.35s var(--ease-soft), color 0.35s var(--ease-soft), transform 0.35s var(--ease-soft); }
.steps.in .step-num {
  animation: pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.steps.in .step:nth-child(1) .step-num { animation-delay: 0.25s; }
.steps.in .step:nth-child(2) .step-num { animation-delay: 0.4s; }
.steps.in .step:nth-child(3) .step-num { animation-delay: 0.55s; }
@keyframes pop {
  from { transform: scale(0); }
}
.step:hover .step-num {
  background: var(--primary);
  color: #fff;
  transform: scale(1.1) rotate(-6deg);
}

/* Avatars pop in one by one with a little overshoot. */
.avatar-stack img { opacity: 0; }
.avatar-stack.in img {
  animation: pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.avatar-stack.in img:nth-child(1) { animation-delay: 0.05s; }
.avatar-stack.in img:nth-child(2) { animation-delay: 0.15s; }
.avatar-stack.in img:nth-child(3) { animation-delay: 0.25s; }
.avatar-stack.in img:nth-child(4) { animation-delay: 0.35s; }
.avatar-stack.in img:nth-child(5) { animation-delay: 0.45s; }
@keyframes pop-in {
  from { opacity: 0; transform: scale(0); }
  70%  { opacity: 1; transform: scale(1.18); }
  to   { opacity: 1; transform: scale(1); }
}

/* Soft breathing glow behind the big stat. */
.stat-big { position: relative; display: inline-block; }
.stat-big::before {
  content: "";
  position: absolute;
  inset: -35% -25%;
  background: radial-gradient(circle, rgba(67, 24, 255, 0.14) 0%, transparent 62%);
  z-index: -1;
  animation: glow 4s ease-in-out infinite alternate;
}
@keyframes glow {
  from { opacity: 0.5; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1.08); }
}

/* Feature icons do a jelly wobble on card hover. */
.feature-card:hover .feature-icon { animation: jelly 0.6s ease; }
@keyframes jelly {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.14, 0.88) rotate(-4deg); }
  55%  { transform: scale(0.92, 1.08) rotate(3deg); }
  75%  { transform: scale(1.05, 0.97); }
  100% { transform: scale(1); }
}

/* Marquee cards sit at playful alternating tilts; hover straightens + lifts. */
.moment-card {
  transition: transform 0.5s var(--ease-soft), box-shadow 0.5s var(--ease-soft);
}
.marquee-track .moment-card:nth-child(odd)  { transform: rotate(-1.4deg); }
.marquee-track .moment-card:nth-child(even) { transform: rotate(1.4deg); }
.marquee-track .moment-card:hover {
  transform: rotate(0deg) translateY(-8px);
  box-shadow: var(--shadow-card);
}

/* Shimmer sweep across the download CTA + gently floating QR card. */
.download-cta .cta-card::after {
  content: "";
  position: absolute;
  top: -10%;
  bottom: -10%;
  width: 34%;
  left: -50%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.16) 50%, transparent 100%);
  transform: skewX(-16deg);
  animation: shimmer 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shimmer {
  0%   { left: -50%; }
  45%  { left: 130%; }
  100% { left: 130%; }
}
/* Section titles sharpen from a soft blur as they glide in. */
.section-title.reveal {
  filter: blur(7px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease);
}
.section-title.reveal.in { filter: blur(0); }

/* The download CTA settles from slightly small — a soft landing. */
.download-cta .cta-card.reveal { transform: translateY(44px) scale(0.965); }
.download-cta .cta-card.reveal.in { transform: translateY(0) scale(1); }

/* Buttons acknowledge the press. */
.btn:active { transform: translateY(0) scale(0.97); }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; filter: none; }
  .reveal-stagger > * { opacity: 1; transform: none; transition: none; }
  .avatar-stack img { opacity: 1; }
  .float-card { transform: none !important; }
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
  }
}
