/* sol · web: help (docs/ESPEC.md 4.5). Owner: pages. Shared parts are in paginas.css. */

/* ---------- hero: quick jumps ---------- */
.ay-jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(28px, 3vw, 44px); }
.ay-jump a {
  display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 18px;
  border-radius: var(--radius-pill); border: 1px solid var(--line-2); background: rgba(244, 241, 234, .035);
  color: var(--text); text-decoration: none; font: 500 .9375rem/1 var(--font-body);
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.ay-jump a:hover { border-color: rgba(201, 169, 97, .45); background: rgba(201, 169, 97, .08); transform: translateY(-1px); }
.ay-jump .ic { width: 18px; height: 18px; color: var(--gold); }

.ay-sec .section-head { margin-bottom: clamp(28px, 3vw, 48px); }

/* ---------- the drawing: piano, cable, phone ---------- */
.ay-ilus {
  overflow: hidden; /* the close-up on phones runs to the card's rounded edge */
  margin: 0 0 clamp(28px, 3.4vw, 56px); padding: clamp(12px, 3vw, 40px) clamp(8px, 3vw, 48px);
  border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: var(--lacquer-sheen), radial-gradient(80% 90% at 50% 100%, rgba(201, 169, 97, .06), transparent 70%), linear-gradient(180deg, #0e0e11, #07070a);
}
.cx { width: 100%; height: auto; overflow: visible; }
.cx-label { font: 600 8px/1 var(--font-body); letter-spacing: .1em; fill: rgba(244, 241, 234, .6); }
/* phones: ayuda.js shows a closer view of the port, the cable and the phone, and the label on two larger lines */
.cx-label.is-near { font-size: 26px; letter-spacing: .04em; fill: rgba(244, 241, 234, .78); }
.cx-pulse { opacity: .45; filter: drop-shadow(0 0 4px rgba(234, 211, 154, .8)); } /* still: the cable simply glows */
.cx-hit { opacity: 1; }
/* with motion the drawing rests (the cable dark, the keys unlit) and plays once, 3 s, each time it comes into view
   (ayuda.js adds .is-playing and takes it off at the end): a key, the note along the cable, sol on the phone.
   The last frame is the resting one, so nothing jumps, and nothing moves for more than 5 s beside the steps (WCAG 2.2.2). */
@media (prefers-reduced-motion: no-preference) {
  .cx-pulse { stroke-dasharray: 22 300; stroke-dashoffset: -280; opacity: 0; }
  .cx-hit { opacity: 0; }
  .ay-ilus.is-playing .cx-pulse { animation: cx-run 3s var(--ease) both; }
  .ay-ilus.is-playing .cx-hit-a { animation: cx-hit-a 3s ease-out both; }
  .ay-ilus.is-playing .cx-hit-b { animation: cx-hit-b 3s ease-out both; }
  .ay-ilus.is-playing .cx-fall { animation: cx-fall 3s linear both; }
}
@keyframes cx-run { 0% { stroke-dashoffset: 22; opacity: 0; } 6% { opacity: 1; } 54% { stroke-dashoffset: -280; opacity: 1; } 60%, 100% { stroke-dashoffset: -280; opacity: 0; } }
@keyframes cx-hit-a { 0% { opacity: 1; } 28%, 100% { opacity: 0; } }
@keyframes cx-hit-b { 0%, 52% { opacity: 0; } 58% { opacity: 1; } 90%, 100% { opacity: 0; } }
@keyframes cx-fall { from { transform: translateY(0); } to { transform: translateY(120px); } }

/* ---------- cable and steps ---------- */
.ay-grid { display: grid; gap: clamp(16px, 2vw, 28px); grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: stretch; }
@media (max-width: 900px) { .ay-grid { grid-template-columns: 1fr; } }
.ay-block { padding: clamp(22px, 3vw, 40px); border-radius: var(--radius-card); border: 1px solid var(--line); background: var(--surface); }
.ay-block > .h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ay-h-ic { width: 22px; height: 22px; color: var(--gold); }
.ay-block .muted { max-width: 58ch; }
.ay-options { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 20px 0; }
@media (max-width: 560px) { .ay-options { grid-template-columns: 1fr; } }
.ay-option { padding: 18px 18px 16px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(244, 241, 234, .03), rgba(244, 241, 234, .01)); }
.ay-option h4 { margin: 12px 0 4px; font: 600 1.02rem/1.3 var(--font-display); letter-spacing: -.01em; }
.ay-option p { margin: 0; color: var(--text-2); font-size: .9375rem; }
.ay-plugs { width: 100%; height: auto; }
.ay-plug-cap { margin: 6px 0 0; color: var(--text-3); font-size: .875rem; font-weight: 600; letter-spacing: .04em; }
.ay-plug-cap span { color: var(--gold); margin: 0 2px; }
.ay-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ay-notes li, .ay-tip { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 14px 16px; border-radius: 14px; background: rgba(201, 169, 97, .07); border: 1px solid rgba(201, 169, 97, .2); color: var(--text-2); font-size: .9375rem; }
.ay-notes .ic, .ay-tip .ic { width: 18px; height: 18px; color: var(--gold); margin-top: 2px; }
.ay-notes strong, .ay-tip strong { color: var(--text); }
.ay-steps { list-style: none; margin: 8px 0 20px; padding: 0; display: grid; gap: 4px; counter-reset: none; }
.ay-steps li { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; padding: 10px 0 14px; }
.ay-steps li:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 50px; bottom: -6px; width: 1px; background: linear-gradient(180deg, rgba(201, 169, 97, .5), rgba(201, 169, 97, .05)); }
.ay-n { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--gold-grad); color: var(--on-gold); font: 600 1rem/1 var(--font-display); box-shadow: var(--shadow-gold-btn); }
.ay-steps p { margin: 0; padding-top: 8px; color: var(--text); font-size: 1.0625rem; }
.ay-steps strong { color: var(--gold-hi); }
.ay-win { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.ay-win .h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; }
.ay-win p { margin: 0; color: var(--text-2); }
.ay-trouble { margin-top: clamp(16px, 2vw, 28px); padding: clamp(22px, 3vw, 40px); border-radius: var(--radius-card); border: 1px solid var(--line); background: var(--lacquer-sheen), var(--surface); }
.ay-trouble .h3 { margin-bottom: 16px; }
/* five steps: all in one row when they fit; otherwise the last row's cards share it whole (never one card and a hole) */
.ay-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; counter-reset: ay; }
.ay-checklist li { flex: 1 1 210px; counter-increment: ay; position: relative; padding: 16px 16px 16px 52px; border-radius: 14px; background: rgba(244, 241, 234, .03); border: 1px solid var(--line); color: var(--text-2); }
.ay-checklist li::before { content: counter(ay); position: absolute; left: 16px; top: 15px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(201, 169, 97, .5); color: var(--gold-hi); font: 600 .875rem/1 var(--font-display); }
.ay-checklist a { color: var(--gold-hi); }

