/*
 * Marketing site (public pages) — the "journey across America" look.
 *
 * Hand-written, loaded only by the site layout, so it does not depend on the
 * prebuilt Tailwind bundle. Everything comes from the brand tokens already in
 * app.css (--color-*, --font-*). Logical properties throughout, so Arabic
 * mirrors without a second set of rules.
 *
 * Signature pieces: .mk-postcard (a level as a postcard with its stamp) and
 * .mk-ticket (the plan as a travel ticket). The rest stays quiet: colour
 * bands, display type, tiles, step timelines, a framed photo, the FAQ.
 */

/* ---------------------------------------------------------------- layout */

.mk-wrap {
    width: 100%;
    max-width: 76rem;
    margin-inline: auto;
    padding-inline: 1rem;
}
@media (min-width: 640px) { .mk-wrap { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .mk-wrap { padding-inline: 2rem; } }
.mk-wrap--narrow { max-width: 52rem; }

.mk-band {
    position: relative;
    padding-block: clamp(3.5rem, 7vw, 6rem);
}
.mk-band--paper { background: var(--color-cream-50); border-block: 1px solid var(--color-cream-200); }
.mk-band--sand { background: var(--color-cream-200); }
.mk-band--navy,
.mk-band--maroon { color: var(--color-cream-100); overflow: hidden; }
.mk-band--navy { background: var(--color-navy-700); }
.mk-band--maroon { background: linear-gradient(155deg, var(--color-maroon-600) 0%, var(--color-maroon-900) 100%); }

/* A faint route line across the dark bands: dashes, like a map. */
.mk-band--navy::before,
.mk-band--maroon::before {
    content: "";
    position: absolute;
    inset-inline: -10%;
    top: 3.25rem;
    height: 2px;
    background: repeating-linear-gradient(90deg, rgb(210 166 92 / 0.35) 0 14px, transparent 14px 28px);
    pointer-events: none;
}

/* ------------------------------------------------------------ typography */

.mk-display {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.06;
    letter-spacing: -0.015em;
    font-size: clamp(2.35rem, 5.4vw, 4.25rem);
    color: var(--color-maroon-700);
    text-wrap: balance;
}
.mk-title {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.01em;
    font-size: clamp(1.85rem, 3.4vw, 2.8rem);
    color: var(--color-maroon-700);
    text-wrap: balance;
}
.mk-title--sm { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.mk-lead {
    margin-top: 1.1rem;
    font-size: clamp(1.05rem, 1.5vw, 1.22rem);
    line-height: 1.6;
    color: var(--color-ink-700);
    max-width: 40rem;
}
.mk-body { margin-top: 0.9rem; line-height: 1.7; color: var(--color-ink-600); max-width: 40rem; }
.mk-small { font-size: 0.875rem; line-height: 1.6; color: var(--color-ink-500); }

.mk-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-gold-600);
}
.mk-eyebrow::before {
    content: "";
    width: 2.25rem;
    height: 2px;
    background: var(--color-gold-400);
}
[dir="rtl"] .mk-eyebrow { letter-spacing: 0; font-size: 0.85rem; }

/* Headings get a short gold rule under them. */
.mk-rule::after {
    content: "";
    display: block;
    width: 4.5rem;
    height: 3px;
    margin-top: 1rem;
    border-radius: 2px;
    background: var(--color-gold-400);
}
.mk-center { text-align: center; }
.mk-center .mk-lead,
.mk-center .mk-body { margin-inline: auto; }
.mk-center.mk-rule::after,
.mk-center .mk-rule::after { margin-inline: auto; }

/* On dark bands */
.mk-on-dark .mk-title,
.mk-on-dark .mk-display { color: var(--color-cream-50); }
.mk-on-dark .mk-lead { color: var(--color-cream-200); }
.mk-on-dark .mk-body,
.mk-on-dark .mk-small { color: var(--color-cream-300); }
.mk-on-dark .mk-eyebrow { color: var(--color-gold-400); }

/* ----------------------------------------------------------------- grids */

