/* ===================================================================
   TECLA · marca ficticia de MOZART · teclados y ratones
   Oscura e inmersiva. El acento eléctrico cambia con el acabado elegido
   en el configurador. Lo que se demuestra aquí es interacción: opciones
   dependientes, precio en vivo, lupa y un probador que responde al
   teclado de verdad.
   =================================================================== */

body.tecla {
  --fondo: #07080b;
  --fondo-2: #0d0f14;
  --superficie: #12151c;
  --texto: #eef1f6;
  --texto-2: rgba(238, 241, 246, .62);
  --linea: rgba(238, 241, 246, .12);
  --acento: #2ee6d6;
  --acento-txt: #031412;
  --display: "Unbounded", system-ui, sans-serif;
  --cuerpo: "Inter", system-ui, sans-serif;
  --radio: 18px;
  --ancho: 1240px;
}
.tecla h1, .tecla h2, .tecla h3 { font-weight: 600; letter-spacing: -.02em; }
.tecla .ojo { color: var(--acento); transition: color .5s ease; }
/* Unbounded es muy ancha: con el límite en caracteres del esqueleto partía los titulares en cuatro líneas. */
.tecla .cab { max-width: 780px; }
.tecla .titulo { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
.tecla .nav { background: rgba(7, 8, 11, .78); }
.tecla .nav__marca { display: flex; align-items: center; gap: .6rem; font-size: 1.05rem; letter-spacing: .28em; }
.tecla .nav__marca svg { width: 30px; height: 30px; }
.tecla .nav__menu a { font-size: .86rem; }
.tecla .btn--primario { box-shadow: 0 0 0 0 color-mix(in srgb, var(--acento) 50%, transparent); transition: box-shadow .4s ease, transform .25s var(--suave), filter .25s ease; }
@media (hover: hover) { .tecla .btn--primario:hover { box-shadow: 0 0 28px 0 color-mix(in srgb, var(--acento) 45%, transparent); } }

/* ---------- héroe ---------- */
.tecla .hero { position: relative; min-height: clamp(560px, 90vh, 880px); display: grid; align-items: end; overflow: hidden; padding-bottom: clamp(3rem, 7vw, 6rem); }
.tecla .hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.tecla .hero::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--fondo) 6%, rgba(7, 8, 11, .55) 45%, rgba(7, 8, 11, .2)), linear-gradient(90deg, rgba(7, 8, 11, .85), transparent 65%); }
.tecla .hero .caja { position: relative; z-index: 1; }
.tecla .hero h1 { max-width: 14ch; font-size: clamp(2.6rem, 6.4vw, 5.2rem); line-height: 1.02; }
.tecla .hero h1 em { font-style: normal; color: var(--acento); }
.tecla .hero .bajada { max-width: 46ch; }
.tecla .cinta { display: flex; flex-wrap: wrap; gap: .6rem 1.8rem; margin-top: 2.4rem; list-style: none; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--texto-2); }
.tecla .cinta li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: .6rem; border-radius: 50%; background: var(--acento); vertical-align: middle; }

/* ---------- configurador ---------- */
.tecla .configurador .caja { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (min-width: 960px) { .tecla .configurador .caja { grid-template-columns: 1.25fr 1fr; } }
.tecla .escenario { position: relative; border-radius: 24px; border: 1px solid var(--linea); background: radial-gradient(70% 70% at 50% 40%, color-mix(in srgb, var(--acento) 14%, var(--fondo-2)), var(--fondo-2)); }
.tecla .escenario img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: opacity .3s ease, transform .35s var(--suave); }
.tecla .escenario__pista { position: absolute; right: 14px; bottom: 14px; padding: .35rem .7rem; border-radius: 99px; background: rgba(7, 8, 11, .7);
  font-size: .74rem; color: var(--texto-2); pointer-events: none; }
@media (min-width: 960px) { .tecla .escenario { position: sticky; top: 96px; } }
.tecla .config h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.tecla .config h2 small { display: block; margin-top: .5rem; font-family: var(--cuerpo); font-size: .95rem; font-weight: 500; letter-spacing: 0; color: var(--texto-2); }
.tecla .opciones { margin-top: 1.6rem; border: 0; }
.tecla .opciones legend { margin-bottom: .7rem; font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--texto-2); }
.tecla .opciones__fila { display: flex; flex-wrap: wrap; gap: .5rem; }
.tecla .opcion { display: inline-flex; align-items: center; gap: .55rem; padding: .65rem 1rem; border: 1px solid var(--linea); border-radius: 12px;
  font-size: .9rem; font-weight: 500; color: var(--texto-2); transition: border-color .2s ease, color .2s ease, background-color .2s ease; }
