/* ============================================================
   MAC — Estilos
   Consume tokens.css. Mobile-first con breakpoint en 860px.
   ============================================================ */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; line-height: var(--lh-tight); font-weight: var(--fw-bold); letter-spacing: -0.01em; }

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

/* ---------- Elementos compartidos ---------- */

.eyebrow {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--sp-3);
}
.eyebrow--onDark { color: #ff9ea1; }

.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Botones ---------- */
.btn {
  --btn-py: 0.7rem; --btn-px: 1.25rem;
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--btn-py) var(--btn-px);
  font-family: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semi);
  border: 1.5px solid transparent; border-radius: var(--radius);
  cursor: pointer; transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn--sm { --btn-py: 0.5rem; --btn-px: 0.9rem; }
.btn .ico { font-size: 1.05em; stroke-width: 2; }

.btn--primary { background: var(--accent); color: var(--white); border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--ghost.btn--onDark { color: var(--white); border-color: rgba(255,255,255,.5); }
.btn--ghost.btn--onDark:hover { border-color: var(--white); background: rgba(255,255,255,.1); }

/* ============ TOPBAR ============ */
.topbar {
  background: var(--black);
  color: var(--mist);
  font-size: var(--fs-xs);
}
.topbar__inner {
  display: flex; align-items: center;
  min-height: 40px;
}
.topbar__contact {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--sp-2) var(--sp-5);
  width: 100%;
}
.topbar__contact li a { display: inline-flex; align-items: center; gap: var(--sp-2); transition: color var(--transition); }
.topbar__contact li a:hover { color: var(--white); }
.topbar__hours { display: inline-flex; align-items: center; gap: var(--sp-2); }
.topbar__contact .ico { color: var(--accent); font-size: 1.1em; }

/* ============ NAVBAR ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5);
  min-height: 84px;
}
.nav__logo img { height: 52px; width: auto; }
.nav__links { display: flex; gap: var(--sp-2); margin-left: auto; }
.nav__links a {
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--graphite);
  border-radius: var(--radius-sm); transition: color var(--transition);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a.is-active { color: var(--accent); font-weight: var(--fw-semi); }

.nav__actions { display: flex; align-items: center; gap: var(--sp-3); }

.nav__toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 0 9px;
  background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer;
}
.nav__toggle span { height: 2px; background: var(--ink); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: clamp(440px, 62vh, 620px);
  display: flex; align-items: center;
  overflow: hidden;
  background: var(--black);
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__video { width: 100%; height: 100%; object-fit: cover; }
.hero__video--mobile { display: none; }
.hero__scrim {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 90% at center, rgba(14,15,17,.78) 0%, rgba(14,15,17,.45) 65%, rgba(14,15,17,.55) 100%);
}
.hero__content {
  position: relative; z-index: 1; color: var(--white);
  padding-block: var(--sp-8); max-width: 720px;
  margin-inline: auto; text-align: center;
}
.hero__title { font-size: var(--fs-3xl); margin-bottom: var(--sp-4); }
.hero__sub { font-size: var(--fs-md); color: rgba(255,255,255,.82); margin: 0 auto var(--sp-6); max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); }
.hero__cta .btn { --btn-py: 0.85rem; --btn-px: 1.6rem; font-size: var(--fs-base); }

/* ============ CARDS DE VALOR ============ */
.values { background: var(--bg-alt); padding-block: var(--sp-8); }
.values__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.vcard {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--sp-6); box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.vcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.vcard__ico { width: 40px; height: 40px; stroke: var(--accent); stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; margin-bottom: var(--sp-4); }
.vcard__title { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.vcard__text { color: var(--text-muted); font-size: var(--fs-sm); margin: 0; }

.vcard--accent { background: var(--accent); border-color: var(--accent); }
.vcard--accent .vcard__ico { stroke: var(--white); }
.vcard--accent .vcard__title { color: var(--white); }
.vcard--accent .vcard__text { color: rgba(255,255,255,.9); }

/* ============ SOBRE NOSOTROS ============ */
.about { padding-block: var(--sp-9); }
.about__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-8);
  align-items: center;
}
.about__media img {
  width: 100%; height: 100%; min-height: 320px;
  object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.about__title { font-size: var(--fs-2xl); margin-bottom: var(--sp-4); }
.about__text { color: var(--text-muted); max-width: 52ch; }
.about__text + .about__text { margin-top: var(--sp-3); }

.about__stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5);
  margin-top: var(--sp-6); padding-top: var(--sp-6);
  border-top: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; justify-content: flex-end; gap: var(--sp-1); }
