/* Peanut Butter Penguin Studios — peanutbutterpenguinstudios.com
   Layout: the mascot lockup centred on warm cream, a peanut-butter drip pouring into the games shelf, then how we make
   games, a gold "Say hello" band and a charcoal footer. Legal pages: the logo above one cream card (as on
   biscuitsbigbite.com). Colours and type from the PBP Brand Guide v1.0: Cocoa outlines and headings, Penguin Charcoal
   body copy, Peanut Gold and Roasted Orange as the energetic accents (decorative only: Roasted Orange is 3:1 on cream,
   so it never carries text), Warm Cream and Soft Beige grounds. Headings in Fredoka Bold (SIL OFL, served from this
   site); body copy in the system sans. No scripts, no external requests. */

@font-face { font-family: "Fredoka"; src: url("../fonts/fredoka-latin-700-normal.ttf") format("truetype");
             font-weight: 700; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("../fonts/fredoka-latin-500-normal.ttf") format("truetype");
             font-weight: 500; font-display: swap; }

:root {
  /* Brand palette (contrast on cream: cocoa 14.7:1, charcoal 9.2:1, link 5.7:1) */
  --cocoa: #371205;
  --charcoal: #4A3B40;
  --orange: #D4711F;
  --gold: #F8A638;
  --cream: #FBEEDA;
  --beige: #F1CEA2;
  --paper: #FFF8EE;
  --link: #9A4510;                 /* Roasted Orange, deepened for text: 5.7:1 on cream, 6.2:1 on paper */
  --footer-text: #F3E4D2;          /* 8.3:1 on charcoal */
  --display: "Fredoka", ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 28px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --card-shadow: 0 6px 0 rgba(55, 18, 5, .12), 0 18px 34px rgba(55, 18, 5, .12);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--cream); }
body { margin: 0; background: var(--cream); color: var(--charcoal); font: 400 18px/1.6 var(--body); overflow-x: hidden; }
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; color: var(--cocoa); text-wrap: balance; }
p { text-wrap: pretty; }
.page { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }

/* Skip link and focus (WCAG 2.4.1, 2.4.7, 2.4.11) */
.skip { position: absolute; left: 8px; top: -100px; z-index: 100; padding: 10px 16px; border-radius: 12px;
        background: var(--paper); color: var(--cocoa); font: 700 16px/1.2 var(--display); border: 3px solid var(--cocoa); }
.skip:focus { top: max(8px, env(safe-area-inset-top, 0px)); }
:focus-visible { outline: 3px solid var(--cocoa); outline-offset: 3px; border-radius: 6px; }
.footer :focus-visible { outline-color: var(--gold); }
#main:focus { outline: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---------------------------------------------------------------- buttons */
.btn {                                  /* Peanut Gold capsule with the logo's thick cocoa outline and depth */
  position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; max-width: 100%; min-width: 240px; min-height: 64px; padding: 12px 40px 14px; border: 3px solid var(--cocoa); border-radius: 999px;
  background: linear-gradient(180deg, #FFC86A 0%, var(--gold) 45%, #F29A2A 100%);
  box-shadow: inset 0 -4px 0 rgba(212, 113, 31, .55), 0 5px 0 var(--cocoa), 0 14px 24px rgba(55, 18, 5, .18);
  color: var(--cocoa); text-decoration: none; overflow: hidden; transition: transform .12s, box-shadow .12s;
}
.btn::before {                          /* the glossy highlight, top left, like the jar and splashes */
  content: ""; position: absolute; left: 20px; top: 8px; width: 26px; height: 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .7); transform: rotate(-14deg); pointer-events: none;
}
.btn-big { font: 700 28px/1.05 var(--display); letter-spacing: .01em; }
.btn:hover { transform: translateY(-2px); box-shadow: inset 0 -4px 0 rgba(212, 113, 31, .55), 0 7px 0 var(--cocoa), 0 16px 26px rgba(55, 18, 5, .2); }
.btn:active { transform: translateY(4px); box-shadow: inset 0 -4px 0 rgba(212, 113, 31, .55), 0 1px 0 var(--cocoa); }

.btn-dark {                             /* cream on cocoa, for the gold band */
  display: inline-flex; align-items: center; justify-content: center; max-width: 100%; min-width: 220px; min-height: 60px;
  padding: 12px 34px; border-radius: 999px; background: var(--cocoa); color: var(--paper); text-decoration: none;
  font: 700 24px/1.2 var(--display); text-align: center;
  box-shadow: 0 5px 0 rgba(55, 18, 5, .35); transition: transform .12s;
}
.btn-dark:hover { transform: translateY(-2px); text-decoration: underline; text-decoration-thickness: 2px; }

