/* ---------- Tokens: NOX (oscuro, azul) y LUX (claro, fuego) ---------- */
:root, [data-theme="nox"] {
  --bg: #0c0c0d; --surf: #151517; --surf2: #1d1e21; --line: #2b2c30;
  --ink: #ecebe6; --ink2: #a5a39c;
  --acc: #5aa2ff; --acc-fill: #2f8cff; --on-acc: #04101f;
  --soft: rgba(90,162,255,.14); --glow: rgba(47,140,255,.35);
  --ok: #5fd39a; --err: #ff7a6b;
  color-scheme: dark;
}
[data-theme="lux"] {
  --bg: #f5f3ee; --surf: #ffffff; --surf2: #ebe8e1; --line: #dad6cd;
  --ink: #151515; --ink2: #5b5851;
  --acc: #b13c0b; --acc-fill: #ff5a1f; --on-acc: #1a0903;
  --soft: rgba(177,60,11,.10); --glow: rgba(255,90,31,.35);
  --ok: #1d7a4c; --err: #b3261e;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 'Space Grotesk', system-ui, sans-serif;
  transition: background .25s, color .25s;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.muted { color: var(--ink2); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--surf); padding: 8px 12px; border-radius: 8px; }

/* ---------- Header + tabs ---------- */
.top { border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); }
.bar { display: flex; align-items: center; gap: 12px 20px; padding-top: 14px; padding-bottom: 6px; }
.logo { font-weight: 700; letter-spacing: .32em; font-size: 15px; text-decoration: none; margin-right: auto; }
.theme { display: flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--surf2); cursor: pointer; font: 500 11px 'IBM Plex Mono', monospace; letter-spacing: .12em; }
.theme span { padding: 7px 12px; border-radius: 999px; color: var(--ink2); }
[data-theme="lux"] .theme [data-t="lux"], [data-theme="nox"] .theme [data-t="nox"] { background: var(--acc-fill); color: var(--on-acc); }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 13px 16px; font: 500 13px 'IBM Plex Mono', monospace; letter-spacing: .16em; color: var(--ink2); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--ink); border-color: var(--acc-fill); }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-weight: 500; text-decoration: none; transition: transform .1s, opacity .15s; }
.btn:hover { opacity: .88; }
.btn:active { transform: translateY(1px); }
.btn-acc { background: var(--acc-fill); color: var(--on-acc); border-color: var(--acc-fill); }
.btn-ink { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-lg { min-height: 52px; padding: 14px 22px; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: progress; }

/* ---------- Layout general ---------- */
.main { padding-top: 44px; padding-bottom: 72px; min-height: 60vh; }
.stack { display: flex; flex-direction: column; gap: 28px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card { border: 1px solid var(--line); background: var(--surf); border-radius: 14px; }
.pad { padding: 24px; }
.eyebrow { font: 500 12px 'IBM Plex Mono', monospace; letter-spacing: .18em; color: var(--acc); text-transform: uppercase; }
h1, h2, h3 { margin: 0; line-height: 1.05; }
.h-hero { font-size: clamp(40px, 6vw, 68px); font-weight: 700; }
.h-prod { font-size: clamp(48px, 7vw, 76px); letter-spacing: .12em; }
.h-sec { font-size: clamp(30px, 4vw, 44px); }
.lead { font-size: 19px; line-height: 1.6; color: var(--ink2); max-width: 44ch; margin: 0; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.between { justify-content: space-between; align-items: end; }

/* ---------- Inicio ---------- */
.hero { display: grid; gap: 40px; align-items: center; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.shot { padding: 12px; border-radius: 18px; background: var(--surf); border: 1px solid var(--line); box-shadow: 0 40px 80px -30px var(--glow); }
.shot img { border-radius: 10px; width: 100%; height: auto; }
.tile { text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: 14px; border: 1px solid var(--line); background: var(--surf); text-decoration: none; }
.tile .t { font-size: 28px; font-weight: 700; letter-spacing: .1em; }
.tile.hot { background: var(--acc-fill); border-color: var(--acc-fill); color: var(--on-acc); }
.tile.hot .eyebrow, .tile.hot .muted { color: inherit; }
.tile.hot .t { letter-spacing: 0; font-size: 24px; }

/* ---------- Segmentados ---------- */
.seg { display: inline-flex; flex-wrap: wrap; padding: 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--surf); }
.seg button { border: 0; background: transparent; color: var(--ink2); padding: 10px 16px; border-radius: 9px; cursor: pointer; font-weight: 500; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--acc-fill); color: var(--on-acc); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 48px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surf); cursor: pointer; font: 500 13px 'IBM Plex Mono', monospace; letter-spacing: .1em; }
.chip[aria-pressed="true"] { background: var(--acc-fill); border-color: var(--acc-fill); color: var(--on-acc); }

/* ---------- IGNIS ---------- */
.feat { overflow: hidden; display: flex; flex-direction: column; }
.feat img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; height: auto; }
.feat .body { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.feat h3 { font-size: 19px; }
.feat p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink2); }
.detail { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.detail p { margin: 0; line-height: 1.6; }
.inner { padding: 18px; border-radius: 12px; background: var(--bg); }
.specs { width: 100%; border-collapse: collapse; }
.specs th, .specs td { text-align: left; padding: 12px 0; border-top: 1px solid var(--line); vertical-align: top; }
.specs th { font: 500 12px 'IBM Plex Mono', monospace; letter-spacing: .12em; color: var(--ink2); width: 34%; padding-right: 16px; text-transform: uppercase; }

/* ---------- Precios ---------- */
.price { display: flex; flex-direction: column; gap: 12px; padding: 26px; }
.price .amount { font-size: 34px; font-weight: 700; }
.price p { margin: 0; color: var(--ink2); flex: 1; }
.price.main-plan { border-color: var(--acc-fill); box-shadow: 0 0 0 1px var(--acc-fill) inset; }
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 500; }
.faq p { margin: 8px 0 0; color: var(--ink2); }

