/* =============================================================
   SISG — Inicio v2 (home rediseñada)
   Porteo a clases del rediseño _/web/sisg-home.html, que traía todos los
   estilos inline. Paleta: navy profundo #0f2438 · navy #1b4165 ·
   lima #a3c433 · claro #f4f6f8.

   El diseño original no tenía reglas responsive: las media queries del
   final son propias.
   ============================================================= */

/* ── Fuentes (self-hosted, variables, subset latin) ───────────
   Oswald y Archivo vienen embebidas en el bundle del diseño como fuentes
   variables de Google: un solo archivo por familia cubre todos los pesos
   que se usan. SIL OFL, el self-hosting está permitido. */
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../fonts/oswald-var.woff2') format('woff2');
}

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/archivo-var.woff2') format('woff2');
}

:root {
  --v2-navy-deep: #0f2438;
  --v2-navy:      #1b4165;
  --v2-lime:      #a3c433;
  --v2-lime-soft: #c2df5a;
  --v2-lime-dark: #7fa01f;
  --v2-light:     #f4f6f8;
  --v2-muted:     #c5d3e0;
  --v2-line:      #2f5478;
  --v2-card:      #163150;
  --v2-text-dark: #3d4f61;
  --v2-num:       #b9c6d2;
  --v2-hairline:  #d5dde5;
  --v2-oswald:    'Oswald', Impact, 'Arial Narrow', sans-serif;
  --v2-archivo:   'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--v2-navy-deep);
  color: var(--v2-light);
  font-family: var(--v2-archivo);
  -webkit-font-smoothing: antialiased;
  line-height: 1.4;
}

a { color: var(--v2-lime); }
a:hover { color: var(--v2-lime-soft); }

h1, h2, h3 {
  font-family: var(--v2-oswald);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .01em;
  margin: 0;
}

img { max-width: 100%; }

@keyframes v2-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes v2-spin    { to { transform: rotate(360deg); } }

/* ── Header ─────────────────────────────────────────────────── */
.v2-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 5vw;
  background: #fff;
  color: var(--v2-navy);
  border-bottom: 4px solid var(--v2-lime);
}

.v2-header__logo { display: block; line-height: 0; }
.v2-header__logo img { height: 34px; width: auto; }

.v2-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-family: var(--v2-oswald);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.v2-nav a { color: var(--v2-navy); text-decoration: none; transition: color .2s; }
.v2-nav a:hover, .v2-nav a.is-active { color: var(--v2-lime-dark); }

.v2-btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: var(--v2-lime);
  color: var(--v2-navy-deep);
  font-family: var(--v2-oswald);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.v2-btn-wa:hover { background: var(--v2-navy); color: #fff; }

.v2-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 1px solid var(--v2-hairline);
  cursor: pointer;
  color: var(--v2-navy);
}
.v2-burger > span { display: flex; flex-direction: column; gap: 5px; }
.v2-burger > span > span { display: block; width: 22px; height: 2px; background: currentColor; }

/* ── Hero ───────────────────────────────────────────────────── */
.v2-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: 72px 5vw 64px;
  min-height: 560px;
  background: var(--v2-navy-deep);
}

.v2-hero__skew {
  position: absolute;
  right: -6vw;
  top: -10%;
  width: 44vw;
  height: 130%;
  background: var(--v2-navy);
  transform: skewX(-10deg);
  z-index: 0;
}
.v2-hero__skew--lime { top: auto; bottom: -10%; width: 12vw; height: 60%; background: var(--v2-lime); }

.v2-hero__body { position: relative; z-index: 1; }

.v2-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border: 1px solid var(--v2-line);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--v2-muted);
}
.v2-pill::before { content: ""; width: 8px; height: 8px; background: var(--v2-lime); flex: none; }

.v2-hero h1 {
  font-size: clamp(56px, 7vw, 104px);
  line-height: .94;
  margin: 22px 0 20px;
  text-wrap: balance;
}
.v2-hero h1 span { color: var(--v2-lime); }

.v2-hero__text {
  max-width: 50ch;
  font-size: 18px;
  line-height: 1.55;
  color: var(--v2-muted);
  margin: 0;
}

