/* Xeax Alimentos · prototipo de home
   Diagramación corporativa tradicional con acabado editorial, alineada al brief estratégico:
   logo oficial sin alterar, slogan literal, alimentos y servicios agroindustriales separados.
   Colores provisionales tomados del sitio actual hasta recibir el manual de identidad. */

:root {
  --paper: #FFFFFF;
  --alt: #F3F5F3;
  --ink: #0E211B;
  --text: #2E3B36;
  --muted: #56645E;
  --line: #DCE2DE;
  --accent: #28B78C;      /* verde del sitio actual (provisional) */
  --deep: #0B5E46;
  --deeper: #08402F;

  --font: "Chillax", system-ui, sans-serif;
  --container: 1200px;
  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
:target { scroll-margin-top: 90px; }
.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 60; background: var(--ink); color: #fff; padding: 0.6rem 1rem; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.center { text-align: center; margin-top: 3rem; }
.note { margin-top: 2rem; text-align: center; color: var(--muted); font-size: 15px; }

/* ícono de WhatsApp junto a cada enlace de WhatsApp */
a.wa { display: inline-flex; align-items: center; gap: 0.4em; }
.wa-icon { width: 1.1em; height: 1.1em; flex: none; }
.btn .wa-icon { width: 1.2em; height: 1.2em; }

/* botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 46px; padding: 0 1.4rem; border-radius: var(--radius); border: 2px solid transparent; font-weight: 500; font-size: 16px; text-decoration: none; cursor: pointer; font-family: inherit; transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 140ms var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 54px; padding: 0 1.8rem; font-size: 17px; }
.btn-sm { min-height: 38px; padding: 0 1rem; font-size: 15px; }
.btn-primary { background: var(--deep); color: #fff; }
.btn-primary:hover { background: var(--deeper); }
.btn-outline { border-color: var(--deep); color: var(--deep); background: transparent; }
.btn-outline:hover { background: var(--deep); color: #fff; }
.btn-outline-light { border-color: #fff; color: #fff; background: transparent; }
.btn-outline-light:hover { background: #fff; color: var(--deep); }
.btn-light { background: #fff; color: var(--deep); }

/* barra superior */
.topbar { background: var(--deeper); color: #E4F2EC; font-size: 14px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 38px; }
.topbar a { text-decoration: none; white-space: nowrap; }
.topbar a:hover { text-decoration: underline; }
.topbar .sep { margin: 0 0.6rem; opacity: 0.6; }
.topbar .social { display: flex; gap: 1.2rem; }

/* encabezado oscuro: el logo oficial va en blanco, sin recuadro */
.header { position: sticky; top: 0; z-index: 50; background: var(--deep); color: #fff; transition: box-shadow 200ms ease; }
.header.is-scrolled { box-shadow: 0 4px 18px rgba(8, 30, 23, 0.25); }
.header-inner { display: flex; align-items: center; gap: 2rem; min-height: 80px; }
.brand { display: block; }
.brand img { width: 140px; }
.nav { display: flex; gap: 1.6rem; margin-left: auto; font-weight: 500; font-size: 16px; }
.nav a { text-decoration: none; color: #fff; padding: 0.4rem 0; border-bottom: 2px solid transparent; transition: border-color 180ms ease; }
.nav a:hover { border-bottom-color: var(--accent); }
.header .btn-primary { background: #fff; color: var(--deep); }
.header .btn-primary:hover { background: #E4F2EC; }
.menu-btn { display: none; margin-left: auto; background: none; border: 2px solid rgba(255, 255, 255, 0.5); border-radius: var(--radius); padding: 0.45rem 0.9rem; font: inherit; font-weight: 500; color: #fff; cursor: pointer; }

/* banner */
.hero { position: relative; min-height: min(80vh, 740px); display: flex; align-items: center; color: #fff; overflow: hidden; background: var(--ink); }
.hero-slides { position: absolute; inset: 0; }
.hero-slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1400ms ease; }
.hero-slides img.is-on { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 30, 23, 0.88) 0%, rgba(8, 30, 23, 0.72) 50%, rgba(8, 30, 23, 0.4) 100%); }
.hero-content { position: relative; z-index: 1; padding: 88px 0; }
.hero-slogan { font-size: 14px; font-weight: 600; letter-spacing: 0.06em; color: #BDE9D9; margin-bottom: 1.2rem; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 1.4rem + 3.4vw, 4rem); max-width: 16ch; }
.hero-content > p:not(.hero-slogan) { margin-top: 1.2rem; font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem); max-width: 46ch; color: #fff; font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

/* datos */
.highlights { background: var(--alt); }
.highlights-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.highlights-grid > div { padding: 1.7rem 1.5rem; display: grid; gap: 0.25rem; }
.highlights-grid > div + div { border-left: 1px solid var(--line); }
.highlights strong { font-size: 1.2rem; font-weight: 600; color: var(--ink); }
.highlights span { color: var(--muted); font-size: 15px; }

/* secciones */
.section { padding: 104px 0; }
.section-alt { background: var(--alt); }
.section-head { text-align: center; max-width: 700px; margin: 0 auto 3.5rem; }
.section-head p:not(.kicker) { margin-top: 0.9rem; color: var(--muted); }
.kicker { color: var(--deep); font-weight: 600; font-size: 15px; margin-bottom: 0.5rem; }
h2 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem); }

/* dos columnas */
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4.5rem; align-items: center; }
.two-col-media img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: var(--radius); }
.two-col-text > p:not(.kicker) { margin-top: 1rem; }
.vision { padding-left: 1rem; border-left: 3px solid var(--accent); color: var(--ink); }
.checks { list-style: none; padding: 0; margin-top: 1.6rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem 1.5rem; }
.checks li { position: relative; padding-left: 1.3rem; color: var(--ink); font-weight: 500; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--accent); }

/* alimentos */
.feature { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: #fff; border-radius: var(--radius); overflow: hidden; }
.feature img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.feature-body { padding: clamp(2rem, 4vw, 3.5rem); display: flex; flex-direction: column; justify-content: center; gap: 1rem; }
.feature-body h3 { font-size: 1.6rem; }
.feature-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.6rem; }
.where { margin-top: 28px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem; align-items: center; background: #fff; border-radius: var(--radius); padding: 2rem 2.2rem; }
.where h3 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.where p { color: var(--muted); }
.where-form { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.where-form select { flex: 1 1 200px; min-height: 46px; padding: 0 0.9rem; border: 1px solid #C5CEC9; border-radius: var(--radius); font: inherit; font-size: 16px; color: var(--muted); background: var(--alt); }

/* plantas */
.plant { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 3rem; align-items: start; padding: 2.5rem 0; }
.plant + .plant { border-top: 1px solid var(--line); }
.plant-head { display: grid; gap: 1.2rem; }
.plant-head img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); }
.plant-head h3 { font-size: 1.6rem; }
.plant-head p { margin-top: 0.5rem; color: var(--muted); }
.plant-services { list-style: none; padding: 0; display: grid; gap: 0; }
.plant-services li { padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.plant-services li:first-child { padding-top: 0; }
.plant-services h4 { font-size: 1.2rem; }
.plant-services p { margin-top: 0.35rem; color: var(--muted); }

/* tarjetas de producto */
.cards { display: grid; gap: 24px; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: #fff; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform 200ms var(--ease); }
.card:hover { transform: translateY(-3px); }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.card h3 { font-size: 1.2rem; }
.card p { color: var(--muted); flex: 1; }
.card-link { color: var(--deep); font-weight: 600; text-decoration: none; }
.card-link:hover { text-decoration: underline; }

/* clientes */
.logos { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.logos li { min-width: 0; background: #fff; border-radius: var(--radius); display: grid; place-items: center; padding: 1rem; aspect-ratio: 2 / 1; }
.logos img { max-height: 72px; width: auto; max-width: 100%; object-fit: contain; filter: grayscale(1); opacity: 0.8; transition: filter 200ms ease, opacity 200ms ease; }
.logos li:hover img { filter: none; opacity: 1; }

/* franja */
.cta-band { background: var(--deep); color: #fff; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 60px 0; }
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem); }
.cta-band p { margin-top: 0.4rem; color: #D6ECE3; }
.cta-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* formularios */
.form { margin-top: 2rem; display: grid; gap: 1.1rem; }
.form-compact { margin-top: 1.6rem; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.form label { display: grid; gap: 0.35rem; font-weight: 500; color: var(--ink); font-size: 15px; }
.form input:not([type="checkbox"]), .form select, .form textarea { font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid #C5CEC9; border-radius: var(--radius); padding: 0.75rem 0.9rem; width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--deep); box-shadow: 0 0 0 3px rgba(40, 183, 140, 0.25); }
.form .consent { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; color: var(--text); }
.form .consent input { margin-top: 0.3rem; width: 18px; height: 18px; accent-color: var(--deep); flex: none; }
.form .consent a { color: var(--deep); }
.form .btn { justify-self: start; }

/* contacto */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 4rem; align-items: start; }
.contact-grid > div > p:not(.kicker) { margin-top: 0.8rem; color: var(--muted); }
.contact-info { background: var(--alt); border-radius: var(--radius); padding: 2rem; display: grid; gap: 1.2rem; }
.contact-info h3 { font-size: 1.3rem; }
.contact-info dt { font-weight: 600; color: var(--ink); margin-top: 0.7rem; }
.contact-info dd { overflow-wrap: anywhere; }
.contact-info dd a { color: var(--deep); }
.contact-info img { border-radius: var(--radius); aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }

/* pie */
.footer { background: var(--deeper); color: #D6ECE3; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 3rem; padding: 64px 0 48px; }
.footer-brand img { width: 140px; margin-bottom: 1rem; }
.footer-brand p { font-size: 13px; font-weight: 600; letter-spacing: 0.05em; max-width: 30ch; }
.footer h2 { color: #fff; font-size: 1.05rem; margin-bottom: 1rem; }
.footer nav { display: grid; gap: 0.5rem; align-content: start; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer p + p { margin-top: 0.5rem; }
.footer-social a + a { margin-left: 0.8rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.15); }
.footer-bottom-inner { display: flex; justify-content: space-between; gap: 1rem; padding: 18px 0; font-size: 14px; }

/* aviso de cookies */
.cookies { position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 70; max-width: 560px; margin-left: auto; background: #fff; color: var(--text); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(8, 30, 23, 0.2); padding: 1rem 1.2rem; display: flex; gap: 1rem; align-items: center; font-size: 14px; }
.cookies[hidden] { display: none; }
.cookies a { color: var(--deep); }
.cookies > div { display: flex; gap: 0.5rem; flex: none; }

/* entradas suaves (el contenido queda visible sin JavaScript) */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 600ms var(--ease), transform 700ms var(--ease); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-slides img { transition: none; }
}

/* tablet */
@media (max-width: 1100px) {
  .topbar .social { display: none; }
  .nav { display: none; }
  .header-cta { display: none; }
  .menu-btn { display: inline-flex; }
  .nav.is-open { display: flex; flex-direction: column; gap: 0; position: absolute; top: 100%; left: 0; right: 0; background: var(--deep); padding: 0.5rem 20px 1rem; }
  .nav.is-open a { padding: 0.8rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
  .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .two-col, .contact-grid, .plant { gap: 2.5rem; }
}

/* tablet vertical */
@media (max-width: 920px) {
  .two-col, .contact-grid, .plant, .feature { grid-template-columns: 1fr; }
  .two-col-text-first .two-col-media { order: -1; }
  .two-col-media img { aspect-ratio: 16 / 9; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* teléfono */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .hide-sm { display: none; }
  .topbar-inner { justify-content: center; text-align: center; }
  .header-inner { min-height: 68px; }
  .brand img { width: 112px; }
  .hero { min-height: 600px; }
  .hero::after { background: rgba(8, 30, 23, 0.76); }
  .hero-content { padding: 64px 0; }
  .hero h1 { font-size: 1.85rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .highlights-grid { grid-template-columns: 1fr; }
  .highlights-grid > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .section { padding: 68px 0; }
  .section-head { margin-bottom: 2.2rem; }
  .two-col, .contact-grid, .plant, .feature, .where { grid-template-columns: 1fr; }
  .two-col-text-first .two-col-media { order: -1; }
  .checks { grid-template-columns: 1fr; }
  .cards-3 { grid-template-columns: 1fr; }
  .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .where { padding: 1.6rem; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .cta-actions .btn { flex: 1 1 auto; }
  .form-row { grid-template-columns: 1fr; }
  .form .btn { justify-self: stretch; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom-inner { flex-direction: column; }
  .cookies { flex-direction: column; align-items: stretch; }
}
