/* ============================================================
   NEON ARCHIPELAGO — Region Chat Design System
   Design direction: Caribbean Noir
   Dark base + luminous teal neon + warm coral accents
   Glass morphism surfaces, animated gradient mesh background
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Palette */
  --bg-base: #0d1524;
  --bg-surface: #131f35;
  --bg-card: rgba(26, 38, 60, 0.65);
  --bg-card-hover: rgba(26, 38, 60, 0.85);

  --neon-primary: #00d9c5;
  --neon-primary-dim: rgba(0, 217, 197, 0.18);
  --neon-primary-glow: rgba(0, 217, 197, 0.35);
  --neon-purple: #7b4fe6;
  --neon-purple-dim: rgba(123, 79, 230, 0.15);
  --coral: #ff6b2b;
  --coral-dim: rgba(255, 107, 43, 0.15);

  --text-primary: #f0f4ff;
  --text-secondary: #8a96b0;
  --text-muted: #4d5a75;

  --border-glass: rgba(0, 217, 197, 0.12);
  --border-subtle: rgba(240, 244, 255, 0.06);

  /* Typography */
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  /* Shadows / Glows */
  --glow-teal:
    0 0 32px rgba(0, 217, 197, 0.25), 0 0 64px rgba(0, 217, 197, 0.1);
  --glow-coral: 0 0 24px rgba(255, 107, 43, 0.2);
  --shadow-card:
    0 4px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 160ms;
  --duration-std: 280ms;
  --duration-slow: 480ms;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}
body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
img,
video {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}
ul,
ol {
  list-style: none;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: var(--neon-primary-dim);
  border-radius: 3px;
}

/* ---------- Animated Gradient Mesh Background ---------- */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-mesh::before,
.bg-mesh::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  will-change: transform;
  animation: drift 18s ease-in-out infinite alternate;
}
.bg-mesh::before {
  width: 900px;
  height: 900px;
  background: radial-gradient(
    circle,
    rgba(0, 217, 197, 0.1) 0%,
    rgba(0, 217, 197, 0.04) 40%,
    transparent 70%
  );
  top: -250px;
  right: -250px;
}
.bg-mesh::after {
  width: 800px;
  height: 800px;
  background: radial-gradient(
    circle,
    rgba(123, 79, 230, 0.08) 0%,
    rgba(123, 79, 230, 0.03) 40%,
    transparent 70%
  );
  bottom: -200px;
  left: -200px;
  animation-delay: -9s;
}
@keyframes drift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(40px, -30px) scale(1.08);
  }
  100% {
    transform: translate(-20px, 40px) scale(0.95);
  }
}

/* ---------- Layout ---------- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}
.section {
  position: relative;
  z-index: 1;
}
.section + .section {
  margin-top: var(--space-3xl);
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.03em;
}
h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700;
}
h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
}
h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 600;
}
h4 {
  font-size: 1.1rem;
  font-weight: 600;
}
.lead {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  line-height: 1.7;
}
.label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neon-primary);
}
.text-muted {
  color: var(--text-muted);
}

/* ---------- Neon Text Gradient ---------- */
.text-gradient {
  background: linear-gradient(
    135deg,
    var(--neon-primary) 0%,
    #4de8d4 50%,
    var(--neon-purple) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition:
    transform var(--duration-std) var(--ease-out),
    box-shadow var(--duration-std) var(--ease-out),
    background var(--duration-std) var(--ease-out);
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--neon-primary);
  color: var(--bg-base);
  box-shadow: 0 0 0 0 var(--neon-primary-glow);
}
.btn-primary:hover {
  background: #19ebd6;
  box-shadow: var(--glow-teal);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-glass);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  border-color: var(--neon-primary);
  color: var(--neon-primary);
  box-shadow: 0 0 16px var(--neon-primary-dim);
}

.btn-coral {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 0 0 0 var(--coral-dim);
}
.btn-coral:hover {
  background: #ff7d44;
  box-shadow: var(--glow-coral);
}

.btn-lg {
  padding: 17px 36px;
  font-size: 1.05rem;
}

