/* Mystery Dance Marathon (/mystery) — look from mockups/m-a-invitation.html: Art Deco, gold on oxblood.
   Loaded only on pages using the "Mystery" templates (inc/mystery.php), instead of the Rhythm Vibes CSS.
   Type: Gloock (titles) + Inter (text), both SIL Open Font License, self-hosted. */

@font-face { font-family: "Gloock"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/Gloock-normal-400.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(fonts/Inter-normal-300_700.woff2) format("woff2"); }

:root {
  --black: #050304; --oxblood: #2a0508; --wine: #4a0b12;
  --red: #e22320; --gold: #d9b26a; --gold-hi: #f3dca4; --cream: #f3e9dc; --smoke: #a8979a;
  --line: rgba(217, 178, 106, .22);
  --title: "Gloock", Georgia, serif;
  --sans: "Inter", Arial, sans-serif;
  --maxw: 1180px;
}

/* ---------- Base + block resets ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Background: a fixed layer sized to the largest viewport (100lvh), so it still covers the screen when a phone's
   address bar slides away while scrolling (background-attachment: fixed left a white band there). */
html:has(body.mys) { background: #120304; }
body.mys { margin: 0; font-family: var(--sans); font-weight: 300; font-synthesis: none; line-height: 1.65; color: var(--cream); -webkit-font-smoothing: antialiased; overflow-x: hidden; background: none; }
body.mys::before { content: ""; position: fixed; inset: 0 0 auto; height: 100vh; height: 100lvh; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, #4a0b12 0%, #2a0508 45%, #120304 100%); }
.mys h1, .mys h2, .mys h3, .mys p, .mys figure, .mys ul, .mys ol { margin: 0; }
.mys img { display: block; max-width: 100%; height: auto; }
.mys a { color: inherit; text-decoration: none; }
.mys .wp-site-blocks { padding: 0; }
.mys .wp-block-image { margin: 0; }
.mys .wp-block-group:empty { display: none; }
.mys .mys-main { overflow-x: clip; } /* safety net: nothing in the content can make the page scroll sideways */
.mys .wrap { width: min(var(--maxw), 100% - 48px); margin-inline: auto; }
.mys .center { text-align: center; }
.mys .caps { font-family: var(--sans); font-weight: 500; text-transform: uppercase; letter-spacing: .28em; }
.mys .gold { color: var(--gold); }
.mys .red { color: var(--red); }
.mys .foil { background: linear-gradient(100deg, #a8802f 0%, #f3dca4 22%, #c99a45 45%, #fff1c6 60%, #b88a3a 80%, #f0d495 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mys :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Film grain */
.mys .grain { position: relative; }
.mys .grain::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: .09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* Noir photo treatment */
.mys .noir { position: relative; overflow: hidden; background: var(--oxblood); }
.mys .noir img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.35) brightness(.72); transition: filter .8s ease; }
.mys .noir::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(226,35,32,.28), rgba(42,5,8,.55)); mix-blend-mode: multiply; transition: opacity .8s ease; }
/* Hover: the photo fades back to its original colours */
.mys .noir:hover img { filter: none; }
.mys .noir:hover::after { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .mys .noir img, .mys .noir::after { transition: none; } }