.mk-grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) {
    .mk-grid--2,
    .mk-grid--3,
    .mk-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .mk-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mk-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .mk-grid { gap: 1.5rem; }
}

.mk-split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 1024px) {
    .mk-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; }
    .mk-split--aside { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr); align-items: start; }
    .mk-sticky { position: sticky; top: 6rem; }
}

/* ----------------------------------------------------------------- tiles */

.mk-tile {
    height: 100%;
    padding: 1.6rem;
    border-radius: 1.1rem;
    background: var(--color-cream-50);
    border: 1px solid var(--color-cream-300);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.mk-tile:hover {
    transform: translateY(-3px);
    border-color: var(--color-gold-200);
    box-shadow: 0 18px 36px -24px rgb(43 35 32 / 0.45);
}
.mk-tile h3 {
    margin-top: 1.1rem;
    font-family: var(--font-display);
    font-size: 1.3rem;
    line-height: 1.25;
    color: var(--color-maroon-700);
}
.mk-tile p { margin-top: 0.6rem; font-size: 0.95rem; line-height: 1.65; color: var(--color-ink-600); }

.mk-icon {
    display: inline-grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 999px;
    background: var(--color-maroon-50);
    color: var(--color-maroon-600);
}
.mk-icon svg { width: 1.5rem; height: 1.5rem; }

.mk-on-dark .mk-tile {
    background: rgb(253 249 245 / 0.05);
    border-color: rgb(253 249 245 / 0.14);
}
.mk-on-dark .mk-tile:hover { border-color: rgb(210 166 92 / 0.6); box-shadow: none; }
.mk-on-dark .mk-tile h3 { color: var(--color-cream-50); }
.mk-on-dark .mk-tile p { color: var(--color-cream-300); }
.mk-on-dark .mk-icon { background: var(--color-gold-400); color: var(--color-navy-900); }

/* ------------------------------------------------------ checklist (✓ list) */

.mk-checks { display: grid; gap: 0.9rem 2.5rem; }
@media (min-width: 768px) { .mk-checks--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mk-checks li { display: flex; align-items: flex-start; gap: 0.8rem; line-height: 1.55; color: var(--color-ink-700); }
.mk-check {
    flex-shrink: 0;
    display: inline-grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    margin-top: 0.05rem;
    border-radius: 999px;
    background: var(--color-gold-100);
    color: var(--color-gold-700);
}
.mk-check svg { width: 1rem; height: 1rem; }
.mk-on-dark .mk-checks li { color: var(--color-cream-100); }
.mk-on-dark .mk-check { background: var(--color-gold-400); color: var(--color-navy-900); }

/* ----------------------------------------------------- steps (a sequence) */

.mk-steps { position: relative; display: grid; gap: 2rem; counter-reset: mk-step; }
@media (min-width: 768px) {
    .mk-steps--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mk-steps--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .mk-steps--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    /* The route between the stops. */
    .mk-steps--3::before,
    .mk-steps--4::before {
        content: "";
        position: absolute;
        top: 1.5rem;
        inset-inline: 1.5rem;
        height: 2px;
        background: repeating-linear-gradient(90deg, var(--color-gold-400) 0 10px, transparent 10px 20px);
    }
}
.mk-step { position: relative; }
.mk-step__num {
    position: relative;
    z-index: 1;
    display: inline-grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    background: var(--color-maroon-600);
    color: var(--color-cream-50);
    font-family: var(--font-display);
    font-size: 1.15rem;
    box-shadow: 0 0 0 6px var(--color-cream-100);
}
.mk-step h3 { margin-top: 1.1rem; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.25; color: var(--color-maroon-700); }
.mk-step p { margin-top: 0.5rem; font-size: 0.95rem; line-height: 1.65; color: var(--color-ink-600); }
.mk-band--paper .mk-step__num { box-shadow: 0 0 0 6px var(--color-cream-50); }
.mk-on-dark .mk-step__num { background: var(--color-gold-400); color: var(--color-navy-900); box-shadow: 0 0 0 6px var(--color-maroon-800); }
.mk-band--navy.mk-on-dark .mk-step__num { box-shadow: 0 0 0 6px var(--color-navy-700); }
.mk-on-dark .mk-step h3 { color: var(--color-cream-50); }
.mk-on-dark .mk-step p { color: var(--color-cream-300); }

/* -------------------------------------------- postcard (signature: levels) */

.mk-postcards { display: grid; gap: 2.25rem 1.75rem; }
@media (min-width: 640px) { .mk-postcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .mk-postcards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.75rem 2rem; } }

.mk-postcard {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0.7rem 0.7rem 1.4rem;
    border-radius: 0.5rem;
    background: var(--color-cream-50);
    box-shadow: 0 1px 0 rgb(43 35 32 / 0.05), 0 22px 44px -24px rgb(43 35 32 / 0.5);
    transition: transform 0.4s cubic-bezier(.2, .8, .2, 1), box-shadow 0.4s ease;
}
.mk-postcard:hover,
.mk-postcard:focus-within {
    transform: translateY(-6px);
    box-shadow: 0 1px 0 rgb(43 35 32 / 0.05), 0 30px 60px -26px rgb(43 35 32 / 0.6);
}
.mk-postcard__img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 0.3rem;
    background: var(--color-cream-200);
}
/* The stamp carries the level's code. */
.mk-stamp {
    position: absolute;
    top: 1.4rem;
    inset-inline-end: 1.4rem;
    display: grid;
    place-items: center;
    width: 4.1rem;
    height: 4.8rem;
    padding: 0.3rem;
    background: var(--color-maroon-600);
    color: var(--color-cream-50);
    outline: 2px dashed rgb(253 249 245 / 0.85);
    outline-offset: -6px;
    box-shadow: 0 6px 14px -6px rgb(0 0 0 / 0.5);
    text-align: center;
}
.mk-stamp__code { font-family: var(--font-display); font-size: 1.55rem; line-height: 1; }
.mk-stamp--gold { background: var(--color-gold-500); }
.mk-stamp--navy { background: var(--color-navy-600); }
.mk-postcard__body { display: flex; flex: 1; flex-direction: column; padding: 1.1rem 0.6rem 0; }
.mk-postcard__body h3 { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.2; color: var(--color-maroon-700); }
.mk-postcard__body > p { margin-top: 0.55rem; font-size: 0.95rem; line-height: 1.6; color: var(--color-ink-600); }
.mk-postcard__meta { margin-top: 0.9rem; display: grid; gap: 0.55rem; font-size: 0.9rem; line-height: 1.55; color: var(--color-ink-600); }
.mk-postcard__meta b { color: var(--color-maroon-700); font-weight: 600; }
.mk-postcard__foot { margin-top: auto; padding-top: 1.2rem; }
.mk-postcard__link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-maroon-700);
}
.mk-postcard__link svg { width: 1rem; height: 1rem; transition: transform 0.3s ease; }
.mk-postcard:hover .mk-postcard__link svg { transform: translateX(4px); }
[dir="rtl"] .mk-postcard:hover .mk-postcard__link svg { transform: translateX(-4px) scaleX(-1); }
.mk-postcard__soon {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: var(--color-cream-200);
    color: var(--color-ink-500);
    font-size: 0.8rem;
    font-weight: 600;
}
/* The whole card is the link. */
.mk-postcard__cover::after { content: ""; position: absolute; inset: 0; border-radius: 0.5rem; }