.stat__num { font-family: var(--font-mono); font-size: var(--fs-md); font-weight: var(--fw-semi); line-height: var(--lh-snug); color: var(--accent); }
.stat__label { font-size: var(--fs-xs); color: var(--text-muted); }

/* ============ MARCAS (IMSA / ROYAL) ============ */
.brands { background: var(--black); padding-block: var(--sp-9); }
.brands__title { color: var(--white); font-size: var(--fs-2xl); max-width: 42ch; margin-bottom: var(--sp-7); }

.brands__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }

.bcard {
  display: block; background: var(--ink); border: 1px solid var(--graphite); border-radius: var(--radius-lg);
  overflow: hidden; transition: transform var(--transition), border-color var(--transition);
}
.bcard:hover { transform: translateY(-3px); border-color: var(--white); }
.bcard__img { width: 100%; aspect-ratio: 752 / 319; object-fit: cover; }
.bcard__body { padding: var(--sp-6); }
.bcard__title { color: var(--white); font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.bcard__text { color: var(--mist); font-size: var(--fs-sm); margin: 0 0 var(--sp-4); max-width: 40ch; }
.bcard__link { color: var(--accent); font-size: var(--fs-sm); font-weight: var(--fw-semi); }

/* ============ LÍNEAS DE PRODUCTO ============ */
.lines { background: var(--bg-alt); padding-block: var(--sp-9); }
.lines__title { font-size: var(--fs-2xl); margin-bottom: var(--sp-3); }
.lines__sub { color: var(--text-muted); max-width: 73ch; margin: 0 0 var(--sp-7); }

.lines__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-5); }

.lcard {
  flex: 0 1 calc((100% - 2 * var(--sp-5)) / 3);
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.lcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.lcard__media { background: var(--white); aspect-ratio: 4 / 3; display: grid; place-items: center; padding: var(--sp-5); border-bottom: 1px solid var(--border); }
.lcard__media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lcard__body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2); }
.lcard__title { font-size: var(--fs-md); }
.lcard__text { color: var(--text-muted); font-size: var(--fs-sm); margin: 0; }
.lcard__link { color: var(--accent); font-size: var(--fs-sm); font-weight: var(--fw-semi); margin-top: var(--sp-1); }

/* ============ CATÁLOGO EN CONSTRUCCIÓN ============ */
.construction { padding-block: var(--sp-9); min-height: 60vh; display: flex; align-items: center; }
.construction__inner { max-width: 640px; margin-inline: auto; text-align: center; }
.construction__ico { width: 48px; height: 48px; stroke: var(--accent); stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; margin: 0 auto var(--sp-5); }
.construction__title { font-size: var(--fs-2xl); margin-bottom: var(--sp-4); }
.construction__text { color: var(--text-muted); margin: 0 auto var(--sp-6); max-width: 53ch; }
.construction__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); }

/* ============ POR QUÉ ELEGIRNOS + CTA ============ */
.why-cta { background: var(--accent); padding-block: var(--sp-9); }
.why-cta__title { color: var(--white); font-size: var(--fs-2xl); max-width: 46ch; margin-bottom: var(--sp-6); }

