/*
 * Academia MG — shared primitives.
 *
 * Only genuinely shared things live here. A component earns its place on its
 * SECOND use, never its first.
 *
 * Type note: Inter tops out at 600. The scale is therefore built on SIZE and
 * TRACKING rather than weight — large type at 500/600 with tight negative
 * tracking reads as editorial; heavy weights read as a dashboard.
 *
 * Depends on tokens.css.
 */

/* --- Brand mark ---------------------------------------------------------- */

.mg-logo {
  height: auto;
  max-height: 34px;
  object-fit: contain;
}

.mg-logo-for-light {
  display: none;
}

html[data-theme='light'] .mg-logo-for-dark {
  display: none;
}

html[data-theme='light'] .mg-logo-for-light {
  display: block;
}

/* --- Editorial type ------------------------------------------------------ */

.display {
  font-size: clamp(3.4rem, 13vw, 11rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.86;
  margin: 0;
}

.headline {
  font-size: clamp(2rem, 5.2vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin: 0;
}

.subhead {
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0;
}

/* The single line that carries a panel. Deliberately light and wide-set. */
.statement {
  color: var(--text-soft);
  font-size: clamp(1.05rem, 1.9vw, 1.5rem);
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 1.4;
  margin: 0;
  max-width: 30ch;
}

.eyebrow {
  align-items: center;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.68rem;
  font-weight: 500;
  gap: 0.55rem;
  letter-spacing: 0.24em;
  margin: 0;
  text-transform: uppercase;
}

.eyebrow-sep {
  color: var(--accent);
}

/* --- Large numerals ------------------------------------------------------ */

.numeral {
  display: block;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  font-size: clamp(3.6rem, 9vw, 8rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.82;
}

.numeral-label {
  color: var(--text-muted);
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  margin-top: 1.1rem;
  text-transform: uppercase;
}

/* --- Rules --------------------------------------------------------------- */

.rule {
  background: var(--border);
  border: 0;
  height: 1px;
  margin: 0;
}

/* --- Links --------------------------------------------------------------- */

.text-link {
  border-bottom: 1px solid var(--border-strong);
  color: var(--text);
  padding-bottom: 1px;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease;
}

.text-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.arrow-link {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 500;
  gap: 0.55rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: gap 180ms cubic-bezier(0.22, 1, 0.36, 1), color 160ms ease;
}

.arrow-link:hover {
  color: var(--accent);
  gap: 0.85rem;
}

/* --- Theme toggle -------------------------------------------------------- */

.theme-btn {
  align-items: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  transition: color 160ms ease, border-color 160ms ease;
  width: 30px;
}

.theme-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.theme-icon-light {
  display: none;
}

html[data-theme='light'] .theme-icon-dark {
  display: none;
}

html[data-theme='light'] .theme-icon-light {
  display: inline;
}