/* A small stack of postcards for heroes (decorative). */
.mk-stack { position: relative; aspect-ratio: 5 / 4; }
.mk-stack img {
    position: absolute;
    width: 62%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border: 0.55rem solid var(--color-cream-50);
    border-bottom-width: 1.6rem;
    border-radius: 0.4rem;
    box-shadow: 0 24px 48px -26px rgb(43 35 32 / 0.6);
}
.mk-stack img:nth-child(1) { top: 0; inset-inline-start: 0; }
.mk-stack img:nth-child(2) { top: 22%; inset-inline-end: 0; }
.mk-stack img:nth-child(3) { bottom: 0; inset-inline-start: 14%; z-index: 1; }

/* ------------------------------------------- ticket (signature: the plan) */

.mk-ticket {
    position: relative;
    display: grid;
    border-radius: 1.4rem;
    background: var(--color-cream-50);
    box-shadow: 0 1px 0 rgb(43 35 32 / 0.05), 0 32px 64px -34px rgb(13 43 74 / 0.55);
    overflow: hidden;
}
@media (min-width: 768px) { .mk-ticket { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); } }
.mk-ticket__stub {
    position: relative;
    padding: 2rem 1.75rem;
    background: var(--color-navy-700);
    color: var(--color-cream-100);
}
@media (min-width: 640px) { .mk-ticket__stub { padding: 2.5rem 2.25rem; } }
.mk-ticket__body { padding: 2rem 1.75rem; }
@media (min-width: 640px) { .mk-ticket__body { padding: 2.5rem 2.25rem; } }
/* Perforation between stub and body, with a notch cut at each end. */
.mk-ticket__stub::after {
    content: "";
    position: absolute;
    inset-inline: 1.25rem;
    bottom: 0;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--color-cream-50) 0 9px, transparent 9px 18px);
}
@media (min-width: 768px) {
    .mk-ticket__stub::after {
        inset-inline: auto;
        inset-inline-end: 0;
        top: 1.25rem;
        bottom: 1.25rem;
        width: 2px;
        height: auto;
        background: repeating-linear-gradient(180deg, var(--color-cream-50) 0 9px, transparent 9px 18px);
    }
    .mk-ticket::before,
    .mk-ticket::after {
        content: "";
        position: absolute;
        z-index: 1;
        width: 2rem;
        height: 2rem;
        border-radius: 999px;
        background: var(--mk-notch, var(--color-cream-100));
        inset-inline-start: calc(48.8% - 1rem);
    }
    .mk-ticket::before { top: -1rem; }
    .mk-ticket::after { bottom: -1rem; }
}
.mk-band--sand .mk-ticket { --mk-notch: var(--color-cream-200); }
.mk-ticket__label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-gold-400); }
[dir="rtl"] .mk-ticket__label { letter-spacing: 0; font-size: 0.85rem; }
.mk-ticket__name { margin-top: 0.6rem; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.2; color: var(--color-cream-50); }
.mk-ticket__price { margin-top: 1.4rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem; }
.mk-ticket__stub .text-maroon-800 { color: var(--color-cream-50); }
.mk-ticket__stub s { color: var(--color-navy-300); }
.mk-ticket__stub .text-ink-400 { color: var(--color-cream-300); }
.mk-ticket__access { margin-top: 1rem; font-size: 0.95rem; line-height: 1.6; color: var(--color-cream-200); }
.mk-ticket__fine { margin-top: 1.4rem; display: grid; gap: 0.6rem; font-size: 0.82rem; line-height: 1.55; color: var(--color-cream-300); }
.mk-ticket__fine li { display: flex; gap: 0.55rem; align-items: flex-start; }
.mk-ticket__fine svg { flex-shrink: 0; width: 1rem; height: 1rem; margin-top: 0.15rem; color: var(--color-gold-400); }
.mk-ticket__fine a { color: var(--color-gold-200); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------- framed photo + pull quote */

.mk-frame { position: relative; isolation: isolate; }
.mk-frame::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset-block: 1.25rem -1.25rem;
    inset-inline: 1.25rem -1.25rem;
    border: 2px solid var(--color-gold-400);
    border-radius: 1.4rem;
}
/* Narrow screens: a smaller offset, so the frame stays inside the page's gutter. */
@media (max-width: 639px) {
    .mk-frame::before { inset-block: 0.75rem -0.75rem; inset-inline: 0.75rem -0.75rem; }
}
.mk-frame img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 1.4rem;
    box-shadow: 0 30px 60px -34px rgb(43 35 32 / 0.6);
}
.mk-frame__tag {
    position: absolute;
    bottom: 1.25rem;
    inset-inline-start: 1.25rem;
    padding: 0.55rem 1rem;
    border-radius: 0.7rem;
    background: var(--color-cream-50);
    box-shadow: 0 10px 24px -14px rgb(43 35 32 / 0.6);
}
.mk-frame__tag b { display: block; font-family: var(--font-display); font-size: 1.05rem; color: var(--color-maroon-700); }
.mk-frame__tag span { font-size: 0.8rem; color: var(--color-ink-500); }

