/* ============================================================================
   X-Mind — Deck de presentación
   Diseño editorial, premium, sin AI slop.
   ============================================================================ */

:root {
  --bg: #faf9f6;
  --bg-elev: #ffffff;
  --ink: #0a0a0a;
  --ink-soft: #4a4a4a;
  --ink-muted: #7d7a72;
  --line: #e6e3dc;
  --line-strong: #c8c4b9;
  --accent: #d54a26;
  --accent-soft: #fbe4d8;
  --good: #0f6e3e;
  --warn: #b8761a;
  --bad: #b53520;
  --font-display: "Inter Tight", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100vh;
}

body {
  display: flex;
  flex-direction: column;
}

/* ── Deck container ───────────────────────────────────────────────────────── */
.deck {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  padding: 6vh 8vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .45s cubic-bezier(.25,.46,.45,.94),
              transform .55s cubic-bezier(.25,.46,.45,.94);
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ── Typography ───────────────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 28px;
}

.eyebrow .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 10px;
  vertical-align: middle;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(56px, 8vw, 112px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--ink);
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 36px;
  max-width: 18ch;
}

h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}

p, li {
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
}

p.lead {
  font-size: clamp(20px, 1.9vw, 26px);
  line-height: 1.45;
  color: var(--ink);
  max-width: 32ch;
  margin-bottom: 32px;
}

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "ss01";
  font-size: 0.92em;
}

strong {
  color: var(--ink);
  font-weight: 600;
}

.accent { color: var(--accent); }
.muted { color: var(--ink-muted); }

/* ── Cover (slide 1) ──────────────────────────────────────────────────────── */
.cover {
  padding: 8vh 8vw;
}
.cover-mark {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cover-mark::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--ink);
  position: relative;
}
.cover-title {
  margin-top: auto;
}
.cover-title h1 {
  font-size: clamp(80px, 11vw, 180px);
  font-weight: 500;
  letter-spacing: -0.055em;
}
.cover-sub {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 32px);
  color: var(--ink-soft);
  margin-top: 20px;
  max-width: 26ch;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.cover-meta {
  margin-top: 14vh;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-size: 14px;
  color: var(--ink-muted);
}
.cover-meta strong { color: var(--ink); font-weight: 500; }

/* ── Layouts genéricos ────────────────────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 6vw;
  align-items: start;
}
.col h2 { margin-bottom: 24px; }
.col p { max-width: 36ch; margin-bottom: 14px; }

.tight { max-width: 50ch; }

/* ── Stat numbers ─────────────────────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 40px;
}
.stat {
  border-top: 1px solid var(--line-strong);
  padding-top: 18px;
}
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(40px, 4.5vw, 60px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.stat .num .unit {
  font-size: 0.4em;
  color: var(--ink-muted);
  margin-left: 4px;
}
.stat .lbl {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 10px;
  line-height: 1.35;
  max-width: 22ch;
}

/* ── Tabla de problemas ───────────────────────────────────────────────────── */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 16px;
}
.problem {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px 28px 24px;
  background: var(--bg-elev);
  position: relative;
}
.problem .tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.problem h3 { margin-bottom: 10px; }
.problem p { font-size: 15px; line-height: 1.5; }
.problem .meta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

