/* MCPTOOLZ — mcptoolz.com */

@font-face {
  font-family: "Chakra Petch";
  src: url("../fonts/chakra-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("../fonts/chakra-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("../fonts/chakra-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #0F131B;
  --panel: #161C27;
  --line: #27303F;
  --text: #E8ECF4;
  --muted: #9AA5B8;
  --brand: #3BC9DB;
  --dj: #4ADE80;    /* DebuggerJ++ */
  --mk: #E8713C;    /* MCPDesk */
  --gw: #8B7BF4;    /* Gateway */
  --display: "Chakra Petch", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- barra superior ---------- */
header.top {
  border-bottom: 1px solid var(--line);
  background: rgba(15, 19, 27, .92);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(6px);
}
.top .wrap {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 64px;
}
.brand {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none; color: var(--text);
  font-family: var(--display); font-weight: 700; font-size: 1.3rem;
  letter-spacing: .04em;
}
.brand img { width: 34px; height: 34px; }
.brand b { color: var(--brand); font-weight: 700; }
nav.main { margin-left: auto; display: flex; gap: .25rem; flex-wrap: wrap; }
nav.main a {
  color: var(--muted); text-decoration: none;
  font-family: var(--display); font-weight: 600; font-size: .95rem;
  padding: .45rem .7rem; border-radius: 6px;
}
nav.main a:hover { color: var(--text); background: var(--panel); }
nav.main a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--brand); border-radius: 6px 6px 0 0; }

/* ---------- hero ---------- */
.hero { padding: 4.5rem 0 3rem; }
.hero h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 7vw, 4.2rem);
  line-height: 1.05; margin: 0 0 1rem;
  letter-spacing: .02em;
  overflow-wrap: break-word;
}
.hero h1 .mark { display: inline-block; vertical-align: -0.08em; width: .92em; height: .92em; margin-right: .18em; }
.hero p.lead { max-width: 46ch; color: var(--muted); font-size: 1.2rem; margin: 0; }
.hero p.lead strong { color: var(--text); font-weight: 600; }

/* ---------- renglones de producto ---------- */
.rows { display: grid; gap: 2.5rem; padding-bottom: 4rem; }

.row {
  display: grid; grid-template-columns: 7fr 5fr; gap: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent, var(--brand));
  border-radius: 14px;
  overflow: hidden;
}
.row.flip { grid-template-columns: 5fr 7fr; }
.row.flip .row-media { order: 2; }

.row-media { position: relative; min-height: 300px; background: #0A0D13; }
.row-media a { display: block; height: 100%; }
.row-media img.shot { width: 100%; height: 100%; object-fit: cover; object-position: top left; }

.row-body { padding: 2.2rem 2.4rem; display: flex; flex-direction: column; gap: .9rem; justify-content: center; }
.row-head { display: flex; align-items: center; gap: .9rem; }
.row-head img { width: 54px; height: 54px; border-radius: 12px; }
.row-head h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.9rem; }
.row-head h2 a { color: var(--text); text-decoration: none; }
.row-head h2 a:hover { color: var(--accent, var(--brand)); }
.row-kind { margin: 0; color: var(--accent, var(--brand)); font-family: var(--display); font-weight: 600; font-size: .98rem; }
.row-body p.desc { margin: 0; color: var(--muted); max-width: 52ch; }
.row-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: .5rem; }