.mk-quote {
    position: relative;
    margin-top: 1.4rem;
    padding-inline-start: 1.4rem;
    border-inline-start: 3px solid var(--color-gold-400);
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(1.3rem, 2.2vw, 1.7rem);
    line-height: 1.4;
    color: var(--color-maroon-700);
}
[dir="rtl"] .mk-quote { font-style: normal; }
.mk-on-dark .mk-quote { color: var(--color-cream-50); }

/* ---------------------------------------------------- calls to action */

.mk-cta {
    position: relative;
    overflow: hidden;
    padding: clamp(3rem, 6vw, 4.5rem) 1.5rem;
    border-radius: 1.6rem;
    background: radial-gradient(120% 140% at 100% 0%, var(--color-maroon-500) 0%, var(--color-maroon-700) 45%, var(--color-maroon-900) 100%);
    color: var(--color-cream-100);
    text-align: center;
}
.mk-cta .mk-title { color: var(--color-cream-50); }
.mk-cta .mk-lead { margin-inline: auto; color: var(--color-cream-200); }
.mk-cta__route {
    position: absolute;
    inset-inline: 0;
    bottom: 1.4rem;
    height: 2px;
    background: repeating-linear-gradient(90deg, rgb(210 166 92 / 0.55) 0 14px, transparent 14px 28px);
}
.mk-actions { margin-top: 1.9rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.mk-center .mk-actions,
.mk-cta .mk-actions { justify-content: center; }

/* ----------------------------------------------------------- level hero */

.mk-level-hero { position: relative; overflow: hidden; background: var(--color-navy-800); color: var(--color-cream-100); }
.mk-level-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
}
.mk-level-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgb(7 26 46 / 0.96) 0%, rgb(13 43 74 / 0.86) 48%, rgb(67 16 25 / 0.55) 100%);
}
[dir="rtl"] .mk-level-hero::after { background: linear-gradient(260deg, rgb(7 26 46 / 0.96) 0%, rgb(13 43 74 / 0.86) 48%, rgb(67 16 25 / 0.55) 100%); }
.mk-level-hero > .mk-wrap { position: relative; z-index: 1; }
.mk-level-hero .mk-display { color: var(--color-cream-50); font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
.mk-level-hero .mk-lead { color: var(--color-cream-200); }
.mk-level-hero .mk-stamp { position: static; display: inline-grid; }
.mk-facts {
    margin-top: 1.25rem;
    background: rgb(253 249 245 / 0.14);
    box-shadow: 0 24px 50px -30px rgb(0 0 0 / 0.7);
    display: grid;
    gap: 0.1rem;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgb(253 249 245 / 0.16);
}
@media (min-width: 640px) { .mk-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Nearly solid, so the painting behind does not show through the text. */
.mk-facts > div { padding: 0.8rem 1rem; background: rgb(9 34 59 / 0.92); }
.mk-facts dt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-gold-400); }
[dir="rtl"] .mk-facts dt { letter-spacing: 0; font-size: 0.8rem; }
.mk-facts dd { margin-top: 0.2rem; font-weight: 600; color: var(--color-cream-50); }
.mk-facts dd a { color: var(--color-gold-200); text-decoration: underline; text-underline-offset: 3px; }
.mk-chips { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mk-chips > div {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: rgb(253 249 245 / 0.1);
    color: var(--color-cream-100);
    font-size: 0.85rem;
}
.mk-chips svg { width: 1rem; height: 1rem; color: var(--color-gold-400); }

/* A big outlined level code beside "About this course". */
.mk-bigcode {
    font-family: var(--font-display);
    font-size: clamp(6rem, 16vw, 11rem);
    line-height: 0.85;
    color: transparent;
    -webkit-text-stroke: 2px var(--color-gold-400);
}
/* A range of codes ("A1–C2", the Story Library) on one line. */
.mk-bigcode--range { font-size: clamp(3.5rem, 8vw, 6.5rem); white-space: nowrap; }

/* ------------------------------------------------------------------ FAQ */

.mk-faq details { border-bottom: 1px solid var(--color-cream-300); }
.mk-faq details:first-child { border-top: 1px solid var(--color-cream-300); }
.mk-faq summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding-block: 1.25rem;
}
.mk-faq summary::-webkit-details-marker { display: none; }
.mk-faq summary h3 { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.35; color: var(--color-maroon-700); }
.mk-faq summary:hover h3 { color: var(--color-maroon-500); }
.mk-faq__toggle {
    position: relative;
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    border: 1px solid var(--color-gold-200);
    background: var(--color-cream-50);
    transition: background 0.25s ease, transform 0.3s ease;
}
.mk-faq__toggle::before,
.mk-faq__toggle::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    width: 0.85rem;
    height: 2px;
    margin: -1px 0 0 -0.425rem;
    border-radius: 2px;
    background: var(--color-maroon-600);
}
.mk-faq__toggle::after { transform: rotate(90deg); transition: transform 0.3s ease; }
.mk-faq details[open] .mk-faq__toggle { background: var(--color-gold-100); }
.mk-faq details[open] .mk-faq__toggle::after { transform: rotate(0deg); }
.mk-faq__answer { padding-bottom: 1.4rem; padding-inline-end: 3.5rem; line-height: 1.7; color: var(--color-ink-600); }
.mk-faq__answer a { margin-top: 0.75rem; display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; color: var(--color-maroon-700); }
.mk-faq__answer a:hover { text-decoration: underline; }
.mk-faq summary:focus-visible { outline: 2px solid var(--color-gold-500); outline-offset: 4px; border-radius: 4px; }

