/* =====================================================================
   Kitty Game: unified art palette (mirror of palette.json)
   - Canonical ink is #5A3E36. Never pure black.
   - Derived colors only by mixing: tints toward --milk, shades toward
     --plum-shadow (16% lower-left faces, 32% lower-right faces).
   - Fur sets are classes that set the same short variable names the pet
     drawings read (--fur, --fur-light, --marking, --shade, ...), so a
     variant is a class swap: <g class="pet fur-ginger">.
   - SVG gotcha: var() is not reliable inside SVG presentation attributes
     (fill="var(--fur)"). Put it in style="fill:var(--fur)" instead.
   ===================================================================== */

:root {
  /* ---- core ---- */
  --ink:          #5A3E36;  /* all outlines */
  --ink-soft:     #8A6450;  /* motion lines, purr marks, UI subtext */
  --eye:          #3D2519;  /* pupils, dark noses */
  --paper:        #FBF3E4;  /* page / sky background */
  --milk:         #FFF8EC;  /* highlights, stitching, light fur, tint target */
  --glint:        #FFFFFF;  /* eye glints and sheens only */
  --card-edge:    #ECDCC4;  /* UI card borders */
  --plum-shadow:  #7A5C73;  /* THE shadow color */
  --blush:        #F4917F;  /* cheeks, every pet, every mood */

  /* ---- environment ---- */
  --butter-sun:   #FFE3A3;
  --peach-wall:   #F4D3B8;
  --rosy-clay:    #E08E79;
  --marmalade:    #E9A15D;
  --honey-oak:    #D9A86C;
  --toasted-oak:  #B9814F;
  --walnut:       #8A5A3B;
  --sage:         #9DB88A;
  --deep-sage:    #6F8F64;
  --dusty-blue:   #9CBFD0;

  /* ---- accents ---- */
  --heart:        #F2788A;
  --berry:        #CC5068;
  --inner:        #F6B3A6;
  --nose:         #EF8F8A;
  --mouth:        #C8605C;
  --tongue:       #F3999A;

  /* ---- shadows (Plum Shadow at fixed strengths) ---- */
  --shadow:       rgba(122, 92, 115, .25);  /* ground shadow under pets */
  --shadow-contact: rgba(122, 92, 115, .28);/* contact shadow under furniture */
  --shadow-ao:    rgba(122, 92, 115, .22);  /* floor/wall corner occlusion */
  --shadow-page:  rgba(122, 92, 115, .13);  /* blob under the whole house */

  /* ---- accessory defaults ---- */
  --acc:      var(--heart);
  --acc-dark: var(--berry);

  /* ---- UI ---- */
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Quicksand", "Trebuchet MS", system-ui, sans-serif;
}

/* =====================================================================
   Pet fur sets. Each sets the variables the pet drawings read.
   Pattern toggles: --stripes / --patches are 0 or 1 (used as opacity).
   ===================================================================== */
