/* ═══════════════════════════════════════
   WoGL — World of GL
   wogl.io | worldofgl.com | mundogl.com
   hello@wogl.io | hola@mundogl.com

   Proprietary. All rights reserved.
   ═══════════════════════════════════════ */
/* Academy's home as a library (home.js): ACADEMY in gold glass (portada.js), a bar (the search, a lesson at random,
   Practice, the ten sections as soft chips) and each section's shelf: its word, its line, its way in, and its ten
   lessons as cards sliding sideways, each with its lesson's picture. */
.biblio { padding-top: clamp(104px, 11vw, 140px); }

/* the bar */
.bib-bar { margin-top: 28px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(13, 10, 8, .94); display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.bib-busca { position: relative; display: flex; align-items: center; height: 48px; padding: 0 12px 0 44px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); transition: border-color .25s; }
.bib-busca:focus-within { border-color: var(--gold); }
.bib-busca svg { position: absolute; left: 16px; width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.bib-busca input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: 400 15px/1 var(--sans); color: var(--cream); }
.bib-busca input::placeholder { color: var(--quiet); }
.bib-busca input::-webkit-search-cancel-button { display: none; }
.bib-bar > .btn { height: 48px; }
.bib-chips { grid-column: 1 / -1; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.bib-chips::-webkit-scrollbar { display: none; }
.bib-chips .chip { flex: none; height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .05); cursor: pointer; font: 400 14px/1 var(--sans); color: rgba(244, 236, 225, .72); transition: background .25s, color .25s; }
.bib-chips .chip:hover { background: rgba(255, 255, 255, .09); color: var(--cream); }
.bib-chips .chip[aria-pressed="true"] { background: #f4ece1; color: #120d09; }
.bib-vacio { margin: 32px 0 0; color: var(--quiet); font-size: 15px; }

/* the shelves */
.estantes { margin-top: 48px; }
.estante[hidden], .bc[hidden] { display: none; }
/* a section's address (#sec-02, from the bars) stops its shelf under the bar */
.estante { scroll-margin-top: 96px; }
.estante + .estante { margin-top: 56px; }
.est-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.est-cab h3 { margin: 0; font: 800 clamp(28px, 3.4vw, 44px)/1 var(--sans); text-transform: uppercase; letter-spacing: -.01em; }
.est-cab h3 a { color: var(--cream); text-decoration: none; transition: color .25s; }
.est-cab h3 a:hover { color: var(--gold); }
.est-cab p { margin: 8px 0 0; max-width: 56ch; font: 300 15px/1.5 var(--sans); color: var(--muted); }
.est-cab .btn { flex: none; }
.est-riel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 300px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: rgba(232, 200, 154, .25) transparent; }

/* a lesson's card */
.bc { position: relative; display: flex; flex-direction: column; padding: 8px; border-radius: 12px; border: 1px solid rgba(232, 200, 154, .07); background: #110e0d; color: inherit; text-decoration: none; scroll-snap-align: start; transition: border-color .35s; }
.bc:hover, .bc:focus-visible { border-color: rgba(232, 200, 154, .22); outline: none; }
.bc-art { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 7px; overflow: hidden; background: #08070a; }
.bc-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .5s; }
.bc-art canvas.on { opacity: 1; }
.bc-body { display: grid; gap: 6px; padding: 14px 8px 6px; }
.bc-t { font: 500 17px/1.2 var(--sans); color: var(--cream); }
.bc-d { font: 400 13.5px/1.45 var(--sans); color: var(--muted); }
/* the card under the pointer: the thin spark of the Atlas and Practice, one slow turn */
@property --chispa { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.bc::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: conic-gradient(from var(--chispa), transparent 0 34%, rgba(232, 200, 154, .3) 42%, rgba(255, 243, 223, .85) 50%, rgba(232, 200, 154, .4) 56%, transparent 64%);
  filter: drop-shadow(0 0 3px rgba(255, 220, 170, .35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: chispa 8s linear infinite paused; }
.bc:hover::after, .bc:focus-visible::after { opacity: 1; animation-play-state: running; }
@keyframes chispa { to { --chispa: 360deg; } }

@media (max-width: 760px) {
  .bib-bar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .bib-busca { grid-column: 1 / -1; }
  .est-cab { flex-direction: column; align-items: flex-start; }
  .est-riel { grid-auto-columns: 78%; margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); }
}
@media (prefers-reduced-motion: reduce) { .bc::after { animation: none; } }

/* a lesson that stands as a light (home.js · pilar): its canvas over the picture; a finger plays on it sideways and
   the page still scrolls up and down */
.bc-art canvas.bc-pilar { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 1; }
.bc-agua { touch-action: pan-y; }
