/* Garage Music Aprende — misma familia visual que garagemusic.ar */
:root {
  --page: #0d0b10;
  --ink: #161615;
  --card: #1b1a1d;
  --card2: #232127;
  --line: rgba(255, 255, 255, .09);
  --text: #f3efe9;
  --muted: #a39d97;
  --gold: #f8c858;
  --red: #cf0200;
  --ig: #cc1f85;
  --green: #10c03e;
  --display: "League Gothic", Oswald, "Arial Narrow", Impact, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --back: cubic-bezier(.34, 1.56, .64, 1);
  --r: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(204, 31, 133, .14), transparent 60%),
              radial-gradient(900px 500px at -10% 10%, rgba(207, 2, 0, .12), transparent 60%), var(--page);
  color: var(--text); font: 400 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
main { flex: 1; width: min(1180px, 100% - 2rem); margin: 0 auto; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .02em; line-height: 1; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.ok { color: var(--green); font-weight: 600; }
.hp { position: absolute; left: -9999px; }
.eyebrow { font-family: var(--display); color: var(--gold); letter-spacing: .12em; text-transform: uppercase; font-size: 1.1rem; margin: 0 0 .3rem; }

/* Botones */
.btn {
  --bg: var(--text); --fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.3rem; border-radius: 999px; border: 2px solid transparent;
  background: var(--bg); color: var(--fg); text-decoration: none;
  font-family: var(--display); font-size: 1.35rem; letter-spacing: .05em; text-transform: uppercase; line-height: 1;
  transition: transform .3s var(--back), background-color .2s, box-shadow .3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .8); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn--sm { font-size: 1.1rem; padding: .55rem 1rem; }
.btn--big { font-size: 1.6rem; padding: 1rem 1.8rem; }
.btn--red { --bg: var(--red); --fg: #fff; }
.btn--green { --bg: var(--green); --fg: #fff; }
.btn--ghost { --bg: transparent; --fg: var(--text); border-color: rgba(255, 255, 255, .25); }
.btn--ghost:hover { --bg: rgba(255, 255, 255, .06); }
.ico { width: 1.3em; height: 1.3em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.chip {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: .45rem .95rem;
  font-size: .9rem; transition: background-color .2s, border-color .2s, color .2s, transform .25s var(--back);
}
.chip:hover { border-color: rgba(255, 255, 255, .3); }
.chip.is-on { background: var(--gold); color: var(--ink); border-color: var(--gold); font-weight: 600; }
.sel { display: inline-flex; flex-direction: column; gap: .25rem; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
select, input:not([type=checkbox]):not([type=range]) {
  background: var(--card2); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: .65rem .8rem; font: inherit; font-size: 1rem; text-transform: none; letter-spacing: 0;
}
select:focus, input:focus { outline: none; border-color: var(--gold); }

/* Encabezado */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .55rem max(1rem, calc((100% - 1180px) / 2));
  background: rgba(13, 11, 16, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top__logo img { width: 84px; height: auto; transition: transform .4s var(--back); }
.top__logo:hover img { transform: rotate(-3deg) scale(1.04); }
.top__nav { display: flex; gap: clamp(.8rem, 3vw, 2rem); }
.top__nav a { font-family: var(--display); font-size: 1.35rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: var(--muted); transition: color .2s; position: relative; }
.top__nav a:hover, .top__nav a[aria-current] { color: var(--text); }
.top__nav a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--gold); }

/* Portada */
.hero { text-align: center; padding: clamp(2rem, 6vw, 4rem) 0 2rem; }
.hero__logo { width: min(340px, 78vw); margin: 0 auto 1.4rem; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .6)); animation: drop .9s var(--back) both; }
.hero__title { font-size: clamp(3.2rem, 11vw, 6.5rem); }
.hero__title span { display: block; color: var(--gold); }
.hero__lead { color: var(--muted); max-width: 34rem; margin: .8rem auto 2rem; font-size: 1.08rem; }
.hero__tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; max-width: 760px; margin: 0 auto; }
.tool {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 1rem; align-items: center;
  text-align: left; text-decoration: none; padding: 1.2rem 1.4rem; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--line);
  transition: transform .4s var(--back), border-color .3s, background-color .3s;
  animation: rise .8s var(--ease) both; animation-delay: .25s;
}
.tool + .tool { animation-delay: .35s; }
.tool svg { grid-row: span 2; width: 52px; height: 52px; color: var(--gold); }
.tool strong { font-family: var(--display); font-size: 2rem; font-weight: 400; text-transform: uppercase; line-height: 1; }
.tool span { color: var(--muted); font-size: .88rem; }
.tool:hover { transform: translateY(-4px); border-color: var(--gold); background: var(--card2); }
.tool--metro svg { color: var(--ig); }
.tool--metro:hover { border-color: var(--ig); }
@keyframes drop { from { opacity: 0; transform: translateY(-20px) scale(.92); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.cursos { padding: 3rem 0 2rem; }
.cursos__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.cursos__head h2 { font-size: clamp(2.6rem, 6vw, 3.6rem); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.1rem; }
.card {
  display: flex; flex-direction: column; text-decoration: none; border-radius: var(--r); overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  transition: transform .45s var(--back), border-color .3s, box-shadow .45s;
  animation: rise .7s var(--ease) both; animation-delay: calc(var(--i) * 45ms);
}
.card[hidden] { display: none; }
.card:hover { transform: translateY(-6px); border-color: rgba(248, 200, 88, .6); box-shadow: 0 24px 40px -24px rgba(0, 0, 0, .9); }
.card__img { position: relative; aspect-ratio: 4 / 3; background: #fff; overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 1s var(--ease); }
.card:hover .card__img img { transform: scale(1.06); }
.card__img--empty { display: grid; place-items: center; background: linear-gradient(135deg, var(--red), var(--ig)); }
.card__img--empty span { font-family: var(--display); font-size: 3rem; text-transform: uppercase; color: #fff; }
.card__img em { position: absolute; left: .7rem; top: .7rem; font-style: normal; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--ink); color: var(--gold); padding: .25rem .55rem; border-radius: 6px; }
.card__body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card__body h3 { font-size: 1.9rem; }
.card__body p { color: var(--muted); font-size: .9rem; margin: 0; flex: 1; }
.card__body small { color: var(--gold); font-weight: 600; font-size: .78rem; letter-spacing: .04em; }
.bar { height: 5px; background: rgba(255, 255, 255, .08); border-radius: 9px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--green)); border-radius: inherit; transition: width .8s var(--ease); }
.bar--big { height: 8px; flex: 1; }

.cta { text-align: center; margin: 3rem 0 4rem; padding: 2.5rem 1.5rem; border-radius: var(--r); background: linear-gradient(135deg, rgba(207, 2, 0, .25), rgba(204, 31, 133, .2)); border: 1px solid var(--line); }
.cta h2 { font-size: clamp(2.2rem, 5vw, 3rem); }
.cta p { color: var(--muted); }
.cta__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: 1.2rem; }