/* ── Cascade diagram ──────────────────────────────────────────────────────── */
.cascade {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px;
  max-width: 900px;
}
.cascade-row {
  display: grid;
  grid-template-columns: 80px 1fr 120px;
  align-items: center;
  gap: 24px;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elev);
  transition: transform .3s ease, border-color .3s ease;
}
.cascade-row:hover { border-color: var(--line-strong); transform: translateX(4px); }
.cascade-row .nivel {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent);
}
.cascade-row .desc h3 {
  font-size: 22px;
  margin-bottom: 4px;
}
.cascade-row .desc p {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.4;
}
.cascade-row .pct {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 500;
  color: var(--ink);
  text-align: right;
  letter-spacing: -0.02em;
}
.cascade-row .pct small {
  display: block;
  font-size: 10px;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── Bar chart ────────────────────────────────────────────────────────────── */
.bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 30px;
  max-width: 720px;
}
.bar-row {
  display: grid;
  grid-template-columns: 180px 1fr 80px;
  align-items: center;
  gap: 18px;
  font-size: 15px;
}
.bar-row .lbl { color: var(--ink); font-weight: 500; }
.bar-row .bar-track {
  background: var(--line);
  border-radius: 4px;
  height: 28px;
  position: relative;
  overflow: hidden;
}
.bar-row .bar-fill {
  background: var(--ink);
  height: 100%;
  border-radius: 4px;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.9s cubic-bezier(.25,.46,.45,.94) .15s;
}
.slide.active .bar-row .bar-fill { transform: scaleX(var(--w, 1)); }
.bar-row.accent .bar-fill { background: var(--accent); }
.bar-row.muted .bar-fill { background: var(--line-strong); }
.bar-row .val {
  font-family: var(--font-mono);
  font-size: 15px;
  text-align: right;
  color: var(--ink);
}

/* ── Two-column tabla comparativa ─────────────────────────────────────────── */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.compare-col { padding: 32px 36px; }
.compare-col + .compare-col { border-left: 1px solid var(--line); }
.compare-col.bad { background: #fdf6f4; }
.compare-col.good { background: #f4f8f5; }
.compare-col h3 {
  font-size: 20px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.compare-col.bad h3::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--bad);
  display: inline-block;
}
.compare-col.good h3::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--good);
  display: inline-block;
}
.compare-col ul {
  list-style: none;
  padding: 0;
}
.compare-col li {
  padding: 10px 0;
  font-size: 15px;
  line-height: 1.5;
  border-bottom: 1px dashed var(--line);
}
.compare-col li:last-child { border-bottom: none; }

