/* Shared styles for the project pages (royal-vacancy.html, vampires-contract.html).
   Same tokens and type as the home page. */
:root {
  --bg: #faf8f4;
  --bg-deep: #f1ede5;
  --ink: #17140f;
  --ink-soft: rgba(23, 20, 15, .66);
  --ink-faint: rgba(23, 20, 15, .16);
  --frame: #e6e1d7;
  --gold: #e2bd62;
  --green: #22a85a;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Poppins", system-ui, sans-serif;
  --side: max(clamp(16px, 4vw, 48px), calc((100vw - 1440px) / 2));
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f0f10;
  --bg-deep: #171718;
  --ink: #efe9dd;
  --ink-soft: rgba(239, 233, 221, .7);
  --ink-faint: rgba(239, 233, 221, .2);
  --frame: #222224;
  --green: #3ddc84;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.55; overflow-x: hidden; transition: background-color .4s, color .4s; }
a { color: inherit; text-decoration: none; }
img, video { display: block; width: 100%; height: 100%; object-fit: cover; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 30px); padding: 22px var(--side); position: sticky; top: 0; z-index: 20; transition: background .3s, padding .3s; }
.top.scrolled { background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); padding-top: 12px; padding-bottom: 12px; box-shadow: 0 1px 0 var(--ink-faint); }
.brand { font-size: clamp(14px, 1.5vw, 20px); white-space: nowrap; margin-right: auto; }
.brand span { text-transform: uppercase; }
.brand .role { text-transform: none; opacity: .9; }
.top nav { display: flex; gap: clamp(16px, 2.2vw, 30px); font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.top nav a { position: relative; padding-bottom: 2px; }
.top nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s; }
.top nav a:hover::after { transform: scaleX(1); }
.theme { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.theme:hover { color: var(--ink); }
.theme svg { width: 15px; height: 15px; }
.theme .moon { display: none; }
:root[data-theme="dark"] .theme .sun { display: none; }
:root[data-theme="dark"] .theme .moon { display: block; }
.otw { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; padding: 7px 15px 7px 12px; border-radius: 99px; background: var(--ink); color: var(--bg); font-size: 12.5px; font-weight: 500; transition: opacity .25s; }
.otw:hover { opacity: .88; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); position: relative; flex: none; display: inline-block; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--green); opacity: 0; animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.5); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

