/* HaitianMeet marketing — v2 design system in vanilla CSS.
 * Mirrors the app's color + type tokens so the site and the product
 * feel like one thing. Mobile-first; desktop layouts only kick in
 * past 768px / 1024px breakpoints. */

/* ---------- TOKENS ---------------------------------------------- */
:root {
  /* Mirrors lib/app_config/style.dart + features/auth/.../v2_widgets.dart */
  --purple: #6A26D8;
  --purple-light: #D58CFF;
  --purple-deep: #4F18A8;

  --ink: #1D1D1F;       /* kV2TextPrimary */
  --ink-2: #6E6E73;     /* kV2TextSecondary */
  --ink-3: #8E8E93;     /* kV2TextDisabled */
  --bg: #FFFFFF;
  --bg-soft: #F7F5FB;   /* warm-tinted neutral, plays nice with purple */
  --fill: #F2F2F7;      /* kV2FieldFill */
  --stroke: #E5E5EA;    /* kV2FieldStroke */

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 36px;

  --shadow-sm: 0 6px 16px rgba(106, 38, 216, 0.08);
  --shadow-md: 0 14px 40px rgba(106, 38, 216, 0.14);
  --shadow-lg: 0 30px 80px rgba(106, 38, 216, 0.18);

  --max: 1180px;
  --pad: clamp(20px, 4vw, 40px);

  --ease: cubic-bezier(.2,.7,.2,1);
}