/* ── Demo terminal ────────────────────────────────────────────────────────── */
.terminal {
  background: #161410;
  color: #ece8df;
  border-radius: 10px;
  padding: 28px 32px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.55;
  margin-top: 32px;
  max-height: 60vh;
  overflow: hidden;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.25);
}
.terminal .prompt { color: #7fb069; }
.terminal .cmd { color: #ece8df; }
.terminal .hl-good { color: #82cf65; }
.terminal .hl-acc { color: #f0a868; }
.terminal .hl-warn { color: #e8b86d; }
.terminal .hl-bad { color: #e87474; }
.terminal .dim { color: #6a655d; }
.terminal table { border-collapse: collapse; }
.terminal th, .terminal td { padding: 4px 16px 4px 0; }
.terminal th { color: #b8b1a4; font-weight: 500; text-align: left; }
.terminal td.right { text-align: right; }

/* ── ROI calculator ──────────────────────────────────────────────────────── */
.roi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 16px;
  align-items: start;
}

.roi-inputs { display: flex; flex-direction: column; gap: 24px; }

.roi-input {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.roi-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.roi-label > span:first-child {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}
.roi-help {
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.roi-control {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 16px;
  align-items: center;
}

.roi-control input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  outline: none;
}
.roi-control input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--ink);
  transition: transform .15s ease;
}
.roi-control input[type=range]::-webkit-slider-thumb:hover {
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.roi-control input[type=range]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
  border: 3px solid var(--bg);
}

.roi-value {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-align: right;
}

.roi-outputs {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 32px;
}

.roi-out-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  font-size: 15px;
}
.roi-out-lbl { color: var(--ink-soft); }
.roi-out-val {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--ink);
  font-size: 17px;
}
.roi-out-val.good { color: var(--good); }
.roi-out-val.muted-val { color: var(--ink-muted); }

.roi-divider {
  height: 1px;
  background: var(--line);
  margin: 10px 0;
}

.roi-highlight {
  text-align: center;
  padding: 22px 0 10px;
  border-radius: 8px;
  margin-top: 6px;
}
.roi-hl-lbl {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.roi-hl-num {
  font-family: var(--font-display);
  font-size: clamp(48px, 5.5vw, 72px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--accent);
}
.roi-hl-sub {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 10px;
}
.roi-hl-sub span {
  color: var(--ink);
  font-weight: 500;
}

.roi-note {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-muted);
  text-align: center;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

@media (max-width: 1100px) {
  .roi-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ── Timeline ─────────────────────────────────────────────────────────────── */
.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 36px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  top: 28px;
  height: 1px;
  background: var(--line-strong);
  z-index: 0;
}
.tl-step {
  text-align: center;
  position: relative;
  padding: 0 12px;
}
.tl-step .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--ink);
  margin: 22px auto 18px;
  position: relative;
  z-index: 1;
}
.tl-step:first-child .dot,
.tl-step:nth-child(2) .dot { background: var(--accent); border-color: var(--accent); }
.tl-step h3 {
  font-size: 17px;
  margin-bottom: 6px;
}
.tl-step .dur {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tl-step p { font-size: 13px; line-height: 1.45; color: var(--ink-muted); }

/* ── Checklist ────────────────────────────────────────────────────────────── */
.checklist {
  margin-top: 28px;
  display: grid;
  gap: 14px;
  max-width: 720px;
}
.checklist li {
  list-style: none;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: var(--bg-elev);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0 6px 6px 0;
  font-size: 16px;
  display: flex;
  gap: 14px;
  align-items: baseline;
}
.checklist li .ix {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
}

/* ── Close slide ──────────────────────────────────────────────────────────── */
.close-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: end;
  height: 100%;
}
.contact { font-size: 17px; line-height: 1.7; }
.contact .label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 14px;
  margin-bottom: 2px;
}
.cta-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--accent);
  transition: color .15s ease;
}
.cta-link:hover { color: var(--accent); }

/* ── Footer / navigation ──────────────────────────────────────────────────── */
.deck-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  background: linear-gradient(to top, var(--bg), rgba(250,249,246,0));
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  z-index: 10;
}
.deck-footer .progress {
  width: 200px;
  height: 2px;
  background: var(--line);
  border-radius: 1px;
  overflow: hidden;
  pointer-events: none;
}
.deck-footer .progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width .5s cubic-bezier(.25,.46,.45,.94);
}
.deck-footer .pager {
  display: flex;
  gap: 14px;
  align-items: center;
}
.deck-footer button {
  pointer-events: auto;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 11px;
  color: var(--ink);
  cursor: pointer;
  transition: background .15s ease;
}
.deck-footer button:hover { background: var(--line); }
.deck-footer button:disabled { opacity: 0.3; cursor: not-allowed; }
.deck-footer .brand { display: flex; align-items: center; gap: 8px; }
.deck-footer .brand .b-dot {
  width: 8px; height: 8px; border-radius: 2px;
  background: var(--ink);
  display: inline-block;
}

/* ── Hint inicial ─────────────────────────────────────────────────────────── */
.hint {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 12px;
  font-family: var(--font-mono);
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
  z-index: 20;
}
.hint.show { opacity: 0.9; }

/* ── Responsivo: laptops pequeños ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .slide { padding: 5vh 6vw; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .two-col, .compare, .close-grid { grid-template-columns: 1fr; gap: 32px; }
  .cascade-row { grid-template-columns: 60px 1fr 90px; padding: 18px 20px; }
  .cascade-row .nivel { font-size: 36px; }
  .timeline { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .timeline::before { display: none; }
}

@media (max-width: 700px) {
  .stats, .problem-grid { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 110px 1fr 50px; font-size: 13px; }
  .deck-footer { padding: 12px 16px; }
  .deck-footer .progress { width: 100px; }
}