.why-cta__list { max-width: 62ch; display: flex; flex-direction: column; gap: var(--sp-4); margin-bottom: var(--sp-7); }
.why-cta__item {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  font-size: var(--fs-md); color: var(--white);
}
.why-cta__check {
  flex-shrink: 0; width: 22px; height: 22px; margin-top: 2px;
  fill: none; stroke: var(--white); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.why-cta__action {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5);
  padding-top: var(--sp-6); border-top: 1px solid rgba(255,255,255,.25);
}
.why-cta__action-text { color: rgba(255,255,255,.88); font-size: var(--fs-md); margin: 0; max-width: 40ch; }

.btn--onDark { background: var(--white); color: var(--accent); border-color: var(--white); flex-shrink: 0; }
.btn--onDark:hover { background: rgba(255,255,255,.9); }

/* ============ FOOTER ============ */
.footer { background: var(--black); color: var(--mist); padding-top: var(--sp-9); }
.footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1.3fr 1fr; gap: var(--sp-6);
  padding-bottom: var(--sp-8);
}

.footer__logo { height: 64px; width: auto; margin-bottom: var(--sp-4); }
.footer__tagline { font-size: var(--fs-sm); color: var(--mist); white-space: nowrap; margin: 0; }

.footer__heading { color: var(--white); font-size: var(--fs-sm); font-weight: var(--fw-semi); margin-bottom: var(--sp-4); }

.footer__links { display: flex; flex-direction: column; gap: var(--sp-3); font-size: var(--fs-sm); }
.footer__links li { display: flex; align-items: flex-start; gap: var(--sp-2); }
.footer__links a { display: inline-flex; align-items: flex-start; gap: var(--sp-2); transition: color var(--transition); }
.footer__links a:hover { color: var(--white); }
.footer__links .ico { color: var(--accent); flex-shrink: 0; margin-top: 0.15em; }
.footer__links--static li { color: var(--mist); }

.footer__bottom { border-top: 1px solid var(--graphite); }
.footer__bottom-inner { padding-block: var(--sp-4); }
.footer__bottom p { margin: 0; font-size: var(--fs-xs); color: var(--slate); }

/* ============ WHATSAPP FLOTANTE ============ */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25d366; box-shadow: var(--shadow-lg);
  transition: transform var(--transition);
}
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; fill: var(--white); }

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 860px) {
  .topbar { display: none; }

  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: var(--sp-2);
    display: none;
  }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a { padding: var(--sp-3); border-radius: var(--radius-sm); }
  .nav__toggle { display: flex; }
  .nav__inner { min-height: 72px; }
  .nav__logo img { height: 42px; }

  .hero__video--desktop { display: none; }
  .hero__video--mobile { display: block; }
  .hero__scrim { background: linear-gradient(180deg, rgba(14,15,17,.55) 0%, rgba(14,15,17,.8) 100%); }
  .hero { min-height: clamp(480px, 80vh, 640px); }
  .hero__title { font-size: var(--fs-2xl); }

  .values__grid { grid-template-columns: 1fr; }

  .about__grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .about__media img { min-height: 240px; }
  .about__stats { grid-template-columns: 1fr; gap: var(--sp-4); }

  .brands__grid { grid-template-columns: 1fr; }

  .lcard { flex-basis: 100%; }

  .why-cta__action { flex-direction: column; align-items: flex-start; }

  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-7) var(--sp-5); }
  .footer__brand { grid-column: 1 / -1; }

  .footer__links--nav { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0; row-gap: var(--sp-2); }
  .footer__links--nav li:not(:last-child)::after { content: "·"; margin: 0 var(--sp-2); color: var(--graphite); }
}

@media (min-width: 861px) and (max-width: 1080px) {
  .lcard { flex-basis: calc((100% - var(--sp-5)) / 2); }
  .topbar { display: none; }
}

@media (max-width: 460px) {
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { justify-content: center; }

  .footer__grid { grid-template-columns: 1fr; }
}
