/* retrogame.studio. No web fonts, no scripts, no animation. */
:root {
  --paper: #f4f2ea;
  --ink: #17252b;
  --cobalt: #214acb;
  --muted: #46545a;
  --rule: #c9c9c0;
  --panel: #e3e5df;
  --sans: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", "Nimbus Sans", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
  --gutter: clamp(1rem, 4.4vw, 4rem);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  overflow-wrap: break-word;
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.025em; }
p { margin: 0 0 1rem; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
.wrap { width: 100%; max-width: 90rem; margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: absolute; left: 1rem; top: -10rem; z-index: 2; padding: 0.75rem 1rem; background: var(--ink); color: #fff; }
.skip-link:focus { top: 1rem; }

.eyebrow {
  margin: 0 0 1rem;
  font: 700 0.8125rem/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cobalt);
}
.button {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border: 2px solid var(--cobalt);
  background: var(--cobalt);
  color: #fff;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}
.button:hover { background: #1a3ba6; border-color: #1a3ba6; }
.text-link { font-weight: 700; }
.owner-input {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border: 2px dashed #7a1d00;
  background: #ffe7a3;
  color: #3d1000;
  font: 700 0.875rem/1.4 var(--mono);
}

/* Header */
.site-header .header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--rule);
}
/* Pixel wordmark (119x8 grid): whole-pixel scales only, so it stays sharp. */
.wordmark { display: block; flex: none; }
.wordmark img { width: 357px; height: 24px; image-rendering: pixelated; }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 2.25rem; }
.site-header nav a:not(.button) { text-decoration: none; font-size: 0.9375rem; }
.site-header nav a:not(.button):hover { text-decoration: underline; }
.nav-cta { font-size: 0.9375rem; padding: 0.7rem 1.75rem; margin-left: 1rem; }

