/* Cuddlebrook website, redesign draft (site-v2). One stylesheet for all
   three pages. Colors are sampled from the in-app title screen art
   (public/onboarding/cuddlebrook-title-screen.png): the lavender wall, the
   rainbow pastel sign, the teal counter, the mint rug and the deep blue
   Play pill. Outlines and flat offset shadows follow the sign and the
   in-game tiles. Nunito is self-hosted from @fontsource/nunito. */

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/nunito-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/nunito-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("assets/fonts/nunito-latin-800-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("assets/fonts/nunito-latin-900-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;
  /* Ink: the dark outline every card, tile and button wears. */
  --ink: #1b2352;
  --text: #283062;
  --text-soft: #474d7c;
  /* The lavender wall, from pale to full. */
  --lav-50: #f7f3ff;
  --lav-100: #efe7ff;
  --lav-200: #e0d3fd;
  --lav-300: #c7b4f7;
  /* The sign's pastel run. */
  --pink-100: #ffe8f3;
  --pink-200: #ffd0e6;
  --sky-100: #e4f1fb;
  --sky-200: #cbe4f6;
  --mint-100: #e2f8ed;
  --mint-200: #c2efd8;
  --mint-300: #8edfbb;
  --lemon-100: #fff9d9;
  --lemon-200: #fbf0a4;
  /* The one teal accent, from the reception counter. */
  --teal: #44c9d0;
  /* Links: a deep berry. */
  --link: #a01d63;
  --rainbow: linear-gradient(90deg, #e8cffd 0%, #fbd0e8 26%, #d0e6f6 52%, #ccf2dc 76%, #f3f5bf 100%);
  --outline: 2.5px solid var(--ink);
  --lift: 0 5px 0 var(--ink);
  --lift-sm: 0 3px 0 var(--ink);
  --radius-card: 22px;
  --radius-tile: 16px;
  /* Section headings sit well above the small labels over them. */
  --h2-size: clamp(2.1rem, 4.6vw, 3.2rem);
  --font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--lav-50);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  font-weight: 700;
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.16em;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.18;
  text-wrap: balance;
}

h1 {
  font-weight: 900;
  letter-spacing: -0.015em;
}

h2,
h3 {
  font-weight: 800;
}

p {
  text-wrap: pretty;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  z-index: 30;
  padding: 0.6rem 1rem;
  border: var(--outline);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.wrap {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--lav-100);
  border-bottom: var(--outline);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding-block: 0.85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-decoration: none;
}

/* The app icon is flat: a thin ink border so it holds its edge on the
   pale backgrounds, and no offset shadow. */
.brand img {
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 10px;
}

/* Each nav link is its own small button pill. */
.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.4rem 1.1rem;
  border: var(--outline);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--lift-sm);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.3;
  text-decoration: none;
}

.nav-links a:hover {
  background: var(--lav-100);
}

/* ---------- Shared pieces ---------- */

/* The small label above a heading. It is a label, not a button: no
   border, no drop shadow, no pill fill. A thin rainbow rule under the
   text carries the sign's colors. */
