:root {
  --bg: #0F1035;
  --bg-alt: #161750;
  --surface: #1D1F5E;
  --border: #2E3070;
  --text-primary: #F5F6FF;
  --text-secondary: #B4B6E0;
  --text-muted: #7C7EB0;
  --accent-blue: #5B6EF5;
  --accent-orange: #F5A623;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 16, 53, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.brand-logo-small {
  width: 28px;
  height: 28px;
}

.brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--text-primary);
}

/* Hero */
.hero {
  padding: 88px 0 64px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  background: linear-gradient(135deg, var(--text-primary) 40%, var(--accent-orange));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 480px;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-orange));
  color: #fff;
}

.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.moon-glow {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 110, 245, 0.35), transparent 70%);
  filter: blur(10px);
}

.hero-logo {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: 32px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

/* Features */
.features {
  padding: 88px 0;
}

.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-blue);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin: 0 0 8px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

/* Download */
.download {
  padding: 64px 0 96px;
}

.download-inner {
  text-align: center;
}

.download-note {
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 32px;
}

.download-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 40px;
}

.download-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-orange));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.download-card p {
  color: var(--text-secondary);
  margin: 0;
  max-width: 320px;
}

/* Why sleep matters */
.why-sleep {
  padding: 88px 0;
  background: var(--bg-alt);
}

.why-intro {
  text-align: center;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 48px;
  font-size: 1.05rem;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.why-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  backdrop-filter: blur(6px);
  position: relative;
  overflow: hidden;
}

.why-number {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-orange);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.why-card h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
}

.why-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin: 0;
}

/* Support */
.support {
  padding: 80px 0 96px;
}

.support-inner {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.support-text {
  color: var(--text-secondary);
  margin: 0 0 32px;
}

.support-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.support-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.support-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent-blue);
}

.bmc-link {
  display: inline-block;
  margin-top: 24px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.bmc-link:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.bmc-logo {
  height: 44px;
  width: auto;
  border-radius: 8px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-link {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--text-primary);
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

/* Responsive */
@media (max-width: 780px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

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

  .nav {
    display: none;
  }
}

/* Scroll-reveal (ligero, sin librerías — Intersection Observer en script.js) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

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

/* Stagger sutil para las tarjetas de features/why dentro de un mismo grid */
.features-grid .feature-card:nth-child(2) { transition-delay: 0.05s; }
.features-grid .feature-card:nth-child(3) { transition-delay: 0.1s; }
.features-grid .feature-card:nth-child(4) { transition-delay: 0.15s; }
.features-grid .feature-card:nth-child(5) { transition-delay: 0.2s; }
.features-grid .feature-card:nth-child(6) { transition-delay: 0.25s; }

.why-grid .why-card:nth-child(2) { transition-delay: 0.05s; }
.why-grid .why-card:nth-child(3) { transition-delay: 0.1s; }
.why-grid .why-card:nth-child(4) { transition-delay: 0.15s; }

/* Flotación suave del logo del hero */
.float {
  animation: float 5s ease-in-out infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none;
  }
  .float {
    animation: none;
  }
}