/* Hero */
.hero { display: grid; gap: 2.5rem 4rem; padding-block: clamp(2rem, 5vw, 3rem) clamp(2.5rem, 5vw, 3.5rem); }
.hero h1 { font-size: clamp(2.5rem, 1.1rem + 4.6vw, 4.75rem); line-height: 1.03; letter-spacing: -0.035em; max-width: 7.4em; }
.hero h1 .accent { display: block; color: var(--cobalt); }
.lead { max-width: 30em; margin-top: 1.5rem; font-size: 1.1875rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 2rem; }
.screen { margin: 0; padding: 1.25rem 1.25rem 1rem; background: var(--ink); color: #fff; }
.screen-label { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; font: 700 0.75rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.motif-dots { display: inline-flex; gap: 4px; }
.motif-dots i { width: 9px; height: 9px; background: #fff; }
.motif-dots i:last-child { background: #5f82ff; }
.screen img { width: 100%; aspect-ratio: 4 / 3; image-rendering: auto; }
.screen figcaption { margin-top: 0.75rem; font-size: 0.8125rem; line-height: 1.5; }
.caption-title { display: block; text-transform: uppercase; letter-spacing: 0.02em; }
.media-note { margin-top: 1.25rem; color: var(--muted); font-size: 0.9375rem; }

/* Occasions */
.uses { border-block: 1px solid var(--rule); }
.wrap.uses-list { list-style: none; margin-block: 0; }
.uses-list { display: grid; gap: 0.5rem 2rem; padding-block: 1.5rem; font: 700 0.8125rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }

/* Sections */
.split { display: grid; gap: 1.5rem 4rem; align-items: start; }
section.split, .work, .process { padding-block: clamp(3rem, 7vw, 4.5rem); border-bottom: 1px solid var(--rule); }
h2 { font-size: clamp(2rem, 1.35rem + 2.4vw, 3rem); letter-spacing: -0.035em; }
.prose { max-width: 34em; font-size: 1.125rem; }
.prose p:last-child { margin-bottom: 0; }
.strong { font-weight: 700; font-size: 1rem; }
.machines h3 { margin: 1.75rem 0 0.5rem; font-size: 1.375rem; letter-spacing: -0.02em; }
.machines .prose > h3:first-child { margin-top: 0; }
.aside { margin-top: 1.75rem; color: var(--muted); font-size: 1rem; }
/* A candid development photo, presented like a print from the archive. */
/* Polaroid: even white border with a deep bottom edge for the note and a
   soft shadow. Kept straight: rotated text renders badly in some browsers. */
.snapshot { max-width: 32rem; margin: 2.25rem 0 0.5rem; padding: 0.9rem 0.9rem 0; background: #fdfdfb; box-shadow: 0 1px 2px rgb(23 37 43 / 0.2), 0 10px 28px rgb(23 37 43 / 0.14); }
.snapshot img { width: 100%; image-rendering: auto; box-shadow: inset 0 0 0 1px rgb(23 37 43 / 0.08); }
.snapshot figcaption { padding: 1rem 0.25rem 1.6rem; color: var(--muted); font-size: 0.875rem; line-height: 1.5; }
.snapshot-label { display: block; margin-bottom: 0.25rem; color: var(--ink); font: 700 0.75rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
[id] { scroll-margin-top: 1rem; }

.work-grid { display: grid; gap: 2.5rem 2rem; margin-top: 2.5rem; }
.work-item { display: flex; flex-direction: column; }
.work-item:focus-visible { outline-offset: 6px; }
.work-frame { display: grid; place-items: center; padding: clamp(0.75rem, 3vw, 1.5rem); background: var(--panel); }
.work-frame img, .work-frame video { width: 100%; max-width: 40rem; }
.pixels { image-rendering: pixelated; }
.work-caption { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; margin-top: 1rem; }
.work-caption h3 { font-size: 1.375rem; letter-spacing: -0.02em; }
.meta { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.9375rem; }

.process .eyebrow { margin-bottom: 1.75rem; }
.steps { display: grid; gap: 2rem 3rem; margin: 0; padding: 0; list-style: none; }
.steps h3 { font-size: 1.5rem; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.steps p { margin: 0; max-width: 24em; }

/* Contact */
.contact { background: var(--cobalt); color: #fff; }
.contact .split { padding-block: clamp(3rem, 7vw, 4.5rem); }
.contact .eyebrow { color: #fff; }
.contact h2 { font-size: clamp(2.25rem, 1.4rem + 3vw, 3.25rem); }
.contact :focus-visible { outline-color: #fff; }
.button-light { background: #fff; border-color: #fff; color: var(--cobalt); margin-top: 0.5rem; }
.button-light:hover { background: var(--paper); border-color: var(--paper); }
.email { margin-top: 0.5rem; font-size: 1rem; }
.email-address { font-weight: 700; user-select: text; -webkit-user-select: text; }

/* Footer */
.site-footer .footer-inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.75rem 2rem; padding-block: 2rem 2.5rem; font-size: 0.9375rem; }
.site-footer p { margin: 0; }
.footer-name { font-weight: 700; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
.footer-operator { flex-basis: 100%; color: var(--muted); font-size: 0.875rem; }

/* Enlarge on click: a popover per image (no JavaScript) */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.zoom { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; color: inherit; cursor: zoom-in; }
.work-frame .zoom { max-width: 40rem; }
.zoom img { width: 100%; }
.viewer { margin: auto; padding: 1rem; border: 0; background: var(--ink); color: #fff; max-width: 96vw; max-height: 96vh; overflow: auto; }
.viewer::backdrop { background: rgb(23 37 43 / 0.85); }
.viewer img { width: min(calc(96vw - 2rem), 80rem, calc((90vh - 5rem) * var(--ar))); max-width: none; height: auto; }
.viewer-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1rem; margin-top: 0.75rem; font-size: 0.875rem; }
.viewer-bar p { margin: 0; }
.viewer-close { padding: 0.5rem 1.25rem; border: 0; background: #fff; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.viewer :focus-visible { outline-color: #fff; }

/* Supporting pages */
.page { max-width: 48rem; margin-inline: 0; padding-block: clamp(2.5rem, 6vw, 4.5rem); margin-inline: auto; }
.page h1 { font-size: clamp(2.25rem, 1.4rem + 3vw, 3.5rem); }
.page h2 { font-size: 1.5rem; margin: 2.25rem 0 0.75rem; letter-spacing: -0.02em; }
.company-details { margin: 1rem 0 0; }
.company-details dt { font-weight: 700; }
.company-details dd { margin: 0 0 0.5rem; }
@media (min-width: 40rem) {
  .company-details { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1.5rem; }
  .company-details dd { margin: 0; }
}
/* 404: the pixel title (71x51 grid) at whole-pixel scales. */
.title-screen { width: 213px; height: 153px; margin-bottom: 2rem; image-rendering: pixelated; }
.page-links { margin: 1.5rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.75rem; }

@media (min-width: 40rem) {
  .uses-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .uses-list li:nth-child(2) { text-align: center; }
  .uses-list li:nth-child(3) { text-align: right; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 56rem) {
  .title-screen { width: 284px; height: 204px; }
  .hero { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .contact .split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .work-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .work-video { grid-column: 1 / -1; }
}
@media (max-width: 39.99rem) {
  .wordmark img { width: 238px; height: 16px; }
  .site-header .header-inner { padding-block: 1.25rem 1rem; }
  .site-header nav { width: 100%; justify-content: space-between; gap: 0.5rem 1rem; }
  .nav-cta { margin: 0; padding: 0; border: 0; background: none; color: var(--ink); font-weight: 400; text-decoration: underline; }
  .nav-cta:hover { background: none; }
  .actions { flex-direction: column; align-items: stretch; text-align: center; }
  .steps li { max-width: none; }
}
@media (min-width: 72rem) {
  .wordmark img { width: 476px; height: 32px; }
}
@media (forced-colors: active) {
  .snapshot { border: 1px solid CanvasText; }
  .button { border: 2px solid ButtonText; }
  .motif-dots i { background: CanvasText; }
}

/* The full address a printed QR code opens (privacy page): a few hundred digits, so it wraps anywhere. */
.qr-url code {
  overflow-wrap: anywhere;
  word-break: break-all;
}
