/* =====================================================
   BRAVE INTANGIBLES — Service Design Glossary
   ===================================================== */

/* --- Controls bar ---------------------------------- */
.glossary-controls {
  background: var(--bg-light);
  padding: 28px 0 0;
  position: sticky;
  top: 72px;
  z-index: 900;
  border-bottom: 1px solid var(--border-light);
}
.glossary-search-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.glossary-search-wrap {
  position: relative;
  flex: 1;
  max-width: 440px;
}
.glossary-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-muted);
  pointer-events: none;
}
.glossary-search {
  width: 100%;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 11px 14px 11px 38px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--text-dark);
  transition: border-color 0.2s;
  outline: none;
}
.glossary-search:focus {
  border-color: var(--magenta);
}
.glossary-search::placeholder {
  color: rgba(74,90,122,0.5);
  font-weight: 400;
}
.glossary-count {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  white-space: nowrap;
}
.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 16px;
}
.filter-pill {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-light);
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s;
}
.filter-pill:hover {
  border-color: var(--magenta);
  color: var(--magenta);
}
.filter-pill.active {
  background: var(--magenta);
  border-color: var(--magenta);
  color: #fff;
}

/* --- No results ------------------------------------ */
.glossary-no-results {
  display: none;
  text-align: center;
  padding: 64px 20px;
  color: var(--text-muted);
}
.glossary-no-results.visible { display: block; }
.glossary-no-results p { font-size: 15px; margin-top: 8px; }

/* --- Foundation card ------------------------------- */
.glossary-foundation {
  padding: 40px 0 0;
}
.glossary-foundation-card {
  background: var(--bg-dark);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  position: relative;
  overflow: hidden;
}
.glossary-foundation-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-brand);
}
.glossary-foundation-eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
  display: block;
}
.glossary-foundation-term {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.1;
}
.glossary-foundation-def {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.78;
  color: rgba(255,255,255,0.82);
  margin-bottom: 20px;
}
.glossary-foundation-example-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 6px;
  display: block;
}
.glossary-foundation-example {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
}
.glossary-foundation-visual {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 28px 24px;
}
.bp-diagram {
  font-family: 'Montserrat', sans-serif;
}
.bp-stages {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}
.bp-stage {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}
.bp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.bp-row-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  width: 80px;
  flex-shrink: 0;
  color: rgba(255,255,255,0.38);
}
.bp-row-bar {
  flex: 1;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 9px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
}
.bp-row--customer .bp-row-bar { background: rgba(0,184,217,0.18); display: flex; justify-content: space-around; }
.bp-row-bar--stages span { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.7); }
.bp-row--front    .bp-row-bar { background: rgba(200,37,122,0.18); }
.bp-row--back     .bp-row-bar { background: rgba(123,47,190,0.14); }
.bp-row--support  .bp-row-bar { background: rgba(255,255,255,0.06); }
.bp-line {
  height: 1px;
  background: rgba(255,255,255,0.18);
  margin: 10px 0;
  position: relative;
}
.bp-line-label {
  position: absolute;
  right: 0;
  top: -9px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  background: var(--bg-dark);
  padding: 0 6px;
}

/* --- Section blocks -------------------------------- */
.glossary-section {
  padding-top: 56px;
}
.glossary-section.hidden { display: none; }
.glossary-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  user-select: none;
}
.glossary-section-header:hover .glossary-section-title { color: var(--magenta); }
.section-toggle-hint {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-left: 4px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.glossary-section-header:hover .section-toggle-hint { opacity: 1; }
.section-chevron {
  margin-left: auto;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.glossary-section.is-open .section-chevron { transform: rotate(180deg); }
.glossary-grid {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.25s ease;
  margin-top: 0;
}
.glossary-section.is-open .glossary-grid {
  max-height: 4000px;
  opacity: 1;
  margin-top: 28px;
}
.glossary-section-num {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--magenta);
}
.glossary-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.01em;
}
.glossary-section-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

/* --- Term card grid -------------------------------- */
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.glossary-card {
  background: #fff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.glossary-card-image {
  width: 100%;
  border-radius: 6px;
  display: block;
  margin: 10px 0 14px;
  object-fit: contain;
}
.glossary-card:hover {
  border-color: rgba(200,37,122,0.28);
  box-shadow: var(--shadow-sm);
}
.glossary-card.hidden { display: none; }
.glossary-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.glossary-term {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: 0.01em;
  line-height: 1.25;
  flex: 1;
}
.glossary-abbr {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--magenta);
  background: rgba(200,37,122,0.08);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
}
.glossary-def {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.72;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 14px;
}
.glossary-example {
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
  margin-top: auto;
}
.glossary-example-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 4px;
  display: block;
}
.glossary-example-text {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.65;
  font-style: italic;
}
.glossary-module-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--purple);
  text-decoration: none;
  transition: color 0.15s;
}
.glossary-module-tag:hover { color: var(--magenta); text-decoration: underline; }
.glossary-module-tag::before {
  content: '↗';
  font-size: 9px;
}

/* --- Bottom CTA ------------------------------------ */
.glossary-cta {
  margin-top: 80px;
  padding: 48px 44px;
  background: var(--bg-dark);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.glossary-cta-text h3 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.glossary-cta-text p {
  font-size: 15px;
  font-weight: 300;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  max-width: 480px;
}
.glossary-cta-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* --- Responsive ------------------------------------ */
@media (max-width: 1024px) {
  .glossary-grid { grid-template-columns: repeat(2, 1fr); }
  .glossary-foundation-card { grid-template-columns: 1fr; gap: 28px; }
  .glossary-cta { flex-direction: column; text-align: center; }
  .glossary-cta-actions { justify-content: center; }
}
@media (max-width: 768px) {
  .glossary-controls { top: 0; }
  .glossary-grid { grid-template-columns: 1fr; }
  .glossary-foundation-card { padding: 28px 24px; }
  .glossary-cta { padding: 32px 24px; }
  .filter-pills { gap: 6px; }
  .filter-pill { font-size: 10px; padding: 5px 12px; }
}
@media (max-width: 480px) {
  .glossary-search-row { flex-direction: column; align-items: stretch; }
  .glossary-count { text-align: center; }
}
