/* Maestros del Sur — paleta tomada del sello de marca:
   azul tinta (nombre en script), naranjo (arco "Panadería · Pastelería"),
   dorado trigo y crema de envase. */
:root {
  --navy: #2E3A7C;
  --navy-deep: #1F2858;
  --orange: #E07B39;
  --orange-ink: #B4561A;      /* naranjo con contraste AA sobre crema */
  --wheat: #D9A63A;
  --brown: #5B3A22;
  --cream: #FBF6EC;
  --cream-2: #F3EADA;
  --paper: #FFFDF8;
  --ink: #2A2118;
  --muted: #6B5D4F;
  --line: #E6DAC4;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(60,40,20,.06), 0 8px 24px rgba(60,40,20,.08);
  --ease: cubic-bezier(.2,.7,.2,1);
  --font-script: 'Great Vibes', cursive;
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Karla', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-head); color: var(--navy-deep); line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); letter-spacing: -.01em; }
h1 em { font-family: var(--font-script); font-style: normal; font-weight: 400; color: var(--orange-ink); font-size: 1.25em; line-height: .8; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.12rem; font-family: var(--font-body); font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--navy); }
strong { color: var(--brown); }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.ic { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-lg { width: 32px; height: 32px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 16px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 700 1rem var(--font-body); text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); }
.btn-primary .ic { transition: transform .2s var(--ease); }
.btn-primary:hover .ic { transform: translateX(3px); }
.btn-ghost { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: .95rem; }
.btn-block { width: 100%; }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--cream) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: block; line-height: 0; }
.brand-logo { width: 132px; height: 84px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem;
  padding: 10px 12px; border-radius: 8px; transition: color .2s, background-color .2s;
}
.nav a:not(.btn):hover { color: var(--orange-ink); background: var(--cream-2); }
.nav .btn { margin-left: 8px; }
.nav-toggle { display: none; width: 48px; height: 48px; border: 0; background: transparent; color: var(--navy); cursor: pointer; border-radius: 10px; }
.nav-toggle .ic { width: 26px; height: 26px; }

/* Hero */
.hero { padding: clamp(32px, 6vw, 72px) 0 40px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: auto -10% -40% auto; width: 60vw; height: 60vw; max-width: 760px; max-height: 760px;
  background: radial-gradient(closest-side, rgba(217,166,58,.22), transparent);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-ink);
  background: var(--paper); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(224,123,57,.2); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-media { margin: 0; position: relative; }
.hero-media img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: center 60%;
  border-radius: 28px 28px 120px 28px; box-shadow: var(--shadow);
}
.seal {
  position: absolute; left: -22px; bottom: 32px;
  width: 128px; height: 128px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: grid; place-content: center; text-align: center;
  border: 4px solid var(--cream); box-shadow: 0 0 0 2px var(--wheat), var(--shadow);
  transform: rotate(-8deg);
}
.seal-num { font: 700 2.6rem/1 var(--font-head); color: var(--wheat); }
.seal-txt { font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; line-height: 1.2; margin-top: 4px; }

.stats {
  margin: 48px 0 0; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.stats > div { padding: 22px 24px; border-left: 1px solid var(--line); }
.stats > div:first-child { border-left: 0; }
.stats dt { font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stats dd { margin: 4px 0 0; font: 700 2.2rem/1.1 var(--font-head); color: var(--navy); font-variant-numeric: tabular-nums; }
.stats small { font: 600 1rem var(--font-body); color: var(--orange-ink); }

/* Secciones */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--cream-2); }
.section-head { max-width: 46em; margin-bottom: 40px; }
.section-head p:last-child { color: var(--muted); font-size: 1.08rem; }
.kicker { font-weight: 700; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-ink); margin-bottom: .8em; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }

.callout {
  display: flex; gap: 16px; margin-top: 28px; padding: 22px;
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--wheat); border-radius: var(--radius);
}
.callout .ic { color: var(--orange-ink); }
.callout p { margin: 0; color: var(--muted); }

