/* ==========================================================================
   Every Body's Pace: case study page
   Source of truth: every-bodys-pace-case-study.md (sections in brackets).
   Layout switches at 1024px; type and spacing switch at 768px (4).
   ========================================================================== */

/* ---------- Tokens (3.1, 3.4) ---------- */
:root {
    --text: #1F3238;
    --text-secondary: #4D5B61;
    --surface-white: #FFFFFF;
    --line: #E1E4F0;
    --focus: #3E4EA3;
    --button: #FFC23D;
    --button-hover: #FFD06A;
    --button-pressed: #F2B024;
    --on-button: #1F3238;
    --video-corner: #FFD965;


    --font: 'Lexend', system-ui, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;

    /* Spacing (4.1), desktop defaults; overridden per breakpoint below */
    --pad: 112px;
    --route-x: 56px;
    --sec-top: 80px;
    --sec-bot: 80px;
    --gap: 40px;

    /* Frame corner marks (5.7) */
    --inset: 8px;
    --mark: 16px;
    --mark-w: 4px;
}

@media (max-width: 1439px) { :root { --pad: 80px; --route-x: 40px; } }
@media (max-width: 1023px) { :root { --pad: 40px; --sec-top: 64px; --sec-bot: 64px; --gap: 32px; } }
@media (max-width: 767px)  { :root { --pad: 24px; --sec-top: 40px; --sec-bot: 40px; --gap: 24px; --inset: 5px; --mark: 12px; --mark-w: 3px; } }

