/* Títulos: Archivo ancha y gruesa (alternativa libre a Base Neue / Neue Power).
   Si compras la licencia de una de esas, sube su .woff2 a assets/fonts/ y cambia aquí el archivo y --display. */
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #f7f7f4;
  --ink: #000;
  --text: #1c1b19;
  --muted: #5e5a54;
  --rule: #d9d6cf;
  --felt: #9e1b32;
  --felt-dark: #7d1428;
  --brass: #8c6d2f;
  --white-key: #fbfbf8;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--felt); }
:focus-visible { outline: 2px solid var(--felt); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.small { font-size: .875rem; color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: #fff; padding: 8px 12px; }

h1, h2, h3 { font-family: var(--display); font-weight: 750; font-stretch: 118%; line-height: 1.02; margin: 0; letter-spacing: -.025em; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.4vw, 2.8rem); }
h3 { font-size: 1.6rem; }
h4 { font-family: var(--sans); font-size: 1rem; font-weight: 600; margin: 0; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 10px 20px;
  font: 600 .98rem/1.2 var(--sans);
  text-decoration: none; text-align: center;
  border: 1.5px solid var(--ink); border-radius: 3px;
  transition: background-color .15s, color .15s;
}
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--felt); border-color: var(--felt); color: #fff; }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-sm { min-height: 38px; padding: 7px 14px; font-size: .88rem; }