.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--display); font-weight: 600; font-size: .98rem;
  text-decoration: none; border-radius: 8px;
  padding: .55rem 1rem; border: 1px solid var(--line);
  color: var(--text); background: transparent;
}
.btn:hover { border-color: var(--accent, var(--brand)); color: var(--accent, var(--brand)); }
.btn.solid {
  background: var(--accent, var(--brand)); border-color: var(--accent, var(--brand));
  color: #0B0F15; font-weight: 700;
}
.btn.solid:hover { filter: brightness(1.12); color: #0B0F15; }
.btn svg { width: 1.05em; height: 1.05em; fill: currentColor; }

.row.dj { --accent: var(--dj); }
.row.mk { --accent: var(--mk); }
.row.gw { --accent: var(--gw); }

/* ---------- página de producto ---------- */
.product-hero { padding: 3.5rem 0 2rem; display: grid; grid-template-columns: auto 1fr; gap: 1.6rem; align-items: center; }
.product-hero img.picon { width: 96px; height: 96px; border-radius: 20px; }
.product-hero h1 { margin: 0 0 .3rem; font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; }
.product-hero p.tag { margin: 0; color: var(--muted); font-size: 1.15rem; max-width: 56ch; }
.product-actions { display: flex; gap: .7rem; flex-wrap: wrap; padding: .4rem 0 2.2rem; }

section.block { padding: 1.4rem 0 2.4rem; }
section.block h2 {
  font-family: var(--display); font-weight: 700; font-size: 1.5rem;
  margin: 0 0 1.1rem; padding-bottom: .45rem;
  border-bottom: 2px solid var(--accent, var(--brand));
  display: inline-block;
}

.video-frame { position: relative; aspect-ratio: 16 / 9; background: #0A0D13; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-frame .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.video-frame .soon {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: .4rem; padding: 1rem;
}
.video-frame .soon strong { font-family: var(--display); font-size: 1.3rem; }
.video-frame .soon span { color: var(--muted); }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.gallery figure { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.gallery figure:first-child { grid-column: 1 / -1; }
.gallery a { display: block; }
.gallery img { width: 100%; }
.gallery figcaption { padding: .65rem .9rem; color: var(--muted); font-size: .92rem; border-top: 1px solid var(--line); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; padding: 0; margin: 0; list-style: none; }
.features li { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; }
.features li strong { display: block; font-family: var(--display); font-weight: 600; margin-bottom: .25rem; color: var(--accent, var(--brand)); }
.features li span { color: var(--muted); font-size: .98rem; }

.page-dj { --accent: var(--dj); }
.page-mk { --accent: var(--mk); }
.page-gw { --accent: var(--gw); }

/* bloque de reseña/prosa larga */
.prose p { color: var(--muted); max-width: 72ch; }
.prose p strong { color: var(--text); }
.prose .pull {
  border-left: 3px solid var(--accent, var(--brand));
  padding: .2rem 0 .2rem 1.1rem; margin: 1.4rem 0;
  color: var(--text); font-size: 1.15rem; max-width: 60ch;
}

/* documentación de la consola: figura + texto alternados */
.doc-item {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.6rem;
  align-items: center; margin: 0 0 2.4rem;
}
.doc-item:nth-child(even) .doc-fig { order: 2; }
.doc-fig { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.doc-fig a { display: block; }
.doc-fig img { width: 100%; }
.doc-fig figcaption { padding: .6rem .9rem; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }
.doc-txt h3 { font-family: var(--display); font-weight: 600; font-size: 1.25rem; margin: 0 0 .5rem; color: var(--text); }
.doc-txt h3 .badge { font-size: .7rem; color: var(--accent, var(--brand)); border: 1px solid var(--accent, var(--brand)); border-radius: 999px; padding: .1rem .5rem; margin-left: .5rem; vertical-align: middle; font-weight: 600; }
.doc-txt p { color: var(--muted); margin: 0 0 .6rem; }
.doc-txt p strong { color: var(--text); }

.note {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--accent, var(--brand));
  border-radius: 10px; padding: .9rem 1.1rem; color: var(--muted);
  font-size: .95rem; max-width: 72ch;
}

@media (max-width: 760px) {
  .doc-item { grid-template-columns: 1fr; gap: .9rem; }
  .doc-item:nth-child(even) .doc-fig { order: 0; }
}

/* ---------- acerca ---------- */
.about { padding: 3.5rem 0; display: grid; grid-template-columns: 300px 1fr; gap: 2.8rem; align-items: start; }
.about .photo img { border-radius: 18px; border: 1px solid var(--line); }
.about h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 4.5vw, 3rem); margin: 0 0 .4rem; line-height: 1.1; }
.about p.role { color: var(--brand); font-family: var(--display); font-weight: 600; margin: 0 0 1.2rem; font-size: 1.1rem; }
.about .bio p { color: var(--muted); max-width: 64ch; }
.about .bio p strong { color: var(--text); }

