/*
 * M.A.K. Galerie · Typography engine
 * Figma V5 nodes 72:10, 62:8, 73:12, 71:10.
 *
 * One variable axis declaration for all type tokens. Each typographic role
 * configures wght/wdth/YTLC (and opsz only when Figma explicitly sets it).
 *
 * Google Fonts CSS with all four axes stays remote and loads directly in the HTML head.
 */
:root {
    --mak-typo: "Nunito Sans", system-ui, -apple-system, Arial, sans-serif;
    font-family: var(--mak-typo);
    font-optical-sizing: none;
    font-synthesis: none;
}

body, button, input { font-family: var(--mak-typo); font-optical-sizing: none; }

/* Central engine: shared axes, no copy/pasted font-variation-settings. */
:is(
    .mak-navigation, .mak-languages,
    .mak-artist__first-initial, .mak-artist__first-rest,
    .mak-artist__last-initial, .mak-artist__last-rest, .mak-artist__dates,
    .mak-work-title, .mak-work-year, .mak-work-technique,
    .mak-dimension__number, .mak-dimension__multiply, .mak-dimension__unit,
    .mak-document-section h2, .mak-document-section p,
    .mak-notice-block--section > h2, .mak-notice-prose, .mak-notice-columns, .mak-notice-figcaption,
    .mak-scholarly-notice, .mak-public-excerpt, .censored-notice .ghost-title,
    .mak-artwork-caption__headline, .mak-artwork-caption__sub,
    .mak-contact-button span, .mak-dialog-kicker,
    .mak-contact-dialog h2, .mak-dialog-work, .mak-contact-dialog label,
    .mak-dialog-submit span, .mak-dialog-privacy, .mak-contact-close
) {
    font-weight: var(--vf-wght, 500);
    font-variation-settings:
        "wght" var(--vf-wght, 500),
        "wdth" var(--vf-wdth, 100),
        "YTLC" var(--vf-ytlc, 500);
    font-optical-sizing: none;
    font-synthesis: none;
    letter-spacing: 0;
}

/* Figma assigns opsz 6 or 10 only to these measured portions. */
:is(
    .mak-work-title, .mak-work-technique,
    .mak-dimension__number, .mak-dimension__multiply, .mak-dimension__unit
) {
    font-variation-settings:
        "wght" var(--vf-wght, 500),
        "wdth" var(--vf-wdth, 100),
        "YTLC" var(--vf-ytlc, 500),
        "opsz" var(--vf-opsz, 10);
}

/* Global navigation. */
.mak-navigation {
    --vf-wght: 660; --vf-wdth: 112; --vf-ytlc: 500;
    font-size: 10.5px; line-height: 1.2;
}
.mak-languages {
    --vf-wght: 660; --vf-wdth: 110; --vf-ytlc: 500;
}

/* Artist — every initial is a distinct Figma styled text run. */
.mak-artist, .mak-artist__first, .mak-artist__last {
    font-size: 0; font-weight: 400; line-height: .972; letter-spacing: 0;
}
.mak-artist__first { text-transform: none; }
.mak-artist__last { text-transform: uppercase; }
.mak-artist__first-initial {
    --vf-wght: 688; --vf-wdth: 100; --vf-ytlc: 500;
    font-size: 24.895px; line-height: .972;
}
.mak-artist__first-rest {
    --vf-wght: 520; --vf-wdth: 81; --vf-ytlc: 500;
    font-size: 35.719px; line-height: .972;
}
.mak-artist__last-initial {
    --vf-wght: 448; --vf-wdth: 100; --vf-ytlc: 500;
    font-size: 35.719px; line-height: .972;
}
.mak-artist__last-rest {
    --vf-wght: 520; --vf-wdth: 81; --vf-ytlc: 500;
    font-size: 35.719px; line-height: .972;
}
.mak-artist__dates {
    --vf-wght: 695; --vf-wdth: 125; --vf-ytlc: 440;
    display: block; margin-top: 2px; font-size: 11px; line-height: 1.6;
}

/* Figma: title 600/75/500/10, year 695/125/440, technique 712/93/508/6. */
.mak-work-title {
    --vf-wght: 600; --vf-wdth: 75; --vf-ytlc: 500; --vf-opsz: 10;
    font-size: 16px; line-height: .972;
}
.mak-work-year {
    --vf-wght: 695; --vf-wdth: 125; --vf-ytlc: 440;
    font-size: 11px; line-height: 1.6;
}
.mak-work-technique {
    --vf-wght: 712; --vf-wdth: 93; --vf-ytlc: 508; --vf-opsz: 6;
    font-size: 11px; line-height: .972;
}

/*
 * Museum label. Parent flex rows align every segment to the SAME baseline.
 * Never apply OpenType "frac" to full inch strings: it distorts spacing and
 * mixes large unit glyphs into what should be 11 px numerals.
 */