.fur-ginger {
  --fur: #F2B26C; --fur-light: #FFF1DC; --marking: #D9773F;
  --shade: rgba(170, 80, 30, .26);
  --stripes: 1; --patches: 0;
}
.fur-bluegray {
  --fur: #B3BFD2; --fur-light: #F4F5FA; --marking: #8B99B4;
  --shade: rgba(70, 70, 120, .22);
  --stripes: 1; --patches: 0;
}
.fur-calico {
  --fur: var(--milk); --fur-light: var(--glint);
  --patch1: var(--marmalade); --patch2: #6E5246;
  --shade: rgba(150, 100, 60, .20);
  --stripes: 0; --patches: 1;
}
.fur-midnight {
  --fur: #6A5A6E; --fur-light: #EFE4DC; --marking: #574858; --inner: #E8A9A6;
  --shade: rgba(40, 20, 50, .30);
  --stripes: 0; --patches: 0;
}
.fur-pup {
  --fur: #ECC493; --fur-light: #FFF1DC; --ear: var(--toasted-oak); --nose: var(--eye);
  --shade: rgba(160, 90, 40, .24);
  --spot: 1;
}
/* Dog variants (v1). Built only from existing palette colors. */
.fur-pup-cocoa {
  --fur: var(--toasted-oak); --fur-light: #FFF1DC; --ear: var(--walnut); --nose: var(--eye);
  --shade: rgba(160, 90, 40, .30);
  --spot: 1; --patches: 0;
}
.fur-pup-spotty {
  --fur: var(--milk); --fur-light: var(--glint); --patch1: #6E5246; --ear: #6E5246; --nose: var(--eye);
  --shade: rgba(150, 100, 60, .20);
  --spot: 1; --patches: 1;
}
.fur-oat {
  --fur: #EEDAC6; --fur-light: var(--milk);
  --shade: rgba(150, 100, 70, .24);
}
/* Guinea pig: the launch small pet (replaced the hamster). Patches are drawn as clipped layers. */
.fur-guinea-tricolor {
  --fur: var(--milk); --fur-light: var(--glint);
  --patch1: var(--marmalade); --patch2: #6E5246; --marking: var(--toasted-oak); --paw: var(--inner);
  --shade: rgba(150, 100, 60, .20);
}
/* LATER SPECIES: the hamster is not in the launch set (the guinea pig replaced it). Kept for hamster v2. */
.fur-hamster-gold {
  --fur: #F1B97C; --fur-light: var(--milk); --marking: #D9894A; --paw: var(--inner);
  --shade: rgba(170, 90, 40, .24);
}
.fur-budgie-green {
  --fur: #A6D77F; --fur-light: #D2EEB4; --face: #FFF0A6; --wing: #8FC96E;
  --marking: #6B7A45; --tail: #74B6CB; --beak: #F5C07E;
  --cere: var(--dusty-blue); --feet: var(--inner);
  --shade: rgba(40, 110, 50, .22);
}

:root {
  --ink: #5a3e36;
  --ink-soft: #8a6450;
  --paper: #fbf3e4;
  --milk: #fff8ec;
  --card-edge: #ecdcc4;
  --butter-sun: #ffe3a3;
  --honey-oak: #d9a86c;
  --marmalade: #e9a15d;
  --rosy-clay: #e08e79;
  --sage: #9db88a;
  --deep-sage: #6f8f64;
  --dusty-blue: #9cbfd0;
  --walnut: #8a5a3b;
  --berry-dark: #a63a55; /* Berry toward Plum Shadow: 6:1 on Milk */
  --focus: #3f7f9c; /* Dusty Blue, deepened for a visible focus ring */
  --font:
    "Nunito", ui-rounded, "SF Pro Rounded", "Varela Round", "Quicksand", "Trebuchet MS", system-ui,
    sans-serif;
  color-scheme: light;
}

