/* NERDO Landing — palette derived from the mobile app */
:root {
  --bg: #0b101b;
  --bg-elevated: #121826;
  --surface: #1a2130;
  --surface-hover: #222b3d;
  --border: #2a3548;
  --text: #ffffff;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-soft: rgba(59, 130, 246, 0.15);
  --amber: #f59e0b;
  --radius: 14px;
  --radius-sm: 10px;
  --max: 1100px;
  --font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(59, 130, 246, 0.06), transparent),
    radial-gradient(ellipse 50% 30% at 0% 80%, rgba(245, 158, 11, 0.04), transparent);
  background-attachment: fixed;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(11, 16, 27, 0.85);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.header-cta {
  display: none;
}

@media (min-width: 640px) {
  .header-cta {
    display: inline-flex;
  }
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 0.9rem 1.6rem;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-lg {
  padding: 1.05rem 1.85rem;
  font-size: 1.05rem;
  border-radius: 12px;
  width: 100%;
  max-width: 360px;
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
}

.btn-icon {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
}

/* —— Hero —— */
.hero {
  padding: 2.5rem 0 3.5rem;
  text-align: center;
}

.hero-logo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  margin: 0 auto 1.5rem;
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.25);
  animation: float-in 0.7s ease-out both;
}

.hero-brand {
  font-size: clamp(2.4rem, 8vw, 3.5rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  animation: float-in 0.7s ease-out 0.08s both;
}

.hero h1 {
  font-size: clamp(1.35rem, 4.5vw, 1.85rem);
  font-weight: 700;
  line-height: 1.35;
  max-width: 34ch;
  margin: 0 auto 1rem;
  animation: float-in 0.7s ease-out 0.16s both;
}

.hero-sub {
  color: var(--text-muted);
  font-size: clamp(0.95rem, 2.8vw, 1.1rem);
  max-width: 42ch;
  margin: 0 auto 1.75rem;
  animation: float-in 0.7s ease-out 0.24s both;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  animation: float-in 0.7s ease-out 0.32s both;
}

.hero-meta {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  animation: float-in 0.7s ease-out 0.4s both;
}

/* —— Social links (hero + footer; populated from Firestore socialLinks) —— */
.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}

.social-link:hover,
.social-link:focus-visible {
  color: var(--accent);
  outline: none;
}

.social-link svg {
  display: block;
  width: 1em;
  height: 1em;
}

.social-links--hero {
  gap: 0.5rem;
  opacity: 0.72;
}

.social-links--hero .social-link {
  width: 1.85rem;
  height: 1.85rem;
  font-size: 0.95rem;
}

.social-links--hero .social-link:hover,
.social-links--hero .social-link:focus-visible {
  opacity: 1;
  background: rgba(148, 163, 184, 0.12);
}

.social-links--footer {
  gap: 0.75rem;
  margin: 0.35rem 0 1rem;
}

.social-links--footer .social-link {
  width: 2.35rem;
  height: 2.35rem;
  font-size: 1.15rem;
  background: rgba(148, 163, 184, 0.08);
}

.social-links--footer .social-link:hover,
.social-links--footer .social-link:focus-visible {
  background: rgba(59, 130, 246, 0.16);
}

.hero-meta span {
  color: var(--amber);
  font-weight: 600;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Sections —— */
.section {
  padding: 3.25rem 0;
}

.section-head {
  text-align: center;
  margin-bottom: 1.75rem;
}

.section-head h2 {
  font-size: clamp(1.4rem, 4vw, 1.75rem);
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.section-head p {
  color: var(--text-muted);
  font-size: 0.98rem;
  max-width: 48ch;
  margin: 0 auto;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
}

@media (min-width: 640px) {
  .panel {
    padding: 1.85rem 2rem;
  }
}

/* —— Screenshots carousel —— */
.screenshots {
  overflow: hidden;
}

.carousel-wrap {
  position: relative;
}

.carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1rem;
  padding: 0.5rem 1rem 1.25rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--surface);
}

.carousel::-webkit-scrollbar {
  height: 6px;
}

.carousel::-webkit-scrollbar-track {
  background: var(--surface);
  border-radius: 3px;
}

.carousel::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

.phone-frame {
  flex: 0 0 auto;
  width: min(220px, 58vw);
  aspect-ratio: 9 / 19.5;
  scroll-snap-align: center;
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
  border: 2px solid var(--border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  position: relative;
}

.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.phone-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 0.6rem 0.55rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  color: #e2e8f0;
}

.carousel-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

@media (min-width: 900px) {
  .carousel {
    justify-content: center;
    overflow-x: visible;
    padding-inline: 0;
  }

  .phone-frame {
    width: 200px;
  }

  .carousel-hint {
    display: none;
  }
}

/* —— How it works / videos —— */
.video-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .video-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
  }
}

.video-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.video-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* —— Earn / Play Store —— */
.earn-body {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.earn-note {
  font-size: 0.92rem;
  color: var(--text);
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 0.85rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.play-store-copy {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 58ch;
  margin: 0 auto;
  text-align: center;
}

/* —— Bottom CTA —— */
.bottom-cta {
  text-align: center;
  padding: 3.5rem 0 4rem;
}

.bottom-cta .panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  background:
    linear-gradient(160deg, rgba(59, 130, 246, 0.12), transparent 55%),
    var(--surface);
}

.bottom-cta h2 {
  font-size: clamp(1.3rem, 4vw, 1.6rem);
  font-weight: 800;
}

.small-print {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 36ch;
}

.small-print a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.small-print a:hover {
  color: var(--accent);
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0 2.25rem;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
  margin-bottom: 0.85rem;
  font-size: 0.875rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent);
}

.copyright {
  font-size: 0.8rem;
  color: #64748b;
}

/* —— Motion —— */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-logo,
  .hero-brand,
  .hero h1,
  .hero-sub,
  .hero-cta,
  .hero-meta {
    animation: none;
  }

  .social-link {
    transition: none;
  }
}
