/*
 * guezzer.com — "Pop arcade" styles. One file, no build step, no external resources.
 * Cream background, 2px ink outlines, hard offset shadows, chunky rounded corners.
 * Mobile first: base rules target phones, min-width queries add columns.
 *
 * Pages link this file as assets/site.css?v=<hash>. After editing it, run
 * scripts/stamp-assets.sh so browsers pick up the new version (see README).
 */

:root {
  --cream: #fff4de;
  --paper: #fffdf7;
  --ink: #1a1033;
  --ink-soft: #4a3f63;
  --indigo: #3d22a8;
  --lavender: #e7defa;
  --yellow: #ffd43b;
  --mint: #2dd4a8;
  --mint-soft: #d4f6ea;
  --coral: #ff7a59;

  --line: 2px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --shadow-lg: 6px 6px 0 var(--ink);
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;

  --font-display: ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans",
    "Helvetica Neue", Arial, sans-serif;

  color-scheme: light;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* A column layout keeps the footer at the bottom of short pages such as the 404. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font-body);
  overflow-wrap: break-word;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--indigo);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--indigo);
  outline-offset: 3px;
}

::selection {
  background: var(--yellow);
  color: var(--ink);
}

main {
  flex: 1 0 auto;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 10;
  padding: 8px 14px;
  border: var(--line);
  border-radius: var(--radius-sm);
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.8em 1.3em;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--yellow);
  color: var(--ink);
  font: 800 1.0625rem/1.1 var(--font-display);
  text-align: center;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}

.btn:hover {
  color: var(--ink);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}

/* Pressing a button pushes it down onto its shadow. */
.btn:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--ink);
}

.btn svg {
  width: 1.05em;
  height: 1.05em;
  flex: none;
}

.btn-lg {
  padding: 0.9em 1.6em;
  border-radius: 20px;
  font-size: 1.25rem;
  box-shadow: var(--shadow-lg);
}

.btn-lg:hover {
  box-shadow: 7px 7px 0 var(--ink);
}

.btn-lg:active {
  transform: translate(6px, 6px);
}

.btn-sm {
  padding: 0.55em 0.95em;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  box-shadow: 3px 3px 0 var(--ink);
}

.btn-sm:hover {
  box-shadow: 4px 4px 0 var(--ink);
}

.btn-sm:active {
  transform: translate(3px, 3px);
}

.btn-paper {
  background: var(--paper);
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: var(--line);
  background: var(--cream);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font: 900 1.375rem/1 var(--font-display);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand:hover {
  color: var(--indigo);
}

.brand img {
  width: 42px;
  height: 42px;
  border: var(--line);
  border-radius: 12px;
  box-shadow: 2px 2px 0 var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* The header play button only appears once there is room for it; the home page hero has a big one. */
.header-play {
  display: none;
}

.lang {
  display: inline-flex;
  overflow: hidden;
  border: var(--line);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--ink);
}

.lang a,
.lang span {
  min-width: 42px;
  padding: 8px 11px;
  color: var(--ink);
  font: 800 0.8125rem/1 var(--font-display);
  letter-spacing: 0.06em;
  text-align: center;
  text-decoration: none;
}

.lang a:hover {
  background: var(--yellow);
}

.lang a:focus-visible {
  outline-offset: -4px;
}

.lang .is-current {
  background: var(--ink);
  color: var(--cream);
}

/* ---------- Home: hero ---------- */

.hero {
  border-bottom: var(--line);
  background-color: var(--cream);
  background-image: radial-gradient(rgba(26, 16, 51, 0.13) 1.3px, transparent 1.6px);
  background-size: 22px 22px;
}

.hero-grid {
  display: grid;
  gap: 28px;
  align-items: center;
  padding-block: 36px 52px;
}

.hero-art {
  position: relative;
  justify-self: center;
  width: min(62vw, 250px);
  margin: 6px 10px 0 0;
}

/* A coral card peeking out behind the mascot tile. */
.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid var(--ink);
  border-radius: 30px;
  background: var(--coral);
  transform: translate(12px, 8px) rotate(6deg);
}

