/*
    MMI.CSS - the 2026 redesign. Loaded LAST in Site1.Master, so it wins over the old theme.

    The idea: the visitor is a detective opening a case file. Black and blood red as before, plus the things you'd find
    on a real investigation - police tape, case folders, polaroids on a corkboard joined with red string, redacted
    documents, CCTV footage, witness statements, interview transcripts, rubber stamps and a torch to search the wall.
    Pages that haven't been redesigned yet still use the old theme for their content; the header/footer come from here.

    Tested first on a Samsung Android phone (Samsung Internet + Chrome): the page declares itself dark (color-scheme)
    so Samsung's "dark mode for websites" doesn't recolour it, and everything works by tap as well as by mouse.

    Sections:  1 tokens + base   2 icons + buttons   3 header + menu   4 footer   5 investigation props (tape, stamps,
               folders, polaroids, CCTV, redaction, paper)   6 home page   7 video pop-up   8 the clue hunt
               9 game: case bar   10 game: case file   11 boards   12 motion
*/

/* ---------- 1. Tokens + base ---------- */
:root {
    color-scheme: dark;
    --ink: #0a0a0b;
    --coal: #141416;
    --coal-2: #1c1c1f;
    --line: rgba(255,255,255,.09);
    --text: #f2efe9;
    --muted: #a39e95;
    --red: #b3121b;
    --red-hi: #e3222c;
    --red-deep: #6e0a10;
    --paper: #f1ebdd;
    --paper-ink: #1d1a16;
    --manila: #d9c49a;
    --cork: #8a5a33;
    --tape: #f2c318;
    --gold: #c9a24a;
    --radius: 14px;
    --shadow: 0 18px 50px rgba(0,0,0,.55);
    --display: 'Type-writer', 'Courier Prime', Georgia, serif;
    --mono: 'Courier Prime', 'Courier New', monospace;
    --hand: 'Caveat', 'Segoe Print', cursive;
    --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --wrap: 1180px;
    --gutter: clamp(16px, 4.4vw, 32px);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
/* the tape, tilted stamps and swipe rows may poke past the sides - never let a phone scroll sideways */
#page, .mmi-footer { overflow-x: hidden; overflow-x: clip; }
body.mmi {
    margin: 0; background: var(--ink); color: var(--text);
    font-family: var(--sans); font-size: 17px; line-height: 1.6;
    -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
    /* no overflow on body: on iPhone it turns the body into its own scroll box, which breaks sticky bars and
       Safari's address-bar hiding. Sideways overflow is clipped by html and #page instead. */
}
body.mmi img { max-width: 100%; height: auto; }
body.mmi a { color: inherit; }
.mmi .wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); box-sizing: border-box; }
.mmi .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mmi .eyebrow { font-family: var(--mono); font-weight: 700; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--red-hi); margin: 0 0 12px; }
.mmi .display { font-family: var(--display); font-weight: normal; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 18px; }
.mmi h2.display { font-size: clamp(28px, 4.2vw, 46px); }
.mmi .lede { color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); max-width: 640px; }
.mmi .hand { font-family: var(--hand); font-weight: 700; }
.mmi *:focus-visible { outline: 2px solid var(--red-hi); outline-offset: 3px; }

/* ---------- 2. Icons + buttons ---------- */
.mmi .i { width: 1.1em; height: 1.1em; display: inline-block; vertical-align: -0.18em; flex: none; }
.mmi .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
    font: 600 15px/1 var(--sans); letter-spacing: .02em; text-decoration: none; cursor: pointer;
    transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
    white-space: nowrap; box-sizing: border-box; -webkit-appearance: none; appearance: none;
}
.mmi .btn:active { transform: scale(.97); }
.mmi .btn-red { background: var(--red); color: #fff; box-shadow: 0 8px 24px rgba(179,18,27,.35); }
.mmi .btn-ghost { background: rgba(255,255,255,.04); color: var(--text); border-color: rgba(255,255,255,.24); }
.mmi .btn-dark { background: var(--paper-ink); color: var(--paper); }
.mmi .btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.mmi .btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (hover: hover) {
    .mmi .btn:hover { transform: translateY(-1px); }
    .mmi .btn-red:hover { background: var(--red-hi); }
    .mmi .btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
}
/* round icon buttons: the icon is a grid item, so it's always dead centre */
.mmi .icon-btn, .mmi .social a {
    width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; padding: 0; box-sizing: border-box;
    color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.18); background: transparent; cursor: pointer; font-size: 18px; line-height: 0;
}
.mmi .icon-btn .i, .mmi .social a .i { vertical-align: 0; }

/* ---------- 3. Header + menu ---------- */
.mmi-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(10,10,11,.86); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--line);
}
/* The header is tall with a big logo at the top of the page and shrinks once you scroll (body.scrolled, js/mmi.js).
   --hh is its height, used by the phone menu and the case bar that sit under it. */
body.mmi { --hh: 96px; --hh0: 96px; padding-top: var(--hh0); }   /* --hh0: the space kept for the header, so nothing jumps when it shrinks */
body.mmi.scrolled { --hh: 70px; }
.mmi-header { position: fixed !important; left: 0; right: 0; top: 0; }
.mmi [id] { scroll-margin-top: calc(var(--hh) + 70px); }
.mmi-header .bar { display: flex; align-items: center; gap: 24px; height: var(--hh); transition: height .3s ease; }
.mmi-header .logo { display: block; flex: 0 0 auto; }
.mmi-header .logo img { display: block; height: calc(var(--hh) - 14px); width: auto; transition: height .3s ease; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.mmi-header .menu { display: flex; gap: 2px; margin: 0 auto 0 8px; padding: 0; list-style: none; }
.mmi-header .menu a { display: block; padding: 13px 12px; border-radius: 8px; text-decoration: none; font: 600 14px/1 var(--sans); color: #d9d4cb; transition: color .2s, background .2s; }
.mmi-header .menu a:hover, .mmi-header .menu a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.06); }
.mmi-header .actions { display: flex; align-items: center; gap: 10px; }
.mmi-header .burger span, .mmi-header .burger span::before, .mmi-header .burger span::after {
    display: block; width: 18px; height: 2px; background: #fff; position: relative; transition: transform .25s, background .25s; content: "";
}
.mmi-header .burger span::before { position: absolute; top: -6px; }
.mmi-header .burger span::after { position: absolute; top: 6px; }
.mmi-header .burger { display: none; }
.mmi-drawer-open .mmi-header .burger span { background: transparent; }
.mmi-drawer-open .mmi-header .burger span::before { transform: translateY(6px) rotate(45deg); }
.mmi-drawer-open .mmi-header .burger span::after { transform: translateY(-6px) rotate(-45deg); }