.mak-dimensions { margin-top: 30px; text-align: center; }
.mak-dimension-line {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    margin: 0;
    padding: 0;
    line-height: 1;
}
.mak-dimension-line + .mak-dimension-line { margin-top: 2px; }
.mak-dimension__number {
    --vf-wght: 696; --vf-wdth: 125; --vf-ytlc: 440; --vf-opsz: 10;
    display: inline-flex; align-items: baseline;
    font-size: 11px; line-height: 1;
    font-variant-numeric: lining-nums;
    font-feature-settings: "frac" 0, "kern" 1;
}
.mak-dimension__multiply {
    --vf-wght: 600; --vf-wdth: 75; --vf-ytlc: 503; --vf-opsz: 10;
    font-size: 16px; line-height: 1;
    margin: 0 .24em;
}
.mak-dimension__unit {
    --vf-wght: 600; --vf-wdth: 75; --vf-ytlc: 500; --vf-opsz: 10;
    font-size: 16px; line-height: 1;
    margin-left: .20em;
}
.mak-fraction {
    display: inline-flex;
    align-items: baseline;
    margin-left: .14em;
    font-size: 1em;
    font-variant-numeric: normal;
    font-feature-settings: "frac" 0;
    white-space: nowrap;
    letter-spacing: -.015em;
}
.mak-fraction__numerator,
.mak-fraction__denominator {
    position: relative;
    font-size: .73em;
    line-height: 1;
    font-weight: inherit;
    font-variant-position: normal;
}
.mak-fraction__numerator { top: -.37em; }
.mak-fraction__denominator { top: .19em; }
.mak-fraction__slash {
    font-size: .93em;
    line-height: 1;
    font-weight: 500;
    margin: 0 .015em;
}
.mak-dimensions--legacy {
    font-size: 11px;
    line-height: 1.25;
    font-weight: 696;
    font-feature-settings: "frac" 0;
}
.mak-dimensions--legacy p { margin: 0; }

/* Full scholarly notice, same roles as desktop Figma 62:8. */
.mak-document-section h2 {
    --vf-wght: 715; --vf-wdth: 117; --vf-ytlc: 440;
    font-size: 11px; line-height: 1.2;
}
.mak-document-section p {
    --vf-wght: 500; --vf-wdth: 94; --vf-ytlc: 500;
    font-size: 15.5px; line-height: 1.45;
}
.mak-scholarly-notice, .mak-public-excerpt {
    --vf-wght: 500; --vf-wdth: 95; --vf-ytlc: 500;
    font-size: 16px; line-height: 1.48;
}
.censored-notice .ghost-title {
    --vf-wght: 695; --vf-wdth: 125; --vf-ytlc: 440;
    font-size: 11px; line-height: 1.3;
}

/* Artwork caption Figma 72:67/68. */
.mak-artwork-caption__headline {
    --vf-wght: 630; --vf-wdth: 111; --vf-ytlc: 500;
    font-size: 11px; line-height: 1.25;
}
.mak-artwork-caption__sub {
    --vf-wght: 470; --vf-wdth: 100; --vf-ytlc: 500;
    font-size: 11px; line-height: 1.25;
}

/* CTA and contact dialog from Figma 62:74, 71:10. */
.mak-contact-button span {
    --vf-wght: 660; --vf-wdth: 100; --vf-ytlc: 500;
    font-size: 15.7px; line-height: 1.15;
}
.mak-dialog-kicker {
    --vf-wght: 650; --vf-wdth: 94; --vf-ytlc: 500;
    font-size: 10.5px; line-height: 1.2;
}
.mak-contact-dialog h2 {
    --vf-wght: 560; --vf-wdth: 94; --vf-ytlc: 500;
    font-size: 27px; line-height: 1.15;
}
.mak-dialog-work {
    --vf-wght: 510; --vf-wdth: 94; --vf-ytlc: 500;
    font-size: 12.5px; line-height: 1.4;
}
.mak-contact-dialog label {
    --vf-wght: 530; --vf-wdth: 94; --vf-ytlc: 500;
    font-size: 13px; line-height: 1.3;
}
.mak-dialog-submit span {
    --vf-wght: 700; --vf-wdth: 110; --vf-ytlc: 500;
    font-size: 11.6px;
}
.mak-dialog-privacy {
    --vf-wght: 490; --vf-wdth: 94; --vf-ytlc: 500;
    font-size: 10.5px; line-height: 1.3;
}
.mak-contact-close {
    --vf-wght: 400; --vf-wdth: 100; --vf-ytlc: 500;
    font-size: 24px;
}

@media (max-width: 860px) {
    .mak-navigation, .mak-languages {
        --vf-wght: 650; --vf-wdth: 114; --vf-ytlc: 500;
        font-size: 10.5px; line-height: 1.2;
    }
    /* Figma's CTA remains 15.7 px on mobile, not the old 14.5. */
    .mak-contact-button span { font-size: 15.7px; }
}
