/* Airbills case study - design system */

body.case-study--airbills {
  --ab-orange: #f0670a;
  --ab-orange-deep: #d95508;
  --ab-orange-soft: rgba(240, 103, 10, 0.12);
  --ab-mint: #2d6b4f;
  --ab-mint-soft: rgba(45, 107, 79, 0.12);
  --ab-ink: #0f0f0f;
  --ab-muted: #6b7280;
}

.ab-ds__head {
  max-width: 52ch;
  margin-bottom: clamp(40px, 7vw, 64px);
}

.ab-ds__head p {
  margin: 0;
  line-height: 1.5;
}

/* ── Font panels ── */
.ab-ds-type {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 24px);
  margin-bottom: clamp(32px, 5vw, 48px);
}

.ab-ds-type__panel {
  border-radius: 24px;
  padding: clamp(28px, 4vw, 40px);
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.ab-ds-type__panel--lexend {
  background: linear-gradient(145deg, #1a1a1a 0%, #0f0f0f 55%, #1f1408 100%);
  color: #fff;
  box-shadow: 0 32px 80px rgba(240, 103, 10, 0.18);
}

.ab-ds-type__panel--lexend .ab-ds-type__panel-top h3 {
  color: #fff;
}

.ab-ds-type__panel--lexend .ab-ds-type__weights span {
  color: rgba(255, 255, 255, 0.92);
}

.ab-ds-type__panel--lexend .ab-ds-type__weights em {
  color: rgba(255, 255, 255, 0.45);
  opacity: 1;
}

.ab-ds-type__panel--dm {
  background: linear-gradient(145deg, #fff 0%, #f8f6f2 100%);
  color: var(--ab-ink);
  border: 1px solid rgba(15, 15, 15, 0.08);
  box-shadow: 0 24px 64px rgba(45, 107, 79, 0.1);
}

.ab-ds-type__panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
}

.ab-ds-type__panel-top h3 {
  font-family: "Lexend Deca", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
}

.ab-ds-type__panel--dm .ab-ds-type__panel-top h3 {
  font-family: "DM Sans", sans-serif;
}

.ab-ds-type__badge {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ab-orange);
  color: #fff;
  font-family: "Lexend Deca", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ab-ds-type__badge--mint {
  background: var(--ab-mint);
}

.ab-ds-type__specimen {
  margin: 0 0 8px;
  line-height: 1.1;
}

.ab-ds-type__specimen--lexend {
  font-family: "Lexend Deca", sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--ab-orange);
}

.ab-ds-type__specimen-sub--lexend {
  font-family: "Lexend Deca", sans-serif;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 24px;
}

.ab-ds-type__specimen--dm {
  font-family: "DM Sans", sans-serif;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  line-height: 1.5;
  color: #4a4a4a;
  margin: 0 0 24px;
  max-width: 36ch;
}

.ab-ds-type__alphabet {
  font-size: 13px;
  letter-spacing: 0.04em;
  margin-bottom: auto;
  padding-bottom: 24px;
}

.ab-ds-type__alphabet--lexend {
  font-family: "Lexend Deca", sans-serif;
  color: rgba(255, 255, 255, 0.35);
}

.ab-ds-type__alphabet--dm {
  font-family: "DM Sans", sans-serif;
  color: rgba(15, 15, 15, 0.35);
}

.ab-ds-type__weights {
  list-style: none;
  margin: 0;
  padding: 16px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
}

.ab-ds-type__panel--dm .ab-ds-type__weights {
  border-top-color: rgba(15, 15, 15, 0.08);
}

.ab-ds-type__weights li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.ab-ds-type__weights span {
  font-family: "DM Sans", sans-serif;
}

.ab-ds-type__weights em {
  font-style: normal;
  opacity: 0.45;
  font-family: "Lexend Deca", sans-serif;
  font-size: 12px;
}

/* ── Type scale ── */
.ab-ds-scale {
  display: grid;
  gap: 12px;
  margin-bottom: clamp(48px, 8vw, 72px);
}

.ab-ds-scale__row {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
  padding: clamp(20px, 3vw, 28px) clamp(20px, 3vw, 32px);
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(15, 15, 15, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

.ab-ds-scale__row--button {
  background: linear-gradient(90deg, #fff 0%, var(--ab-orange-soft) 100%);
}

.ab-ds-scale__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ab-ds-scale__tag {
  font-family: "Lexend Deca", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ab-orange);
}

.ab-ds-scale__size {
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  color: var(--ab-muted);
}

.ab-ds-scale__sample {
  margin: 0;
  color: var(--ab-ink);
}

.ab-ds-scale__sample--display {
  font-family: "Lexend Deca", sans-serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
}

.ab-ds-scale__sample--h1 {
  font-family: "Lexend Deca", sans-serif;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 700;
  line-height: 1.15;
}

.ab-ds-scale__sample--h2 {
  font-family: "Lexend Deca", sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  font-weight: 600;
  line-height: 1.2;
}

.ab-ds-scale__sample--body {
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #4a4a4a;
}

.ab-ds-scale__sample--caption {
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  color: var(--ab-muted);
}

.ab-ds-scale__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--ab-orange);
  color: #fff;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(240, 103, 10, 0.28);
}

/* ── Colors ── */
.ab-ds-colors__head {
  margin-bottom: clamp(32px, 5vw, 48px);
}

.ab-ds-colors__head h3 {
  font-family: "Lexend Deca", sans-serif;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  margin: 0 0 8px;
}

.ab-ds-colors__head p {
  margin: 0;
  max-width: 48ch;
  line-height: 1.5;
}

.ab-ds-colors__group + .ab-ds-colors__group {
  margin-top: clamp(28px, 4vw, 40px);
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid rgba(15, 15, 15, 0.08);
}

.ab-ds-colors__group-label {
  margin: 0 0 16px;
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ab-muted);
}

.ab-ds-colors__tokens {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 16px);
}

.ab-ds-colors__tokens--status {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ab-ds-colors__token {
  border: 1px solid rgba(15, 15, 15, 0.08);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.ab-ds-colors__token-color {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 3;
}

.ab-ds-colors__token--status .ab-ds-colors__token-color {
  aspect-ratio: 3 / 1;
}

.ab-ds-colors__token-color--primary { background: #f0670a; }
.ab-ds-colors__token-color--mint { background: #2d6b4f; }
.ab-ds-colors__token-color--dark { background: #0f0f0f; }
.ab-ds-colors__token-color--white {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(15, 15, 15, 0.08);
}

.ab-ds-colors__token-color--success { background: #d4edda; }
.ab-ds-colors__token-color--error { background: #f8d7da; }
.ab-ds-colors__token-color--reversed { background: #fff3cd; }
.ab-ds-colors__token-color--muted { background: #6b7280; }

.ab-ds-colors__token-info {
  padding: 14px 16px 16px;
  display: grid;
  gap: 2px;
}

.ab-ds-colors__token-info strong {
  font-family: "Lexend Deca", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ab-ink);
}

.ab-ds-colors__token-hex {
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ab-muted);
}

.ab-ds-colors__token-role {
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  line-height: 1.5;
  color: #9ca3af;
}

@media (max-width: 900px) {
  .ab-ds-type {
    grid-template-columns: 1fr;
  }

  .ab-ds-scale__row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ab-ds-colors__tokens,
  .ab-ds-colors__tokens--status {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .ab-ds-colors__tokens,
  .ab-ds-colors__tokens--status {
    grid-template-columns: 1fr;
  }

  .ab-ds-type__weights {
    grid-template-columns: 1fr;
  }
}
