/* vdtstudios.com
   Dark, red-tinted surfaces in five steps; VDT red only on actions and progress.
   The home page is a picker: one card per game, the featured game as the wide card that opens the grid.
   Type: Archivo Black on h1/h2, Nunito everywhere else (pairing 12 in the vault's Font Pairings).
   Radius system 4 / 24 / 48. Buttons carry one rounded corner as the site's cut. */

@font-face { font-family: "Nunito"; src: url(fonts/nunito.woff2) format("woff2"); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: "Archivo Black"; src: url(fonts/archivo-black.woff2) format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --s0: #0c090a; --s1: #151012; --s2: #20181b; --s3: #30252a; --s4: #47373d;
  --ink: #f7f2f3; --mute: #c0b4b8; --red: #e0242b; --red-d: #bd1b22; --paper: #fff; --paper-ink: #151012;
  --r1: 4px; --r2: 24px; --r3: 48px;
  --gap: clamp(1.25rem, 3vw, 2.5rem); --sec: clamp(4.5rem, 9vw, 7.5rem);
  --display: "Archivo Black", "Arial Black", Impact, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
@media (max-width: 700px) { :root { --r3: 28px; --gap: 1.125rem; --sec: 3.5rem; } }

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { overflow-x: hidden; }
body { margin: 0; background: var(--s0); color: var(--ink); font: 500 1.0625rem/1.55 var(--body); }
img { max-width: 100%; }
a { color: inherit; text-underline-offset: .18em; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.04; letter-spacing: -.01em; text-wrap: balance; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px var(--red); border-radius: 2px; }
.wrap { width: min(100% - 2 * var(--gap), 1280px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: .75rem; top: -4rem; z-index: 30; background: var(--paper); color: var(--paper-ink); padding: .6rem 1rem; border-radius: var(--r1); font-weight: 800; }
.skip:focus { top: .75rem; }
.ic { width: 1.05em; height: 1.05em; flex: none; }

/* ---------- header ---------- */
:root { --top: 4.25rem; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--top); width: min(100% - 2 * var(--gap), 1560px); margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-weight: 900; font-size: 1.05rem; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; min-height: 44px; }
.mark { width: 2.15rem; height: auto; color: var(--red); }
.top nav { display: flex; gap: clamp(1rem, 2.4vw, 2rem); }
.top nav a { text-decoration: none; font-weight: 800; min-height: 44px; display: inline-flex; align-items: center; }
.clip { display: block; overflow: hidden; line-height: 1.5; height: 1.5em; }
.clip span { position: relative; display: block; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.clip span::after { content: attr(data-t); position: absolute; left: 0; top: 100%; color: var(--paper); text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--red); }
@media (hover: hover) { .roll:hover .clip span { transform: translateY(-100%); } }
.roll:focus-visible .clip span { transform: translateY(-100%); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; height: 3rem; padding: 0 1.4rem; border: 0; border-radius: var(--r1) var(--r1) var(--r2) var(--r1); font: 800 1rem/1 var(--body); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .2s, transform .2s; }
.btn-red { background: var(--red); color: #fff; }
.btn-white { background: var(--paper); color: var(--paper-ink); }
@media (hover: hover) { .btn-red:hover { background: var(--red-d); } .btn-white:hover { background: #e9e2e4; } .btn:hover { transform: translateY(-2px); } }
.link { background: none; border: 0; padding: 0; min-height: 44px; color: var(--ink); font: 700 .95rem/1 var(--body); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }

/* ---------- the picker: a line of welcome, then every game as a card ---------- */
.picker { padding: clamp(1.5rem, 4vw, 3rem) 0 var(--sec); }
.intro { max-width: 46rem; }
.intro h1 { font-size: clamp(1.9rem, 4.2vw, 3.4rem); }
.mask { overflow: hidden; padding-bottom: .06em; }
.mask span { display: block; animation: rise .8s cubic-bezier(.2, .8, .2, 1) .1s both; }
@keyframes rise { from { transform: translateY(108%); } to { transform: none; } }
.lede { margin-top: .9rem; font-size: 1.175rem; color: var(--mute); }
.kinds { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.kind { height: 2.75rem; padding: 0 1.1rem; border: 0; border-radius: var(--r1) var(--r1) var(--r2) var(--r1); background: var(--s2); color: var(--ink); font: 800 .95rem/1 var(--body); cursor: pointer; transition: background-color .2s; }
.kind[aria-pressed="true"] { background: var(--paper); color: var(--paper-ink); }
@media (hover: hover) { .kind[aria-pressed="false"]:hover { background: var(--s3); } }

.games { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.75rem); margin-top: clamp(1.75rem, 4vw, 2.75rem); }
.game { position: relative; display: flex; flex-direction: column; background: var(--s1); border-radius: var(--r2); overflow: hidden; transition: transform .3s cubic-bezier(.2, .8, .2, 1), background-color .3s; }
.game[hidden] { display: none; }
.shot { position: relative; display: block; overflow: hidden; background: var(--s2); }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.shot::after { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s; pointer-events: none; background: radial-gradient(22rem circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .18), transparent 60%); }
.info { display: flex; flex-direction: column; flex: 1; padding: 1.25rem 1.35rem 1.4rem; }
.info h2 { font: 900 1.55rem/1.1 var(--body); letter-spacing: -.01em; }
.info h2 a { text-decoration: none; }
/* The title link covers the whole card, so anywhere on a card opens its game. */
.info h2 a::after { content: ""; position: absolute; inset: 0; }
.tag { margin-top: .55rem; color: var(--mute); }
.meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .95rem; font-size: .8125rem; font-weight: 800; }
.meta li { padding: .3rem .6rem; border-radius: var(--r1); background: var(--s3); }
.save { margin-top: 1.1rem; }
.save p { font-size: .9rem; color: var(--mute); }
.save b { color: var(--ink); font-weight: 900; font-variant-numeric: tabular-nums; }
.meter { height: 8px; border-radius: var(--r1); background: var(--s3); overflow: hidden; margin-bottom: .5rem; }
.meter i { display: block; height: 100%; width: 100%; background: var(--red); transform: scaleX(var(--f, 0)); transform-origin: 0 50%; transition: transform 1.1s cubic-bezier(.2, .8, .2, 1); }
.acts { position: relative; z-index: 1; display: flex; align-items: center; flex-wrap: wrap; gap: .4rem 1.2rem; margin-top: auto; padding-top: 1.25rem; }
@media (hover: hover) and (pointer: fine) {
  .game:hover { transform: translateY(-4px); background: var(--s2); }
  .game:hover .meta li { background: var(--s4); }
  .game.feat:hover .meta li { background: rgba(255, 255, 255, .16); }
  .game:hover .shot img { transform: scale(1.04); }
  .game:hover .shot::after { opacity: 1; }
}
.game:focus-within { background: var(--s2); }

/* The featured game: two columns wide, its picture filling the card with the words on top. */
.game.feat { grid-column: span 2; min-height: 26rem; justify-content: flex-end; }
.feat .shot { position: absolute; inset: 0; isolation: isolate; }
.feat .shot picture, .feat .shot img { display: block; width: 100%; height: 100%; }
.feat .shot img { aspect-ratio: auto; object-position: 50% 30%; }
.feat .shot::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(to top, rgba(12, 9, 10, .96) 0%, rgba(12, 9, 10, .82) 30%, rgba(12, 9, 10, 0) 68%); }
.feat .shot::after { z-index: 2; }
.feat .info { position: relative; z-index: 1; flex: none; max-width: 36rem; padding: 1.75rem; pointer-events: none; }
.feat .info a, .feat .info button { pointer-events: auto; }
.feat .info h2 { font: 400 clamp(1.9rem, 3.2vw, 2.75rem)/1.04 var(--display); }
.feat .tag { color: var(--ink); font-size: 1.1rem; }
.feat .meta li, .feat .meter { background: rgba(255, 255, 255, .16); }
.feat .save p { color: var(--ink); }
.feat .acts { margin-top: 0; }
@media (hover: hover) and (pointer: fine) { .game.feat:hover { background: var(--s1); } }

@media (max-width: 1000px) {
  .games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game.feat { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .games { grid-template-columns: minmax(0, 1fr); }
  .game.feat { min-height: min(34rem, 125vw); }
  .feat .shot img { object-position: 50% 0; }
  .feat .info { padding: 1.25rem; }
}

/* ---------- footer ---------- */
.foot { padding: var(--sec) 0 1.5rem; overflow: hidden; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 1.25rem 3rem; }
.foot-line { max-width: 34ch; font-weight: 700; }
.foot-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; }
.foot-nav a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; }
.wordmark { margin: clamp(2rem, 6vw, 4.5rem) 0 .5rem; font: 400 clamp(2.5rem, 11.4vw, 13rem)/.86 var(--display); text-transform: uppercase; text-align: center; white-space: nowrap; color: transparent; -webkit-text-stroke: 1.5px var(--s4); user-select: none; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; font-size: .875rem; color: var(--mute); }
.foot-base a { display: inline-flex; align-items: center; min-height: 44px; }
.foot-base p:first-child { display: flex; align-items: center; }

