/* ==========================================================
   Página de inicio de Agrata
   Los colores de la marca están arriba: cámbialos solo aquí.
   ========================================================== */
:root {
  --verde-oscuro: #2F5A0E;
  --verde: #3B6D11;
  --crema: #F4F8EC;
  --trigo: #D2A23E;
  --ocre: #8C6618;
  --texto: #1F2A14;
  --texto-suave: #4A5640;
  --blanco: #FFFFFF;
  --alto-barra: 64px;
  --letra: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--alto-barra) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--letra);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--texto);
  background: var(--blanco);
}
img, svg { max-width: 100%; }
a { color: var(--verde); }
:focus-visible { outline: 3px solid var(--trigo); outline-offset: 3px; }

h1, h2, h3 { line-height: 1.15; color: var(--verde-oscuro); }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 1.5rem; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; margin: 2rem 0 0.5rem; }

/* ---------- Botones ---------- */
.boton {
  display: inline-block;
  padding: 0.7em 1.4em;
  border-radius: 999px;
  background: var(--verde);
  color: var(--blanco);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--verde);
}
.boton:hover { background: var(--verde-oscuro); border-color: var(--verde-oscuro); }
.boton-claro { background: transparent; color: var(--verde-oscuro); }
.boton-claro:hover { background: var(--verde-oscuro); color: var(--blanco); }
.boton-grande { font-size: 1.2rem; padding: 0.9em 1.8em; }

/* ---------- Menú superior ---------- */
.barra {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1.5rem;
  height: var(--alto-barra);
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e3ead6;
}
.barra-logo { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; font-weight: 700; font-size: 1.25rem; color: var(--verde-oscuro); }
.barra-menu { display: flex; gap: 1.4rem; margin-left: auto; }
.barra-menu a { color: var(--texto); text-decoration: none; font-size: 1rem; white-space: nowrap; }
.barra-menu a:hover { color: var(--verde); text-decoration: underline; text-underline-offset: 4px; }
.boton-entrar { padding: 0.45em 1.3em; font-size: 1rem; }

/* En el móvil el menú pasa a una segunda fila que se desliza con el dedo */
@media (max-width: 900px) {
  :root { --alto-barra: 104px; }
  .barra { flex-wrap: wrap; height: auto; padding-top: 0.6rem; gap: 0.4rem 1rem; }
  .boton-entrar { margin-left: auto; }
  .barra-menu { order: 3; width: 100%; margin: 0; overflow-x: auto; padding: 0.3rem 0 0.7rem; }
}

