/* SKAL SCRIPTS — menú móvil, banda de encargos, página de encargos y documentación.
   Va aparte de estilo.css (portada y fichas) y reutiliza sus variables. */

/* ---------------------------------------------------------------- menú móvil */
.menu-boton { display: none; width: 44px; height: 44px; border: 1px solid var(--linea2); border-radius: 12px; background: rgba(255, 255, 255, .04); cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-boton i { display: block; width: 18px; height: 2px; background: var(--texto); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.menu-abierto .menu-boton i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-abierto .menu-boton i:nth-child(2) { opacity: 0; }
.menu-abierto .menu-boton i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 980px) {
    .menu-boton { display: inline-flex; margin-left: auto; }
    .menu-abierto .menu { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; padding: 12px 20px 18px; margin: 0; background: #070b10; border-bottom: 1px solid var(--linea2); gap: 2px; box-shadow: 0 30px 60px rgba(0, 0, 0, .6); }
    .menu-abierto .menu > a, .menu-abierto .menu > .desplegable > button { padding: 14px 8px; font-size: 20px; width: 100%; text-align: left; }
    .menu-abierto .desplegable-caja { display: none; }
}

/* ---------------------------------------------------------------- banda de encargos */
.encargo-banda { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding: 34px 38px; border: 1px solid var(--linea2); border-radius: 20px; background: radial-gradient(700px 240px at 0% 0%, rgba(61, 214, 192, .14), transparent 70%), radial-gradient(700px 260px at 100% 100%, rgba(74, 143, 214, .16), transparent 70%), var(--panel); }
.encargo-banda h2 { font-family: var(--rotulo); font-size: clamp(30px, 3vw, 42px); line-height: 1.05; }
.encargo-banda p { margin-top: 8px; color: #c3ced7; max-width: 60ch; }

/* ---------------------------------------------------------------- encargos */
.enc-heroe { padding-bottom: 20px; }
.enc-heroe h1 { max-width: 16ch; }
.enc-heroe .lede { max-width: 60ch; }
.enc-fila { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: center; }
.enc-collage { position: relative; aspect-ratio: 16 / 11; }
.enc-collage img { position: absolute; width: 74%; border: 1px solid var(--linea2); border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); background: var(--tinta); }
.enc-collage img:nth-child(1) { left: 0; top: 0; z-index: 1; }
.enc-collage img:nth-child(2) { right: 0; top: 18%; z-index: 2; }
.enc-collage img:nth-child(3) { left: 12%; bottom: 0; z-index: 3; }
@media (max-width: 980px) { .enc-fila { grid-template-columns: minmax(0, 1fr); } .enc-collage { max-width: 560px; } }
.enc-rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.enc-tarjeta { padding: 26px 24px; border: 1px solid var(--linea); border-radius: 16px; background: var(--panel); transition: border-color .2s, transform .25s var(--ease); }
.enc-tarjeta:hover { border-color: rgba(61, 214, 192, .4); transform: translateY(-3px); }
.enc-tarjeta h3 { font-family: var(--rotulo); font-size: 25px; line-height: 1.1; margin: 14px 0 8px; }
.enc-tarjeta p { color: var(--tenue); font-size: 15px; }
.enc-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--marca); color: #04211c; font-family: var(--rotulo); font-weight: 700; font-size: 20px; }
.enc-nota { margin-top: 22px; max-width: 80ch; color: var(--tenue); font-size: 15px; }
.enc-nota strong { color: var(--texto); }
.enc-pasos { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; counter-reset: paso; border: 1px solid var(--linea); border-radius: 18px; overflow: hidden; }
.enc-pasos li { counter-increment: paso; position: relative; padding: 28px 26px; background: var(--panel); border-right: 1px solid var(--linea); }
.enc-pasos li:last-child { border-right: 0; }
.enc-pasos li::before { content: counter(paso); display: block; font-family: var(--rotulo); font-weight: 700; font-size: 44px; line-height: 1; margin-bottom: 14px; background: var(--marca); -webkit-background-clip: text; background-clip: text; color: transparent; }
.enc-pasos h3 { font-family: var(--rotulo); font-size: 24px; line-height: 1.1; margin-bottom: 8px; }
.enc-pasos p { color: var(--tenue); font-size: 15px; }
.enc-lista { list-style: none; padding: 0; display: grid; gap: 12px; max-width: 880px; }
.enc-lista li { position: relative; padding: 14px 18px 14px 50px; border: 1px solid var(--linea); border-radius: 14px; background: var(--panel); color: #c3ced7; }
.enc-lista li::before { content: ''; position: absolute; left: 18px; top: 50%; width: 16px; height: 9px; margin-top: -7px; border-left: 2px solid var(--turq); border-bottom: 2px solid var(--turq); transform: rotate(-45deg); }
.enc-brief { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px; align-items: start; }
#enc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; padding: 26px; border: 1px solid var(--linea); border-radius: 18px; background: var(--panel); }
#enc-form label { display: grid; gap: 6px; font-weight: 600; font-size: 14.5px; align-content: start; }
#enc-form label.ancho { grid-column: 1 / -1; }
#enc-form small { color: var(--tenue); font-weight: 400; font-size: 13px; margin-top: -2px; }
#enc-form input, #enc-form select, #enc-form textarea, .enc-mensaje textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--linea2); border-radius: 10px; background: var(--tinta); color: var(--texto); font: inherit; font-weight: 400; }
#enc-form textarea, .enc-mensaje textarea { resize: vertical; line-height: 1.5; }
#enc-form input:focus, #enc-form select:focus, #enc-form textarea:focus { border-color: var(--turq); outline: none; box-shadow: 0 0 0 3px rgba(61, 214, 192, .18); }
.enc-mensaje { position: sticky; top: 92px; padding: 24px; border: 1px solid var(--linea2); border-radius: 18px; background: var(--panel2); }
.enc-mensaje h3 { font-family: var(--rotulo); font-size: 24px; margin-bottom: 12px; }
.enc-mensaje textarea { font: 13.5px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; color: #c3ced7; }
.enc-mensaje .acciones { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.enc-ayuda { margin-top: 12px; color: var(--tenue); font-size: 14px; }
@media (max-width: 980px) {
    .enc-brief { grid-template-columns: minmax(0, 1fr); }
    .enc-mensaje { position: static; }
    .enc-pasos li { border-right: 0; border-bottom: 1px solid var(--linea); }
    .enc-pasos li:last-child { border-bottom: 0; }
}
@media (max-width: 620px) { #enc-form { grid-template-columns: minmax(0, 1fr); padding: 18px; } .encargo-banda { padding: 26px 22px; } }

/* ---------------------------------------------------------------- documentación */
.docs { display: grid; grid-template-columns: 270px minmax(0, 1fr) 220px; gap: 40px; padding-top: 34px; padding-bottom: 20px; align-items: start; min-height: 70vh; }
.docs-lateral { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow: auto; padding-right: 6px; }
.docs-menu summary { display: none; }
.docs-menu input { width: 100%; padding: 10px 13px; margin-bottom: 14px; border: 1px solid var(--linea2); border-radius: 10px; background: var(--panel); color: var(--texto); font: inherit; font-size: 14.5px; }
.docs-menu input:focus { outline: none; border-color: var(--turq); }
.docs-inicio { display: block; padding: 8px 12px; border-radius: 9px; font-weight: 600; color: var(--tenue); }
.docs-grupo { margin-top: 18px; }
.docs-grupo h4 { padding: 0 12px 6px; font-family: var(--rotulo); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--tenue); font-weight: 600; }
.docs-prod-a, .docs-prod li a { display: block; padding: 7px 12px; border-radius: 9px; color: #c3ced7; font-size: 15px; transition: background .15s, color .15s; }
.docs-prod-a:hover, .docs-prod li a:hover, .docs-inicio:hover { background: rgba(255, 255, 255, .06); color: var(--texto); }
.docs-prod ul { list-style: none; padding: 2px 0 6px 14px; margin: 0 0 4px 12px; border-left: 1px solid var(--linea2); }
.docs-prod li a { font-size: 14px; color: var(--tenue); }
.docs a.activo, .docs-inicio.activo { background: rgba(61, 214, 192, .12); color: var(--turq); font-weight: 600; }
.docs-art { min-width: 0; max-width: 860px; padding-bottom: 40px; }
.docs-migas { color: var(--tenue); font-size: 14px; margin-bottom: 8px; }
.docs-migas a:hover { color: var(--turq); }
.docs-art h1 { font-family: var(--rotulo); font-weight: 700; font-size: clamp(38px, 4vw, 56px); line-height: 1.02; }
.docs-art h2 { font-family: var(--rotulo); font-weight: 700; font-size: 32px; line-height: 1.1; margin: 46px 0 14px; padding-top: 6px; border-top: 1px solid var(--linea); }
.docs-art h3 { font-family: var(--rotulo); font-size: 24px; margin-bottom: 6px; }
.docs-art p, .docs-art li { color: #c3ced7; }
.docs-art p { margin: 10px 0; max-width: 72ch; }
.docs-art ul { padding-left: 22px; display: grid; gap: 6px; margin: 10px 0; }
.docs-lede { font-size: 19px; color: #dbe4ea !important; margin-top: 14px !important; }
.docs-acciones { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 18px; }
.docs-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 16px 0; }
.docs-tarjeta { display: grid; gap: 6px; padding: 18px; border: 1px solid var(--linea); border-radius: 14px; background: var(--panel); transition: border-color .2s, transform .25s var(--ease); align-content: start; }
.docs-tarjeta:hover { border-color: rgba(61, 214, 192, .45); transform: translateY(-2px); }
.docs-tarjeta strong { font-family: var(--rotulo); font-size: 21px; line-height: 1.1; }
.docs-tarjeta span { color: var(--tenue); font-size: 14px; line-height: 1.45; }
.docs-tabla { overflow-x: auto; border: 1px solid var(--linea); border-radius: 14px; margin: 14px 0; background: var(--panel); }
.docs-tabla table { width: 100%; border-collapse: collapse; min-width: 560px; }
.docs-tabla th { text-align: left; padding: 11px 16px; font-family: var(--rotulo); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--tenue); background: rgba(255, 255, 255, .04); border-bottom: 1px solid var(--linea); }
.docs-tabla td { padding: 12px 16px; vertical-align: top; border-bottom: 1px solid var(--linea); color: #c3ced7; font-size: 15px; }
.docs-tabla tr:last-child td { border-bottom: 0; }
.docs-tabla td:first-child code { white-space: pre-wrap; word-break: normal; overflow-wrap: normal; color: var(--turq); background: rgba(61, 214, 192, .09); }
.docs-config td:nth-child(2) { white-space: nowrap; }
.docs-config td:nth-child(2) code { color: #c3ced7; background: rgba(255, 255, 255, .06); }
.lado { display: inline-block; padding: 2px 9px; border-radius: 6px; font-family: var(--rotulo); font-weight: 700; font-size: 14px; letter-spacing: .05em; }
.lado-client { background: rgba(74, 143, 214, .18); color: #7db4ee; }
.lado-server { background: rgba(241, 182, 74, .16); color: var(--aviso); }
.docs-pasos { list-style: none; padding: 0 !important; counter-reset: p; display: grid; gap: 14px !important; }
.docs-pasos li { counter-increment: p; position: relative; padding: 4px 0 4px 54px; }
.docs-pasos li::before { content: counter(p); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--marca); color: #04211c; font-family: var(--rotulo); font-weight: 700; font-size: 20px; }
.docs-codigo { position: relative; margin: 10px 0 4px; border: 1px solid var(--linea2); border-radius: 12px; background: #05090d; }
.docs-codigo pre { padding: 16px 18px; overflow-x: auto; font: 14px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; color: #cfe3ee; }
.docs-codigo code { padding: 0; background: none; font-size: inherit; }
.docs-codigo .copiar { position: absolute; right: 10px; top: 10px; padding: 4px 12px; border: 1px solid var(--linea2); border-radius: 8px; background: rgba(255, 255, 255, .06); cursor: pointer; font-size: 13px; color: var(--tenue); }
.docs-codigo .copiar:hover { color: var(--texto); background: rgba(255, 255, 255, .12); }
.docs-aviso { margin: 14px 0; padding: 14px 18px; border: 1px solid rgba(61, 214, 192, .35); border-radius: 12px; background: rgba(61, 214, 192, .07); color: #dbe4ea; }
.docs-errores { display: grid; gap: 8px; margin: 14px 0; }
.docs-errores details { border: 1px solid var(--linea); border-radius: 12px; background: var(--panel); }
.docs-errores details[open] { border-color: rgba(61, 214, 192, .35); }
.docs-errores summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.docs-errores summary::-webkit-details-marker { display: none; }
.docs-errores summary::after { content: '+'; color: var(--turq); font-size: 22px; line-height: 1; }
.docs-errores details[open] summary::after { content: '–'; }
.docs-errores details p { padding: 0 18px 16px; margin: 0; max-width: none; }
.docs-pie { display: flex; justify-content: space-between; gap: 14px; margin-top: 56px; }
.docs-pie a { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border: 1px solid var(--linea2); border-radius: 12px; font-family: var(--rotulo); font-size: 19px; font-weight: 600; transition: border-color .2s; }
.docs-pie a:hover { border-color: var(--turq); }
.docs-pie small { color: var(--turq); font-size: 20px; }
.docs-medida { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; margin-top: 50px; padding: 26px 28px; border: 1px solid var(--linea2); border-radius: 16px; background: var(--panel); }
.docs-medida h3 { margin-bottom: 4px; }
.docs-medida p { margin: 0; }
.docs-toc { position: sticky; top: 90px; font-size: 14px; }
.docs-toc h4 { font-family: var(--rotulo); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--tenue); font-weight: 600; margin-bottom: 8px; }
.docs-toc ul { list-style: none; padding: 0; border-left: 1px solid var(--linea2); }
.docs-toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--tenue); }
.docs-toc a:hover { color: var(--texto); }
.docs-toc a.activo { color: var(--turq); border-left-color: var(--turq); }
@media (max-width: 1180px) { .docs { grid-template-columns: 250px minmax(0, 1fr); } .docs-toc { display: none; } }
@media (max-width: 980px) {
    .docs { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 20px; }
    .docs-lateral { position: static; max-height: none; overflow: visible; }
    .docs-menu { border: 1px solid var(--linea2); border-radius: 12px; background: var(--panel); padding: 0 14px 14px; }
    .docs-menu summary { display: block; cursor: pointer; padding: 14px 0; font-family: var(--rotulo); font-size: 20px; font-weight: 600; }
}