/* Pulsing CTA animation */
.btn-pulse {
  animation: pulse-ring 2.4s ease-out infinite;
}
@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 var(--neon-primary-glow);
  }
  60% {
    box-shadow: 0 0 0 14px rgba(0, 217, 197, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 217, 197, 0);
  }
}

/* ---------- Glass Cards ---------- */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition:
    background var(--duration-std) var(--ease-out),
    transform var(--duration-std) var(--ease-out),
    box-shadow var(--duration-std) var(--ease-out);
}
.card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), var(--glow-teal);
}

/* ---------- Dividers ---------- */
.divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--border-glass),
    transparent
  );
  margin: var(--space-2xl) 0;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition:
    background var(--duration-std) var(--ease-in-out),
    backdrop-filter var(--duration-std) var(--ease-in-out);
}
.nav.scrolled {
  background: rgba(13, 21, 36, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.nav-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.brand-wordmark {
  height: 34px;
  width: auto;
  display: block;
}
.brand-wordmark-light,
.brand-image-light {
  display: none;
}
.brand-mark-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (prefers-color-scheme: light) {
  .brand-wordmark-dark,
  .brand-image-dark {
    display: none;
  }

  .brand-wordmark-light,
  .brand-image-light {
    display: block;
  }
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}
.nav-link {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--duration-fast);
}
.nav-link:hover {
  color: var(--text-primary);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.nav-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition:
    transform var(--duration-std) var(--ease-out),
    opacity var(--duration-std);
}

/* ---------- Hero Section ---------- */
.hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 96px;
  padding-bottom: var(--space-3xl);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}
.hero-content {
  max-width: 560px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--neon-primary-dim);
  border: 1px solid rgba(0, 217, 197, 0.25);
  margin-bottom: var(--space-lg);
}
.hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-primary);
  animation: blink 1.8s ease-in-out infinite;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
.hero-title {
  margin-bottom: var(--space-lg);
}
.hero-sub {
  margin-bottom: var(--space-xl);
  max-width: 480px;
}
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}
.hero-stats {
  margin-top: var(--space-xl);
  display: flex;
  gap: var(--space-xl);
  flex-wrap: wrap;
}
.hero-stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--neon-primary);
}
.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- Phone Mockup ---------- */
.phone-showcase {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.phone-outer {
  position: relative;
  z-index: 2;
}
.phone-frame {
  width: 260px;
  background: #131f35;
  border-radius: 44px;
  border: 2px solid rgba(0, 217, 197, 0.2);
  box-shadow:
    0 0 0 6px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(0, 217, 197, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  aspect-ratio: 9/19.5;
}
.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 22px;
  background: #0d1524;
  border-radius: 12px;
  z-index: 10;
}
.phone-glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 217, 197, 0.18) 0%,
    transparent 65%
  );
  z-index: 1;
  pointer-events: none;
}
.phone-float-card {
  position: absolute;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  box-shadow: var(--shadow-card);
  white-space: nowrap;
  z-index: 10;
}
.phone-float-card--match {
  left: -60px;
  top: 20%;
  animation: float-a 4s ease-in-out infinite;
}
.phone-float-card--badge {
  right: -60px;
  top: 45%;
  animation: float-b 4.5s ease-in-out infinite;
}
@keyframes float-a {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}
@keyframes float-b {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(8px);
  }
}

/* ---------- Section Headers ---------- */
.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}
.section-header .label {
  margin-bottom: var(--space-sm);
}
.section-header h2 {
  margin-bottom: var(--space-md);
}
.section-header .lead {
  max-width: 520px;
  margin: 0 auto;
}

/* ---------- Problem Section ---------- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
.problem-card {
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
}
.problem-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto var(--space-md);
}
.problem-icon--red {
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 80, 80, 0.2);
}
.problem-icon--amber {
  background: rgba(255, 180, 0, 0.1);
  border: 1px solid rgba(255, 180, 0, 0.2);
}
.problem-icon--blue {
  background: rgba(100, 140, 255, 0.1);
  border: 1px solid rgba(100, 140, 255, 0.2);
}

/* ---------- Plan Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  counter-reset: step;
}
.step-card {
  padding: var(--space-xl) var(--space-lg);
  counter-increment: step;
  position: relative;
}
.step-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(
    135deg,
    var(--neon-primary),
    rgba(0, 217, 197, 0.2)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-md);
}
.step-connector {
  display: none;
}
/* dashed connector line between steps on desktop */
@media (min-width: 768px) {
  .steps {
    position: relative;
  }
  .step-card:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 52px;
    right: -24px;
    width: 48px;
    height: 2px;
    background: linear-gradient(90deg, var(--border-glass), transparent);
    z-index: 10;
  }
}

