/* ============================================================
   SAPORE — Alimentación Corporativa
   Sistema: gris cálido claro + rojo de marca + tarjetas blancas
   Tipografía: Fraunces (display) + Inter (texto y utilitario)
   ============================================================ */

:root {
  --bg: #e5e5e5;
  --surface: #ffffff;
  --ink: #1e1a19;
  --ink-muted: #5c5652;

  --red: #be1e2d;
  --red-deep: #8f1620;
  --on-red: #f5efea;
  --on-red-muted: rgba(245, 239, 234, 0.78);

  --gold-line: #d8b26a;

  --line: rgba(30, 20, 18, 0.12);
  --line-soft: rgba(30, 20, 18, 0.07);
  --line-on-red: rgba(245, 239, 234, 0.24);

  --font-display: "Fraunces", serif;
  --font-body: "Inter", sans-serif;
  --font-utility: "Inter", sans-serif;

  --container: 1180px;
  --radius: 3px;
  --shadow: 0 20px 45px -20px rgba(30, 20, 18, 0.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

.eyebrow {
  font-family: var(--font-utility);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--red);
  display: inline-block;
}
/* eyebrow variant used on red section backgrounds */
.on-red .eyebrow { color: var(--on-red); }
.on-red .eyebrow::before { background: var(--gold-line); }

button, input, textarea, select { font-family: inherit; font-size: inherit; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px 0;
  transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}
.nav.scrolled {
  background: #be1e2d;
  backdrop-filter: blur(10px);
  padding: 14px 0;
  box-shadow: 0 1px 0 var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; }
.nav-logo img { height: 120px; width: auto; }
.nav-links { display: flex; gap: 40px; align-items: center; }
.nav-links a {
  font-family: var(--font-utility);
  font-weight: 900;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #f5efea;
  transition: color 0.25s ease;
}
.nav-links a:hover { color:#f6f4f4; }
.nav-cta {
  border: 1px solid var(--red);
  padding: 10px 22px;
  color: #e5e5e5;
  border-radius: var(--radius);
  transition: background 0.25s ease, color .25s ease;
  font-weight: 900;
}
.nav-cta:hover { background: var(--red); color: var(--on-red) !important; }

.nav-toggle { display: none; background: none; border: none; color: var(--ink); cursor: pointer; padding: 4px; }
.nav-toggle svg { width: 26px; height: 26px; }

/* ---------- Banner (imagen independiente) ---------- */
.banner-top {
  width: 100%;
  height: 62vh;
  min-height: 380px;
  max-height: 640px;
  overflow: hidden;
}
.banner-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 90px;
  padding-bottom: 90px;
  background: var(--bg);
}
.hero-glow {
  position: absolute;
  top: 50%; right: -10%;
  width: 900px; height: 900px;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(190,30,45,0.10) 0%, rgba(190,30,45,0.04) 40%, rgba(229,229,229,0) 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-ring {
  position: absolute;
  top: 50%; right: 6%;
  width: 560px; height: 560px;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  border-radius: 50%;
  pointer-events: none;
}
.hero-ring::after {
  content: "";
  position: absolute;
  inset: 60px;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
}
.hero .wrap { position: relative; z-index: 2; }
.hero-content { max-width: 720px; }
.hero-content .eyebrow { margin-bottom: 28px; }
.hero h1 {
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.05;
  margin-bottom: 28px;
}
.hero h1 em {
  font-style: italic;
  color: var(--red);
}
.hero-sub {
  font-size: 18px;
  color: var(--ink-muted);
  max-width: 520px;
  margin-bottom: 44px;
}
.hero-actions { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 64px; }

.btn {
  font-family: var(--font-utility);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 16px 32px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.25s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--red); color: var(--on-red); }
.btn-primary:hover { background: var(--red-deep); transform: translateY(-2px); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { border-color: var(--red); color: var(--red); }

.hero-stats {
  display: flex;
  gap: 56px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.hero-stat b {
  font-family: var(--font-display);
  font-size: 32px;
  display: block;
  color: var(--red);
  font-weight: 600;
}
.hero-stat span {
  font-size: 13px;
  color: var(--ink-muted);
}

/* ---------- Section shared ---------- */
section { position: relative; padding: 130px 0; }
.section-head { max-width: 640px; margin-bottom: 72px; }
.section-head h2 { font-size: clamp(32px, 4vw, 48px); margin-top: 20px; color: #8f1620; }
.section-head p { color: var(--ink-muted); margin-top: 20px; font-size: 17px; }

/* ---------- Nosotros (fondo rojo de marca) ---------- */
.about {
  background: var(--red);
  color: var(--on-red);
}
.about .eyebrow { color: var(--on-red); }
.about .eyebrow::before { background: var(--gold-line); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.about-copy h2 { color: var(--on-red) !important; }
.about-copy p { color: var(--on-red-muted); font-size: 17px; margin-bottom: 20px; }
.about-list { list-style: none; padding: 0; margin: 0; }
.about-list li {
  padding: 26px 0;
  border-bottom: 1px solid var(--line-on-red);
  display: flex;
  align-items: baseline;
  gap: 20px;
}
.about-list li:first-child { padding-top: 0; }
.about-list b {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--on-red);
  font-size: 20px;
  flex-shrink: 0;
  width: 130px;
}
.about-list span { color: var(--on-red-muted); font-size: 16px; }

/* ---------- Servicios ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 48px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 28px 55px -22px rgba(30,20,18,0.24); }
.service-icon {
  width: 64px; height: 64px;
  border: 1px solid var(--red);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 28px;
  transition: background 0.3s ease, transform 0.3s ease;
}
.service-card:hover .service-icon { transform: scale(1.06); background: var(--red); }
.service-icon svg { width: 26px; height: 26px; stroke: var(--red); transition: stroke 0.3s ease; }
.service-card:hover .service-icon svg { stroke: var(--on-red); }
.service-card h3 { font-size: 24px; margin-bottom: 14px; }
.service-card p { color: var(--ink-muted); font-size: 15.5px; margin: 0; }

/* ---------- Contacto / Cotización (fondo gris, tarjetas blancas) ---------- */
.contact { background: var(--bg); }
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
}
.panel {
  padding: 56px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel h3 { font-size: 26px; margin-bottom: 10px; }
.panel-desc { color: var(--ink-muted); font-size: 15px; margin-bottom: 36px; }

.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-family: var(--font-utility);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-muted);
  margin-bottom: 10px;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  padding: 10px 2px;
  transition: border-color 0.25s ease;
}
.field select option { background: var(--surface); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--red);
}
.field textarea { resize: vertical; min-height: 90px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

.form-submit {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}
.form-note { font-size: 13px; color: var(--ink-muted); margin-top: 16px; }
.form-status { font-size: 14px; margin-top: 16px; display: none; }
.form-status.ok { color: #2e7d32; display: block; }
.form-status.err { color: var(--red-deep); display: block; }

.info-block { margin-bottom: 30px; }
.info-block .eyebrow { margin-bottom: 12px; }
.info-block p, .info-block a { color: var(--ink); font-size: 16px; }
.info-block .muted { color: var(--ink-muted); font-size: 14px; margin-top: 4px; }

.social-row { display: flex; gap: 14px; margin-top: 30px; }
.social-row a {
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.social-row a:hover { border-color: var(--red); background: var(--red); transform: translateY(-2px); }
.social-row svg { width: 18px; height: 18px; stroke: var(--ink); transition: stroke 0.25s ease; }
.social-row a:hover svg { stroke: var(--on-red); }

/* ---------- Footer (fondo rojo de marca) ---------- */
footer {
  background: var(--red);
  color: var(--on-red);
  padding: 60px 0 30px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-on-red);
  margin-bottom: 26px;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-logo img { height: 26px; filter: brightness(0) invert(1); margin-bottom: 16px; }
.footer-logo p { color: var(--on-red-muted); font-size: 14px; max-width: 280px; }
.footer-cols { display: flex; gap: 70px; }
.footer-col h4 {
  font-family: var(--font-utility);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--on-red);
  margin-bottom: 18px;
}
.footer-col a, .footer-col p {
  display: block;
  color: var(--on-red-muted);
  font-size: 14.5px;
  margin-bottom: 10px;
}
.footer-col a:hover { color: var(--on-red); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  color: var(--on-red-muted);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 50px; }
  .services-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 34px; flex-wrap: wrap; }
  .footer-top { flex-direction: column; }
  .footer-cols { gap: 40px; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .nav-links { position: fixed; top: 0; right: -100%; height: 100vh; width: 78%; max-width: 320px;
    background: var(--surface); flex-direction: column; justify-content: center; align-items: flex-start;
    padding: 40px; gap: 28px; transition: right 0.4s ease; box-shadow: -10px 0 40px rgba(30,20,18,0.12); }
  .nav-links.open { right: 0; }
  .nav-toggle { display: block; }
  .hero-ring, .hero-glow { width: 480px; height: 480px; opacity: 0.6; }
  .banner-top { height: 42vh; min-height: 260px; }
  .field-row { grid-template-columns: 1fr; }
  .panel { padding: 36px 24px; }
  section { padding: 90px 0; }
}
/* ---------- Menú desplegable (Pagos) ---------- */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  cursor: pointer;
}
.nav-dropdown-toggle svg { transition: transform 0.25s ease; }
.nav-dropdown:hover .nav-dropdown-toggle svg,
.nav-dropdown.open .nav-dropdown-toggle svg { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 210px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 50;
}
/* aparece con el cursor encima (desktop) */
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
/* pequeño puente invisible para que no se cierre al mover el mouse hacia el submenú */
.nav-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  height: 12px;
}
.nav-dropdown-menu a {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-utility);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink) !important;
  border-radius: var(--radius);
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover {
  background: var(--red);
  color: var(--on-red) !important;
}

/* En el menú móvil (no hay hover, se abre con el toque/clic) */
@media (max-width: 720px) {
  .nav-dropdown { width: 100%; }
  .nav-dropdown-toggle { width: 100%; justify-content: space-between; }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    display: none;
    padding: 6px 0 0 14px;
    background: transparent;
  }
  .nav-dropdown.open .nav-dropdown-menu { display: flex; }
  .nav-dropdown-menu a { color: var(--ink-muted) !important; padding: 10px 0; }
}
