/* Palette pulled from the Little Preppers cover */
:root {
  --sky: #a9d6f5;        /* crayon sky */
  --sky-light: #e2f2fd;
  --navy: #1d2b6b;       /* subtitle lettering */
  --outline: #181b1e;    /* thick title outline */
  --banner: #fbf3a6;     /* pale-yellow ribbon banner */
  --sun: #ffd23a;        /* sun and badge yellow */
  --paw: #e2262c;        /* red paw prints / first-aid cross */
  --grass: #6cc24a;      /* trees and Timber's pack */
  --pack-blue: #3b8fd9;  /* Banjo's pack */
  --gold: #d9a43a;       /* "Written by Nurses" seal */
  --paper: #fffdf5;
  --ink: #23262e;
  --radius: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

/* Bubble lettering like the cover title: white fill, thick dark outline */
h1, h2, .logo {
  font-family: "Chewy", "Comic Sans MS", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.05;
  margin: 0 0 .4em;
  color: #fff;
  -webkit-text-stroke: 0.14em var(--outline);
  paint-order: stroke fill;
  letter-spacing: .02em;
}

h2 {
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  text-align: center;
  text-shadow: 0 5px 0 var(--outline);
}

h3 {
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 .4em;
}

a { color: var(--navy); }

img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.narrow { max-width: 700px; margin-left: auto; margin-right: auto; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 20px;
  padding: 10px 20px;
  background: var(--banner);
  border-bottom: 4px solid var(--outline);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 2.25rem;
  text-decoration: none;
  margin: 0;
  -webkit-text-stroke-width: 0.15em;
}
.logo .paw { width: 34px; height: 34px; flex: none; transform: rotate(-12deg); }
.nav nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.nav nav a {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  font-size: 1.05rem;
}
.nav nav a:hover { color: var(--paw); }

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 14px 34px;
  border-radius: 999px;
  background: var(--sun);
  color: var(--navy);
  border: 4px solid var(--outline);
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  text-decoration: none;
  box-shadow: 0 6px 0 var(--outline);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(2px); box-shadow: 0 4px 0 var(--outline); }
.btn:active { transform: translateY(6px); box-shadow: 0 0 0 var(--outline); }
.btn-navy { background: var(--paw); color: #fff; margin-top: 10px; }

/* HERO: crayon-sky background like the cover */
.hero {
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,.18) 0 3px, transparent 3px 9px),
    linear-gradient(180deg, var(--sky) 0%, var(--sky-light) 100%);
}
.hero {
  padding: 56px max(20px, calc((100% - 1100px) / 2 + 20px));
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 44px;
  align-items: center;
  border-bottom: 4px solid var(--outline);
}
.sun {
  position: absolute;
  top: 6px;
  left: 10px;
  width: 150px;
  height: 150px;
  pointer-events: none;
}
.hero-text, .hero-cover { position: relative; z-index: 1; }

.tag {
  display: inline-block;
  background: #fff;
  color: var(--navy);
  border: 3px solid var(--outline);
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.35;
  padding: 8px 20px 12px;
  border-radius: 22px;
  margin: 0 0 18px;
}
@media (min-width: 761px) {
  .tag { margin-left: 150px; }
}
.nurses {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  font-weight: 700;
  font-size: 1.12em;
}
.swoosh {
  position: absolute;
  left: -2%;
  bottom: -9px;
  width: 104%;
  height: 12px;
  overflow: visible;
}
.hero h1 {
  font-size: clamp(3.4rem, 10vw, 6rem);
  text-shadow: 0 6px 0 var(--outline);
  margin-bottom: .2em;
}
.tm {
  font-family: "Nunito", sans-serif;
  font-size: .22em;
  vertical-align: super;
  -webkit-text-stroke: 0;
  text-shadow: none;
  color: var(--outline);
  margin-left: .1em;
}
.banner {
  display: inline-block;
  margin: 0 0 10px;
  padding: 8px 26px;
  background: var(--banner);
  border: 3px solid var(--outline);
  border-radius: 14px;
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  color: var(--navy);
}
.banner::before, .banner::after { content: "🐾"; margin: 0 .4em; filter: saturate(1.4); }
.motto {
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  color: var(--navy);
  margin: 0 0 18px;
}
.motto span { color: var(--paw); }
.lead { font-size: 1.15rem; margin: 0 0 28px; }
.hero-cover img {
  margin: 0 auto;
  border-radius: 12px;
  transform: rotate(2.5deg);
  border: 5px solid var(--outline);
  box-shadow: 10px 12px 0 rgba(24, 27, 30, .85);
  max-height: 620px;
  width: auto;
}