/* ---------- breadcrumb ---------- */
.crumb { display: flex; gap: 10px; padding: 6px var(--side) 0; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.crumb a:hover { color: var(--ink); }

/* ---------- hero ---------- */
.p-hero { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; padding: clamp(20px, 3vw, 40px) var(--side) clamp(48px, 5vw, 76px); }
.screen { position: relative; aspect-ratio: 9 / 16; background: #000; overflow: hidden; box-shadow: 0 30px 70px -35px rgba(0,0,0,.6); position: sticky; top: 90px; }
.screen img, .screen video { position: absolute; inset: 0; }
.screen video.full { object-fit: contain; background: #000; }
.disc { position: absolute; left: 50%; top: 60%; z-index: 3; translate: -50% -50%; width: 78px; height: 78px; border-radius: 50%; background: rgba(255,255,255,.92); color: #17140f; display: grid; place-items: center; box-shadow: 0 10px 40px rgba(0,0,0,.35); transition: transform .35s cubic-bezier(.2,.7,.2,1), background .25s; }
.disc svg { width: 24px; height: 24px; margin-left: 4px; }
.screen.playable { cursor: pointer; }
.screen.playable:hover .disc { transform: scale(1.1); background: var(--gold); }
.tag { position: absolute; left: 14px; bottom: 14px; z-index: 3; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 9px 16px 9px 13px; border-radius: 99px; box-shadow: 0 8px 24px -8px rgba(0,0,0,.5); }
.tag i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tag.out { background: var(--gold); color: #1d1608; }
.tag.out i { background: #1d1608; }
.tag.soon { background: #fff; color: #17140f; }
.tag.soon i { background: #e8762d; }
.screen.on .tag, .screen.on .disc { display: none; }
/* work-in-progress label: stays on the screen while the preview plays */
.wip { position: absolute; top: 12px; left: 12px; z-index: 4; pointer-events: none; display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 6px 11px; border-radius: 99px; background: rgba(12,12,13,.72); color: #f2eee6; backdrop-filter: blur(6px); }
.wip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #e8762d; }
.wip-note { margin-top: 14px; font-size: 13px; color: var(--ink-soft); max-width: 52ch; }

.info h1, .land-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 7vw, 112px); line-height: .9; letter-spacing: -.01em; }
.info .ep, .land-head .ep { margin-top: 12px; font-size: 14px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 22px 0 30px; }
.chip { font-size: 12px; font-weight: 500; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--ink-faint); white-space: nowrap; }
.logline { font-family: var(--serif); font-style: italic; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.15; max-width: 30ch; }
.synopsis { color: var(--ink-soft); font-size: 16px; max-width: 60ch; margin-top: 18px; }
.synopsis + .synopsis { margin-top: 12px; }
.act { display: flex; align-items: center; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 24px; border-radius: 99px; font-size: 13px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; transition: background .25s, transform .25s, border-color .25s, opacity .25s; }
.btn svg { width: 11px; height: 11px; }
.btn.gold { background: var(--gold); color: #1d1608; }
.btn.gold:hover { background: #f0cd75; transform: translateY(-1px); }
.btn.line { border: 1px solid var(--ink-faint); }
.btn.line:hover { border-color: var(--ink); }
.btn.ink { background: var(--ink); color: var(--bg); }
.btn.ink:hover { opacity: .88; }
.soon-pill { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding: 12px 20px; border: 1px dashed var(--ink-faint); border-radius: 99px; color: var(--ink-soft); }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin-top: 32px; border-top: 1px solid var(--ink); max-width: 720px; }
.facts div { padding: 14px 0; border-bottom: 1px solid var(--ink-faint); }
.facts dt { font-family: var(--serif); text-transform: uppercase; font-size: 14px; color: var(--ink-soft); }
.facts dd { font-size: 15px; margin-top: 2px; }

/* ---------- sections ---------- */
.sec { padding: 0 var(--side) clamp(56px, 6vw, 88px); }
.sec-head { display: grid; grid-template-columns: 1fr 2fr; gap: 30px; align-items: end; padding-top: 18px; border-top: 1px solid var(--ink); margin-bottom: clamp(26px, 3vw, 40px); }
.sec-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 4.4vw, 64px); line-height: 1; }
.sec-head h2 em { font-style: italic; }
.sec-head p { color: var(--ink-soft); max-width: 58ch; justify-self: end; text-align: right; }

/* locked references */
.refs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 44vw), 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.ref { cursor: zoom-in; }
.ref .im { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--frame); }
.ref.tall .im { aspect-ratio: 9 / 16; }
.ref.wide { grid-column: span 2; }
.ref.wide .im { aspect-ratio: 16 / 9; }
.ref img { transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.ref:hover img { transform: scale(1.04); }
.ref .lock { position: absolute; top: 10px; left: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 5px 9px; border-radius: 99px; background: rgba(255,255,255,.9); color: #17140f; }
.ref .lock svg { width: 10px; height: 10px; }
.ref h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2vw, 30px); line-height: 1; margin-top: 12px; }
.ref .role { display: block; font-size: 11.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-top: 6px; }
.ref p { font-size: 13.5px; color: var(--ink-soft); margin-top: 6px; }
.ref q { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink); display: block; margin-top: 6px; }

/* stills strip */
.strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.strip figure { aspect-ratio: 9 / 16; overflow: hidden; cursor: zoom-in; }
.strip img { transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.strip figure:hover img { transform: scale(1.05); }

/* acts / beats */
.acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.acts div { border-top: 1px solid var(--ink-faint); padding-top: 14px; }
.acts b { font-family: var(--serif); font-weight: 400; font-size: 15px; text-transform: uppercase; color: var(--ink-soft); }
.acts h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.2vw, 34px); line-height: 1; margin: 8px 0 10px; }
.acts p { font-size: 14px; color: var(--ink-soft); }

.numbers { display: grid; grid-template-columns: repeat(4, 1fr); }
.num { padding: 0 20px 0 0; }
.num + .num { padding-left: 20px; border-left: 1px solid var(--ink-faint); }
.num b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 5vw, 76px); line-height: 1; }
.num span { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 10px; max-width: 24ch; }

.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-top: clamp(28px, 3vw, 40px); }
.steps div { border-top: 1px solid var(--ink-faint); padding-top: 14px; }
.steps b { font-family: var(--serif); font-weight: 400; font-size: 26px; display: block; }
.steps h3 { font-weight: 500; font-size: 14.5px; margin: 12px 0 6px; }
.steps p { color: var(--ink-soft); font-size: 13px; }

