/* ============================================================
   AQOON TECH  —  Typography  (css/typography.css)
   Section labels, headings hierarchy, article body styles,
   callouts, code, blockquotes, Somali glossary tooltips
   ============================================================ */

/* ── Section label / eyebrow ── */
.label {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-ui);
  font-size: var(--size-xs);
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: var(--s3);
}
.label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
  flex-shrink: 0;
}
.label.center { justify-content: center; }

/* ── Heading scale ── */
.h-display {
  font-family: var(--font-brand);
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  line-height: 1.1;
  letter-spacing: -.5px;
  color: var(--text);
}

.h-section {
  font-family: var(--font-brand);
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1.18;
  color: var(--text);
  margin-bottom: var(--s3);
}
.h-section .accent { color: var(--blue); }

.h-page {
  font-family: var(--font-brand);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
  color: var(--text);
  margin-bottom: var(--s4);
}

.h-card {
  font-family: var(--font-brand);
  font-size: 15.5px;
  line-height: 1.42;
  color: var(--text);
  transition: color var(--t) var(--ease);
  margin-bottom: var(--s2);
}

/* ── Body sub-heading ── */
.sub-heading {
  font-size: var(--size-base);
  color: var(--text-2);
  line-height: 1.75;
  max-width: 560px;
}
.sub-heading.wide  { max-width: 680px; }
.sub-heading.center { max-width: 600px; margin-inline: auto; text-align: center; }

/* ── Hero headline ── */
.hero-headline {
  font-family: var(--font-brand);
  font-size: clamp(2.5rem, 4.8vw, 4rem);
  line-height: 1.1;
  letter-spacing: -.6px;
  color: var(--text);
}
.hero-headline .highlight {
  color: var(--blue);
  position: relative;
  display: inline-block;
}
.hero-headline .highlight::after {
  content: '';
  position: absolute;
  left: 0; bottom: -5px;
  width: 100%; height: 3px;
  background: var(--blue);
  border-radius: 2px;
  opacity: .35;
}

/* ── Article body typography ── */
.article-body {
  font-size: 16px;
  line-height: 1.88;
  color: var(--text-2);
}

.article-body h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  color: var(--text);
  margin-top: var(--s10);
  margin-bottom: var(--s4);
  padding-bottom: var(--s3);
  border-bottom: 2px solid var(--border);
}

.article-body h3 {
  font-size: clamp(1.08rem, 1.9vw, 1.28rem);
  color: var(--blue-dark);
  margin-top: var(--s8);
  margin-bottom: var(--s3);
}
[data-theme="dark"] .article-body h3 { color: var(--blue); }

.article-body p { margin-bottom: var(--s5); }

.article-body ul,
.article-body ol {
  padding-left: var(--s6);
  margin-bottom: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.article-body ul li { list-style: disc; }
.article-body ol li { list-style: decimal; }

.article-body li {
  font-size: 15.5px;
  line-height: 1.76;
  color: var(--text-2);
}

.article-body strong { color: var(--text); font-weight: 600; }
.article-body em { font-style: italic; }
.article-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

/* ── Somali glossary tooltip ── */
.glossary {
  border-bottom: 2px dashed var(--blue);
  cursor: help;
  color: var(--blue-dark);
  font-weight: 500;
  position: relative;
  transition: color var(--t) var(--ease);
}
[data-theme="dark"] .glossary { color: var(--blue); }
.glossary:hover { color: var(--blue); }

.glossary::before {
  content: '🇸🇴 ' attr(data-so);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--charcoal);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  z-index: var(--z-drop);
  box-shadow: var(--shadow-md);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}
.glossary::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--charcoal);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t) var(--ease);
  z-index: var(--z-drop);
}
.glossary:hover::before,
.glossary:hover::after { opacity: 1; }

/* ── Callout boxes ── */
.callout {
  background: var(--blue-light);
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: var(--s4) var(--s5);
  margin-block: var(--s6);
  font-family: var(--font-ui);
  font-size: var(--size-sm);
  line-height: 1.7;
  color: var(--text);
}
[data-theme="dark"] .callout { background: rgba(74,144,217,.08); }

.callout.success {
  background: rgba(29,158,117,.08);
  border-left-color: var(--green);
}
.callout.warning {
  background: rgba(232,160,32,.08);
  border-left-color: var(--amber);
}
.callout.danger {
  background: rgba(226,75,74,.08);
  border-left-color: var(--red);
}

/* ── Blockquote ── */
.article-body blockquote {
  border-left: 4px solid var(--blue);
  padding: var(--s4) var(--s6);
  margin-block: var(--s6);
  background: var(--bg-alt);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.article-body blockquote p {
  font-size: var(--size-md);
  color: var(--text);
  font-style: italic;
  margin: 0;
}

/* ── Code ── */
.article-body pre {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--s4) var(--s5);
  overflow-x: auto;
  margin-block: var(--s5);
}
.article-body code {
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 13.5px;
  color: var(--blue-dark);
  line-height: 1.7;
}
[data-theme="dark"] .article-body code { color: #7ec8ff; }

/* Inline code */
:not(pre) > code {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  padding: 2px 7px;
  font-size: 13px;
  font-family: 'Fira Code', monospace;
  color: var(--blue-dark);
}
[data-theme="dark"] :not(pre) > code { color: #7ec8ff; }

/* ── Utility text classes ── */
.text-blue   { color: var(--blue); }
.text-muted  { color: var(--text-3); }
.text-sm     { font-size: var(--size-sm); }
.text-xs     { font-size: var(--size-xs); }
.text-center { text-align: center; }
.text-left   { text-align: left; }
.font-brand  { font-family: var(--font-brand); }
.font-ui     { font-family: var(--font-ui); }
.font-600    { font-weight: 600; }
.leading-snug { line-height: 1.35; }