.ln { fill: none; stroke: var(--ink); stroke-width: 3.4; stroke-linejoin: round; stroke-linecap: round; }
.pet { filter: url(#picturebook); --stripes: 0; --patches: 0; --spot: 1; }
.pet.cat { --stripes: 1; }
.pet.fur-calico { --stripes: 0; --patches: 1; }
.pet.fur-midnight { --stripes: 0; }
.pet.fur-pup-spotty { --patches: 1; }

/* The parents' website (spec 15): the dashboard's tokens (prepended by the build, with the art
   palette), plain CSS, mobile-first, works from 320 px. Ink #5A3E36, never black. No scripts. */
@font-face {
  font-family: "Nunito";
  src: url("/static/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
}
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
}
.wrap.narrow {
  max-width: 760px;
}
h1,
h2,
h3 {
  line-height: 1.2;
  font-weight: 900;
  margin: 0 0 0.5em;
}
h1 {
  font-size: clamp(1.7rem, 4.6vw, 2.4rem);
}
h2 {
  font-size: clamp(1.35rem, 3.4vw, 1.75rem);
}
h3 {
  font-size: 1.1rem;
}
p {
  margin: 0 0 0.8em;
}
a {
  color: var(--ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--walnut);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 8px;
}
.muted {
  color: var(--ink-soft);
}
.small {
  font-size: 0.9rem;
}
.center {
  text-align: center;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--milk);
  padding: 8px 14px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  z-index: 10;
}
.skip:focus {
  left: 16px;
}
main:focus {
  outline: none;
}
.ic {
  display: block;
  flex: none;
  width: 32px;
  height: 32px;
  overflow: visible;
}

/* ---- buttons: Play is the biggest thing on every page (spec 15 §1) ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 6px 16px 6px 10px;
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  background: var(--milk);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--card-edge);
  white-space: nowrap;
}
.btn:hover {
  color: var(--ink);
  background: #fffdf7;
}
.btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--card-edge);
}
.btn .ic {
  width: 34px;
  height: 34px;
}
.btn.play {
  background: var(--butter-sun);
  box-shadow: 0 3px 0 var(--honey-oak);
}
.btn.play:hover {
  background: #ffe9b6;
}
.btn.play.giant {
  min-height: 96px;
  min-width: min(100%, 320px);
  padding: 10px 40px 10px 26px;
  font-size: 2.1rem;
  gap: 12px;
  border-width: 4px;
  box-shadow: 0 6px 0 var(--honey-oak);
}
.btn.play.giant .ic {
  width: 68px;
  height: 68px;
}
.btn.play.giant:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--honey-oak);
}

/* ---- header ---- */
.top {
  padding-top: env(safe-area-inset-top);
  border-bottom: 3px solid var(--card-edge);
  background: var(--paper);
}
.top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding-block: 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 1rem;
  line-height: 1.05;
  text-decoration: none;
  margin-right: auto;
}
.brand .mark {
  width: 46px;
  height: 46px;
  flex: none;
}
.nav {
  display: none;
  gap: 4px;
}
.nav a {
  font-weight: 800;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 999px;
}
.nav a[aria-current="page"],
.nav a:hover {
  background: var(--milk);
  box-shadow: inset 0 0 0 2.5px var(--card-edge);
}
.top-btns {
  display: flex;
  gap: 8px;
  align-items: center;
}
.top-btns .btn {
  padding: 4px 12px 4px 6px;
  min-height: 46px;
  font-size: 1rem;
  gap: 4px;
}
@media (max-width: 400px) {
  .top-row {
    gap: 6px;
  }
  .brand {
    font-size: 0.88rem;
    gap: 6px;
  }
  .brand .mark {
    width: 40px;
    height: 40px;
  }
  .top-btns {
    gap: 6px;
  }
}
@media (max-width: 340px) {
  .brand span {
    display: none;
  }
}
@media (min-width: 720px) {
  .nav {
    display: flex;
  }
  .brand {
    font-size: 1.15rem;
    margin-right: 12px;
  }
  .top-btns {
    margin-left: auto;
  }
}

/* ---- sections ---- */
main > section {
  padding-block: 36px;
}
.band {
  background: var(--milk);
  border-block: 3px solid var(--card-edge);
}
.h-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.h-row a {
  font-weight: 800;
}
.card {
  background: var(--milk);
  border: 3px solid var(--card-edge);
  border-radius: 22px;
  box-shadow: 0 3px 0 var(--card-edge);
  padding: 18px;
}
.band .card {
  background: var(--paper);
}

/* ---- hero ---- */
.hero {
  padding-block: 20px 36px;
}
.hero-grid {
  display: grid;
  gap: 24px;
  align-items: center;
}
.hero-text {
  text-align: center;
}
.hero-logo {
  display: block;
  width: min(100%, 360px);
  height: auto;
  margin: 0 auto 4px;
}
.tagline {
  font-size: clamp(1.2rem, 3.6vw, 1.5rem);
  font-weight: 800;
  margin-bottom: 20px;
}
.parent-link {
  display: inline-block;
  margin-top: 18px;
  font-weight: 800;
  padding: 6px 0;
}
@media (min-width: 860px) {
  .hero {
    padding-block: 40px 56px;
  }
  .hero-grid {
    grid-template-columns: 5fr 6fr;
    gap: 40px;
  }
}

