/* ============================================================
   NEOFRESH — Design tokens
   ============================================================ */
:root {
  --red: #D71920;
  --red-dark: #A81319;
  --ink: #1C1C1B;
  --paper: #F3F4F1;
  --white: #FFFFFF;
  --gray-600: #6E7269;
  --gray-400: #9A9D95;
  --line: #E1E2DC;
  --green: #4B7A51;

  --font-display: 'Manrope', sans-serif;
  --font-body: 'Inter', sans-serif;

  --container: 1240px;
  --gutter: clamp(24px, 5vw, 64px);
  --radius: 6px;
  --ease: cubic-bezier(.22,.68,0,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 0.4em;
  line-height: 1.08;
  letter-spacing: -0.015em;
  font-weight: 800;
}

h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 700; }

p { margin: 0 0 1em; color: var(--gray-600); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.1em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--red);
}

section { padding: clamp(64px, 10vw, 140px) 0; }
.section-tight { padding: clamp(40px, 6vw, 80px) 0; }
.bg-paper { background: var(--paper); }
.bg-ink { background: var(--ink); color: var(--white); }
.bg-ink p { color: #C9CAC5; }
.bg-ink h1, .bg-ink h2, .bg-ink h3 { color: var(--white); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .35s var(--ease), background .25s ease, color .25s ease, border-color .25s ease;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); }
.btn-ghost { border-color: currentColor; }
.btn-ghost:hover { transform: translateY(-2px); }
.bg-ink .btn-ghost { border-color: rgba(255,255,255,0.4); }
.bg-ink .btn-ghost:hover { border-color: var(--white); }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px 0;
  transition: background .35s ease, padding .35s ease, box-shadow .35s ease;
}
.site-header.is-scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  padding: 14px 0;
  box-shadow: 0 1px 0 var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
}
.logo span { color: var(--red); }
.logo img {
  height: 40px;
  width: auto;
  border-radius: 4px;
}
.footer-top .logo img { height: 36px; }
.site-header.on-dark:not(.is-scrolled) .logo img {
  filter: brightness(1.7) contrast(1.05);
}
.site-header.on-dark:not(.is-scrolled) .logo { color: var(--white); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 38px);
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}
.site-header.on-dark:not(.is-scrolled) .nav-links a { color: var(--white); }
.nav-links a::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--red);
  transition: width .3s var(--ease);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); }
.site-header.on-dark:not(.is-scrolled) .nav-toggle span { background: var(--white); }

