/* Herramientas J&E — sistema de diseño 2026 */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --text: #0e1424;
  --muted: #5a6479;
  --line: #dde2ee;
  --brand: #2446d6;
  --brand-2: #5b7bff;
  --brand-ink: #ffffff;
  --accent: #ff7a1a;
  --shadow: 0 1px 2px rgba(14, 20, 36, .06), 0 12px 32px -12px rgba(14, 20, 36, .18);
  --radius: 20px;
  --maxw: 1200px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0f1c;
    --surface: #121a2e;
    --surface-2: #18223b;
    --text: #eef1fa;
    --muted: #9aa5c0;
    --line: #243050;
    --brand: #6f8bff;
    --brand-2: #9db0ff;
    --brand-ink: #0a0f1c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -14px rgba(0, 0, 0, .6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }
.section { padding-block: clamp(56px, 9vw, 112px); }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.lead { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--brand-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 72px; }
.logo { display: flex; align-items: center; gap: 12px; color: var(--text); font-family: var(--font-display); font-weight: 700; line-height: 1.1; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 1.05rem; letter-spacing: -.04em;
  box-shadow: 0 8px 20px -8px var(--brand);
}
.logo small { display: block; font-family: var(--font); font-weight: 500; font-size: .72rem; color: var(--muted); letter-spacing: .02em; }
.menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.menu a {
  display: block; padding: 8px 14px; border-radius: 999px; color: var(--muted);
  font-size: .95rem; font-weight: 600;
}
.menu a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.menu a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.menu .cta a { background: var(--text); color: var(--bg); margin-left: 6px; }
.menu .cta a:hover { background: var(--brand); color: var(--brand-ink); }
.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; }
.burger span, .burger span::before, .burger span::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; margin: auto; position: relative; transition: .25s;
}
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -6px; } .burger span::after { top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 980px) {
  .burger { display: block; }
  .menu {
    position: absolute; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 20px 20px;
    display: none;
  }
  .menu.open { display: flex; }
  .menu a { padding: 14px 16px; border-radius: 12px; }
  .menu .cta a { margin: 8px 0 0; text-align: center; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 999px;
  font: 700 1rem var(--font); border: 1.5px solid transparent; cursor: pointer; transition: .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 12px 28px -10px var(--brand); }
.btn-primary:hover { background: var(--brand-2); }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(56px, 9vw, 120px) clamp(40px, 6vw, 72px); }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 28%, transparent), transparent);
  z-index: -1; filter: blur(20px);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 30% 20%, #000, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 20%, #000, transparent 70%);
}
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin-top: 20px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-top: 52px; max-width: 760px; }
.stat { padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--surface) 80%, transparent); }
.stat b { display: block; font: 700 2rem var(--font-display); letter-spacing: -.03em; }
.stat span { color: var(--muted); font-size: .9rem; }

/* Carousel */
.carousel { position: relative; border-radius: calc(var(--radius) + 6px); overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.slides { display: flex; transition: transform .7s cubic-bezier(.65, 0, .2, 1); }
.slide { min-width: 100%; margin: 0; }
.slide img { width: 100%; height: auto; aspect-ratio: 1600 / 484; object-fit: cover; }
.c-btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: rgba(14, 20, 36, .7); color: #fff; font-size: 1.3rem; cursor: pointer; transition: .2s;
}
.c-btn:hover { background: var(--brand); }
.c-prev { left: 14px; } .c-next { right: 14px; }
.dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.dots button { width: 10px; height: 10px; border-radius: 99px; border: 0; padding: 0; background: rgba(14, 20, 36, .3); cursor: pointer; transition: .3s; }
.dots button[aria-current="true"] { width: 28px; background: var(--brand); }
@media (max-width: 600px) { .c-btn { display: none; } }

/* Section heads */
.head { max-width: 720px; margin-bottom: 48px; }
.head p { color: var(--muted); }