.v2-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.v2-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  font-family: var(--v2-oswald);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.v2-btn--lime    { background: var(--v2-lime); color: var(--v2-navy-deep); }
.v2-btn--lime:hover { background: var(--v2-lime-soft); color: var(--v2-navy-deep); }
.v2-btn--outline { border: 1px solid var(--v2-light); color: var(--v2-light); }
.v2-btn--outline:hover { background: var(--v2-light); color: var(--v2-navy-deep); }
.v2-btn--navy    { background: var(--v2-navy); color: #fff; }
.v2-btn--navy:hover { background: var(--v2-navy-deep); color: #fff; }

.v2-hero__pics {
  position: relative;
  z-index: 1;
  height: 520px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
}
.v2-hero__pic { background: #fff; padding: 18px; overflow: hidden; min-height: 0; }
.v2-hero__pic--main { grid-row: 1 / 3; padding: 24px; box-shadow: 0 30px 60px rgba(0, 0, 0, .45); }
.v2-hero__pic img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* ── Cinta de rubros ────────────────────────────────────────── */
.v2-ticker { overflow: hidden; background: var(--v2-lime); color: var(--v2-navy-deep); }
.v2-ticker__track {
  display: flex;
  width: max-content;
  animation: v2-marquee 28s linear infinite;
  font-family: var(--v2-oswald);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 12px 0;
}
.v2-ticker__set { display: flex; gap: 40px; padding-right: 40px; }

/* ── Más vendidos ───────────────────────────────────────────── */
.v2-mv { padding: 80px 5vw 72px; background: var(--v2-navy-deep); }

.v2-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
}

.v2-eyebrow {
  display: block;
  font-family: var(--v2-oswald);
  font-size: 14px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--v2-lime);
}
.v2-eyebrow--dark { color: var(--v2-lime-dark); }

.v2-h2 { font-size: clamp(44px, 5.5vw, 76px); line-height: .95; margin-top: 8px; }

.v2-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--v2-line);
  padding-bottom: 18px;
}

.v2-tab {
  cursor: pointer;
  padding: 10px 16px;
  font-family: var(--v2-oswald);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1px solid var(--v2-line);
  background: transparent;
  color: var(--v2-muted);
  transition: all .2s;
}
.v2-tab:hover { border-color: var(--v2-lime); }
.v2-tab.is-active { border-color: var(--v2-lime); background: var(--v2-lime); color: var(--v2-navy-deep); }
.v2-tab__count { margin-left: 10px; font-size: 12px; opacity: .65; }

.v2-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
.v2-grid[hidden] { display: none; }

.v2-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--v2-card);
  border: 1px solid var(--v2-line);
  overflow: hidden;
}
.v2-card:hover { border-color: var(--v2-lime); }

.v2-card__img { position: relative; height: 230px; background: #fff; padding: 16px; overflow: hidden; }
.v2-card__img img { display: block; width: 100%; height: 100%; object-fit: contain; }

.v2-card__rank {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  background: var(--v2-lime);
  color: var(--v2-navy-deep);
  font-family: var(--v2-oswald);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .08em;
}

.v2-card__body { display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 18px; flex: 1; }
.v2-card__marca { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--v2-lime); }
.v2-card h3 { font-size: 21px; line-height: 1.1; text-transform: none; letter-spacing: 0; font-weight: 600; }

/* ── Rubros ─────────────────────────────────────────────────── */
.v2-rubros { background: var(--v2-light); color: var(--v2-navy-deep); padding: 80px 5vw; }

.v2-rubros__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 48px;
  align-items: start;
}

.v2-rubros__intro { position: sticky; top: 96px; }
.v2-rubros h2 { font-size: clamp(44px, 5vw, 72px); line-height: .95; margin: 8px 0 18px; color: var(--v2-navy); }
.v2-rubros__text { font-size: 16px; line-height: 1.55; color: var(--v2-text-dark); max-width: 36ch; margin: 0 0 24px; }
.v2-rubros__gear { animation: v2-spin 18s linear infinite; transform-origin: 50% 50%; }

.v2-rubros__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2px;
  background: var(--v2-navy);
  border: 2px solid var(--v2-navy);
}

.v2-rubro {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 220px;
  padding: 22px;
  background: var(--v2-light);
  color: var(--v2-navy-deep);
  text-decoration: none;
}
.v2-rubro:hover { background: var(--v2-lime); color: var(--v2-navy-deep); }
.v2-rubro__num { font-family: var(--v2-oswald); font-weight: 700; font-size: 48px; line-height: 1; color: var(--v2-num); }
.v2-rubro h3 { font-size: 24px; line-height: 1.05; margin-top: auto; color: var(--v2-navy); }
.v2-rubro__detalle { font-size: 13px; line-height: 1.45; color: var(--v2-text-dark); }

/* ── Marcas ─────────────────────────────────────────────────── */
.v2-marcas { background: var(--v2-light); color: var(--v2-navy-deep); padding: 0 5vw 80px; }

.v2-marcas__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding-top: 40px;
  border-top: 2px solid var(--v2-navy);
}
.v2-marcas h2 { font-size: clamp(36px, 4vw, 56px); line-height: .95; margin-top: 8px; color: var(--v2-navy); }
.v2-marcas__text { max-width: 40ch; margin: 0; font-size: 15px; line-height: 1.5; color: var(--v2-text-dark); }