@media (max-width: 860px) {
  body.nav-open { overflow: hidden; height: 100vh; height: 100dvh; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 30%;
    height: 100vh;
    height: 100dvh;
    z-index: 200;
    background: var(--ink);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 90px var(--gutter) 40px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform .4s var(--ease);
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-links a { color: var(--white) !important; font-size: 1.3rem; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0;
  background: linear-gradient(155deg, #2B2B29 0%, #1C1C1B 55%, #171716 100%);
}
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.1) 45%, rgba(0,0,0,0.5) 100%);
}
.hero-media .placeholder-label { z-index: 1; }
.hero-content {
  position: relative; z-index: 2;
  padding-bottom: clamp(60px, 8vw, 110px);
  padding-top: 160px;
}
.hero-content .eyebrow { color: #FF9A9D; }
.hero-content .eyebrow::before { background: #FF9A9D; }
.hero h1 { color: var(--white); }
.hero p.lede { max-width: 46ch; font-size: 1.15rem; color: #E7E7E3; }
.page-hero .lede { color: #E7E7E3; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 2em; }

.scroll-cue {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: #D9D9D6;
}
.scroll-cue .line { width: 1px; height: 34px; background: linear-gradient(#D71920, transparent); animation: scrollcue 1.8s ease-in-out infinite; }
@keyframes scrollcue { 0% { transform: scaleY(0); transform-origin: top;} 50% { transform: scaleY(1); transform-origin: top;} 51% {transform-origin: bottom;} 100% { transform: scaleY(0); transform-origin: bottom;} }

/* ============================================================
   IMAGE PLACEHOLDERS
   (swap these for real <img> tags once photos are ready)
   ============================================================ */
.placeholder {
  position: relative;
  background: linear-gradient(135deg, #E7E8E3 0%, #D7D9D1 100%);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  min-height: 220px;
  color: #8B8D84;
}
.placeholder::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0 2px, transparent 2px 14px);
}
.placeholder-label {
  position: relative;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 14px 18px;
  max-width: 80%;
}
.placeholder-label small { display: block; font-weight: 400; opacity: 0.75; margin-top: 4px; }
.placeholder.has-photo::before { display: none; }
.placeholder.has-photo {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(28,28,27,0.06);
  transition: box-shadow .3s ease, transform .3s ease;
}
.placeholder.has-photo:hover { box-shadow: 0 18px 36px rgba(28,28,27,0.1); transform: translateY(-3px); }
.species-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 0px;
  box-sizing: border-box;
  border-radius: 6px;
}

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   INTRO / SPLIT SECTIONS
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 90px);
  align-items: center;
}
.split.reverse .split-media { order: 2; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
}
.split-media .placeholder { aspect-ratio: 4/5; min-height: 360px; }

/* ============================================================
   PROCESS CHAIN (signature element)
   ============================================================ */
.chain {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 56px;
}
.chain-track {
  position: absolute;
  top: 65px; left: 10%; right: 10%;
  height: 2px;
  background: var(--line);
  z-index: 0;
}
.chain-track-fill {
  position: absolute; top: 0; left: 0; height: 100%; width: 0%;
  background: var(--red);
  transition: width 1.4s var(--ease);
}
.chain-node { position: relative; z-index: 1; padding: 0 14px; text-align: center; }
.chain-num {
  width: 130px; height: 130px; margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; color: var(--gray-400);
  transition: border-color .4s ease, color .4s ease, background .4s ease;
}
.chain-node.is-active .chain-num { border-color: var(--red); color: var(--red); background: #FDECEC; }
.chain-num.has-photo { padding: 0; overflow: hidden; border-color: var(--line); background: none; box-shadow: 0 8px 20px rgba(28,28,27,0.08); }
.chain-num.has-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.chain-node.is-active .chain-num.has-photo { border-color: var(--red); box-shadow: 0 0 0 3px rgba(215,25,32,0.18); }
.chain-node h4 { font-family: var(--font-display); font-size: 1rem; margin-bottom: 6px; }
.chain-node p { font-size: 0.88rem; margin: 0; }
@media (max-width: 860px) {
  .chain { grid-template-columns: 1fr; gap: 36px; }
  .chain-track { display: none; }
}

/* ============================================================
   PRODUCT BLOCKS
   ============================================================ */
.product-block { padding: clamp(40px,7vw,90px) 0; border-top: 1px solid var(--line); }
.product-block:first-of-type { border-top: none; }
.product-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.variety-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.variety-list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 500;
}
.product-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.product-grid .placeholder { aspect-ratio: 16/10; min-height: 260px; }
@media (max-width: 860px) { .product-grid { grid-template-columns: 1fr; } }

.species-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 44px); }
.species-col .placeholder { aspect-ratio: 1/1; min-height: 240px; margin-bottom: 22px; }
.species-col h3 { margin-bottom: 14px; }
.variety-list-vertical { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.variety-list-vertical li { font-size: 0.92rem; color: var(--gray-600); padding: 7px 0; border-top: 1px solid var(--line); }
.variety-list-vertical li:first-child { border-top: none; }
@media (max-width: 760px) { .species-row { grid-template-columns: 1fr; } }

/* ============================================================
   STATS
   ============================================================ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.stat b { display: block; font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.6rem); color: var(--red); }
.stat span { font-size: 0.9rem; color: var(--gray-600); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   PARTNERS
   ============================================================ */
.partners-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 32px;
}
.partner-slot {
  flex: 1 1 200px;
  min-height: 90px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
}
.partner-slot.has-logo {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 12px;
}
.partner-slot.has-logo a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.partner-slot span {
  font-size: 0.82rem;
  color: var(--gray-400);
  font-weight: 600;
}

/* ============================================================
   MARKETS
   ============================================================ */
.world-map { margin-top: 40px; }
.world-map svg { width: 100%; height: auto; display: block; }
.wm-dot { fill: rgba(28,28,27,0.16); }
.wm-outline { fill: none; stroke: rgba(28,28,27,0.08); stroke-width: 1; }
.wm-route { fill: none; stroke: var(--red); stroke-width: 1.5; stroke-dasharray: 3 7; opacity: 0.5; }
.wm-pin circle:not(.wm-ring):not(.wm-pulse) { fill: var(--red); }
.wm-pin-origin circle:not(.wm-ring):not(.wm-pulse) { fill: var(--red); }
.wm-pin circle.wm-ring { display: none; }
.wm-pin text {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 20px;
  fill: var(--red);
}
.wm-pin-origin text { fill: var(--red); font-weight: 800; }
.wm-pulse {
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
  transform-origin: center;
  animation: wmpulse 2.4s ease-out infinite;
}
@keyframes wmpulse {
  0% { r: 9; opacity: 0.9; }
  100% { r: 26; opacity: 0; }
}

/* ============================================================
   CARDS (Nosotros / Procesos detail)
   ============================================================ */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 960px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }
.value-card { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); }
.value-card .num { font-family: var(--font-display); color: var(--red); font-weight: 800; font-size: 0.9rem; letter-spacing: 0.08em; }

/* ============================================================
   LANGUAGE BAR
   ============================================================ */