.sign,
.facts-head .eyebrow {
  display: inline-block;
  margin: 0;
  padding: 0 0 0.3rem;
  background: var(--rainbow) bottom / 100% 4px no-repeat;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.card {
  background: #fff;
  border: var(--outline);
  border-radius: var(--radius-card);
  box-shadow: var(--lift);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.1rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 1.06rem;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
}

/* The one button style: white fill, ink outline, flat lift shadow. */
.btn-quiet {
  background: #fff;
  color: var(--ink);
  border: var(--outline);
  box-shadow: var(--lift);
}

.btn:hover {
  text-decoration: none;
}

.btn-quiet:hover {
  background: var(--lav-100);
}

.btn:focus-visible {
  border-radius: 999px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  .btn {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
  .btn:hover {
    transform: translateY(-2px);
  }
  .btn:active {
    transform: translateY(3px);
  }
  .btn-quiet:active {
    box-shadow: 0 2px 0 var(--ink);
  }
}

/* A round pastel tile with a portrait inside, like the in-game animal
   tiles. Decorative. */
.pet {
  display: grid;
  place-items: center;
  width: var(--pet-size, 5.5rem);
  height: var(--pet-size, 5.5rem);
  flex: none;
  border: var(--outline);
  border-radius: 50%;
  background: var(--pet-bg, var(--lav-200));
  box-shadow: var(--lift-sm);
  overflow: hidden;
}

/* The portrait files are already scaled and centered for the circle. */
.pet img {
  width: 100%;
  height: 100%;
}

.bg-lav { --pet-bg: var(--lav-200); }
.bg-pink { --pet-bg: var(--pink-200); }
.bg-sky { --pet-bg: var(--sky-200); }
.bg-mint { --pet-bg: var(--mint-200); }
.bg-lemon { --pet-bg: var(--lemon-200); }

/* ---------- Home: hero ---------- */

.hero {
  background: var(--lav-100);
  padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  grid-template-areas:
    "copy art"
    "cta knock";
  gap: 2rem clamp(2rem, 4vw, 3.5rem);
}

.hero-copy {
  grid-area: copy;
  align-self: center;
}

.hero h1 {
  margin: 0.85rem 0 1.1rem;
  font-size: clamp(2.5rem, 4.4vw, 3.75rem);
}

.hero h1 .accent {
  background: linear-gradient(transparent 58%, var(--lemon-200) 58%, var(--lemon-200) 92%, transparent 92%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.lead {
  max-width: 34rem;
  margin: 0;
  color: var(--text);
  font-size: 1.2rem;
}

/* The real buttons sit below the art. The art itself carries no drawn
   button (see .hero-art). */
.hero-cta {
  grid-area: cta;
  align-self: start;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1rem;
  align-items: center;
}

.cta-row .btn {
  min-width: 13.5rem;
}

.store-note {
  display: inline-block;
  margin: 1.4rem 0 0;
  padding: 0.45rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--mint-100);
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 700;
}

/* The title screen art, cropped just above the in-game Play pill (source
   rows 0 to 821 of 1506 by 1045, so 1506 by 822) so the page never shows a
   drawn button that does nothing. The animals are untouched: the crop only
   removes the rug, toys and pill below their feet. Thick dark frame with a
   flat drop like the in-game sign. Nothing sits on top of it. */
.hero-art {
  grid-area: art;
  align-self: center;
  border: 3px solid var(--ink);
  border-radius: 28px;
  box-shadow: 0 7px 0 var(--ink);
  overflow: hidden;
  background: var(--lav-200);
}

.hero-art img {
  width: 100%;
  aspect-ratio: 1280 / 699;
}

/* The first-morning card sits under the art, clear of it. */
.knock {
  grid-area: knock;
  align-self: start;
  padding: 1rem 1.25rem 1.15rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.9rem;
  align-items: center;
}

.knock .pet {
  --pet-size: 3.75rem;
  grid-row: span 2;
  align-self: start;
}

.knock h2 {
  margin: 0;
  font-size: 1.2rem;
}

.knock p {
  grid-column: 2;
  margin: 0.15rem 0 0;
  font-size: 0.98rem;
  line-height: 1.55;
}

/* ---------- Home: the animal parade ---------- */

.parade {
  background: #fff;
  border-block: var(--outline);
  padding-block: 1.6rem 1.9rem;
}

.parade ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 0.9rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.parade .pet {
  --pet-size: 4.6rem;
}

.parade li:nth-child(even) {
  transform: translateY(0.55rem);
}

/* ---------- Home: sections ---------- */

.band {
  padding-block: clamp(3.25rem, 7vw, 5.5rem);
}

.band-lav { background: var(--lav-50); }
.band-mint { background: var(--mint-100); border-block: var(--outline); }
/* The studio band is compact: the card carries only a few lines. */
.band-pink { background: var(--pink-100); padding-block: clamp(1.75rem, 4vw, 2.75rem); }

.section-head {
  max-width: 44rem;
  margin: 0 auto clamp(2rem, 4vw, 2.75rem);
  text-align: center;
}

.section-head h2 {
  margin: 0.7rem 0 0;
  font-size: var(--h2-size);
}

.section-head p {
  margin: 0.8rem 0 0;
  color: var(--text-soft);
  font-size: 1.12rem;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.story-card {
  position: relative;
  padding: 3.4rem 1.5rem 1.6rem;
  margin-top: 2.6rem;
}

.story-card .pet {
  --pet-size: 5rem;
  position: absolute;
  top: -2.6rem;
  left: 1.4rem;
}

.story-card p {
  margin: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.5rem;
}

.feature {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
}

.feature:nth-child(4) {
  grid-column: 2 / span 2;
}

.feature:nth-child(5) {
  grid-column: 4 / span 2;
}

.feature .pet {
  --pet-size: 4.25rem;
}

.feature h3 {
  margin: 0.2rem 0 0;
  font-size: 1.28rem;
}

.feature p {
  margin: 0;
  color: var(--text-soft);
}

/* The facts block: a big card under a rainbow sign. */
.facts {
  max-width: 62rem;
  margin-inline: auto;
  overflow: hidden;
}

.facts-head {
  padding: clamp(1.75rem, 4vw, 2.5rem) clamp(1.25rem, 4vw, 2.5rem);
  background: var(--rainbow);
  border-bottom: var(--outline);
  text-align: center;
}

.facts-head .eyebrow {
  color: var(--ink);
  background-image: linear-gradient(#fff, #fff);
}

.facts-head h2 {
  margin: 0.7rem 0 0;
  font-size: var(--h2-size);
}

.facts-head p {
  margin: 0.55rem 0 0;
  color: var(--ink);
  font-size: 1.12rem;
}

.facts-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  list-style: none;
}

.facts-list li {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-tile);
  background: var(--lav-50);
}

.facts-list li:nth-child(4n + 2),
.facts-list li:nth-child(4n + 3) {
  background: var(--mint-100);
}

.check {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  flex: none;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--mint-300);
}

.check svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: var(--ink);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.facts-list p {
  margin: 0;
}

/* The studio card. */
.studio {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: center;
  padding: clamp(1.1rem, 3vw, 1.75rem) clamp(1.25rem, 4vw, 2.25rem);
}

/* The label sits above the heading. The icon is centered on the heading
   itself, not on the label and heading together. */
.studio-id {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem 1.25rem;
  align-items: center;
  justify-items: start;
}

.studio-id .sign {
  grid-column: 2;
  grid-row: 1;
}

.studio-id h2 {
  grid-column: 2;
  grid-row: 2;
}

.studio-id img {
  grid-column: 1;
  grid-row: 2;
  width: 96px;
  height: 96px;
  border: 2px solid var(--ink);
  border-radius: 22px;
}

.studio h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
}

.studio p {
  margin: 0;
  font-size: 1.1rem;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--teal);
  border-top: var(--outline);
  color: var(--ink);
  padding-block: 1.6rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
}

