/* Dark Dev site: one stylesheet for every page. His pick (25 November 2026): look A, "The Mark": the studio's DD mark in
   gunmetal and ember red over smoke. Ruin's Keep keeps its own soot and gold wherever it appears (.rk, body.rkp).
   Fonts are self-hosted, so the site asks nothing of any other server: Big Shoulders Display, Cinzel and Outfit, all under the
   SIL Open Font License (fonts/OFL.txt). html[data-fx="strong"] runs the canvas smoke, the sparks and the tilting mark;
   "middle" keeps only light and glow. Nothing moves with the device's reduced motion. */

@font-face { font-family: "Big Shoulders"; src: url("/fonts/bigshoulders.woff2") format("woff2"); font-weight: 600 900; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("/fonts/cinzel.woff2") format("woff2"); font-weight: 600 900; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("/fonts/outfit.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  color-scheme: dark;
  --ink: #09090a;
  --ink-2: #111113;
  --line: #2a2b30;
  --line-hi: #3d3f46;
  --text: #ebe8e4;
  --muted: #9a979a;
  --steel: #8f939b;
  --hot: #d2383b;
  --hot-deep: #771515;
  --accent: var(--hot);
  --gold: #e6b655;
  --gold-hi: #f0c96f;
  --gold-lo: #c8932f;
  --display: "Big Shoulders", "Arial Narrow", Impact, sans-serif;
  --serif: "Cinzel", "Trajan Pro", Georgia, serif;
  --body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --w: 74rem;
  --gut: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; background: var(--ink); }
body { margin: 0; background: var(--ink); color: var(--text); font: 400 1rem/1.6 var(--body); overflow-x: hidden; }
img { max-width: 100%; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: var(--w); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut-r); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--ink-2); color: var(--text); padding: .5rem .8rem; }
.skip:focus { left: 8px; }
h1, h2, h3 { font-family: var(--display); text-transform: uppercase; text-wrap: balance; }

/* the top bar: clear over the first screen, solid once you scroll (always solid on the other pages) */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; gap: 1.5rem;
  padding: .7rem var(--gut-r) .7rem var(--gut); padding-top: max(.7rem, env(safe-area-inset-top, 0px));
  transition: background .25s, border-color .25s; border-bottom: 1px solid transparent; }
