/* =====================================================
   IMPORMED — Sitio institucional
   Paleta inviolable:
   --azul   #0B4F8A  azul médico profundo (principal)
   --celeste#2E9BD6  acento (botones, links, hovers)
   --negro  #0A0A0A  logo y titulares fuertes
   --gris   #F4F6F8  fondos claros
   --blanco #FFFFFF  base
   --verde  #1FA971  SOLO sello ANMAT
   ===================================================== */

:root {
  --azul: #0B4F8A;
  --azul-900: #083d6b;
  --celeste: #2E9BD6;
  --celeste-600: #2487bd;
  --negro: #0A0A0A;
  --gris: #F4F6F8;
  --blanco: #FFFFFF;
  --verde: #1FA971;

  --ink: #16242f;            /* texto cuerpo sobre claro */
  --ink-soft: #5a6b78;       /* texto secundario */
  --line: #e3e8ed;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1200px;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px -12px rgba(11, 79, 138, 0.22);
  --shadow-lg: 0 24px 70px -20px rgba(11, 79, 138, 0.35);
  --header-h: 84px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--blanco);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.02em; font-weight: 800; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

/* ---------- Tipografía utilitaria ---------- */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--celeste);
  margin-bottom: 1rem;
}
.eyebrow.light { color: #9fd2ee; }

.section-title { font-size: clamp(1.75rem, 4vw, 3rem); }
.section-title.dark-title { color: var(--negro); }
.section-lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-soft); max-width: 60ch; }

.section-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); max-width: 760px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .section-lead { margin-inline: auto; }

section { padding-block: clamp(4rem, 9vw, 8rem); position: relative; }

/* =====================================================
   BOTONES
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease, color .25s ease;
  white-space: nowrap;
}
.btn-lg { padding: 1.05rem 2rem; font-size: 1.05rem; }

.btn-wa { background: var(--celeste); color: #fff; box-shadow: 0 8px 24px -8px rgba(46, 155, 214, 0.6); }
.btn-wa:hover { background: var(--celeste-600); transform: translateY(-2px); box-shadow: 0 12px 30px -8px rgba(46, 155, 214, 0.7); }

.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: #fff; transform: translateY(-2px); }

/* =====================================================
   HEADER / NAV
   ===================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: height .35s ease, background .35s ease, box-shadow .35s ease;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  height: 64px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 24px -16px rgba(11, 79, 138, 0.5);
  border-bottom-color: var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; width: 100%; }

.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand-mark { width: 40px; height: 40px; object-fit: contain; }
.brand-word { height: 30px; width: auto; object-fit: contain; transition: height .35s ease; }
.site-header.scrolled .brand-word { height: 26px; }
.site-header.scrolled .brand-mark { width: 34px; height: 34px; }

.nav-links { display: flex; gap: 2rem; margin-left: auto; }
.nav-links a {
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--ink);
  position: relative;
  padding: 0.25rem 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--celeste);
  transition: width .3s ease;
}
.nav-links a:hover { color: var(--azul); }
.nav-links a:hover::after { width: 100%; }

.nav-cta { padding: 0.7rem 1.25rem; font-size: 0.92rem; }

/* Toggle móvil */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 26px; height: 2.5px; background: var(--azul); border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Menú móvil */
.mobile-menu {
  position: fixed;
  top: var(--header-h);
  inset-inline: 0;
  z-index: 99;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem var(--pad) 2rem;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateY(-120%);
  transition: transform .4s cubic-bezier(.4,0,.2,1);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a:not(.btn) { padding: 0.9rem 0; font-weight: 600; border-bottom: 1px solid var(--line); }
.mobile-menu .btn { margin-top: 1rem; justify-content: center; }

/* =====================================================
   HERO
   ===================================================== */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + 2rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,61,107,0.78) 0%, rgba(11,79,138,0.88) 100%),
    radial-gradient(120% 90% at 80% 10%, rgba(46,155,214,0.35), transparent 60%);
}
.hero-content { position: relative; z-index: 1; max-width: 880px; }
.hero-title {
  color: #fff;
  font-size: clamp(2.3rem, 6vw, 4.6rem);
  font-weight: 800;
  margin: 1.25rem 0 1.5rem;
}
.hero-sub {
  color: #dbe9f5;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  max-width: 56ch;
  margin-bottom: 2.25rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Badge ANMAT (único uso del verde) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
}
.badge-anmat {
  background: rgba(31, 169, 113, 0.18);
  color: #fff;
  border: 1.5px solid var(--verde);
}
.badge-anmat svg { color: var(--verde); }

/* =====================================================
   SECCIONES CON FOTO DE FONDO + OVERLAY AZUL
   ===================================================== */