/* ---- pictures (generated screenshots, or the art in the same frame) ---- */
.shot {
  display: block;
  width: 100%;
  height: auto;
  border: 4px solid var(--milk);
  outline: 3px solid var(--card-edge);
  border-radius: 20px;
  box-shadow: 0 6px 0 var(--card-edge);
  background: var(--butter-sun);
}
.shot-art {
  aspect-ratio: 3 / 2;
  display: grid;
  place-items: center;
  background: linear-gradient(var(--butter-sun), #fff1cc);
}
.shot-ic {
  width: 42%;
  height: auto;
  max-height: 70%;
}

.hero-pic .shot {
  transform: rotate(1.2deg);
}

/* ---- promises ---- */
.promises {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.promise {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  height: 100%;
  padding: 16px 10px;
  text-decoration: none;
}
.promise strong {
  font-size: 1.05rem;
  line-height: 1.2;
}
.promise span {
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.promise-ic {
  width: 64px;
  height: 64px;
}
@media (min-width: 860px) {
  .promises {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
  }
  .promise {
    padding: 22px 16px;
  }
}

/* ---- what kids do ---- */
.kids-do {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 14px;
}
.kids-do figure {
  margin: 0;
}
.kids-do figcaption {
  font-weight: 800;
  margin-top: 10px;
  line-height: 1.3;
}
@media (min-width: 860px) {
  .kids-do {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
  }
}

/* ---- for parents ---- */
.two-col {
  display: grid;
  gap: 24px;
}
@media (min-width: 860px) {
  .two-col {
    grid-template-columns: 3fr 2fr;
    gap: 40px;
    align-items: start;
  }
}
.ticks {
  padding-left: 0;
  list-style: none;
}
.ticks li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.35em;
  width: 16px;
  height: 9px;
  border-left: 3.5px solid var(--deep-sage);
  border-bottom: 3.5px solid var(--deep-sage);
  transform: rotate(-45deg);
}
.steps {
  counter-reset: s;
  list-style: none;
  padding: 0;
  margin: 0;
}
.steps li {
  counter-increment: s;
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  font-weight: 700;
}
.steps li::before {
  content: counter(s);
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--butter-sun);
  border: 3px solid var(--ink);
  font-weight: 900;
}

/* ---- news ---- */
.news-grid {
  display: grid;
  gap: 18px;
}
@media (min-width: 860px) {
  .news-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.news-list {
  display: grid;
  gap: 18px;
}
.news-card {
  display: grid;
  gap: 12px;
  align-content: start;
}
.news-card h3 a {
  text-decoration: none;
}
.news-card h3 a:hover {
  text-decoration: underline;
}
.news-card p:last-child {
  margin: 0;
}
.news-pic .shot {
  border-radius: 14px;
}
.tag {
  background: var(--rosy-clay);
  color: var(--milk);
  font-weight: 800;
  padding: 0 8px;
  border-radius: 999px;
}

/* ---- FAQ (details: opens without any script) ---- */
.faq {
  padding: 0;
  margin-bottom: 12px;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  min-height: 56px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  margin-left: auto;
  font-weight: 900;
  font-size: 1.5rem;
  line-height: 1;
}
.faq[open] summary::after {
  content: "–";
}
.faq summary h3 {
  margin: 0;
  font-size: 1.05rem;
}
.faq > :not(summary) {
  margin-inline: 18px;
}
.faq > :last-child {
  margin-bottom: 16px;
}

/* ---- text pages ---- */
.page {
  padding-block: 28px 40px;
}
.prose ul {
  padding-left: 1.2em;
}
.prose li {
  margin-bottom: 6px;
}
.prose .shot {
  margin: 8px 0 22px;
}
.sec {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.sec h2 {
  font-size: 1.25rem;
}
.sec > div > :last-child {
  margin-bottom: 0;
}
.sec-ic {
  width: 56px;
  height: 56px;
}
.note {
  background: var(--butter-sun);
  border: 3px solid var(--honey-oak);
  border-radius: 16px;
  padding: 12px 16px;
}
.draft-ribbon {
  margin: 0;
  text-align: center;
  font-weight: 800;
  background: var(--rosy-clay);
  color: var(--milk);
  padding: 6px 12px;
}
.play-again {
  margin-top: 28px;
}
.page.center .hero-logo {
  width: min(100%, 280px);
}

/* ---- footer ---- */
.foot {
  border-top: 3px solid var(--card-edge);
  padding-block: 24px calc(28px + env(safe-area-inset-bottom));
  text-align: center;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  margin-bottom: 10px;
  font-weight: 800;
  line-height: 2.4; /* roomy tap rows without padding the links */
}
.contact .support {
  font-weight: 800;
}

@media (prefers-reduced-motion: reduce) {
  .btn:active {
    transform: none;
  }
}
