/* ==========================================================================
   Movimiento Sereno — hoja de estilos
   Dirección visual: cálida, luminosa y clara. Tipografía de palo seco
   en pesos altos, esquinas suaves y paleta jade + ámbar sobre crema.
   Sin fuentes externas: cero peticiones de red.
   ========================================================================== */

:root {
  /* Color */
  --crema:        #fdf8f0;
  --arena:        #f5e4d0;
  --blanco:       #ffffff;
  --tinta:        #1f2622;
  --tinta-suave:  #5e6863;
  --verde:        #1a6b58;
  --verde-osc:    #12493c;
  --verde-claro:  #dde9e6;
  --ambar:        #d97706;
  --ambar-claro:  #faecdc;
  --linea:        #ecdfcd;

  /* Tipografía: una sola familia del sistema, diferenciada por peso */
  --tipo: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
          "Noto Sans", Arial, sans-serif;

  /* Forma */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;
  --r-xl: 40px;
  --pill: 999px;

  --sombra:    0 1px 3px rgba(31, 38, 34, .05), 0 10px 26px -18px rgba(31, 38, 34, .30);
  --sombra-md: 0 2px 6px rgba(31, 38, 34, .06), 0 24px 48px -28px rgba(31, 38, 34, .40);

  --wrap:  1120px;
  --prosa: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--crema);
  color: var(--tinta);
  font-family: var(--tipo);
  font-size: 18px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--verde-osc); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ambar); }

:focus-visible { outline: 3px solid var(--ambar); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-weight: 800; letter-spacing: -.022em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.05rem, 5.6vw, 3.15rem); margin-bottom: .7rem; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin: 2.8rem 0 .9rem; }
h3 { font-size: 1.25rem; letter-spacing: -.012em; margin: 2.1rem 0 .5rem; }

p { margin: 0 0 1.2rem; }
strong { font-weight: 700; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.saltar {
  position: absolute; left: -9999px; top: 0;
  background: var(--verde-osc); color: #fff; padding: .8rem 1.2rem;
  border-radius: 0 0 var(--r-sm) 0; z-index: 99; font-weight: 600;
}
.saltar:focus { left: 0; top: 0; }

/* --- Etiqueta tipo píldora: recurso identitario del sitio --------------- */
.eyebrow {
  display: inline-block;
  background: var(--verde-claro);
  color: var(--verde-osc);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .34rem .95rem;
  border-radius: var(--pill);
  margin: 0 0 1.1rem;
}
.eyebrow--ambar { background: var(--ambar-claro); color: #623603; }

/* --- Barra de progreso de lectura --------------------------------------- */
.progreso {
  position: fixed; inset: 0 auto auto 0; height: 3px; width: 0;
  background: var(--ambar); z-index: 60; border-radius: 0 3px 3px 0;
}

/* --- Encabezado ---------------------------------------------------------- */
.sitio-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--blanco);
  border-bottom: 1px solid var(--linea);
}
.header-fila { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1rem; }