/* ---------- RESET ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* ---------- TYPE ------------------------------------------------- */
.display, .display--lg, .display--md, .display--sm {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
}
.display {
  font-size: clamp(40px, 8vw, 76px);
}
.display--md {
  font-size: clamp(32px, 5.5vw, 56px);
  line-height: 1.08;
}
.display--sm {
  font-size: clamp(28px, 4.5vw, 44px);
  line-height: 1.12;
}
.display--light { color: #fff; }
.display__accent {
  background: linear-gradient(90deg, var(--purple) 0%, var(--purple-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.lede {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 56ch;
  margin: 18px 0 0;
}
.lede--center { margin-left: auto; margin-right: auto; text-align: center; }
.lede--light { color: rgba(255,255,255,0.85); }

.eyebrow {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--purple);
  background: rgba(106, 38, 216, 0.08);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.eyebrow--light {
  color: #fff;
  background: rgba(255,255,255,0.16);
}

/* ---------- LAYOUT HELPERS -------------------------------------- */
.container { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 56px; }

/* ---------- NAV -------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(229,229,234,0.7);
}
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.nav__brand img { height: 32px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 22px; }
.nav__link {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
  transition: color .15s var(--ease);
}
.nav__link:hover { color: var(--purple); }

/* ---------- BUTTONS --------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Inter', sans-serif; font-weight: 600;
  border-radius: 14px; border: 0; cursor: pointer;
  padding: 14px 22px; font-size: 15px;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.btn--primary { background: var(--purple); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--purple-deep); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--sm { padding: 10px 16px; font-size: 14px; border-radius: 12px; }

/* ---------- HERO ------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(40px, 8vw, 110px) 0 clamp(80px, 12vw, 140px);
  overflow: hidden;
}
@media (max-width: 540px) {
  .hero { padding-bottom: 100px; } /* extra room for the floating globe pill */
  .hero__visual { max-width: 360px; aspect-ratio: 5 / 5.6; }
  .hero__content { text-align: left; }
  .store-row { gap: 10px; }
}
.hero::before {
  /* soft purple wash behind everything */
  content: ''; position: absolute; inset: -10% -10% 30% -10%;
  background:
    radial-gradient(60% 60% at 70% 20%, rgba(213, 140, 255, 0.28) 0%, transparent 65%),
    radial-gradient(50% 60% at 10% 30%, rgba(106, 38, 216, 0.16) 0%, transparent 70%);
  z-index: -1;
}
.hero__grid {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--pad);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
@media (min-width: 920px) {
  .hero__grid { grid-template-columns: 1.05fr 1fr; }
}
.hero__content { max-width: 580px; }
.hero__meta {
  margin-top: 18px; color: var(--ink-3);
  font-size: 13px; font-weight: 500; letter-spacing: 0.02em;
}

/* Two overlapping portraits + status pill */
.hero__visual {
  position: relative;
  aspect-ratio: 5 / 6;
  max-width: 540px;
  margin-inline: auto;
  width: 100%;
}
/* Single hero illustration. PNG with transparent background, so no
 * frame — let it breathe. Gentle float so it feels alive. */
.hero__hero-image {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: floatY 7s ease-in-out infinite;
  will-change: transform;
  filter: drop-shadow(0 30px 60px rgba(106, 38, 216, 0.22));
}
.hero__hero-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
/* Floating globe pill below the hero photos.
 * The globe SVG is wrapped in a white card with the city caption to the
 * right; on narrow screens the caption stacks beneath. */
.hero__globe {
  position: absolute;
  left: -18px; bottom: -28px;
  background: #fff;
  border-radius: 22px;
  padding: 12px 20px 12px 12px;
  display: inline-flex; align-items: center; gap: 14px;
  box-shadow: 0 18px 40px rgba(20, 20, 40, 0.22);
  z-index: 2;
}
.hero__globe svg {
  width: 64px; height: 64px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 10px rgba(106, 38, 216, 0.25));
}
.hero__globe-caption {
  display: flex; flex-direction: column; line-height: 1.2;
  white-space: nowrap;
}
.hero__globe-caption strong {
  font-size: 14px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.01em;
}
.hero__globe-caption span {
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  margin-top: 2px;
}
@media (max-width: 540px) {
  .hero__globe {
    left: 50%; right: auto; bottom: -32px;
    transform: translateX(-50%);
    padding: 10px 16px 10px 10px;
    border-radius: 18px;
    gap: 10px;
  }
  .hero__globe svg { width: 48px; height: 48px; }
  .hero__globe-caption strong { font-size: 13px; }
  .hero__globe-caption span { font-size: 11.5px; }
}
@media (max-width: 380px) {
  .hero__globe-caption { white-space: normal; max-width: 140px; }
  .hero__globe-caption span { line-height: 1.3; }
}

/* ---------- GLOBE PINGS (shared between hero + spotlight) ------- */
/* Driver: each <circle class="pulse"> gets a sized ring that fades
 * outward. CSS animations beat per-circle SMIL <animate> for both
 * performance and code volume (12 cities × 2 globes = 24 pings). */
.pings .pulse {
  fill: none;
  stroke: #34C759;
  stroke-width: 2;
  r: 6;
  transform-box: fill-box;
  transform-origin: center;
  animation: ping 2.6s ease-out infinite;
}
.pings .dot {
  fill: #34C759;
  stroke: #fff;
  stroke-width: 1.5;
  filter: drop-shadow(0 0 4px rgba(52, 199, 89, 0.55));
}
.pings--lg .pulse { stroke-width: 2.4; }
.pings--lg .dot { stroke-width: 2; }
@keyframes ping {
  0%   { r: 5; stroke-opacity: 0.7; }
  80%  { r: 18; stroke-opacity: 0;  }
  100% { r: 18; stroke-opacity: 0;  }
}
.pings--lg .pulse {
  animation-name: pingLg;
}
@keyframes pingLg {
  0%   { r: 7;  stroke-opacity: 0.75; }
  80%  { r: 26; stroke-opacity: 0;    }
  100% { r: 26; stroke-opacity: 0;    }
}

/* ---------- STORE BUTTONS --------------------------------------- */
.store-row {
  margin-top: 28px;
  display: flex; flex-wrap: wrap; gap: 12px;
}
.store-row--center { justify-content: center; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 14px;
  transition: transform .18s var(--ease), background .18s var(--ease);
}
.store-btn:hover { transform: translateY(-2px); background: #000; }
.store-btn svg { width: 26px; height: 26px; flex-shrink: 0; }
.store-btn span { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store-btn small { font-size: 10.5px; font-weight: 500; opacity: 0.85; }
.store-btn strong { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.store-btn--dark { background: var(--ink); }

/* ---------- THREE PILLARS --------------------------------------- */
.pillars {
  padding: clamp(80px, 10vw, 140px) 0;
  background: var(--bg-soft);
}
.pillars__grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .pillars__grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  /* When there are only 2 pillars, give each a bit more breathing room
   * and keep them visually anchored to the page center. */
  .pillars__grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 880px;
    margin-inline: auto;
    gap: 28px;
  }
}
.pillar {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px 28px 30px;
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
  display: flex; flex-direction: column;
}
.pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.pillar__phone {
  /* Soft gradient bezel — but the screenshot is allowed to break out the
   * top so it reads as a real device sitting on the card, not a thumbnail
   * stuffed inside one. */
  height: clamp(260px, 34vw, 340px);
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(106, 38, 216, 0.10), rgba(213, 140, 255, 0.22));
  display: flex; align-items: flex-end; justify-content: center;
  margin-bottom: 24px;
  position: relative;
  overflow: visible;  /* phone pokes above the bezel */
  transition: transform .4s var(--ease);
}
.pillar__phone img {
  /* Big and dominant — fills width and over-extends height so it pops
   * above the gradient frame. Drop-shadow gives the device-on-card
   * look without needing actual phone-bezel art. */
  width: 92%;
  max-height: 130%;
  object-fit: contain;
  object-position: bottom center;
  transform: translateY(-12%);
  filter: drop-shadow(0 22px 36px rgba(106, 38, 216, 0.28));
  transition: transform .35s var(--ease);
}
.pillar:hover .pillar__phone img {
  transform: translateY(-16%) scale(1.03);
}
/* Wider-aspect screenshots (e.g. the Dating render) need a larger
 * width allowance — otherwise object-fit:contain shrinks them to
 * the height limit and they look stranded inside the bezel. */
.pillar__phone--wide img {
  width: 118%;
  max-height: 150%;
  transform: translateY(-18%);
}
.pillar:hover .pillar__phone--wide img {
  transform: translateY(-22%) scale(1.03);
}

/* Mobile: less aggressive break-out so card sizes stay manageable */
@media (max-width: 540px) {
  .pillar__phone { height: clamp(300px, 70vw, 360px); }
  .pillar__phone img { max-height: 122%; transform: translateY(-8%); }
  .pillar__phone--wide img { width: 112%; max-height: 140%; transform: translateY(-14%); }
}
.pillar__phone img {
  max-height: 100%;
  max-width: 78%;
  object-fit: contain;
  filter: drop-shadow(0 18px 36px rgba(106,38,216,0.18));
}
.pillar__title {
  font-family: 'Sora', sans-serif;
  font-size: 22px; font-weight: 800; letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.pillar__body {
  font-size: 14.5px; line-height: 1.55; color: var(--ink-2);
  margin: 0 0 18px; flex: 1;
}
.link-arrow {
  font-weight: 600; font-size: 14.5px;
  color: var(--purple);
  align-self: flex-start;
  transition: gap .18s var(--ease);
}
.link-arrow:hover { letter-spacing: 0.01em; }

/* ---------- SPOTLIGHT (Passport) -------------------------------- */
.spotlight {
  margin: clamp(40px, 7vw, 80px) var(--pad);
  background: linear-gradient(135deg, var(--purple-deep) 0%, var(--purple) 55%, var(--purple-light) 130%);
  border-radius: var(--radius-xl);
  color: #fff;
  overflow: hidden;
  position: relative;
}
.spotlight::before {
  /* subtle dotted-globe motif */
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(255,255,255,0.12) 1.5px, transparent 1.6px),
    radial-gradient(rgba(255,255,255,0.06) 1.5px, transparent 1.6px);
  background-size: 32px 32px, 80px 80px;
  background-position: 0 0, 16px 16px;
  opacity: 0.4;
  pointer-events: none;
}
.spotlight__inner {
  position: relative;
  display: grid; grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 60px);
  padding: clamp(48px, 7vw, 84px) clamp(28px, 5vw, 64px);
  align-items: center;
}
@media (min-width: 880px) {
  .spotlight__inner { grid-template-columns: 1.05fr 0.95fr; }
}
.spotlight__copy { max-width: 540px; }
.checklist {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.checklist li {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  color: rgba(255,255,255,0.92);
}
.checklist li::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 18px; height: 18px;
  border-radius: 6px;
  background: rgba(255,255,255,0.2);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat; background-position: center; background-size: 12px;
}
.spotlight__visual { display: flex; justify-content: center; align-items: center; }
.spotlight__globe {
  width: min(420px, 85%);
  aspect-ratio: 1 / 1;
  position: relative;
  filter: drop-shadow(0 40px 80px rgba(0,0,0,0.25));
  animation: spinSlow 60s linear infinite;
  will-change: transform;
}
.spotlight__globe svg { width: 100%; height: 100%; }
.spotlight__globe::after {
  /* soft glow ring that sits behind the sphere */
  content: ''; position: absolute; inset: -10%;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.25) 0%, transparent 55%);
  z-index: -1;
  /* Glow stays fixed while the SVG rotates inside */
  animation: spinSlow 60s linear infinite reverse;
}
@keyframes spinSlow {
  to { transform: rotate(360deg); }
}
@media (max-width: 560px) {
  .spotlight { margin-inline: 12px; border-radius: 24px; }
  .spotlight__inner { padding: 40px 24px 48px; }
  .spotlight__globe { width: 78%; }
}

