/*
Theme Name: Adarga
Description: Página de agradecimiento y descarga del Libro de actividades bíblicas Adarga (Espada y Adarga).
Version: 1.0.0
Text Domain: adarga
*/

:root {
  --radius: 0.5rem;
  --background: oklch(0.985 0.018 98);
  --foreground: oklch(0.25 0.045 255);
  --card: oklch(1 0 0);
  --primary-foreground: oklch(1 0 0);
  --brand-blue: oklch(0.57 0.2 252);
  --coral: oklch(0.63 0.22 19);
  --muted-foreground: oklch(0.47 0.04 255);
  --border: oklch(0.86 0.035 255);
  --surface-blue: oklch(0.96 0.045 235);
  --surface-footer: oklch(0.23 0.07 255);
  --shadow-button: 0 10px 24px -10px oklch(0.57 0.2 252 / 65%);
  --font-sans: "Quicksand", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Nunito", "Quicksand", ui-sans-serif, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }

html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: hidden; }
h1, h2, h3, p, span, strong { overflow-wrap: break-word; }

/*
 * Carga diferida del pintado: el navegador no dibuja estas secciones
 * hasta que el visitante se acerca a ellas. Usar en todo bloque bajo el primer pantallazo.
 */
.lazy-section { content-visibility: auto; contain-intrinsic-size: auto 600px; }

/* Entrada suave de los bloques marcados con data-reveal (ver assets/adarga.js). */
.js-reveal [data-reveal] { transition: opacity 500ms ease, transform 500ms ease; }
.js-reveal [data-reveal]:not(.is-visible) { opacity: 0; transform: translateY(18px); }
.features [data-reveal]:nth-child(2) { transition-delay: 80ms; }
.features [data-reveal]:nth-child(3) { transition-delay: 160ms; }
.features [data-reveal]:nth-child(4) { transition-delay: 240ms; }

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

h1, h2, h3 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }
img { max-width: 100%; display: block; }
svg { flex-shrink: 0; }

.container { width: 100%; max-width: 72rem; margin: 0 auto; }
.text-brand-blue { color: var(--brand-blue); }
.text-coral { color: var(--coral); }
.muted { color: var(--muted-foreground); }

.eyebrow {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--coral);
}

/* Hero */
.hero { overflow: hidden; padding: 2rem 1.25rem 4rem; }
.hero-grid { display: grid; align-items: center; gap: 2.5rem; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem; }

.success-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: oklch(0.34 0.12 150);
  background-color: oklch(0.92 0.09 145);
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1.25;
  text-wrap: balance;
}

.lead { max-width: 42rem; font-size: 1rem; line-height: 1.625; color: var(--muted-foreground); }

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.5rem;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  background-color: var(--brand-blue);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-button);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}
.download-button svg { width: 1.125rem; height: 1.125rem; }

.secure-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted-foreground);
}
.secure-note svg { width: 1rem; height: 1rem; color: var(--coral); }

.book-stage { position: relative; width: 100%; max-width: min(80vw, 20rem); margin: 0 auto; }
.book-stage img { width: 100%; height: auto; }

/* Features */
.content-band {
  padding: 4rem 1.25rem;
  background-color: var(--surface-blue);
  border-block: 1px solid var(--border);
}
.section-head { max-width: 48rem; margin: 0 auto; text-align: center; }
.section-head h2 { margin-top: 0.75rem; font-size: 1.875rem; font-weight: 900; line-height: 1.2; }
.section-head p.muted { margin-top: 1rem; font-size: 1rem; line-height: 1.625; }

