/* garml.com: one stylesheet, no external requests. Fonts are self-hosted (SIL Open Font License). */

@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-400i.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --navy: #021a3b;
  --navy-2: #0b2c58;
  --navy-deep: #010f24;
  --coral: #fd4243;
  --coral-deep: #c8242c;
  --cream: #fff4e6;
  --cream-2: #ffe9cf;
  --sun: #ffc83d;
  --white: #ffffff;
  --muted-on-navy: #c6d2e4;
  --muted-on-cream: #45556e;
  --accent: var(--coral);

  --display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --radius: 22px;
  --lift: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--cream);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
a:hover { text-decoration-color: var(--coral); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 650; line-height: 1.05; letter-spacing: -0.01em; margin: 0; }
p { margin: 0 0 1em; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--sun); color: var(--navy); padding: 10px 16px; border-radius: 10px; font-weight: 700;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
}
.site-header__logo img { width: clamp(118px, 16vw, 168px); }
.site-nav ul { list-style: none; display: flex; gap: clamp(14px, 3vw, 30px); margin: 0; padding: 0; }
.site-nav a {
  font-family: var(--display); font-weight: 550; font-size: 1.125rem; text-decoration: none;
  padding: 6px 2px; border-bottom: 3px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--coral); }

/* ---------- buttons: the logo's offset extrusion, pressed on tap ---------- */
.btn {
  --edge: var(--navy-deep);
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 600; font-size: 1.25rem; line-height: 1;
  color: var(--white); background: var(--coral);
  padding: 16px 24px 17px; border-radius: 16px; border: 3px solid var(--edge);
  text-decoration: none;
  box-shadow: 4px var(--lift) 0 var(--edge);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn:active { transform: translate(4px, var(--lift)); box-shadow: 0 0 0 var(--edge); }
.btn--quiet { background: var(--cream); color: var(--navy); }
.on-cream .btn { --edge: var(--navy); }
.btn svg { width: 20px; height: 20px; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: 28px; }

.chip {
  display: inline-block; font-family: var(--display); font-weight: 600; font-size: 0.95rem;
  background: var(--sun); color: var(--navy); border-radius: 999px; padding: 5px 14px 6px;
  border: 2px solid var(--navy);
}
.chip--soon { background: var(--cream-2); }

/* ---------- home hero ---------- */
.hero {
  display: grid; gap: clamp(40px, 6vw, 72px); align-items: center;
  padding-top: clamp(24px, 6vw, 72px); padding-bottom: clamp(64px, 9vw, 120px);
}
@media (min-width: 900px) { .hero { grid-template-columns: 1fr 1.05fr; } }
.hero h1 { font-size: clamp(2.8rem, 5.4vw, 4.8rem); font-weight: 700; color: var(--cream); }
.hero h1 .bounce { color: var(--coral); text-shadow: 3px 4px 0 var(--navy-deep); }
.hero__lead { font-size: clamp(1.125rem, 1.9vw, 1.3rem); color: var(--muted-on-navy); max-width: 34ch; margin-top: 22px; }

/* A dealt hand of game cards */
.hand { position: relative; aspect-ratio: 100 / 74; max-width: 640px; width: 100%; margin: 0 auto; }
.hand__card {
  position: absolute; top: 2%; width: 46%; aspect-ratio: 4 / 5;
  border-radius: var(--radius); border: 4px solid var(--cream); overflow: hidden;
  background: var(--navy-2); box-shadow: 8px 10px 0 var(--coral);
  text-decoration: none; color: var(--navy);
  transition: transform 0.25s cubic-bezier(.2,.9,.3,1.3), box-shadow 0.25s ease;
  animation: deal 0.7s cubic-bezier(.2,.9,.3,1.15) both;
}
.hand__card img { width: 100%; height: 100%; object-fit: cover; }
.hand__card span {
  position: absolute; left: 10px; bottom: 10px; max-width: 54%;
  background: var(--cream); border-radius: 12px; padding: 7px 11px 8px;
  font-family: var(--display); font-weight: 600; font-size: clamp(0.85rem, 1.5vw, 1.05rem); line-height: 1.1;
}
.hand__card--3 span { max-width: 80%; }
.hand__card--1 { left: 0; top: 10%; transform: rotate(-9deg); z-index: 1; --r: -9deg; animation-delay: 0.05s; }
.hand__card--2 { left: 27%; top: 0; transform: rotate(-1deg); z-index: 2; --r: -1deg; animation-delay: 0.18s; }
.hand__card--3 { left: 54%; top: 14%; transform: rotate(8deg); z-index: 3; --r: 8deg; animation-delay: 0.31s; }
.hand__card:hover, .hand__card:focus-visible { transform: rotate(var(--r)) translateY(-14px); z-index: 4; box-shadow: 10px 14px 0 var(--sun); }
@keyframes deal {
  from { opacity: 0; transform: translate(-30%, 40%) rotate(-24deg); }
  to { opacity: 1; transform: rotate(var(--r)); }
}

/* ---------- games list (cream) ---------- */
.on-cream { background: var(--cream); color: var(--navy); }
.on-cream a:hover { text-decoration-color: var(--coral); }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section__title { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: clamp(28px, 4vw, 48px); }
.section__intro { max-width: 60ch; color: var(--muted-on-cream); margin-top: -20px; margin-bottom: 40px; }

.game {
  display: grid; gap: clamp(24px, 4vw, 56px); align-items: center;
  padding: clamp(28px, 4vw, 44px) 0;
}
.game + .game { border-top: 3px dashed rgba(2, 26, 59, 0.18); }
@media (min-width: 860px) {
  .game { grid-template-columns: 1.15fr 1fr; }
  .game:nth-of-type(even) .game__art { order: 2; }
}
.game__art {
  border-radius: var(--radius); border: 4px solid var(--navy); overflow: hidden;
  box-shadow: 10px 12px 0 var(--navy); background: var(--navy);
}
.game__art img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.game__art--tall img { aspect-ratio: 16 / 11; object-position: 50% 30%; }
.game__logo { margin-bottom: 14px; }
.game__logo img { width: min(340px, 80%); }
.game__body p { max-width: 46ch; font-size: 1.1rem; }
.game__meta { margin: 0 0 16px; }

.help-band { display: grid; gap: 22px; align-items: center; }
@media (min-width: 860px) { .help-band { grid-template-columns: 1.4fr 1fr; } }
.help-band h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.help-band p { color: var(--muted-on-navy); max-width: 52ch; font-size: 1.12rem; }
.help-band__mail {
  display: block; text-align: center; font-family: var(--display); font-weight: 600;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem); text-decoration: none; color: var(--navy);
  background: var(--sun); border: 4px solid var(--cream); border-radius: var(--radius);
  padding: 26px 18px; box-shadow: 8px 10px 0 var(--coral); overflow-wrap: anywhere;
}
.help-band__mail small { display: block; font-family: var(--body); font-weight: 400; font-size: 1rem; margin-top: 4px; }

