/*
 * Fichas de proyecto: se apoyan en pro/style.css (colores, cabecera, botones, secciones)
 * y añaden lo propio: presentación con captura, pasos con imagen, flujo y decisiones.
 */

/* ---------- Presentación ---------- */
.p-hero { padding: 40px 0 56px; position: relative; overflow: hidden; isolation: isolate; }
.p-hero::before {
  content: ''; position: absolute; z-index: -1; top: -220px; right: -180px; width: 620px; height: 620px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(169, 146, 255, .18), transparent 62%);
}
.back { display: inline-block; margin-bottom: 22px; color: var(--muted); text-decoration: none; font-size: 14.5px; }
.back:hover { color: var(--accent); }
.p-hero h1 { margin: 12px 0 14px; font-size: clamp(30px, 4.6vw, 48px); }
.p-icon { font-size: .9em; }
.p-pitch { max-width: 68ch; color: var(--muted); font-size: 18px; }
.p-hero .cta { margin: 22px 0 18px; }
.p-hero .stack { margin-top: 0; }

/* Captura principal dentro de una ventana de navegador */
.browser {
  margin-top: 38px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
}
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.browser-bar i:nth-child(2) { background: #febc2e; }
.browser-bar i:nth-child(3) { background: #28c840; }
.browser-bar span {
  flex: 1; max-width: 440px; margin-left: 12px; padding: 3px 12px;
  background: var(--bg); border-radius: 999px; color: var(--muted); font: 12.5px var(--font-mono);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

/* Capturas: botones que se amplían al pulsarlos */
.shot { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.shot img { display: block; width: 100%; height: auto; }
.hero-img img { border-radius: 0; }

/* ---------- En pocas palabras ---------- */
.p-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 26px 0 0; }
.p-facts div { padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.p-facts dt { font: 800 30px/1.1 var(--font-head); color: var(--accent); letter-spacing: -.01em; }
.p-facts dd { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.p-sub { margin: 40px 0 14px; font-size: 20px; }
.p-scroll { overflow-x: auto; border-radius: 12px; }
.p-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.p-table th, .p-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.p-table th { color: var(--muted); font: 500 13.5px var(--font); }
.p-table td { font: 700 22px var(--font-head); color: var(--ink); }
.p-table tr:last-child td { border-bottom: 0; }
.p-table.api td { font: 15px var(--font); color: var(--muted); }
.p-table.api td:first-child { width: 70px; }
.p-table.api code { color: var(--ink); font: 14px var(--font-mono); }
.verb { display: inline-block; padding: 2px 8px; border-radius: 6px; font: 700 12px var(--font-mono); background: rgba(74, 222, 128, .15); color: var(--ok); }
.verb.ws { background: rgba(169, 146, 255, .18); color: var(--accent); }

/* ---------- Cómo se usa ---------- */
.steps { display: flex; flex-direction: column; gap: 56px; margin-top: 30px; counter-reset: paso; }
.step { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
.step:nth-child(even) .step-text { order: 2; }
.step.no-shot { grid-template-columns: minmax(0, 1fr); max-width: 72ch; }
.step-n {
  display: inline-block; margin-bottom: 10px; padding: 3px 11px; border-radius: 999px;
  background: rgba(169, 146, 255, .14); color: var(--accent); font: 500 12px var(--font-mono);
}
.step h3 { font-size: 22px; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 16.5px; margin: 0; }
.step p strong { color: var(--ink); }
.step-shot { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
/* Las capturas pequeñas no se estiran más de su tamaño real */
.step-shot.narrow { justify-self: center; width: 100%; }
.step-shot.phone { justify-self: center; width: min(300px, 100%); border-radius: 28px; border: 8px solid #0c0a1c; }

/* ---------- Qué incluye ---------- */
.p-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 26px; }
.p-feature { padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.p-feature span { font-size: 26px; }
.p-feature h3 { margin: 10px 0 6px; }
.p-feature p { margin: 0; color: var(--muted); font-size: 15px; }
.p-extra {
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between;
  margin-top: 24px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(143, 163, 255, .10), rgba(169, 146, 255, .12));
}
.p-extra h3 { margin: 0 0 6px; }
.p-extra p { margin: 0; color: var(--muted); max-width: 64ch; }

/* ---------- Cómo está hecho ---------- */
.p-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px; margin-top: 28px; }
.p-flow li {
  position: relative; padding: 18px; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
}
.p-flow li + li::before {
  content: '→'; position: absolute; left: -28px; top: 50%; transform: translateY(-50%);
  color: var(--accent); font: 700 20px var(--font-head);
}
.p-flow b { display: block; font: 700 16px var(--font-head); color: var(--ink); }
.p-flow span { display: block; margin-top: 6px; color: var(--muted); font-size: 13.5px; }
.p-decisions { display: flex; flex-direction: column; gap: 10px; }
.p-decisions details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.p-decisions summary {
  padding: 15px 18px; cursor: pointer; list-style: none;
  font: 600 16px var(--font-head); color: var(--ink);
}
.p-decisions summary::-webkit-details-marker { display: none; }
.p-decisions summary::before { content: '+'; display: inline-block; width: 20px; color: var(--accent); font-weight: 700; }
.p-decisions details[open] summary::before { content: '−'; }
.p-decisions details p { margin: 0; padding: 0 18px 16px 38px; color: var(--muted); }

/* ---------- Calidad y cómo ejecutarlo ---------- */
.p-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.p-checks li { position: relative; padding-left: 30px; margin-bottom: 12px; color: var(--muted); }
.p-checks li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--ok); font-weight: 700; }
.p-checks strong { color: var(--ink); }
.p-code {
  margin: 0; padding: 18px 20px; overflow-x: auto;
  background: #0c0a1c; border: 1px solid var(--line); border-radius: 12px;
  color: #d9d2ff; font: 13.5px/1.7 var(--font-mono);
}
code { font-family: var(--font-mono); font-size: .92em; }
p code, li code { padding: 1px 6px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 6px; }

/* ---------- Final ---------- */
.p-end { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: center; }
.p-next {
  display: flex; flex-direction: column; gap: 4px; padding: 18px 22px; min-width: 260px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.p-next:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.p-next small { color: var(--accent); font-weight: 600; }
.p-next b { font: 700 18px var(--font-head); }

/* Visor de capturas */
.visor { max-width: min(1280px, 94vw); max-height: 92vh; padding: 0; border: 0; border-radius: 12px; background: transparent; cursor: zoom-out; }
.visor::backdrop { background: rgba(8, 6, 20, .86); }
.visor img { display: block; max-width: 100%; max-height: 92vh; border-radius: 12px; }

@media (max-width: 860px) {
  .step, .step:nth-child(even) { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .step:nth-child(even) .step-text { order: 0; }
  .p-flow { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .p-flow li + li::before { content: '↓'; left: 50%; top: -26px; transform: translateX(-50%); }
  .p-two { grid-template-columns: minmax(0, 1fr); }
  .p-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .p-facts div { padding: 14px; }
  .p-facts dt { font-size: 21px; }
  .p-facts dd { font-size: 13.5px; }
  .p-table th, .p-table td { padding: 10px 10px; }
  .p-table td { font-size: 18px; }
  .p-table.api td { font-size: 14px; }
  .p-table.api code { word-break: break-all; }
  .browser { margin-top: 26px; border-radius: 10px; }
}
