/* Guía de uso de Beat One Stage (beatonestage.com/guia/): los colores y letras de la app.
   Cada apartado se numera como un compás del contador: «07 | Ensayar». */
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url(../fonts/space-grotesk-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url(../fonts/space-grotesk-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(../fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(../fonts/inter-latin-600-normal.woff2) format("woff2"); }

:root {
  --bg: #0d0d10; --panel: #16161b; --line: #26262d; --ink: #f4f4f5; --soft: #d4d4d8; --muted: #a1a1aa;
  --green: #4ade80; --dot: #5b5b63; --amber: #fbbf24; --blue: #60a5fa;
  --display: "Space Grotesk", system-ui, sans-serif; --text: "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--soft); font: 400 17px/1.65 var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--green); text-underline-offset: 3px; }
b, strong { color: var(--ink); font-weight: 600; }
kbd { font: 600 13px/1 var(--text); color: var(--ink); background: #222229; border: 1px solid #34343c; border-bottom-width: 2px; border-radius: 6px; padding: 3px 7px; white-space: nowrap; }
code { font-size: .9em; background: #1d1d23; border-radius: 5px; padding: 1px 6px; color: var(--ink); }

/* Barra de arriba */
.top { position: sticky; top: 0; z-index: 10; background: rgba(13,13,16,.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top .in { max-width: 1240px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 18px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo .d { display: flex; align-items: center; gap: 5px; }
.logo .d i { width: 7px; height: 7px; border-radius: 50%; background: var(--dot); }
.logo .d i:first-child { width: 12px; height: 12px; background: var(--green); }
.logo b { font: 500 19px/1 var(--display); color: var(--ink); white-space: nowrap; }
.logo b span { color: #8a8a93; }
.top .what { color: var(--muted); font-size: 15px; border-left: 1px solid var(--line); padding-left: 18px; }
.top .go { margin-left: auto; background: var(--green); color: #06210f; font: 600 15px/1 var(--text); text-decoration: none; padding: 11px 18px; border-radius: 10px; white-space: nowrap; }

/* Cuerpo: índice a la izquierda y el texto */
.page { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; }
.toc { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; padding: 40px 0 24px; }
.toc p { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: grid; grid-template-columns: 30px 1fr; align-items: baseline; gap: 6px; padding: 6px 10px; border-radius: 8px; color: var(--soft); text-decoration: none; font-size: 15px; line-height: 1.35; }
.toc a span { font: 700 13px/1 var(--display); color: var(--dot); font-variant-numeric: tabular-nums; }
.toc a:hover { background: #18181d; color: var(--ink); }
.toc a.on { background: #15231b; color: var(--ink); }
.toc a.on span { color: var(--green); }

main { padding: 40px 0 96px; min-width: 0; max-width: 880px; }
.hero h1 { font: 700 clamp(40px, 6vw, 64px)/1.02 var(--display); letter-spacing: -.025em; color: var(--ink); margin: 6px 0 18px; }
.hero .lead { font-size: 20px; line-height: 1.55; color: var(--soft); max-width: 62ch; margin: 0; }
.hero .meta { color: var(--muted); font-size: 14px; margin: 18px 0 0; }

/* El paso a paso de la portada de la guía */
.flow { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.flow li { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 18px; }
.flow li a { color: inherit; text-decoration: none; display: block; }
.flow b { display: block; font: 600 17px/1.25 var(--display); margin: 10px 0 6px; }
.flow span { font-size: 14.5px; line-height: 1.5; color: var(--muted); display: block; }
.flow .beat { display: flex; gap: 5px; }
.flow .beat i { width: 9px; height: 9px; border-radius: 50%; background: var(--dot); }
.flow li:nth-child(1) .beat i:nth-child(1), .flow li:nth-child(2) .beat i:nth-child(2), .flow li:nth-child(3) .beat i:nth-child(3), .flow li:nth-child(4) .beat i:nth-child(4) { background: var(--green); }

/* Cada apartado: «07 | Título», como compás | tiempo */
section { padding-top: 64px; }
h2 { display: flex; align-items: center; gap: 16px; font: 700 clamp(28px, 3.4vw, 38px)/1.1 var(--display); letter-spacing: -.02em; color: var(--ink); margin: 0 0 18px; }
h2 .n { color: var(--green); font-variant-numeric: tabular-nums; }
h2 .n::after { content: ""; display: inline-block; width: 3px; height: .85em; margin-left: 16px; background: #3a3a42; border-radius: 2px; vertical-align: -.08em; }
h3 { font: 600 21px/1.3 var(--display); color: var(--ink); margin: 34px 0 8px; }
p { margin: 0 0 14px; }
ul.steps, ol.steps { margin: 0 0 16px; padding-left: 22px; }
.steps li { margin: 6px 0; padding-left: 4px; }
.steps li::marker { color: var(--green); }

figure { margin: 22px 0 26px; }
figure a { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 70px -40px #000; }
figure img { display: block; width: 100%; height: auto; }
figcaption { color: var(--muted); font-size: 14.5px; margin-top: 10px; }
figure.phone { max-width: 300px; }
figure.phone a { border-radius: 28px; border: 6px solid #222229; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; align-items: start; margin: 22px 0 26px; }
.pair figure { margin: 0; }

.tip, .warn { border-radius: 12px; padding: 14px 16px 14px 18px; margin: 18px 0; font-size: 16px; border: 1px solid; }
.tip { background: #12201a; border-color: #1f4630; }
.tip::before { content: "Consejo · "; color: var(--green); font-weight: 600; }
.warn { background: #221c0f; border-color: #4a3a14; }
.warn::before { content: "Ojo · "; color: var(--amber); font-weight: 600; }

dl.faq dt { color: var(--ink); font-weight: 600; margin-top: 22px; }
dl.faq dd { margin: 6px 0 0; }

.end { border-top: 1px solid var(--line); margin-top: 72px; padding-top: 24px; color: var(--muted); font-size: 15px; }

/* En pantallas estrechas el índice va plegado debajo del título */
.toc-in { display: none; }
.toc-in summary { cursor: pointer; font: 600 16px/1 var(--display); color: var(--ink); padding: 14px 16px; list-style: none; }
.toc-in summary::-webkit-details-marker { display: none; }
.toc-in summary::after { content: " ▾"; color: var(--muted); }
.toc-in ol { list-style: none; margin: 0; padding: 0 6px 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 8px; }
.toc-in a { display: grid; grid-template-columns: 28px 1fr; gap: 6px; padding: 7px 10px; border-radius: 8px; color: var(--soft); text-decoration: none; font-size: 15px; line-height: 1.35; }
.toc-in a span { font: 700 13px/1.6 var(--display); color: var(--dot); }
@media (max-width: 980px) {
  .page { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }
  .toc-in { display: block; margin-top: 28px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .top .what { display: none; }
  .top .in { padding: 12px 18px; }
  .page { padding: 0 18px; }
  .toc-in ol { grid-template-columns: minmax(0, 1fr); }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .pair { grid-template-columns: minmax(0, 1fr); }
  figure.phone { max-width: 240px; margin-left: auto; margin-right: auto; }
  h2 { gap: 12px; }
  h2 .n::after { margin-left: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Una tarjeta de la app junto al texto */
.pair figure.card { margin: 4px 0 0; }
figure.card a { border-radius: 12px; }
.steps ul { margin: 6px 0 4px; padding-left: 18px; }
.steps ul li { margin: 6px 0; }

/* Tabla de los patrones de claqueta */
table.meters { width: 100%; border-collapse: collapse; margin: 10px 0 22px; font-size: 16px; }
table.meters th { text-align: left; color: var(--muted); font: 600 13px/1.2 var(--text); padding: 0 12px 8px 0; border-bottom: 1px solid var(--line); }
table.meters td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.meters td:first-child { font: 700 16px/1.4 var(--display); color: var(--ink); white-space: nowrap; width: 140px; }
@media (max-width: 640px) { table.meters td:first-child { width: auto; } }
