/* crookedpins.com (ADR-029). Colours are the game's palette (data/palette.json): amber for the
   logo and the lights, brass for the frame, and red only for the House (ADR-020). */

@font-face {
  font-family: "Limelight";
  src: url("/fonts/Limelight-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "VT323";
  src: url("/fonts/VT323-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --soot: #0d0a0b;
  --back-room: #1c1517;
  --walnut: #3b2418;
  --dull-brass: #6b5220;
  --brass: #a07d32;
  --worn-brass: #d1ab4f;
  --brass-glint: #f2dc8a;
  --house-red: #d9412e;
  --old-paper: #cfb878;
  --yellowed-paper: #e8d9a8;
  --paper: #f4ecd2;
  --ash: #8a8f91;
  --ember: #ff7a1a;
  --bulb: #ffd23f;
  --display: "Limelight", Georgia, serif;
  --mono: "VT323", ui-monospace, monospace;
  --body: Georgia, "Times New Roman", serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--soot);
  color: var(--yellowed-paper);
  font: 1.125rem/1.65 var(--body);
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--bulb); text-underline-offset: 3px; }
a:hover { color: var(--brass-glint); }
:focus-visible { outline: 2px solid var(--bulb); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 16px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.house { color: var(--house-red); }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0 0 0.5em; }
h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  background: linear-gradient(var(--bulb), var(--ember));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.label {
  font-family: var(--mono);
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--worn-brass);
  margin: 0 0 0.35em;
}

/* The hero: the House's cabinet in the parlour, fading into the page under the logo. */
.hero { position: relative; overflow: hidden; }
.hero-scene { position: relative; height: clamp(260px, 36vw, 520px); }
.hero-scene img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 10, 11, 0) 45%, var(--soot) 100%);
}
.hero-body { position: relative; text-align: center; margin-top: clamp(-150px, -11vw, -40px); padding-bottom: 24px; }
.logo { width: min(440px, 84vw); margin: 0 auto; }
.logo img { width: 100%; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.85)); }
.tagline {
  max-width: 32ch;
  margin: 0.75rem auto 1.5rem;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  line-height: 1.4;
  color: var(--paper);
}
.tagline em { color: var(--old-paper); }
.hero .label { color: var(--ash); font-size: 1.25rem; }

.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 1.25rem; }
.btn {
  display: inline-block;
  padding: 14px 22px 11px;
  border: 2px solid var(--brass);
  border-radius: 2px;
  background: rgba(13, 10, 11, 0.6);
  color: var(--brass-glint);
  font-family: var(--mono);
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}
a.btn:hover { border-color: var(--bulb); color: var(--bulb); }
.btn-primary {
  border-color: var(--bulb);
  background: linear-gradient(var(--bulb), var(--ember));
  color: var(--soot);
  box-shadow: 0 0 24px rgba(255, 122, 26, 0.35);
}
a.btn-primary:hover { color: var(--soot); filter: brightness(1.08); }
.btn-soon { border-style: dashed; border-color: var(--dull-brass); color: var(--ash); cursor: default; }