.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.feature {
  display: flex; gap: 18px; padding: 24px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.feature p { margin: 0; color: var(--muted); }
.feature-ic {
  width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--navy); color: var(--wheat);
}
.feature-ic .ic { width: 24px; height: 24px; }

/* Galerías */
.gallery { display: grid; gap: 12px; }
.gallery-plant { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; }
.gallery-products { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 260px; }
.gallery-3 { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 260px; }
.g-wide { grid-column: span 2; }
.g-tall { grid-row: span 2; }
.g-item {
  position: relative; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in;
  background: var(--cream-2);
}
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.g-item:hover img { transform: scale(1.04); }
.g-item span {
  position: absolute; left: 10px; bottom: 10px; right: 10px; width: fit-content;
  background: rgba(31,40,88,.88); color: #fff; font: 600 .88rem/1.3 var(--font-body);
  padding: 6px 10px; border-radius: 8px; text-align: left;
}

.equip {
  list-style: none; padding: 0; margin: 40px 0 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px;
}
.equip li { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.equip h3 { margin-bottom: .2em; }
.equip p { margin: 0; color: var(--muted); font-size: .98rem; }
.qty {
  flex: none; min-width: 56px; height: 40px; padding: 0 8px; border-radius: 10px;
  display: grid; place-items: center; font: 700 1.2rem var(--font-head);
  background: var(--paper); color: var(--orange-ink); border: 1px solid var(--line);
}

/* Refrigeración e insumos */
.subsection { margin-top: 56px; }
.sub-title { font: 700 1.5rem var(--font-head); }
.subsection .gallery { margin-top: 20px; }

/* Know-how (bloque azul) */
.section-navy { background: var(--navy-deep); color: #E8E9F3; position: relative; overflow: hidden; }
.section-navy h2 { color: #fff; }
.section-navy strong { color: var(--wheat); }
.kicker-light { color: var(--wheat); }
.tag {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 12px;
  padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(217,166,58,.5); color: var(--wheat); font-weight: 600;
}
.supplier {
  display: flex; gap: 16px; margin: 8px 0 16px; padding: 20px;
  border-radius: var(--radius); background: rgba(255,255,255,.06); border: 1px solid rgba(217,166,58,.45);
}
.supplier .ic { color: var(--wheat); }
.supplier h3 { color: #fff; margin-bottom: .3em; }
.supplier p { margin: 0; color: #C9CCE0; }
.formulas { list-style: none; counter-reset: f; margin: 0; padding: 0; display: grid; gap: 12px; }
.formulas li {
  counter-increment: f; position: relative; padding: 18px 20px 18px 68px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius);
}
.formulas li::before {
  content: counter(f, decimal-leading-zero); position: absolute; left: 20px; top: 18px;
  font: 700 1.2rem var(--font-head); color: var(--wheat);
}
.formulas h3 { color: #fff; margin-bottom: .2em; }
.formulas p { margin: 0; color: #C9CCE0; }

/* Crecimiento */
.revenue {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 24px 28px; margin-bottom: 16px; border-radius: var(--radius);
  background: var(--paper); border: 1px solid var(--line);
}
.revenue-num { margin: 0; font: 700 clamp(2.4rem, 6vw, 3.4rem)/1 var(--font-head); color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.revenue-num span { font: 600 1.1rem var(--font-body); color: var(--orange-ink); }
.revenue-txt { margin: 0; flex: 1 1 280px; min-width: 0; color: var(--muted); }

.shifts { display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.shift { display: flex; align-items: center; gap: 16px; padding: 28px; }
.shift .ic { width: 36px; height: 36px; }
.shift strong { display: block; font: 700 1.3rem var(--font-head); }
.shift span { font-size: .98rem; }
.shift-on { background: var(--navy); color: #fff; }
.shift-on strong { color: #fff; }
.shift-on .ic { color: var(--wheat); }
.shift-off {
  color: var(--brown);
  background: repeating-linear-gradient(135deg, var(--paper) 0 14px, var(--cream-2) 14px 28px);
}
.shift-off strong { color: var(--orange-ink); }
.shift-off .ic { color: var(--orange-ink); }

.channels { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.channels li { padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); border-top: 4px solid var(--orange); }
.channels p { margin: 0; color: var(--muted); }

/* Proceso */
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 4px; }
.steps li { display: flex; gap: 16px; position: relative; padding-bottom: 20px; }
.steps li:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 44px; bottom: 4px; width: 2px; background: var(--line); }
.steps li > span {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: #fff; font: 700 1rem var(--font-head);
}
.steps h3 { margin: 8px 0 .2em; }
.steps p { margin: 0; color: var(--muted); }

/* Formulario */
.contact-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: clamp(22px, 4vw, 36px);
  box-shadow: var(--shadow); position: sticky; top: 100px;
}
.contact-card h3 { display: flex; align-items: center; gap: 10px; font: 700 1.5rem var(--font-head); }
.contact-card h3 .ic { color: var(--orange-ink); }
.muted { color: var(--muted); }
.mail { user-select: all; overflow-wrap: anywhere; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; font: 400 1rem var(--font-body); color: var(--ink);
  background: #fff; border: 1.5px solid #CDBFA6; border-radius: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(46,58,124,.18); }
.field [aria-invalid="true"] { border-color: #B3261E; }
.err { color: #B3261E; font-size: .9rem; margin: 6px 0 0; }
.fine { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; color: var(--muted); margin: 14px 0 0; }
.fine .ic { margin-top: 2px; }

/* Contacto por WhatsApp */
.btn-wa { background: #1E7F4F; color: #fff; margin-top: 8px; }
.btn-wa:hover { background: #17673F; }
.wa-number { margin: 14px 0 0; text-align: center; color: var(--muted); }
.wa-number strong { color: var(--navy-deep); font-size: 1.15rem; letter-spacing: .02em; white-space: nowrap; user-select: all; }

/* Resultado del formulario */
.result { margin-top: 16px; padding: 16px; border-radius: 12px; background: var(--cream-2); border: 1px solid var(--line); }
.result:focus { outline: none; }
.result .to { margin: 0 0 10px; font-weight: 600; }
.result pre { white-space: pre-wrap; font: 400 .92rem/1.5 var(--font-body); margin: 0 0 12px; color: var(--ink); }

/* Footer */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); padding: 40px 0; }
.footer-inner { display: flex; align-items: center; gap: 32px; }
.footer-logo { width: 180px; height: 115px; flex: none; }
.site-footer p { margin: 0 0 .5em; }
.site-footer .fine { display: block; max-width: 48em; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 900px); max-height: 92vh; }
.lightbox::backdrop { background: rgba(20,18,30,.85); }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: 12px; }
.lb-cap { color: #fff; text-align: center; margin: 12px 0 0; font-weight: 600; }
.lb-close {
  position: fixed; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: #fff; color: var(--navy); display: grid; place-items: center; cursor: pointer;
}


/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .two-col { grid-template-columns: 1fr; }
  .hero-media { max-width: 520px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(3) { border-left: 0; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .gallery-plant, .gallery-products, .gallery-3 { grid-template-columns: repeat(2, 1fr); }
  .gallery-3 .g-item:first-child { grid-column: span 2; }
  .equip { grid-template-columns: 1fr; }
  .channels { grid-template-columns: 1fr; }
  .contact-card { position: static; }

  .nav-toggle { display: grid; place-items: center; }
  .nav {
    position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav .btn { margin: 12px 0 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .gallery-plant { grid-auto-rows: 170px; }
  .gallery-products { grid-auto-rows: 200px; }
  .gallery-3 { grid-auto-rows: 190px; }
  .shifts { grid-template-columns: 1fr; }
  .seal { width: 104px; height: 104px; left: 12px; bottom: 16px; }
  .seal-num { font-size: 2.1rem; }
  .stats dd { font-size: 1.8rem; }
  .stats > div { padding: 18px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .hero-cta .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