.site-footer a {
  color: var(--ink);
  font-weight: 800;
}

.copyright {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

/* ---------- Privacy and support ---------- */

.page-head {
  background: var(--lav-100);
  border-bottom: var(--outline);
  padding-block: clamp(2rem, 6vw, 3.5rem);
}

.page-head-inner {
  width: min(100% - 2rem, 50rem);
  margin-inline: auto;
}

.page-head h1 {
  margin: 1rem 0 0;
  font-size: clamp(2.1rem, 6vw, 3.2rem);
}

.page-head .lead {
  margin: 0.9rem 0 0;
  max-width: 38rem;
  font-size: 1.12rem;
}

.page-shell {
  width: min(100% - 2rem, 50rem);
  margin: clamp(1.75rem, 5vw, 3rem) auto clamp(3rem, 7vw, 5rem);
}

.doc {
  padding: clamp(1.35rem, 5vw, 3rem);
  font-size: 1.075rem;
  line-height: 1.7;
}

.doc > :first-child {
  margin-top: 0;
}

.doc > :last-child {
  margin-bottom: 0;
}

.doc h2 {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 2.4rem 0 0.7rem;
  font-size: clamp(1.3rem, 3.6vw, 1.55rem);
}

.doc h2::before {
  content: "";
  width: 0.55rem;
  height: 1.35rem;
  flex: none;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--lav-300);
}