.tecla .opcion small { font-size: .78rem; color: var(--texto-2); }
.tecla .opcion i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); }
.tecla .opcion[aria-pressed="true"] { border-color: var(--acento); color: var(--texto); background: color-mix(in srgb, var(--acento) 10%, transparent); }
.tecla .opcion[hidden] { display: none; }
@media (hover: hover) { .tecla .opcion:not([aria-pressed="true"]):hover { color: var(--texto); border-color: rgba(238, 241, 246, .35); } }
.tecla .config__desc { margin-top: 1rem; min-height: 3.2em; font-size: .94rem; color: var(--texto-2); }
.tecla .ficha { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: 1.6rem; }
.tecla .ficha div { padding: .85rem; border: 1px solid var(--linea); border-radius: 12px; }
.tecla .ficha small { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--texto-2); }
.tecla .ficha b { display: block; margin-top: .25rem; font-family: var(--display); font-size: 1.05rem; font-weight: 500; }
.tecla .config__compra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.8rem;
  padding-top: 1.4rem; border-top: 1px solid var(--linea); }
.tecla .config__precio { font-family: var(--display); font-size: 2.2rem; font-weight: 600; letter-spacing: -.03em; }
.m-graphite { background: linear-gradient(135deg, #3a3f48, #14161b); }
.m-signal { background: linear-gradient(135deg, #f4f4f2 50%, #ff7a3d 50%); }
.m-neon { background: conic-gradient(#ff5470, #c779ff, #2ee6d6, #ffd84d, #ff5470); }
.m-nocturne { background: linear-gradient(135deg, #1a1d2b, #4d7cff); }
.m-arctic { background: linear-gradient(135deg, #f2f4f7, #9aa3b0); }
.m-ember { background: linear-gradient(135deg, #1b1b1f 55%, #ff4d4d 55%); }

/* ---------- probador ---------- */
.tecla .probador { padding: clamp(1.4rem, 3vw, 2.4rem); border: 1px solid var(--linea); border-radius: 26px; background: var(--fondo-2); }
.tecla .probador:focus-visible { outline: 2px solid var(--acento); outline-offset: 4px; }
.tecla .probador__cab { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1.4rem; }
.tecla .probador__cab p { font-size: .92rem; color: var(--texto-2); }
.tecla .probador__cab b { color: var(--texto); font-variant-numeric: tabular-nums; }
.tecla .sonido { padding: .5rem .9rem; border: 1px solid var(--linea); border-radius: 99px; font-size: .84rem; }
.tecla .sonido[aria-pressed="true"] { border-color: var(--acento); color: var(--acento); }
.tecla .teclado { display: grid; gap: .45rem; }
.tecla .teclado__fila { display: flex; gap: .45rem; justify-content: center; }
.tecla .teclado kbd { flex: 0 1 54px; display: grid; place-items: center; height: 50px; border-radius: 10px; border: 1px solid var(--linea);
  background: linear-gradient(180deg, #1b1f28, #12151c); box-shadow: 0 4px 0 #05060a; font-family: var(--cuerpo); font-size: .86rem; color: var(--texto-2);
  cursor: pointer; user-select: none; transition: transform .06s ease, box-shadow .06s ease, color .15s ease, border-color .15s ease; }
.tecla .teclado kbd.ancha { flex-basis: 320px; }
.tecla .teclado kbd.pulsada { transform: translateY(3px); box-shadow: 0 1px 0 #05060a, 0 0 18px color-mix(in srgb, var(--acento) 55%, transparent);
  border-color: var(--acento); color: var(--acento); }
.tecla .probador__texto { min-height: 2.6rem; margin-top: 1.4rem; padding: .7rem 1rem; border-radius: 12px; background: var(--fondo);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .95rem; color: var(--texto); overflow: hidden; white-space: nowrap; }
.tecla .probador__texto::after { content: "▍"; color: var(--acento); animation: cursor 1s steps(1) infinite; }
@keyframes cursor { 50% { opacity: 0; } }

/* ---------- ratones ---------- */
.tecla .ratones { display: grid; gap: 1rem; }
@media (min-width: 860px) { .tecla .ratones { grid-template-columns: 1fr 1fr; } }
.tecla .raton { display: grid; overflow: hidden; border-radius: 24px; border: 1px solid var(--linea); background: var(--superficie); }
.tecla .raton img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.tecla .raton__info { padding: 1.4rem 1.5rem 1.6rem; }
.tecla .raton h3 { font-size: 1.4rem; }
.tecla .raton ul { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 1.3rem; list-style: none; }
.tecla .raton li { padding: .3rem .65rem; border: 1px solid var(--linea); border-radius: 8px; font-size: .8rem; color: var(--texto-2); }
.tecla .raton__fila { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.tecla .raton__fila b { font-family: var(--display); font-size: 1.5rem; font-weight: 600; }

/* ---------- tienda ---------- */
.tecla .tienda { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.tecla .articulo { display: flex; flex-direction: column; overflow: hidden; border-radius: 20px; border: 1px solid var(--linea); background: var(--superficie);
  transition: border-color .3s ease, transform .3s var(--suave); }
@media (hover: hover) { .tecla .articulo:hover { border-color: color-mix(in srgb, var(--acento) 50%, transparent); transform: translateY(-3px); } }
.tecla .articulo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tecla .articulo__cuerpo { display: flex; flex: 1; flex-direction: column; gap: .4rem; padding: 1rem 1.1rem 1.2rem; }
.tecla .articulo small { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--acento); }
.tecla .articulo h3 { font-family: var(--cuerpo); font-size: 1.05rem; font-weight: 600; letter-spacing: 0; }
.tecla .articulo p { font-size: .88rem; color: var(--texto-2); }
.tecla .articulo__pie { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: .7rem; }
.tecla .articulo__pie b { font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
.tecla .articulo__pie button { padding: .55rem .9rem; border-radius: 10px; background: var(--acento); color: var(--acento-txt); font-size: .84rem; font-weight: 700; }
.tecla .chips { margin-bottom: 1.6rem; }

/* ---------- comparativa ---------- */
.tecla .comparativa { overflow-x: auto; border: 1px solid var(--linea); border-radius: 20px; }
.tecla .comparativa table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: .93rem; }
.tecla .comparativa th, .tecla .comparativa td { padding: 1rem 1.2rem; text-align: left; border-bottom: 1px solid var(--linea); }
.tecla .comparativa thead th { font-family: var(--display); font-size: .95rem; font-weight: 500; }
.tecla .comparativa tbody th { font-weight: 400; color: var(--texto-2); }
.tecla .comparativa .resaltada { background: color-mix(in srgb, var(--acento) 9%, transparent); color: var(--texto); }
.tecla .comparativa thead .resaltada { color: var(--acento); }
.tecla .comparativa tr:last-child > * { border-bottom: 0; }

/* ---------- galería ---------- */
.tecla .galeria { display: grid; gap: .8rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 860px) { .tecla .galeria { grid-template-columns: repeat(3, 1fr); } }
.tecla .galeria button { overflow: hidden; border-radius: 18px; background: var(--fondo-2); }
.tecla .galeria img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .7s var(--suave), opacity .3s ease; }
@media (hover: hover) { .tecla .galeria button:hover img { transform: scale(1.06); opacity: .85; } }
.tecla .lupa { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: clamp(1rem, 4vw, 3rem); background: rgba(3, 4, 6, .95); }
.tecla .lupa img { max-height: min(78vh, 880px); width: auto; margin-inline: auto; border-radius: var(--radio); }
.tecla .lupa figcaption { margin-top: 1rem; text-align: center; font-size: .82rem; color: var(--texto-2); }
.tecla .lupa__cerrar, .tecla .lupa__flecha { position: absolute; display: grid; place-items: center; width: 46px; height: 46px;
  border: 1px solid var(--linea); border-radius: 50%; color: var(--texto); }
.tecla .lupa__cerrar { top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); }
.tecla .lupa__flecha--ant { left: clamp(.6rem, 2.5vw, 2rem); top: 50%; margin-top: -23px; }
.tecla .lupa__flecha--sig { right: clamp(.6rem, 2.5vw, 2rem); top: 50%; margin-top: -23px; }

/* ---------- cierre ---------- */
.tecla .cierre .caja { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .tecla .cierre .caja { grid-template-columns: 1fr 420px; } }
.tecla .cierre input { color: var(--texto); }

@media (max-width: 640px) {
  .tecla .teclado kbd { height: 42px; font-size: .74rem; border-radius: 8px; }
  .tecla .teclado__fila { gap: .3rem; }
  .tecla .teclado { gap: .3rem; }
  .tecla .ficha { grid-template-columns: 1fr 1fr; }
}