.v2-logos {
  overflow: hidden;
  padding: 20px 0;
  border-top: 1px solid var(--v2-hairline);
  border-bottom: 1px solid var(--v2-hairline);
}
.v2-logos__track { display: flex; width: max-content; animation: v2-marquee 70s linear infinite; }
.v2-logos:hover .v2-logos__track { animation-play-state: paused; }
.v2-logos__set { display: flex; align-items: center; gap: 72px; padding-right: 72px; }
.v2-logos__set img { display: block; height: 84px; width: auto; max-width: 220px; object-fit: contain; }

/* ── Contacto ───────────────────────────────────────────────── */
.v2-contacto {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  background: var(--v2-navy-deep);
}

.v2-contacto__cta { padding: 80px 5vw; background: var(--v2-lime); color: var(--v2-navy-deep); }
.v2-contacto__cta h2 { font-size: clamp(44px, 5vw, 72px); line-height: .95; }
.v2-contacto__cta p { max-width: 44ch; font-size: 17px; line-height: 1.5; margin: 18px 0 28px; }

.v2-contacto__aside { display: grid; grid-template-rows: 1fr auto; min-width: 0; }

.v2-contacto__foto { position: relative; display: block; min-height: 260px; }
.v2-contacto__foto img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.v2-contacto__datos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 28px 5vw 28px 32px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--v2-muted);
  overflow-wrap: anywhere;
}
.v2-contacto__datos a { color: inherit; text-decoration: none; }
.v2-contacto__datos a:hover { color: var(--v2-lime); }
.v2-contacto__label {
  display: block;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--v2-lime);
  margin-bottom: 4px;
}

/* ── Footer ─────────────────────────────────────────────────── */
.v2-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding: 22px 5vw;
  background: #fff;
  color: var(--v2-text-dark);
  font-size: 12px;
}
.v2-footer img { height: 22px; width: auto; }
.v2-footer__copy { margin-left: auto; }

/* ── Aparición al scrollear ─────────────────────────────────── */
/* Sólo con JS (.js en <html>): sin él todo se ve de entrada. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity .6s cubic-bezier(.2, .7, .2, 1),
    transform .6s cubic-bezier(.2, .7, .2, 1),
    border-color .2s,
    background .2s;
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .v2-rubros__gear { animation: none; }
  .v2-ticker__track, .v2-logos__track { animation: none; width: auto; flex-wrap: wrap; }
  .v2-ticker__set:last-child, .v2-logos__set[aria-hidden] { display: none; }
}

/* ── Responsive (propio: el diseño no lo traía) ─────────────── */
@media (max-width: 960px) {
  .v2-hero { grid-template-columns: 1fr; gap: 32px; padding: 56px 5vw 48px; min-height: 0; }
  .v2-hero__skew { display: none; }
  .v2-hero__pics { height: 420px; }
  .v2-rubros { padding: 64px 5vw; }
  .v2-rubros__grid { grid-template-columns: 1fr; gap: 32px; }
  .v2-rubros__intro { position: static; }
  .v2-contacto { grid-template-columns: 1fr; }
  .v2-contacto__cta { padding: 56px 5vw; }
  .v2-contacto__foto { min-height: 220px; }
  .v2-contacto__datos { padding: 24px 5vw; }
}

@media (max-width: 900px) {
  .v2-header { gap: 14px; }
  .v2-btn-wa { margin-left: auto; padding: 10px 14px; }
  .v2-burger { display: inline-flex; }
  .v2-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 6px 5vw 14px;
    background: #fff;
    border-bottom: 4px solid var(--v2-lime);
    box-shadow: 0 16px 30px rgba(15, 36, 56, .18);
  }
  .v2-nav.is-open { display: flex; }
  .v2-nav a { padding: 12px 0; border-bottom: 1px solid #e3e8ee; }
  .v2-nav a:last-child { border-bottom: 0; }
}

@media (max-width: 600px) {
  .v2-btn-wa span { display: none; }
  .v2-btn-wa { padding: 12px; }
  .v2-hero h1 { font-size: clamp(44px, 13vw, 64px); }
  .v2-hero__text { font-size: 16px; }
  .v2-hero__pics { height: 340px; gap: 8px; }
  .v2-hero__pic { padding: 12px; }
  .v2-btn { width: 100%; justify-content: center; }
  .v2-mv { padding: 56px 5vw 48px; }
  .v2-h2 { font-size: clamp(38px, 11vw, 56px); }
  .v2-tab { padding: 8px 12px; font-size: 13px; }
  .v2-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .v2-card__img { height: 170px; padding: 10px; }
  .v2-card h3 { font-size: 17px; }
  .v2-ticker__track { font-size: 15px; }
  .v2-logos__set { gap: 40px; padding-right: 40px; }
  .v2-logos__set img { height: 56px; max-width: 150px; }
  .v2-contacto__datos { grid-template-columns: 1fr; }
  .v2-footer__copy { margin-left: 0; }
}