/* Reveal on scroll (rv.js adds .js / .in) */
.js .mys .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s ease, transform 1s ease; }
.js .mys .reveal.in { opacity: 1; transform: none; }
.static .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { .mys .reveal { opacity: 1 !important; transform: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* Art Deco frame: border + inner border + diamond on top (and at the bottom of the hero card) */
.mys .deco { position: relative; border: 1px solid var(--gold); }
.mys .deco::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(217,178,106,.45); pointer-events: none; }
.mys .deco::after, .mys .mys-card > :last-child::after { content: ""; position: absolute; left: calc(50% - 11px); width: 22px; height: 22px; border: 1px solid var(--gold); background: var(--oxblood); transform: rotate(45deg); }
.mys .deco::after { top: -12px; }
.mys .mys-card > :last-child::after { bottom: -12px; }

/* Gold rule with a label in the middle */
.mys .mys-rule { display: flex; align-items: center; gap: 18px; justify-content: center; color: var(--gold); font-size: 12px; }
.mys .mys-rule::before, .mys .mys-rule::after { content: ""; flex: 1; max-width: 160px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.mys .mys-rule::after { transform: scaleX(-1); }

/* ---------- Buttons (block styles "Mystery red" / "Mystery gold") ---------- */
.mys .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.mys .wp-block-button__link, .mys .mbtn { display: inline-flex; align-items: center; justify-content: center; padding: 1.05em 2em; border: 0; border-radius: 0; font-family: var(--sans); font-weight: 500; font-size: .8rem; line-height: 1.2; letter-spacing: .28em; text-transform: uppercase; transition: all .3s ease; }
.mys .wp-block-button:not(.is-style-mys-gold) .wp-block-button__link, .mys .mbtn-red { background: var(--red); color: #fff; box-shadow: 0 12px 40px -12px rgba(226,35,32,.8); }
.mys .wp-block-button:not(.is-style-mys-gold) .wp-block-button__link:hover, .mys .mbtn-red:hover { background: #ff3a33; transform: translateY(-2px); }
.mys .is-style-mys-gold .wp-block-button__link { background: transparent; border: 1px solid var(--gold); color: var(--gold); }
.mys .is-style-mys-gold .wp-block-button__link:hover { background: var(--gold); color: var(--black); }

/* ---------- Header ---------- */
.mys-top { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 32px; background: linear-gradient(180deg, rgba(18,3,4,.92), transparent); }
.admin-bar .mys-top { top: 32px; }
@media (max-width: 782px) { .admin-bar .mys-top { top: 46px; } }
.mys-top .mono img { height: 46px; width: auto; }
.mys-top .mys-nav { display: flex; gap: 30px; font-size: 12px; }
.mys-top .mys-nav a { color: var(--gold); opacity: .8; } .mys-top .mys-nav a:hover { opacity: 1; }
.mys-top .mys-right { display: flex; align-items: center; gap: 12px; }
.mys-top .wp-block-button__link { padding: .8em 1.4em; }
.mys .rv-lang { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 12px; letter-spacing: .14em; line-height: 1; color: var(--gold); padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; }
.mys .rv-lang svg { width: 21px; height: 14px; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.mys .rv-lang:hover { border-color: var(--gold); background: rgba(217,178,106,.08); }

/* ---------- Hero: the invitation card ---------- */
.mys-hero { min-height: min(100svh, 960px); display: grid; place-items: center; padding: 120px 24px 80px; overflow: hidden; }
.mys-hero::after { content: ""; position: absolute; inset: -20%; background: repeating-conic-gradient(from 0deg at 50% 62%, rgba(217,178,106,.07) 0deg 3deg, transparent 3deg 12deg); -webkit-mask: radial-gradient(circle at 50% 62%, #000 20%, transparent 65%); mask: radial-gradient(circle at 50% 62%, #000 20%, transparent 65%); pointer-events: none; }
.mys-card { position: relative; z-index: 1; width: min(760px, 100%); padding: 64px 56px 56px; text-align: center; background: linear-gradient(160deg, rgba(74,11,18,.9), rgba(26,4,6,.95)); box-shadow: 0 40px 120px -20px rgba(0,0,0,.8), 0 0 80px -10px rgba(226,35,32,.25); }
.mys-card .mono img { width: 240px; margin: 0 auto 8px; filter: drop-shadow(0 0 30px rgba(226,35,32,.45)); }
.mys-card .kicker { font-size: 13px; color: var(--gold); }
.mys-card h1 { font-family: var(--title); font-weight: 400; font-size: clamp(26px, 4.2vw, 42px); letter-spacing: .08em; line-height: 1.2; margin: 22px 0 14px; text-transform: uppercase; }
.mys-card .when { font-family: var(--title); font-size: 22px; color: var(--cream); margin-top: 18px; }
.mys-card .where { font-size: 13px; color: var(--smoke); letter-spacing: .2em; text-transform: uppercase; margin-top: 6px; }
.mys-card .ctas { margin-top: 34px; }
.mys-countdown { display: flex; gap: 22px; justify-content: center; margin-top: 30px; }
.mys-countdown div { min-width: 64px; }
.mys-countdown b { display: block; font-family: var(--title); font-size: 34px; font-weight: 400; color: var(--gold-hi); }
.mys-countdown small { font-size: 10px; letter-spacing: .3em; color: var(--smoke); }

/* ---------- Sections ---------- */
.mys-s { padding: 120px 0; }
.mys-s.tight { padding-top: 40px; }
.mys h2 { font-family: var(--title); font-weight: 400; font-size: clamp(36px, 5vw, 64px); line-height: 1.08; margin: 18px 0 22px; }
.mys h2 em { color: var(--red); font-style: normal; }
.mys .lead { color: var(--smoke); max-width: 60ch; margin-inline: auto; font-size: 18px; }
.mys .lead.after { margin-top: 60px; }
.mys .lead a { color: var(--gold); }

/* Manifesto numbers */
.mys-numbers { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 60px; }
.mys-numbers > div { padding: 34px 20px; text-align: center; border-left: 1px solid var(--line); }
.mys-numbers > div:first-child { border-left: 0; }
.mys-numbers .n { font-family: var(--title); font-size: clamp(60px, 8vw, 110px); line-height: 1; }
.mys-numbers .k { font-size: 12px; letter-spacing: .25em; text-transform: uppercase; color: var(--smoke); margin-top: 8px; }

/* The five keys */
.mys-pillars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-top: 60px; }
.mys-pillar { padding: 30px 22px 26px; text-align: center; min-height: 340px; display: flex; flex-direction: column; background: rgba(18,3,4,.55); }
.mys-pillar .n { font-family: var(--title); color: var(--gold); font-size: 15px; }
.mys-pillar h3 { font-family: var(--title); font-weight: 400; font-size: 20px; letter-spacing: .14em; text-transform: uppercase; margin: 18px 0 12px; line-height: 1.25; }
.mys-pillar p:not(.n):not(.sym) { color: var(--smoke); font-size: 14.5px; }
.mys-pillar .sym { font-size: 30px; color: var(--red); margin-top: auto; padding-top: 18px; }
.mys-pillar.sealed { background: repeating-linear-gradient(135deg, rgba(226,35,32,.08) 0 10px, transparent 10px 20px), rgba(18,3,4,.7); }
.mys-pillar.sealed h3 { color: var(--red); }
.mys-pillar.sealed .sym { font-family: var(--title); }

/* Photo band */
.mys-band { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 14px; height: 420px; }
.mys-band .noir { height: 100%; }

/* Steps I–IV, with a short vertical line between them that stops before the top rule */
.mys-steps { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 60px; border-top: 1px solid var(--line); text-align: left; }
.mys .mys-steps > .mys-step { padding: 0 26px; margin-top: 34px; } /* beats WP's "first child: no top margin" layout rule */
.mys .mys-steps > .mys-step:first-child { padding-left: 0; }
.mys-step + .mys-step { border-left: 1px solid var(--line); }
.mys-step .roman { font-family: var(--title); font-size: 44px; color: var(--gold); line-height: 1; }
.mys-step h3 { font-family: var(--title); font-weight: 400; letter-spacing: .12em; text-transform: uppercase; font-size: 19px; margin: 14px 0 8px; }
.mys-step p:not(.roman):not(.price) { color: var(--smoke); font-size: 15px; }
.mys-step .price { margin-top: 10px; font-family: var(--title); font-size: 28px; color: var(--cream); }
.mys-steps + .ctas { margin-top: 56px; }

/* Cities */
.mys-cities { font-family: var(--title); font-size: clamp(22px, 3vw, 34px); color: var(--gold); margin-top: 26px; }
.mys-cities span { display: inline-block; color: var(--red); margin: 0 .4em; } /* inline-block: the line may wrap at each ✦ (the names have no spaces between them) */
.mys-cities + .lead { margin-top: 34px; }

/* FAQ */
.mys .mfaq { max-width: 820px; margin: 50px auto 0; text-align: left; }
.mys .mfaq details { border-bottom: 1px solid var(--line); }
.mys .mfaq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 22px 2px; font-family: var(--title); font-size: 21px; }
.mys .mfaq summary::-webkit-details-marker { display: none; }
.mys .mfaq summary::after { content: "✦"; color: var(--red); transition: transform .4s; }
.mys .mfaq details[open] summary::after { transform: rotate(45deg); }
.mys .mfaq details p { padding: 0 2px 22px; color: var(--smoke); max-width: 70ch; }

/* Final call */
.mys-final { padding: 140px 0 160px; text-align: center; }
.mys-final .wordmark img { width: min(420px, 80vw); margin: 0 auto 30px; }
.mys-final .caps { font-size: 13px; }
.mys-final .lead { margin: 24px auto 34px; }

/* ---------- Text pages (template "Mystery: text page") ---------- */
.mys-text { padding: 140px 0 100px; }
.mys-text .wrap { max-width: 820px; }
.mys-text h1.wp-block-post-title { font-family: var(--title); font-weight: 400; font-size: clamp(36px, 5vw, 56px); line-height: 1.1; text-align: center; margin-bottom: 40px; }
.mys-text h2 { font-size: clamp(26px, 3.2vw, 36px); margin: 50px 0 16px; }
.mys-text h3 { font-family: var(--title); font-weight: 400; font-size: 22px; margin: 34px 0 10px; }
.mys-text p, .mys-text li { color: #d8cbc4; font-size: 17px; }
.mys-text p + p, .mys-text p + ul, .mys-text p + ol, .mys-text ul + p, .mys-text ol + p { margin-top: 16px; }
.mys-text ul, .mys-text ol { padding-left: 1.3em; display: grid; gap: 10px; }
.mys-text strong { color: var(--cream); font-weight: 600; }
.mys-text a:not(.wp-block-button__link) { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.mys-text hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0 0; }
.mys-text .wp-block-buttons, .mys-text .wp-block-button { margin: 34px 0; display: flex; justify-content: center; }
.mys-text .wp-block-cover { position: relative; min-height: 260px !important; margin-bottom: 50px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--gold); padding: 40px 24px; }
.mys-text .wp-block-cover__image-background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.3) brightness(.6); }
.mys-text .wp-block-cover__background { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(74,11,18,.65), rgba(18,3,4,.85)) !important; opacity: 1 !important; }
.mys-text .wp-block-cover__inner-container { position: relative; z-index: 2; }
.mys-text .wp-block-cover p { font-family: var(--title); font-size: clamp(28px, 4vw, 44px) !important; line-height: 1.15; color: var(--cream); text-align: center; }

/* ---------- Characters page (/mystery/characters/, unlisted): one case file per character, photo left/right in turn ---------- */
.mys-chars-hero { padding: 170px 0 40px; }
.mys-chars-hero h1 { font-family: var(--title); font-weight: 400; font-size: clamp(44px, 7vw, 88px); line-height: 1.05; margin: 22px 0 26px; }
.mys-chars { padding: 60px 0 40px; }
.mys-char { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 64px; align-items: center; padding: 56px 0; border-top: 1px solid var(--line); }
.mys-char:first-child { border-top: 0; }
.mys-char:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); }
.mys-char:nth-child(even) figure { order: 2; }
.mys .mys-char figure { aspect-ratio: 4 / 5; overflow: visible; }
.mys .mys-char figure img { position: relative; }
.mys-char-n { font-size: 12px; color: var(--red); }
.mys-char h2 { margin: 12px 0 4px; font-size: clamp(40px, 5vw, 60px); }
.mys-char-alias { font-family: var(--title); font-size: clamp(20px, 2.4vw, 26px); color: var(--gold); letter-spacing: .04em; }
.mys-char-origin { margin-top: 22px !important; color: var(--cream); font-size: 18px; }
.mys-char-body p:last-child { margin-top: 14px; color: var(--smoke); font-size: 17px; max-width: 56ch; }

