/* ==========================================================
   TYPOGRAPHY SECTION — Premium Specimen Redesign
   ========================================================== */

/* ── Font Family Grid ── */
.type-families {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 52px;
}

/* ── Font Family Card ── */
.type-family {
  padding: 32px 28px 24px;
  transition: background var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
  display: flex;
  flex-direction: column;
  gap: 0;
}


/* Role badge */
.type-family__role {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.type-family__role::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--g-border-dim);
}

/* Font specimen — the hero */
.type-family__specimen {
  margin-bottom: 24px;
  line-height: 0.88;
  overflow: hidden;
}

/* Per-font specimen styles */
.tfs--sora {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(56px, 6.5vw, 82px);
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 0.88;
}

.tfs--jakarta {
  font-family: var(--f-body);
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 36px);
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1.0;
  white-space: nowrap;
}

.tfs--mono {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 32px);
  letter-spacing: -0.01em;
  color: color-mix(in srgb, var(--c-blue) 55%, white);
  line-height: 1.3;
  white-space: nowrap;
}

.tfs--script {
  font-family: var(--f-script);
  font-weight: 400;
  font-size: clamp(48px, 6vw, 76px);
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 0.9;
}

/* Alphabet tester */
.type-family__alpha {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-3);
  line-height: 1.7;
  margin-bottom: 16px;
  border-top: 1px solid var(--g-border-dim);
  padding-top: 16px;
}

.type-family__alpha--sora     { font-family: var(--f-display); font-weight: 600; }
.type-family__alpha--jakarta  { font-family: var(--f-body); font-weight: 400; }
.type-family__alpha--mono     { font-family: var(--f-mono); font-weight: 400; }
.type-family__alpha--script   { font-family: var(--f-script); font-size: 14px; }

/* Meta row */
.type-family__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.type-family__name {
  font-family: var(--f-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.type-family--mono .type-family__name {
  font-family: var(--f-mono);
  letter-spacing: 0;
}

.type-family__weights {
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

.type-family__use {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 16px;
}

/* Google Fonts link */
.type-family__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-2);
  text-decoration: none;
  letter-spacing: 0.04em;
  opacity: 0.7;
  transition: opacity var(--t-fast);
  margin-top: auto;
}

.type-family__link:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.type-family__link i {
  width: 12px;
  height: 12px;
}

/* ── Section Subtitle ── */
.section-subtitle {
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-subtitle::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--g-border), transparent);
}

/* ── Type Scale ── */
.type-scale {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--g-border);
  background: var(--g-1);
  backdrop-filter: var(--g-blur);
  -webkit-backdrop-filter: var(--g-blur);
  box-shadow: var(--g-shadow-card);
  margin-bottom: 48px;
}

.type-scale__item {
  padding: 24px 32px;
  border-bottom: 1px solid var(--g-border-dim);
  display: grid;
  grid-template-columns: 172px 1fr;
  align-items: center;
  gap: 48px;
  transition: background var(--t-fast);
}

.type-scale__item:last-child {
  border-bottom: none;
}

.type-scale__item:hover {
  background: var(--g-1);
}

.type-scale__spec {
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--text-2);
  white-space: nowrap;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

/* Type scale specimen classes */
.ts-display {
  font-family: var(--f-display);
  font-size: clamp(24px, 3.8vw, 48px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--text);
}

.ts-h2 {
  font-family: var(--f-display);
  font-size: clamp(20px, 2.8vw, 34px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.ts-h3 {
  font-family: var(--f-body);
  font-size: clamp(15px, 1.8vw, 19px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.ts-body {
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.78;
  color: var(--text-2);
}

.ts-label {
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--c-blue) 55%, white);
}

.ts-mono {
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 500;
  color: color-mix(in srgb, var(--c-blue) 55%, white);
  letter-spacing: 0.01em;
}

/* ── Pairing Showcase ── */
.type-pairing {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--g-border);
  background: var(--g-1);
  backdrop-filter: var(--g-blur);
  -webkit-backdrop-filter: var(--g-blur);
  box-shadow: var(--g-shadow-card);
  padding: 40px 44px;
  position: relative;
}

/* Specular line */
.type-pairing::before {
  content: '';
  position: absolute;
  top: 0;
  left: 4%;
  right: 4%;
  height: 1px;
  background: var(--g-specular);
  pointer-events: none;
}

.type-pairing__label {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 28px;
  opacity: 0.7;
}

.type-pairing__headline {
  font-family: var(--f-display);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 8px;
}

.type-pairing__sub {
  font-family: var(--f-script);
  font-size: clamp(20px, 2.5vw, 28px);
  color: var(--accent-2);
  margin-bottom: 20px;
  line-height: 1.1;
}

.type-pairing__body {
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.78;
  color: var(--text-2);
  max-width: 560px;
  margin-bottom: 20px;
}

.type-pairing__tag {
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 10px;
  border: 1px solid var(--g-border);
  border-radius: var(--r-xs);
  display: inline-block;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .type-families {
    grid-template-columns: 1fr;
  }

  .type-scale__item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 20px 22px;
  }

  .type-pairing {
    padding: 28px 24px;
  }
}