/* ---------- Section rotation (3.2) ---------- */
[data-tone="cream-gold"]      { --surface: #FBEFD9; --accent: #B5651D; }
[data-tone="white-coral"]     { --surface: #FFFFFF; --accent: #C2452D; --panel: #FDEDE6; }
[data-tone="teal"]            { --surface: #E3F2F2; --accent: #12807A; }
[data-tone="white-violet"]    { --surface: #FFFFFF; --accent: #7B3FE4; }
[data-tone="coral"]           { --surface: #FDEDE6; --accent: #C2452D; }
[data-tone="white-gold"]      { --surface: #FFFFFF; --accent: #B5651D; }
[data-tone="warm-blue"]       { --surface: #F6F3EE; --accent: #3B4CCA; }
[data-tone="white-teal"]      { --surface: #FFFFFF; --accent: #12807A; }
[data-tone="lavender-violet"] { --surface: #F1EEFF; --accent: #7B3FE4; }
[data-tone="white-blue"]      { --surface: #FFFFFF; --accent: #3B4CCA; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--surface-white);
    font-size: 16px;
    line-height: 28px;
    -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
strong, b { font-weight: 600; color: var(--text); }
a { color: inherit; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.vh {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: 16px; top: -100px; z-index: 100;
    background: var(--text); color: #fff; padding: 8px 16px; border-radius: 4px; text-decoration: none;
}
.skip-link:focus { top: 16px; }

.i {
    width: 24px; height: 24px; flex: none;
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.i--32 { width: 32px; height: 32px; }
.nw { white-space: nowrap; }

/* ---------- Type scale (3.3) ---------- */
.t-display { font-size: 80px; line-height: 88px; font-weight: 700; letter-spacing: -0.02em; }
.t-h2 { font-size: 32px; line-height: 44px; font-weight: 600; letter-spacing: -0.005em; }
.t-h3 { font-size: 28px; line-height: 36px; font-weight: 600; }
.t-tagline { font-size: 24px; line-height: 36px; font-weight: 500; }
.t-body-lg { font-size: 18px; line-height: 28px; font-weight: 400; }
.t-body { font-size: 16px; line-height: 28px; font-weight: 400; }
.t-caption { font-size: 14px; line-height: 20px; font-weight: 400; color: var(--text-secondary); }

@media (min-width: 1024px) and (max-width: 1279px) {
    .section--hero .t-display { font-size: 64px; line-height: 72px; }
}
@media (max-width: 767px) {
    body { font-size: 16px; line-height: 26px; }
    .t-display { font-size: 44px; line-height: 52px; letter-spacing: -0.015em; }
    .t-h2 { font-size: 24px; line-height: 36px; letter-spacing: 0; }
    .t-h3 { font-size: 20px; line-height: 28px; }
    .t-tagline { font-size: 20px; line-height: 28px; }
    .t-body { font-size: 16px; line-height: 26px; }
}

/* ---------- Layout (4.1) ---------- */
.section {
    background: var(--surface);
    padding-block: var(--sec-top) var(--sec-bot);
}
.container {
    position: relative;
    isolation: isolate;
    max-width: 1440px;
    margin-inline: auto;
    padding-inline: var(--pad);
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}
.block { display: flex; flex-direction: column; gap: 16px; }

.section--hero { --sec-top: 64px; --gap: 56px; }
@media (max-width: 1023px) { .section--hero { --sec-top: 64px; --gap: 32px; } }
@media (max-width: 767px)  { .section--hero { --sec-top: 48px; --gap: 24px; } .section--play { --sec-bot: 64px; } }

/* Desktop-only and stacked-only pieces (layout switch at 1024) */
@media (min-width: 1024px) { .m-only { display: none !important; } }
@media (max-width: 1023px) { .d-only { display: none !important; } }

/* ---------- Section title group (5.6) ---------- */
.title-group { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
.rule { display: block; width: 80px; height: 6px; margin-top: 16px; background: var(--accent); }
.title-group .intro { margin-top: 16px; }
.sparkles {
    display: inline-block;
    width: 26px; height: 34px;
    margin-left: 11px;
    margin-top: 0.12em;
    vertical-align: top;
    color: var(--accent);
    overflow: visible;
}
@media (max-width: 767px) {
    .rule { width: 64px; height: 4px; }
    .sparkles { width: 17px; height: 23px; margin-left: 6px; }
}

/* ---------- Button (5.2) ---------- */
.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    height: 56px; padding: 16px 32px;
    border-radius: 999px;
    background: var(--button); color: var(--on-button);
    font-size: 18px; line-height: 24px; font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease;
    align-self: flex-start;
}
.button:hover { background: var(--button-hover); }
.button:active { background: var(--button-pressed); }
@media (max-width: 767px) {
    .button { height: 48px; padding: 12px 24px; gap: 8px; font-size: 16px; line-height: 22px; width: 100%; }
    .button .i { width: 20px; height: 20px; }
}

/* ---------- Framed images (5.7) ---------- */
.figure { display: flex; flex-direction: column; gap: 12px; }

/* Inset figures: images and their captions sit in from the text column.
   Values per side at >=1440 / 1024-1439 / 768-1023; none below 768. */
.inset { margin-inline: var(--in, 0px); }
.inset--creator { --in: 80px; }  /* 80 / 40 / 24 */
.inset--map     { --in: 24px; }  /* 24 / 24 / 0 */
.inset--splash  { --in: 80px; }  /* 80 / 40 / 0 */
.inset--40      { --in: 40px; }  /* 40 / 40 / 0 */
.inset--dev     { --in: 40px; }  /* 40 / 24 / 0 */
.inset--a11y    { --in: 24px; }  /* 24 / 24 / 0 */
@media (max-width: 1439px) {
    .inset--creator, .inset--splash { --in: 40px; }
    .inset--dev { --in: 24px; }
}
@media (max-width: 1023px) {
    .inset--creator { --in: 24px; }
    .inset--map, .inset--splash, .inset--40, .inset--dev, .inset--a11y { --in: 0px; }
}
@media (max-width: 767px) { .inset { --in: 0px; } }
.frame {
    position: relative;
    padding: var(--inset);
    --m: linear-gradient(var(--accent), var(--accent));
    background:
        var(--m) top left / var(--mark) var(--mark-w) no-repeat,
        var(--m) top left / var(--mark-w) var(--mark) no-repeat,
        var(--m) top right / var(--mark) var(--mark-w) no-repeat,
        var(--m) top right / var(--mark-w) var(--mark) no-repeat,
        var(--m) bottom left / var(--mark) var(--mark-w) no-repeat,
        var(--m) bottom left / var(--mark-w) var(--mark) no-repeat,
        var(--m) bottom right / var(--mark) var(--mark-w) no-repeat,
        var(--m) bottom right / var(--mark-w) var(--mark) no-repeat;
}
.frame > img:not(.scene), .frame > picture > img { width: 100%; height: auto; border-radius: 4px; }
.frame > picture { display: block; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 767px) { .pair { grid-template-columns: 1fr; gap: 20px; } }
/* Both shots share the 16:10 debug view size; the wider prototype is cropped evenly at the sides */
.pair--match .frame > img:not(.scene) { aspect-ratio: 16 / 10; object-fit: cover; }

/* ---------- Lists and rows (4.2) ---------- */
.bullets { list-style: disc; padding-left: 1.4em; display: flex; flex-direction: column; gap: 12px; }
.bullets li::marker { color: var(--text); }

.rows > li, .a11y-rows > .row {
    position: relative;
    border-top: 1px solid var(--line);
    padding-block: 20px;
}
.row__title { font-size: 18px; line-height: 28px; font-weight: 600; }
.row__text { margin-top: 6px; font-size: 16px; line-height: 28px; color: var(--text-secondary); }
@media (max-width: 767px) {
    .row__text { font-size: 16px; line-height: 26px; }
}

.icon-rows > li {
    display: flex; align-items: center; gap: 16px;
    border-top: 1px solid var(--line);
    padding-block: 14px;
    font-size: 16px; line-height: 28px;
}
.icon-rows > li:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 767px) { .icon-rows > li { font-size: 16px; line-height: 26px; } }

/* ---------- Keycaps, pads, spoon meter (5.3, 5.4) ---------- */
.key {
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 56px;
    background: #fff; border: 1px solid var(--line); border-radius: 8px;
    font-family: var(--mono); font-weight: 700; font-size: 18px; line-height: 24px; color: var(--text);
}
.key--sm { width: auto; min-width: 56px; height: 32px; padding: 0 8px; border-radius: 6px; font-size: 14px; line-height: 20px; flex: none; }
.wasd { display: grid; grid-template-columns: repeat(3, 56px); gap: 8px; }
.wasd .key--w { grid-column: 2; grid-row: 1; }
.wasd .key:not(.key--w) { grid-row: 2; }
.pad {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 32px; height: 32px; border-radius: 50%;
    font-weight: 600; font-size: 18px; line-height: 1;
}
.pad--a { background: #2A367F; color: #fff; }
.pad--b { background: #8FB3F2; color: #1F3238; }

.spoon-meter {
    display: inline-flex; align-self: flex-start;
    padding: 8px 16px;
    background: var(--panel, #FDEDE6);
    border: 1px solid var(--line);
    border-radius: 999px;
}
.spoon-meter img { width: 40px; height: 40px; image-rendering: pixelated; }
.spoon-meter img + img { margin-left: -6px; }
@media (max-width: 1023px) { .spoon-meter img { width: 34px; height: 34px; } }
/* 10 spoons at 34px make a 320px pill, wider than the column on 320px phones */
@media (max-width: 359px) { .spoon-meter { padding: 6px 12px; } .spoon-meter img { width: 28px; height: 28px; } .spoon-meter img + img { margin-left: -5px; } }

/* ---------- Walkable route (5.8) ---------- */
.route, .route-arch, .stop { display: none; }
@media (min-width: 1024px) {
    .route {
        display: block; position: absolute; left: 0; top: 0;
        width: 100%; height: 100%; z-index: -1; overflow: visible; pointer-events: none;
    }
    .route__path {
        fill: none; stroke: var(--accent); stroke-width: 3;
        stroke-dasharray: 6 8; stroke-linecap: round; stroke-linejoin: round;
    }
    .route-arch {
        display: block; position: absolute;
        width: 40px; height: 32px;
        left: calc(var(--route-x) - var(--pad) - 20px); top: 6px;
        color: var(--accent);
    }
    .has-stop { position: relative; }
    .stop {
        display: block; position: absolute;
        width: 14px; height: 14px; border-radius: 50%;
        left: calc(var(--route-x) - var(--pad) - 7px);
        top: 29px;
        background: #fff; border: 3px solid var(--accent);
    }
    .has-stop > .stop { top: 11px; }
    .stop--here { background: var(--button); border-color: var(--text); }
    .corridor { display: none; }
}
.next-room {
    display: inline-flex; align-items: flex-end; gap: 16px; align-self: flex-start;
    text-decoration: none; color: var(--text);
}
.next-room__arch { width: 40px; height: 32px; color: var(--accent); flex: none; }
.next-room__text { display: flex; flex-direction: column; }
.next-room__title { font-weight: 600; font-size: 16px; line-height: 24px; }
.next-room:hover .next-room__title { text-decoration: underline; }

/* Sprite and fatigue sheets wait until script.js marks them near the viewport (.bg-ready) */
.js [data-lazy-bg]:not(.bg-ready) { background-image: none !important; }

/* Corridor (below 1024) */
.corridor {
    position: relative; height: 96px; margin-bottom: calc(-1 * var(--gap) + 16px);
    background: repeating-linear-gradient(90deg, var(--accent) 0 5px, transparent 5px 12px) left bottom / 100% 2.5px no-repeat;
}
.corridor .corridor__sprite {
    position: absolute; left: 0; bottom: 2px; width: 64px; height: 96px;
    background: url("img/sprites/sprite-wheelchair-dreadlocs.svg") 0 0 / 384px 768px no-repeat;
}
.corridor .corridor__sprite--walker { background-image: url("img/sprites/sprite-walker.svg"); }
.corridor .corridor__sprite--cane { background-image: url("img/sprites/sprite-cane-afro.svg"); }

/* Route rider: rolls along the route as the page scrolls (How to Play, Methodologies, Accessibility) */
.route-rider { display: none; }
@media (min-width: 1024px) {
    .route-rider {
        display: block; position: absolute; top: 0; z-index: 1;
        left: calc(var(--route-x) - 32px);
        width: 64px; height: 96px;
        background: url("img/sprites/sprite-wheelchair-dreadlocs.svg") 0 0 / 384px 768px no-repeat;
        pointer-events: none; will-change: transform;
    }
    .route-rider--walker { background-image: url("img/sprites/sprite-walker.svg"); }
    .route-rider--cane { background-image: url("img/sprites/sprite-cane-afro.svg"); }
}
@media (max-width: 767px) {
    .corridor { height: 72px; }
    .corridor .corridor__sprite { width: 48px; height: 72px; }
    .corridor .corridor__sprite { background-size: 288px 576px; }
}

/* ---------- Resident scenes (5.9) ---------- */
.scene { width: var(--w); height: auto; image-rendering: pixelated; shape-rendering: crispEdges; pointer-events: none; }
.scene--abs { position: absolute; z-index: 1; }
.scene--inline { margin-top: 40px; }
.scene-strip { display: flex; justify-content: center; align-items: flex-end; padding-top: 8px; }
@media (max-width: 767px) { .scene-strip .scene { width: calc(var(--w) * 0.75); } }

/* ---------- 6.1 Gameplay video: a museum arcade with residents in its arches ---------- */
.hero-media {
    --wall: #E8E4DA;
    --ledge: #CFC8B7;
    position: relative;
    display: flex; justify-content: center;
    background: var(--wall);
    z-index: 1;
}
.hero-media__video {
    position: relative; z-index: 1;
    display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0;
}
.hero-media::after {
    content: ""; position: absolute; z-index: 2; pointer-events: none;
    --m: linear-gradient(#B5651D, #B5651D);
    background:
        var(--m) top left / 16px 4px no-repeat, var(--m) top left / 4px 16px no-repeat,
        var(--m) top right / 16px 4px no-repeat, var(--m) top right / 4px 16px no-repeat,
        var(--m) bottom left / 16px 4px no-repeat, var(--m) bottom left / 4px 16px no-repeat,
        var(--m) bottom right / 16px 4px no-repeat, var(--m) bottom right / 4px 16px no-repeat;
}
/* Painted rooms: four arches in the floorplan colours repeat, so the wall continues at any width */
.arcade__side, .arcade::before, .arcade-strip::before {
    --rooms: calc(var(--tile, 160px) * 4);
    --u: calc(var(--tile, 160px) / 160);
    background:
        url("img/arcade/room-base.svg") var(--arch-x, 50%) calc(100% - var(--floor, 24px)) / var(--rooms) calc(var(--u) * 72) repeat-x,
        var(--room-top, url("img/arcade/room-top.svg")) var(--arch-x, 50%) 0 / var(--rooms) calc(var(--u) * 64) repeat-x,
        url("img/arcade/room-mid.svg") var(--arch-x, 50%) calc(var(--u) * 40) / var(--rooms) calc(100% - var(--floor, 24px) - var(--u) * 40) repeat-x;
}
/* Stacked layouts centre one arch on the page, and leave out the lanterns */
.arcade::before, .arcade-strip::before { --arch-x: calc(50% + var(--tile, 160px) / 2); }
@media (max-width: 1023px) {
    .hero-media, .arcade-strip { --room-top: url("img/arcade/room-top-compact.svg"); }
}
.arcade__bay { position: relative; flex: none; width: var(--tile, 160px); }
.arcade__bay picture { display: block; position: relative; z-index: 1; }
.arcade__bay img { width: 100%; height: auto; }
/* Benches stand in front of the pillars, behind the residents */
.arcade__bay .arcade__bench {
    position: absolute; left: 0; bottom: 14px; z-index: 0;
    width: 80px; max-width: none;
    transform: translateX(-50%);
}
.arcade__bay .arcade__bench--far { left: 100%; display: none; }
@media (min-width: 1024px) and (max-width: 1183px) { .arcade__bay .arcade__bench { display: none; } }
@media (min-width: 1184px) and (max-width: 1375px) {
    .arcade__bay .arcade__bench--inner { display: none; }
    .arcade__bay .arcade__bench--far { display: block; }
}
@media (min-width: 1376px) and (max-width: 1695px) { .arcade__bay .arcade__bench--wide { display: none; } }
@media (min-width: 768px) and (max-width: 1023px) {
    .arcade__bay .arcade__bench { bottom: 11px; width: 64px; }
    .arcade__bay .arcade__bench--wide { display: none; }
}

/* Desktop: the arcade runs either side of the floating video */
@media (min-width: 1024px) {
    .hero-media {
        --video-h: calc(min(480px, 100vw / 2.25) - 48px);
        --video-w: calc(var(--video-h) * 16 / 9);
        box-sizing: content-box;
        height: var(--video-h);
        padding-block: 24px;
        background: linear-gradient(var(--ledge), var(--ledge)) 0 100% / 100% 24px no-repeat, var(--wall);
    }
    .hero-media__video {
        width: auto; height: 100%; max-width: 100%;
        border-radius: 4px;
    }
    .hero-media::after {
        inset: 12px auto; left: 50%;
        width: calc(var(--video-w) + 24px);
        transform: translateX(-50%);
    }
    .arcade { position: absolute; inset: 48px 0 0; }
    .arcade__side {
        position: absolute; top: 0; bottom: 0;
        display: flex; align-items: flex-end;
        overflow: hidden;
    }
    .arcade__side--left { left: 0; right: calc(50% + var(--video-w) / 2); justify-content: flex-end; --arch-x: 100%; }
    .arcade__side--right { right: 0; left: calc(50% + var(--video-w) / 2); --arch-x: 0%; }
}
/* One moment per side, then two from 1376px and three from 1696px */
@media (min-width: 1024px) and (max-width: 1375px) { .arcade__bay--inner { display: none; } }
@media (min-width: 1024px) and (max-width: 1695px) { .arcade__bay--outer { display: none; } }

/* Tablet: no room beside the video, so the arcade runs underneath it */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-media {
        flex-direction: column;
        padding: 24px var(--pad) 0;
    }
    .hero-media__video {
        /* Capped so the arcade and title stay near the first fold on wider tablets */
        align-self: center;
        width: min(100%, 768px);
        border-radius: 4px;
    }
    .hero-media::after {
        top: 12px; bottom: 164px; left: 50%;
        width: calc(min(100% - 2 * var(--pad), 768px) + 24px);
        transform: translateX(-50%);
    }
    .arcade {
        position: relative; flex: none;
        display: flex; justify-content: center; align-items: flex-end;
        height: 176px;
        margin-inline: calc(-1 * var(--pad));
        overflow: hidden;
        background: linear-gradient(var(--ledge), var(--ledge)) 0 100% / 100% 24px no-repeat;
    }
    .arcade::before { content: ""; position: absolute; inset: 16px 0 0; }
    .arcade__side { display: contents; }
    .arcade__bay--plant { display: none; }
}
/* Mobile: the video stays clean so the title sits high */
@media (max-width: 767px) {
    .hero-media::after, .arcade { display: none; }
}

/* Mobile arcade: a strip between the intro and the credits */
.arcade-strip { display: none; }
@media (max-width: 767px) {
    .arcade-strip {
        --tile: 120px; --floor: 16px;
        position: relative;
        display: flex; justify-content: center; align-items: flex-end;
        height: 136px;
        margin-inline: calc(-1 * var(--pad));
        overflow: hidden;
        background: linear-gradient(#CFC8B7, #CFC8B7) 0 100% / 100% 16px no-repeat, #E8E4DA;
    }
    .arcade-strip::before { content: ""; position: absolute; inset: 12px 0 0; }
    .arcade-strip img { position: relative; flex: none; width: var(--tile); height: auto; }
    .arcade-strip .arcade-strip__bench { position: absolute; bottom: 9px; width: 48px; transform: translateX(-50%); }
    .arcade-strip .arcade-strip__bench--1 { left: calc(50% - var(--tile) / 2); }
    .arcade-strip .arcade-strip__bench--2 { left: calc(50% + var(--tile) / 2); }
}
@media (max-width: 359px) {
    .arcade-strip { --tile: 100px; height: 118px; }
}

/* ---------- 6.2 Hero ---------- */
.hero__grid { display: grid; grid-template-columns: 600px 1fr; gap: 80px; align-items: start; }
.hero__title { display: flex; flex-direction: column; }
.hero__tagline { margin-top: 20px; color: var(--text-secondary); }
.hero__intro { display: flex; flex-direction: column; gap: 32px; }
.credits { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 24px; }
.credit { border-top: 1px solid var(--line); padding-block: 12px; }
.credit dt { font-size: 14px; line-height: 20px; color: var(--text-secondary); }
.credit dd { margin-top: 2px; font-size: 16px; line-height: 28px; }
@media (max-width: 1279px) { .hero__grid { grid-template-columns: 456px 1fr; gap: 48px; } }
@media (max-width: 1023px) {
    .hero__grid { grid-template-columns: 1fr; gap: 0; }
    .hero__intro { margin-top: 32px; }
    .hero__grid > .scene-strip { margin-top: 32px; }
    .credits { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
    .hero__tagline { margin-top: 12px; }
    /* Mobile order: title, residents, intro */
    .hero__grid > .scene-strip { order: 1; margin-top: 24px; }
    .hero__intro { order: 2; margin-top: 24px; gap: 24px; }
    .credits { grid-template-columns: 1fr; }
    .credit dd { font-size: 16px; line-height: 26px; }
}

/* ---------- 6.3 How to Play ---------- */
.route-section .block, .controls .block { --block-gap: 24px; gap: var(--block-gap); }
@media (max-width: 1023px) { .route-section .block, .controls .block { --block-gap: 20px; } }
.route-section .block > h3 + .t-body { margin-top: calc(12px - var(--block-gap)); }
.route-section .block.spoons { --block-gap: 24px; }
@media (min-width: 1024px) { .spoons .spoon-meter { margin-block: 16px; } }
@media (max-width: 1023px) {
    .route-section .block.spoons { --block-gap: 20px; }
    .spoons .spoon-meter { margin-block: 4px; }
}
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
@media (max-width: 1023px) { .controls { grid-template-columns: 1fr; gap: var(--gap); } }
.statement { max-width: 834px; }
@media (min-width: 768px) and (max-width: 1023px) { .statement br { display: none; } }
.floorplan { gap: 24px; }
@media (max-width: 1023px) { .floorplan { gap: 20px; } }
.room-map {
    background: #E3F2F2;
    padding: 34px 16px 46px;
    border-radius: 4px;
}
.room-map svg { width: 100%; max-width: 661px; height: auto; margin-inline: auto; overflow: visible; }
.room-map__paths path { fill: none; stroke: #16181C; stroke-opacity: .35; stroke-width: 4.33; stroke-dasharray: 8.66 11.55; }
@media (min-width: 1024px) and (max-width: 1439px) {
    .room-map { padding: 24px 16px; }
    .room-map svg { max-width: 529px; }
}
.room-map__lobby { fill: #fff; }

/* Planned vs final: drag (or use arrow keys) to reveal the rendered map */
.compare { position: relative; overflow: hidden; --pos: 50%; }
.compare__final {
    position: absolute; inset: 0; padding: inherit;
    background: #CBCFCB;
    clip-path: inset(0 0 0 var(--pos));
}
.compare__tag {
    position: absolute; top: 12px; z-index: 2; pointer-events: none;
    padding: 4px 10px; border-radius: 999px;
    background: rgba(255, 255, 255, .9); color: var(--text);
    font-family: var(--mono); font-size: 11px; line-height: 16px; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
}
.compare__tag--planned { left: 12px; }
.compare__tag--final { right: 12px; }
.compare__range {
    position: absolute; inset: 0; z-index: 3;
    width: 100%; height: 100%; margin: 0;
    opacity: 0; cursor: ew-resize; touch-action: pan-y;
    -webkit-appearance: none; appearance: none;
}
.compare__handle {
    position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 2;
    width: 3px; margin-left: -1.5px; background: #fff;
    box-shadow: 0 0 0 1px rgba(22, 24, 28, .12);
    pointer-events: none;
}
.compare__knob {
    position: absolute; top: 50%; left: 50%;
    width: 44px; height: 44px; transform: translate(-50%, -50%);
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--accent); color: #fff;
    box-shadow: 0 0 0 3px #fff, 0 4px 12px rgba(22, 24, 28, .25);
    transition: transform .15s ease;
}
.compare .compare__knob svg { width: 24px; height: 24px; margin: 0; }
.compare__range:hover + .compare__handle .compare__knob,
.compare__range:active + .compare__handle .compare__knob { transform: translate(-50%, -50%) scale(1.08); }
.compare__range:focus-visible + .compare__handle .compare__knob { outline: 2px solid var(--focus); outline-offset: 5px; }
@media (max-width: 767px) {
    .compare__knob { width: 36px; height: 36px; }
    .compare .compare__knob svg { width: 20px; height: 20px; }
    .compare__tag { top: 8px; font-size: 10px; letter-spacing: 1.5px; padding: 2px 8px; }
    .compare__tag--planned { left: 8px; }
    .compare__tag--final { right: 8px; }
}
@media (prefers-reduced-motion: reduce) { .compare__knob { transition: none; } }
.room-map text { font-family: var(--font); font-weight: 600; text-anchor: middle; dominant-baseline: central; fill: var(--text); }
.room-map text.on-dark { fill: #fff; }
.room-map__names text { font-size: 18px; }
.room-map__nums text { font-size: 36px; }
.room-map__nums { display: none; }
@media (max-width: 1023px) {
    .room-map__names { display: none; }
    .room-map__nums { display: inline; }
    .room-map { padding: 29px 16px; }
    .room-map svg { max-width: 296px; }
    .room-map__paths path { stroke-width: 2.7; stroke-dasharray: 5.4 7.1; }
}
/* Key for the numbered map, shown only where the rooms are numbered */
.room-list { display: none; }
@media (max-width: 1023px) { .room-list { display: flex; flex-direction: column; list-style: decimal; padding-left: 1.4em; } }
.settings { display: grid; grid-template-columns: 1fr 276px; gap: 80px; align-items: start; }
.settings__image img { image-rendering: auto; }
@media (max-width: 1023px) {
    .settings { grid-template-columns: 1fr; gap: 20px; }
    .settings__image { width: 276px; max-width: 100%; margin-inline: auto; }
}

/* ---------- 6.4 Behind the game ---------- */
#behind-title { font-size: 48px; line-height: 56px; font-weight: 700; }
@media (max-width: 767px) { #behind-title { font-size: 28px; line-height: 40px; } }
.aim, .outline { gap: 24px; }
@media (max-width: 1023px) { .aim, .outline { gap: 12px; } }
@media (min-width: 1024px) and (max-width: 1439px) { .outline { max-width: 680px; } }

/* ---------- 6.6 Visual Direction ---------- */
.principles-block { position: relative; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 24px; }
.principle { display: flex; flex-direction: column; gap: 16px; }
.principle__title { text-wrap: balance; min-height: 72px; }
.diagram { position: relative; aspect-ratio: 379 / 220; }
.diagram svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
@media (max-width: 1023px) {
    .principles { grid-template-columns: 1fr; gap: var(--gap); margin-top: 8px; }
    .principle__title { min-height: 0; }
    .diagram { aspect-ratio: auto; height: 190px; max-width: 328px; }
}
@media (max-width: 767px) { .principle__title { font-size: 20px; line-height: 28px; } }

/* Diagram 1: fixed isometric camera */
.dg-wall-l { fill: #98B4BE; }
.dg-wall-r { fill: #E6F4F6; }
.dg-floor { fill: #fff; }
.dg-grid { fill: none; stroke: #1F3238; stroke-opacity: .12; stroke-width: 1; }
.dg-edge { fill: none; stroke: #1F3238; stroke-width: 2; stroke-linejoin: round; }
.dg-sight path { fill: none; stroke: #1F3238; stroke-opacity: .55; stroke-width: 1.5; stroke-dasharray: 4 5; }
.dg-figure { transform: translate(110px, 140px); }
.dg-lens { transform-box: fill-box; transform-origin: center; }
.anim.is-playing .dg-figure { animation: dg-walk 6s linear infinite; }
.anim.is-playing .dg-sight { animation: dg-draw .6s ease-out both; }
.anim.is-playing .dg-lens { animation: dg-blink 3s ease-in-out infinite; }
@keyframes dg-walk {
    0%, 8%   { transform: translate(110px, 140px); }
    33%      { transform: translate(165px, 112px); }
    50%      { transform: translate(195px, 140px); }
    75%      { transform: translate(150px, 165px); }
    92%, 100% { transform: translate(110px, 140px); }
}
@keyframes dg-draw { from { opacity: 0; } to { opacity: 1; } }
@keyframes dg-blink { 0%, 90%, 100% { transform: scale(1); } 94% { transform: scale(.85); } }

/* Diagram 2: flat, pre-lit colour */
.dg-light .f { fill: var(--day); }
.dg-tile-edge { fill: none; stroke: #1F3238; stroke-width: 2; stroke-linejoin: round; }
.anim.is-playing .dg-light .f { animation: dg-night 5.6s linear infinite; }
@keyframes dg-night {
    0%, 44.6%  { fill: var(--day); }
    50%, 94.6% { fill: var(--night); }
    100%       { fill: var(--day); }
}

/* Diagram 3: 2D character on a 3D tile (sprite frames set in script.js) */
.sprite-actor {
    position: absolute; left: 50%; bottom: 52px;
    width: 128px; height: 192px; margin-left: -64px;
    background-repeat: no-repeat;
    background-size: 768px 1536px;
    background-position: 0 0;
    transform-origin: 50% 100%;
}
@media (min-width: 1024px) and (max-width: 1439px) { .sprite-actor { bottom: 36px; transform: scale(.69); } }
@media (max-width: 1023px) { .sprite-actor { bottom: 45px; transform: scale(.86); } }

/* Splash screens and palette */
.splash { display: flex; flex-direction: column; gap: 12px; }
.splash__grid { display: grid; grid-template-columns: 591fr 441fr; gap: 24px; align-items: start; }
.splash__left { display: flex; flex-direction: column; gap: 24px; }
.splash__solo-caption { display: none; }
.palette { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.swatch { display: flex; flex-direction: column; }
.swatch__block { display: block; height: 326px; background: var(--c); border-radius: 4px; }
.swatch--light .swatch__block { border: 1px solid var(--line); }
.swatch__role { margin-top: 10px; font-size: 14px; line-height: 20px; font-weight: 600; }
.swatch__hex { font-size: 14px; line-height: 20px; color: var(--text-secondary); }
@media (max-width: 1439px) {
    .splash__grid { grid-template-columns: 447fr 313fr; }
    .palette { grid-template-columns: repeat(4, 1fr); row-gap: 16px; }
    .swatch__block { height: 72px; }
}
@media (max-width: 1023px) {
    .splash__grid { grid-template-columns: 1fr; gap: 24px; }
    .splash__left { gap: 24px; }
    .splash__solo-caption { display: block; }
    .splash__group-caption { display: none; }
    .splash__right { max-width: 200px; }
    .palette { grid-template-columns: 1fr; gap: 0; }
    .swatch {
        flex-direction: row; justify-content: space-between; align-items: center;
        background: var(--c); padding: 13px 16px; min-height: 51px;
    }
    .swatch:first-child { border-radius: 4px 4px 0 0; }
    .swatch:last-child { border-radius: 0 0 4px 4px; }
    .swatch--light { box-shadow: inset 1px 0 var(--line), inset -1px 0 var(--line); }
    .swatch__block { display: none; }
    .swatch__role, .swatch__hex { margin: 0; font-size: 16px; line-height: 24px; color: var(--text); }
    .swatch__hex { font-weight: 400; }
    .swatch--dark .swatch__role, .swatch--dark .swatch__hex { color: #fff; }
}

/* ---------- 6.7 Spatial Planning ---------- */
.split { display: grid; gap: 80px; align-items: start; }
.split--52 { grid-template-columns: 1fr 507px; }
@media (min-width: 1024px) {
    .split--52 > div:first-child { position: relative; align-self: stretch; }
    .split--52 .scene--inline { position: absolute; left: 0; bottom: 23px; margin: 0; }
    .figure--tight { margin-top: -16px; }
}
@media (min-width: 1024px) and (max-width: 1439px) { .split--52 .scene--inline { display: none; } }
.frame--museum img:not(.scene) { aspect-ratio: 2342 / 740; object-fit: cover; }
.frame--museum picture { display: block; }
.frame--museum picture img { width: 100%; height: auto; border-radius: 4px; }
@media (max-width: 1023px) { .frame--museum img:not(.scene) { aspect-ratio: 672 / 452; } }
.split--half { grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 1023px) {
    .split, .split--52, .split--half { grid-template-columns: 1fr; gap: var(--gap); }
}

/* ---------- 6.8 Sprite-Based Avatars ---------- */
.sprite-strip {
    position: relative; overflow: hidden;
    height: 280px;
}
.sprite-strip .actor {
    position: absolute; left: 0; bottom: 16px;
    width: 128px; height: 192px;
    background-repeat: no-repeat; background-size: 768px 1536px;
    will-change: transform;
}
@media (max-width: 1023px) {
    .sprite-strip { height: 180px; }
    .sprite-strip .actor { width: 96px; height: 144px; background-size: 576px 1152px; bottom: 8px; }
}
.sheets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.sheets img { width: 100%; height: auto; border-radius: 4px; }
@media (max-width: 767px) { .sheets { grid-template-columns: 1fr 1fr; } }
.fatigue-sprites { display: flex; align-items: center; gap: 8px; }
.fatigue-sprites img { image-rendering: pixelated; }
.fatigue-sprites__spiral { width: 120px; height: 120px; }
.fatigue-sprites__bird { width: 72px; height: 72px; }
@media (max-width: 1023px) {
    .fatigue-sprites__spiral { width: 80px; height: 80px; }
    .fatigue-sprites__bird { width: 52px; height: 52px; }
}
.scene--inline.scene--fatigue { margin-left: 42.5%; margin-top: 0; }
@media (min-width: 1440px) {
    /* Stands just below the text without making the row taller */
    .fatigue > .block { position: relative; }
    .scene--inline.scene--fatigue { position: absolute; left: 0; top: calc(100% + 16px); }
}
.fatigue-player {
    aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden;
    background: #EFEFEF url("img/museum-fatigue-sheet.png") no-repeat;
    background-size: 600% 700%;
    background-position: 0% 83.333%; /* frame 030 (col 0, row 5): still frame */
}

.fatigue-player.is-canvas { background-image: none; }
.fatigue-player canvas { display: block; width: 100%; height: 100%; }
@media (max-width: 1023px) { .fatigue-player { max-width: 328px; } }

/* ---------- 6.9 Inside the Four Rooms ---------- */
.rooms { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; row-gap: 40px; }
.room { display: flex; flex-direction: column; gap: 12px; }
.room h3 + p { margin-top: -8px; } /* title to description: 4px */
@media (max-width: 1023px) { .rooms { column-gap: 24px; row-gap: 48px; } }
@media (max-width: 767px) { .rooms { grid-template-columns: 1fr; row-gap: 24px; } }

/* ---------- 6.11 Accessibility ---------- */
.a11y-rows { display: flex; flex-direction: column; }
.row-figure { margin-top: 4px; margin-bottom: 24px; }
.mobility { display: flex; flex-wrap: wrap; gap: 16px; }
.mobility li { width: 160px; display: flex; flex-direction: column; }
.mobility__tile {
    display: flex; align-items: center; justify-content: center;
    width: 160px; height: 160px; background: #1E3237; border-radius: 4px;
}
.mobility__tile img { width: 115px; height: 115px; }
.mobility__name { margin-top: 8px; font-size: 16px; line-height: 24px; font-weight: 600; }
.mobility__desc { margin-top: 8px; font-size: 16px; line-height: 24px; color: var(--text-secondary); }
@media (max-width: 1023px) {
    .mobility { gap: 16px 14px; }
    .mobility li { width: 100px; }
    .mobility li:first-child { width: 135px; }
    .mobility__tile { width: 100px; height: 100px; }
    .mobility__tile img { width: 64px; height: 64px; }
    .mobility__name, .mobility__desc { font-size: 14px; line-height: 20px; }
}
@media (max-width: 767px) { .mobility li:first-child { width: 100px; } }

.move-cards { display: flex; gap: 40px; align-items: flex-start; }
.move-card { width: 448px; display: flex; flex-direction: column; gap: 16px; }
.move-card--phone { width: 350px; }
.move-card__device { display: flex; align-items: center; gap: 8px; font-size: 16px; line-height: 24px; font-weight: 600; }
.move-card__ui {
    display: flex; flex-direction: column; gap: 10px;
    background: #3B4B51; color: #E6F4F6; border-radius: 16px;
    padding: 25px 28px;
    font-size: 15px; line-height: 24px;
}
.move-card__ui b { color: #fff; font-weight: 600; }
.move-card__label {
    font-family: var(--mono); font-size: 11px; line-height: 15px; color: #FFD965;
    letter-spacing: .25em; text-transform: uppercase;
    margin-bottom: 10px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .2);
}
.move-card__keys { display: grid; grid-template-columns: repeat(3, 56px) auto; gap: 5px; justify-content: center; align-items: center; margin-bottom: 6px; }
.move-card__keys .mk--w { grid-column: 2; grid-row: 1; }
.move-card__keys .mk:not(.mk--w) { grid-row: 2; }
.move-card__keys .marker { grid-column: 4; grid-row: 2; margin-left: 4px; }
.mk {
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; border-radius: 6px;
    background: #fff; color: #1F3238;
    font-family: var(--mono); font-weight: 700; font-size: 18px;
}
.mk--sm { width: 32px; height: 32px; font-size: 14px; margin-right: 8px; }
.move-card__line { display: block; min-height: 32px; line-height: 32px; }
.move-card__keys + .move-card__line { min-height: 25px; line-height: 25px; }
.move-card__line .mk, .move-card__line .marker { vertical-align: middle; }
.move-card__stick { display: flex; align-items: center; justify-content: center; gap: 8px; margin-block: 8px; padding-left: 32px; }
.joystick {
    width: 72px; height: 72px; border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .25);
    display: flex; align-items: center; justify-content: center;
}
.joystick::after { content: ""; width: 28px; height: 28px; border-radius: 50%; background: #FFD965; }
.marker {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--button); box-shadow: inset 0 0 0 1.5px var(--text);
    color: var(--text); font-weight: 600; font-size: 14px; line-height: 1;
    font-family: var(--font);
}
.move-card__ui .marker { margin-left: 8px; }
.legend { display: flex; flex-direction: column; gap: 8px; }
.legend li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 24px; }
@media (max-width: 1023px) {
    .move-cards { flex-direction: column; gap: 32px; }
    .move-card, .move-card--phone { width: 100%; max-width: 448px; }
}

.exit-card {
    width: 440px; max-width: 100%;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    background: #26363B; color: #E6F4F6; border-radius: 16px;
    padding: 45px 32px 41px;
}
.exit-card__icon {
    width: 88px; height: 88px; border-radius: 50%;
    background: #33474D; display: flex; align-items: center; justify-content: center;
}
.exit-card__icon svg { width: 48px; height: 48px; }
.exit-card__title { margin-top: 16px; font-size: 22px; line-height: 28px; font-weight: 600; color: #fff; }
.exit-card__text { margin-top: 12px; font-size: 16px; line-height: 26px; color: #A9BBC1; max-width: 330px; }
.exit-card__buttons { display: flex; gap: 10px; margin-top: 32px; flex-wrap: wrap; justify-content: center; }
.exit-card__stay, .exit-card__leave {
    display: inline-flex; align-items: center; height: 48px; padding: 0 24px; border-radius: 999px;
    font-weight: 600; font-size: 16px;
}
.exit-card__stay { background: #E88760; color: #1F3238; }
.exit-card__leave { border: 1px solid rgba(255, 255, 255, .25); color: #fff; }
@media (max-width: 767px) {
    .exit-card { width: 100%; padding: 44px 24px 40px; }
    .exit-card__text { max-width: none; }
}

/* ---------- 6.12 Reflective note, 6.13 Play ---------- */
.note { display: flex; flex-direction: column; gap: var(--gap); max-width: 1100px; }
.play__intro, .play__caption { max-width: 760px; }
.section--play .title-group .rule, .section--play .titles-group .intro { margin-top: 24px; }
.section--play .title-group .intro { font-size: 16px; line-height: 28px; }
@media (max-width: 1023px) { .section--play .title-group .rule, .section--play .title-group .intro { margin-top: 20px; } }
.section--play .title-group .intro { max-width: 760px; }
@media (min-width: 1024px) and (max-width: 1439px) {
    .section--play .title-group .intro, .play__caption { max-width: 560px; }
}
.spoon-ender { display: flex; align-items: center; gap: 16px; color: var(--accent); }
.spoon-ender span { flex: 1; height: 1px; background: var(--line); }
.spoon-ender svg { width: 12px; height: 24px; }

/* ---------- Site navbar and footer ----------
   Ported from the homepage (root style.css + mobileCSS.css) so the case study
   matches the live site. The homepage sets html { font-size: 12px } at <=480px;
   this page keeps 16px, so those rem values are written through --r instead. */
.navbar, .footer {
    --offwhite: #F7F7F2;
    --Navy: #023047;
    --Red: #FB3640;
    --r: 16px;
    font-family: "Poppins", sans-serif;
}
@media (max-width: 480px) { .navbar, .footer { --r: 12px; } }

.font-sizing-1-25 { font-size: calc(1.25 * var(--r)); }
.font-sizing-1-5 { font-size: calc(1.5 * var(--r)); }
.font-sizing-2 { font-size: calc(2 * var(--r)); }
.color-red { color: var(--Red); }
.color-offwhite { color: var(--offwhite); }
.poppins-extralight { font-family: "Poppins", sans-serif; font-weight: 200; font-style: normal; }
.poppins-regular { font-family: "Poppins", sans-serif; font-weight: 400; font-style: normal; }
.poppins-semibold { font-family: "Poppins", sans-serif; font-weight: 600; font-style: normal; }
.poppins-medium-italic { font-family: "Poppins", sans-serif; font-weight: 500; font-style: italic; }
.poppins-semibold-italic { font-family: "Poppins", sans-serif; font-weight: 600; font-style: italic; }

/* Navbar (style.css) */
.navbar {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    /* 1600px max width (page content is 1440px); 20% shorter than the homepage nav */
    padding: 12px max(var(--pad), calc((100% - 1600px) / 2 + var(--pad)));
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 24px;
    background-color: #F5E1BC;
}
.navbar img, .footer img { display: inline; } /* homepage keeps images inline */
.navbar img { height: 52px; width: auto; }
.navmenu {
    list-style-type: none;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    font-size: 16px;
    font-weight: 500;
    padding: 0;
}
.navbar-logo { display: inline-flex; }
.navmenu .navmenu-close { display: none; }
.navmenu .icons { display: none; }
.navbar a:link, .navbar a:visited { color: var(--text); text-decoration: none; }
.navbar a:hover { color: #8F4A12; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.openMenu, .closeMenu {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: transparent;
    padding: 0;
    font: inherit;
    line-height: 1;
    border-radius: 4px;
}
.openMenu:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.closeMenu:focus-visible { outline: 2px solid var(--button); outline-offset: 2px; }
.openMenu { font-size: calc(2 * var(--r)); display: none; cursor: pointer; color: var(--text); }
.closeMenu { font-size: calc(2 * var(--r)); display: none; cursor: pointer; }
.closeMenu i { color: var(--offwhite); }

/* Navbar, hamburger (mobileCSS.css <=480px) */
@media (max-width: 480px) {
    .navmenu {
        position: fixed;
        flex-direction: column;
        height: 100vh;
        top: -150%;
        right: 0;
        left: 0;
        z-index: 10;
        justify-content: center;
        align-items: center;
        background-color: var(--text);
        gap: calc(4 * var(--r));
        font-size: calc(1.5 * var(--r));
        transition: top 1s ease 0s;
    }
    .navmenu li { font-size: 18px; }
    .navmenu .navmenu-close { display: block; }
    .closeMenu { display: block; position: absolute; top: 20px; right: 20px; }
    .closeMenu i { padding: calc(2 * var(--r)); font-size: calc(1.5 * var(--r)); color: var(--offwhite); }
    .navmenu .icons { display: inline-flex; }
    .navbar a:link, .navbar a:visited { color: var(--offwhite); text-decoration: none; }
    .navbar a:hover { color: var(--button); text-decoration: underline; text-decoration-color: var(--button); }
    .navbar { padding-block: 13px; }
    .navbar-logo img { height: 40px; }
    .openMenu { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; color: var(--text); }
    .openMenu i { font-size: 24px; }
    .icons a { display: inline-block; padding: calc(1.5 * var(--r)); }
    .icons img { width: calc(3 * var(--r)); height: auto; }
}
@media (max-width: 480px) and (prefers-reduced-motion: reduce) { .navmenu { transition: none; } }

/* Footer (style.css) */
.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: calc(4 * var(--r));
    gap: calc(3 * var(--r));
    justify-content: space-between;
    background-color: var(--Navy);
    font-size: var(--r);
    line-height: normal;
}
.footer p { font-size: var(--r); }
.footer p.font-sizing-1-25 { font-size: calc(1.25 * var(--r)); }
.footer p.font-sizing-1-5 { font-size: calc(1.5 * var(--r)); }
.footer-heading { font-size: calc(2.5 * var(--r)); }        /* homepage h3 */
.footer .footer-mail-line { font-size: calc(2.5 * var(--r)); font-weight: 200; }  /* homepage h3 */
.footer-top {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: var(--r);
    align-self: stretch;
}
#adjust { gap: calc(.5 * var(--r)); }
.footer-top a { text-decoration: none; }
.footer-top a:hover { text-decoration: underline; }
.footer-bottom {
    display: flex;
    flex-direction: row;
    align-items: center;
    align-self: stretch;
    justify-content: space-between;
    background-color: var(--Navy);
}
.footer-div { display: flex; flex-direction: column; justify-content: center; gap: calc(2 * var(--r)); }
.footer-mail { text-decoration: none; }
.footer-mail:hover { text-decoration: underline; }
.footer-socials { display: flex; flex-direction: row; justify-content: center; align-items: center; gap: calc(3 * var(--r)); }
.footer-socials img { width: calc(3 * var(--r)); height: auto; transition: transform 0.2s ease; }
.footer-socials img:hover { transform: translate(0, calc(-1 * var(--r))); }

/* Footer (mobileCSS.css <=480px) */
@media (max-width: 480px) {
    .footer { padding: calc(4 * var(--r)) calc(2 * var(--r)); gap: calc(2.25 * var(--r)); }
    .footer-heading { font-size: calc(2 * var(--r)); }          /* homepage mobile h3 */
    .footer-bottom { flex-direction: column; align-items: center; gap: calc(2.25 * var(--r)); }
    .footer-div { align-self: stretch; }
    .footer .footer-mail-line, .footer-div a { font-size: calc(1.5 * var(--r)); }
    .footer-socials { justify-content: flex-start; }
}

/* ---------- Reduced motion (7, 10) ---------- */
@media (prefers-reduced-motion: reduce) {
    .anim *, .anim { animation: none !important; }
    .footer-socials img { transition: none; }
}

/* Image pairs whose sources differ in shape are cropped to the spec ratio (8) */
.pair--even img { aspect-ratio: 580 / 362; object-fit: cover; }

/* Full-size image link (setup notes board) */
.zoom-link { display: block; cursor: zoom-in; }
.zoom-link img { display: block; width: 100%; height: auto; border-radius: 4px; }
.zoom-link:focus-visible { outline: 3px solid var(--text); outline-offset: 4px; }