/* ---------- Portada ---------- */
.portada { position: relative; overflow: hidden; background: #F4F7EC; padding-bottom: 33vw; }
/* La foto ocupa el ancho entero y se apoya abajo: su parte alta es neblina y el texto va encima */
.portada picture, .portada-fondo { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 56.25vw; object-fit: cover; object-position: center bottom; }
.portada-texto { position: relative; z-index: 1; max-width: calc(64rem + 2 * clamp(1.25rem, 5vw, 4rem)); margin: 0 auto; padding: clamp(2rem, 6vh, 4rem) clamp(1.25rem, 5vw, 4rem) 0; }
.portada h1 { max-width: 40rem; }
.portada-logo { width: min(340px, 72vw); height: auto; display: block; margin-bottom: 1.25rem; }
.portada h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin: 0 0 1rem; letter-spacing: -0.02em; }
.portada p { font-size: 1.25rem; color: var(--texto-suave); max-width: 34rem; margin: 0 0 1.75rem; }
.portada-botones { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* Aviso de lanzamiento: la etiqueta de la portada y el recuadro de Contacto */
.portada .lanzamiento-etiqueta {
  display: inline-block; max-width: none; margin: 0 0 1.4rem; padding: 0.45em 1.1em;
  border: 1.5px solid var(--trigo); border-radius: 999px; background: #FBF3DF;
  color: var(--verde-oscuro); font-size: 1.05rem; line-height: 1.4;
}
.lanzamiento-etiqueta a { font-weight: 700; color: var(--verde-oscuro); white-space: nowrap; }
.contacto .ancho > .lanzamiento-detalle {
  max-width: 36rem; padding: 1rem 1.4rem; border: 1.5px solid var(--trigo); border-radius: 14px;
  background: #FBF3DF; color: var(--texto);
}

/* ---------- Secciones ---------- */
.seccion { padding: clamp(3.5rem, 9vw, 6.5rem) clamp(1.25rem, 5vw, 4rem); }
.ancho { max-width: 64rem; margin: 0 auto; }
.ancho > p, .entradilla { max-width: 42rem; }
.entradilla { font-size: 1.25rem; color: var(--texto-suave); }

/* Quiénes somos */
.origen { background: var(--crema); }
.origen blockquote {
  margin: 2.5rem 0 0.5rem; padding: 0 0 0 1.5rem;
  border-left: 4px solid var(--trigo);
  font-size: clamp(1.3rem, 2.6vw, 1.6rem); line-height: 1.4; color: var(--verde-oscuro); max-width: 40rem;
}
.firma { color: var(--ocre); font-weight: 600; }

/* Lo que ya hace */
.funciones { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 0.4rem 3rem; }
.funciones li { padding: 0.9rem 0 0.9rem 1.6rem; border-top: 1px solid #dfe7d1; position: relative; }
.funciones li::before { content: ""; position: absolute; left: 0; top: 1.45rem; width: 0.65rem; height: 0.65rem; background: var(--verde); border-radius: 2px; transform: rotate(45deg); }
.funciones strong { color: var(--verde-oscuro); }

/* Ejemplos */
.casos { background: var(--crema); }
.caso h3:first-child { margin-top: 0; }
.caso-destacado { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; margin-bottom: 3.5rem; }
.caso-destacado h3 + p { margin-bottom: 0; }
.caso-destacado p + h3 { margin-top: 1.8rem; }
@media (max-width: 800px) { .caso-destacado { grid-template-columns: 1fr; gap: 1.5rem; } }
.casos-resto { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 2.5rem; border-top: 2px solid var(--verde); padding-top: 2rem; }
.casos-resto p { font-size: 1.05rem; }

/* Dibujo de la parcela */
.parcela { width: 100%; height: auto; background: var(--blanco); border-radius: 18px; padding: 0.5rem; }
.p-recinto { fill: #E6EFD3; stroke: var(--verde-oscuro); stroke-width: 3; stroke-linejoin: round; }
.p-surcos { stroke: #C5D5A8; stroke-width: 2; fill: none; }
.p-arena { fill: rgba(210, 162, 62, 0.45); stroke: var(--ocre); stroke-width: 2.5; stroke-dasharray: 7 5; }
.p-agua { fill: rgba(74, 135, 170, 0.35); stroke: #3B6F8C; stroke-width: 2.5; stroke-dasharray: 7 5; }
.p-pin circle { fill: var(--verde); stroke: var(--blanco); stroke-width: 3; }
.p-pin path { stroke: var(--blanco); stroke-width: 2; fill: none; }
.p-roya { fill: rgba(156, 74, 34, 0.28); stroke: #9C4A22; stroke-width: 2.5; stroke-dasharray: 7 5; }
.parcela text { font-family: var(--letra); font-size: 15px; font-weight: 600; fill: var(--texto); paint-order: stroke; stroke: #E6EFD3; stroke-width: 4px; }

/* Cómo se organiza */
.niveles { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0; margin: 0 0 2.5rem; }
.niveles > div { padding: 1.2rem 1.5rem 1.2rem 0; border-top: 6px solid var(--verde); }
.niveles > div:nth-child(2) { border-top-color: #6E9A3A; }
.niveles > div:nth-child(3) { border-top-color: var(--trigo); }
.niveles dt { font-weight: 700; font-size: 1.2rem; color: var(--verde-oscuro); }
.niveles dd { margin: 0.3rem 0 0; color: var(--texto-suave); }
.quien { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 2.5rem; }
.quien h3 { margin-top: 0; }

/* Lo que viene */
.viene { background: var(--verde-oscuro); color: #EAF1DD; }
.viene h2 { color: var(--blanco); }
.viene .entradilla { color: #D4E1C0; }
.horizonte { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 0 3rem; }
.horizonte li { padding: 0.9rem 0 0.9rem 1.6rem; border-top: 1px solid rgba(255,255,255,0.18); position: relative; }
.horizonte li::before { content: ""; position: absolute; left: 0; top: 1.4rem; width: 0.7rem; height: 0.7rem; border: 2px solid var(--trigo); border-radius: 50%; }
.horizonte strong { color: var(--trigo); }

/* Contacto */
.contacto { text-align: center; }
.contacto .ancho > p { margin: 0 auto 2rem; }

/* Pie */
.pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.6rem 1.5rem; padding: 2rem 1rem; background: var(--crema); color: var(--texto-suave); font-size: 0.95rem; }
.pie nav { display: flex; gap: 1.2rem; }

/* En el móvil, más campo bajo la portada */
@media (max-width: 700px) {
  .portada { padding-bottom: 58vw; }
  .portada picture, .portada-fondo { height: 95vw; }
}