/* ---------- game pages ---------- */
.game-page { --accent: var(--coral); }
.game-page--pumpkin { --accent: #ff8a1f; }
.game-page--zero { --accent: #ff4f8b; }
.game-page--shelf { --accent: var(--sun); }

.game-hero { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; padding-top: clamp(16px, 4vw, 48px); padding-bottom: clamp(56px, 8vw, 104px); }
@media (min-width: 900px) { .game-hero { grid-template-columns: 1fr 1.25fr; } }
.game-hero__logo img { width: min(440px, 100%); }
.game-hero__logo--shelf img { width: min(360px, 90%); }
.game-hero h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.game-hero__lead { font-size: clamp(1.15rem, 2vw, 1.35rem); color: var(--muted-on-navy); max-width: 38ch; margin-top: 18px; }
.game-hero .chip { background: var(--accent); }
.game-hero__art {
  border-radius: var(--radius); border: 4px solid var(--cream); overflow: hidden;
  box-shadow: 10px 12px 0 var(--accent);
}
.game-hero__art img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.game-hero__art--shelf img { aspect-ratio: 4 / 3; object-position: 50% 35%; }

.feature-grid { display: grid; gap: clamp(32px, 5vw, 64px); }
@media (min-width: 900px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
.prose h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin-bottom: 16px; }
.prose h2:not(:first-child) { margin-top: 44px; }
.prose p, .prose li { max-width: 62ch; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 38px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.18em; width: 24px; height: 24px; border-radius: 8px;
  background: var(--accent); border: 2px solid var(--navy);
}
.ticks li::after {
  content: ""; position: absolute; left: 9px; top: calc(0.18em + 7px); width: 0; height: 0;
  border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent var(--navy);
}

.shots { display: grid; gap: 24px; margin-top: 8px; }
@media (min-width: 700px) { .shots { grid-template-columns: repeat(2, 1fr); } }
.shots figure { margin: 0; }
.shots img { border-radius: 18px; border: 4px solid var(--navy); box-shadow: 8px 10px 0 var(--navy); width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.shots--tall img { aspect-ratio: 5 / 6; object-position: 50% 30%; }
.shots figcaption { margin-top: 14px; color: var(--muted-on-cream); font-size: 0.98rem; }

.info-card {
  background: var(--white); border: 3px solid var(--navy); border-radius: var(--radius);
  box-shadow: 8px 10px 0 var(--navy); padding: clamp(22px, 3vw, 32px);
}
.info-card h2 { font-size: 1.7rem; margin-bottom: 14px; }
.info-card dl { margin: 0; display: grid; gap: 4px 18px; grid-template-columns: max-content 1fr; }
.info-card dt { font-weight: 700; }
.info-card dd { margin: 0; }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.link-list a { font-weight: 700; }
.stack > * + * { margin-top: 28px; }

/* ---------- legal and support pages ---------- */
.legal { padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 9vw, 110px); }
.legal .wrap { max-width: calc(760px + 2 * var(--gutter)); }
.legal h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); margin-bottom: 10px; }
.legal .kicker { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--coral-deep); margin-bottom: 8px; }
.legal .updated { color: var(--muted-on-cream); margin-bottom: 32px; }
.legal h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin: 44px 0 14px; }
.legal h3 { font-size: 1.3rem; margin: 28px 0 10px; }
.legal ul { padding-left: 1.3em; }
.legal li { margin-bottom: 6px; }
.legal .callout {
  background: var(--white); border: 3px solid var(--navy); border-radius: 18px; padding: 18px 22px;
  box-shadow: 6px 8px 0 var(--navy); font-weight: 700;
}
.table-scroll { overflow-x: auto; margin: 0 0 1em; }
.legal table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.98rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 12px 14px; border: 2px solid rgba(2, 26, 59, 0.2); }
.legal th { background: var(--cream-2); font-family: var(--display); font-weight: 600; }
.faq dt { font-family: var(--display); font-weight: 600; font-size: 1.25rem; margin-top: 26px; }
.faq dd { margin: 8px 0 0; }

