/* ==========================================================================
   CBA de Monterrey — Landing general
   Mobile-first. Sin dependencias. Tokens al inicio para ajustar la marca.
   ========================================================================== */

:root {
  /* Marca */
  --blue: #016baa;
  --blue-dark: #014f7d;
  --blue-tint: #e8f1f7;
  --carbon: #181919;
  --white: #ffffff;

  /* Neutros */
  --ink: #181919;
  --muted: #565c60;
  --line: #dde3e7;
  --soft: #f3f5f6;

  /* WhatsApp (se conserva su verde reconocible) */
  --wa: #25d366;
  --wa-hover: #1fbe5b;
  --wa-ink: #06301a;

  /* Tipografía */
  --font-display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Layout */
  --max: 1200px;
  --gutter: 1rem;
  --header-h: 64px;
  --radius: 6px;
  --radius-btn: 8px;
}

@media (min-width: 768px) {
  :root { --gutter: 2rem; }
}
@media (min-width: 1024px) {
  :root { --header-h: 76px; }
}

/* Reset ligero ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.on-dark :focus-visible, .hero :focus-visible, .site-footer :focus-visible { outline-color: var(--white); }

.container { width: min(var(--max), 100% - (var(--gutter) * 2)); margin-inline: auto; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--carbon); color: var(--white);
  padding: .75rem 1rem; border-radius: var(--radius-btn); text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Tipografía --------------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: 0; }
h1 { font-size: clamp(2.6rem, 9vw, 4.9rem); line-height: .98; }
h2 { font-size: clamp(2.1rem, 6vw, 3.4rem); line-height: 1; }
h3 { font-size: clamp(1.7rem, 4vw, 2.2rem); line-height: 1.05; }
h4 { font-size: 1.45rem; line-height: 1.1; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 62ch; }
.on-dark .lead, .hero .lead { color: rgba(255, 255, 255, .9); }

.section { padding-block: 3.5rem; }
@media (min-width: 768px) { .section { padding-block: 5rem; } }
.section-head { display: grid; gap: .9rem; margin-bottom: 2rem; max-width: 68ch; }
@media (min-width: 768px) { .section-head { margin-bottom: 2.75rem; } }

/* Botones ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: .6rem 1.35rem;
  border: 2px solid transparent; border-radius: var(--radius-btn);
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn svg { flex: none; width: 1.35em; height: 1.35em; }
.btn-lg { min-height: 58px; padding-inline: 1.75rem; font-size: 1.1rem; }
.btn-sm { min-height: 44px; padding-inline: 1rem; font-size: .95rem; }
.btn-wa { background: var(--wa); color: var(--wa-ink); }
.btn-wa:hover { background: var(--wa-hover); }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-ghost-dark:hover { background: var(--soft); }

.link {
  font-weight: 600; color: var(--blue); text-decoration: underline;
  text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.link:hover { color: var(--blue-dark); }
.on-dark .link { color: var(--white); }

/* Header ------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white); border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 20px rgba(24, 25, 25, .08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: .75rem; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 28px; width: auto; }
@media (min-width: 1024px) { .brand img { height: 36px; } }

.nav { display: none; }
.nav.is-open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--white); border-bottom: 1px solid var(--line);
  padding: .5rem var(--gutter) 1rem;
}
.nav a { display: block; padding: .85rem 0; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); }
.nav li:last-child a { border-bottom: 0; }
.nav a:hover { color: var(--blue); }

.header-actions { display: flex; align-items: center; gap: .5rem; }
.header-actions .btn-wa-full { display: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 46px; height: 46px;
  border-radius: var(--radius-btn); border: 2px solid var(--line); background: var(--white); cursor: pointer;
}
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn-wa { background: var(--wa); border-color: var(--wa); color: var(--wa-ink); }
.icon-btn-wa:hover { background: var(--wa-hover); border-color: var(--wa-hover); }
.menu-toggle .i-close { display: none; }
.menu-toggle[aria-expanded="true"] .i-open { display: none; }
.menu-toggle[aria-expanded="true"] .i-close { display: block; }

@media (min-width: 1024px) {
  .nav, .nav.is-open { display: block; position: static; padding: 0; border: 0; background: transparent; }
  .nav ul { display: flex; gap: 1.75rem; }
  .nav a { padding: .5rem 0; border: 0; font-size: 1rem; }
  .menu-toggle, .icon-btn-wa { display: none; }
  .header-actions .btn-wa-full { display: inline-flex; }
}

/* Hero --------------------------------------------------------------------- */
.hero { background: var(--blue); color: var(--white); overflow: hidden; }
.hero-grid { display: grid; gap: 2.25rem; padding-block: 2.5rem 3rem; }
.hero-copy { display: grid; gap: 1.25rem; align-content: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.hero-actions .btn { flex: 1 1 100%; }
@media (min-width: 640px) { .hero-actions .btn { flex: 0 0 auto; } }
.hero-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1rem; margin-top: 1rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .35); }
.hero-points li { display: flex; gap: .55rem; align-items: flex-start; font-size: .98rem; line-height: 1.3; font-weight: 600; }
.hero-points svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }

.hero-media { display: grid; gap: .5rem; align-content: center; }
.hero-photo { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--blue-dark); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.hero-tile { background: var(--white); color: var(--ink); border-radius: var(--radius); overflow: hidden; }
.hero-tile img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; padding: .5rem; }
.hero-tile span { display: block; padding: .35rem .5rem .5rem; font-size: .85rem; font-weight: 600; line-height: 1.2; }

@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 4rem; padding-block: 4.5rem 5rem; }
  .hero-points { grid-template-columns: repeat(2, auto); justify-content: start; gap: .9rem 2rem; }
  .hero-photo { aspect-ratio: 5 / 4; }
}

/* Única secuencia de entrada de la página (hero) */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .hero-media { animation: rise .6s ease both; }
  .hero-copy > *:nth-child(2) { animation-delay: .06s; }
  .hero-copy > *:nth-child(3) { animation-delay: .12s; }
  .hero-copy > *:nth-child(4) { animation-delay: .18s; }
  .hero-media { animation-delay: .12s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Marcas ------------------------------------------------------------------- */
.brands-strip { padding-block: 1.75rem; border-bottom: 1px solid var(--line); }
.brands-strip .container { display: grid; gap: .75rem; }
.brands-strip p { font-weight: 600; color: var(--muted); }
.brands { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; }
.brands li { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; line-height: 1.4; color: #4b5256; }
@media (min-width: 900px) {
  .brands-strip .container { grid-template-columns: 12rem 1fr; align-items: center; gap: 2rem; }
}

/* Catálogo ------------------------------------------------------------------ */
.chips { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem; margin-bottom: 2.5rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: .4rem 1rem;
  border: 1.5px solid var(--line); border-radius: 999px; font-weight: 600; font-size: .95rem; text-decoration: none; background: var(--white);
}
.chip:hover { border-color: var(--blue); color: var(--blue); }

.family + .family { margin-top: 3.5rem; }
.family-head { display: grid; gap: .4rem; margin-bottom: 1.25rem; padding-top: 1rem; border-top: 3px solid var(--ink); max-width: 70ch; }
.family-head p { color: var(--muted); }

.tiles { display: grid; gap: 1rem; }
@media (min-width: 620px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }

.tile { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.tile-media { display: block; background: var(--soft); border-bottom: 1px solid var(--line); }
.tile-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; padding: .9rem; mix-blend-mode: multiply; }
.tile-body { display: flex; flex-direction: column; gap: .6rem; padding: 1.1rem 1.1rem 1.2rem; flex: 1; }
.tile-body p { font-size: .98rem; color: var(--muted); }
.tile-body .tile-brands { font-size: .88rem; color: var(--ink); }
.tile-brands strong { font-weight: 600; }
.tile-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; margin-top: auto; padding-top: .75rem; }

/* Franja de CTA intermedia --------------------------------------------------- */
.cta-band { background: var(--blue-tint); border-block: 1px solid #cfe0ec; padding-block: 1.75rem; }
.cta-band .container { display: grid; gap: 1rem; }
.cta-band p { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.1; }
@media (min-width: 768px) { .cta-band .container { grid-template-columns: 1fr auto; align-items: center; gap: 2rem; } }

/* ¿No sabes qué equipo necesitas? ------------------------------------------- */
.help { background: var(--carbon); color: var(--white); }
.help-grid { display: grid; gap: 2.25rem; }
.help-copy { display: grid; gap: 1.1rem; align-content: start; }
.help-copy .btn { justify-self: start; margin-top: .5rem; }
.help-list { display: grid; gap: 1rem; align-content: start; padding: 1.5rem; border: 1px solid rgba(255, 255, 255, .25); border-radius: var(--radius); }
.help-list h3 { font-size: 1.5rem; }
.help-list li { display: flex; gap: .65rem; color: #d9e0e4; }
.help-list svg { width: 20px; height: 20px; flex: none; margin-top: .2rem; color: var(--wa); }
@media (min-width: 900px) { .help-grid { grid-template-columns: 1.15fr .85fr; gap: 4rem; align-items: center; } }
@media (max-width: 480px) { .help-copy .btn { justify-self: stretch; } }

/* Soluciones por necesidad ---------------------------------------------------- */
.needs { display: grid; gap: 2rem 2.5rem; }
@media (min-width: 720px) { .needs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .needs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.need { display: flex; flex-direction: column; gap: .7rem; padding-top: 1.1rem; border-top: 3px solid var(--blue); }
.need svg.i-need { width: 34px; height: 34px; color: var(--blue); }
.need p { color: var(--muted); }
.need .btn { align-self: flex-start; margin-top: auto; }
.need-body { display: grid; gap: .6rem; margin-bottom: .5rem; }

/* Nosotros / beneficios ------------------------------------------------------- */
.about { background: var(--soft); border-block: 1px solid var(--line); }
.about-grid { display: grid; gap: 2.5rem; }
.about-copy { display: grid; gap: 1.1rem; align-content: start; }
.about-services { display: grid; gap: .5rem; margin-top: .5rem; }
.about-services h3 { font-size: 1.5rem; }
.about-services li { display: flex; gap: .6rem; }
.about-services svg { width: 20px; height: 20px; flex: none; margin-top: .2rem; color: var(--blue); }
.facts { display: grid; }
.fact { display: grid; gap: .2rem; padding-block: 1.1rem; border-top: 1px solid var(--line); }
.fact:first-child { border-top: 3px solid var(--ink); }
.fact dt { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 1.1; }
.fact dd { color: var(--muted); }
.about-cta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: .75rem; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1fr 1fr; gap: 5rem; } }

/* Cobertura ------------------------------------------------------------------- */
.coverage-grid { display: grid; gap: 2.5rem; }
.coverage-copy { display: grid; gap: 1.1rem; align-content: start; }
.coverage-copy .btn { justify-self: start; margin-top: .5rem; }
.coverage-note { padding: 1rem 1.1rem; border-left: 4px solid var(--blue); background: var(--blue-tint); }
.branches { display: grid; gap: 0; }
.branch { display: grid; gap: .25rem; padding-block: 1.1rem; border-top: 1px solid var(--line); }
.branch:first-child { border-top: 3px solid var(--ink); }
.branch h3 { font-size: 1.5rem; }
.branch p { color: var(--muted); }
.branch-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: .35rem; }
@media (min-width: 900px) { .coverage-grid { grid-template-columns: 1.05fr .95fr; gap: 5rem; } }
@media (max-width: 480px) { .coverage-copy .btn { justify-self: stretch; } }

/* Conversión final --------------------------------------------------------------- */
.final { background: var(--blue); color: var(--white); text-align: left; }
.final-grid { display: grid; gap: 1.5rem; }
.final .lead { color: rgba(255, 255, 255, .92); }
.final-actions { display: grid; gap: 1rem; justify-items: start; margin-top: .5rem; }
.final-number { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 7vw, 3.2rem); line-height: 1; text-decoration: none; }
.final-number:hover { text-decoration: underline; text-underline-offset: 6px; }
@media (min-width: 900px) {
  .final-grid { grid-template-columns: 1.2fr .8fr; align-items: center; gap: 4rem; }
  .final-actions { margin-top: 0; }
}
@media (max-width: 480px) { .final-actions .btn { justify-self: stretch; } }