/* Brands */
.brands { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.brand-card {
  display: flex; flex-direction: column; gap: 10px; padding: 28px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); transition: .25s; position: relative;
}
.brand-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand); }
.brand-card .chip-logo { height: 52px; width: auto; max-width: 150px; background: #fff; border-radius: 10px; padding: 4px 8px; object-fit: contain; border: 1px solid var(--line); }
.brand-card h3 { margin: 6px 0 0; }
.brand-card p { color: var(--muted); font-size: .98rem; margin: 0; flex: 1; }
.tag { align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.tag.alt { background: var(--surface-2); color: var(--muted); }
.brand-card a.more { font-weight: 700; margin-top: 8px; }
.also { margin-top: 28px; color: var(--muted); font-size: .98rem; }

/* Categories (bento) */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.tile {
  position: relative; overflow: hidden; min-height: 260px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); display: flex; align-items: flex-end; color: #fff; isolation: isolate;
}
.tile:hover { text-decoration: none; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s; }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(8, 12, 24, .88), rgba(8, 12, 24, .1) 65%); }
.tile:hover img { transform: scale(1.06); }
.tile div { padding: 24px; width: 100%; }
.tile h3 { margin: 0 0 4px; font-size: 1.4rem; }
.tile span { font-size: .92rem; opacity: .85; }
.tile .go { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .18); backdrop-filter: blur(8px); transition: .25s; padding: 0; width: 40px; }
.tile:hover .go { background: var(--accent); transform: rotate(-45deg); }
.tile:nth-child(1), .tile:nth-child(4) { grid-column: span 3; }
.tile:nth-child(2), .tile:nth-child(3), .tile:nth-child(5), .tile:nth-child(6) { grid-column: span 3; }
@media (min-width: 981px) {
  .tile:nth-child(1) { grid-column: span 3; min-height: 340px; }
  .tile:nth-child(2) { grid-column: span 3; min-height: 340px; }
  .tile:nth-child(3), .tile:nth-child(4), .tile:nth-child(5) { grid-column: span 2; }
  .tile:nth-child(6) { grid-column: span 6; min-height: 200px; }
}
@media (max-width: 680px) { .bento { grid-template-columns: 1fr; } .tile { grid-column: auto !important; min-height: 220px !important; } }