.not-found { min-height: 60vh; display: grid; place-content: center; text-align: center; padding: 48px var(--gutter); }
.not-found h1 { font-size: clamp(3rem, 10vw, 6rem); color: var(--coral); text-shadow: 4px 5px 0 var(--navy-deep); }
.not-found p { color: var(--muted-on-navy); font-size: 1.2rem; margin: 18px auto 30px; max-width: 34ch; }
.not-found .btn { justify-self: center; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-deep); color: var(--muted-on-navy); padding: 64px 0 36px; font-size: 0.98rem; }
.site-footer__grid { display: grid; gap: 36px; }
@media (min-width: 760px) { .site-footer__grid { grid-template-columns: 1.2fr 1fr 1fr 1.6fr; } }
.site-footer__brand img { width: 150px; margin-bottom: 14px; }
.site-footer h2 { font-family: var(--display); font-size: 1.15rem; color: var(--cream); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--cream); overflow-wrap: anywhere; }
.site-footer__small { margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(198, 210, 228, 0.2); font-size: 0.9rem; }

/* ---------- calm mode ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.shots.shots--one { grid-template-columns: 1fr; }
@media (min-width: 700px) { .shots--tall { grid-template-columns: repeat(2, 1fr); } }
.shots--square img { aspect-ratio: 1 / 1; }
