@layer legacy {
/**
 * Morocco Passage — Brand layer
 *
 * Frontend pass, 16 October 2026. Loaded last on every page, after the
 * homepage sheet, so these site-wide decisions win without rewriting the
 * audited history in components.css and refinement.css.
 *
 * Every value comes from tokens.css. Sections:
 *
 *   1  typography voice: kickers, labels and meta in sentence case
 *   2  links and buttons
 *   3  header over the hero, and the scrolled header
 *   4  mobile menu
 *   5  hero
 *   6  route line
 *   7  footer
 *   8  motion: reveals, media masks, page transitions, reduced motion
 *
 * Design rules this layer enforces:
 *   - Morocco is carried by photographs, place names and type, not motifs.
 *   - One accent: Saffron is a rule or a mark on Plaster, and text only on
 *     Indigo, where it passes contrast. Saffron Deep is the text-safe tone.
 *   - Labels are written, not shouted: sentence case, no tracking, no rules.
 *   - Media frames stay square; only controls take the 3px corner.
 */

/* ============================================================
   1  TYPOGRAPHY VOICE
   ============================================================ */

/* The kicker: a short sentence-case line above a heading, set in the UI
   face at reading size. It replaces the tracked uppercase eyebrow with its
   saffron rule, which every section used to repeat. */
.mp-kicker,
.mp-label,
.mp-heading__label {
    display: block;
    margin: 0 0 var(--s-4);
    font-family: var(--font-ui);
    font-size: var(--fs-kicker);
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.005em;
    text-transform: none;
    color: var(--c-signal-text);
}

.mp-heading__label::before,
.mp-page__head .mp-label::before {
    content: none;
}

.mp-page__head .mp-label {
    display: block;
}

.mp-section--deep .mp-kicker {
    color: var(--c-signal);
}

/* Meta lines (duration, kind of place) read as plain facts. */
.mp-meta,
.mp-card .mp-meta,
.mp-card--guide .mp-meta {
    font-size: var(--fs-meta);
    letter-spacing: 0.01em;
    text-transform: none;
}

/* Small interface words keep the same written voice. */
.mp-header__toggle-word,
.mp-drawer .mp-drawer__close,
.mp-drawer__close-word {
    letter-spacing: 0.01em;
    text-transform: none;
}

/* Footer group titles: quiet sentence case, matching the kickers. */

/* ============================================================
   2  LINKS AND BUTTONS
   ============================================================ */

/* Directional text link. A full hairline sits under the words at rest (so
   the link is visible without hover) and a saffron line draws over it on
   hover or focus. The decorative arrow is retired: the line carries it. */
.mp-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    min-height: var(--h-touch);
    font-family: var(--font-ui);
    font-size: var(--fs-btn);
    font-weight: 600;
    letter-spacing: 0.005em;
    color: var(--c-ink);
    text-decoration: none;
    border-block-end: 0;
    background-image:
        linear-gradient(var(--c-signal), var(--c-signal)),
        linear-gradient(var(--c-rule-strong), var(--c-rule-strong));
    background-repeat: no-repeat;
    background-position: 0 calc(100% - 0.6rem), 0 calc(100% - 0.6rem);
    background-size: 0% 1px, 100% 1px;
    transition: background-size var(--dur-base) var(--ease-out), color var(--dur-micro) var(--ease);
}

.mp-action:hover,
.mp-action:focus-visible {
    background-size: 100% 1px, 100% 1px;
}

.mp-action .mp-action__arrow {
    display: none;
}

/* Card cues are shorter than standalone links. The link background line
   otherwise lands through their text instead of below the baseline. */
.mp-action.mp-card__action {
    background-image: none;
}

.mp-section--deep .mp-action {
    color: var(--c-on-deep);
    background-image:
        linear-gradient(var(--c-signal), var(--c-signal)),
        linear-gradient(var(--c-rule-on-deep), var(--c-rule-on-deep));
}

/* Buttons: a press answers the hand with a 1px settle, never a bounce. */
.mp-btn {
    transition:
        background-color var(--dur-micro) var(--ease),
        border-color var(--dur-micro) var(--ease),
        color var(--dur-micro) var(--ease),
        transform var(--dur-micro) var(--ease);
}

.mp-btn:active {
    transform: translateY(1px);
}

/* On photographs and Indigo the primary is Plaster; hover warms to Saffron
   with ink text (Char on Saffron measures above 5:1). */

/* Focus is always visible and always in the palette. */
:where(a, button, summary, input, select, textarea):focus-visible {
    outline: var(--focus-ring) solid var(--c-focus);
    outline-offset: 3px;
}

/* ============================================================
   3  HEADER
   ============================================================ */

/* Over the hero, a soft ink fall-off behind the bar keeps the navigation
   legible on any photograph without a visible band. */
.mp-header::before {
    inset: 0 0 -2.5rem;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--c-ink) 52%, transparent) 0%,
        color-mix(in srgb, var(--c-ink) 18%, transparent) 60%,
        transparent 100%
    );
}

/* The mark settles a little once the page moves. Transform only, so the
   header keeps one height and nothing below it shifts. */
.mp-brand .mp-brand__logo {
    transform-origin: left center;
    transition:
        transform var(--dur-base) var(--ease-out),
        opacity var(--dur-base) var(--ease);
}

.mp-header.is-scrolled:not(.mp-header--transparent) .mp-brand .mp-brand__logo {
    transform: scale(0.9);
}