.creds { padding: 0; margin: 1rem 0 0; list-style: none; display: grid; gap: .55rem; }
.creds li { padding-left: 1.2rem; position: relative; color: var(--muted); }
.creds li::before { content: ""; position: absolute; left: 0; top: .55em; width: .55em; height: .55em; background: var(--brand); border-radius: 2px; transform: rotate(45deg); }
.creds li strong { color: var(--text); }

.social { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.6rem; }
.social a { display: inline-flex; align-items: center; gap: .5rem; }

/* ---------- mapa de visitas estilo ClustrMaps (discreto) ---------- */
.visitors { display: flex; justify-content: center; padding: 2.2rem 1.25rem .4rem; }
.vismap-box {
  width: 100%; max-width: 440px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden;
}
.vismap-head {
  padding: .5rem .8rem; color: var(--muted);
  font-family: var(--display); font-weight: 600; font-size: .82rem;
  letter-spacing: .02em; border-bottom: 1px solid var(--line);
}
.vismap-head #viscount { color: var(--brand); font-weight: 400; }
.vismap { position: relative; line-height: 0; }
.vismap img { width: 100%; height: auto; display: block; }
.vis-dots { position: absolute; inset: 0; }
.vdot {
  position: absolute; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,90,70,.95), rgba(214,26,26,.78) 60%, rgba(150,0,0,.35) 100%);
  box-shadow: 0 0 6px rgba(230,40,30,.7);
  pointer-events: auto; cursor: default;
}
@media (prefers-reduced-motion: no-preference) {
  .vdot { animation: vpulse 2.6s ease-in-out infinite; }
  @keyframes vpulse { 0%,100% { box-shadow: 0 0 5px rgba(230,40,30,.55);} 50% { box-shadow: 0 0 11px rgba(230,40,30,.9);} }
}
.vis-tip {
  position: absolute; transform: translate(-50%, calc(-100% - 14px));
  background: rgba(11,14,20,.96); border: 1px solid var(--line);
  border-radius: 8px; padding: .4rem .6rem; pointer-events: none;
  z-index: 5; white-space: nowrap; line-height: 1.3; box-shadow: 0 4px 14px rgba(0,0,0,.5);
}
.vis-tip b { display: block; color: var(--text); font-family: var(--display); font-weight: 600; font-size: .9rem; }
.vis-tip span { display: block; color: var(--muted); font-size: .82rem; }
.vis-tip::after {
  content: ""; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%) rotate(45deg);
  width: 9px; height: 9px; background: rgba(11,14,20,.96);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.vis-list { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.3rem; max-width: 900px; }
.vis-chip { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem; color: var(--muted); font-size: .9rem; }
.vis-empty { color: var(--muted); font-size: .95rem; }

/* ---------- pie ---------- */
footer.bottom { border-top: 1px solid var(--line); padding: 2.2rem 0 2.8rem; margin-top: 2rem; color: var(--muted); font-size: .95rem; }
footer.bottom .wrap { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; justify-content: space-between; }
footer.bottom nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
footer.bottom a { color: var(--muted); text-decoration: none; }
footer.bottom a:hover { color: var(--text); }

/* ---------- responsivo ---------- */
@media (max-width: 880px) {
  .top .wrap { flex-wrap: wrap; min-height: 0; padding-top: .6rem; padding-bottom: .6rem; gap: .3rem 1rem; }
  nav.main { margin-left: 0; width: 100%; }
  nav.main a { padding: .4rem .55rem; }
  .hero { padding: 3rem 0 2.2rem; }
  .row, .row.flip { grid-template-columns: 1fr; }
  .row.flip .row-media { order: 0; }
  .row-media { min-height: 220px; max-height: 320px; }
  .row-body { padding: 1.6rem 1.4rem; }
  .product-hero { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about .photo { max-width: 280px; }
  .gallery { grid-template-columns: 1fr; }
}
