/* Sistema para escuelas de música · estilos base (mismo diseño del prototipo).
   CSS plano: no necesita compilarse ni Node en el servidor. */

@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #FBF7F0; --paper-deep: #F3ECE0; --paper-line: #E9E1D3;
  --ink: #1B1530; --ink-soft: #4A4363; --ink-mute: #7C7694;
  --plum: #3B2A6B; --plum-soft: #ECE7F7;
  --brass: #C8902E; --brass-soft: #F6E8CC; --brass-deep: #8A5E14;
  --ok: #2F7D5B; --ok-soft: #E1F2E9; --bad: #B23A3A; --bad-soft: #F8E1E1;
  --warn: #B4651B; --warn-soft: #FCEBD8;
  --radius: 1rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: 2rem; } h2 { font-size: 1.375rem; } h3 { font-size: 1.125rem; }
@media (min-width: 640px) { h1 { font-size: 2.75rem; } }
p { margin: 0; }
a { color: var(--plum); }
img { max-width: 100%; }

.wrap { width: 100%; max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
.wrap-narrow { max-width: 28rem; }
.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 1.75rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Cabecera */
.demo-bar { background: var(--ink); color: #fff; font-size: .8125rem; text-align: center; padding: .375rem 1rem; }
.demo-bar strong { color: var(--brass); font-weight: 600; }
.site-header { border-bottom: 1px solid var(--paper-line); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; flex-wrap: wrap; padding-top: .75rem; padding-bottom: .75rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 2.5rem; height: 2.5rem; border-radius: 9999px; background: var(--brand, var(--plum)); color: var(--brand-accent, var(--brass)); display: grid; place-items: center; font-size: 1.25rem; flex: none; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 9999px; }
.brand-name { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 1.375rem; line-height: 1; }
.brand-sub { font-size: .6875rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-mute); margin-top: .25rem; }
.nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.nav a, .nav button { font: inherit; font-size: .9375rem; color: var(--ink-soft); text-decoration: none; padding: .5rem .875rem; border-radius: 9999px; background: none; border: 0; cursor: pointer; }
.nav a:hover, .nav button:hover { background: var(--paper-deep); color: var(--ink); }
.nav a.on { background: var(--ink); color: #fff; font-weight: 600; }

main { padding: 2.5rem 0 4rem; }
.site-footer { border-top: 1px solid var(--paper-line); padding: 2rem 0; text-align: center; font-size: .8125rem; color: var(--ink-mute); }

/* Tipografía auxiliar */
.eyebrow { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .2em; color: var(--brass-deep); }
.lead { font-size: 1.0625rem; color: var(--ink-soft); max-width: 44rem; }
.muted { color: var(--ink-mute); } .soft { color: var(--ink-soft); } .small { font-size: .875rem; } .tiny { font-size: .75rem; }
.num { font-family: Fraunces, Georgia, serif; font-size: 2rem; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; }

/* Tarjetas */
.card { background: #fff; border: 1px solid var(--paper-line); border-radius: var(--radius); padding: 1.25rem; }
.card-lg { padding: 1.75rem; }
@media (min-width: 640px) { .card-lg { padding: 2.25rem; } }
.card-note { background: var(--brass-soft); border-color: #EBD7AE; }
.card-label { font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); margin-bottom: .5rem; }
.hero { background: var(--brand, var(--plum)); color: #fff; border-radius: 1.5rem; padding: 2rem 1.5rem; background-image: repeating-linear-gradient(to bottom, transparent 0 13px, rgba(255,255,255,.06) 13px 14px); }
@media (min-width: 640px) { .hero { padding: 3rem 2.5rem; } }
.hero .eyebrow { color: var(--brand-accent, var(--brass)); }
.hero p { color: rgba(255,255,255,.85); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: inherit; font-weight: 600; font-size: .9375rem; line-height: 1.2; padding: .75rem 1.25rem; min-height: 2.75rem; border-radius: 9999px; border: 1px solid transparent; background: var(--brand, var(--plum)); color: #fff; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.1); }
.btn:focus-visible, .input:focus-visible, .nav a:focus-visible, .nav button:focus-visible, a:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
.btn-block { width: 100%; }
.btn-brass { background: var(--brand-accent, var(--brass)); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--paper-line); }
.btn-ok { background: var(--ok); } .btn-bad { background: #fff; color: var(--bad); border-color: #E8BDBD; }
.btn-sm { padding: .4375rem .875rem; min-height: 2.25rem; font-size: .8125rem; }
.link-btn { font: inherit; background: none; border: 0; padding: 0; color: var(--plum); text-decoration: underline; cursor: pointer; }

/* Formularios */
.field > label, .label { display: block; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin-bottom: .375rem; }
.input, select.input { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--paper-line); border-radius: .75rem; padding: .75rem .875rem; min-height: 3rem; }
.input:focus { border-color: var(--plum); }
.input.has-error { border-color: var(--bad); }
.hint { font-size: .8125rem; color: var(--ink-mute); margin-top: .375rem; }
.error { font-size: .875rem; color: var(--bad); margin-top: .375rem; }
.check { display: flex; gap: .625rem; align-items: flex-start; font-size: .9375rem; color: var(--ink-soft); }
.check input { width: 1.125rem; height: 1.125rem; margin-top: .1875rem; accent-color: var(--plum); flex: none; }

/* Avisos y chips */
.alert { border-radius: .75rem; padding: .875rem 1rem; font-size: .9375rem; border: 1px solid transparent; }
.alert-ok { background: var(--ok-soft); color: #1F5C41; border-color: #C3E3D1; }
.alert-bad { background: var(--bad-soft); color: #8A2A2A; border-color: #EFC4C4; }
.alert-warn { background: var(--warn-soft); color: #8A4B10; border-color: #F3D4B0; }
.alert-info { background: var(--plum-soft); color: var(--plum); border-color: #D9D0EE; }
.chip { display: inline-flex; align-items: center; gap: .25rem; border-radius: 9999px; padding: .125rem .625rem; font-size: .75rem; line-height: 1.25rem; font-weight: 500; white-space: nowrap; }
.chip-ok { background: var(--ok-soft); color: var(--ok); } .chip-bad { background: var(--bad-soft); color: var(--bad); }
.chip-warn { background: var(--brass-soft); color: var(--brass-deep); } .chip-plum { background: var(--plum-soft); color: var(--plum); }
.chip-mute { background: var(--paper-deep); color: var(--ink-soft); }

/* Pestañas tipo píldora */
.tabs { display: inline-flex; flex-wrap: wrap; gap: .25rem; background: #fff; border: 1px solid var(--paper-line); border-radius: 9999px; padding: .25rem; max-width: 100%; }
.tabs a { font-size: .9375rem; color: var(--ink-soft); text-decoration: none; padding: .5rem 1rem; border-radius: 9999px; white-space: nowrap; }
.tabs a.on { background: var(--ink); color: #fff; font-weight: 600; }
.tabs a.off { color: var(--ink-mute); cursor: default; }

/* Listas y tablas */
.avatar { width: 2.75rem; height: 2.75rem; border-radius: 9999px; background: var(--plum-soft); color: var(--plum); display: grid; place-items: center; font-family: Fraunces, Georgia, serif; font-weight: 600; flex: none; }
.list { background: #fff; border: 1px solid var(--paper-line); border-radius: var(--radius); overflow: hidden; }
.list-item { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; padding: 1rem 1.25rem; }
.list-item + .list-item { border-top: 1px solid var(--paper-line); }
.list-main { flex: 1 1 14rem; min-width: 0; }
.list-main strong { font-weight: 600; }
.roadmap li { padding: .5rem 0; border-top: 1px solid var(--paper-line); display: flex; justify-content: space-between; gap: 1rem; }
.roadmap { list-style: none; margin: 0; padding: 0; }
.roadmap li:first-child { border-top: 0; }
details.inline > summary { cursor: pointer; list-style: none; }
details.inline > summary::-webkit-details-marker { display: none; }
.code-box { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.125rem; letter-spacing: .08em; background: var(--paper-deep); border-radius: .75rem; padding: .875rem 1rem; word-break: break-all; }
.center { text-align: center; }
.pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 1.5rem; font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Casillas tipo píldora (instrumentos, sedes, sectores) */
.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill { position: relative; display: inline-flex; }
.pill input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; min-height: 2.5rem; padding: .375rem .875rem; border: 1px solid var(--paper-line); border-radius: 9999px; background: #fff; font-size: .9375rem; color: var(--ink-soft); }
.pill input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.pill input:focus-visible + span { outline: 3px solid var(--brass); outline-offset: 2px; }
.card-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.person { display: flex; gap: 1rem; align-items: flex-start; text-decoration: none; color: inherit; }
a.card:hover { border-color: var(--plum); }
.person-main { flex: 1; min-width: 0; }
.person-main strong { font-size: 1.0625rem; }
.side { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .side { grid-template-columns: minmax(0, 1fr) 22rem; align-items: start; } }
.search { display: flex; gap: .5rem; flex-wrap: wrap; }
.search .input { flex: 1 1 14rem; }
.back { font-size: .875rem; text-decoration: none; }
textarea.input { min-height: 5rem; resize: vertical; }
.table-list { width: 100%; border-collapse: collapse; }
.table-list td { padding: .625rem 0; border-top: 1px solid var(--paper-line); font-size: .9375rem; }
.table-list tr:first-child td { border-top: 0; }
.table-list td:last-child { text-align: right; }

/* ---- Reportes imprimibles ---- */
.report-table { width: 100%; }
.report-table th { text-align: left; font-size: .8125rem; color: var(--ink-soft); font-weight: 600; padding: .375rem .5rem .375rem 0; }
.report-table td { padding-right: .5rem; text-align: left !important; }
.report-table tfoot th { border-top: 2px solid var(--paper-line); color: var(--ink); padding-top: .5rem; }
.sign-line { border-bottom: 1px solid var(--ink-soft); height: 2.5rem; }
@media print {
    .demo-bar, .site-header, .site-footer, .no-print { display: none !important; }
    body { background: #fff; color: #000; }
    .card { box-shadow: none !important; border: 0 !important; padding: 0 !important; background: transparent !important; }
    .report-section { break-inside: avoid; margin-bottom: 1.25rem; }
    .signatures { break-inside: avoid; }
    .wrap { max-width: none !important; padding: 0 !important; }
    a { color: inherit; text-decoration: none; }
}

/* ---- Mapa público ---- */
.sector-map { position: relative; width: 100%; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #F3EFFA, #E8E1F5); border-radius: 16px; overflow: hidden; }
.sector-dot { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #9A8FB8; }
.sector-dot.live { background: var(--brand-accent, #E8A23A); animation: sector-blink 1.2s ease-in-out infinite; }
.sector-label { position: absolute; transform: translate(12px, -50%); font-size: .75rem; color: #3B2A6B; white-space: nowrap; pointer-events: none; }
@keyframes sector-blink { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(232,162,58,.7); } 50% { opacity: .45; box-shadow: 0 0 0 10px rgba(232,162,58,0); } }
@media (prefers-reduced-motion: reduce) { .sector-dot.live { animation: none; box-shadow: 0 0 0 5px rgba(232,162,58,.5); } }