/* next project */
.next { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 30px; margin: 0 var(--side); padding: clamp(32px, 3.6vw, 48px) 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink-faint); }
.next small { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.next h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(46px, 7vw, 110px); line-height: .95; margin-top: 8px; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.next:hover h2 { transform: translateX(14px); }
.next .thumb { width: clamp(90px, 10vw, 150px); aspect-ratio: 9 / 16; overflow: hidden; }
.next .thumb.land { width: clamp(160px, 18vw, 270px); aspect-ratio: 16 / 9; }

/* footer */
footer { padding: clamp(44px, 5vw, 76px) var(--side) 28px; }
.thanks { font-family: var(--serif); font-size: clamp(46px, 6vw, 100px); line-height: 1; text-align: center; }
.thanks em { font-style: italic; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: clamp(32px, 3.5vw, 48px); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }

/* image viewer */
dialog { --ink: #efe9dd; border: 0; padding: 0; background: transparent; color: var(--ink); margin: auto; max-width: 94vw; max-height: 92vh; overflow: visible; }
dialog::backdrop { background: rgba(12, 12, 13, .94); }
dialog img { width: auto; height: auto; max-width: 94vw; max-height: 82vh; object-fit: contain; }
dialog figcaption { text-align: center; margin-top: 12px; font-family: var(--serif); font-size: 22px; }
dialog figcaption small { display: block; font-family: var(--sans); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.close { position: fixed; top: 16px; right: 20px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; padding: 6px 10px; color: #efe9dd; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 1s, transform 1s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- game page: landscape hero, boss moves, pixel stills ---------- */
.px { image-rendering: pixelated; }
.p-hero.land { grid-template-columns: 1fr; gap: clamp(20px, 2.6vw, 36px); }
.screen.land { aspect-ratio: 16 / 9; position: relative; top: 0; }
.screen.land .disc { top: 50%; }
.p-hero.land .info { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.land-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 30px; flex-wrap: wrap; }
.land-head .chips { margin: 0 0 4px; }
.p-hero.land .synopsis.first { margin-top: 0; }
.lineup { background: #141318; cursor: zoom-in; }
.lineup img { height: auto; }
.moves { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.move .clip { aspect-ratio: 4 / 3; overflow: hidden; background: #000; }
/* zoom in on the fighters; the move name is in the caption, so the in-clip title and HUD can go */
.move video { image-rendering: pixelated; transform: scale(1.5); transform-origin: 55% 72%; }
.move h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 1.8vw, 28px); line-height: 1; margin-top: 12px; }
.move .role { display: block; font-size: 11.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-top: 6px; }
.stills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.stills .ref.wide { grid-column: auto; }
.ref:hover img.px { transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .top nav { display: none; }
  .p-hero { grid-template-columns: 1fr; }
  .screen { position: relative; top: 0; width: min(100%, 420px); }
  .sec-head { grid-template-columns: 1fr; }
  .sec-head p { justify-self: start; text-align: left; }
  .acts { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .strip { grid-template-columns: repeat(3, 1fr); }
  .screen.land { width: 100%; }
  .p-hero.land .info { grid-template-columns: 1fr; }
  .moves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .brand .role { display: none; }
  .brand { font-size: 13px; }
  .otw { font-size: 12px; padding: 6px 12px 6px 10px; }
  .theme span { display: none; }
  .tag { left: 10px; bottom: 10px; font-size: 11px; padding: 7px 12px 7px 10px; }
  .act .btn { flex: 1 1 100%; }
  .facts { grid-template-columns: 1fr; }
  .ref.wide { grid-column: 1 / -1; }
  .acts, .steps { grid-template-columns: 1fr; }
  .numbers { grid-template-columns: 1fr 1fr; row-gap: 24px; }
  .num:nth-child(3) { padding-left: 0; border-left: 0; }
  .next { grid-template-columns: 1fr; }
  .next .thumb { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- tool logos and monograms (MiniMax, Modal, FFmpeg, Godot are Simple Icons; the rest are monograms) ---------- */
.tool { display: inline-flex; align-items: center; gap: .5em; white-space: nowrap; vertical-align: middle; }
.ti { width: 1.75em; height: 1.75em; flex: none; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--ink-faint); color: var(--ink); transition: border-color .25s, color .25s; }
.ti svg { width: 55%; height: 55%; fill: currentColor; }
.ti i { font-family: var(--serif); font-style: italic; font-size: .95em; line-height: 1; transform: translateY(-.04em); }
.tool:hover .ti { border-color: var(--gold); color: var(--gold); }
.tools-line { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.facts dd.tools-line { margin-top: 6px; }
.acts .tools-line { margin-top: 12px; font-size: 13px; }
.steps p .tool { white-space: normal; }
.chip .ti { width: 1.6em; height: 1.6em; margin: -3px 0 -3px -6px; }