/* The cut, framed like the cabinet: walnut, brass and a chase of bulbs. */
.film { margin-top: 16px; }
.cabinet {
  padding: 8px 10px;
  border: 2px solid var(--brass);
  border-radius: 4px;
  background: linear-gradient(var(--walnut), #2a1810);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 0 0 2px var(--soot);
}
.bulbs {
  height: 14px;
  margin: 2px 0;
  background-image:
    radial-gradient(circle, var(--bulb) 0 3.5px, transparent 4.5px),
    radial-gradient(circle, var(--dull-brass) 0 3px, transparent 4px);
  background-size: 28px 14px, 14px 14px;
  background-repeat: repeat-x;
  animation: chase 1.2s steps(2) infinite;
}
@keyframes chase { to { background-position: 28px 0, 0 0; } }
.screen { position: relative; aspect-ratio: 16 / 9; background: #000; }
.screen video { width: 100%; height: 100%; }
.play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  background: linear-gradient(rgba(13, 10, 11, 0.1), rgba(13, 10, 11, 0.6));
  color: var(--paper);
  font-family: var(--mono);
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.play[hidden] { display: none; }
.play-icon {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(var(--bulb), var(--ember));
  box-shadow: 0 0 30px rgba(255, 122, 26, 0.5);
  transition: transform 0.15s;
}
.play-icon::after {
  content: "";
  position: absolute;
  left: 33px;
  top: 26px;
  border-left: 26px solid var(--soot);
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
}
.play:hover .play-icon { transform: scale(1.06); }
.play-text { padding: 4px 10px 2px; background: rgba(13, 10, 11, 0.75); }

.story { max-width: 720px; padding-block: 72px 32px; text-align: center; }
.story p:not(.label) { margin: 0 0 1em; }

/* Bribe, Block, Accept: the ledge's three answers, with their keys. */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.card {
  position: relative;
  padding: 24px 22px 20px;
  border: 1px solid #3a2a22;
  border-top: 3px solid var(--brass);
  background: var(--back-room);
}
.card h3 { margin-bottom: 0.15em; font-size: 2.125rem; color: var(--paper); }
.card p:last-child { margin: 0.5em 0 0; }
.key {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 4px 9px 2px;
  border-radius: 2px;
  background: var(--old-paper);
  color: var(--soot);
  font-family: var(--mono);
  font-size: 1.25rem;
  line-height: 1;
}

.feature { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 40px; padding-top: 80px; }
.feature-flip .feature-shot { order: 2; }
.feature-shot { margin: 0; border: 2px solid var(--dull-brass); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6); transition: border-color 0.15s; }
.feature-shot:hover { border-color: var(--bulb); }
.feature-shot a { display: block; }
.feature-text p:not(.label) { margin: 0 0 1em; }

.history { padding-block: 88px 16px; }
.history blockquote {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 0;
  border-block: 1px solid var(--dull-brass);
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  font-style: italic;
  line-height: 1.5;
  text-align: center;
  color: var(--paper);
}
.history blockquote p { margin: 0; }

.facts ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 48px 0 0; padding: 0; list-style: none; }
.facts li { padding-left: 16px; border-left: 2px solid var(--brass); font-size: 1rem; }
.facts strong { display: block; color: var(--paper); }

.gallery { padding-top: 96px; }
.gallery h2 { text-align: center; }
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.shot-wide { grid-column: 1 / -1; }
.shots a { display: block; border: 2px solid var(--dull-brass); transition: border-color 0.15s; }
.shots a:hover { border-color: var(--bulb); }

.closing { padding-block: 104px 48px; text-align: center; }
.closing p { color: var(--old-paper); }

.footer { padding-block: 24px 40px; border-top: 1px solid #2a1f1c; font-size: 0.9rem; text-align: center; color: var(--ash); }
.footer p { margin: 0.25em 0; }
.footer a { color: var(--old-paper); }

/* A screenshot at full size over the page. */
.viewer {
  /* As wide as fits, keeping the 16:9 shot inside the window's height. */
  width: min(96vw, 1600px, calc((100vh - 48px) * 16 / 9));
  max-width: none;
  padding: 0;
  border: 2px solid var(--brass);
  background: var(--soot);
}
.viewer::backdrop { background: rgba(13, 10, 11, 0.92); }
.viewer img { width: 100%; }
.viewer-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--brass);
  background: rgba(13, 10, 11, 0.8);
  color: var(--paper);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

/* The 404 page: a dead machine. */
.out-of-order { min-height: 100vh; display: grid; place-content: center; gap: 8px; text-align: center; }
.out-of-order .note {
  display: inline-block;
  margin: 0 auto 16px;
  padding: 12px 20px 8px;
  transform: rotate(-4deg);
  background: var(--old-paper);
  color: var(--house-red);
  font-family: var(--mono);
  font-size: 2.5rem;
  line-height: 1;
}

@media (max-width: 760px) {
  .cards, .facts ul { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; gap: 20px; padding-top: 56px; }
  .feature-flip .feature-shot { order: 0; }
  .story { padding-top: 56px; }
  .gallery { padding-top: 72px; }
  .closing { padding-top: 80px; }
}
@media (max-width: 560px) {
  .shots { grid-template-columns: 1fr; }
  .btn { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .bulbs { animation: none; }
  .play-icon, .shots a, .feature-shot { transition: none; }
}