/* ---------- reading pages ---------- */
.prose { padding: clamp(2rem, 6vw, 4.5rem) 0 var(--sec); }
.prose h1 { font-size: clamp(2.25rem, 5.4vw, 4.25rem); }
.prose h2 { font-size: 1.4rem; margin: 2.6rem 0 .7rem; letter-spacing: 0; }
.prose p { max-width: 66ch; }
.prose p + p { margin-top: .9rem; }
.stamp { margin-top: 1rem; color: var(--mute); }
.prose-end { margin-top: 3rem; }
.lost p { margin-top: 1.2rem; font-size: 1.175rem; }

/* ---------- play page: a thin bar, then the game fills the window ---------- */
.playing { height: 100dvh; overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.bar { display: flex; align-items: center; gap: .9rem; height: 3rem; padding: 0 max(.5rem, env(safe-area-inset-right)) 0 max(.5rem, env(safe-area-inset-left)); background: var(--s1); border-bottom: 1px solid var(--s3); }
.bar h1 { font: 900 1rem/1 var(--body); letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.back, .ib { display: inline-flex; align-items: center; gap: .4rem; height: 2.75rem; padding: 0 .7rem; border: 0; border-radius: var(--r1); background: transparent; color: var(--ink); font: 800 .925rem/1 var(--body); text-decoration: none; white-space: nowrap; cursor: pointer; flex: none; }
.back { padding-left: .35rem; }
@media (hover: hover) { .back:hover, .ib:hover { background: var(--s3); } }
.bar-acts { margin-left: auto; display: flex; align-items: center; gap: .15rem; flex: none; }
.saved { font-size: .875rem; color: var(--mute); margin-right: .6rem; }
.legal { font-size: .875rem; color: var(--mute); margin-right: .6rem; min-height: 24px; display: inline-flex; align-items: center; }
.stage { position: relative; min-height: 0; background: #0d0919; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 700px) {
  .saved { display: none; }
  .legal { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
  .ib span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
  .ib { width: 2.75rem; padding: 0; justify-content: center; }
  .ib .ic { width: 1.3rem; height: 1.3rem; }
  .bar { gap: .35rem; }
}

/* ---------- toast with undo ---------- */
.toast { position: fixed; left: 50%; bottom: max(1.25rem, env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; gap: 1.1rem; max-width: calc(100vw - 2rem); padding: .7rem 1.1rem; border-radius: var(--r1) var(--r1) var(--r2) var(--r1); background: var(--paper); color: var(--paper-ink); font-weight: 800; box-shadow: 0 14px 40px rgba(0, 0, 0, .55); visibility: hidden; opacity: 0; transform: translate(-50%, 1.5rem); transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .28s, visibility 0s .28s; }
.toast.on { visibility: visible; opacity: 1; transform: translate(-50%, 0); transition-delay: 0s; }
.toast button { background: none; border: 0; padding: 0; min-height: 44px; color: inherit; font: 900 1rem/1 var(--body); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.toast :focus-visible { outline-color: var(--paper-ink); }

/* ---------- ?pick: try the shortlisted type pairings ---------- */
.pick { position: fixed; left: .75rem; bottom: .75rem; z-index: 50; display: flex; flex-wrap: wrap; gap: .35rem; max-width: calc(100vw - 1.5rem); padding: .5rem; border-radius: var(--r1); background: var(--paper); color: var(--paper-ink); font: 700 .8125rem/1.2 system-ui, sans-serif; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.pick button { border: 1px solid #bbb; background: #fff; color: inherit; border-radius: var(--r1); padding: .45rem .6rem; font: inherit; cursor: pointer; }
.pick button[aria-pressed="true"] { background: var(--paper-ink); color: #fff; border-color: var(--paper-ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mask span { animation: none; }
  .clip span, .btn, .kind, .game, .shot img, .meter i, .toast { transition: none; }
  @view-transition { navigation: none; }
}