.bar.solid { background: color-mix(in srgb, var(--ink) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none;
  font: 800 1.15rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.brand img { width: 32px; height: 32px; border-radius: 6px; }
.nav { display: flex; gap: 1.4rem; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; }
.nav a:hover, .nav a[aria-current] { color: var(--text); }
.bar-cta { margin-left: .5rem; padding: .5rem .9rem; border: 1px solid var(--line-hi); border-radius: 3px; color: var(--text);
  text-decoration: none; font-size: .85rem; font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
.bar-cta:hover { border-color: var(--accent); }
@media (max-width: 40rem) { .nav { display: none; } .bar-cta { margin-left: auto; } }

/* buttons */
.acts { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .75rem 1.3rem; border-radius: 3px;
  font: 600 .95rem/1 var(--body); letter-spacing: .05em; text-transform: uppercase; text-decoration: none; }
.btn-hot { background: linear-gradient(#e0484b, var(--hot) 55%, #a52427); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 0 24px rgba(210,56,59,.35); }
.btn-gold { background: linear-gradient(var(--gold-hi), var(--gold) 55%, var(--gold-lo)); color: #1d1408; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 0 #6e4d14; }
.btn-line { border: 1px solid var(--line-hi); color: var(--text); }
.btn:hover { filter: brightness(1.08); }
.btn-line:hover { border-color: var(--accent); }

/* ---------- the first screen: words left, the DD mark right, smoke behind (stacked on a phone) ---------- */
.hero { position: relative; min-height: min(100svh, 62rem); overflow: hidden; isolation: isolate;
  background: radial-gradient(70% 60% at 72% 46%, rgba(119,21,21,.38), transparent 70%), var(--ink); }
.kicker { margin: 0; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--steel); }
.lede { margin: 0; color: var(--text); font-size: 1.1rem; max-width: 34rem; text-wrap: pretty; }
canvas.smoke, canvas.embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
canvas.smoke { z-index: -1; }
canvas.embers { z-index: 3; mix-blend-mode: screen; }
html[data-fx="middle"] canvas { display: none; }
.mark-grid { position: relative; z-index: 2; max-width: var(--w); margin: 0 auto; min-height: inherit; display: grid;
  grid-template-columns: 1.1fr 1fr; align-items: center; gap: 2rem; padding: 6rem var(--gut-r) 5rem var(--gut); }
.mark-words { display: grid; gap: 1.4rem; }
.hero h1 { margin: 0; font-weight: 900; font-size: clamp(3.6rem, 9.2vw, 8.6rem); line-height: .86; letter-spacing: .005em; }
.hero h1 span { display: block;
  background: linear-gradient(180deg, #f2f0ee 0%, #b9bcc2 48%, #6d7178 52%, #a7abb2 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero h1 .hot { background: linear-gradient(180deg, #ff6a5c 0%, var(--hot) 55%, #8f1b1d 100%); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 22px rgba(210,56,59,.45)); }
.mark-stage { perspective: 1000px; display: grid; place-items: center; }
.mark-tilt { position: relative; width: min(34rem, 42vw); aspect-ratio: 1; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.mark-img { position: absolute; inset: 0; width: 100%; height: 100%; transform: translateZ(30px);
  -webkit-mask-image: radial-gradient(closest-side, #000 48%, rgba(0,0,0,.55) 74%, transparent 100%); mask-image: radial-gradient(closest-side, #000 48%, rgba(0,0,0,.55) 74%, transparent 100%); }
.mark-glow { position: absolute; inset: -18%; transform: translateZ(-80px); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(210,56,59,.55), rgba(119,21,21,.35) 45%, transparent 75%); filter: blur(10px); animation: breathe 6s ease-in-out infinite; }
.mark-rim { position: absolute; inset: 6%; transform: translateZ(60px); border-radius: 50%; pointer-events: none;
  background: radial-gradient(60% 40% at 30% 20%, rgba(255,255,255,.08), transparent 70%); }
@keyframes breathe { 50% { opacity: .7; transform: translateZ(-80px) scale(.96); } }
.cue { position: absolute; z-index: 4; left: 50%; bottom: max(1.4rem, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  display: grid; justify-items: center; gap: .2rem; color: var(--text); text-decoration: none; font: 700 1rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; }
.cue span { font: 500 .7rem/1 var(--body); letter-spacing: .24em; color: var(--muted); }
.cue::after { content: ""; width: 1px; height: 2.2rem; margin-top: .5rem; background: linear-gradient(var(--hot), transparent); }
@media (max-width: 52rem) {
  .mark-grid { grid-template-columns: 1fr; padding-top: 5rem; gap: 0; align-content: center; }
  .mark-stage { order: -1; margin-bottom: -1rem; }
  .mark-tilt { width: min(19rem, 72vw); }
  .hero h1 { font-size: clamp(3.2rem, 15vw, 5.2rem); }
  .cue { display: none; }
}

/* ---------- home sections ---------- */
section { position: relative; }
.eyebrow { margin: 0 0 1rem; font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; color: var(--steel); display: flex; align-items: center; gap: .8rem; }
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.games { padding: 5rem 0 3rem; }

/* Ruin's Keep's panel, always in its own soot and gold */
.rk { position: relative; isolation: isolate; overflow: hidden; border-block: 1px solid #3a2e25; background: #120f0d; color: #ece3d2; }
.rk-art { position: absolute; inset: -8% 0; z-index: -1; background: url("/img/rk/hall.jpg") center / cover no-repeat; transform: translateY(var(--par, 0px)); }
.rk-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,15,13,.96) 0, rgba(18,15,13,.82) 42%, rgba(18,15,13,.25) 100%), linear-gradient(transparent 60%, rgba(18,15,13,.9)); }
.rk-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2rem; padding-top: 3.5rem; padding-bottom: 3rem; }
.rk-copy { display: grid; gap: 1rem; max-width: 34rem; justify-items: start; }
.rk-logo { width: min(24rem, 86%); height: auto; filter: drop-shadow(0 6px 18px rgba(0,0,0,.7)); }
.rk-motto { margin: 0; font: 700 1.25rem/1.3 var(--serif); letter-spacing: .04em; color: var(--gold); }
.rk-pitch { margin: 0; color: #ece3d2; }
.plats { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.plats li { padding: .25rem .6rem; border: 1px solid #3a2e25; border-radius: 3px; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: #a8977f; }
.plats li.on { color: #ece3d2; border-color: #6e5a3a; }
.rk .btn-line { border-color: #6e5a3a; color: #ece3d2; }
.rk .btn-line:hover { border-color: var(--gold); }
.rk-classes { display: grid; grid-template-columns: repeat(5, 4.2rem); gap: .6rem; margin: 0; padding: 0; list-style: none; }
.rk-classes li { display: grid; justify-items: center; gap: .3rem; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: #a8977f; }
.rk-classes img { width: 4.2rem; height: 4.2rem; }
@media (max-width: 52rem) {
  .rk-in { grid-template-columns: 1fr; }
  .rk-art::after { background: linear-gradient(rgba(18,15,13,.55), rgba(18,15,13,.92) 55%); }
  .rk-classes { grid-template-columns: repeat(5, 1fr); }
  .rk-classes img { width: 100%; height: auto; }
}

/* the tally: big numerals (after Lusion's count of awards) */
.tally { display: grid; grid-template-columns: repeat(4, 1fr); margin: 3rem 0 0; border-top: 1px solid var(--line); }
.tally div { padding: 1.4rem 1rem 1.2rem 0; border-bottom: 1px solid var(--line); }
.tally div + div { padding-left: 1.2rem; border-left: 1px solid var(--line); }
.tally dt { font: 900 clamp(3rem, 6vw, 5rem)/.9 var(--display); font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #f2f0ee, #8f939b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tally dd { margin: .5rem 0 0; color: var(--muted); font-size: .9rem; }
@media (max-width: 40rem) {
  .tally { grid-template-columns: 1fr 1fr; }
  .tally div:nth-child(3) { padding-left: 0; border-left: 0; }
}

/* the chapters: four doorways */
.chapters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 2.5rem 0 0; padding: 0; list-style: none; }
.chapters li { position: relative; isolation: isolate; overflow: hidden; border: 1px solid var(--line); border-radius: 3px; aspect-ratio: 3 / 4;
  display: flex; align-items: flex-end; padding: 1rem; font: 700 1.3rem/1.1 var(--display); text-transform: uppercase; letter-spacing: .04em; }
.chapters img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.chapters li::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(transparent 40%, rgba(0,0,0,.85)); }
.chapters span { position: absolute; top: .8rem; left: 1rem; font: 600 .85rem/1 var(--body); color: var(--accent); letter-spacing: .15em; }
.chapters li:hover img { transform: scale(1.05); }
@media (max-width: 52rem) { .chapters { grid-template-columns: 1fr 1fr; } .chapters li { aspect-ratio: 4 / 3; } }

/* updates: a ledger, newest first */
.updates { padding: 4rem 0; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.head h2 { margin: 0; font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; }
.head a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.head a:hover { color: var(--text); }
.ledger { border-top: 1px solid var(--line); }
.post { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: .3rem 2rem; padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.post time { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; padding-top: .3rem; }
.post h3 { margin: 0 0 .35rem; font-weight: 700; font-size: 1.45rem; line-height: 1.15; letter-spacing: .02em; }
.post p { margin: 0 0 .5rem; color: var(--muted); max-width: 70ch; }
.post p:last-child { margin-bottom: 0; }
.tag { display: inline-block; margin-left: .5rem; padding: .05rem .45rem; border: 1px solid var(--line-hi); border-radius: 3px; font: 600 .7rem/1.5 var(--body);
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent); vertical-align: .3em; }
@media (max-width: 40rem) { .post { grid-template-columns: 1fr; } }

/* the studio */
.studio { padding: 2rem 0 5rem; }
.studio-in { display: grid; grid-template-columns: 1fr 1.6fr; gap: 2rem; border-top: 1px solid var(--line); padding-top: 2rem; }
.studio h2 { margin: 0; font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; }
.studio p { margin: 0 0 1rem; max-width: 60ch; font-size: 1.05rem; }
@media (max-width: 40rem) { .studio-in { grid-template-columns: 1fr; } }

/* footer */
.foot { border-top: 1px solid var(--line); background: var(--ink-2); padding: 2rem 0 max(2rem, env(safe-area-inset-bottom, 0px)); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
/* the address is the link's own text, so it can be read and copied where no mail app opens it; a click also copies it
   (js/site.js) and says so above the link, fading in and out, without moving anything */
.foot .mail { position: relative; }
.foot .mail::after { content: "Address copied"; position: absolute; left: 50%; bottom: calc(100% + .3rem); transform: translateX(-50%); white-space: nowrap; padding: .1rem .5rem; line-height: 1.4; border: 1px solid var(--line-hi); border-radius: 3px; background: var(--ink); color: var(--text); font-size: .75rem; opacity: 0; pointer-events: none; transition: opacity .2s; }
.foot .mail[data-copied]::after { opacity: 1; }
.foot nav a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.foot nav a:hover { color: var(--text); }
.fine { margin: 0 0 0 auto; color: var(--muted); font-size: .8rem; }
@media (max-width: 40rem) { .fine { margin-left: 0; width: 100%; } }

/* ---------- the Ruin's Keep page: the game's own soot, bone and gold under the studio's bar ---------- */
body.rkp { --ink: #120f0d; --ink-2: #16120f; --line: #3a2e25; --line-hi: #6e5a3a; --text: #ece3d2; --muted: #a8977f; --steel: #a8977f; --accent: var(--gold); }
.rkp-hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); }
.rkp-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("/img/rk/hall.jpg") center 40% / cover no-repeat; filter: saturate(.85); }
.rkp-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 75% at 50% 35%, rgba(18,15,13,.3), rgba(18,15,13,.85) 65%, var(--ink) 100%); }
.rkp-hero .wrap { display: grid; justify-items: center; text-align: center; gap: 1rem; padding-top: 6.5rem; padding-bottom: 2.5rem; }
.rkp-hero .rk-logo { width: min(26rem, 84%); }
.rkp-hero .rk-motto { font-size: clamp(1.05rem, 2.6vw, 1.35rem); }
.rkp-hero .rk-pitch { max-width: 36rem; text-wrap: pretty; }
.rkp-hero .rk-classes { margin-top: .4rem; grid-template-columns: repeat(5, 3.6rem); }
.rkp-hero .rk-classes img { width: 3.6rem; height: 3.6rem; }
.build { margin: 0; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }
.rkp h2 { font: 700 clamp(1.6rem, 3.4vw, 2.2rem)/1.15 var(--serif); text-transform: none; letter-spacing: .04em; margin: 0 0 1.1rem; }
.rkp .post h3 { font: 700 1.1rem/1.3 var(--serif); text-transform: none; letter-spacing: .03em; }
.rkp .post p { color: #d6ccba; }
.dl { padding: 3rem 0 1rem; }
.slabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; }
.slab { background: linear-gradient(#251e18, #1c1713); border: 1px solid var(--line); border-radius: 4px; padding: 1.2rem; display: grid; gap: .7rem; align-content: start; min-width: 0; }
.slab h3 { margin: 0; font: 700 1.15rem/1.2 var(--serif); text-transform: none; letter-spacing: .04em; display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
.slab h3 small { font: 500 .8rem/1 var(--body); color: var(--muted); font-variant-numeric: tabular-nums; }
.slab .get { text-transform: none; letter-spacing: 0; font-size: 1rem; }
.slab ol { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: .9rem; display: grid; gap: .2rem; }
.later { margin: 1rem 0 0; color: var(--muted); font-size: .92rem; }
.later b { color: var(--text); font-weight: 600; }
.rkp .updates { padding-top: 2.5rem; }
.rkp .post { grid-template-columns: 8rem minmax(0, 1fr); }
@media (max-width: 40rem) { .rkp .post { grid-template-columns: 1fr; } .rkp-hero .rk-classes { grid-template-columns: repeat(5, 1fr); } .rkp-hero .rk-classes img { width: 100%; height: auto; } }

/* ---------- 404 ---------- */
.lost { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 6rem var(--gut-r) 3rem var(--gut);
  background: radial-gradient(60% 50% at 50% 40%, rgba(119,21,21,.3), transparent 70%), var(--ink); }
.lost > div { display: grid; justify-items: center; gap: 1rem; }
.lost img { width: 9rem; height: 9rem; -webkit-mask-image: radial-gradient(closest-side, #000 50%, transparent 100%); mask-image: radial-gradient(closest-side, #000 50%, transparent 100%); }
.lost h1 { margin: 0; font-weight: 900; font-size: clamp(3rem, 12vw, 6rem); line-height: .9; color: var(--text); }
.lost p { margin: 0; color: var(--muted); }

/* things that come in as you scroll */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .mark-glow { animation: none; }
  canvas.smoke, canvas.embers { display: none; }
  .mark-tilt, .chapters img { transition: none; }
}
