@layer legacy {
/**
 * Morocco Passage — Base
 * Reset, document defaults, typography primitives, accessibility utilities.
 */

/* FONT FACES — intentionally not declared here.

   The two @font-face rules previously lived in this file and pointed at local
   WOFF2 binaries that are not installed yet. Because --font-display and
   --font-ui reference those families throughout the theme, every page made the
   browser request the missing files and log two 404s.

   They are now emitted from functions.php, per family, only when the binary
   actually exists on disk (morocco_passage_font_face_css). Absent font means
   no declaration, therefore no request, and the fallback stacks in tokens.css
   take over unchanged.

   Adding the binaries at their approved paths activates them with no code
   change. Do not reintroduce unconditional @font-face here. */

/* RESET */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
p,
figure,
dl,
dd,
ul,
ol {
    margin: 0;
}

ul[class],
ol[class] {
    padding: 0;
    list-style: none;
}

body {
    min-height: 100vh;
    min-height: 100svh;
    background-color: var(--c-canvas);
    color: var(--c-ink);
    font-family: var(--font-ui);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    font-synthesis-weight: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.mp-scroll-locked {
    overflow: hidden;
}

/* Lock the root scroller too (some browsers scroll <html>, not <body>), and
   keep the scrollbar's space reserved so the page does not shift sideways
   when the menu opens. */
html:has(> body.mp-scroll-locked) {
    overflow: hidden;
    scrollbar-gutter: stable;
}

img,
picture,
svg {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

/* TYPOGRAPHY PRIMITIVES */

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: var(--lh-heading);
    text-wrap: balance;
}

h1 {
    font-size: var(--fs-display);
    line-height: var(--lh-display);
    letter-spacing: var(--ls-display);
}

h2 {
    font-size: var(--fs-h2);
    letter-spacing: var(--ls-display);
}

h3 {
    font-size: var(--fs-h3);
}

/* h4 inherited the display family and heading line-height from the rule above
   but never received a size, so editor content rendered it at the browser
   default 1em — smaller than body copy at 17px, which inverted the hierarchy
   in Travel Guide articles. Sized just under h3 and just above body. */

p {
    text-wrap: pretty;
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

/* SHARED TEXT ROLES */

.mp-lead {
    font-size: var(--fs-lead);
    line-height: var(--lh-body);
    color: var(--c-muted);
    max-width: var(--w-reading);
}

.mp-label {
    font-family: var(--font-ui);
    font-size: var(--fs-label);
    font-weight: 600;
    letter-spacing: var(--ls-label);
    text-transform: uppercase;
    color: var(--c-signal-text);
}

.mp-meta {
    font-family: var(--font-ui);
    font-size: var(--fs-meta);
    letter-spacing: var(--ls-meta);
    text-transform: uppercase;
    color: var(--c-muted);
}

/* ACCESSIBILITY UTILITIES */

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.mp-skip-link {
    position: absolute;
    top: var(--s-2);
    left: var(--s-2);
    z-index: var(--z-skip-link);
    padding: var(--s-3) var(--s-4);
    background-color: var(--c-ink);
    color: var(--c-canvas);
    font-size: var(--fs-meta);
    text-decoration: none;
    transform: translateY(-200%);
}

.mp-skip-link:focus {
    transform: translateY(0);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: var(--focus-ring) solid var(--c-focus);
    outline-offset: var(--focus-ring);
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
        scroll-behavior: auto;
    }
}
}
