/* Fase 2: estilos */

/* ---------- Variables: paleta y tipografía ---------- */
:root {
  /* Paleta tierra / café */
  --color-cafe-oscuro: #3b2415;
  --color-cafe-medio: #6b4423;
  --color-crema: #f5ead9;
  --color-crema-suave: #ece0c8;

  /* Verde hoja de cafeto (secundario) */
  --color-verde-cafeto: #4a6741;
  --color-verde-oscuro: #2f4a2b;

  /* Acento principal: rojo cereza de café madura */
  --color-acento: #8b1e2e;
  --color-acento-hover: #6f1825;

  /* Tipografía */
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-titulo: Georgia, "Times New Roman", serif;

  /* Espaciados */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;

  /* Layout */
  --ancho-maximo: 1100px;
}

/* ---------- Reset básico ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

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

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

/* ---------- Base (mobile-first) ---------- */
body {
  font-family: var(--font-base);
  background-color: var(--color-crema);
  color: var(--color-cafe-oscuro);
  font-size: 1rem;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: var(--font-titulo);
  line-height: 1.2;
}

h1 {
  font-size: 1.75rem;
}

/* ---------- Esqueleto visual de secciones ---------- */
header,
section,
footer {
  width: 100%;
  padding: var(--space-lg) var(--space-sm);
  max-width: var(--ancho-maximo);
  margin-inline: auto;
}

/* Espaciado consistente entre los elementos internos de cada sección */
header > * + *,
section > * + *,
footer > * + * {
  margin-top: var(--space-md);
}

/* Ancho de lectura cómodo para texto largo, centrado dentro de su sección */
header p,
section p,
section ul {
  max-width: 65ch;
  margin-inline: auto;
}

/* 1. Hero */
header {
  text-align: center;
  background-color: var(--color-crema-suave);
}

header p {
  font-size: 1.05rem;
  color: var(--color-cafe-medio);
}

/* 2, 3, 4. Secciones de contenido, alternando fondo para separarlas visualmente */
section:nth-of-type(odd) {
  background-color: var(--color-crema);
}

section:nth-of-type(even) {
  background-color: var(--color-crema-suave);
}

/* 2. Beneficios */
section ul {
  list-style-position: inside;
}

section li + li {
  margin-top: var(--space-xs);
}

/* 3. Confianza / Testimonio */
blockquote p {
  font-size: 1.15rem;
  font-style: italic;
}

cite {
  display: block;
  font-style: normal;
  font-size: 0.9rem;
  color: var(--color-cafe-medio);
}

/* 4. Precio + CTA: la sección más importante, jerarquía y botón destacado */
section:nth-of-type(3) {
  text-align: center;
}

section:nth-of-type(3) p:first-of-type {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-acento);
}

section:nth-of-type(3) p:last-of-type {
  font-size: 0.95rem;
  color: var(--color-cafe-medio);
}

section a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 var(--space-lg);
  background-color: var(--color-acento);
  color: var(--color-crema);
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: 8px;
}

section a:hover {
  background-color: var(--color-acento-hover);
}

section a:focus-visible {
  outline: 2px solid var(--color-acento-hover);
  outline-offset: 2px;
}

/* 5. Pie de página */
footer {
  max-width: none;
  text-align: center;
  background-color: var(--color-cafe-oscuro);
  color: var(--color-crema);
}

/* ---------- Media queries: pantallas grandes ---------- */
@media (min-width: 768px) {
  header,
  section,
  footer {
    padding: var(--space-xl) var(--space-lg);
  }

  header {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  h1 {
    font-size: 2.5rem;
  }

  header p {
    font-size: 1.25rem;
  }
}