.nav-links a.nav-cta {
  background: var(--red);
  color: var(--white) !important;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  transition: background .25s ease, transform .25s ease;
}
.nav-links a.nav-cta:hover { background: var(--red-dark); transform: translateY(-1px); }
.nav-links a.nav-cta::after { display: none; }
@media (max-width: 860px) {
  .nav-links a.nav-cta { display: inline-block; margin-top: 10px; }
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.site-header.on-dark:not(.is-scrolled) .lang-switch { border-left-color: rgba(255,255,255,0.3); }
.lang-switch button {
  background: none;
  border: none;
  color: var(--ink);
  opacity: 0.5;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  padding: 4px 5px;
  cursor: pointer;
  transition: opacity .25s ease, color .25s ease;
}
.site-header.on-dark:not(.is-scrolled) .lang-switch button { color: var(--white); }
.lang-switch button:hover { opacity: 0.85; }
.lang-switch button.active { opacity: 1; color: var(--red) !important; }
@media (max-width: 860px) {
  .nav-links .lang-switch {
    border-left: none;
    padding-left: 0;
    margin: 18px 0 0;
    gap: 14px;
  }
  .nav-links .lang-switch button { color: var(--white); opacity: 0.65; font-size: 0.95rem; }
  .nav-links .lang-switch button.active { opacity: 1; color: var(--red) !important; }
}

/* ============================================================
   TABS (Quiénes somos / Historia)
   ============================================================ */
.tabs-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  background: var(--paper);
  border-radius: 999px;
  margin: 18px 0 36px;
}
.tab-btn {
  border: none;
  background: transparent;
  padding: 11px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--gray-600);
  cursor: pointer;
  transition: background .3s ease, color .3s ease, box-shadow .3s ease;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active {
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(28,28,27,0.18);
}
.tab-panel {
  animation: tabfade .35s ease;
}
@keyframes tabfade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   TIMELINE (Historia)
   ============================================================ */
.timeline { position: relative; padding-left: 32px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline-item { position: relative; padding-bottom: 44px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: -32px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); }
.timeline-item .year { font-family: var(--font-display); font-weight: 800; color: var(--red); display: block; margin-bottom: 6px; }

/* ============================================================
   PROCESS DETAIL (Procesos page)
   ============================================================ */
.process-detail { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(24px,5vw,70px); align-items: center; padding: clamp(48px,7vw,90px) 0; border-top: 1px solid var(--line); }
.process-detail:first-of-type { border-top: none; }
.process-detail.reverse .placeholder { order: 2; }
.process-detail .placeholder { aspect-ratio: 4/3; min-height: 280px; }
@media (max-width: 860px) { .process-detail { grid-template-columns: 1fr; } .process-detail.reverse .placeholder { order: 0; } }
.process-index { font-family: var(--font-display); font-weight: 800; color: var(--line); font-size: 3.5rem; line-height: 1; margin-bottom: 8px; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px,5vw,70px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-body); font-size: 0.95rem; background: var(--white); color: var(--ink);
  transition: border-color .25s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--red); }
.field textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 0.82rem; color: var(--gray-400); margin-top: 14px; }
.map-frame { border: none; width: 100%; height: 100%; min-height: 420px; display: block; filter: grayscale(0.15); }
.map-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.map-card-small { margin-top: 24px; }
.map-card-small .map-frame { min-height: 190px; }
.contact-info-list { list-style: none; padding: 0; margin: 28px 0 0; }
.contact-info-list li { padding: 16px 0; border-top: 1px solid var(--line); }
.contact-info-list li:first-child { border-top: none; }
.contact-info-list .label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-400); display: block; margin-bottom: 4px; }
.contact-info-list a:hover { color: var(--red); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--white); color: var(--gray-600); padding: 70px 0 30px; border-top: 1px solid var(--line); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 50px; border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-top { grid-template-columns: 1fr; } }
.footer-top .logo { color: var(--ink); }
.footer-col h4 { color: var(--ink); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 18px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: 0.92rem; color: var(--gray-600); }
.footer-col a:hover { color: var(--red); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; font-size: 0.82rem; color: var(--gray-400); flex-wrap: wrap; gap: 12px; }

/* Page hero (interior pages, shorter than home hero) */
.page-hero {
  position: relative; color: var(--white); padding: 190px 0 90px;
  background: linear-gradient(155deg, #2B2B29 0%, #1C1C1B 60%, #171716 100%);
  overflow: hidden;
}
.page-hero h1 { color: var(--white); }
.page-hero .hero-media {
  position: absolute; inset: 0;
}
.page-hero .hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(155deg, rgba(20,20,19,0.5) 0%, rgba(15,15,14,0.58) 60%, rgba(10,10,10,0.64) 100%);
}
.page-hero .container { position: relative; z-index: 1; }