.marca { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--tinta); }
.marca svg { flex: none; border-radius: 12px; }
.marca strong { display: block; font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.marca span span { display: block; font-size: .76rem; font-weight: 500; color: var(--tinta-suave); line-height: 1.3; }

.nav-boton {
  display: none; background: var(--verde-claro); border: 0; border-radius: var(--r-sm);
  padding: .6rem .7rem; cursor: pointer; color: var(--verde-osc); line-height: 0;
}

.nav ul { display: flex; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; font-size: .95rem; font-weight: 600; text-decoration: none;
  color: var(--tinta-suave); padding: .45rem .8rem; border-radius: var(--pill);
}
.nav a:hover { background: var(--verde-claro); color: var(--verde-osc); }
.nav a[aria-current="page"] { background: var(--verde); color: #fff; }

/* --- Portada ------------------------------------------------------------- */
.hero {
  background: var(--arena);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  padding: clamp(2.6rem, 6vw, 4.6rem) 0 clamp(2.8rem, 6vw, 4.6rem);
}
.hero-grid { display: grid; grid-template-columns: 1.04fr .96fr; gap: clamp(2rem, 4.5vw, 3.6rem); align-items: center; }
.hero .entrada { font-size: 1.15rem; color: #4c5a52; max-width: 44ch; }
.hero-figura { margin: 0; }
.hero-figura img { border-radius: var(--r-lg); box-shadow: var(--sombra-md); width: 100%; }
.hero-figura figcaption { font-size: .85rem; color: #7a6c58; margin-top: .8rem; font-weight: 500; }

/* --- Botones y enlaces --------------------------------------------------- */
.boton {
  display: inline-flex; align-items: center; gap: .55rem;
  font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; text-decoration: none;
  background: var(--verde); color: #fff; border: 0; border-radius: var(--pill);
  padding: .82rem 1.7rem; transition: background .18s ease, transform .18s ease;
}
.boton:hover { background: var(--verde-osc); color: #fff; transform: translateY(-1px); }
.boton--ambar { background: var(--ambar); color: #2a1a02; }
.boton--ambar:hover { background: #bb6605; color: #2a1a02; }

.enlace-flecha {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .95rem; font-weight: 700; text-decoration: none; color: var(--verde-osc);
}
.enlace-flecha:hover { color: var(--ambar); gap: .7rem; }

/* --- Secciones ----------------------------------------------------------- */
.seccion { padding: clamp(2.8rem, 5.5vw, 4.2rem) 0; }
.seccion--clara { background: var(--blanco); }
.seccion--verde { background: var(--verde-claro); border-radius: var(--r-xl); margin: 0 12px; }

.titulo-seccion { margin-top: 0; }

.rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1.6rem; }

.tarjeta {
  background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.tarjeta:hover { transform: translateY(-4px); box-shadow: var(--sombra-md); }
.tarjeta img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.tarjeta-cuerpo { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.tarjeta h3 { margin: 0 0 .5rem; font-size: 1.16rem; }
.tarjeta h3 a { text-decoration: none; color: inherit; }
.tarjeta h3 a:hover { color: var(--verde); }
.tarjeta p { font-size: .96rem; color: var(--tinta-suave); margin-bottom: 1.2rem; }
.tarjeta .enlace-flecha { margin-top: auto; align-self: flex-start; }

.lista-limpia { list-style: none; padding: 0; margin: 0; }
.lista-limpia li { border-bottom: 1px solid var(--linea); }
.lista-limpia li:last-child { border-bottom: 0; }
.lista-limpia a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem .25rem; text-decoration: none; color: var(--tinta); font-weight: 600;
}
.lista-limpia a:hover { color: var(--verde); }
.lista-limpia a::after { content: "\2192"; color: var(--ambar); font-weight: 700; flex: none; }

/* --- Artículo ------------------------------------------------------------ */
.articulo { padding: clamp(2.2rem, 5vw, 3.6rem) 0 1.5rem; }
.articulo .prosa { max-width: var(--prosa); }
.prosa .entradilla { font-size: 1.14rem; color: #45514b; }

.prosa ul, .prosa ol { padding-left: 0; margin: 0 0 1.5rem; list-style: none; counter-reset: paso; }
.prosa ul li, .prosa ol li { position: relative; padding-left: 2rem; margin-bottom: .7rem; }
.prosa ul li::before {
  content: ""; position: absolute; left: .35rem; top: .72rem;
  width: 9px; height: 9px; background: var(--ambar); border-radius: 50%;
}
.prosa ol li { counter-increment: paso; padding-left: 2.6rem; }
.prosa ol li::before {
  content: counter(paso); position: absolute; left: 0; top: .2rem;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--verde); color: #fff;
  font-size: .84rem; font-weight: 700; line-height: 1.7rem; text-align: center;
}

.prosa figure { margin: 2.4rem 0; }
.prosa figure img { border-radius: var(--r); width: 100%; }
.prosa figcaption { font-size: .88rem; color: var(--tinta-suave); margin-top: .7rem; }

.nota {
  background: var(--ambar-claro); border-radius: var(--r);
  padding: 1.3rem 1.5rem; margin: 2.4rem 0; font-size: .96rem; color: #623603;
}
.nota p:last-child { margin-bottom: 0; }

.migas { font-size: .88rem; color: var(--tinta-suave); margin-bottom: 1.5rem; }
.migas a { color: var(--tinta-suave); text-decoration: none; font-weight: 600; }
.migas a:hover { color: var(--verde); }

.meta { font-size: .88rem; color: var(--tinta-suave); font-weight: 500; margin: 0 0 1.8rem; }

/* --- Formulario ---------------------------------------------------------- */
.formulario { max-width: 480px; }
.campo { margin-bottom: 1.2rem; }
.campo label { display: block; font-size: .92rem; font-weight: 600; margin-bottom: .4rem; }
.campo input, .campo textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--tinta);
  padding: .8rem 1rem; background: var(--blanco);
  border: 1.5px solid var(--linea); border-radius: var(--r-sm);
}
.campo textarea { min-height: 140px; resize: vertical; }
.campo input:focus, .campo textarea:focus {
  border-color: var(--verde); outline: none; box-shadow: 0 0 0 4px rgba(26,107,88,.13);
}

.aviso-form {
  display: none; margin-top: 1rem; padding: .85rem 1.1rem;
  background: var(--verde-claro); color: var(--verde-osc);
  border-radius: var(--r-sm); font-size: .95rem; font-weight: 600;
}
.aviso-form.visible { display: block; }

/* --- Pie ----------------------------------------------------------------- */
.sitio-footer {
  background: var(--verde-osc); color: #cfe2dc;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  margin-top: 3.5rem; padding: 3.2rem 0 2rem; font-size: .96rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.4rem; }
.sitio-footer h4 { font-size: .82rem; letter-spacing: .09em; text-transform: uppercase; color: #8fbdb0; margin: 0 0 1rem; font-weight: 700; }
.sitio-footer a { color: #e5f0ec; text-decoration: none; }
.sitio-footer a:hover { color: var(--ambar); }
.sitio-footer ul { list-style: none; margin: 0; padding: 0; }
.sitio-footer li { margin-bottom: .6rem; }
.footer-base { border-top: 1px solid rgba(255,255,255,.16); margin-top: 2.6rem; padding-top: 1.4rem; font-size: .87rem; color: #9dc2b8; }

/* --- Aviso de cookies ---------------------------------------------------- */
.cookies {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 70;
  background: var(--blanco); border-radius: var(--r); box-shadow: var(--sombra-md);
  padding: 1.15rem 1.35rem; max-width: 760px; margin: 0 auto;
  display: none; gap: 1.1rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
  font-size: .93rem; color: var(--tinta-suave);
}
.cookies.visible { display: flex; }
.cookies p { margin: 0; flex: 1 1 300px; }
.cookies .boton { padding: .65rem 1.4rem; font-size: .93rem; }

/* --- Aparición al desplazar ---------------------------------------------- */
.revelar { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.revelar.visible { opacity: 1; transform: none; }

/* --- Adaptación ---------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figura { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 17px; }
  :root { --r-xl: 26px; }
  .nav-boton { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--blanco); border-bottom: 1px solid var(--linea);
    max-height: 0; overflow: hidden; transition: max-height .28s ease;
    box-shadow: var(--sombra);
  }
  .nav.abierto { max-height: 520px; }
  .nav ul { flex-direction: column; gap: 0; padding: .5rem 24px 1.2rem; }
  .nav li + li { border-top: 1px solid var(--linea); }
  .nav a { padding: .95rem .4rem; font-size: 1.02rem; border-radius: var(--r-sm); }
  .seccion--verde { margin: 0; border-radius: var(--r-lg); }
  .footer-grid { grid-template-columns: 1fr; gap: 1.9rem; }
  .cookies { left: 10px; right: 10px; bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .revelar { opacity: 1; transform: none; }
}

@media print {
  .sitio-header, .sitio-footer, .cookies, .progreso { display: none; }
  body { background: #fff; }
}