/* ---------- Features Grid ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}
.feature-card {
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}
.feature-icon-wrap {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--neon-primary-dim);
  border: 1px solid rgba(0, 217, 197, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-icon-wrap svg {
  width: 24px;
  height: 24px;
  color: var(--neon-primary);
}

/* ---------- Territory Pills ---------- */
.territory-strip {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--space-xl);
}
.territory-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(8px);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition:
    border-color var(--duration-fast),
    color var(--duration-fast),
    transform var(--duration-std) var(--ease-out);
}
.territory-pill:hover {
  border-color: var(--neon-primary);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* ---------- Transformation / CTA Band ---------- */
.cta-band {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(0, 217, 197, 0.08) 0%,
    transparent 65%
  );
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.cta-band h2 {
  margin-bottom: var(--space-md);
}
.cta-band .lead {
  margin-bottom: var(--space-xl);
}
.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* ---------- Social Proof / Testimonials ---------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
.testimonial-card {
  padding: var(--space-xl) var(--space-lg);
}
.testimonial-quote {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}
.testimonial-quote::before {
  content: "\201C";
  color: var(--neon-primary);
  font-size: 1.5rem;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--bg-base);
  flex-shrink: 0;
}
.testimonial-name {
  font-weight: 600;
  font-size: 0.9rem;
}
.testimonial-territory {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */
.footer {
  padding: var(--space-2xl) 0 var(--space-xl);
  border-top: 1px solid var(--border-subtle);
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-xl);
}
.footer-brand p {
  margin-top: var(--space-md);
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 300px;
}
.footer-col-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--duration-fast);
}
.footer-links a:hover {
  color: var(--text-primary);
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
}
.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Download Page Specific ---------- */
.download-hero {
  padding-top: 120px;
  padding-bottom: var(--space-3xl);
  text-align: center;
}
.download-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  max-width: 760px;
  margin: var(--space-2xl) auto 0;
}
.download-card {
  padding: var(--space-xl) var(--space-lg);
  text-align: left;
}
.download-card-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}
.badge-available {
  background: rgba(0, 217, 197, 0.15);
  color: var(--neon-primary);
  border: 1px solid rgba(0, 217, 197, 0.3);
}
.badge-coming {
  background: rgba(123, 79, 230, 0.15);
  color: var(--neon-purple);
  border: 1px solid rgba(123, 79, 230, 0.3);
}