.mmi-drawer {
    position: fixed; inset: var(--hh) 0 0 0; z-index: 49; background: rgba(10,10,11,.98);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s;
    overflow-y: auto; padding: 28px var(--gutter) 48px;
}
.mmi-drawer::before { /* a strip of police tape across the top of the phone menu */
    content: "POLICE LINE \2022  DO NOT CROSS \2022  POLICE LINE \2022  DO NOT CROSS \2022  POLICE LINE \2022  DO NOT CROSS";
    display: block; white-space: nowrap; overflow: hidden; margin: -28px calc(-1 * var(--gutter)) 24px; padding: 7px 0;
    background: var(--tape); color: #111; font: 700 12px/1 var(--mono); letter-spacing: .14em;
}
.mmi-drawer-open .mmi-drawer { opacity: 1; transform: none; visibility: visible; }
.mmi-drawer-open { overflow: hidden; }
.mmi-drawer ul { list-style: none; margin: 0 0 28px; padding: 0; }
.mmi-drawer li a {
    display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line);
    font: 23px/1.2 var(--display); text-decoration: none; color: #fff;
}
.mmi-drawer li a .i { color: var(--red-hi); }
.mmi-drawer .btn { width: 100%; margin-bottom: 12px; }
.mmi-drawer .social { display: flex; gap: 12px; margin-top: 18px; }

@media (max-width: 1080px) {
    .mmi-header .menu, .mmi-header .actions .hide-sm { display: none; }
    .mmi-header .burger { display: inline-grid; }
    .mmi-header .actions { margin-left: auto; }
}
@media (max-width: 520px) {
    body.mmi { --hh: 78px; --hh0: 78px; }
    body.mmi.scrolled { --hh: 64px; }
    .mmi-header .bar { gap: 10px; }
    .mmi-header .logo img { height: calc(var(--hh) - 10px); }
    .mmi-header .actions .btn { padding: 0 14px; min-height: 40px; font-size: 13px; }
}

