/* ===========================================================
   GLOSSARY — assets/css/pages/glossary.css
   The Codex Śabdakośa
   =========================================================== */

/* hero */
.gl-hero {
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2rem, 5vw, 3rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.gl-hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(217,164,65,0.10), transparent 55%),
    radial-gradient(circle at 80% 100%, rgba(122,77,223,0.08), transparent 50%);
  pointer-events: none;
}
.gl-hero__deva {
  font-family: var(--ff-deva);
  font-size: clamp(3rem, 8vw, 5rem);
  color: var(--gold-trishul);
  line-height: 1;
  margin-bottom: .4rem;
  text-shadow: 0 0 30px rgba(217,164,65,.35);
}
.gl-hero__eyebrow {
  font-family: var(--ff-caps);
  letter-spacing: .35em;
  font-size: .72rem;
  color: var(--silver-trishul);
  margin: 0 0 .9rem;
  text-transform: uppercase;
}
.gl-hero__title {
  font-family: var(--ff-display);
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  font-weight: 500;
  margin: 0 0 1rem;
  color: var(--ash-vibhuti);
}
.gl-hero__lead {
  font-family: var(--ff-display);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--ash-mute);
  max-width: 56ch;
  margin: 0 auto 1.6rem;
  line-height: 1.6;
}

/* letter ribbon */
.gl-ribbon {
  position: sticky;
  top: 72px;
  z-index: 10;
  background: linear-gradient(180deg, rgba(7,5,15,.92), rgba(7,5,15,.72));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(217,164,65,.18);
  border-bottom: 1px solid rgba(217,164,65,.18);
  margin: 1rem 0 2.5rem;
}
.gl-ribbon ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .25rem;
  padding: .75rem 0;
  margin: 0;
}
.gl-ribbon a {
  display: inline-flex;
  align-items: center; justify-content: center;
  min-width: 34px; height: 34px;
  padding: 0 .5rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--ff-caps);
  font-size: .82rem;
  letter-spacing: .08em;
  color: var(--ash-mute);
  transition: border-color .2s, color .2s, background .2s;
}
.gl-ribbon a:hover {
  color: var(--gold-soft);
  border-color: rgba(217,164,65,.32);
  background: linear-gradient(180deg, rgba(217,164,65,.08), rgba(217,164,65,.01));
}

/* letter group */
.gl-group {
  margin: 0 0 3.5rem;
  scroll-margin-top: 140px;
}
.gl-group__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 0 0 1.4rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid rgba(217,164,65,.22);
}
.gl-group__letter {
  font-family: var(--ff-caps);
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  color: var(--gold-trishul);
  line-height: 1;
  text-shadow: 0 0 20px rgba(217,164,65,.35);
}
.gl-group__count {
  font-family: var(--ff-caps);
  font-size: .65rem;
  letter-spacing: .26em;
  color: var(--ash-mute);
}

/* term grid */
.gl-terms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

/* term card */
.gl-term {
  position: relative;
  padding: 1.1rem 1.15rem 1rem;
  background:
    linear-gradient(180deg, rgba(244,236,216,.035), rgba(244,236,216,.012));
  border: 1px solid rgba(244,236,216,.10);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
  isolation: isolate;
}
.gl-term::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: conic-gradient(from 0deg,
    rgba(217,164,65,0) 0deg,
    rgba(217,164,65,.35) 80deg,
    rgba(122,77,223,.3) 160deg,
    rgba(43,182,255,.25) 240deg,
    rgba(217,164,65,0) 360deg);
  z-index: -1;
  opacity: 0;
  transition: opacity .35s var(--ease);
  border-radius: 16px;
}
.gl-term:hover {
  border-color: rgba(217,164,65,.45);
  transform: translateY(-2px);
}
.gl-term:hover::before { opacity: .55; }

.gl-term__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem;
  margin-bottom: .4rem;
}
.gl-term__deva {
  font-family: var(--ff-deva);
  color: var(--gold-trishul);
  font-size: 1.55rem;
  line-height: 1.2;
  text-shadow: 0 0 12px rgba(217,164,65,.3);
}
.gl-term__ipa {
  font-family: var(--ff-ui);
  font-size: .7rem;
  letter-spacing: .04em;
  color: var(--ash-mute);
  font-style: italic;
}
.gl-term__name {
  font-family: var(--ff-display);
  font-size: 1.18rem;
  font-weight: 500;
  color: var(--ash-vibhuti);
  margin: 0 0 .4rem;
}
.gl-term__body {
  font-family: var(--ff-display);
  font-size: .95rem;
  color: var(--ash-mute);
  line-height: 1.55;
  margin: 0 0 .6rem;
}
.gl-term__see {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .55rem;
}
.gl-term__see a {
  font-family: var(--ff-caps);
  font-size: .56rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: .22rem .5rem;
  border-radius: 999px;
  border: 1px solid rgba(217,164,65,.25);
  color: var(--gold-soft);
  background: linear-gradient(180deg, rgba(217,164,65,.06), rgba(217,164,65,.01));
  transition: border-color .2s, color .2s;
}
.gl-term__see a:hover {
  border-color: var(--gold-trishul);
  color: var(--gold-trishul);
}

/* footer note */
.gl-foot {
  text-align: center;
  padding: 2.5rem 0 4rem;
  font-family: var(--ff-display);
  color: var(--ash-mute);
  font-style: italic;
}

@media (max-width: 700px) {
  .gl-ribbon { top: 64px; }
  .gl-terms { grid-template-columns: 1fr; }
  .gl-term { padding: 1rem; }
}