.section-dark { color: #fff; overflow: hidden; }
.section-bg { position: absolute; inset: 0; z-index: 0; }
.section-bg img { width: 100%; height: 100%; object-fit: cover; }
.section-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,79,138,0.92) 0%, rgba(8,61,107,0.95) 100%);
}
.section-dark .container { position: relative; z-index: 1; }
.section-dark .section-title { color: #fff; }

/* NOSOTROS */
.nosotros-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.nosotros-text p { color: #dbe9f5; max-width: 60ch; }
.stats { display: grid; gap: 1.25rem; }
.stat {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  padding: 1.6rem 1.75rem;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.stat-num {
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.stat-num.stat-text { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.stat-check { color: var(--verde); }
.stat-label { display: block; margin-top: 0.5rem; color: #9fd2ee; font-weight: 600; font-size: 0.95rem; }

/* =====================================================
   PRODUCTOS
   ===================================================== */
.productos { background: var(--gris); }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: clamp(3.5rem, 7vw, 5.5rem);
}
.cat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
  display: flex;
  flex-direction: column;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--celeste); }
.cat-img { aspect-ratio: 16 / 10; }
.cat-body { padding: 1.5rem 1.6rem 1.75rem; }
.cat-body h3 { font-size: 1.35rem; color: var(--azul); margin-bottom: 0.5rem; }
.cat-body p { color: var(--ink-soft); font-size: 0.97rem; margin-bottom: 1rem; }
.cat-link { font-weight: 700; color: var(--celeste); font-size: 0.95rem; }
.cat-card:hover .cat-link { color: var(--azul); }

/* Galería de productos */
.gallery-title { font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--negro); margin-bottom: 2rem; }
.prod-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.prod-item { margin: 0; }
.prod-img {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #e9edf1;
}
.prod-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-img:hover img { transform: scale(1.04); }
.prod-img img { transition: transform .5s ease; }
.prod-item figcaption {
  margin-top: 0.7rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  line-height: 1.3;
}

/* Placeholder gris con nombre del producto */
.placeholder {
  background:
    linear-gradient(135deg, #e9edf1 0%, #dde3e9 100%);
  position: relative;
}
.placeholder::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #9aa7b2;
  letter-spacing: 0.01em;
}
/* Si la imagen real carga, tapa el rótulo del placeholder */
.placeholder img { position: relative; z-index: 1; }

.prod-note { text-align: center; margin-top: 2.5rem; color: var(--ink-soft); font-size: 1.05rem; }
.prod-note a { color: var(--celeste); font-weight: 700; }
.prod-note a:hover { color: var(--azul); }

/* =====================================================
   MARCAS
   ===================================================== */
.marcas { background: #fff; padding-bottom: clamp(2rem, 5vw, 4rem); }

.marquee {
  overflow: hidden;
  padding: 1.5rem 0 0.5rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 3.5rem;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee-track span {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: #c4ced7;
  white-space: nowrap;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =====================================================
   CONTACTO
   ===================================================== */
.section-dark-solid { background: var(--azul); color: #fff; }
.section-dark-solid .section-title { color: #fff; }

.contacto-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.contacto-text p { color: #dbe9f5; max-width: 50ch; margin-bottom: 2rem; }

.contacto-data { display: grid; gap: 2rem; }
.data-block {}
.data-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9fd2ee;
  margin-bottom: 0.75rem;
}
.data-label.light { color: #9fd2ee; }
.data-mono { font-family: var(--font-mono); font-size: 1.05rem; color: #eaf3fa; line-height: 1.9; }
.data-mono.light { color: #cfe2f1; font-size: 0.95rem; }
.data-mono a:hover { color: var(--celeste); }
.data-link { display: inline-block; margin-top: 0.75rem; font-weight: 700; color: var(--celeste); }
.data-link:hover { color: #fff; }

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: var(--shadow-lg);
  height: clamp(300px, 42vw, 440px);
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-link {
  display: inline-block;
  margin-top: 1.1rem;
  font-weight: 700;
  color: var(--celeste);
}
.map-link:hover { color: #fff; }

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer { background: var(--azul-900); color: #cfe2f1; padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
/* Los logos tienen fondo claro opaco (#F7F7F7), no transparente:
   en el footer oscuro los presentamos sobre un chip blanco. */
.brand-footer {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
  background: #fff;
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
}
.brand-footer .brand-mark,
.brand-footer .brand-word { mix-blend-mode: multiply; }
.footer-hab { font-size: 0.92rem; color: #9fd2ee; max-width: 32ch; }
.footer-contact .data-mono.light a:hover { color: var(--celeste); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.75rem;
  font-size: 0.88rem;
  color: #8fb4d0;
}
.footer-bottom a { color: #cfe2f1; }
.footer-bottom a:hover strong { color: var(--celeste); }

/* =====================================================
   BOTÓN FLOTANTE WHATSAPP
   ===================================================== */
.wa-float {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 90;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 10px 30px -6px rgba(37, 211, 102, 0.6);
  transition: transform .3s ease, box-shadow .3s ease;
  animation: wa-pulse 2.6s ease-in-out infinite;
}
.wa-float:hover { transform: scale(1.08); box-shadow: 0 14px 36px -6px rgba(37, 211, 102, 0.75); }
@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 10px 30px -6px rgba(37,211,102,0.6), 0 0 0 0 rgba(37,211,102,0.4); }
  50% { box-shadow: 0 10px 30px -6px rgba(37,211,102,0.6), 0 0 0 14px rgba(37,211,102,0); }
}

/* =====================================================
   REVEALS (estado inicial; GSAP los anima)
   ===================================================== */
[data-reveal] { opacity: 0; transform: translateY(32px); will-change: transform, opacity; }
.prod-item { opacity: 0; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 960px) {
  .nosotros-grid, .contacto-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .prod-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 420px) {
  .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
  .btn-lg { width: 100%; justify-content: center; }
  .hero-actions { width: 100%; }
}

/* =====================================================
   ACCESIBILIDAD — prefers-reduced-motion
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal], .prod-item { opacity: 1 !important; transform: none !important; }
  .marquee-track { animation: none; }
  .wa-float { animation: none; }
}