@supports (backdrop-filter: blur(1px)) {
    .mp-header.is-scrolled:not(.mp-header--transparent) {
        background-color: var(--c-header-glass);
    }
}

/* The persistent planning action: Indigo on Plaster, Plaster over the
   photograph. Hover keeps the fill and deepens it. */
@media (min-width: 1120px) {
    .mp-header__nav .mp-nav__list a {
        font-size: var(--fs-nav);
    }
}

/* ============================================================
   4  MOBILE MENU
   ============================================================ */

/* The menu is a list of places to go, not a sequence: no chapter numbers,
   and no arrows. Links are set large in the display face and arrive in a
   short stagger when the menu opens. */
.mp-drawer .mp-nav__list a::before,
.mp-drawer .mp-drawer__list a::before {
    content: none;
}

.mp-drawer .mp-nav__list a::after,
.mp-drawer .mp-drawer__list a::after {
    content: none;
}

.mp-drawer .mp-nav__list a,
.mp-drawer .mp-drawer__list a {
    min-height: 4rem;
    padding-block: var(--s-4);
    font-size: clamp(2rem, 1.4rem + 3vw, 2.75rem);
    letter-spacing: -0.02em;
    transition: color var(--dur-micro) var(--ease), padding var(--dur-base) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) { .mp-drawer .mp-nav__list a:hover,
.mp-drawer .mp-drawer__list a:hover {
    padding-inline-start: var(--s-2);
} }

/* Current section: a saffron rule before the name. */
.mp-drawer .mp-nav__list .current-menu-item > a,
.mp-drawer .mp-nav__list a[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--c-signal);
    padding-inline-start: var(--s-4);
}

@media (prefers-reduced-motion: no-preference) {
    .mp-drawer:not([hidden]) {
        animation: mp-fade-in var(--dur-base) var(--ease) both;
    }

    .mp-drawer:not([hidden]) .mp-nav__list > li,
    .mp-drawer:not([hidden]) .mp-drawer__list > li,
    .mp-drawer:not([hidden]) .mp-drawer__foot {
        animation: mp-rise-in 520ms var(--ease-out) both;
    }

    .mp-drawer:not([hidden]) li:nth-child(2) { animation-delay: 40ms; }
    .mp-drawer:not([hidden]) li:nth-child(3) { animation-delay: 80ms; }
    .mp-drawer:not([hidden]) li:nth-child(4) { animation-delay: 120ms; }
    .mp-drawer:not([hidden]) li:nth-child(5) { animation-delay: 160ms; }
    .mp-drawer:not([hidden]) li:nth-child(6) { animation-delay: 200ms; }
    .mp-drawer:not([hidden]) li:nth-child(7) { animation-delay: 240ms; }
    .mp-drawer:not([hidden]) .mp-drawer__foot { animation-delay: 260ms; }
}

/* ============================================================
   5  HERO (shared parts; the homepage composition is in homepage.css)
   ============================================================ */

/* The scrim sits where the words sit — low and to the left — and leaves
   the rest of the photograph as it was taken. */

/* ============================================================
   6  ROUTE LINE
   ============================================================ */

/* Place names in order, joined by a short hairline. Wraps naturally on any
   width; the hairline belongs to the name after it, so a line never starts
   with a dangling joint. */
.mp-route {
    margin-block-start: var(--s-4);
}

.mp-route__stops {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2) 0;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-ui);
    font-size: var(--fs-route);
    line-height: 1.4;
    color: var(--c-ink);
}

.mp-route__stop {
    display: inline-flex;
    align-items: center;
}

.mp-route__stop + .mp-route__stop::before {
    content: "";
    display: inline-block;
    width: 1.25rem;
    height: 1px;
    margin-inline: var(--s-2);
    background-color: var(--c-signal);
}

.mp-route__more {
    margin: var(--s-2) 0 0;
    font-size: var(--fs-meta);
    color: var(--c-muted);
}

/* ============================================================
   7  FOOTER
   ============================================================ */

/* The homepage closes on its own planning chapter directly above. */

/* The brand name, set large as the page's last image. Decorative: the
   accessible name is the logo's alt text above. */

/* ============================================================
   8  MOTION
   ============================================================ */

@keyframes mp-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes mp-rise-in {
    from {
        opacity: 0;
        transform: translateY(var(--shift-reveal));
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Media masks. Photographs that carry a section open from the bottom edge
   with a short clip instead of a lift: the frame is already in its place,
   so nothing moves and layout never shifts. */
[data-mp-mask][data-mp-reveal] {
    transition: clip-path 900ms var(--ease-out);
    transition-delay: calc(var(--mp-reveal-i, 0) * var(--stagger-reveal));
}

/* The photograph frames above reveal by clip, so their containers do not
   also lift. */

/* Page transitions. Same-origin navigations cross-fade with a few pixels of
   rise where the browser supports cross-document view transitions; other
   browsers navigate exactly as before. The header is its own layer, so it
   stays still while the page beneath it changes. */
@view-transition {
    navigation: auto;
}

.mp-header {
    view-transition-name: mp-header;
}

@keyframes mp-page-out {
    to {
        opacity: 0;
    }
}

@keyframes mp-page-in {
    from {
        opacity: 0;
        transform: translateY(var(--shift-page));
    }
}

@media (prefers-reduced-motion: reduce) {
    @view-transition {
        navigation: none;
    }

    .mp-brand .mp-brand__logo,
    .mp-action,
    .mp-btn {
        transition: none;
    }

    .mp-btn:active {
        transform: none;
    }
}
}