/* ---------- 4. Footer ---------- */
.mmi-footer { position: relative; padding: 0 0 32px; background: #070708; overflow: hidden; }
.mmi-footer .tape { margin-bottom: 64px; }
.mmi-footer::before {
    content: ""; position: absolute; right: -120px; bottom: -160px; width: 520px; height: 520px; opacity: .07; pointer-events: none;
    background: url(../wp-content/themes/MMI/images/Fingerprint-50.png) center / contain no-repeat;
}
.mmi-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.mmi-footer h3 { font: 700 12px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
.mmi-footer ul { list-style: none; margin: 0; padding: 0; }
.mmi-footer li { margin: 0 0 10px; }
.mmi-footer a { text-decoration: none; color: #e6e1d8; }
.mmi-footer a:hover { color: var(--red-hi); }
.mmi-footer .brand img { width: min(300px, 100%); height: auto; margin-bottom: 16px; }
.mmi-footer .brand p { color: var(--muted); font-size: 15px; max-width: 320px; }
.mmi-footer .contact p { margin: 0 0 10px; font-size: 15px; display: flex; gap: 10px; align-items: flex-start; overflow-wrap: anywhere; }
.mmi-footer .contact .i { color: var(--red-hi); margin-top: 3px; }
.mmi-footer .pay img { height: 26px; width: auto; display: block; margin: 16px 0 10px; }
.mmi-footer .pay p { color: var(--muted); font-size: 14px; }
.mmi-footer .base { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.mmi .social { display: flex; gap: 10px; }
@media (hover: hover) { .mmi .social a:hover, .mmi .icon-btn:hover { border-color: var(--red-hi); color: var(--red-hi); } }
@media (max-width: 900px) { .mmi-footer .cols { grid-template-columns: 1fr 1fr; } .mmi-footer .brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .mmi-footer .cols { grid-template-columns: 1fr; gap: 28px; } .mmi-footer .base { flex-direction: column-reverse; align-items: flex-start; } }

/* ---------- 5. Investigation props ---------- */

/* Police tape: <div class="tape"><div class="run">...</div></div> - the text scrolls along the tape */
.tape { position: relative; z-index: 3; background: var(--tape); color: #111; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.5);
    background-image: linear-gradient(180deg, rgba(255,255,255,.25), transparent 40%, rgba(0,0,0,.12)); }
.tape .run { display: flex; width: max-content; animation: tapeRun 38s linear infinite; }
.tape .run span { padding: 10px 22px; font: 700 15px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.tape .run span::after { content: "\25C6"; margin-left: 44px; font-size: 10px; vertical-align: 2px; }
.tape.red { background-color: var(--red); color: #fff; }
.tape.red .run span { font: 18px/1.2 var(--display); letter-spacing: 0; text-transform: none; padding: 12px 26px; }
.tape.red .run span::after { content: "\2605\2605\2605\2605\2605"; font-size: 12px; letter-spacing: 2px; margin-left: 14px; }
.tape.reverse .run { animation-direction: reverse; animation-duration: 52s; }
.tapes { position: relative; height: 120px; margin: -70px 0 -50px; z-index: 4; pointer-events: none; }
.tapes .tape { position: absolute; left: -5%; right: -5%; pointer-events: auto; }
.tapes .tape:nth-child(1) { top: 18px; transform: rotate(-2.4deg); }
.tapes .tape:nth-child(2) { top: 56px; transform: rotate(1.6deg); }
@keyframes tapeRun { to { transform: translateX(-50%); } }

/* Rubber stamps; .slam ones thud down when they come into view */
.stamp {
    display: inline-block; font: 700 13px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--red);
    border: 2.5px solid currentColor; border-radius: 4px; padding: 6px 9px; transform: rotate(-8deg);
}
.stamp.green { color: #2f6b3a; } .stamp.grey { color: #6b655c; } .stamp.white { color: #fff; }
.stamp.slam { opacity: 0; transform: rotate(-8deg) scale(2.2); transition: none; }
.stamp.slam.in { animation: slam .45s cubic-bezier(.3,1.6,.5,1) forwards; }
@keyframes slam { 0% { opacity: 0; transform: rotate(-8deg) scale(2.2); } 60% { opacity: 1; transform: rotate(-8deg) scale(.94); } 100% { opacity: .92; transform: rotate(-8deg) scale(1); } }

/* Paper: aged documents */
.paper-sheet { background: var(--paper) url(../img/ui/parchment.jpg) center / 640px; color: var(--paper-ink); box-shadow: 0 14px 34px rgba(0,0,0,.45); }

/* Redacted text: black bars until tapped ("declassified") */
.redacted { display: inline-block; line-height: 1.5; margin: 3px 0; background: #111; color: transparent; border-radius: 3px; padding: 4px .3em; cursor: pointer; transition: background .5s ease, color .5s ease; box-decoration-break: clone; -webkit-box-decoration-break: clone; user-select: none; }
.redacted.open { background: rgba(179,18,27,.14); color: inherit; cursor: default; user-select: text; }
.declassify-hint { font: 700 12px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--red); display: inline-flex; gap: 8px; align-items: center; }

/* Polaroids pinned to cork */
.corkboard {
    position: relative; border-radius: 16px; padding: clamp(28px, 5vw, 56px) clamp(18px, 4vw, 48px) clamp(34px, 5vw, 60px);
    background-color: var(--cork);
    background-image: radial-gradient(rgba(0,0,0,.18) 1px, transparent 1.5px), radial-gradient(rgba(255,255,255,.08) 1px, transparent 1.5px),
                      linear-gradient(135deg, rgba(255,255,255,.06), rgba(0,0,0,.25));
    background-size: 7px 7px, 11px 11px, 100% 100%; background-position: 0 0, 3px 5px, 0 0;
    box-shadow: inset 0 0 0 12px #3b2414, inset 0 0 60px rgba(0,0,0,.55), var(--shadow);
}
.corkboard .string { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible; }
.corkboard .string path { fill: none; stroke: #c4161f; stroke-width: 2.4; filter: drop-shadow(0 2px 1px rgba(0,0,0,.5)); stroke-dasharray: 2000; stroke-dashoffset: 2000; transition: stroke-dashoffset 2.2s ease; }
.corkboard.in .string path { stroke-dashoffset: 0; }
.polaroids { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(22px, 4vw, 48px); position: relative; z-index: 2; }
.polaroid { background: #fbfaf6; padding: 12px 12px 16px; box-shadow: 0 12px 26px rgba(0,0,0,.5); position: relative; color: var(--paper-ink); }
.polaroid:nth-child(1) { transform: rotate(-3deg); } .polaroid:nth-child(2) { transform: rotate(2deg) translateY(18px); } .polaroid:nth-child(3) { transform: rotate(-1.5deg); }
.polaroid .pinhead, .board-pin {
    position: absolute; top: -9px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; z-index: 3;
    background: radial-gradient(circle at 35% 35%, #ff6a6f, var(--red) 55%, #4a0207); box-shadow: 0 3px 4px rgba(0,0,0,.55);
}
.polaroid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; filter: grayscale(1) contrast(1.15) sepia(.12); }
.polaroid h3 { font: 700 26px/1.1 var(--hand); margin: 12px 2px 6px; color: #23201c; }
.polaroid h3 b { color: var(--red); }
.polaroid p { margin: 0 2px; font: 15px/1.45 var(--mono); color: #3d372f; }
@media (max-width: 760px) {
    .polaroids { grid-template-columns: 1fr; gap: 42px; max-width: 380px; margin: 0 auto; }
    .polaroid:nth-child(2) { transform: rotate(2deg); }
}

/* Polaroids that turn over (data-flip): the back has a handwritten tip */
.polaroid[data-flip] { cursor: pointer; perspective: 1200px; padding: 0; background: none; box-shadow: none; -webkit-tap-highlight-color: transparent; }
.polaroid .card3d { position: relative; display: grid; transition: transform .6s cubic-bezier(.3,.7,.3,1); transform-style: preserve-3d; }
.polaroid.flipped .card3d { transform: rotateY(180deg); }
.polaroid .face { grid-area: 1 / 1; background: #fbfaf6; padding: 12px 12px 16px; box-shadow: 0 12px 26px rgba(0,0,0,.5); -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.polaroid .back { transform: rotateY(180deg); display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 26px 22px;
    background: #fbf8f1 repeating-linear-gradient(180deg, transparent 0 31px, rgba(30,60,120,.14) 31px 32px); }
.polaroid .back .note { font: 700 clamp(24px, 2.6vw, 30px)/1.2 var(--hand); color: #1b3a7a; }
.polaroid .back .note b { color: var(--red); }
.polaroid .back small { font: 700 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #8a8174; }
.polaroid .turn { display: inline-flex; align-items: center; gap: 6px; margin: 10px 2px 0; font: 700 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--red); }

/* The detective test */
.quiz { position: relative; max-width: 760px; margin: 0 auto; background: #fbf8f1; color: var(--paper-ink); padding: clamp(22px, 4vw, 40px); box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.quiz::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px; background: repeating-linear-gradient(-45deg, var(--tape) 0 14px, #111 14px 28px); }
.quiz .quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 700 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #6b6156; margin: 6px 0 12px; }
.quiz .quiz-progress { --done: 0%; height: 6px; background: rgba(0,0,0,.1); border-radius: 3px; overflow: hidden; margin-bottom: 26px; }
.quiz .quiz-progress::after { content: ""; display: block; height: 100%; width: var(--done); background: var(--red); transition: width .4s ease; }
.quiz .q h3 { font: clamp(21px, 2.6vw, 27px)/1.3 var(--display); margin: 0 0 8px; }
.quiz .q .evidence { font: 15px/1.6 var(--mono); color: #4a4238; margin: 0 0 20px; padding: 12px 14px; background: rgba(0,0,0,.04); border-left: 3px solid var(--red); }
.quiz .opts { display: grid; gap: 10px; }
.quiz .opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 12px 16px; text-align: left; cursor: pointer; border-radius: 10px;
    border: 2px solid rgba(0,0,0,.14); background: #fff; color: var(--paper-ink); font: 600 16px/1.35 var(--sans); transition: border-color .2s, background .2s, transform .15s; -webkit-appearance: none; appearance: none; }
.quiz .opt::before { content: attr(data-letter); flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-ink); color: #fff; font: 700 13px/1 var(--mono); }
@media (hover: hover) { .quiz .opt:not(:disabled):hover { border-color: var(--red); transform: translateX(3px); } }
.quiz .opt:active { transform: scale(.98); }
.quiz .opt:disabled { cursor: default; opacity: .55; }
.quiz .opt.is-right { border-color: #2f7d3e; background: #e9f5ea; opacity: 1; }
.quiz .opt.is-right::before { content: "\2713"; background: #2f7d3e; }
.quiz .opt.is-wrong { border-color: var(--red); background: #fbe9e9; opacity: 1; animation: shake .4s; }
.quiz .opt.is-wrong::before { content: "\2717"; background: var(--red); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.quiz .why { margin: 16px 0 0; padding: 14px 16px; border-radius: 10px; font: 15px/1.55 var(--mono); }
.quiz .why.good { background: #e9f5ea; } .quiz .why.bad { background: #fbe9e9; }
.quiz .why b { display: block; font: 700 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 6px; }
.quiz .why.good b { color: #2f7d3e; } .quiz .why.bad b { color: var(--red); }
.quiz .why .btn { margin-top: 14px; }
.quiz-result { text-align: center; padding: 6px 0 4px; }
.quiz-result .stamp { font-size: clamp(18px, 3vw, 26px); padding: 10px 16px; margin-bottom: 12px; }
.quiz-result .score { display: block; font: clamp(54px, 9vw, 80px)/1 var(--display); color: var(--red); }
.quiz-result .rank { font: clamp(24px, 3.4vw, 32px)/1.2 var(--display); margin: 8px 0; }
.quiz-result .verdict { font: 16px/1.6 var(--mono); color: #4a4238; max-width: 480px; margin: 0 auto 22px; }
.quiz-result .btn-row { justify-content: center; }
.quiz-result .again { background: none; border: 0; color: #6b6156; font: 600 14px var(--sans); cursor: pointer; margin-top: 14px; display: inline-flex; gap: 6px; align-items: center; min-height: 44px; }

/* Manila case folders (the cases on the home page) */
.casefile { position: relative; background: var(--manila); color: var(--paper-ink); border-radius: 4px 14px 14px 14px; padding: 26px 22px 24px; box-shadow: 0 18px 40px rgba(0,0,0,.55);
    background-image: linear-gradient(180deg, rgba(255,255,255,.22), rgba(0,0,0,.06)); margin-top: 22px; }
.casefile::before { content: attr(data-tab); position: absolute; left: 0; top: -24px; height: 26px; padding: 0 18px; border-radius: 8px 12px 0 0; background: var(--manila);
    font: 700 12px/26px var(--mono); letter-spacing: .14em; color: #5f4f33; }
.casefile .label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-bottom: 2px solid rgba(0,0,0,.18); padding-bottom: 10px; margin-bottom: 18px; }
.casefile .label span { font: 700 12px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: #6b5a3c; }
.casefile h3 { font: clamp(26px, 3vw, 34px)/1.1 var(--display); margin: 0 0 6px; }
.casefile p { margin: 0 0 16px; font: 15px/1.5 var(--mono); color: #4a3f2c; }
.casefile .clip { position: absolute; top: -14px; right: 28px; width: 22px; height: 56px; border: 3px solid #9aa0a6; border-radius: 12px; z-index: 3; border-bottom-color: transparent; }
.casefile .stamp { float: right; margin: 2px 0 0 10px; font-size: 14px; }

/* CCTV footage: video stills with scanlines, a REC light and a timestamp */
.cctv { position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer; background: #000; overflow: hidden; aspect-ratio: 16 / 9; color: #fff; text-align: left; font: inherit; }
.mmi .cctv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.2) brightness(.85); transition: transform .6s ease; }
.cctv::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: repeating-linear-gradient(0deg, rgba(0,0,0,.28) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.7)); }
.cctv .rec, .cctv .ts, .cctv .cam { position: absolute; z-index: 2; font: 700 13px/1 var(--mono); letter-spacing: .1em; text-shadow: 0 1px 2px #000; }
.cctv .rec { top: 12px; left: 14px; display: flex; gap: 7px; align-items: center; }
.cctv .rec::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--red-hi); animation: blink 1.2s steps(1) infinite; }
.cctv .cam { top: 12px; right: 14px; }
.cctv .ts { bottom: 12px; left: 14px; }
.cctv .playbtn { position: absolute; z-index: 2; left: 50%; top: 50%; width: 66px; height: 66px; margin: -33px 0 0 -33px; border-radius: 50%;
    background: rgba(179,18,27,.92); display: grid; place-items: center; font-size: 24px; box-shadow: 0 0 0 0 rgba(227,34,44,.6); animation: pulse 2.4s infinite; }
.cctv .playbtn .i { transform: translateX(2px); vertical-align: 0; }   /* a play triangle looks centred when nudged right */
@media (hover: hover) { .cctv:hover img { transform: scale(1.04); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(227,34,44,.55); } 70% { box-shadow: 0 0 0 18px rgba(227,34,44,0); } 100% { box-shadow: 0 0 0 0 rgba(227,34,44,0); } }

/* Branding: the logo lockup and the bloody fingerprint (img/brand) */
.brand-lockup { display: block; width: min(500px, 100%); height: auto; margin: 0 0 18px -2%; filter: drop-shadow(0 6px 20px rgba(0,0,0,.8)); }
.brand-divider { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 8px var(--gutter); color: var(--muted); }
.brand-divider::before, .brand-divider::after { content: ""; flex: 1; max-width: 260px; height: 1px; background: linear-gradient(90deg, transparent, rgba(227,34,44,.6)); }
.brand-divider::after { background: linear-gradient(90deg, rgba(227,34,44,.6), transparent); }
.brand-divider img { width: 54px; height: auto; transform: rotate(-12deg); }
.brand-divider span { font: 700 12px/1.3 var(--mono); letter-spacing: .22em; text-transform: uppercase; text-align: center; }
.print-mark { position: absolute; pointer-events: none; opacity: .14; transform: rotate(-16deg); }

/* The opening (home page, once per visit): the bloody fingerprint is pressed onto the screen, then the logo appears */
.intro { position: fixed; inset: 0; z-index: 200; background: #050505; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; cursor: pointer; }
.intro.play { display: flex; }
.intro .press { width: min(46vw, 230px); height: auto; opacity: 0; transform: scale(1.6) rotate(-14deg); filter: blur(6px); animation: press .55s .25s cubic-bezier(.3,1.4,.5,1) forwards; }
.intro .lockup { width: min(84vw, 520px); height: auto; opacity: 0; animation: fadeUp .7s 1s ease forwards; margin-top: -8%; }
.intro .skip { position: absolute; bottom: 26px; font: 700 12px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: #777; }
.intro.out { animation: introOut .6s ease forwards; }
@keyframes press { 0% { opacity: 0; transform: scale(1.6) rotate(-14deg); filter: blur(6px); } 60% { opacity: 1; transform: scale(.95) rotate(-12deg); filter: blur(0); } 100% { opacity: 1; transform: scale(1) rotate(-12deg); filter: blur(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes introOut { to { opacity: 0; visibility: hidden; } }

/* ---------- 6. Home page ---------- */

/* HERO: a dark crime wall searched with a torch. .lit is the same picture at full brightness, shown only through
   the torch's circle (--tx/--ty, moved by js/mmi.js with the finger or mouse, drifting on its own until then). */
.home-hero { position: relative; min-height: min(90vh, 820px); display: flex; align-items: center; overflow: hidden; isolation: isolate; background: #030303; touch-action: pan-y; }
.home-hero .wall { position: absolute; inset: 0; z-index: -2; }
.home-hero .wall .layer { position: absolute; inset: 0; background: url(../wp-content/uploads/2022/09/MMI-Clues-Board-Banner-no-Text-New.jpg) left center / cover no-repeat; }
.home-hero .wall .dark { filter: brightness(.22) grayscale(1) blur(1px); }
.home-hero .wall .lit {
    --tx: 30%; --ty: 45%; --tr: 190px;
    -webkit-mask-image: radial-gradient(circle var(--tr) at var(--tx) var(--ty), #000 0%, rgba(0,0,0,.85) 45%, transparent 100%);
            mask-image: radial-gradient(circle var(--tr) at var(--tx) var(--ty), #000 0%, rgba(0,0,0,.85) 45%, transparent 100%);
    filter: contrast(1.15) brightness(1.05);
}
.home-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(90deg, transparent 0%, transparent 38%, rgba(3,3,3,.85) 58%, rgba(3,3,3,.97) 75%), linear-gradient(0deg, var(--ink) 0%, transparent 25%); }
.home-hero .wrap { width: 100%; display: flex; justify-content: flex-end; pointer-events: none; }   /* let taps through to the wall (clue #1) */
.home-hero .copy > * { pointer-events: auto; }
.home-hero .copy { max-width: 600px; padding: 90px 0 120px; }
.home-hero h1 { font-family: var(--display); font-weight: normal; font-size: clamp(34px, 4.4vw, 54px); line-height: 1.1; margin: 0 0 20px; letter-spacing: -.015em; }
.home-hero h1 .blood { color: var(--red-hi); position: relative; white-space: nowrap; }
.home-hero h1 .blood::after { /* a drip running off the word */
    content: ""; position: absolute; left: 62%; top: 88%; width: 5px; height: 0; background: var(--red-hi); border-radius: 0 0 4px 4px; animation: drip 3.5s 1.2s ease-in forwards; }
@keyframes drip { 0% { height: 0; } 70% { height: 16px; } 100% { height: 13px; } }
.home-hero .lede { color: #d6d1c8; margin: 0 0 30px; }
.typed { font: 700 13px/1.4 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--red-hi); margin: 0 0 16px; min-height: 1.4em; }
.typed::after { content: "\2588"; margin-left: 2px; animation: blink 1s steps(1) infinite; color: var(--red-hi); }
.home-hero .proof { display: flex; align-items: center; gap: 14px; margin-top: 30px; color: var(--muted); font-size: 14px; }
.home-hero .proof .stars { color: var(--gold); display: inline-flex; gap: 2px; }
.home-hero .proof img { height: 54px; width: auto; }
.torch-hint { pointer-events: none; position: absolute; left: var(--gutter); bottom: 96px; z-index: 2; display: flex; align-items: center; gap: 8px; font: 700 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.6); transition: opacity .6s; }
.torch-hint .i { color: var(--tape); }
.home-hero.touched .torch-hint { opacity: 0; }
@media (max-width: 860px) {
    .home-hero { min-height: 0; flex-direction: column; align-items: stretch; }
    .home-hero .wall { bottom: auto; height: 340px; }
    .home-hero .wall .layer { background-position: 18% center; }
    .home-hero::before { background: linear-gradient(180deg, transparent 0, transparent 200px, rgba(3,3,3,.9) 300px, var(--ink) 340px); }
    .home-hero .copy { padding: 300px 0 64px; }
    .torch-hint { top: 18px; bottom: auto; }
    .tapes { height: 96px; margin: -46px 0 -30px; }
    .tapes .tape:nth-child(2) { top: 50px; }
}
@media (max-width: 520px) { .home-hero .btn-row .btn { flex: 1 1 100%; } }
/* small phones: a shorter wall so the button isn't so far down */
@media (max-width: 360px) {
    .home-hero .wall { height: 250px; }
    .home-hero::before { background: linear-gradient(180deg, transparent 0, transparent 140px, rgba(3,3,3,.9) 215px, var(--ink) 250px); }
    .home-hero .copy { padding-top: 205px; }
    .brand-lockup { width: 94%; margin-bottom: 10px; }
}
/* phones turned sideways (wide but short): no tall hero - logo, headline and buttons in one screen-and-a-bit */
@media (max-height: 500px) and (orientation: landscape) {
    .home-hero { min-height: 0; }
    .home-hero .copy { padding: 24px 0 64px; max-width: 520px; }
    .brand-lockup { width: 260px; margin-bottom: 8px; }
    .home-hero h1 { font-size: 30px; }
    .home-hero .lede { font-size: 15px; margin-bottom: 18px; }
    .typed { margin-bottom: 8px; }
    .home-hero .proof { display: none; }
    .torch-hint { bottom: 70px; }
}

.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section.paper { background: var(--paper) url(../img/ui/parchment.jpg) center / 640px; color: var(--paper-ink); }
.section.paper .lede { color: #5a5248; }
.section .head { margin-bottom: 40px; }
.section .head.center { text-align: center; }
.section .head.center .lede { margin-left: auto; margin-right: auto; }

/* "The case file" - a typed police document with redactions */
.dossier-doc { position: relative; max-width: 900px; margin: 0 auto; padding: clamp(26px, 5vw, 56px); background: #fbf8f1; color: var(--paper-ink); box-shadow: 0 2px 0 #e7e1d3, 0 4px 0 #f6f2e8, 0 20px 50px rgba(0,0,0,.25); }
.dossier-doc .doc-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; border-bottom: 2px solid var(--paper-ink); padding-bottom: 12px; margin-bottom: 24px; font: 700 13px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.dossier-doc h2 { font: clamp(26px, 3.6vw, 40px)/1.15 var(--display); margin: 0 0 18px; }
.dossier-doc p { font: clamp(16px, 1.7vw, 18px)/1.7 var(--mono); margin: 0 0 14px; }
.dossier-doc .stamp { position: absolute; top: clamp(70px, 9vw, 90px); right: clamp(14px, 4vw, 40px); font-size: clamp(16px, 2.6vw, 24px); padding: 8px 12px; }
.exhibits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 30px; }
.exhibit { position: relative; background: var(--manila); border-radius: 6px 6px 6px 20px; padding: 26px 14px 16px; text-align: center; box-shadow: 0 8px 18px rgba(0,0,0,.18); }
.exhibit::before { content: ""; position: absolute; top: 10px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #fbf8f1; box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
.exhibit small { display: block; font: 700 12px/1 var(--mono); letter-spacing: .18em; color: #7a6a4a; margin: 6px 0 8px; }
.exhibit b { display: block; font: 32px/1 var(--display); color: var(--red); margin-bottom: 6px; }
.exhibit span { font: 14px/1.35 var(--mono); color: #4a3f2c; }
@media (max-width: 820px) { .exhibits { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
    .dossier-doc .stamp { top: auto; bottom: 18px; right: 14px; font-size: 14px; }
    .exhibit { padding: 24px 10px 14px; }
    .exhibit b { font-size: 26px; }
    .exhibit span { font-size: 12.5px; }
}

.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 28px; }
.cases .cctv { border: 6px solid #fbfaf6; box-shadow: 0 10px 22px rgba(0,0,0,.35); transform: rotate(-1deg); margin-bottom: 18px; aspect-ratio: 584 / 231; }
/* the case pictures have their own white play circle at 50% / 72.7% (16.4% of the width) - ours covers it exactly */
.cases .cctv .playbtn, .dossier-cover .cctv .playbtn { top: 72.7%; width: 19%; height: auto; aspect-ratio: 1; margin: 0; transform: translate(-50%, -50%); font-size: clamp(16px, 2.2vw, 24px); }
.cases .cctv .ts { display: none; }
.cases .casefile:nth-child(2) .cctv { transform: rotate(1.2deg); }
@media (max-width: 820px) { .cases { grid-template-columns: 1fr; } }

.tapes-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 36px; }
.vhs { display: grid; grid-template-columns: 46% 1fr; align-items: center; background: var(--coal); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.vhs .body { padding: 18px 20px; }
.vhs .body span { font: 700 12px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--red-hi); }
.vhs h3 { font: 24px/1.15 var(--display); margin: 8px 0 0; }
.vhs .cctv .playbtn { width: 50px; height: 50px; margin: -25px 0 0 -25px; font-size: 18px; }
@media (max-width: 820px) { .tapes-row { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .vhs { grid-template-columns: 1fr; } }

/* award + 16+ warning */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel { border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); position: relative; overflow: hidden; }
.panel.award { background: var(--coal); border: 1px solid var(--line); display: flex; gap: 24px; align-items: center; }
.panel.award img { width: 120px; flex: 0 0 auto; }
.panel h3 { font: 26px/1.2 var(--display); margin: 0 0 10px; }
.panel.award p { margin: 0; color: var(--muted); }
.panel.warn { background: #160304; border: 2px solid var(--tape); padding-top: 54px; }
.panel.warn::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 22px; background: repeating-linear-gradient(-45deg, var(--tape) 0 16px, #111 16px 32px); }
.panel.warn::after { content: ""; position: absolute; right: -50px; bottom: -60px; width: 240px; height: 240px; background: url(../img/ui/splat.png) center / contain no-repeat; opacity: .22; }
.panel.warn .badge { display: inline-block; font: 700 13px/1 var(--mono); letter-spacing: .15em; background: var(--tape); color: #111; padding: 7px 10px; border-radius: 3px; margin-bottom: 14px; }
.panel.warn p { color: #f0d9d9; position: relative; z-index: 1; }
.panel.warn .btn { position: relative; z-index: 1; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .panel.award { flex-direction: column; text-align: center; } }

/* witness statements - swipe sideways on phones */
.quotes { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(285px, 84%); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 6px 26px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.quotes::-webkit-scrollbar { display: none; }
.statement { scroll-snap-align: center; background: #fbf8f1; color: var(--paper-ink); padding: 18px 20px 20px; position: relative; box-shadow: 0 12px 28px rgba(0,0,0,.45); margin: 0;
    background-image: repeating-linear-gradient(180deg, transparent 0 27px, rgba(30,60,120,.12) 27px 28px); background-position: 0 70px; }
.statement:nth-child(odd) { transform: rotate(-.7deg); } .statement:nth-child(even) { transform: rotate(.6deg); }
.statement .form { display: flex; justify-content: space-between; font: 700 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; border-bottom: 2px solid var(--paper-ink); padding-bottom: 8px; margin-bottom: 14px; }
.statement .form b { color: var(--red); }
.statement p { font: 15px/28px var(--mono); margin: 0 0 12px; }
.statement footer { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.statement .sig { font: 700 25px/1 var(--hand); color: #1b3a7a; transform: rotate(-3deg); }
.statement .who { font: 700 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #6b6156; text-align: right; }
.statement .stars { color: var(--red); display: flex; gap: 2px; font-size: 13px; margin-bottom: 8px; }
.swipe-hint { display: none; font: 700 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
@media (min-width: 1100px) { .quotes { grid-auto-columns: calc((100% - 40px) / 3); } }
@media (max-width: 760px) { .swipe-hint { display: flex; gap: 8px; align-items: center; } }

/* newsletter: a police notice */
.notice { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; background: #0d1a33; border: 3px solid #fff; border-radius: 10px; padding: clamp(24px, 4vw, 40px); box-shadow: inset 0 0 0 6px #0d1a33, inset 0 0 0 8px rgba(255,255,255,.4); }
.notice .kicker { display: inline-block; background: #fff; color: #0d1a33; font: 700 13px/1 var(--mono); letter-spacing: .2em; padding: 6px 10px; margin-bottom: 12px; }
.mmi .notice h2 { font: clamp(24px, 3vw, 32px)/1.2 var(--display); margin: 0 0 6px; color: #fff; }
.notice p { margin: 0; color: #c7d0e3; }
.notice .field { display: flex; gap: 10px; }
.notice input[type=email] { flex: 1; min-width: 0; min-height: 50px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: #08101f; color: #fff; padding: 0 20px; font: 16px var(--sans); }
.notice input[type=email]::placeholder { color: #8390aa; }
@media (max-width: 820px) { .notice { grid-template-columns: 1fr; } .notice .field { flex-direction: column; } }

/* FAQ: an interview transcript */
.transcript { max-width: 860px; margin: 0 auto; background: #fbf8f1; color: var(--paper-ink); padding: clamp(22px, 4vw, 44px); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.transcript .doc-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; border-bottom: 2px solid var(--paper-ink); padding-bottom: 10px; margin-bottom: 8px; font: 700 12px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.transcript details { border-bottom: 1px dashed rgba(0,0,0,.25); }
.transcript summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 34px; position: relative; font: 700 17px/1.45 var(--mono); }
.transcript summary::-webkit-details-marker { display: none; }
.transcript summary::before { content: "Q."; position: absolute; left: 0; color: var(--red); }
.transcript summary::after { content: "+"; position: absolute; right: 4px; top: 13px; font: 300 30px/1 var(--sans); color: var(--red); transition: transform .25s; }
.transcript details[open] summary::after { transform: rotate(45deg); }
.transcript details p { position: relative; margin: 0 0 18px; padding-left: 34px; font: 15.5px/1.6 var(--mono); color: #463f37; }
.transcript details p::before { content: "A."; position: absolute; left: 0; font-weight: 700; color: var(--paper-ink); }

/* ---------- 7. Video pop-up ---------- */
.vmodal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.94); display: none; align-items: center; justify-content: center; padding: 16px; }
.vmodal.open { display: flex; animation: fadeIn .2s ease; }
.vmodal .frame { position: relative; width: min(1100px, 100%); aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.vmodal iframe, .vmodal video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vmodal .close { position: absolute; top: 14px; right: 14px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.6); color: #fff; font-size: 20px; cursor: pointer; z-index: 2; display: grid; place-items: center; padding: 0; }
@keyframes fadeIn { from { opacity: 0; } }

/* ---------- 8. The clue hunt: fingerprints hidden on the home page ---------- */
.fp-clue { position: absolute; z-index: 5; width: 48px; height: 52px; display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fp-clue img { width: 40px; height: auto; opacity: .2; filter: grayscale(1) brightness(.6); transform: rotate(-18deg); transition: opacity .4s, filter .4s; }
.fp-clue.on-dark img { opacity: .16; filter: grayscale(1) brightness(1.6); }
.fp-clue.found img { opacity: 1; filter: drop-shadow(0 0 8px rgba(227,34,44,.7)); }
.fp-clue.found { animation: found .7s ease; pointer-events: none; }
@keyframes found { 0% { transform: scale(1); } 40% { transform: scale(1.8) rotate(-10deg); } 100% { transform: scale(1); } }
/* The dock along the bottom of the screen: clues found (left), "Take the case" (phones, home page), sound (right) */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); pointer-events: none; }
.dock > * { pointer-events: auto; }
.clue-chip { display: none; align-items: center; gap: 8px; padding: 0 14px; height: 44px; border-radius: 999px; background: #111; border: 1px solid var(--red); color: #fff; font: 700 13px/1 var(--mono); letter-spacing: .08em; box-shadow: var(--shadow); white-space: nowrap; }
.clue-chip.show { display: inline-flex; animation: fadeIn .3s; }
.clue-chip img { width: 18px; height: auto; }
.dock .sound-btn { margin-left: auto; background: rgba(17,17,17,.92); box-shadow: var(--shadow); position: relative; }
.dock .sound-btn.on { border-color: var(--red-hi); color: var(--red-hi); }
.dock .sound-btn.hint::after { /* a "tap for sound" label until it's first used */
    content: "Tap for sound"; position: absolute; right: 52px; top: 50%; transform: translateY(-50%); white-space: nowrap; padding: 7px 10px; border-radius: 6px;
    background: var(--paper); color: var(--paper-ink); font: 700 12px/1 var(--mono); letter-spacing: .06em; box-shadow: var(--shadow); animation: nudge 2.4s ease-in-out infinite; }
.dock .sound-btn.hint { animation: pulse 2.4s infinite; }
@keyframes nudge { 0%, 100% { transform: translate(0, -50%); } 50% { transform: translate(-4px, -50%); } }
.dock .dock-cta { display: none; flex: 1; min-height: 46px; box-shadow: 0 10px 28px rgba(0,0,0,.6); }
@media (max-width: 760px) {
    .dock { background: linear-gradient(0deg, rgba(10,10,11,.96) 40%, transparent); transform: translateY(0); }
    .dock.cta-on .dock-cta { display: inline-flex; animation: fadeUp .3s ease; }
    .dock.cta-on .clue-chip.show { padding: 0 12px; }
    .dock.cta-on .sound-btn { margin-left: 0; }
    .dock.cta-on .sound-btn.hint::after { display: none; }
    body.mmi:not(.mmi-drawer-open) .mmi-footer { padding-bottom: 90px; }
}
.mmi-drawer-open .dock { display: none; }
.toast { position: fixed; left: 50%; bottom: 84px; z-index: 70; transform: translateX(-50%); background: var(--paper); color: var(--paper-ink); font: 700 14px/1.3 var(--mono); padding: 12px 18px; border-radius: 6px; box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center; animation: toast 2.6s ease forwards; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 10px); } 12%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.solved { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.85); display: none; align-items: center; justify-content: center; padding: 18px; }
.solved.open { display: flex; animation: fadeIn .3s; }
.solved .card { position: relative; max-width: 440px; background: #fbf8f1; color: var(--paper-ink); padding: 34px 26px 26px; text-align: center; box-shadow: var(--shadow); }
.solved .card h2 { font: 30px/1.15 var(--display); margin: 16px 0 10px; }
.solved .card p { font: 15px/1.6 var(--mono); margin: 0 0 20px; }
.solved .card .stamp { font-size: 20px; padding: 8px 14px; }
.solved .card .btn { width: 100%; }
.solved .card .later { background: none; border: 0; color: #6b6156; font: 600 14px var(--sans); margin-top: 12px; cursor: pointer; }

/* ---------- 9. Game: the case bar (InvestigationNav.ascx) ---------- */
.mmi.members-page #main, .mmi.members-page .page-row.bg-black { background-image: none; }
/* old game pages: their theme padding left a gap above the case bar - the bar sits right under the header instead */
.mmi.members-page .page-row-pt { padding-top: 0; }
.mmi.members-page .casebar + .content_wrapper, .mmi.members-page .casebar ~ .members-locked { margin-top: 24px; }
.casebar { position: sticky; top: var(--hh); transition: top .3s ease; z-index: 40; background: rgba(10,10,11,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); margin: 0 calc(50% - 50vw) 8px; }
.casebar .wrap { display: flex; align-items: center; gap: 4px; height: 56px; overflow-x: auto; scrollbar-width: none; }
.casebar .wrap::-webkit-scrollbar { display: none; }
.casebar .case-name { font: 700 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--red-hi); white-space: nowrap; margin-right: 10px; }
.casebar a, .casebar button {
    display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 13px; border-radius: 999px; white-space: nowrap; flex: none;
    font: 600 14px/1 var(--sans); color: #d9d4cb; text-decoration: none; background: transparent; border: 1px solid transparent; cursor: pointer;
}
.mmi.members-page .casebar a { text-decoration: none; color: #d9d4cb; }
.casebar a:hover, .casebar button:hover, .casebar .on, .mmi.members-page .casebar a:hover, .mmi.members-page .casebar a.on { background: rgba(255,255,255,.07); color: #fff; }
.casebar .on { border-color: rgba(255,255,255,.14); }
.casebar .i { color: var(--red-hi); }
.casebar .i.down { color: inherit; width: .9em; height: .9em; }
.casebar .pop { position: fixed; z-index: 60; min-width: 240px; max-height: 60vh; overflow-y: auto; background: var(--coal-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; display: none; }
.casebar .pop.open { display: block; animation: fadeIn .15s; }
.casebar .pop a { display: flex; width: 100%; box-sizing: border-box; border-radius: 8px; height: auto; padding: 12px; }
.casebar .pop .sep { height: 1px; background: var(--line); margin: 6px 4px; }
@media (max-width: 1320px) { .casebar .case-name { display: none; } }
@media (max-width: 480px) {   /* narrow phones: icon tabs with a small label underneath */
    .casebar .wrap { height: 62px; gap: 0; padding-left: 6px; padding-right: 6px; }
    .casebar a, .casebar button { flex-direction: column; justify-content: center; gap: 4px; height: 56px; min-width: 56px; padding: 0 6px; border-radius: 10px; font-size: 12px; }
    .casebar .i { width: 20px; height: 20px; }
    .casebar .i.down { display: none; }
}
@media (max-width: 520px) {
    .casebar .wrap { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
}

/* ---------- 10. Game: the case file (My Investigation) ---------- */
.dossier { padding: 40px 0 10px; }
.dossier-head { display: grid; grid-template-columns: 300px 1fr; gap: 36px; align-items: center; }
.dossier-cover { position: relative; transform: rotate(-2.5deg); }
.dossier-cover .cctv { border: 6px solid #fbfaf6; box-shadow: var(--shadow); aspect-ratio: 584 / 231; cursor: default; }
.dossier-cover .cctv img { object-position: top; }
/* the stamp sits over the cover's own play circle (the covers are the trailer thumbnails, 72.7% down) */
.dossier-cover .stamp { position: absolute; left: 50%; top: 72.7%; z-index: 3; margin: -18px 0 0 -66px; font-size: 18px; padding: 8px 12px; background: rgba(251,248,241,.92); }
.dossier-head h1 { font: clamp(30px, 4.6vw, 54px)/1.08 var(--display); margin: 0 0 10px; }
.dossier-head .tag { color: var(--muted); margin: 0 0 20px; font-size: 18px; }
.progress-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ring { --p: 0; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: conic-gradient(var(--red-hi) calc(var(--p) * 1%), rgba(255,255,255,.08) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--ink); }
.ring b { position: relative; font: 22px/1 var(--display); }
.progress-wrap .stats { display: flex; gap: 22px; flex-wrap: wrap; }
.progress-wrap .stats div { font-size: 14px; color: var(--muted); }
.progress-wrap .stats strong { display: block; font: 24px/1.1 var(--display); color: var(--text); }

/* "Your next move" - a memo from the Inspector, paper-clipped to the file */
.memo { position: relative; margin: 40px 0 8px; background: #fbf8f1; color: var(--paper-ink); padding: 28px clamp(20px, 4vw, 36px) 26px; box-shadow: 0 18px 40px rgba(0,0,0,.5); transform: rotate(-.5deg);
    background-image: repeating-linear-gradient(180deg, transparent 0 29px, rgba(30,60,120,.1) 29px 30px); background-position: 0 98px; }
.memo { max-width: 860px; }
.memo .clip { position: absolute; top: -16px; right: 40px; width: 20px; height: 54px; border: 3px solid #9aa0a6; border-radius: 12px; border-bottom-color: transparent; }
.memo .memo-head { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; font: 700 12px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #6b6156; border-bottom: 2px solid var(--paper-ink); padding-bottom: 10px; margin-bottom: 14px; }
.memo .memo-head b { color: var(--paper-ink); }
.memo h2 { font: 26px/1.2 var(--display); margin: 0 0 6px; }
.memo p { font: 15.5px/30px var(--mono); margin: 0 0 14px; color: #3d372f; }
.memo .sig { font: 700 26px/1 var(--hand); color: #1b3a7a; margin-left: auto; }
.memo .row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.case-section { padding: 36px 0 8px; }
.case-section > header { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.case-section h2 { font: 28px/1.2 var(--display); margin: 0; }
.case-section header p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

.folders { display: grid; grid-template-columns: repeat(6, 1fr); gap: 26px 16px; }
.folder {
    position: relative; display: block; text-decoration: none; color: var(--paper-ink); padding: 24px 14px 16px; min-height: 112px;
    background: var(--manila) linear-gradient(180deg, rgba(255,255,255,.18), rgba(0,0,0,.06)); border-radius: 4px 10px 10px 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,.45); transition: transform .2s ease, box-shadow .2s ease; box-sizing: border-box;
}
.folder::before { content: ""; position: absolute; left: 0; top: -10px; width: 46%; height: 14px; background: var(--manila); border-radius: 6px 10px 0 0; }
.mmi .folder { color: var(--paper-ink); }
@media (hover: hover) { .folder:hover { transform: translateY(-4px) rotate(-.6deg); box-shadow: 0 16px 30px rgba(0,0,0,.5); } }
.folder:active { transform: scale(.97); }
.folder .n { font: 700 12px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: #6b5a3c; }
.folder strong { display: block; font: 30px/1.1 var(--display); margin: 6px 0 0; }
.folder .stamp { position: absolute; right: 6px; bottom: 10px; font-size: 10px; padding: 4px 6px; }
.folder.new { background-color: #ead8ad; outline: 2px solid var(--red-hi); outline-offset: 3px; }
.folder.new::before { background: #ead8ad; }
.folder.locked { background: #2e2a26; color: #8d867b; box-shadow: none; }
.folder.locked::before { background: #2e2a26; }
.folder.locked .n { color: #8d867b; }
.folder.locked .i { position: absolute; right: 12px; bottom: 12px; font-size: 18px; }
@media (max-width: 900px) { .folders { grid-template-columns: repeat(4, 1fr); } }

/* the detective's tools - evidence tags */
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tool { position: relative; display: flex; gap: 14px; align-items: center; padding: 16px 18px 16px 34px; border-radius: 6px 14px 14px 6px; background: var(--paper); color: var(--paper-ink); text-decoration: none; box-shadow: 0 8px 18px rgba(0,0,0,.4); transition: transform .2s; }
.mmi .tool { color: var(--paper-ink); }
.tool::before { content: ""; position: absolute; left: 12px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--ink); box-shadow: inset 0 1px 2px rgba(0,0,0,.6); }
.tool .ic { width: 42px; height: 42px; border-radius: 10px; background: rgba(179,18,27,.1); color: var(--red); display: grid; place-items: center; font-size: 20px; flex: none; }
.tool .ic .i { vertical-align: 0; }
.tool strong { display: block; font: 700 16px/1.3 var(--sans); }
.tool span { font: 13.5px/1.35 var(--mono); color: #5a5248; }
.tool.spoiler { background: var(--red); color: #fff; }
.mmi .tool.spoiler { color: #fff; }
.tool.spoiler span { color: #f3d0d2; }
.tool.spoiler .ic { background: rgba(255,255,255,.14); color: #fff; }
@media (hover: hover) { .tool:hover { transform: translateY(-2px) rotate(-.4deg); } }
@media (max-width: 900px) { .tools { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
    .dossier-head { grid-template-columns: 1fr; gap: 26px; }
    .dossier-cover { max-width: 330px; }
    .tools { grid-template-columns: 1fr; }
    .folders { grid-template-columns: repeat(3, 1fr); gap: 22px 10px; }
    .folder { min-height: 90px; padding: 18px 10px 12px; }
    .folder strong { font-size: 24px; }
    .folder .stamp { font-size: 8px; right: 3px; bottom: 6px; padding: 3px 4px; }
}

/* ---------- 11. Boards (existing markup and slider, restyled as cork boards) ---------- */
.mmi .boards-area { padding: 36px 0 80px; }
.mmi .investigation-boards-wrapper { position: relative; }
.mmi .investigation-boards .investigation-board {
    background-color: var(--cork);
    background-image: radial-gradient(rgba(0,0,0,.18) 1px, transparent 1.5px), radial-gradient(rgba(255,255,255,.08) 1px, transparent 1.5px);
    background-size: 7px 7px, 11px 11px; border-radius: 12px; padding: 20px 24px 48px;
    box-shadow: inset 0 0 0 10px #3b2414, inset 0 0 50px rgba(0,0,0,.5), var(--shadow); box-sizing: border-box;
    width: min(640px, 82vw) !important; min-height: 520px;
}
.mmi .investigation-boards .investigation-board .board-title { color: var(--paper-ink); font: 24px/1.2 var(--hand); font-weight: 700; background: var(--paper); display: inline-block; padding: 6px 16px; transform: rotate(-1.5deg); box-shadow: 0 4px 10px rgba(0,0,0,.3); margin: 4px 0 18px; }
.mmi.members-page .investigation-boards .board-title a.edit_board_title { float: none; margin-left: 12px; font: 600 12px var(--sans); }
.mmi .investigation-boards .investigation-board .board-clue { background: #fbfaf6; padding: 8px 8px 10px; border-radius: 1px; box-shadow: 0 6px 14px rgba(0,0,0,.45); position: relative; }
.mmi .investigation-boards .investigation-board .board-clue::before { content: ""; position: absolute; top: -7px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ff6a6f, var(--red) 55%, #4a0207); box-shadow: 0 2px 3px rgba(0,0,0,.5); z-index: 2; }
.mmi .investigation-boards .investigation-board .board-clue:nth-child(3n) { transform: rotate(-1.4deg); }
.mmi .investigation-boards .investigation-board .board-clue:nth-child(3n+1) { transform: rotate(1.1deg); }
.mmi .investigation-boards .investigation-board .board-clue a { color: var(--red) !important; font-weight: 600; text-decoration: none !important; }
.mmi .investigation-boards .add_board_slide { width: min(300px, 60vw) !important; min-height: 520px; border: 2px dashed rgba(255,255,255,.22); border-radius: 12px; margin-top: 0; }
.mmi.members-page .investigation-boards .add_board_slide .add-board-wrapper { padding-top: 0; position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.mmi .investigation-boards .investigation-board .remove_investigation_board { position: absolute; right: 22px; bottom: 16px; color: #f6d4d4; }
@media (max-width: 600px) {
    .mmi .investigation-boards .investigation-board, .mmi .investigation-boards .add_board_slide { min-height: 380px; padding-left: 16px; padding-right: 16px; }
    .mmi .investigation-boards .investigation-board .board-clues .grid-sizer, .mmi .investigation-boards .investigation-board .board-clues .grid-item { width: 48%; }
    .mmi .investigation-slick-arrows { display: none; }
}

/* ---------- 12. Motion: things arrive as you scroll; nothing moves for people who'd rather it didn't ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.polaroid.reveal.in:nth-child(1) { transform: rotate(-3deg); } .polaroid.reveal.in:nth-child(2) { transform: rotate(2deg) translateY(18px); } .polaroid.reveal.in:nth-child(3) { transform: rotate(-1.5deg); }
@media (max-width: 760px) { .polaroid.reveal.in:nth-child(2) { transform: rotate(2deg); } }
.reveal.d1 { transition-delay: .1s; } .reveal.d2 { transition-delay: .2s; } .reveal.d3 { transition-delay: .3s; }
.no-js .reveal, .no-js .stamp.slam { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .reveal, .stamp.slam { opacity: 1; transform: none; }
    .intro { display: none !important; }
    .corkboard .string path { stroke-dashoffset: 0; }
}