/* ---------- STATS STRIP ----------------------------------------- */
.stats { padding: clamp(60px, 8vw, 100px) 0; }
.stats__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  text-align: center;
}
@media (min-width: 720px) {
  .stats__grid { grid-template-columns: repeat(3, 1fr); }
}
.stat__num {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(44px, 6vw, 64px);
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
}
.stat__label {
  font-size: 14.5px; font-weight: 500; color: var(--ink-2);
  max-width: 26ch; margin: 0 auto;
}

/* ---------- TESTIMONIAL ----------------------------------------- */
.quote {
  padding: clamp(80px, 10vw, 140px) 0;
  background: var(--bg-soft);
}
.quote__inner { max-width: 820px; text-align: center; }
.quote__mark {
  width: 48px; height: 48px;
  color: var(--purple);
  margin: 0 auto 24px;
  opacity: 0.85;
}
.quote__body {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.32;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 26px;
}
.quote__author {
  font-size: 14.5px; font-weight: 600; color: var(--ink-2);
  margin: 0;
}

/* ---------- FINAL CTA ------------------------------------------- */
.final-cta {
  padding: clamp(80px, 10vw, 140px) 0;
  background: #fff;
}
.final-cta__inner {
  max-width: 760px; margin: 0 auto; text-align: center;
  padding-inline: var(--pad);
}
.final-cta .display, .final-cta .display--md {
  background: linear-gradient(120deg, var(--ink) 0%, var(--purple-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.final-cta .store-row { margin-top: 32px; }

/* ---------- FOOTER ---------------------------------------------- */
.footer {
  padding: 56px 0 32px;
  border-top: 1px solid var(--stroke);
  background: #fff;
}
.footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--pad);
  display: grid; gap: 28px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 720px) {
  .footer__inner { grid-template-columns: 1fr auto; }
}
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand img { height: 28px; width: auto; }
.footer__brand p { margin: 0; color: var(--ink-2); font-size: 14px; }
.footer__links {
  display: flex; flex-wrap: wrap; gap: 22px;
}
.footer__links a {
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  transition: color .15s var(--ease);
}
.footer__links a:hover { color: var(--purple); }
.footer__copy {
  max-width: var(--max);
  margin: 36px auto 0;
  padding-inline: var(--pad);
  font-size: 12.5px; color: var(--ink-3);
}

/* ---------- SCROLL REVEAL (driven by index.js) ------------------ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger siblings — index.js assigns --d via data-stagger position.
 * Used for the pillars + stats + checklist so they cascade in. */
.reveal { transition-delay: var(--d, 0ms); }

/* ---------- SCROLLBAR ------------------------------------------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--purple), var(--purple-light));
  border-radius: 999px; border: 2px solid #fff;
}
::-webkit-scrollbar-track { background: transparent; }

/* ---------- SCROLL PROGRESS BAR --------------------------------- */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--purple) 0%, var(--purple-light) 100%);
  z-index: 60;
  transition: width .08s linear;
  pointer-events: none;
}

/* ---------- TYPOGRAPHIC POLISH ---------------------------------- */
::selection { background: var(--purple); color: #fff; }

/* ---------- MOBILE NAV TIGHTENING ------------------------------- */
@media (max-width: 540px) {
  .nav__inner { padding: 10px var(--pad); }
  .nav__brand img { height: 26px; }
  .btn--sm { padding: 9px 14px; font-size: 13px; }
  .section__head { margin-bottom: 36px; }
  .stats { padding-block: clamp(50px, 8vw, 80px); }
  .stat__num { font-size: clamp(40px, 12vw, 56px); }
  .quote { padding-block: clamp(60px, 12vw, 100px); }
  .quote__body { font-size: clamp(20px, 5.5vw, 26px); }
  .footer { padding: 40px 0 28px; text-align: center; }
  .footer__brand { justify-content: center; }
  .footer__links { justify-content: center; }
}

/* ---------- REDUCED MOTION -------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .pillar:hover, .store-btn:hover, .btn--primary:hover { transform: none; }
  .hero__photo--main, .hero__photo--accent,
  .spotlight__globe, .spotlight__globe::after,
  .pings .pulse {
    animation: none;
  }
  .scroll-progress { display: none; }
}
