/* escapedsketches.com - dark room, paper, ink. One stylesheet, no outside loads. */
@font-face {
  font-family: "Caveat";
  src: url("/fonts/caveat.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #15110e;
  --dark: #110f0d;
  --dark-2: #1a1613;
  --paper: #efe7d6;
  --paper-2: #e2d7c0;
  --line: #9db3c9;
  --red: #c2362b;
  --gold: #e9c36a;
  --text: #ece4d4;
  --muted: #b5aa98;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--dark);
  color: var(--text);
  font: 17px/1.6 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--paper); color: var(--ink); padding: 8px 14px; }
.skip:focus { left: 16px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(720px, 100% - 32px); }

h2, h3, .kicker, .tagline, .status, .badges span { font-family: var(--hand); font-weight: 700; }
h2 { font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.05; margin: 0 0 .5em; color: #fff7e8; }
h3 { font-size: 1.7rem; line-height: 1.1; margin: 0 0 .25em; }
.kicker { color: var(--red); font-size: 1.5rem; margin: 0; letter-spacing: .02em; }
.lede { font-size: 1.2rem; color: #fff7e8; }
.sub { color: var(--muted); max-width: 46em; }

section { padding-block: clamp(56px, 9vw, 104px); }

/* hero: the game's own "right behind you" shot, darkened so the logo reads */
.hero { position: relative; min-height: min(92vh, 760px); display: grid; place-items: center; overflow: hidden; isolation: isolate;
  padding: max(48px, env(safe-area-inset-top, 0px)) 16px 64px; }
.hero picture, .hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse at 50% 42%, rgba(17,15,13,.55), rgba(17,15,13,.92) 70%), linear-gradient(to bottom, transparent 60%, var(--dark)); }
.hero-inner { text-align: center; max-width: 760px; }
.hero h1 { margin: 0; }
.logo { width: min(640px, 100%); margin-inline: auto; transform: rotate(-1.5deg); filter: drop-shadow(0 10px 24px rgba(0,0,0,.6)); }
.tagline { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.2; margin: 20px 0 12px; color: #fff7e8; text-shadow: 0 2px 12px #000; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 20px; }
.badges span { background: var(--paper); color: var(--ink); font-size: 1.3rem; padding: 0 14px; border-radius: 3px; transform: rotate(-1deg); box-shadow: 0 3px 8px rgba(0,0,0,.5); }
.badges span:nth-child(2) { transform: rotate(1deg); }
.status { display: inline-block; margin: 0; font-size: 1.7rem; color: var(--ink); background: var(--gold); padding: 2px 22px; border-radius: 3px;
  box-shadow: 0 4px 14px rgba(0,0,0,.6); transform: rotate(-1deg); }

/* the pitch on lined notebook paper */
.pitch { background: var(--dark); }
.pitch .wrap { background: var(--paper); color: var(--ink); padding: clamp(28px, 5vw, 52px);
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--line) 31px 32px);
  background-position: 0 14px; border-left: 3px double rgba(194,54,43,.6); box-shadow: 0 18px 40px rgba(0,0,0,.55); transform: rotate(-.4deg); }
.pitch h2 { color: var(--ink); }
.pitch .lede { color: var(--ink); }

/* shift steps: paper cards on the dark floor */
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); counter-reset: step; }
.steps li { counter-increment: step; background: var(--dark-2); border: 1px solid #3a322b; border-radius: 6px; padding: 22px 22px 18px; position: relative; }
.steps li::before { content: counter(step); position: absolute; top: -14px; left: 18px; font: 700 1.4rem/1 var(--hand); color: var(--ink); background: var(--gold);
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; }
.steps h3 { color: var(--gold); }
.steps p { margin: 0; color: var(--text); }

/* her drawings pinned up like sketchbook pages */
.drawn { background: linear-gradient(var(--dark), #18140f 30%, var(--dark)); }
.pages { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
@media (max-width: 420px) { .pages { gap: 14px; } .pages li { padding: 6px; } }
.pages li { background: var(--paper); padding: 10px; border-radius: 2px; box-shadow: 0 12px 26px rgba(0,0,0,.55); transform: rotate(-1.5deg); }
.pages li:nth-child(2n) { transform: rotate(1.5deg); }
.pages li:nth-child(3n) { transform: rotate(-.5deg); }

/* screenshots */
.gallery { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.gallery a { display: block; border-radius: 4px; overflow: hidden; border: 1px solid #3a322b; }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .25s ease; }
.gallery a:hover img { transform: scale(1.03); }

/* where it stands */
.stands .wrap { border: 2px dashed #4a4037; border-radius: 8px; padding: clamp(24px, 4vw, 40px); }
.todo { padding-left: 1.2em; }
.todo li { margin: .2em 0; }
.stands .status { margin-top: 12px; }

/* link to twikoi.com */
.twikoi { text-align: center; padding-top: 0; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 22px; }
.button { display: inline-block; font: 700 1.5rem/1 var(--hand); text-decoration: none; color: var(--ink); background: var(--paper);
  padding: 12px 24px; border-radius: 4px; box-shadow: 0 6px 16px rgba(0,0,0,.5); }
.button:hover { background: #fff7e8; }
.button.ghost { background: transparent; color: var(--paper); border: 2px solid var(--paper); box-shadow: none; }
.button.ghost:hover { background: rgba(239,231,214,.1); }

/* footer */
.foot { border-top: 1px solid #2c261f; padding: 40px 0 max(48px, env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: .95rem; }
.foot details { margin: 10px 0; }
.foot summary { cursor: pointer; color: var(--text); }
.fine { font-size: .85rem; }

/* picture viewer */
#viewer { padding: 0; border: 0; background: transparent; max-width: min(1280px, 96vw); }
#viewer::backdrop { background: rgba(0,0,0,.85); }
#viewer img { max-height: 88vh; max-width: 96vw; width: auto; height: auto; margin: auto; border-radius: 4px; }
#viewer .close { position: absolute; top: 6px; right: 8px; font-size: 2rem; line-height: 1; background: var(--paper); color: var(--ink); border: 0;
  border-radius: 50%; width: 44px; height: 44px; cursor: pointer; }

/* 404 */
.lost { min-height: 80vh; display: grid; place-items: center; text-align: center; padding: 48px 16px; }
.lost .logo { width: min(420px, 100%); }