/* Cabecera */
.top { background: var(--paper); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 5; }
.top-row { display: flex; align-items: center; gap: 24px; padding-block: 12px; flex-wrap: wrap; }
.logo { font-family: var(--display); font-size: 1.4rem; font-weight: 800; font-stretch: 125%; letter-spacing: -.03em; text-decoration: none; margin: 0; }
.nav { display: flex; gap: 18px; flex: 1; font-size: .95rem; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { text-decoration: none; white-space: nowrap; padding-block: 6px; }
.region { display: flex; border: 1px solid var(--rule); border-radius: 3px; font-size: .85rem; }
.region a { padding: 6px 10px; text-decoration: none; color: var(--muted); }
.region a[aria-current] { background: var(--ink); color: #fff; }
.disclosure { margin: 0 auto; padding-bottom: 8px; font-size: .78rem; color: var(--muted); }

@media (max-width: 760px) {
  .top { position: static; }
  .top-row { gap: 10px 16px; }
  .nav { order: 3; flex-basis: 100%; }
}

/* Portada: tapa de piano negra, fieltro rojo y teclado */
.hero { background: var(--ink); color: #fff; }
.hero-text { padding-top: clamp(56px, 9vw, 112px); padding-bottom: clamp(36px, 5vw, 56px); }
.hero h1 {
  font-size: clamp(2.5rem, 6.6vw, 5.2rem);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -.035em;
  max-width: 14ch;
}
.lead { font-size: clamp(1.08rem, 1.6vw, 1.25rem); max-width: 52ch; color: #d8d6d0; margin: 22px 0 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 0; }
.hero .btn-ink { background: #fff; color: var(--ink); border-color: #fff; }
.hero .btn-ink:hover { background: var(--felt); color: #fff; border-color: var(--felt); }
.hero .btn-line { color: #fff; border-color: #fff; }
.hero .btn-line:hover { background: #fff; color: var(--ink); }

.hero-keys { border-top: 6px solid var(--felt); padding-bottom: 14px; }
.kb {
  display: flex; position: relative;
  height: clamp(150px, 22vw, 230px);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.kb .wk {
  flex: 1; position: relative;
  background: linear-gradient(#fff, var(--white-key) 85%, #e9e7e1);
  border-right: 1px solid #222;
  border-radius: 0 0 4px 4px;
  cursor: pointer;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 10px;
  font-size: .72rem; color: #8a867f;
}
.kb .bk {
  position: absolute; top: 0; z-index: 2;
  height: 62%;
  background: linear-gradient(#2a2a2a, #000 30%);
  border-radius: 0 0 3px 3px;
  cursor: pointer;
  box-shadow: inset 0 -5px 0 #333;
}
.kb .wk.down { background: linear-gradient(#ecebe6, #dedcd5); }
.kb .bk.down { background: #1d1d1d; box-shadow: inset 0 -2px 0 #333; }
.kb-hint { color: #a7a39b; font-size: .85rem; margin: 12px auto 0; }

.notice { margin-top: 24px; padding: 14px 18px; border-left: 4px solid var(--brass); background: #fff; }

/* Secciones */
/* Cada sección es una franja con su propio tono claro */
.band { background: var(--band, var(--paper)); padding-block: clamp(52px, 7vw, 88px); scroll-margin-top: 70px; }
@media (max-width: 760px) { .band { scroll-margin-top: 0; } }
.band-guias       { --band: #e9eff3; }
.band-test        { --band: #f5e9e6; }
.band-pianos      { --band: #f7f7f4; }
.band-teclados    { --band: #f4eee2; }
.band-portatiles  { --band: #e8eef5; }
.band-escenario   { --band: #f1eaf1; }
.band-comparativa { --band: #ffffff; }
.band-accesorios  { --band: #eaf2ec; }
.band-libros      { --band: #f5ece6; }
.band-apps        { --band: #ecedf7; }
.band-faq         { --band: #f7f7f4; }
.band-quien       { --band: #ffffff; }
.band + .band { border-top: 1px solid rgba(0, 0, 0, .06); }
.sec-head { margin-bottom: 28px; max-width: 62ch; }
.intro { color: var(--muted); margin: 10px 0 0; font-size: 1.08rem; }
.intro.small { font-size: .92rem; }
.browse { margin-top: 28px; font-size: .95rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.browse span { margin-right: 4px; }

/* Fichas */
.items { border-top: 1.5px solid var(--ink); }
.item {
  display: grid;
  grid-template-columns: minmax(230px, 300px) 1fr 220px;
  gap: 18px 40px;
  padding-block: 30px;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 110px;
}
.item:target { background: linear-gradient(90deg, rgba(158,27,50,.06), transparent 70%); }
.range { width: 100%; max-width: 260px; height: auto; display: block; margin-bottom: 12px; }
.range .w { fill: #e4e1da; }
.range .w.on { fill: #fff; stroke: #000; stroke-width: .6; }
.range .b { fill: #c8c4bb; }
.range .b.on { fill: #000; }
.item-img { margin-bottom: 14px; border-radius: 3px; background: #fff; aspect-ratio: 16 / 10; object-fit: contain; width: 100%; }
.spec { margin: 0 0 4px; font-size: .86rem; color: var(--muted); }
.item h3 { font-size: clamp(1.45rem, 2.4vw, 1.8rem); }
.for { margin: 6px 0 0; color: var(--felt); font-weight: 500; }
.item-body p { margin: 0 0 16px; max-width: 60ch; }
.pc { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 28px; font-size: .95rem; }
.pc ul { margin: 6px 0 0; padding-left: 1.1em; }
.pc li { margin-bottom: 4px; }
.pc li::marker { color: var(--muted); }
.item-buy { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.item-buy .alt { font-size: .9rem; text-align: center; }
.item-buy .small { margin: 0; }

@media (max-width: 960px) {
  .item { grid-template-columns: 1fr 1.3fr; }
  .item-buy { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; }
}
@media (max-width: 620px) {
  .item { grid-template-columns: 1fr; gap: 14px; }
  .pc { grid-template-columns: 1fr; gap: 12px; }
  .item-buy .btn { flex: 1 1 100%; }
}

/* Listas cortas: accesorios, libros, apps */
.group-h { font-size: 1.15rem; margin: 28px 0 12px; }
.group-h:first-of-type { margin-top: 0; }
.mini-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  border-top: 1.5px solid var(--ink);
}
.mini { padding: 18px 20px 18px 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 110px; }
.mini h4 { font-family: var(--display); font-size: 1.12rem; font-weight: 700; font-stretch: 110%; line-height: 1.2; letter-spacing: -.01em; }
.mini p { margin: 6px 0 0; font-size: .93rem; color: var(--muted); }
.mini { display: flex; flex-direction: column; }
.mini .mini-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; }
.mini .mini-store { color: var(--muted); font-size: .85rem; flex-basis: 100%; }

/* Test */
.quiz { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 40px; margin-top: 26px; }
.quiz fieldset { border: 0; border-top: 1.5px solid var(--ink); margin: 0; padding: 14px 0 0; }
.quiz legend { font-family: var(--display); font-size: 1.15rem; font-weight: 700; font-stretch: 112%; padding: 0 0 10px; float: left; width: 100%; }
.quiz label { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; cursor: pointer; clear: both; }
.quiz input { accent-color: var(--felt); width: 18px; height: 18px; margin: 3px 0 0; flex: none; }
.quiz button { grid-column: 1 / -1; justify-self: start; cursor: pointer; }
@media (max-width: 720px) { .quiz { grid-template-columns: 1fr; } }

.quiz-result:empty { display: none; }
.quiz-result { margin-top: 34px; }
.quiz-result h3 { font-size: 1.5rem; margin-bottom: 14px; }
.picks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px; border-top: 1.5px solid var(--ink); }
.picks li { padding: 18px 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 6px; }
.picks .pick-n { font-family: var(--display); font-size: 1.25rem; font-weight: 750; font-stretch: 115%; }
.picks .pick-why { color: var(--muted); font-size: .93rem; }
.picks .pick-links { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.picks .btn { min-height: 40px; padding: 8px 14px; font-size: .9rem; }
@media (max-width: 820px) { .picks { grid-template-columns: 1fr; } }

/* Tabla */
.table-wrap { overflow-x: auto; border-top: 1.5px solid var(--ink); }
.comp { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 620px; }
.comp th, .comp td { text-align: left; padding: 11px 16px 11px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.comp thead th { font-weight: 600; color: var(--muted); font-size: .85rem; }
.comp tbody th { font-family: var(--display); font-weight: 650; font-stretch: 108%; font-size: 1rem; white-space: nowrap; }
.comp tbody th a { text-decoration: none; }

/* Guías y FAQ */
.guide-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; border-top: 1.5px solid var(--ink); padding-top: 22px; }
.guide-cols h3 { font-size: 1.25rem; margin-bottom: 10px; }
.guide-cols p { margin: 0 0 12px; font-size: 1rem; }
@media (max-width: 860px) { .guide-cols { grid-template-columns: 1fr; } }

.faq details { border-bottom: 1px solid var(--rule); max-width: 820px; }
.faq details:first-of-type { border-top: 1.5px solid var(--ink); }
.faq summary { cursor: pointer; padding: 16px 32px 16px 0; font-family: var(--display); font-size: 1.12rem; font-weight: 650; font-stretch: 108%; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-family: var(--sans); font-size: 1.4rem; color: var(--felt); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 18px; max-width: 68ch; }

.about h2 { margin-bottom: 16px; }
.about p { margin: 0 0 14px; font-size: 1.1rem; max-width: 64ch; }

/* Pie */
.foot { margin-top: 0; background: var(--ink); color: #cfccc5; padding-block: 44px 28px; font-size: .92rem; border-top: 6px solid var(--felt); }
.foot-row { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }
.foot .logo { color: #fff; margin-bottom: 10px; }
.foot p { margin: 0 0 10px; max-width: 64ch; }
.foot nav { display: flex; flex-direction: column; gap: 8px; }
.foot a { color: #fff; }
.foot .small { color: #8f8b84; margin-top: 18px; }
@media (max-width: 700px) { .foot-row { grid-template-columns: 1fr; } }

/* Páginas legales */
.legal { padding-block: 56px 0; max-width: calc(72ch + 2 * var(--gutter)); }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 24px; }
.legal h2 { font-size: 1.5rem; margin: 32px 0 10px; }
.legal p, .legal li { max-width: 72ch; }
.legal mark { background: #f3e2a6; padding: 0 3px; }