.download-store-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.download-store-icon--android {
  background: linear-gradient(135deg, #00d9c5, #1a8c80);
}
.download-store-icon--ios {
  background: linear-gradient(135deg, #7b4fe6, #4a2b99);
}

.install-steps {
  max-width: 540px;
  margin: var(--space-3xl) auto 0;
}
.install-step {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.install-step:last-child {
  border-bottom: none;
}
.install-step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--neon-primary-dim);
  border: 1px solid rgba(0, 217, 197, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--neon-primary);
}
.install-step-content h4 {
  margin-bottom: 4px;
}
.install-step-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- Utilities ---------- */
.text-center {
  text-align: center;
}
.mt-sm {
  margin-top: var(--space-sm);
}
.mt-md {
  margin-top: var(--space-md);
}
.mt-lg {
  margin-top: var(--space-lg);
}
.mt-xl {
  margin-top: var(--space-xl);
}
.mt-2xl {
  margin-top: var(--space-2xl);
}

/* ---------- Fade-in Scroll Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ---------- Twemoji (flag emoji SVGs) ---------- */
img.twemoji {
  height: 1.1em;
  width: 1.1em;
  vertical-align: -0.15em;
  margin: 0 0.05em;
  display: inline-block;
}
.territory-pill img.twemoji {
  height: 1.2em;
  width: 1.2em;
}

/* ---------- Enhanced Motion / Micro-interactions ---------- */

/* Smooth hover lift on all glass cards */
.glass-card {
  transition:
    transform var(--duration-std) var(--ease-out),
    box-shadow var(--duration-std) var(--ease-out),
    border-color var(--duration-std);
}
.glass-card:hover {
  transform: translateY(-4px);
  box-shadow:
    var(--shadow-card),
    0 12px 40px rgba(0, 217, 197, 0.08);
  border-color: rgba(0, 217, 197, 0.2);
}

/* Phone showcase entrance */
.phone-outer {
  transition: transform 0.15s ease-out;
}
@keyframes phone-entrance {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.phone-showcase.revealed .phone-outer,
.phone-showcase .phone-outer {
  animation: phone-entrance 1s 0.3s var(--ease-out) both;
}

/* Hero title reveal */
@keyframes slide-up-fade {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero-content > * {
  opacity: 0;
  animation: slide-up-fade 0.7s var(--ease-out) both;
}
.hero-content > *:nth-child(1) {
  animation-delay: 0.1s;
}
.hero-content > *:nth-child(2) {
  animation-delay: 0.2s;
}
.hero-content > *:nth-child(3) {
  animation-delay: 0.35s;
}
.hero-content > *:nth-child(4) {
  animation-delay: 0.5s;
}

/* Pulse glow on primary CTA button */
@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 217, 197, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(0, 217, 197, 0);
  }
}
.btn-pulse {
  animation: pulse-glow 2.5s ease-in-out infinite;
}
.btn-pulse:hover {
  animation: none;
}

/* Feature icon rotate on hover */
.feature-card:hover .feature-icon-wrap {
  transform: rotate(6deg) scale(1.08);
  transition: transform 0.3s var(--ease-out);
}
.feature-icon-wrap {
  transition: transform 0.3s var(--ease-out);
}

/* Step card number glow on hover */
.step-card:hover .step-number {
  text-shadow: 0 0 20px rgba(0, 217, 197, 0.4);
  transition: text-shadow 0.3s ease;
}

/* Problem card icon subtle bounce on hover */
.problem-card:hover .problem-icon {
  animation: icon-bounce 0.5s var(--ease-out);
}
@keyframes icon-bounce {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.15);
  }
  70% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

/* Territory pill shimmer effect */
.territory-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 217, 197, 0.06) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s;
}
.territory-pill {
  position: relative;
  overflow: hidden;
}
.territory-pill:hover::before {
  opacity: 1;
}

/* Testimonial card tilt on hover */
.testimonial-card {
  transition:
    transform var(--duration-std) var(--ease-out),
    box-shadow var(--duration-std);
}
.testimonial-card:hover {
  transform: translateY(-3px) rotate(-0.5deg);
  box-shadow:
    var(--shadow-card),
    0 8px 32px rgba(123, 79, 230, 0.1);
}

/* CTA band glow pulse */
@keyframes cta-glow {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}
.cta-band {
  position: relative;
}
.cta-band::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--neon-primary),
    transparent
  );
  animation: cta-glow 3s ease-in-out infinite;
}

/* Smooth link underline slide */
.footer-links a {
  position: relative;
}
.footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--neon-primary);
  transition: width 0.3s var(--ease-out);
}
.footer-links a:hover::after {
  width: 100%;
}

