/*
 * M.A.K. Galerie — home editorial selections.
 *
 * Reuses the exact /oeuvres catalogue's physical-scale classes and artist
 * typography, loaded unchanged on the homepage; these scoped rules only
 * arrange the two surrounding sections. Zero CSS changes to /oeuvres.
 *
 * The original vector facade already extends below the first screen.
 * The exhibition is placed directly underneath it and fades that SAME
 * illustration into white: no second SVG, crop, zoom or bitmap is added.
 */

.mak-home-page .mak-home-stage {
    margin-bottom: 0; /* exhibit occupies the former blank reveal strip */
}

/* Keep artwork selections above the existing SVG spill without giving the
 * works an opaque backdrop until well below the architectural illustration. */
.mak-home-selection {
    position: relative;
    z-index: 2;
    isolation: isolate;
    width: 100%;
    margin: 0;
    color: #191c21;
}

/* Section artworks begin AFTER the original first screen.
   Its heading is now inside that screen, on the same Figma coordinate grid. */
.mak-home-exhibition {
    margin-top: 0;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,.05) 0%,
        rgba(255,255,255,.16) 12%,
        rgba(255,255,255,.65) 32%,
        rgba(255,255,255,.98) 56%,
        #fff 74%
    );
    /* The compact Utrillo slide follows this section directly. */
    padding: clamp(28px, 3.5vw, 56px) clamp(22px, 5vw, 78px) clamp(42px, 4.5vw, 74px);
}

.mak-home-chosen {
    background: #fff;
    border-top: 1px solid rgba(23,35,72,.09);
    padding: clamp(76px, 8vw, 124px) clamp(22px, 5vw, 78px) clamp(100px, 12vw, 190px);
}

.mak-home-selection__inner {
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    min-width: 0;
}
.mak-home-selection__header {
    text-align: center;
    margin: 0 auto clamp(60px, 7vw, 112px);
}
/* Two-thirds of the previous Figma heading scale, uppercase and centred
   across the entire screen (not just the left copy column). */
.mak-home-page .mak-home-exhibition__intro-title {
    position: absolute;
    z-index: 4;
    left: 0;
    right: 0;
    bottom: 4.25cqw; /* slightly higher, clearing room for the scroll cue */
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    color: #090909;
    /* Soft white halo keeps black lettering legible over busy facade lines. */
    text-shadow:
        0 0 2px #fff,
        0 0 7px #fff,
        0 0 17px rgba(255, 255, 255, .96),
        0 0 32px rgba(255, 255, 255, .76);
    font-family: "Nunito Sans", system-ui, sans-serif;
    font-optical-sizing: none;
    font-synthesis: none;
    font-size: 1.39cqw; /* 33% smaller than 2.07458cqw */
    font-variation-settings: "wght" 688, "wdth" 100, "YTLC" 500;
    line-height: 1.272;
    letter-spacing: 0;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
}
/* A real, accessible anchor to the exhibition rather than a fake button.
   Animate only the glyph; keyboard focus stays fixed and predictable. */
