/* Games hub styles. Tokens and components mirror www.chasedunham.com (public/assets/styles.css there),
   so the two sites feel like one. */
:root {
  --cream: #f4ede2;
  --cream-2: #eae0d0;
  --espresso: #1e1510;
  --ink: #1e1510;
  --muted: #6b5c50;
  --accent: #e4572e;
  --accent-ink: #fff7f0;
  --accent-text: #b53f1b;
  --lime: #e3df52;

  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --script: "Mrs Saint Delafield", cursive;

  --radius: 28px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --max: 76rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, p, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--espresso); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.eyebrow { font-size: .8rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; opacity: .8; margin-bottom: 1rem; }
.display { font: 400 clamp(2.5rem, 6vw, 4.75rem)/1 var(--serif); letter-spacing: -.01em; }
.display--sm { font-size: clamp(2rem, 4vw, 3rem); }
.nav a:focus-visible, .hero a:focus-visible { outline-color: var(--lime); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .6rem; padding: .45rem .5rem .45rem 1.15rem; border-radius: 999px;
  font: 700 .9rem/1 var(--sans); text-decoration: none; white-space: nowrap; transition: transform .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn__arrow {
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); transition: transform .2s ease;
}
.btn:hover .btn__arrow { transform: rotate(-45deg); }
.btn--light { background: var(--cream); color: var(--espresso); }
.btn--accent { background: var(--accent); color: var(--espresso); }
.btn--accent .btn__arrow { background: var(--accent-ink); color: var(--accent); }
.btn--ghost { padding: .95rem 1.25rem; border: 1px solid currentColor; }

/* Nav */
.nav { position: absolute; inset: 0 0 auto; z-index: 10; color: var(--cream); }
.nav__inner { max-width: var(--max); margin: 0 auto; padding: 1.25rem var(--gutter); display: flex; align-items: center; gap: 2rem; }
.brand { display: flex; align-items: center; gap: 1rem; text-decoration: none; margin-right: auto; }
.brand__mark { font: italic 400 2.1rem/1 var(--serif); color: var(--lime); }
.brand__tag { font-size: .8rem; opacity: .85; }

/* Hero */
.hero {
  position: relative; color: var(--cream);
  background:
    radial-gradient(60rem 40rem at 85% 10%, rgba(228, 87, 46, .55), transparent 60%),
    radial-gradient(40rem 30rem at 0% 100%, rgba(227, 223, 82, .12), transparent 60%),
    var(--espresso);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: clamp(6.5rem, 12vw, 9rem) 0 clamp(3.5rem, 7vw, 5.5rem);
  overflow: hidden;
}
.hero__inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.hero__copy { max-width: 34rem; }
.hero__title { font: 800 clamp(3.75rem, 11vw, 9rem)/.88 var(--sans); letter-spacing: -.045em; }
.signature { font: 400 clamp(2.75rem, 6vw, 4.75rem)/1 var(--script); color: var(--accent); transform: rotate(-6deg); margin: -.2em 0 .75rem 32%; width: max-content; }
.hero__lede { max-width: 30rem; font-size: 1.1rem; opacity: .85; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Games panel */
.work { padding: clamp(4rem, 8vw, 6rem) 0; background: var(--lime); border-radius: var(--radius); margin: clamp(.5rem, 1.5vw, 1rem) clamp(.5rem, 1.5vw, 1rem) 0; }
.section-head { margin-bottom: 2.5rem; }
.work .eyebrow { color: var(--espresso); opacity: 1; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.card { min-width: 0; }
.card__link { display: grid; gap: .75rem; align-content: start; text-decoration: none; }
.card__link:focus-visible { outline: 2px solid var(--espresso); outline-offset: 6px; border-radius: 20px; }
.card__top { display: flex; justify-content: space-between; align-items: center; }
.pill, .arrow { border: 1px solid var(--espresso); border-radius: 999px; font-size: .8rem; padding: .2rem .8rem; }
.arrow { padding: .2rem .7rem; transition: background .2s, color .2s; }
.card__link:hover .arrow, .card__link:focus-visible .arrow { background: var(--espresso); color: var(--lime); }
.card h3 { font-size: 1.1rem; }
.card p { font-size: .9rem; color: #4a4520; }

/* Card pictures: the same rounded 4:5 box as the main site's work cards */
.ph { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: 20px; background: var(--espresso); }
.ph > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.ph > img.fish { inset: auto; left: 50%; top: 32%; width: 23%; height: auto; object-fit: fill; }
.card__link:hover .ph { box-shadow: 0 14px 30px rgba(30, 21, 16, .22); }
.ph { transition: box-shadow .2s ease; }

/* DUNCE: three guesses, the way the game draws them */
.guesses { position: absolute; inset: 0; display: grid; align-content: center; gap: 6%; padding: 9%; }
.guess { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4%; }
.tile {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px;
  font: 800 clamp(1rem, 3.2vw, 1.6rem)/1 var(--sans); color: #cdbfae; background: #43362d;
}
.tile--g { background: #e3df52; color: #1e1510; }
.tile--t { background: #93b3db; color: #1e1510; }

/* Footer */
.footer { padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom)); color: var(--muted); font-size: .85rem; }
.footer__inner { display: flex; align-items: center; gap: 1rem; }
.footer .brand__mark { color: var(--accent); font-size: 1.6rem; }

@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .brand__tag { display: none; } .signature { margin-left: 20%; } }
@media (max-width: 480px) { .cards { grid-template-columns: 1fr; } .nav .btn { font-size: .8rem; } }
@media (max-width: 640px) and (pointer: coarse) { .footer { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
