/* monkeydogandfriends.com v01 (WO-031): ported from the approved mock-up, 06_Web/site/design_v01/Main.dc.html and
   Game.dc.html (D-123). Plain CSS; fonts are self-hosted (no third-party requests). */

/* ---------- fonts (SIL Open Font License 1.1; licences in /assets/fonts/) ---------- */
@font-face { font-family: "Andika"; src: url("/assets/fonts/Andika-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Andika"; src: url("/assets/fonts/Andika-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Andika"; src: url("/assets/fonts/Andika-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("/assets/fonts/Fredoka-Variable.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }

/* ---------- colours (design README) ---------- */
:root {
  --paper: #FBF4E6; --ink: #2C2B2B; --orange: #B4541A; --orange-shadow: #7A3610; --mustard: #F5B14B; --tint: #FCE3B4;
  --card: #FFFDF8; --link: #8E3F12; --link-hover: #5E2A0B; --muted: #5E5650; --jam: #A8262F; --green: #2F5D3A;
  --green-light: #7FB069; --goldie: #C98A2B; --fredoka: "Fredoka", "Trebuchet MS", sans-serif;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Andika", "Trebuchet MS", sans-serif; overflow-x: hidden; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--fredoka); font-weight: 700; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 4px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1180px; margin: 0 auto; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- motion (all off under prefers-reduced-motion) ---------- */
@keyframes sniff { 0%, 100% { transform: translateX(0); opacity: .35; } 50% { transform: translateX(-10px); opacity: 1; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
.sniff1 { animation: sniff 1.6s ease-in-out infinite; }
.sniff2 { animation: sniff 1.6s ease-in-out .25s infinite; }
.sniff3 { animation: sniff 1.6s ease-in-out .5s infinite; }
.bob { animation: bob 4s ease-in-out infinite; }
.btn { transition: transform .15s ease; }
.btn:hover { transform: translateY(-3px) rotate(-1deg); }
.card { transition: transform .2s ease; }
.card:hover { transform: rotate(0deg) scale(1.03); }

/* ---------- header ---------- */
.site-header { max-width: 1180px; margin: 0 auto; padding: 22px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-name { font-family: var(--fredoka); font-weight: 700; font-size: 26px; letter-spacing: -0.3px; }
.amp { color: var(--orange); }
.site-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-family: var(--fredoka); font-weight: 600; font-size: 18px; }
.site-nav a { text-decoration: none; }

/* ---------- hero ---------- */
.hero { max-width: 1180px; margin: 0 auto; padding: 24px 24px 72px; display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.hero-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.pill { align-self: flex-start; background: var(--mustard); color: var(--ink); font-family: var(--fredoka); font-weight: 600; border-radius: 999px; }
.pill-hero { font-size: 16px; padding: 8px 16px; transform: rotate(-2deg); }
.pill-small { font-size: 15px; padding: 5px 14px; }
.hero h1 { font-size: clamp(44px, 6vw, 76px); line-height: 1.02; letter-spacing: -1px; }
.hero h1 span { color: var(--orange); }
.hero-blurb { font-size: 21px; line-height: 1.55; max-width: 540px; }
.buy { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.btn-buy { display: inline-flex; flex-direction: column; text-decoration: none; padding: 14px 26px; border-radius: 18px; font-family: var(--fredoka); }
.btn-buy .btn-main { font-weight: 700; font-size: 22px; }
.btn-buy .btn-sub { font-size: 16px; font-weight: 500; }
.btn-orange { background: var(--orange); color: #FFFFFF; box-shadow: 0 5px 0 var(--orange-shadow); }
.btn-orange:hover { color: #FFFFFF; }
.btn-ink { background: var(--ink); color: var(--paper); box-shadow: 0 5px 0 #000000; }
.btn-ink:hover { color: var(--paper); }
/* "coming soon" state of a buy button (WO-031 change 1): a badge, not a link, and visibly not clickable */
.buy-soon { display: inline-flex; align-items: center; padding: 12px 22px; border-radius: 18px; border: 3px dashed var(--orange); background: var(--card);
  color: var(--ink); font-family: var(--fredoka); font-weight: 600; font-size: 18px; cursor: default; }
.buy-soon.ink { border-color: var(--ink); }
.hero-note { font-size: 16px; color: var(--muted); }
.hero-art { flex: 1 1 380px; min-width: 0; position: relative; display: flex; justify-content: center; padding: 20px 0 40px; }
.cover-wrap { position: relative; width: min(100%, 380px); transform: rotate(3deg); }
.tape { position: absolute; top: -16px; left: 50%; width: 120px; height: 34px; margin-left: -60px; background: rgba(245,177,75,0.75); transform: rotate(-4deg); z-index: 2; }
.cover-wrap img { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 18px 40px rgba(44,43,43,0.28); }
.hero-dog { position: absolute; left: -10px; bottom: -6px; width: 46%; max-width: 230px; }
.hero-dog img { display: block; width: 100%; height: auto; filter: drop-shadow(0 8px 10px rgba(44,43,43,0.25)); }
.hero-dog svg { position: absolute; right: -58px; top: 18%; }

/* ---------- waves ---------- */
.wave { display: block; width: 100%; height: 60px; }

/* ---------- sections ---------- */
.section-head { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
.section-head h2 { font-size: clamp(36px, 4.5vw, 54px); }
.section-head p { font-size: 20px; max-width: 560px; }
.friends { background: var(--tint); padding: 40px 24px 80px; }
.friends .wrap, .play .wrap, .printables .wrap { display: flex; flex-direction: column; gap: 40px; }
.friend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.friend { background: var(--card); border-radius: 26px; padding: 18px 18px 26px; border: 3px solid; display: flex; flex-direction: column; gap: 14px; }
.friend img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 18px; display: block; }
.friend p { font-size: 18px; line-height: 1.5; }
.friend-md { border-color: var(--ink); box-shadow: 0 10px 0 var(--ink); transform: rotate(-2deg); }
.friend-nm { border-color: var(--orange); box-shadow: 0 10px 0 var(--orange); transform: rotate(1.5deg); }
.friend-gd { border-color: var(--goldie); box-shadow: 0 10px 0 var(--goldie); transform: rotate(-1deg); }
.name-tag { align-self: flex-start; font-family: var(--fredoka); font-weight: 700; font-size: 26px; padding: 4px 18px; border-radius: 999px; }
.tag-md { background: var(--ink); color: var(--paper); }
.tag-nm { background: var(--orange); color: #FFFFFF; }
.tag-gd { background: var(--mustard); color: var(--ink); }

.play { background: var(--ink); color: var(--paper); padding: 48px 24px 90px; }
.play .wrap { gap: 36px; }
.play .section-head p { color: #E9DDC8; }
.play-row { display: flex; flex-wrap: wrap; gap: 28px; }
.game-card { flex: 2 1 480px; min-width: 0; background: var(--paper); color: var(--ink); border-radius: 28px; overflow: hidden; display: flex; flex-wrap: wrap; }
.game-card-pic { flex: 1 1 260px; min-width: 0; position: relative; min-height: 260px; }
.game-card-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.game-card-text { flex: 1 1 260px; min-width: 0; padding: 30px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.game-card-text h3 { font-size: 38px; line-height: 1.05; }
.game-card-text p { font-size: 18px; line-height: 1.5; }
.btn-play { align-self: flex-start; text-decoration: none; background: var(--orange); color: #FFFFFF; font-family: var(--fredoka); font-weight: 700; font-size: 22px; padding: 12px 28px; border-radius: 16px; box-shadow: 0 5px 0 var(--orange-shadow); }
.btn-play:hover { color: #FFFFFF; }
.dream-card { flex: 1 1 300px; min-width: 0; background: var(--tint); color: var(--ink); border-radius: 28px; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.dream-card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; display: block; }
.dream-card h3 { font-size: 28px; }
.dream-card p { font-size: 18px; line-height: 1.5; }

.printables { padding: 40px 24px 80px; }
.printables .wrap { gap: 32px; }
.printables .section-head p { max-width: 600px; }
.print-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.print-card { background: var(--card); border: 3px dashed var(--goldie); border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.print-card h3 { font-size: 24px; }
.print-card p { font-size: 17px; line-height: 1.5; }
.roundel { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; display: block; }
.roundel-icon { width: 120px; height: 120px; border-radius: 50%; background: var(--tint); display: flex; align-items: center; justify-content: center; }
.btn-pdf { text-decoration: none; background: var(--ink); color: var(--paper); font-family: var(--fredoka); font-weight: 600; font-size: 18px; padding: 10px 20px; border-radius: 14px; }
.btn-pdf:hover { color: var(--paper); }
.soon { font-family: var(--fredoka); font-weight: 600; font-size: 16px; color: var(--muted); }

.authors-row { padding: 0 24px 80px; }
.authors-row .wrap { display: flex; flex-wrap: wrap; gap: 28px; }
.authors { flex: 3 1 460px; min-width: 0; background: var(--card); border-radius: 28px; padding: 28px; display: flex; flex-wrap: wrap; gap: 26px; align-items: center; border: 3px solid var(--ink); }
/* WO-031 change 4: no "[Photo of Gabbi and Duke]" text; the same circle with the header's paw, ink on mustard */
.authors-photo { flex: 0 0 200px; height: 200px; border-radius: 50%; background: var(--mustard); border: 3px dashed var(--goldie); display: flex; align-items: center; justify-content: center; }
.authors-text { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.authors-text h2 { font-size: 34px; }
.authors-text p { font-size: 19px; line-height: 1.55; }
.next-book { flex: 2 1 300px; min-width: 0; background: var(--green); color: var(--paper); border-radius: 28px; padding: 28px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.next-book > svg { position: absolute; right: -24px; bottom: -24px; opacity: 0.9; }
.next-book h2 { font-size: 34px; line-height: 1.1; max-width: 300px; position: relative; }
.next-book p { font-size: 18px; line-height: 1.5; max-width: 300px; position: relative; }
.next-book .pill { position: relative; }

/* ---------- footer ---------- */
.site-footer { background: var(--tint); padding: 48px 24px 56px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.grownups { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.grownups h2 { font-size: 28px; }
.grownups p { font-size: 18px; line-height: 1.55; }
.imprint { flex: 0 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 16px; color: #4A433E; }
.imprint .brand-name { font-size: 20px; color: var(--ink); }
.imprint .amp { color: var(--link); }   /* WO-031: #B4541A on the tint is 3.97:1; the palette's link brown is 5.85:1 */

/* ---------- the game page ---------- */
.game-page { background: var(--tint); padding: 32px 24px 64px; }
.game { max-width: 1120px; margin: 0 auto; display: flex; gap: 32px; align-items: stretch; }
.game-pic { flex: 0 1 680px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.scene-frame { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 28px; overflow: hidden; border: 5px solid var(--ink); box-shadow: 0 10px 0 var(--ink); }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; margin: 0; border: 0; background: var(--ink); display: block; cursor: crosshair; }
.scene img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.scene:focus-visible { outline: 4px solid var(--orange); outline-offset: -9px; }
.pawmark, .pawcursor, .ring { position: absolute; transform: translate(-50%, -50%); pointer-events: none; }
.pawmark { width: 54px; height: 54px; }
.pawcursor { width: 46px; height: 46px; display: none; }
.scene-frame.kbd .pawcursor { display: block; }
.ring { width: 22%; aspect-ratio: 1 / 1; border-radius: 50%; border: 8px solid var(--mustard); box-shadow: 0 0 0 6px var(--ink), 0 0 40px rgba(245,177,75,0.9); }
.pic-note { font-size: 16px; color: var(--muted); text-align: center; }
.finish { position: absolute; inset: 0; background: rgba(44,43,43,0.72); display: flex; align-items: center; justify-content: center; padding: 6%; }
.finish-card { background: var(--paper); border-radius: 28px; padding: 30px 34px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; max-width: 440px; }
.finish-card img { width: 200px; max-width: 60%; height: auto; }
.finish-card h2 { font-size: clamp(26px, 4vw, 38px); line-height: 1.05; }
.finish-card p { font-size: 19px; line-height: 1.5; }
.finish-buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn-game { font-family: var(--fredoka); font-weight: 700; font-size: 20px; border: 0; border-radius: 16px; padding: 12px 24px; cursor: pointer; text-decoration: none; }
.btn-game.orange { background: var(--orange); color: #FFFFFF; box-shadow: 0 5px 0 var(--orange-shadow); }
.btn-game.ink { background: var(--ink); color: var(--paper); box-shadow: 0 5px 0 #000000; }
.btn-game.ink:hover { color: var(--paper); }
.game-panel { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.game-panel h1 { font-size: 34px; line-height: 1; }
.round-row { display: flex; align-items: center; gap: 10px; }
.round-label { font-family: var(--fredoka); font-weight: 600; font-size: 17px; background: var(--ink); color: var(--paper); padding: 5px 14px; border-radius: 999px; }
.jars { display: flex; gap: 6px; }
.mission { background: var(--card); border: 3px solid var(--ink); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.mission-label { font-family: var(--fredoka); font-weight: 600; font-size: 16px; color: var(--link); text-transform: uppercase; letter-spacing: 1px; }
.mission-text { font-family: var(--fredoka); font-weight: 700; font-size: 28px; line-height: 1.15; }
.meter-row { display: flex; align-items: center; gap: 18px; }
.nose { width: 130px; height: 120px; flex: 0 0 130px; display: flex; align-items: center; justify-content: center; }
.nose img { width: 130px; height: auto; transform-origin: 60% 80%; }
.meter { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; }
.meter-title { font-family: var(--fredoka); font-weight: 600; font-size: 16px; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 70px; }
.bar { flex: 1 1 0; border-radius: 8px; border: 3px solid var(--ink); background: #EADFCB; }
.bar-labels { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.message { min-height: 64px; font-family: var(--fredoka); font-weight: 600; font-size: 24px; line-height: 1.25; }
.game-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn-next { font-family: var(--fredoka); font-weight: 700; font-size: 22px; background: var(--orange); color: #FFFFFF; border: 0; border-radius: 16px; padding: 14px 28px; box-shadow: 0 5px 0 var(--orange-shadow); cursor: pointer; }
.tries { font-size: 16px; color: var(--muted); }
@keyframes wiggle { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@keyframes wigglefast { 0%, 100% { transform: rotate(0deg) scale(1.04); } 25% { transform: rotate(-10deg) scale(1.08); } 75% { transform: rotate(10deg) scale(1.08); } }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-16px); } }
@keyframes pop { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 70% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1); } }
@keyframes paw { 0% { transform: translate(-50%, -50%) scale(.4); opacity: 0; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.nose-idle { animation: wiggle 3s ease-in-out infinite; }
.nose-cold { animation: wiggle 2.2s ease-in-out infinite; }
.nose-warm { animation: wiggle .8s ease-in-out infinite; }
.nose-hot { animation: wigglefast .3s ease-in-out infinite; }
.nose-found { animation: hop .7s ease-in-out 3; }
.ring { animation: pop .5s ease-out both; }
.pawmark { animation: paw .25s ease-out both; }

/* ---------- 404 ---------- */
.lost { max-width: 760px; margin: 0 auto; padding: 40px 24px 90px; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.lost img { width: 260px; max-width: 70%; height: auto; }
.lost h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.08; }
.lost p { font-size: 20px; line-height: 1.5; }

/* ---------- small screens (the mock-up is drawn at 1280 px; this keeps every section working at 390 px) ---------- */
@media (max-width: 900px) {
  .game { flex-direction: column; }
  .game-pic { flex: 0 0 auto; width: 100%; }
}
@media (max-width: 600px) {
  .site-header { padding: 16px 16px 8px; }
  .site-nav { gap: 6px 16px; font-size: 17px; }
  .hero { padding: 16px 16px 56px; gap: 28px; }
  .hero-text, .hero-art { flex-basis: 100%; }
  .hero-blurb { font-size: 19px; }
  .hero-art { padding: 16px 0 28px; }
  .cover-wrap { width: min(78%, 380px); margin-left: 14%; }
  .hero-dog { left: 0; width: 40%; }
  .hero-dog svg { right: -40px; width: 50px; }
  .friends, .printables { padding-left: 16px; padding-right: 16px; }
  .play { padding: 40px 16px 72px; }
  .friend-grid { grid-template-columns: 1fr; }
  .game-card-text h3 { font-size: 32px; }
  .authors-row { padding: 0 16px 64px; }
  .authors { padding: 22px; }
  .authors-photo { flex-basis: 160px; height: 160px; }
  .next-book { padding-bottom: 104px; }               /* keeps the cabbage drawing clear of the teaser line */
  .next-book > svg { width: 116px; height: 116px; }
  .site-footer { padding: 40px 16px 48px; }
  .game-page { padding: 20px 12px 48px; }
  .scene-frame { border-radius: 20px; }
  .mission-text { font-size: 24px; }
  .nose { width: 96px; flex-basis: 96px; height: 96px; }
  .nose img { width: 96px; }
  .message { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sniff1, .sniff2, .sniff3, .bob, .nose-idle, .nose-cold, .nose-warm, .nose-hot, .nose-found, .ring, .pawmark { animation: none; }
  .btn:hover, .card:hover { transform: none; }
  .btn, .card { transition: none; }
}