/* BANDS */
.band { padding: 72px 0; border-bottom: 4px solid var(--outline); }
.band-sky { background: var(--sky-light); }
.band-paper { background: var(--paper); }
.band-sun { background: var(--banner); }

/* PEEK INSIDE */
.pages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
  margin-top: 36px;
}
.page {
  display: block;
  margin: 0;
  background: #fff;
  border: 4px solid var(--outline);
  border-radius: 14px;
  padding: 12px 12px 6px;
  box-shadow: 8px 8px 0 var(--sky);
  transition: transform .2s;
  text-decoration: none;
  cursor: pointer;
}
.page:nth-child(1) { transform: rotate(-1.5deg); }
.page:nth-child(3) { transform: rotate(1.5deg); }
.page:hover, .page:focus-visible { transform: rotate(0) scale(1.03); }
.page:active { transform: rotate(-3deg) scale(.98); transition-duration: .08s; }
.page:nth-child(even):active { transform: rotate(3deg) scale(.98); }
.page img { border-radius: 6px; }
.page-label {
  display: block;
  text-align: center;
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  color: var(--navy);
  padding: 8px 0 4px;
}
.free-line {
  text-align: center;
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: clamp(1.25rem, 3.5vw, 1.6rem);
  color: var(--paw);
  margin: -6px 0 6px;
}
.download-row { margin: 40px 0 0; }
.free-word { font-size: 1em; font-weight: inherit; }
.free-line { margin-bottom: 14px; }