/* About */
.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; }
.about figcaption { position: absolute; left: 14px; bottom: 14px; background: rgba(8, 12, 24, .75); color: #fff; padding: 6px 14px; border-radius: 99px; font-size: .85rem; backdrop-filter: blur(8px); }
.about p { color: var(--muted); }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } }
.mv { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 56px; }
.mv article { padding: 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.mv article:first-child { background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #000)); color: #fff; border: 0; }
.mv article:first-child p { color: rgba(255, 255, 255, .88); }
.mv h3 { font-size: 1.5rem; }
.mv p { margin: 0; color: var(--muted); }

/* Quote */
.quote { text-align: center; padding-block: clamp(48px, 8vw, 96px); background: var(--surface-2); border-block: 1px solid var(--line); }
.quote blockquote { margin: 0 auto; max-width: 22ch; font: 700 clamp(1.8rem, 4.6vw, 3.4rem) / 1.12 var(--font-display); letter-spacing: -.03em; max-width: 26ch; }
.quote cite { display: block; margin-top: 18px; font-style: normal; color: var(--muted); font-size: .95rem; }

/* Map + contact */
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.map iframe { display: block; width: 100%; height: clamp(320px, 45vw, 460px); border: 0; }
.loc { display: grid; grid-template-columns: .8fr 1.2fr; gap: 32px; align-items: stretch; }
@media (max-width: 900px) { .loc { grid-template-columns: 1fr; } }
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.info-list li { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.info-list small { display: block; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 2px; }
.info-list a { color: var(--text); font-weight: 600; }
.info-list a:hover { color: var(--brand); }

/* Category page */
.page-hero { padding-block: clamp(48px, 8vw, 96px) 24px; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--brand); }
.cat { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 900px) { .cat { grid-template-columns: 1fr; } }
.cat figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
.cat figure img { width: 100%; max-height: 640px; object-fit: contain; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.checks li { padding-left: 32px; position: relative; color: var(--muted); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.more-cats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.pill { padding: 10px 18px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; font-size: .95rem; }
.pill:hover { border-color: var(--brand); text-decoration: none; }

/* Contador de visitas */
.visits { margin: 28px 0 0; color: var(--muted); font-size: .95rem; display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); }
.visits-num { font: 700 1.4rem var(--font-display); color: var(--text); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.visits[hidden] { display: none; }
/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 56px 32px; background: var(--surface); }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
@media (max-width: 800px) { .foot { grid-template-columns: 1fr; } }
.foot h4 { margin: 0 0 12px; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { color: var(--text); }
.foot a:hover { color: var(--brand); }
.foot p { color: var(--muted); max-width: 38ch; font-size: .98rem; }
.copy { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Logo J&E */
.logo-img { height: 36px; width: auto; display: block; }
@media (max-width: 1180px) { .logo-img { height: 30px; } }
@media (max-width: 980px) { .logo-img { height: 34px; } }
@media (max-width: 420px) { .logo-img { height: 26px; } }
.site-footer .logo-img { height: 34px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-img { background: #fff; padding: 5px 10px; border-radius: 10px; box-sizing: content-box; }
}

/* Botón flotante de WhatsApp */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; display: inline-flex; align-items: center; gap: 0;
  height: 58px; padding: 0 15px; border-radius: 99px; background: #25d366; color: #fff; font-weight: 700; font-size: .98rem;
  box-shadow: 0 10px 28px -6px rgba(37, 211, 102, .65), 0 2px 6px rgba(0, 0, 0, .2); transition: .3s;
}
.wa-float:hover { text-decoration: none; background: #1ebe5b; transform: translateY(-3px); gap: 10px; }
.wa-float span { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .35s ease; }
.wa-float:hover span, .wa-float:focus-visible span { max-width: 120px; }
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid #25d366; animation: wa-pulse 2.4s ease-out infinite; pointer-events: none;
}
@keyframes wa-pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.35); opacity: 0; } }
@media (max-width: 600px) { .wa-float { right: 14px; bottom: 14px; } }

/* ===== Compatibilidad con navegadores antiguos ===== */
.wrap { width: calc(100% - 40px); max-width: var(--maxw); }

/* Sin color-mix(): colores fijos equivalentes (corrige la tarjeta de Misión, que quedaba sin fondo) */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: var(--bg); }
  .stat { background: var(--surface); }
  .tag { background: rgba(255, 122, 26, .16); }
  .mv article:first-child { background: linear-gradient(135deg, #2446d6, #14257a); }
  .hero::before { background: radial-gradient(closest-side, rgba(36, 70, 214, .25), transparent); }
}

/* Posicionamiento sin la propiedad inset */
.hero::before { top: -20%; right: -10%; }
.hero::after, .tile img, .tile::after, .wa-float::before { top: 0; right: 0; bottom: 0; left: 0; }
@media (max-width: 980px) { .menu { top: 72px; left: 0; right: 0; } }

/* Separaciones con márgenes en lugar de gap en flex (navegadores sin soporte) */
.btn-row { gap: 0; margin: 28px -7px 0; }
.btn-row > * { margin: 7px; }
.more-cats { gap: 0; margin: 8px -5px 0; }
.more-cats > * { margin: 5px; }
.menu { gap: 0; }
.menu li { margin: 0 2px; }
.dots { gap: 0; }
.dots button { margin: 0 4px; }
.brand-card { gap: 0; }
.brand-card > * + * { margin-top: 10px; }
.visits { gap: 0; }
.visits-num { margin-right: 10px; }
.wa-float:hover { gap: 0; }
.wa-float:hover span { margin-left: 10px; }

/* Portada centrada: texto, botones y cifras */
.hero .wrap > .reveal { margin-left: auto; margin-right: auto; text-align: center; }
.hero .lead { margin-left: auto; margin-right: auto; }
.hero .btn-row { justify-content: center; }
.hero .btn { min-width: 340px; justify-content: center; }
.hero .stats { margin-left: auto; margin-right: auto; }
.hero .stat { text-align: center; }
@media (max-width: 600px) { .hero .btn { min-width: 0; width: 100%; padding: 14px 12px; font-size: .92rem; } .hero .btn-row { margin-left: 0; margin-right: 0; } .hero .btn-row > * { margin-left: 0; margin-right: 0; } }