.hero-art img {
  position: relative;
  width: 100%;
  border: 3px solid var(--ink);
  border-radius: 30px;
  background: var(--lavender);
  box-shadow: var(--shadow-lg);
  transform: rotate(-3deg);
}

.spark {
  position: absolute;
  z-index: 1;
}

.spark-a {
  top: -18px;
  right: -22px;
  width: 52px;
  height: 52px;
}

.spark-b {
  bottom: -14px;
  left: -18px;
  width: 34px;
  height: 34px;
}

.hero-copy {
  text-align: center;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.chip {
  padding: 5px 12px;
  border: var(--line);
  border-radius: 999px;
  background: var(--paper);
  font: 800 0.8125rem/1.2 var(--font-display);
}

.chip:nth-child(1) {
  background: var(--mint);
}

.chip:nth-child(2) {
  background: var(--yellow);
}

.hero h1 {
  margin: 0;
  color: var(--indigo);
  font: 900 clamp(3.5rem, 17vw, 6.75rem)/0.95 var(--font-display);
  letter-spacing: -0.035em;
  text-shadow: 4px 4px 0 var(--yellow);
}

.tagline {
  max-width: 26ch;
  margin: 14px auto 0;
  font-size: clamp(1.1875rem, 4.8vw, 1.5rem);
  font-weight: 650;
  line-height: 1.35;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.hero-cta .btn-lg {
  width: 100%;
  max-width: 340px;
}

.hero-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 600;
}

.stores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 340px;
  margin: 22px auto 0;
  padding: 0;
  list-style: none;
}

.store {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 2px dashed var(--ink);
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.85);
  text-align: left;
}

.store svg {
  width: 22px;
  height: 22px;
  flex: none;
}

.store small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.store strong {
  display: block;
  font: 800 1rem/1.2 var(--font-display);
  white-space: nowrap;
}

/* ---------- Home: sections ---------- */

.section {
  padding-block: 56px;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 28px;
  text-align: center;
}