/* -------------------------------------------------------- story covers */

.mk-story {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: 1rem;
    background: var(--color-cream-50);
    border: 1px solid var(--color-cream-300);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.mk-story:hover { transform: translateY(-4px); box-shadow: 0 24px 44px -28px rgb(43 35 32 / 0.55); }
.mk-story__cover { aspect-ratio: 16 / 9; background: var(--color-gold-50); color: var(--color-gold-600); overflow: hidden; }
.mk-story__cover img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.5s ease; }
.mk-story:hover .mk-story__cover img { transform: scale(1.03); }
.mk-story__body { display: flex; flex: 1; flex-direction: column; padding: 1.2rem 1.3rem 1.3rem; }
.mk-story__body h3 { margin-top: 0.7rem; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.25; color: var(--color-maroon-700); }
.mk-story__body p { margin-top: 0.5rem; font-size: 0.92rem; line-height: 1.6; color: var(--color-ink-600); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mk-story__foot { margin-top: auto; padding-top: 1rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.8rem; color: var(--color-ink-500); }

/* ------------------------------------------------------- page load in */

@media (prefers-reduced-motion: no-preference) {
    .mk-rise { animation: mk-rise 0.8s cubic-bezier(.2, .8, .2, 1) both; }
    .mk-rise--2 { animation-delay: 0.12s; }
    .mk-rise--3 { animation-delay: 0.24s; }
    @keyframes mk-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
    .mk-postcard, .mk-tile, .mk-story, .mk-story__cover img { transition: none; }
    .mk-postcard { transform: none; }
}

/* ------------------------------------------------------- header + footer */

.mk-navlink {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-ink-600);
    transition: color 0.2s ease;
}
.mk-navlink:hover { color: var(--color-maroon-700); }
/* Header labels stay on one line ("À propos", "Créer un compte"); the links
   sit closer together on narrower desktops so all six still fit. */
