/* Desktop Destruction's site: the game's retro UI kit (RetroTheme) in CSS.
   Windows with a blue title bar and the ✕ only, a grey bevelled face and a
   status bar, on the game's dark backdrop; Chakra Petch Bold for titles,
   nav and buttons. The pointer is the hand tool, pointing: drawn by
   cursor.js at 64 px with a mouse, else the 32 px cursor image below. */

@font-face {
  font-family: "Chakra Petch";
  src: url(fonts/ChakraPetch-Bold.ttf) format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --grey: #C3C3C3;
  --light: #FFFFFF;
  --dark: #3A3A3A;
  --shadow: #808080;
  --title: #0A2AA8;
  --backdrop: #1E2126;
  --cyan: #34E0E8;
  --green: #3CCB5A;
  --pink: #D9707A;
  --ink: #101010;
  --raised: inset 1px 1px 0 var(--light), inset -1px -1px 0 var(--dark), inset 2px 2px 0 #E6E6E6, inset -2px -2px 0 var(--shadow);
  --sunk: inset 1px 1px 0 var(--dark), inset -1px -1px 0 var(--light), inset 2px 2px 0 var(--shadow), inset -2px -2px 0 #E6E6E6;
}

* { box-sizing: border-box; }

html {
  cursor: url(img/cursor.png) 1 1, auto;
  cursor: image-set(url(img/cursor.png) 1x, url(img/cursor@2x.png) 2x) 1 1, auto;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  background: var(--backdrop);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* The backdrop: the trailer's desktop, out of focus and dimmed behind the
   windows, still while the page scrolls; over it a dark wash (deeper at the
   top and the foot, where the type sits on it) and a vignette. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background: url(img/backdrop.jpg) center / cover no-repeat;
  filter: blur(6px) saturate(1.3) brightness(0.82);
  transform: scale(1.06); /* (the blur's soft edge kept off the screen) */
}
body::after {
  background:
    radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(10, 12, 18, 0.6) 100%),
    linear-gradient(180deg, rgba(14, 16, 22, 0.72) 0%, rgba(14, 16, 22, 0.18) 20%, rgba(14, 16, 22, 0.18) 75%, rgba(14, 16, 22, 0.7) 100%);
}

/* The page's own pointer (cursor.js): the hand at 64 px, drawn over
   everything, the system cursor hidden once it shows. */
html.has-hand, html.has-hand * { cursor: none !important; }

.hand-pointer {
  position: fixed;
  left: 0;
  top: 0;
  width: 64px;
  height: 64px;
  pointer-events: none;
  z-index: 2147483647;
  opacity: 0;
  will-change: transform;
}
.hand-pointer.shown { opacity: 1; }
.hand-pointer img {
  display: block;
  width: 64px;
  height: 64px;
  transform-origin: 3px 1px;
  transition: transform 60ms ease-out;
}
.hand-pointer.pressed img { transform: scale(0.86) rotate(-6deg); }

a, button, summary, label {
  cursor: url(img/cursor.png) 1 1, pointer;
  cursor: image-set(url(img/cursor.png) 1x, url(img/cursor@2x.png) 2x) 1 1, pointer;
}

a { color: var(--title); overflow-wrap: anywhere; }
a:hover { color: #071B70; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

h1, h2, h3, .brand, .nav a, .button, .titlebar {
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-weight: 700;
}

/* The masthead: the game's name and the nav, a bar of retro buttons. */
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--light);
  font-size: 1.5rem;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.brand:hover { color: var(--cyan); }
.brand img { image-rendering: auto; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav a, .button {
  display: inline-block;
  padding: 7px 14px 6px;
  background: var(--grey);
  box-shadow: var(--raised);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
}
.nav a:hover, .button:hover { color: var(--title); }
.nav a:active, .button:active { box-shadow: var(--sunk); }
.nav a.current { box-shadow: var(--sunk); background: var(--cyan); }

.button.primary { background: var(--title); color: var(--light); }
.button.primary:hover { color: var(--cyan); }

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 24px;
}

.lead {
  color: #E8EAEE;
  font-size: 1.1rem;
  margin: 4px 0 20px;
}

/* A retro window: the blue title bar with the ✕ only, the grey face, the
   status bar. */
.window {
  background: var(--grey);
  box-shadow: var(--raised), 0 18px 40px rgba(0, 0, 0, 0.45);
  padding: 3px;
  margin: 0 0 22px;
}