/* ---------------------------------------------------------------- hero */
.hero { background: radial-gradient(120% 90% at 50% 18%, #FFF7EA 0%, var(--cream) 62%); }
.hero-inner { max-width: 760px; margin: 0 auto; padding: 40px var(--gutter-r) 64px var(--gutter-l);
              display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-logo { margin: 0; line-height: 0; }
.hero-logo img { width: min(420px, 78vw); filter: drop-shadow(0 10px 0 rgba(55, 18, 5, .08)); animation: pop .7s cubic-bezier(.2, 1.4, .4, 1) both; }
.tagline { margin: 14px 0 10px; font: 700 clamp(36px, 7.4vw, 64px)/1.04 var(--display); color: var(--cocoa); text-wrap: balance; }
.swash { padding: 0 .08em; border-radius: .2em;
         background: linear-gradient(180deg, transparent 52%, var(--gold) 52%, var(--gold) 90%, transparent 90%); }
.lede { margin: 0 0 30px; max-width: 34em; font-size: 20px; }

/* ---------------------------------------------------------------- games */
.games { position: relative; background: var(--beige); padding: 76px 0 84px; }
.games-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 22px; margin-bottom: 26px; }
.section-title { margin: 0; font-size: clamp(32px, 4.6vw, 46px); line-height: 1.1; }
.section-sub { margin: 0; font-size: 19px; color: var(--charcoal); }

.games-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.game-card { position: relative; border-radius: var(--radius); box-shadow: var(--card-shadow); min-width: 0; }
.game-card h3 { margin: 0; }
.biscuit {                              /* Biscuit's own world: his kitchen sky and label brown (his brand, untouched) */
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 210px); gap: 12px; align-items: end; overflow: hidden;
  padding: 30px 0 0 clamp(22px, 4vw, 40px); border: 3px solid var(--cocoa); color: #3F1E10;
  background: linear-gradient(180deg, #8FD3FF 0%, #B4E4FF 55%, #D9F2FF 100%);
}
.biscuit .game-copy { padding-bottom: 30px; min-width: 0; }
.game-logo img { display: block; width: min(320px, 100%); filter: drop-shadow(0 6px 0 rgba(63, 30, 16, .14)); }
.biscuit p { color: #3F1E10; font-size: 18px; margin: 18px 0 14px; max-width: 30em; }
.game-link { margin: 4px 0 0 !important; }
/* Biscuit's blue capsule from biscuitsbigbite.com (navy outline and depth), lettered like this site's other buttons:
   Fredoka Bold, sentence case, no outline on the letters. Navy on the blue: 5.1:1 where the words sit. */
.btn-play {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  max-width: 100%; min-width: 240px; min-height: 64px; padding: 12px 40px 14px; border: 4px solid #0E3C54; border-radius: 999px;
  background: linear-gradient(180deg, #7FE2FF 0%, #4AD3FD 16%, #1FB8F3 52%, #10B0F0 80%, #0291E0 100%);
  box-shadow: inset 0 -5px 0 #0291E0, 0 4px 0 #0E3C54, 0 12px 22px rgba(14, 60, 84, .28);
  color: #0E3C54; text-decoration: none; overflow: hidden;
  font: 700 28px/1.05 var(--display); letter-spacing: .01em;
  transition: transform .12s, box-shadow .12s;
}
.btn-play::before {                     /* the capsule's gloss, top left, as on the other buttons */
  content: ""; position: absolute; left: 20px; top: 8px; width: 26px; height: 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .75); transform: rotate(-14deg); pointer-events: none;
}
.btn-play:hover { transform: translateY(-2px); }
.btn-play:active { transform: translateY(3px); box-shadow: inset 0 -5px 0 #0291E0, 0 1px 0 #0E3C54; }
.game-hero { align-self: end; width: 100%; max-width: 210px; margin-right: -6px; filter: drop-shadow(0 12px 16px rgba(63, 30, 16, .22)); }

.next { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 30px clamp(22px, 3vw, 34px);
        background: var(--paper); border: 3px dashed var(--cocoa); box-shadow: none; }
.next-icon { width: 56px; height: 56px; }
.next h3 { font-size: 26px; line-height: 1.15; }
.next p { margin: 0; }

/* ---------------------------------------------------------------- how we make games */
.pillars { padding: 80px 0 88px; }
.pillar-list { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; }
.pillar-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 18px; align-items: start; }
.pillar-list svg { width: 64px; height: 64px; grid-row: span 2; }
.pillar-list h3 { margin: 6px 0 6px; font-size: 23px; line-height: 1.2; }
.pillar-list p { margin: 0; }

/* ---------------------------------------------------------------- say hello */
.hello { background: var(--gold); padding: 64px 0; color: var(--cocoa); }
.hello-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
.hello-copy { flex: 1 1 360px; min-width: 0; }
.hello-copy p { margin: 10px 0 0; font-size: 19px; color: var(--cocoa); max-width: 32em; }
.hello a:not(.btn-dark) { color: var(--cocoa); font-weight: 700; }
.hello :focus-visible { outline-color: var(--cocoa); }

/* ---------------------------------------------------------------- footer */
.footer { background: var(--charcoal); color: var(--footer-text); }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 44px var(--gutter-r) max(40px, env(safe-area-inset-bottom, 0px)) var(--gutter-l);
                display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px 48px; }
.footer-name { margin: 0; font: 700 24px/1.2 var(--display); }
.footer-name a { color: #FFFFFF; text-decoration: none; }
.footer-name a:hover { text-decoration: underline; }
.footer-tag { margin: 6px 0 0; font-size: 16px; }
.footer-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 28px; }
.footer-links a { display: inline-block; padding: 6px 0; color: #FFFFFF; font-size: 16px; text-decoration: none; overflow-wrap: anywhere; }
.footer-links a:hover { text-decoration: underline; }
.fine { grid-column: 1 / -1; margin: 6px 0 0; padding-top: 18px; border-top: 1px solid rgba(243, 228, 210, .25); font-size: 14px; }

/* ---------------------------------------------------------------- legal, support and contact pages */
.doc-page { background: linear-gradient(180deg, #FFF7EA 0%, var(--cream) 380px, var(--cream) 100%); }
.doc { max-width: 840px; margin: 0 auto; padding: 28px var(--gutter-r) 80px var(--gutter-l); }
.doc-home { display: block; width: 168px; max-width: 46%; margin: 0 auto 22px; line-height: 0; }
.doc-home img { display: block; width: 100%; filter: drop-shadow(0 6px 0 rgba(55, 18, 5, .08)); }
.card { background: var(--paper); border: 3px solid #E2B98A; border-radius: var(--radius); box-shadow: var(--card-shadow); }
.doc .card { padding: clamp(22px, 5.5vw, 56px); }
.doc h1 { margin: 0 0 16px; font-size: clamp(32px, 5.4vw, 46px); line-height: 1.1; }
.doc h2 { margin: 36px 0 10px; font-size: clamp(23px, 3.4vw, 27px); line-height: 1.2; }
.doc h3 { margin: 24px 0 6px; font-size: 20px; line-height: 1.3; }
.doc p, .doc li { font-size: 17px; line-height: 1.65; overflow-wrap: break-word; }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin: 5px 0; }
.doc li::marker { color: var(--orange); }
.doc a { font-weight: 600; overflow-wrap: anywhere; }
.doc strong { color: var(--cocoa); }
.email-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
              margin: 22px 0 8px; padding: 20px 24px; border-radius: 20px; background: var(--cream); border: 2px solid #E2B98A; }
.email-card p { margin: 0; }
.email-card .label { font: 700 15px/1.2 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--charcoal); }
.email-card a { font: 700 clamp(15px, 4.1vw, 24px)/1.3 var(--display); color: var(--link); }

/* ---------------------------------------------------------------- 404 */
.lost { text-align: center; padding: 48px var(--gutter-r) 88px var(--gutter-l); }
.lost img { width: min(260px, 60vw); }
.lost h1 { margin: 18px 0 8px; font-size: clamp(34px, 6vw, 52px); line-height: 1.1; }
.lost p { margin: 0 auto 26px; max-width: 30em; font-size: 19px; }
.lost-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 26px; margin-top: 26px !important; }
.lost-links a { font-weight: 700; }

/* ---------------------------------------------------------------- motion (one short moment on load; nothing loops) */
@keyframes pop { from { transform: scale(.88) translateY(14px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------- tablets and phones */
@media (max-width: 900px) {
  .games-grid { grid-template-columns: minmax(0, 1fr); }
  .pillar-list { grid-template-columns: minmax(0, 1fr); gap: 26px; max-width: 560px; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .hero-inner { padding-top: 28px; padding-bottom: 52px; }
  .lede { font-size: 18px; }
  .btn { width: 100%; padding-left: 20px; padding-right: 20px; }
  .btn-big { font-size: 26px; }
  /* Phones: logo, then Biscuit, then the words and the button (Rob). Biscuit's picture is decorative, so the reading
     order (logo, words, button) is unchanged for screen readers. */
  .biscuit { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 26px 22px 30px; justify-items: center; text-align: center; }
  .biscuit .game-copy { display: contents; }
  .game-logo { order: 1; }
  .game-logo img { margin: 0 auto; }
  .game-hero { order: 2; justify-self: center; align-self: auto; max-width: 180px; margin: 14px 0 0; }
  .biscuit p { order: 3; margin: 16px 0 18px; }
  .biscuit .game-link { order: 4; margin: 0 !important; width: 100%; }
  .btn-play { width: 100%; padding-left: 16px; padding-right: 16px; font-size: 26px; }
  .games { padding: 56px 0 64px; }
  .pillars { padding: 60px 0 64px; }
  .hello { padding: 52px 0; }
  .btn-dark { width: 100%; }
  .footer-links ul { flex-direction: column; gap: 2px; }
  .email-card { padding: 14px 16px; border-radius: 16px; }
}