.section-title {
  margin: 0;
  font: 900 clamp(2rem, 8vw, 2.75rem)/1.05 var(--font-display);
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

.games-grid {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.game {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border: var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.game-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 54px;
  height: 54px;
  border: var(--line);
  border-radius: 16px;
  background: var(--yellow);
}

.game-icon svg {
  width: 34px;
  height: 34px;
}

.icon-mint {
  background: var(--mint);
}

.icon-coral {
  background: var(--coral);
}

.icon-lavender {
  background: var(--lavender);
}

.game h3 {
  margin: 1px 0 4px;
  font: 800 1.1875rem/1.2 var(--font-display);
}

.game p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

.game-featured {
  background: var(--indigo);
  color: var(--cream);
}

.game-featured p {
  color: #e7e0ff;
}

.badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 10px;
  border: var(--line);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font: 800 0.75rem/1.3 var(--font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.steps {
  border-block: var(--line);
  background: var(--lavender);
}

.steps-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 20px 20px 20px 80px;
  border: var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
  counter-increment: step;
}

.step::before {
  content: counter(step);
  position: absolute;
  top: 18px;
  left: 18px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: var(--line);
  border-radius: 50%;
  background: var(--yellow);
  font: 900 1.375rem/1 var(--font-display);
}

.step:nth-child(2)::before {
  background: var(--mint);
}

.step:nth-child(3)::before {
  background: var(--coral);
}

.step h3 {
  margin: 0 0 4px;
  font: 800 1.1875rem/1.2 var(--font-display);
}

.step p {
  margin: 0;
  color: var(--ink-soft);
}

.steps-cta {
  margin-top: 36px;
  text-align: center;
}

/* ---------- Legal pages ---------- */

.legal {
  max-width: 70ch;
  margin-inline: auto;
  padding-block: 36px 72px;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.legal h1 {
  margin: 0;
  font: 900 clamp(2.125rem, 9vw, 3.25rem)/1.05 var(--font-display);
  letter-spacing: -0.02em;
}

.legal .meta {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.legal .lead {
  margin: 20px 0 0;
  font-size: 1.1875rem;
  line-height: 1.6;
}

.legal h2 {
  margin: 2.2em 0 0.6em;
  font: 800 1.375rem/1.25 var(--font-display);
  scroll-margin-top: 16px;
}

/* A small yellow tile in front of each section heading. */
.legal h2::before {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-right: 0.5em;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: var(--yellow);
  vertical-align: 0.08em;
}

.legal p,
.legal ul,
.legal ol,
.legal address {
  margin: 0 0 1em;
}

.legal ul,
.legal ol {
  padding-left: 1.4em;
}

.legal li {
  margin-bottom: 0.5em;
}

.legal li::marker {
  color: var(--indigo);
  font-weight: 800;
}

.legal address {
  font-style: normal;
}

.basis li > span {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.toc {
  margin: 28px 0 8px;
  padding: 18px 22px 10px;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.legal .toc h2 {
  margin: 0 0 10px;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.legal .toc h2::before {
  content: none;
}

.toc ol {
  margin: 0;
  columns: 2 220px;
  column-gap: 28px;
}

.toc li {
  margin: 0 0 0.35em;
  break-inside: avoid;
}

.callout {
  margin: 28px 0;
  padding: 4px 20px 6px;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.callout-mint {
  background: var(--mint-soft);
}

.legal .callout h2 {
  margin-top: 16px;
}

.path {
  display: inline-block;
  padding: 1px 9px;
  border: var(--line);
  border-radius: 8px;
  background: var(--paper);
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- 404 ---------- */

.notfound {
  max-width: 560px;
  margin-inline: auto;
  padding-block: 48px 72px;
  text-align: center;
}

.notfound img {
  width: 112px;
  margin: 0 auto 8px;
  border: var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  transform: rotate(-4deg);
}

.notfound .code {
  margin: 0;
  color: var(--indigo);
  font: 900 clamp(5rem, 30vw, 8.5rem)/1 var(--font-display);
  letter-spacing: -0.04em;
  text-shadow: 5px 5px 0 var(--yellow);
}

.notfound h1 {
  margin: 8px 0 10px;
  font: 900 clamp(1.75rem, 7vw, 2.5rem)/1.1 var(--font-display);
}

.notfound p {
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 36px 44px;
  background: var(--ink);
  color: var(--cream);
}

.footer-grid {
  display: grid;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 700;
}

.site-footer a {
  color: var(--cream);
}

.site-footer a:hover {
  color: var(--yellow);
}

.site-footer a[aria-current="page"] {
  color: var(--yellow);
  text-decoration: none;
}

.site-footer :focus-visible {
  outline-color: var(--yellow);
}

.footer-meta {
  margin: 0;
  color: #cfc6e6;
  font-size: 0.9375rem;
}

/* ---------- Larger screens ---------- */

@media (min-width: 420px) {
  .header-play {
    display: inline-flex;
  }
}

@media (min-width: 640px) {
  .wrap {
    padding-inline: 24px;
  }

  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .game-featured {
    grid-column: 1 / -1;
  }

  .section {
    padding-block: 72px;
  }
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

@media (min-width: 860px) {
  .steps-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .step {
    padding: 80px 22px 22px;
  }

  .step::before {
    top: 20px;
    left: 22px;
  }
}

@media (min-width: 880px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
    padding-block: 72px 88px;
  }

  .hero-art {
    order: 2;
    width: 100%;
    max-width: 360px;
  }

  .hero-copy {
    text-align: left;
  }

  .chips {
    justify-content: flex-start;
  }

  .tagline {
    margin-inline: 0;
  }

  .hero-cta {
    align-items: flex-start;
  }

  .hero-cta .btn-lg {
    width: auto;
  }

  .stores {
    margin-inline: 0;
  }
}

@media (min-width: 980px) {
  .games-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .game-featured {
    align-items: center;
    padding: 24px 28px;
  }

  .game-featured .game-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
  }

  .game-featured .game-icon svg {
    width: 46px;
    height: 46px;
  }
}

/* ---------- Preferences and print ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }
}

@media print {
  .skip-link,
  .site-header,
  .site-footer,
  .toc {
    display: none;
  }

  body {
    background: #fff;
  }

  .legal {
    max-width: none;
    padding: 0;
  }

  .callout {
    box-shadow: none;
  }
}