.doc h2:nth-of-type(5n + 2)::before { background: var(--pink-200); }
.doc h2:nth-of-type(5n + 3)::before { background: var(--mint-300); }
.doc h2:nth-of-type(5n + 4)::before { background: var(--lemon-200); }
.doc h2:nth-of-type(5n + 5)::before { background: var(--sky-200); }

.doc p {
  margin: 0 0 1rem;
}

.doc ul {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.doc li {
  margin: 0.4rem 0;
  padding-left: 0.2rem;
}

.doc li::marker {
  color: var(--link);
}

.callout {
  margin: 1.5rem 0;
  padding: 1.05rem 1.25rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-tile);
  background: var(--lav-100);
}

.callout.mint {
  background: var(--mint-100);
}

.callout p {
  margin: 0;
}

.callout .noscript-note {
  margin-top: 0.75rem;
}

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
  /* Touch targets: every header link and button is at least 44 by 44
     pixels on narrow screens. */
  .brand {
    min-height: 44px;
  }
  .nav-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
  }
  .site-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .footer-links {
    gap: 0 1.4rem;
  }
  .nav-home {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .nav-home .brand {
    justify-self: start;
  }
  .nav-home .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "art"
      "copy"
      "cta"
      "knock";
    row-gap: 1.75rem;
    max-width: 44rem;
    margin-inline: auto;
  }
  .hero-copy,
  .hero-cta {
    text-align: center;
  }
  .hero .lead {
    margin-inline: auto;
  }
  .cta-row {
    justify-content: center;
  }
  .story-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 40rem;
    margin-inline: auto;
  }
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .feature,
  .feature:nth-child(4) {
    grid-column: span 1;
  }
  .feature:nth-child(5) {
    grid-column: 1 / -1;
  }
  .studio {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  body {
    font-size: 1.03rem;
  }
  .nav {
    gap: 0.75rem 0.5rem;
  }
  .brand {
    gap: 0.45rem;
    font-size: 1.15rem;
  }
  .nav-links a {
    padding: 0.3rem 0.7rem;
    font-size: 0.95rem;
  }
  .site-header .nav {
    justify-content: space-between;
  }
  .brand img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .nav-links {
    display: flex;
    width: 100%;
    text-align: center;
  }
  .nav-links li {
    flex: 1 1 0;
  }
  .nav-links a {
    white-space: nowrap;
  }
  .nav-links.one {
    width: auto;
  }
  .nav-links.one li {
    flex: none;
  }
  .nav-home .nav-links {
    justify-self: stretch;
  }
  .doc {
    padding: 1.25rem 1.1rem 1.5rem;
  }
  .callout {
    padding: 0.85rem 1rem;
  }
  .hero-grid {
    row-gap: 1.6rem;
  }
  .knock .pet {
    grid-row: auto;
    align-self: center;
  }
  .knock p {
    grid-column: 1 / -1;
    margin-top: 0.4rem;
  }
  .hero-art {
    border-radius: 20px;
    box-shadow: 0 5px 0 var(--ink);
  }
  .feature {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.6rem 1rem;
    align-items: center;
    padding: 1.25rem;
  }
  .feature h3 {
    margin: 0;
  }
  .feature p {
    grid-column: 1 / -1;
  }
  .facts-list {
    padding: 1rem;
    gap: 0.75rem;
  }
  .studio-id img {
    width: 72px;
    height: 72px;
    border-radius: 16px;
  }
  .lead {
    font-size: 1.1rem;
  }
  .btn {
    width: 100%;
  }
  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature:nth-child(5) {
    grid-column: auto;
  }
  .facts-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .facts-list li:nth-child(n) {
    background: var(--lav-50);
  }
  .facts-list li:nth-child(even) {
    background: var(--mint-100);
  }
  .parade li:nth-child(n + 9) {
    display: none;
  }
  .parade ul {
    gap: 0.8rem 0.7rem;
  }
  .parade .pet {
    --pet-size: 4.4rem;
  }
  .footer-grid {
    justify-content: center;
    text-align: center;
  }
  .footer-links {
    justify-content: center;
  }
}
