/* ==========================================================================
   K03 — Typography & Annotation (kit/typography.html)
   Pairings, fluid scale, craft details, notation, annotation, reading.
   ========================================================================== */

/* ---- Header ----------------------------------------------------------- */

/* Circled word in the headline (stroke drawn by [data-mark]) */
.hero-mark {
  font-style: var(--em-style);
}

/* Intro paragraph directly followed by rows (less space below) */
.section-intro--tight {
  margin-bottom: 16px;
}

/* ---- 01 Pairings ------------------------------------------------------ */
.pairings {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

.pairing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 20px 48px;
  align-items: end;
  padding: 32px clamp(16px, 2.5vw, 32px);
  border-bottom: 1px solid var(--line);
}

/* Rows scoped to a preset paint their own canvas */
.pairing[data-preset] {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--f-body);
}

.pairing__label {
  margin-bottom: 12px;
}

.pairing__sample {
  font-family: var(--f-display);
  font-weight: var(--d-weight);
  font-style: var(--em-style);
  font-size: clamp(48px, 6vw, 96px);
  line-height: .95;
  letter-spacing: var(--d-track);
  text-transform: var(--d-case);
}

.pairing__sample--hand {
  font-family: var(--f-hand);
  font-weight: 500;
  font-style: normal;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  color: var(--accent-text);
  transform: rotate(-2deg);
  transform-origin: left;
}

.pairing__text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pairing__body {
  margin: 0;
  max-width: 34em;
  font-size: var(--body-size);
  line-height: 1.55;
  text-wrap: pretty;
}

.pairing__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted);
}

.pairing__spec-value {
  color: var(--ink);
}

/* ---- 02 Fluid scale ---------------------------------------------------
   Each sample sets its step inline:  style="--size: var(--t-h1); --lh: 1" */
.scale-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.scale-row__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.scale-row__token {
  font-family: var(--f-mono);
  font-size: 13px;
}

.scale-row__value {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.scale-row__sample {
  font-size: var(--size);
  line-height: var(--lh);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scale-row__sample--display {
  font-family: var(--f-display);
  font-weight: var(--d-weight);
  text-transform: var(--d-case);
  letter-spacing: var(--d-track);
}

.scale-row__sample--body {
  font-family: var(--f-body);
  font-weight: 400;
}

.scale-row__sample--mono {
  font-family: var(--f-mono);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ---- 03 Craft details ------------------------------------------------- */
.craft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  margin-top: 32px;
}

.craft-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.craft-card__note {
  font-size: 15px;
  line-height: 1.5;
  text-wrap: pretty;
}

.craft-card code {
  font-family: var(--f-mono);
  font-size: 13px;
}

/* Optical sizes: same face, two opsz cuts */
.optical {
  display: flex;
  gap: 24px;
  align-items: baseline;
  font-family: 'Newsreader', serif;
  font-size: 56px;
  line-height: 1;
}

.optical__cut--text {
  font-variation-settings: 'opsz' 6;
}

.optical__cut--display {
  font-variation-settings: 'opsz' 72;
}

/* Hanging punctuation: dashed line marks the text edge */
.hanging {
  border-left: 1px dashed var(--muted);
}

.hanging__quote {
  font-family: var(--f-display);
  font-weight: var(--d-weight);
  font-size: 28px;
  line-height: 1.2;
  text-indent: -.42em;
}

/* Small caps */
.small-caps-demo {
  font-size: 22px;
  line-height: 1.4;
}

.smcp {
  font-variant-caps: all-small-caps;
  letter-spacing: .06em;
}

/* Tabular vs. proportional numerals */
.numerals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  font-size: 20px;
  line-height: 1.4;
}

.numerals__col--proportional {
  font-variant-numeric: proportional-nums;
}

.numerals__col--tabular {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.numerals__label {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted);
}

/* ---- 04 Notation ------------------------------------------------------ */
.notation-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 12px 32px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.notation-row__name {
  font-weight: 600;
}

.notation-row__rule {
  font-size: 15px;
  color: var(--muted);
  text-wrap: pretty;
}

.notation-row__sample {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.notation-row__sample--meta {
  font-family: var(--f-mono);
  font-size: 15px;
}

.notation-row__sample--frame {
  font-family: var(--f-mono);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: .04em;
}

.notation-row__sample--price {
  font-family: var(--f-display);
  font-size: 36px;
  font-weight: var(--d-weight);
}

.notation-row__sample--availability {
  font-size: 17px;
  font-weight: 500;
  color: var(--accent-text);
}

/* ---- 05 Annotation ---------------------------------------------------- */
.annotation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 40px 56px;
  align-items: start;
  margin-top: 32px;
}

/* Example card */
.annotation-demo {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.annotation-demo__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.annotation-demo__kicker {
  margin-bottom: 6px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted);
}

.annotation-demo__title {
  font-family: var(--f-display);
  font-weight: var(--d-weight);
  text-transform: var(--d-case);
  font-size: 34px;
  line-height: 1.05;
}

.annotation-demo__desc {
  margin-top: 6px;
  font-size: 15px;
  color: var(--muted);
}

/* Circled price anchor */
.annotation-demo__price {
  position: relative;
  padding: 6px 8px;
  font-family: var(--f-display);
  font-size: 34px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.annotation-demo__result-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px;
}

/* Underlined result; the stroke sits 18 px below the figure */
.annotation-demo__result {
  font-family: var(--f-display);
  font-size: 48px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.annotation-demo__result > .mark {
  bottom: -18px;
}

.annotation-demo__result-caption {
  padding-bottom: 6px;
  font-size: 15px;
  color: var(--muted);
}

.annotation-demo__note {
  padding-bottom: 10px;
  font-family: var(--f-hand);
  font-size: 26px;
  line-height: 1;
  color: var(--accent-text);
  transform: rotate(-4deg);
}

.annotation-demo__cta-row {
  display: flex;
  justify-content: flex-end;
}

/* Static button look-alike (not interactive in the example) */
.annotation-demo__cta {
  padding: 14px 22px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 17px;
  font-weight: 600;
}

/* Numbered rules */
.rule-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rule-list__item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-wrap: pretty;
}

.rule-list__no {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--muted);
}

/* ---- 06 Reading ------------------------------------------------------- */
.reading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 32px 56px;
  align-items: start;
  margin-top: 32px;
}

/* 66-character measure with a ruler on top */
.measure {
  max-width: 66ch;
}

.measure__ruler {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--muted);
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted);
}

.measure__text {
  margin: 0;
  text-wrap: pretty;
  hanging-punctuation: first;
}

/* Key/value spec rows */
.spec-list {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.spec-list__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.spec-list__row dt {
  color: var(--muted);
}

.spec-list__row dd {
  margin: 0;
  font-family: var(--f-mono);
  font-size: 14px;
  text-align: right;
}