/* ---------- the piano check ---------- */
.ay-check {
  position: relative; overflow: hidden; display: grid; gap: clamp(20px, 2.6vw, 36px);
  padding: clamp(24px, 4vw, 64px); border-radius: var(--radius-lg); border: 1px solid var(--line-2);
  background: radial-gradient(70% 80% at 85% 0%, rgba(201, 169, 97, .12), transparent 60%), var(--lacquer-sheen), linear-gradient(180deg, #121215, #09090b);
}
.ay-check-copy .lead { margin-top: var(--s-4); }
.ay-check-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin-top: var(--s-6); }
.ay-check-status { margin: 0; min-height: 1.6em; color: var(--text-2); max-width: 52ch; }
.ay-check[data-midi="on"] .ay-check-status { color: var(--ok); }
.ay-check[data-midi="denied"] .ay-check-status, .ay-check[data-midi="error"] .ay-check-status, .ay-check[data-midi="blocked"] .ay-check-status { color: var(--wrong); }
.ay-check.is-heard .ay-check-status::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); vertical-align: 1px; }
.ay-keys { position: relative; padding: 0; border-radius: 14px; overflow: hidden; background: linear-gradient(180deg, #050506 0%, #0a0a0c 100%); border: 1px solid var(--line); }
.ay-keys-cv { display: block; width: 100%; height: 110px; }
.ay-readout { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 0; }
.ay-readout div { display: grid; gap: 2px; }
.ay-readout dt { color: var(--text-3); font-size: .875rem; }
.ay-readout dd { margin: 0; font: 600 1.4rem/1.2 var(--font-display); color: var(--gold-hi); min-width: 3ch; }
.ay-check-note { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--text-3); font-size: .9375rem; }
.ay-check .noscript { margin: var(--s-6) 0 0; }
.ay-check-note .ic { color: var(--gold); width: 18px; height: 18px; }

/* ---------- without a piano ---------- */
.ay-ways { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(12px, 1.6vw, 24px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.ay-ways .card h3 { font-size: 1.2rem; }
.ay-kbd { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px !important; }
.ay-kbd kbd {
  display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px;
  background: linear-gradient(180deg, #f3eee3, #ddd5c3); color: #1d1608; font: 600 .875rem/1 var(--font-display);
  box-shadow: 0 2px 0 #a99f8b, 0 4px 10px -4px rgba(0, 0, 0, .8);
}
.ay-acoustic { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: clamp(16px, 2vw, 28px); padding: 20px 24px; border-radius: var(--radius-card); border: 1px dashed var(--line-2); }
.ay-acoustic p { margin: 0; color: var(--text-2); max-width: 62ch; }

/* ---------- questions ---------- */
.ay-faq-wrap { display: grid; gap: 0 clamp(32px, 4vw, 72px); }
.ay-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 clamp(24px, 3vw, 40px); }
.ay-cats .pill { min-height: 44px; text-decoration: none; font-size: .9375rem; }
.ay-faq { display: grid; gap: clamp(28px, 3vw, 44px); max-width: 920px; min-width: 0; }
@media (min-width: 1000px) {
  .ay-faq-wrap { grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
  .ay-cats { position: sticky; top: calc(var(--header-h) + 28px); flex-direction: column; flex-wrap: nowrap; gap: 4px; margin: 0; padding: 8px; border-radius: var(--radius-card); border: 1px solid var(--line); background: var(--surface); }
  .ay-cats .pill { justify-content: flex-start; border-color: transparent; background: none; border-radius: 12px; color: var(--text-2); }
  .ay-cats .pill:hover { background: rgba(244, 241, 234, .05); color: var(--text); }
  .ay-cats .pill.is-here { background: rgba(201, 169, 97, .12); color: var(--gold-hi); }
}
/* anchors (#conectar, #faq-piano, #p-<id>…) land as on every page of the site: under the header, by base.css's
   scroll-padding-top, with no scroll-margin of their own. The sticky topics list sits beside the questions, never above
   them, so it covers nothing; ayuda.js centres an opened question itself. */
.ay-faq-cat { margin-bottom: 14px; font: 600 var(--fs-eyebrow)/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.ay-faq summary { min-height: 44px; }
.ay-faq .answer p { margin: 0 0 .8em; }
.ay-faq .answer p:last-child { margin-bottom: 0; }
.ay-faq .answer a { color: var(--gold-hi); }

/* ---------- contact ---------- */
.ay-contact { display: grid; gap: clamp(16px, 2vw, 28px); grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: stretch; }
@media (max-width: 860px) { .ay-contact { grid-template-columns: 1fr; } }
.ay-mail, .ay-bugs { padding: clamp(24px, 3.6vw, 52px); border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--lacquer-sheen), var(--surface); }
.ay-mail .lead { margin-top: var(--s-4); }
.ay-mail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: var(--s-5); }
.ay-mail-link { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; color: var(--gold-hi); font: 600 clamp(1.1rem, .9rem + 1vw, 1.6rem)/1.2 var(--font-display); letter-spacing: -.01em; text-decoration: none; overflow-wrap: anywhere; }
.ay-mail-link:hover { color: var(--text); }
.ay-mail-link .ic { width: 24px; height: 24px; flex: none; }
.ay-bugs { display: grid; align-content: start; gap: 8px; }
.ay-bugs .card-ic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: rgba(201, 169, 97, .1); color: var(--gold); margin-bottom: 8px; }
.ay-bugs .card-ic .ic { width: 22px; height: 22px; }
.ay-bugs p { margin: 0; color: var(--text-2); }
.ay-bugs strong { color: var(--text); }