/* Footer ------------------------------------------------------------------------ */
.site-footer { background: var(--carbon); color: #d3dade; padding-top: 3rem; }
.footer-grid { display: grid; gap: 2rem; padding-bottom: 2.5rem; }
.footer-logo { display: inline-block; justify-self: start; background: var(--white); padding: .6rem .8rem; border-radius: var(--radius); }
.footer-logo img { height: 30px; width: auto; }
.footer-about { display: grid; gap: 1rem; align-content: start; max-width: 34ch; }
.footer-col h3 { font-size: 1.25rem; color: var(--white); margin-bottom: .6rem; }
.footer-col ul { display: grid; gap: .1rem; }
.footer-col a { display: inline-block; padding-block: .35rem; text-decoration: none; }
.footer-col a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.footer-col address { font-style: normal; display: grid; gap: .25rem; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .18); padding-block: 1.25rem; display: grid; gap: .4rem; font-size: .9rem; color: #aeb8be; }
.footer-legal a { color: #d3dade; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 3rem; } }

/* Botón flotante de WhatsApp ------------------------------------------------------ */
.wa-float {
  position: fixed; z-index: 60;
  right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  width: 58px; height: 58px; border-radius: 999px;
  background: var(--wa); color: var(--wa-ink); text-decoration: none; font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
  transition: opacity .2s ease, transform .2s ease, background-color .15s ease;
}
.wa-float:hover { background: var(--wa-hover); }
.wa-float svg { width: 30px; height: 30px; flex: none; }
.wa-float span { display: none; }
.wa-float.is-hidden { opacity: 0; pointer-events: none; transform: translateY(12px); }
@media (min-width: 1024px) {
  .wa-float { width: auto; padding-inline: 1.15rem 1.35rem; height: 56px; }
  .wa-float span { display: inline; }
}

/* Móvil: foto del producto a todo el ancho de la tarjeta, con poco margen interno */
@media (max-width: 619px) {
  .tile-media img { aspect-ratio: 3 / 2; padding: .35rem; }
  .tile-body { padding: 1rem; }
  .tile-actions .btn { flex: 1 1 100%; }
}