.mak-home-page .mak-home-exhibition__scroll-cue {
    position: absolute;
    z-index: 5;
    bottom: .7cqw;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 40px;
    padding: 0 8px;
    color: #090909;
    font-family: "Nunito Sans", system-ui, sans-serif;
    font-size: clamp(24px, 2.6cqw, 36px);
    font-weight: 400;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    text-shadow: 0 0 5px #fff, 0 0 16px #fff, 0 0 28px rgba(255, 255, 255, .85);
}
.mak-home-page .mak-home-exhibition__scroll-cue span {
    display: block;
    animation: mak-home-scroll-cue-float 2.5s ease-in-out infinite;
}
.mak-home-page .mak-home-exhibition__scroll-cue:hover span {
    animation-play-state: paused;
    transform: translateY(4px);
}
.mak-home-page .mak-home-exhibition__scroll-cue:focus-visible {
    outline: 2px solid var(--mak-blue, #1a237e);
    outline-offset: 1px;
}
@keyframes mak-home-scroll-cue-float {
    0%, 100% { transform: translateY(0); opacity: .78; }
    50% { transform: translateY(5px); opacity: 1; }
}
#mak-home-exhibition-works { scroll-margin-top: 12px; }

.mak-home-selection__eyebrow {
    margin: 0 0 14px;
    font-family: "Nunito Sans", sans-serif;
    font-size: 10px;
    font-variation-settings: "wght" 690, "wdth" 114, "YTLC" 500;
    letter-spacing: .17em;
    color: #737983;
}
.mak-home-selection__header h2 {
    margin: 0;
    color: #111318;
    font-family: "Nunito Sans", sans-serif;
    font-size: clamp(31px, 4.7vw, 60px);
    font-optical-sizing: none;
    font-variation-settings: "wght" 510, "wdth" 92, "YTLC" 500;
    line-height: 1.12;
    letter-spacing: -.035em;
    text-wrap: balance;
}

/* Exact artwork structure from /oeuvres, not a second image layout system. */
.mak-home-selection .mak-index.mak-home-wall {
    max-width: none;
    margin: 0;
    padding: 0;
}
.mak-home-selection .mak-index__catalogue {
    margin: 0 auto;
    max-width: 1470px;
}
.mak-home-selection .mak-index .mak-index__grid {
    width: 100%;
}
/* Keep the same 3 / 2 / 1-column fallback and image-contain behaviour. */
.mak-home-selection .mak-index .mak-index__grid:not([data-layout="rows"]) {
    gap: clamp(65px, 7vw, 110px) clamp(28px, 4vw, 62px);
}

/* A little less whitespace between rows than the long catalogue;
 * image dimensions inside each row remain determined ONLY by centimetres. */
.mak-home-selection .mak-index .mak-index__grid[data-layout="rows"] {
    gap: clamp(72px, 7vw, 106px);
}

/* Exhibition captions are not rendered at all, including Robert Humblot.
 * The other editorial wall retains the catalogue's artist-name treatment. */
.mak-home-selection .mak-index .mak-index__artist-name {
    margin-top: 0;
}
.mak-home-selection .mak-index .mak-index__image img {
    object-fit: contain;
    object-position: center;
}

/*
 * Exact CTA grammar from the artwork contact button, but scoped to home:
 * blue #1a237e, inset white 3px frame 6px from the edges, white/blue
 * inversion on hover/focus, frame expands to 4px, 1.04 scale.
 * It is a normal link, NEVER a sticky dock or a non-working dialog trigger.
 */
.mak-home-selection .mak-home-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: clamp(24px, 3.2vw, 44px) 0 0;
    margin: 0;
}
.mak-home-selection .mak-home-cta__button {
    --mak-cta-bg: var(--mak-blue, #1a237e);
    --mak-cta-fg: #fff;
    --mak-cta-stroke: #fff;
    position: relative;
    isolation: isolate;
    display: inline-flex;
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    padding: .9em 1.2em;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.15;
    font-family: "Nunito Sans", system-ui, sans-serif;
    font-size: 15.7px;
    font-weight: 470;
    font-variation-settings: "wght" 470, "wdth" 100;
    background: var(--mak-cta-bg);
    color: var(--mak-cta-fg);
    border: 0;
    border-radius: 0;
    outline-offset: 4px;
    cursor: pointer;
    text-decoration: none;
    transform-origin: center center;
    transition: background .25s ease, color .25s ease, transform .15s ease;
}
.mak-home-selection .mak-home-cta__label {
    display: block;
    min-width: 0;
    font-family: inherit;
    font-size: 15.7px;
    font-weight: inherit;
    font-variation-settings: "wght" 470, "wdth" 100, "YTLC" 500;
    line-height: 1;
    text-transform: uppercase;
    text-align: center;
    white-space: pre-line; /* only editorial newline creates another line */
    overflow-wrap: anywhere;
}
.mak-home-selection .mak-home-cta__button::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    border: 3px solid var(--mak-cta-stroke);
    pointer-events: none;
    transition: width .30s ease, height .30s ease, border-color .20s ease, border-width .20s ease;
}
.mak-home-selection .mak-home-cta__button:hover,
.mak-home-selection .mak-home-cta__button:focus-visible {
    --mak-cta-bg: #fff;
    --mak-cta-fg: var(--mak-blue, #1a237e);
    --mak-cta-stroke: var(--mak-blue, #1a237e);
    color: var(--mak-cta-fg);
    background: var(--mak-cta-bg);
    transform: scale(1.04);
}
.mak-home-selection .mak-home-cta__button:is(:hover, :focus-visible)::after {
    width: 100%;
    height: 100%;
    border-color: var(--mak-cta-stroke);
    border-width: 4px;
}
.mak-home-selection .mak-home-cta__button:focus-visible {
    outline: 2px solid var(--mak-blue, #1a237e);
}
.mak-home-selection .mak-home-cta__button:active {
    transform: translateY(1px);
}

.mak-home-wall__empty {
    max-width: 520px;
    margin: 0 auto;
    padding: 10px 12px;
    color: #70747c;
    font-size: 13px;
    text-align: center;
    line-height: 1.55;
}

@media (max-width: 1020px) {
    .mak-home-exhibition { padding-inline: clamp(22px, 4vw, 42px); }
    .mak-home-chosen { padding-inline: clamp(22px, 4vw, 42px); }
}

@media (max-width: 900px) {
    .mak-home-exhibition {
        margin-top: 0; /* Mobile artwork stacks after its heading/photo. */
        padding: 24px 22px 52px;
        background: linear-gradient(to bottom, rgba(255,255,255,.70), #fff 38%);
    }
    .mak-home-page .mak-home-exhibition__intro-title {
        position: relative;
        left: auto;
        bottom: auto;
        width: min(100%, 440px);
        max-width: 100%;
        margin: 24px auto 0;
        font-size: clamp(14px, 3.35vw, 19.5px);
        text-align: center;
        white-space: normal;
    }
    .mak-home-page .mak-home-exhibition__scroll-cue {
        position: relative;
        left: auto;
        bottom: auto;
        transform: none;
        margin: 0 auto 8px;
        width: fit-content;
        min-height: 38px;
        font-size: 28px;
    }
    .mak-home-chosen { padding: 78px 22px 110px; }
    .mak-home-selection__header { margin-bottom: 68px; }
    .mak-home-selection__header h2 { font-size: clamp(31px, 8vw, 45px); }
    .mak-home-selection .mak-index .mak-index__grid:not([data-layout="rows"]) {
        gap: 68px;
    }
    .mak-home-selection .mak-index .mak-index__grid[data-layout="rows"] {
        gap: 68px;
    }
    .mak-home-selection .mak-home-cta { padding-top: 30px; }
}
@media (prefers-reduced-motion: reduce) {
    .mak-home-page .mak-home-exhibition__scroll-cue span {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .mak-home-page .mak-home-exhibition__scroll-cue:hover span {
        transform: none;
    }
    .mak-home-selection .mak-home-cta__button,
    .mak-home-selection .mak-home-cta__button::after { transition: none; }
    .mak-home-selection .mak-home-cta__button:is(:hover, :focus-visible, :active) { transform: none; }
}

/* The artist CTA has ONE destination, the dossier, and follows the same
   3px inset museum-blue frame and soft hover as the artwork contact CTA. */
.mak-home-page .mak-home-chosen .mak-home-selection__header {
    margin-bottom: clamp(28px, 3vw, 44px);
}
.mak-home-selection .mak-home-cta--artist .mak-home-cta__button {
    padding: clamp(14px, 1.45vw, 18px) clamp(25px, 3.3vw, 46px);
    min-height: 53px;
}
.mak-home-selection .mak-home-cta--artist .mak-home-cta__label {
    font-size: clamp(13.5px, 1.2vw, 16px);
    line-height: 1.32;
    font-variation-settings: "wght" 520, "wdth" 100, "YTLC" 500;
    text-transform: none;
    white-space: normal;
    overflow-wrap: normal;
}
.mak-home-selection .mak-home-cta--artist .mak-home-cta__verb {
    font-variation-settings: "wght" 700, "wdth" 100, "YTLC" 500;
    text-transform: uppercase;
    white-space: nowrap;
}
.mak-home-selection .mak-home-cta--artist .mak-home-cta__artist-name {
    white-space: normal;
}
@media (max-width: 760px) {
    .mak-home-selection .mak-home-cta--artist .mak-home-cta__button {
        padding-inline: clamp(21px, 6vw, 30px);
    }
    .mak-home-selection .mak-home-cta--artist .mak-home-cta__label {
        font-size: 13.5px;
    }
}