.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--title);
  color: var(--light);
  padding: 4px 4px 4px 10px;
}
.titlebar h1, .titlebar h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.titlebar .close {
  flex: none;
  width: 24px;
  height: 22px;
  display: grid;
  place-items: center;
  background: var(--grey);
  box-shadow: var(--raised);
  color: var(--ink);
  font: 700 0.8rem/1 system-ui, sans-serif;
}

/* A window closed till clicked (the credits): its title bar opens it, a
   + / – box (in the ✕'s place) says which. */
details.window > summary.titlebar { list-style: none; }
details.window > summary.titlebar::-webkit-details-marker { display: none; }
details.window > summary.titlebar:hover { background: #1438C8; }
details.window:not([open]) { padding-bottom: 3px; }
.titlebar .toggle {
  flex: none;
  width: 24px;
  height: 22px;
  display: grid;
  place-items: center;
  background: var(--grey);
  box-shadow: var(--raised);
  color: var(--ink);
  font: 700 0.95rem/1 system-ui, sans-serif;
}
.titlebar .toggle::before { content: "+"; }
details[open] > .titlebar .toggle::before { content: "–"; }

.content { padding: 14px 18px 16px; overflow-wrap: break-word; }
.content > :first-child { margin-top: 0; }
.content > :last-child { margin-bottom: 0; }
.content h3 { margin: 22px 0 6px; font-size: 1.05rem; }
.content ul { padding-left: 1.3em; }
.content li { margin: 3px 0; }

.statusbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  padding: 4px 8px;
  box-shadow: var(--sunk);
  font-size: 0.85rem;
  color: #2A2A2A;
}
.statusbar .info {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--title);
  color: var(--light);
  font: 700 0.75rem/1 Georgia, serif;
}

/* A sunk well (screenshots, key tables). */
.well {
  box-shadow: var(--sunk);
  padding: 4px;
  background: #A9A9A9;
}

.hero { display: grid; gap: 14px; }
.hero img, .shots img { display: block; width: 100%; height: auto; }

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.shots figure { margin: 0; }
.shots figcaption { font-size: 0.85rem; padding: 6px 2px 0; }

.tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  padding: 0;
  list-style: none;
}
.tools li {
  margin: 0;
  padding: 8px;
  background: #D4D4D4;
  box-shadow: var(--raised);
  text-align: center;
  font-size: 0.85rem;
}
.tools img { display: block; width: 72px; height: 72px; margin: 0 auto 4px; }
.tools strong { display: block; font-family: "Chakra Petch", system-ui, sans-serif; font-size: 0.95rem; }
.tools .group { display: block; color: #4A4A4A; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }

.keys {
  width: 100%;
  border-collapse: collapse;
  background: #D4D4D4;
  box-shadow: var(--sunk);
  font-size: 0.95rem;
}
.keys th, .keys td { text-align: left; vertical-align: top; padding: 6px 10px; }
.keys tr + tr td, .keys tr + tr th { border-top: 1px solid #B0B0B0; }
.keys th { width: 32%; white-space: nowrap; }

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 1px 6px;
  background: #E8E8E8;
  box-shadow: var(--raised);
  font: 700 0.8rem/1.5 "Chakra Petch", system-ui, sans-serif;
  text-align: center;
  color: var(--ink);
}

.content table:not(.keys) {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  background: #D4D4D4;
  box-shadow: var(--sunk);
  font-size: 0.85rem;
}
.content table:not(.keys) th, .content table:not(.keys) td { text-align: left; vertical-align: top; padding: 5px 8px; border-top: 1px solid #B0B0B0; }

code {
  overflow-wrap: anywhere;
  font-size: 0.9em;
}

.notice {
  padding: 10px 14px;
  background: #FFF4C2;
  box-shadow: var(--sunk);
}

.footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 16px 28px;
  color: #9AA0AA;
  font-size: 0.85rem;
}
.footer a { color: #C8CCD4; }

@media (max-width: 600px) {
  body { font-size: 15px; }
  .masthead { padding: 14px 10px; }
  main { padding: 0 8px 16px; }
  .content { padding: 12px 12px 14px; }
  .shots { grid-template-columns: 1fr; }
  .keys th { width: auto; white-space: normal; }
}