/* Floating cards enhanced timing */
@keyframes float-a {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-6px) rotate(0.5deg);
  }
  75% {
    transform: translateY(4px) rotate(-0.5deg);
  }
}
@keyframes float-b {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(6px) rotate(-0.5deg);
  }
  75% {
    transform: translateY(-4px) rotate(0.5deg);
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet (≤ 900px) */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content {
    max-width: 100%;
  }
  .hero-sub {
    max-width: 100%;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .phone-showcase {
    margin-top: var(--space-xl);
  }
  .phone-float-card--match {
    left: -20px;
  }
  .phone-float-card--badge {
    right: -20px;
  }

  .problem-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
  .steps {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .testimonials-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }

  .download-options {
    grid-template-columns: 1fr;
  }
}

/* Mobile (≤ 560px) */
@media (max-width: 560px) {
  .nav-links {
    display: none;
  }
  .nav-menu-btn {
    display: flex;
  }

  h1 {
    font-size: 2.2rem;
  }
  h2 {
    font-size: 1.7rem;
  }

  .phone-frame {
    width: 200px;
  }
  .phone-float-card {
    display: none;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .download-gate,
  .download-content {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }

  .download-auth-banner {
    align-items: flex-start;
  }

  .install-step {
    gap: var(--space-md);
  }
}

/* ============================================================
   AUTH MODAL
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}
.modal-overlay[hidden] {
  display: none;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-card {
  position: relative;
  z-index: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.7),
    var(--glow-teal);
  width: 100%;
  max-width: 440px;
  max-height: 90dvh;
  overflow-y: auto;
  padding: var(--space-xl);
  animation: modal-in 0.28s var(--ease-out);
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition:
    background var(--duration-fast),
    color var(--duration-fast);
}
.modal-close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}
.modal-logo {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-lg);
}
.modal-logo .nav-logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}
.modal-tabs {
  display: flex;
  background: var(--bg-card);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: var(--space-xl);
  gap: 0;
}
.modal-tab {
  flex: 1;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition:
    background var(--duration-std),
    color var(--duration-std);
}
.modal-tab--active {
  background: var(--neon-primary);
  color: var(--bg-base);
}
.modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: var(--space-xl);
  color: var(--text-primary);
  font-family: var(--font-display);
}

/* Form fields */
.form-field {
  margin-bottom: var(--space-md);
}
.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-field input,
.form-field select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition:
    border-color var(--duration-fast),
    box-shadow var(--duration-fast);
  -webkit-appearance: none;
  appearance: none;
}
.form-field input::placeholder {
  color: var(--text-muted);
}
.form-field input:focus,
.form-field select:focus {
  border-color: var(--neon-primary);
  box-shadow: 0 0 0 3px var(--neon-primary-dim);
}
.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a96b0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-color: var(--bg-card);
  padding-right: 40px;
  cursor: pointer;
}
.form-field select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}
.form-error {
  background: rgba(255, 80, 80, 0.1);
  border: 1px solid rgba(255, 80, 80, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.875rem;
  color: #ff8080;
  margin-bottom: var(--space-md);
}
.form-success {
  background: rgba(0, 217, 197, 0.1);
  border: 1px solid rgba(0, 217, 197, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.875rem;
  color: var(--neon-primary);
  margin-bottom: var(--space-md);
}
.form-submit {
  width: 100%;
  margin-top: var(--space-md);
  padding: 14px;
}
.form-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.form-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-md);
}
.form-note a {
  color: var(--neon-primary);
}
.form-note a:hover {
  text-decoration: underline;
}

/* Autofill dark-theme override */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #131f35 inset;
  -webkit-text-fill-color: #f0f4ff;
  transition: background-color 5000s ease-in-out 0s;
}

/* ── Download gate (download.html) ── */
.download-gate {
  max-width: 480px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
}
.download-gate .modal-tabs {
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-xl);
}
.download-gate .modal-title {
  font-size: 1.2rem;
}
.download-content {
  max-width: 540px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-xl);
}
.download-auth-banner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--neon-primary-dim);
  border: 1px solid rgba(0, 217, 197, 0.25);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-2xl);
}
.download-auth-banner svg {
  color: var(--neon-primary);
  flex-shrink: 0;
}
.download-auth-banner p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.download-auth-banner strong {
  color: var(--neon-primary);
}
.download-auth-banner--wide {
  max-width: 640px;
  margin: var(--space-xl) auto;
}

.download-nav-action {
  font-size: 0.85rem;
  padding: 10px 20px;
}

.download-heading {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: var(--space-md);
}

.download-subcopy {
  max-width: 600px;
  margin: 0 auto;
}

.download-content-note {
  text-align: center;
  margin-top: var(--space-2xl);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.download-content-note a {
  color: var(--neon-primary);
}

.download-content-note a:hover {
  text-decoration: underline;
}

/* Loading state */
.page-loading {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--neon-primary-dim);
  border-top-color: var(--neon-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
