/* ═══════════════════════════════════════════════════════
   CUADERNO DE MARIO · styles.css
   Acento ocre/papel según diseno.md §2
   ═══════════════════════════════════════════════════════ */

/* ── 1. Tokens ── */
:root {
  --color-primario: #E9B44C;   /* ocre papel: si el logo impone otro tono, se cambia aquí */
  --color-fondo: #0D0D0D;
  --color-superficie: #1A1A1A;
  --color-texto: #FFFFFF;
  --color-texto-suave: #AAAAAA;
  --color-texto-apagado: #666666;
  --color-whatsapp: #25D366;
  --fuente: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radio: 16px;
}

/* ── 2. Reset mínimo ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--fuente);
  background: var(--color-fondo);
  color: var(--color-texto);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ── 3. Utilidades ── */
.contenedor { width: min(1100px, 92%); margin-inline: auto; }
.contenedor.angosto { max-width: 65ch; }

.texto-suave { color: var(--color-texto-suave); }
.acento { color: var(--color-primario); }

.etiqueta {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primario);
}

/* ── 4. Barra superior ── */
.barra {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 5%;
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.marca { font-weight: 800; letter-spacing: 1px; text-decoration: none; }
.marca::after { content: "."; color: var(--color-primario); }

/* ── 5. Botones (área táctil ≥ 44px) ── */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.3s ease,
              background-color 0.3s ease, border-color 0.3s ease;
}
.boton:active { transform: scale(0.98); }

.boton-corto { min-height: 44px; padding: 0.45rem 1.2rem; font-size: 0.9rem; }

.boton-primario { background: var(--color-primario); color: #201403; }
.boton-primario:hover { box-shadow: 0 8px 28px rgba(233, 180, 76, 0.35); }

.boton-fantasma { border-color: rgba(255, 255, 255, 0.25); color: var(--color-texto); }
.boton-fantasma:hover { border-color: var(--color-primario); color: var(--color-primario); }

.boton-whatsapp { background: var(--color-whatsapp); color: #06301B; }
.boton-whatsapp:hover { box-shadow: 0 8px 28px rgba(37, 211, 102, 0.3); }

/* ── 6. Hero ── */
.heroe {
  min-height: 84vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 1.4rem;
  padding: 5rem 5% 4rem;
}

.heroe h1 {
  font-size: clamp(2.2rem, 6.5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  max-width: 24ch;
  text-wrap: balance;
}

.hero-texto {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--color-texto-suave);
  max-width: 55ch;
}

.hero-botones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.6rem;
}

/* ── 7. Secciones ── */
.seccion { padding: 4.5rem 0; }

.titulo-seccion {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.seccion .texto-suave { text-align: center; }

/* ── 8. Tarjetas ── */
.cuadricula {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.tarjeta {
  background: var(--color-superficie);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radio);
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.tarjeta:hover {
  transform: translateY(-8px);
  border-color: rgba(233, 180, 76, 0.4);
  box-shadow: 0 12px 32px rgba(233, 180, 76, 0.15);
}

.tarjeta .icono { display: block; font-size: 2rem; margin-bottom: 1rem; }
.tarjeta h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.tarjeta p { color: var(--color-texto-suave); font-size: 0.95rem; }

/* ── 9. Mockups de teléfono ── */
.galeria {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.pantalla {
  width: 230px;
  aspect-ratio: 9 / 16;
  background: var(--color-superficie);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pantalla img { width: 100%; height: 100%; object-fit: cover; }

.pantalla-vacia {
  color: var(--color-texto-apagado);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
}

/* ── 10. Pasos (números generados con CSS) ── */
.pasos {
  counter-reset: paso;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.paso {
  background: var(--color-superficie);
  border-radius: var(--radio);
  padding: 2rem;
}

.paso::before {
  counter-increment: paso;
  content: counter(paso);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primario);
  color: #201403;
  font-weight: 800;
  margin-bottom: 1rem;
}

.paso h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.paso p { color: var(--color-texto-suave); font-size: 0.95rem; }

/* ── 11. CTA final ── */
.cta-final {
  background: var(--color-superficie);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radio);
  padding: 4rem 2rem;
  text-align: center;
}

.cta-final .titulo-seccion, .cta-final .texto-suave { margin-bottom: 0.8rem; }
.cta-final .boton { margin-top: 1.2rem; }

/* ── 12. Pie de página ── */
.pie {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2rem 5%;
  text-align: center;
  color: var(--color-texto-apagado);
  font-size: 0.9rem;
}

/* ── 13. Animaciones (≤ 0.8s) ── */
@keyframes aparecerArriba {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animar { opacity: 0; animation: aparecerArriba 0.7s ease forwards; }
.retraso-1 { animation-delay: 0.12s; }
.retraso-2 { animation-delay: 0.24s; }
.retraso-3 { animation-delay: 0.36s; }

.revelar {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.revelar.visible { opacity: 1; transform: translateY(0); }

/* ── 14. Si la persona prefiere menos animación, se respeta ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .animar, .revelar { animation: none; transition: none; opacity: 1; transform: none; }
  .tarjeta:hover { transform: none; }
}

/* ── 15. Móvil ── */
@media (max-width: 768px) {
  .seccion { padding: 3.5rem 0; }
  .heroe { min-height: 78vh; padding-top: 3rem; }
  .cta-final { padding: 3rem 1.5rem; }
}