/* ---------- Footer ---------- */
.mys-footer { border-top: 1px solid var(--line); padding: 34px 0 60px; font-size: 13px; color: var(--smoke); }
.mys-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.mys-footer a { color: var(--gold); }
.mys-footer .links { display: flex; gap: 24px; flex-wrap: wrap; }
.mys-footer .links a { color: inherit; } .mys-footer .links a:hover { color: var(--gold); }

/* ---------- Small screens ---------- */
@media (max-width: 960px) {
  .mys-top { padding: 12px 18px; }
  .mys-top .mys-nav { display: none; }
  .mys-pillars { grid-template-columns: 1fr 1fr; } .mys-pillar.sealed { grid-column: 1 / -1; }
  .mys-numbers, .mys-steps { grid-template-columns: 1fr; }
  .mys-numbers > div { border-left: 0; border-top: 1px solid var(--line); }
  .mys-numbers > div:first-child { border-top: 0; }
  .mys .mys-steps > .mys-step, .mys .mys-steps > .mys-step:first-child { padding: 30px 0 0; margin-top: 0; }
  .mys .mys-steps > .mys-step + .mys-step { border-left: 0; border-top: 1px solid var(--line); margin-top: 30px; }
  .mys-band { grid-template-columns: 1fr 1fr; height: 520px; } .mys-band .noir:first-child { grid-column: 1 / -1; }
  .mys-card { padding: 50px 26px 40px; }
  .mys-char, .mys-char:nth-child(even) { grid-template-columns: 1fr; gap: 34px; padding: 44px 0; text-align: center; }
  .mys-char:nth-child(even) figure { order: 0; }
  .mys .mys-char figure { width: min(360px, 100%); margin-inline: auto; }
  .mys-char-body p:last-child { margin-inline: auto; }
  .mys-s { padding: 90px 0; }
}
@media (max-width: 520px) {
  .mys-top .mono img { height: 38px; }
  .mys-top .mys-right .wp-block-button__link { padding: .75em 1em; letter-spacing: .2em; }
  .mys-pillars { grid-template-columns: 1fr; gap: 26px; } .mys-pillar { min-height: 0; } .mys-pillar .sym { padding-top: 14px; }
  .mys-countdown { gap: 10px; } .mys-countdown div { min-width: 54px; } .mys-countdown b { font-size: 28px; }
  .mys-card .mono img { width: 180px; }
}