/* ---------- Sesiones ---------- */
.track { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.ab { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ab button { border: 0; background: transparent; padding: 10px 16px; cursor: pointer; font: 500 13px 'IBM Plex Mono', monospace; letter-spacing: .1em; color: var(--ink2); }
.ab button[aria-pressed="true"] { background: var(--acc-fill); color: var(--on-acc); }
.program { display: grid; gap: 28px; padding: 32px; border-radius: 18px; background: var(--acc-fill); color: var(--on-acc); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.program .eyebrow { color: inherit; }
.program ul { margin: 0; padding-left: 20px; line-height: 1.8; }
.program form { display: flex; flex-direction: column; gap: 10px; background: var(--bg); color: var(--ink); padding: 22px; border-radius: 14px; }

/* ---------- Formularios ---------- */
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink2); }
input:not([type="checkbox"]), textarea, select { padding: 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--surf); color: var(--ink); font-size: 15px; width: 100%; }
textarea { min-height: 84px; resize: vertical; }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-size: 14px; }
label.check input { margin-top: 3px; accent-color: var(--acc-fill); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { margin: 0; min-height: 1.5em; font-size: 14px; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--err); }

dialog { border: 1px solid var(--line); border-radius: 18px; padding: 0; background: var(--surf); color: var(--ink); width: min(460px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
.dlg { display: flex; flex-direction: column; gap: 14px; padding: 28px; position: relative; }
.dlg h2 { font-size: 26px; padding-right: 32px; }
.dlg p { margin: 0; }
.x { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 22px; line-height: 1; }

/* ---------- Pie ---------- */
.foot { border-top: 1px solid var(--line); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; padding-bottom: 32px; font: 13px 'IBM Plex Mono', monospace; color: var(--ink2); }
.foot-in nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-in a { text-decoration: none; }

@media (max-width: 560px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .bar .btn { padding: 10px 12px; font-size: 14px; }
  .theme span { padding: 6px 9px; }
  .main { padding-top: 28px; }
  .program { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Imágenes en Cadena de señal / Estilos */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); overflow: hidden; }
.split-img { width: 100%; height: 100%; min-height: 240px; object-fit: cover; aspect-ratio: 4 / 3; }
.split-body { padding: 28px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.split-body p { margin: 0; line-height: 1.6; }
.wide-img { width: 100%; height: auto; border-top: 1px solid var(--line); }

.navlink { font-size: 14px; text-decoration: none; padding: 10px 4px; white-space: nowrap; }
@media (max-width: 420px) { .navlink { font-size: 13px; padding: 10px 0; } .bar { gap: 10px; } }
.bar .btn { white-space: nowrap; }
@media (max-width: 420px) { .bar .btn { padding: 9px 11px; font-size: 13px; } .logo { letter-spacing: .24em; } }

/* Apoyo (Mercado Pago / PayPal) */
.apoyo { padding: 28px; display: grid; gap: 22px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; border-color: var(--acc); background: linear-gradient(135deg, var(--soft), transparent 70%), var(--surf); }
.apoyo h2 { margin: 0; font-size: clamp(24px, 3vw, 32px); }
.apoyo p { margin: 0; line-height: 1.6; }
.apoyo-opts { display: grid; gap: 12px; }
.apoyo-opt { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surf2); }
.apoyo-val { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.apoyo-val code, .foot-apoyo code { font: 500 15px 'IBM Plex Mono', monospace; color: var(--ink); word-break: break-all; }
.foot-apoyo code { font-size: 13px; }
.btn.copy { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.foot-apoyo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.foot-apoyo .btn.copy { min-height: 26px; padding: 2px 10px; font-size: 12px; }
@media (max-width: 760px) { .apoyo { grid-template-columns: 1fr; padding: 22px; } }

.tabs a[hidden] { display: none; }