/* OPEN BOOK SPREAD */
.spread-block { margin-top: 72px; }
.spread-heading {
  text-align: center;
  font-size: clamp(1.7rem, 4.5vw, 2.3rem);
}
.spread-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 44px;
  justify-items: center;
  margin-top: 30px;
}
.open-book {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  padding: 10px;
  margin: 0;
  background: #fff;
  border: 5px solid var(--outline);
  border-radius: 16px;
  box-shadow: 10px 12px 0 rgba(24, 27, 30, .85);
  transition: transform .2s;
  cursor: zoom-in;
  font: inherit;
}
.open-book:hover, .open-book:focus-visible { transform: scale(1.005); }
.open-book img { width: 100%; height: auto; }
/* faint book crease down the center */
.open-book::after {
  content: "";
  position: absolute;
  top: 10px; bottom: 10px; left: 50%;
  width: 6px;
  transform: translateX(-50%);
  background: linear-gradient(90deg,
    rgba(0,0,0,0) 0%, rgba(0,0,0,.09) 50%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}
.tap-hint { display: none; }
.nurse-note {
  width: 100%;
  max-width: 760px;
  background: #fff;
  border: 4px solid var(--outline);
  border-radius: 22px;
  padding: 28px 34px;
  text-align: center;
  box-shadow: 8px 8px 0 var(--sky);
}
.nurse-note p { margin: 0 0 14px; font-size: clamp(1.2rem, 3.2vw, 1.5rem); font-weight: 700; line-height: 1.45; }
.nurse-note-title {
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 4.5vw, 2.1rem) !important;
  color: var(--navy);
}
.nurse-note .nurse-note-from { margin: 0; font-size: 1rem; font-weight: 600; color: #5a5f6b; }

.book-zoom {
  width: 100vw; max-width: 100vw;
  height: 100dvh; max-height: 100dvh;
  margin: 0; padding: 0;
  border: 0;
  background: #fff;
  overflow: auto;
}
.book-zoom::backdrop { background: rgba(24, 27, 30, .8); }
.zoom-pages { display: flex; width: max(100%, 900px); }
.zoom-pages img { width: 50%; height: auto; }
.zoom-close {
  position: fixed;
  top: 12px; right: 12px;
  z-index: 2;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 3px solid var(--outline);
  background: var(--sun);
  color: var(--navy);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

/* CARDS */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 36px;
}
.card {
  background: #fff;
  border: 4px solid var(--outline);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 6px 0 var(--outline);
}
.card p { margin: 0; }
.icon { font-size: 2.6rem; margin-bottom: 8px; }

/* FRIENDS */
.friends {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  margin-top: 36px;
}
.friend {
  border: 4px solid var(--outline);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 6px 0 var(--outline);
}
.friend p { margin: 0; }
.friend-timber { background: #dff3d3; }
.friend-banjo { background: #d6e9fb; }
.avatar {
  width: 190px; height: 190px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 5px solid var(--outline);
  object-fit: cover;
}
.friend-timber .avatar { box-shadow: 0 0 0 6px var(--grass); }
.friend-banjo .avatar { box-shadow: 0 0 0 6px var(--pack-blue); }
.friend h3 { font-size: 2.1rem; }

/* GROUPS */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 24px 0; }
.chips span {
  background: #fff;
  border: 3px solid var(--outline);
  padding: 6px 18px;
  border-radius: 999px;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  color: var(--navy);
}

/* COPY EMAIL */
/* message sits in reserved space under the button/link, so nothing moves when it appears */
.copy-row {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 52px;
}
.copied {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  translate: -50% 0;
  white-space: nowrap;
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  background: var(--navy);
  border: 3px solid var(--outline);
  border-radius: 999px;
  padding: 4px 14px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.copied:empty { display: none; }
.copied.show { opacity: 1; transform: none; }
#groups .copy-row { margin-bottom: 40px; }
#groups .copy-row .btn { margin-top: 0; }
.email.copy-row { margin-top: 0; }
.email a { cursor: copy; }

/* CONTACT */
.email {
  font-family: "Fredoka", sans-serif;
  font-size: clamp(1.15rem, 4vw, 1.7rem);
  font-weight: 700;
  word-break: break-word;
}
.handle { margin-bottom: 18px; }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.social {
  padding: 10px 26px;
  border-radius: 999px;
  border: 3px solid var(--outline);
  color: #fff;
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s;
}
.social:hover { transform: scale(1.06); }
.ig { background: linear-gradient(45deg, #f9a825, #e91e63, #7b1fa2); }
.yt { background: #e62117; }
.fb { background: #1877f2; }
.tt { background: #111; }

/* FOOTER */
.footer {
  background: var(--navy);
  color: #fff;
  text-align: center;
  padding: 26px 20px;
  font-size: .95rem;
}
.footer p { margin: 0 0 4px; }
.footer .fine-print { margin-top: 10px; font-size: .78rem; opacity: .8; }

/* BUY ROW + SEAL */
.buy-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.buy-row-center { justify-content: center; margin-top: 8px; }
.seal {
  width: 92px;
  height: auto;
  transform: rotate(8deg);
  filter: drop-shadow(3px 4px 0 rgba(24, 27, 30, .35));
}
.band-cta {
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,.18) 0 3px, transparent 3px 9px),
    linear-gradient(180deg, var(--sky) 0%, var(--sky-light) 100%);
  padding: 56px 0;
}

/* ABOUT: authors photo */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
  margin-top: 28px;
}
.about p { margin: 0; font-size: 1.1rem; }
.authors-photo { margin: 0; }
.authors-photo img {
  border: 5px solid var(--outline);
  border-radius: 28px;
  box-shadow: 8px 8px 0 var(--outline);
}
.authors-photo figcaption {
  margin-top: 14px;
  text-align: center;
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  color: var(--navy);
}

/* FRIENDS: optional real photos beside the cartoon */
.portraits { display: flex; justify-content: center; align-items: flex-start; gap: 18px; margin-bottom: 14px; }
.portraits .avatar { margin: 0; }
.real-photo { display: none; margin: 0; }
.real-photo.loaded { display: block; }
.real-photo img {
  width: 150px; height: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--outline);
  background: #fff;
}
.real-photo figcaption {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: .9rem;
  color: var(--navy);
  margin-top: 4px;
}

/* MOBILE */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 92px; }
  .hero-cover { order: -1; }
  .hero-cover img { max-height: 380px; }
  .nav { justify-content: center; }
  .nav nav { justify-content: center; gap: 0 4px; }
  .nav nav a { font-size: 1rem; padding: 10px 6px; }
  .logo { font-size: 2rem; padding: 6px 0; }
  .nav { position: static; }   /* don't pin a two-row menu over a small screen */
  .email a { display: inline-block; padding: 10px 4px; }
  .banner { padding: 6px 10px; font-size: 1.02rem; white-space: nowrap; }
  .banner::before, .banner::after { margin: 0 .25em; }
  .tag { font-size: 1.05rem; }
  .buy-row { justify-content: center; }
  .seal { width: 78px; }
  .sun { width: 110px; height: 110px; top: 4px; left: 6px; }
  .about { grid-template-columns: 1fr; gap: 24px; }
  .about p { text-align: center; }
  .avatar, .real-photo img { width: 160px; height: 160px; }
  .social { padding: 12px 22px; }
  .chips span { padding: 8px 16px; }
  .spread-row { grid-template-columns: 1fr; gap: 28px; }
  .open-book { padding: 6px; border-width: 4px; box-shadow: 6px 7px 0 rgba(24, 27, 30, .85); }
  .open-book::after { top: 6px; bottom: 6px; width: 4px; }
  .tap-hint {
    display: block;
    position: absolute;
    right: 10px; bottom: 10px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--navy);
    color: #fff;
    font-family: "Fredoka", sans-serif;
    font-weight: 600;
    font-size: .85rem;
  }
  .nurse-note { padding: 22px 20px; }
}