.mk-navlink, .mk-header-actions a { white-space: nowrap; }
@media (max-width: 1279px) {
    .mk-navlink { padding-inline: 0.6rem; }
    .mk-navlink[aria-current="page"]::after { inset-inline: 0.6rem; }
}
.mk-navlink[aria-current="page"] { color: var(--color-maroon-700); font-weight: 600; }
.mk-navlink[aria-current="page"]::after {
    content: "";
    position: absolute;
    inset-inline: 0.9rem;
    bottom: 0.15rem;
    height: 2px;
    border-radius: 2px;
    background: var(--color-gold-400);
}

.mk-footer {
    position: relative;
    overflow: hidden;
    margin-top: clamp(4rem, 8vw, 6rem);
    background: var(--color-navy-900);
    color: var(--color-cream-100);
}
.mk-footer::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 3px;
    background: repeating-linear-gradient(90deg, var(--color-gold-400) 0 16px, transparent 16px 30px);
}
.mk-footer__skyline { position: absolute; inset-inline: 0; bottom: 3.5rem; height: 9rem; opacity: 0.07; pointer-events: none; }

/* --------------------------------------------------------------- legal */

.mk-doc-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.75rem; }
.mk-doc-tabs a {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--color-cream-400);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-ink-600);
    transition: border-color 0.2s, color 0.2s;
}
.mk-doc-tabs a:hover { border-color: var(--color-gold-400); color: var(--color-maroon-700); }
.mk-doc-tabs a[aria-current="page"] { background: var(--color-maroon-600); border-color: var(--color-maroon-600); color: var(--color-cream-50); }
.mk-doc {
    margin-top: -3rem;
    position: relative;
    padding: clamp(1.5rem, 4vw, 3rem);
    border-radius: 1.25rem;
    background: var(--color-cream-50);
    border: 1px solid var(--color-cream-300);
    box-shadow: 0 30px 60px -40px rgb(43 35 32 / 0.5);
}