.foot { border-top: 1px solid var(--line); padding: 1.5rem 1rem 2rem; text-align: center; color: var(--muted); font-size: .85rem; }

/* Afinador */
.tuner { padding: 1.5rem 0 3rem; display: grid; gap: 1.2rem; }
.picker { display: grid; gap: .7rem; }
.picker__group { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.picker__group > span { font-family: var(--display); font-size: 1.15rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); min-width: 7.2rem; }
.tuner__panel { background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--r) + 6px); padding: clamp(1rem, 3vw, 2rem); display: grid; gap: 1.2rem; justify-items: center; }
.tuner__opts { display: flex; flex-wrap: wrap; gap: .8rem; align-items: end; justify-content: center; min-height: 1px; }
.meter { position: relative; width: min(460px, 100%); text-align: center; transition: opacity .3s; }
.meter.is-idle { opacity: .55; }
.meter__dial { width: 100%; overflow: visible; }
.meter__dial line { stroke: rgba(255, 255, 255, .35); stroke-width: 2; }
.meter__dial .tick0 { stroke: var(--green); stroke-width: 3; }
.meter__needle { transform-origin: 150px 150px; transition: transform .18s var(--ease); }
.meter__needle line { stroke: var(--text); stroke-width: 4; stroke-linecap: round; }
.meter__needle circle { fill: var(--text); }
.meter.is-near .meter__needle line, .meter.is-near .meter__needle circle { stroke: var(--gold); fill: var(--gold); }
.meter.is-ok .meter__needle line, .meter.is-ok .meter__needle circle { stroke: var(--green); fill: var(--green); }
.meter__note { margin-top: -1.2rem; font-family: var(--display); line-height: .9; }
.meter__name { font-size: clamp(5rem, 22vw, 8rem); transition: color .2s; }
.meter__oct { font-size: 2.4rem; color: var(--muted); vertical-align: top; margin-left: .15rem; }
.meter.is-ok .meter__name { color: var(--green); text-shadow: 0 0 30px rgba(16, 192, 62, .5); }
.meter__sub { display: flex; justify-content: center; gap: 1.1rem; color: var(--muted); font-variant-numeric: tabular-nums; min-height: 1.6em; }
.meter__extra { min-height: 2.2rem; margin-top: .4rem; display: grid; gap: .4rem; justify-items: center; }
.harp { background: var(--card2); padding: .45rem .9rem; border-radius: 999px; font-size: .95rem; }
.harp b { color: var(--gold); }
.intervalo { margin: 0; }
.intervalo b { color: var(--gold); }
.hist { list-style: none; padding: 0; margin: .3rem 0 0; display: grid; gap: .2rem; width: min(360px, 90vw); font-size: .85rem; }
.hist li { display: grid; grid-template-columns: 1fr auto 4.5rem; gap: .6rem; padding: .3rem .6rem; border-radius: 8px; background: var(--card2); text-align: left; animation: rise .35s var(--ease); }
.hist li:first-child { outline: 1px solid rgba(248, 200, 88, .45); }
.hist b { font-family: var(--display); font-size: 1.15rem; font-weight: 400; color: var(--gold); }
.hist em { color: var(--muted); font-style: normal; text-align: right; }
.strings { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.string {
  min-width: 64px; padding: .5rem .7rem; border-radius: 12px; border: 1px solid var(--line); background: var(--card2);
  display: flex; flex-direction: column; align-items: center; line-height: 1.1;
  transition: border-color .2s, background-color .2s, transform .25s var(--back);
}
.string b { font-family: var(--display); font-weight: 400; font-size: 1.7rem; }
.string small { color: var(--muted); font-size: .72rem; }
.string:hover { transform: translateY(-2px); }
.string.is-active, .string.is-sel { border-color: var(--gold); background: rgba(248, 200, 88, .1); }
.string.is-on { border-color: var(--text); }
.string.is-done b { color: var(--green); }
.string--parche { min-width: 120px; }
.tuner__actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: center; }
.btn.is-live { --bg: var(--red); --fg: #fff; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(207, 2, 0, .0), 0 0 0 0 rgba(207, 2, 0, .5); } 0%, 100% { box-shadow: 0 0 0 0 rgba(207, 2, 0, .45); } }
.calib { color: var(--muted); font-size: .9rem; display: flex; align-items: center; gap: .4rem; }
.calib select { padding: .35rem .5rem; }
.level { width: min(320px, 80%); height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.level i { display: block; height: 100%; background: var(--green); transform-origin: left; transform: scaleX(0); transition: transform .08s linear; }
.tuner__help { color: var(--muted); max-width: 40rem; text-align: center; margin: 0 auto; font-size: .92rem; }
.tuner__err { color: #ff6b5b; margin: 0; text-align: center; }
.tuner__err:empty { display: none; }
.downloads { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.4rem; }
.downloads h2 { font-size: 1.9rem; }
.downloads p { color: var(--muted); margin: .4rem 0 1rem; }
.downloads__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.dl { display: flex; flex-direction: column; padding: .9rem 1.1rem; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); text-decoration: none; transition: border-color .2s, transform .3s var(--back); }
.dl:hover { border-color: var(--gold); transform: translateY(-2px); }
.dl strong { font-family: var(--display); font-weight: 400; font-size: 1.5rem; text-transform: uppercase; }
.dl span { color: var(--muted); font-size: .85rem; }

/* Metrónomo */
.metro { padding: 2rem 0 3rem; display: grid; gap: 1.5rem; justify-items: center; max-width: 640px; }
.metro__beats { display: flex; gap: .8rem; min-height: 40px; }
.metro__beats i { width: 30px; height: 30px; border-radius: 50%; background: var(--card2); border: 2px solid var(--line); transition: transform .08s, background-color .08s; }
.metro__beats i.acc { border-color: var(--gold); }
.metro__beats i.on { background: var(--text); transform: scale(1.25); }
.metro__beats i.acc.on { background: var(--gold); }
.metro__bpm { display: flex; align-items: center; gap: 1.4rem; }
.metro__value { text-align: center; font-family: var(--display); line-height: .9; }
.metro__value output { display: block; font-size: clamp(6rem, 26vw, 9rem); font-variant-numeric: tabular-nums; }
.metro__value span { font-size: 1.5rem; color: var(--muted); letter-spacing: .1em; }
.metro__value em { display: block; font-style: normal; color: var(--gold); font-size: 1.4rem; letter-spacing: .06em; margin-top: .3rem; text-transform: uppercase; }
.round { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 2rem; touch-action: manipulation; transition: background-color .2s, transform .2s var(--back); }
.round:active { transform: scale(.92); background: var(--card2); }
.metro__slider { width: 100%; accent-color: var(--gold); }
.metro__row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.metro__actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.flash { animation: flash .25s; }
@keyframes flash { 0% { background: var(--gold); color: var(--ink); } }

/* Curso */
.course { padding: 1.5rem 0 3rem; }
.back { color: var(--muted); text-decoration: none; font-size: .9rem; display: inline-block; margin-bottom: 1rem; }
.back:hover { color: var(--text); }
.course__head h1 { font-size: clamp(3rem, 9vw, 5rem); }
.course__lead { color: var(--muted); max-width: 44rem; margin: .5rem 0 1rem; }
.course__meta { display: flex; align-items: center; gap: 1rem; max-width: 520px; color: var(--muted); font-size: .85rem; }
.course__links { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.2rem 0 1.6rem; }
.course__body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.4rem; align-items: start; }
.stage { scroll-margin-top: 90px; min-height: 200px; }
.stage__locked { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: var(--r); background: var(--card); color: var(--muted); }
.player { border-radius: var(--r); overflow: hidden; background: #000; aspect-ratio: 4 / 3; max-height: 70vh; }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.stage__nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin-top: 1rem; }
.stage__nav h2 { font-size: 2rem; }
.stage__nav div { display: flex; gap: .5rem; flex-wrap: wrap; }
.doc { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.doc__frame { width: 100%; height: 72vh; border: 0; display: block; background: #fff; }
.doc__mobile { display: none; padding: 2rem 1rem 1rem; text-align: center; }
.doc__mobile--show { display: block; }
.doc__mobile small { color: var(--muted); }
.doc__big { font-size: 3.5rem; }
.doc__btns { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; padding: 1rem; border-top: 1px solid var(--line); }
.tracks { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem; }
.tracks audio { width: 100%; }
.tracks__list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .4rem; max-height: 50vh; overflow: auto; }
.tracks__list button { width: 100%; padding: .55rem .4rem; border-radius: 9px; border: 1px solid var(--line); background: var(--card2); font-size: .85rem; transition: border-color .2s, background-color .2s; }
.tracks__list button:hover { border-color: rgba(255, 255, 255, .3); }
.tracks__list button.is-on { background: var(--gold); color: var(--ink); border-color: var(--gold); font-weight: 700; }
.lessons { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow: auto; }
.lessons h2 { font-size: 1.7rem; margin: .2rem .3rem .8rem; }
.lessons ol { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.lessons button { width: 100%; display: flex; gap: .8rem; align-items: center; text-align: left; padding: .6rem .7rem; border-radius: 10px; border: 1px solid transparent; background: none; transition: background-color .2s, border-color .2s; }
.lessons button:hover { background: var(--card2); }
.lessons .is-current button { background: var(--card2); border-color: rgba(248, 200, 88, .5); }
.lessons__ico { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); font-size: .85rem; }
.lessons .is-done .lessons__ico { background: var(--green); color: #fff; font-weight: 700; }
.lessons__txt { display: flex; flex-direction: column; line-height: 1.25; }
.lessons__txt b { font-weight: 600; font-size: .95rem; }
.lessons__txt small { color: var(--muted); font-size: .78rem; }
.credit { color: var(--muted); font-size: .78rem; margin: .8rem .3rem 0; }
.credit:empty { display: none; }

.gate { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; background: rgba(13, 11, 16, .82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); overflow: auto; animation: fade .3s; }
.gate[hidden] { display: none; }
.gate__card { width: min(440px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--r) + 4px); padding: 1.6rem; display: grid; gap: .8rem; text-align: center; animation: rise .5s var(--ease); }
.gate__card img { margin: 0 auto; }
.gate__card h2 { font-size: 2.1rem; }
.gate__card p { color: var(--muted); margin: 0; font-size: .92rem; }
.gate__card label { display: grid; gap: .3rem; text-align: left; font-size: .85rem; color: var(--muted); }
.gate__card label.check { display: flex; gap: .5rem; align-items: start; font-size: .82rem; }
.gate__card .check input { margin-top: .2rem; accent-color: var(--gold); }
.gate__err { color: #ff6b5b !important; }
.gate__err:empty { display: none; }
@keyframes fade { from { opacity: 0; } }

@media (max-width: 900px) {
  .course__body { grid-template-columns: 1fr; }
  .lessons { position: static; max-height: none; }
  .doc__frame { display: none; }
  .doc__mobile { display: block; }
}
@media (max-width: 600px) {
  .top__logo img { width: 66px; }
  .top__nav a { font-size: 1.2rem; }
  .hero__tools { grid-template-columns: 1fr; }
  .picker__group > span { min-width: 100%; }
  .meter__note { margin-top: -.6rem; }
  .round { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
