/* ════════════════════════════════════════════════════════════════
   La Biblia en Cuentos — landing page
   HTML + CSS + JS vanilla. Cero frameworks, cero build step.
   ════════════════════════════════════════════════════════════════ */

:root {
  --paper: #FAF4EC;
  --paper-warm: #F5EDDC;
  --ink: #1E2933;
  --ink-soft: #3D4A5A;
  --ink-muted: #6B7178;
  --ink-faint: #9CA0A6;
  --terracota: #C2410C;
  --terracota-deep: #8B2D08;
  --navy: #1E3A5F;
  --navy-deep: #0F2543;
  --gold: #D4A933;
  --gold-deep: #B78A0E;
  --gold-tint: #FAF1D5;
  --hairline: #E8E2D6;
  --hairline-strong: #D4CCBE;
  --maxw: 920px;
}

* { box-sizing: border-box }
html, body { margin: 0; padding: 0 }
html { scroll-behavior: smooth; scroll-padding-top: 70px }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Hero ─────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(180deg, #1E3A5F 0%, #5A2D3F 45%, #C2410C 100%);
  color: #fff;
  padding: 64px 24px 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(245,198,72,.35) 0%, rgba(245,198,72,0) 60%);
  pointer-events: none;
}
.hero-inner {
  max-width: var(--maxw); margin: 0 auto;
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero img {
  width: 96px; height: 96px; border-radius: 22px; margin-bottom: 24px;
  box-shadow: 0 12px 28px rgba(0,0,0,.32);
  animation: floatIn .8s ease-out;
}
.hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 600; letter-spacing: -1.5px; line-height: 1.05;
  margin: 0 0 12px;
  animation: floatIn .8s ease-out .1s both;
}
.hero p {
  max-width: 580px; font-size: 17px; color: rgba(255,255,255,.85);
  margin: 0 0 28px;
  animation: floatIn .8s ease-out .2s both;
}
.cta {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  animation: floatIn .8s ease-out .3s both;
}
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 14px;
  background: #000; color: #fff; text-decoration: none;
  font-size: 14px; font-weight: 600;
  transition: transform .15s ease, box-shadow .15s ease;
}
.badge:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0,0,0,.25) }
.badge.outline {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.32);
}
.badge svg { flex-shrink: 0; display: block }

/* Estado "próximamente" — no clickable, look opaco con chip */
.badge.disabled {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.7);
  cursor: not-allowed;
  pointer-events: none;
  user-select: none;
}
.badge.disabled svg { opacity: .65 }
.badge .soon {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 8px; border-radius: 99px;
  background: rgba(245,198,72,.95); color: #4a3a07;
  margin-left: 2px;
}

@keyframes floatIn {
  from { opacity: 0; transform: translateY(16px) }
  to   { opacity: 1; transform: translateY(0) }
}

/* ─── Sections ─────────────────────────────────────────────────── */
.section { max-width: var(--maxw); margin: 0 auto; padding: 64px 24px }
.section h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 600; letter-spacing: -0.8px;
  margin: 0 0 8px;
}
.section h3 {
  font-family: 'Fraunces', serif;
  font-size: 22px; font-weight: 600; letter-spacing: -0.3px;
  margin: 32px 0 8px; color: var(--ink);
}
.section h4 {
  font-family: 'Inter', sans-serif; font-size: 14px;
  font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase;
  color: var(--terracota); margin: 24px 0 6px;
}
.section p, .section li { color: var(--ink-soft); font-size: 15.5px }
.section a { color: var(--terracota); text-decoration: none; font-weight: 600 }
.section a:hover { text-decoration: underline }
.lead { font-size: 17px; color: var(--ink-muted); max-width: 680px }

/* ─── Feature grid ─────────────────────────────────────────────── */
.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px; margin-top: 36px;
}
.feature {
  background: #fff; border: 1px solid var(--hairline);
  border-radius: 18px; padding: 22px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(30, 41, 51, .08);
}
.feature .ico {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--terracota), var(--terracota-deep));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; margin-bottom: 14px;
}
.feature h3 { margin: 0 0 4px; font-size: 17px }
.feature p { margin: 0; font-size: 14px; color: var(--ink-muted); line-height: 1.5 }

/* ─── Anchor nav sticky ────────────────────────────────────────── */
.anchor-nav {
  background: #fff; border-bottom: 1px solid var(--hairline);
  position: sticky; top: 0; z-index: 10;
  transition: box-shadow .2s ease;
}
.anchor-nav.scrolled { box-shadow: 0 2px 14px rgba(30, 41, 51, .08) }
.anchor-nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; gap: 24px; overflow-x: auto;
  scrollbar-width: none;
}
.anchor-nav-inner::-webkit-scrollbar { display: none }
.anchor-nav a {
  color: var(--ink-muted); text-decoration: none;
  font-size: 13.5px; font-weight: 600; letter-spacing: 0.3px;
  white-space: nowrap; padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.anchor-nav a:hover { color: var(--terracota) }
.anchor-nav a.active {
  color: var(--terracota);
  border-bottom-color: var(--terracota);
}

/* ─── Legal sections ───────────────────────────────────────────── */
.legal { border-top: 1px solid var(--hairline) }
.legal .section { padding: 48px 24px }
.legal .section + .section { border-top: 1px solid var(--hairline) }
.legal .meta {
  display: inline-block;
  padding: 4px 10px; border-radius: 99px;
  background: var(--paper-warm); color: var(--ink-muted);
  font-size: 12px; font-weight: 600; letter-spacing: 0.3px;
  margin-bottom: 14px;
}
.legal ul { padding-left: 22px; margin: 8px 0 16px }
.legal li { margin-bottom: 6px }
.legal strong { color: var(--ink) }
.legal code {
  background: var(--paper-warm); padding: 1px 7px; border-radius: 6px;
  font-size: 14px; color: var(--ink-soft);
}

/* ─── Back to top FAB ──────────────────────────────────────────── */
.to-top {
  position: fixed; right: 20px; bottom: 20px;
  width: 44px; height: 44px;
  border: 1px solid var(--hairline);
  background: #fff; color: var(--ink);
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(30, 41, 51, .15);
  opacity: 0; transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, background .15s ease;
  z-index: 50;
}
.to-top.visible { opacity: 1; transform: translateY(0) }
.to-top:hover { background: var(--paper) }
.to-top[hidden] { display: none }

/* ─── Footer ───────────────────────────────────────────────────── */
footer {
  background: var(--navy); color: rgba(255,255,255,.78);
  padding: 40px 24px; text-align: center;
  font-size: 14px;
}
footer a { color: #F5C648; text-decoration: none; font-weight: 600 }
footer a:hover { text-decoration: underline }
footer .copy { margin-top: 14px; color: rgba(255,255,255,.55); font-size: 13px }

/* ─── Mobile tweaks ────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero { padding: 48px 20px 60px }
  .section { padding: 48px 20px }
  .to-top { right: 14px; bottom: 14px }
}

/* ─── Respeta preferencia de reducir animaciones ──────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto }
}