/* ---------------------------------------------------------------- auth */

.mk-auth { min-height: 100vh; display: grid; }
@media (min-width: 1024px) { .mk-auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.mk-auth__art {
    position: relative;
    display: none;
    overflow: hidden;
    background: var(--color-navy-800);
    color: var(--color-cream-100);
}
@media (min-width: 1024px) { .mk-auth__art { display: flex; flex-direction: column; justify-content: space-between; padding: 3rem; } }
.mk-auth__art > .mk-auth__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mk-auth__art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(7 26 46 / 0.1) 0%, rgb(7 26 46 / 0.45) 45%, rgb(7 26 46 / 0.95) 100%);
}
.mk-auth__art > * { position: relative; z-index: 1; }
.mk-auth__art p { max-width: 28rem; font-family: var(--font-display); font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1.3; color: var(--color-cream-50); }
.mk-auth__form { position: relative; display: flex; align-items: center; justify-content: center; padding: 5rem 1rem 3rem; }

/* ----------------------------- home hero: the logo's bridge, turned over */

.mk-hero-arc {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: radial-gradient(90% 80% at 50% 10%, var(--color-cream-50) 0%, var(--color-gold-50) 70%, var(--color-cream-100) 100%);
}
/* Full width at its natural height, pinned to the bottom, so the deck's arc
   stays a true circle and closes the hero at every width. */
.mk-hero-arc .mk-bridge {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    z-index: -2;
    display: block;
    width: 100%;
    height: auto;
}
/* Only the tower and cable lines are softened; the deck and nodes stay full gold. */
/* The whole bridge is drawn as polished metal; this keeps it a calm background. */
.mk-hero-arc .mk-bridge { opacity: 0.28; }
/* A soft cream shade behind the text column, so the cables do not cross the words at full strength. */
.mk-hero-arc__shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(42% 52% at 27% 38%, rgb(253 249 245 / 0.8) 0%, rgb(253 249 245 / 0.35) 55%, transparent 80%);
}
[dir="rtl"] .mk-hero-arc__shade { background: radial-gradient(42% 52% at 73% 38%, rgb(253 249 245 / 0.8) 0%, rgb(253 249 245 / 0.35) 55%, transparent 80%); }
@media (max-width: 1023px) { .mk-hero-arc__shade, [dir="rtl"] .mk-hero-arc__shade { background: rgb(253 249 245 / 0.55); } }
@media (prefers-reduced-motion: reduce) { .mk-node-moving { display: none; } }
