/* ABOUTME: Styles the Crazy Construction information, support and privacy pages. */
/* ABOUTME: 1-bit ink on paper with a 12 px blueprint grid (the game's cell size) and one hi-vis accent. */
:root {
  --ink: #1c1d1a;
  --ink-soft: #4a4c45;
  --paper: #f1eee5;
  --sheet: #fbfaf6;
  --rule: #cfcabb;
  --grid: #e3dfd2;
  --hivis: #b5400f;
  --focus: #1d5fa8;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  color: var(--ink);
  background: var(--paper);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 100%;
  line-height: 1.6;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); }
figure, h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
a { color: inherit; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
p + p { margin-top: 1rem; }
img { display: block; max-width: 100%; height: auto; }
.pixel { image-rendering: pixelated; }
.wrap { width: min(100% - 5rem, 72rem); margin-inline: auto; }

.skip-link { position: absolute; top: -8rem; left: 1rem; padding: 0.8rem; background: var(--sheet); z-index: 1; }
.skip-link:focus { top: 0.5rem; }

.site-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1.5rem; min-height: 5.5rem; border-bottom: 2px solid var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; min-height: 44px; font-weight: 700; text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.site-header nav { display: flex; gap: 1.5rem; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.9rem; font-weight: 600; }
.site-header nav a[aria-current] { text-decoration-thickness: 2px; }

.eyebrow { font-family: var(--mono); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-soft); margin-bottom: 1rem; }
h1, h2 { font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
h1 { font-size: clamp(2.8rem, 6vw, 4.6rem); margin-bottom: 1.25rem; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.1rem; line-height: 1.35; margin-bottom: 0.6rem; }
.lead { font-size: 1.2rem; font-weight: 600; line-height: 1.45; }

/* The hero sits on a blueprint sheet whose grid squares are the game's 12 px cells. */
.hero-band {
  background-color: var(--sheet);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 12px 12px;
  border-bottom: 2px solid var(--ink);
}
.hero { display: grid; grid-template-columns: 0.9fr 1.1fr; align-items: center; gap: 3.5rem; padding-block: 4.5rem; }
.intro > p:not(.eyebrow, .small-note) { max-width: 33rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.4rem; margin-top: 1.8rem; }
/* Panic's badge, unaltered and with clear space around it, as its usage rules ask. */
.badge { display: inline-flex; border-radius: 9px; }
.badge img { width: 197px; height: auto; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.95rem; font-weight: 600; }
.small-note { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft); margin-top: 1rem; }

.screen { min-width: 0; padding: 0.75rem; background: var(--ink); border-radius: 6px; box-shadow: 0 18px 40px #1c1d1a26; }
.screen-label { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0 0.2rem 0.6rem; color: #d9d6cc; font-family: var(--mono); font-size: 0.75rem; }
.screen img { width: 100%; background: #fff; }
.screen figcaption { color: #d9d6cc; font-size: 0.8rem; padding: 0.6rem 0.2rem 0; }

.section { padding-block: 4rem; }
.section + .section { border-top: 1px solid var(--rule); }
.section-heading { margin-bottom: 2.5rem; max-width: 40rem; }
.section-heading .eyebrow { margin-bottom: 0.6rem; }
.section-heading p:not(.eyebrow) { margin-top: 1rem; color: var(--ink-soft); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; padding: 0; list-style: none; counter-reset: step; }
.steps li { border-top: 2px solid var(--ink); padding-top: 1.1rem; counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--mono); font-size: 0.8rem; font-weight: 600; color: var(--hivis); margin-bottom: 0.6rem; }
.steps p { color: var(--ink-soft); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
/* Gameplay at its native 400 px (whole-pixel scale keeps 1-bit art sharp). Multiplying the white
   paper onto a grey backing makes it read as the Playdate's reflective LCD rather than a white box. */
.gameplay { justify-self: center; width: min(100%, calc(400px + 1.5rem)); }
.lcd { background: #c3c4be; }
.lcd img { mix-blend-mode: multiply; }
/* How it plays: two screenshots, overlapped and staggered, beside the steps. */
.how { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3.5rem; align-items: center; }
.shots { display: grid; }
.shots .screen { width: min(78%, calc(400px + 1.5rem)); }
.shots .screen + .screen { justify-self: end; margin-top: -22%; position: relative; }
.how .steps { grid-template-columns: 1fr; gap: 2rem; }

.install { background: var(--sheet); border-block: 2px solid var(--ink); }
.install ol { display: grid; gap: 1rem; max-width: 44rem; padding-left: 1.4rem; }
.install li::marker { font-family: var(--mono); font-weight: 700; }
.note { margin-top: 1.5rem; max-width: 44rem; font-size: 0.9rem; color: var(--ink-soft); }

.fine-print { max-width: 46rem; font-size: 0.9rem; color: var(--ink-soft); border-top: 1px solid var(--rule); padding-top: 1.25rem; }

.policy { max-width: 46rem; padding-block: 4rem; }
.policy h2 { font-size: 1.5rem; margin-block: 2.25rem 0.75rem; }
.policy ul { padding-left: 1.3rem; }
.policy li + li { margin-top: 0.4rem; }
.policy .effective { font-family: var(--mono); font-size: 0.85rem; color: var(--ink-soft); }

.site-footer { background: var(--ink); color: var(--paper); padding-block: 1.5rem; }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem 2rem; }
.footer-content p { font-size: 0.9rem; }
.footer-content nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.6rem; }
.footer-content nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.9rem; }
.site-footer a:focus-visible { outline-color: #8fb6e6; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 2.5rem; padding-block: 3rem; }
  .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .how { grid-template-columns: 1fr; gap: 2.5rem; }
  .shots { max-width: 34rem; }
  .steps { gap: 1.5rem; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 2rem); }
  .steps { grid-template-columns: 1fr; }
  .section { padding-block: 2.75rem; }
  .screen-label { flex-wrap: wrap; }
  .controls { grid-template-columns: 1fr; }
  .controls dt { border-bottom: 0; padding-bottom: 0; }
  .footer-content { flex-direction: column; align-items: flex-start; }
}