.features { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.feature-card {
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  background-color: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px -18px oklch(0.32 0.08 255 / 35%);
}
.feature-card svg { width: 1.75rem; height: 1.75rem; margin: 0 auto; color: var(--brand-blue); display: block; }
.feature-card strong { display: block; margin-top: 0.75rem; font-family: var(--font-display); font-size: 1.875rem; font-weight: 900; color: var(--foreground); }
.feature-card span { display: block; margin-top: 0.25rem; font-size: 0.875rem; font-weight: 600; line-height: 1.375; color: var(--muted-foreground); }

/* Final CTA */
.cta { padding: 3.5rem 1.25rem; }
.cta .inner { max-width: 48rem; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; }
.cta h2 { font-size: 1.5rem; font-weight: 900; }
.cta p { margin-top: 0.75rem; font-size: 0.875rem; line-height: 1.625; color: var(--muted-foreground); }
.cta .download-button { margin-top: 1.75rem; }

/* Footer */
.footer-band { padding: 2.5rem 1.25rem; text-align: center; background-color: var(--surface-footer); color: var(--primary-foreground); }
.footer-band .brand { font-family: var(--font-display); font-size: 1.125rem; font-weight: 900; }
.footer-band .sub { margin-top: 0.25rem; font-size: 0.875rem; font-weight: 600; opacity: 0.75; }
.footer-band .blessing { max-width: 28rem; margin: 1.25rem auto 0; font-size: 0.875rem; opacity: 0.75; }
.footer-band .copy { margin-top: 1.5rem; font-size: 0.75rem; opacity: 0.6; }

@media (prefers-reduced-motion: no-preference) {
  .download-button { transition: transform 180ms ease, box-shadow 180ms ease; }
  .download-button:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -10px oklch(0.57 0.2 252 / 75%); }
  .book-stage img { transition: transform 400ms ease; }
  .book-stage:hover img { transform: translateY(-6px) rotate(-1deg); }
}

/* Teléfonos pequeños */
@media (max-width: 479px) {
  .hero { padding-top: 1.5rem; padding-bottom: 3rem; }
  .hero h1 { font-size: 2rem; }
  .download-button { width: 100%; padding: 0.875rem 1rem; }
  .features { gap: 0.75rem; }
  .feature-card { padding: 1rem 0.75rem; }
  .feature-card strong { font-size: 1.625rem; }
  .feature-card span { font-size: 0.8125rem; }
}

/* Muy estrechos (≤ 340px): una tarjeta por fila */
@media (max-width: 340px) {
  .features { grid-template-columns: 1fr; }
}

/* Tablets en vertical: texto e imagen centrados */
@media (min-width: 640px) and (max-width: 1023px) {
  .hero-copy { align-items: center; text-align: center; }
  .lead { margin: 0 auto; }
}

@media (min-width: 640px) {
  .hero { padding: 3rem 2rem 5rem; }
  .book-stage { max-width: 24rem; }
  .hero h1 { font-size: 3rem; }
  .lead { font-size: 1.125rem; }
  .download-button { font-size: 1.125rem; }
  .content-band { padding: 5rem 2rem; }
  .section-head h2 { font-size: 2.25rem; }
  .section-head p.muted { font-size: 1.125rem; }
  .feature-card { padding: 1.5rem; }
  .cta { padding: 4rem 2rem; }
  .cta h2 { font-size: 1.875rem; }
  .cta p { font-size: 1rem; }
  .footer-band { padding: 2.5rem 2rem; }
}

@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr 0.82fr; gap: 4rem; }
  .book-stage { max-width: 30rem; }
  .hero h1 { font-size: 3.75rem; }
  .features { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Elementor: tarjetas de ventajas de la app con el contenido centrado en vertical
   cuando la fila se estira a la altura de la tarjeta del QR. */
.adarga-perk { display: flex; align-items: center; }
.adarga-perk > .elementor-widget-container,
.adarga-perk > .elementor-icon-box-wrapper { width: 100%; }

/* Elementor: en una cuadrícula de 2 columnas en el teléfono (clase adarga-grid-impar),
   el último elemento suelto ocupa toda la fila en lugar de quedar a la izquierda. */
@media (max-width: 767px) {
  .adarga-grid-impar > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
