@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Lora:ital,wght@0,400;0,500;1,400&display=swap");

/* ======================================================================
   MITZY AND FRIENDS - the island look
   Rewritten 24 September 2026. The old version was a white page with grey
   serif text and square boxes, which read as institutional. This one is
   built out of coloured islands with wavy edges, the way a children's
   picture-book site should be.

   EVERY OLD CLASS NAME IS KEPT so no page markup had to change.
   The palette is lifted from the paintings themselves: the kitchen ochre,
   the living room green, the bedroom purple, Mommy's red.

   It is always the warm daylight palette, in every browser and every
   device theme. A children's picture-book site should never go dark.
   ====================================================================== */
:root {
  color-scheme: light;

  /* the islands */
  --sky:        #8ed4ef;
  --ochre:      #f7d189;
  --green:      #a8d38c;
  --green-deep: #94c878;
  --plum:       #b9a8de;
  --cream:      #fdf6e9;

  /* ink and accents */
  --paper:      #fdf6e9;
  --paper-deep: #f7efdd;
  --ink:        #4a3b2f;
  --ink-soft:   #6c5a4a;
  --rule:       #e5d8c2;
  --dress:      #d4544a;
  --sun:        #ffc94a;
  --pram:       #2f7f86;
  --wood:       #8c5b3a;
  --bubble:     #f0c7d2;

  /* the chunky flat drop shadow that makes things feel like cut paper */
  --pop:        0 8px 0 rgba(0,0,0,.13);
  --pop-sm:     0 5px 0 rgba(0,0,0,.12);
  --shadow:     0 6px 0 rgba(0,0,0,.10);

  /* the wobble, reused so every rounded thing is the same family */
  --blob:       58% 42% 55% 45% / 45% 52% 48% 55%;
  --blob-btn:   44% 56% 52% 48% / 58% 42% 55% 45%;
  --blob-tile:  46% 54% 50% 50% / 52% 48% 52% 48%;
}

*,*::before,*::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Lora, Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.72;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

.wrap   { width: min(100% - 2.5rem, 68rem); margin-inline: auto; }
.narrow { width: min(100%, 34rem); margin-inline: auto; }

/* ---- type ------------------------------------------------------------- */
h1, h2, h3 {
  font-family: Fredoka, system-ui, sans-serif;
  font-weight: 700;
  text-wrap: balance;
  margin: 0;
  line-height: 1.08;
}
h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 3.8vw, 2.6rem); }
h3 { font-size: 1.18rem; font-weight: 600; }
p  { margin: 0 0 1.1rem; }
a  { color: var(--pram); text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible, button:focus-visible {
  outline: 3px solid var(--dress); outline-offset: 3px; border-radius: 4px;
}

.label {
  font-family: Fredoka, system-ui, sans-serif;
  font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 600;
}
.lede { font-size: 1.16rem; }

/* ---- islands ---------------------------------------------------------- */
/* A page is a stack of coloured islands separated by wavy edges. Add
   .isle to a section and one of the colour classes. The wave sits at the
   bottom of an island and is filled with the NEXT island's colour. */
.isle        { position: relative; padding: clamp(2.5rem,6vw,4.5rem) 0 0; }
.isle.sky    { background: var(--sky); }
.isle.ochre  { background: var(--ochre); }
.isle.green  { background: var(--green); }
.isle.plum   { background: var(--plum); }
.isle.cream  { background: var(--cream); }
.isle > .wrap { position: relative; }

.wave { display: block; width: 100%; height: clamp(60px,8vw,120px); margin-top: clamp(2rem,5vw,3.5rem); }
.wave.tight { margin-top: 0; }

/* a soft speech-bubble panel for a short piece of text */
.blob {
  background: var(--cream);
  padding: clamp(1.4rem,4vw,2.6rem) clamp(1.6rem,5vw,3.2rem);
  border-radius: var(--blob);
  box-shadow: 0 10px 0 rgba(0,0,0,.07);
  max-width: 36rem;
}

/* ---- hero ------------------------------------------------------------- */
header.hero {
  padding: clamp(2.6rem, 7vw, 5rem) 0 clamp(2.2rem, 5vw, 3.6rem);
  background: var(--sky);
  position: relative;
}
header.hero .lede,
header.hero h1,
header.hero .label { color: var(--ink); }
.hero-grid {
  display: grid; gap: clamp(1.6rem, 4vw, 3rem); align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 56rem) { .hero-grid { grid-template-columns: 1fr .82fr; } }
.hero p.lede { font-size: 1.22rem; max-width: 34rem; }
.hero .cover { justify-self: center; max-width: 24rem; width: 100%; }
.hero .cover img {
  width: 100%; display: block; border-radius: 16px;
  box-shadow: var(--pop);
}
.rule-tiny {
  width: 3.4rem; height: 5px; background: var(--dress); border: 0;
  margin: 1.4rem 0; border-radius: 99px;
}

/* ---- a page from a book ----------------------------------------------- */
.spread { padding: clamp(2.6rem, 6vw, 4.5rem) 0; }
.plate {
  width: min(100%, 46rem); margin-inline: auto;
  border-radius: 20px; overflow: hidden;
  box-shadow: var(--pop); background: var(--cream);
}
.plate img { width: 100%; display: block; }
.caption {
  width: min(100%, 42rem); margin: 1.15rem auto 0; text-align: center;
  font-size: 1.06rem; color: var(--ink);
}
.caption em { color: var(--ink-soft); }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---- bands ------------------------------------------------------------ */
/* Kept for the pages that still use them. A band is now a cream island and
   a tinted band is the ochre one, so old markup picks up the new look. */
.band { padding: clamp(3rem, 7vw, 5rem) 0; background: var(--cream); }
.band.tint { background: var(--ochre); border-block: 0; }
.band h2 + p { margin-top: 1.2rem; }

/* ---- one book, cover beside words ------------------------------------- */
.book {
  display: grid; gap: clamp(1.8rem, 4vw, 3rem); align-items: start;
  grid-template-columns: 1fr;
}
@media (min-width: 46rem) { .book { grid-template-columns: 15rem 1fr; } }
.book img {
  width: 100%; display: block; border-radius: 16px; box-shadow: var(--pop);
}

/* ---- buttons ---------------------------------------------------------- */
.btn {
  display: inline-block; background: var(--dress); color: #fff;
  padding: .75em 1.5em; text-decoration: none;
  font-family: Fredoka, system-ui, sans-serif; font-weight: 600; font-size: 1.05rem;
  border: 0; border-radius: var(--blob-btn); box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
  margin: .25rem .25rem .25rem 0; cursor: pointer;
}
.btn:hover { transform: translateY(-4px) rotate(-1.5deg); box-shadow: 0 10px 0 rgba(0,0,0,.14); }
.btn.sun   { background: var(--sun); color: var(--ink); }
.btn.teal  { background: var(--pram); color: #fff; }
.meta { font-size: .95rem; color: var(--ink-soft); margin-top: 1rem; }

/* ---- people ----------------------------------------------------------- */
.people { display: grid; gap: 2.4rem; grid-template-columns: 1fr; }
@media (min-width: 46rem) { .people { grid-template-columns: 1fr 1fr; } }
.people h3 { margin-bottom: .5rem; }
.people p { color: var(--ink-soft); }

/* ---- footer ----------------------------------------------------------- */
footer {
  padding: 2.6rem 0 3rem; border-top: 0;
  background: var(--ink); color: #f3e7d6; font-size: .95rem;
}
footer a { color: var(--sun); }
footer .brand {
  font-family: Fredoka, system-ui, sans-serif; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; font-size: .9rem;
  color: #fff;
}

/* ---- site nav --------------------------------------------------------- */
nav.site { border-bottom: 0; background: var(--cream); position: relative; z-index: 50; }
nav.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 0; gap: 1rem; flex-wrap: wrap;
}
nav.site .brand { display: block; line-height: 0; text-decoration: none; }
nav.site .brand img { display: block; width: auto; height: clamp(2.6rem, 5.6vw, 3.6rem); }
nav.site .links { display: flex; gap: clamp(.7rem, 2vw, 1.6rem); align-items: center; flex-wrap: wrap; }
nav.site .links a {
  font-family: Fredoka, system-ui, sans-serif; font-weight: 600; font-size: 1.02rem;
  color: var(--ink); text-decoration: none; padding: .25rem .1rem;
}
nav.site .links a:hover { color: var(--dress); }
nav.site .links a.here {
  color: var(--dress); border-bottom: 3px solid var(--dress); padding-bottom: 2px;
}

/* ---- cover shelf ------------------------------------------------------ */
.shelf {
  display: flex; gap: clamp(1rem, 2.6vw, 1.9rem); justify-content: center;
  flex-wrap: wrap; margin: 2rem 0 1.6rem; align-items: flex-start;
}
.shelf a { display: block; width: clamp(8rem, 17vw, 11rem); text-decoration: none; }
.shelf img {
  width: 100%; height: auto; display: block; border-radius: 14px;
  box-shadow: var(--pop); transition: transform .2s ease;
}
.shelf a:hover img { transform: translateY(-8px) rotate(-1.5deg); }

/* ---- cards ------------------------------------------------------------ */
.cards { display: grid; gap: 1.6rem; grid-template-columns: 1fr; margin-top: 1.8rem; }
@media (min-width: 46rem) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
  background: var(--cream); border: 0; border-radius: 22px;
  padding: 1.7rem 1.8rem; box-shadow: var(--pop);
}
.band.tint .card, .isle .card { background: var(--cream); }
.card h3 { margin-bottom: .55rem; }
.card p { color: var(--ink-soft); font-size: 1rem; }
.card .btn { margin-top: .3rem; }
.card .meta { margin-top: .8rem; }

/* ---- picture doors ---------------------------------------------------- */
/* A big round picture that is itself the link. The art is the door. */
.doors {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(1rem, 3vw, 2rem); max-width: 1000px; margin: 0 auto;
}
.door { text-decoration: none; text-align: center; display: block; transition: transform .2s ease; color: var(--ink); }
.door:hover { transform: translateY(-8px); }
.door .pic {
  background: var(--cream); border-radius: var(--blob-tile); box-shadow: var(--pop);
  aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 10%;
}
.door .pic img { max-height: 100%; width: auto; object-fit: contain; }
.door span {
  display: block; margin-top: .8rem; font-weight: 600;
  font-family: Fredoka, system-ui, sans-serif; font-size: clamp(1rem, 2vw, 1.22rem);
}

/* ---- the For Parents and Teachers dropdown ---------------------------- */
/* details and summary rather than a hover menu, because a hover menu does
   nothing on a phone and most of these downloads happen on one. */
nav.site .navdrop { position: relative; }
nav.site .navdrop > summary {
  list-style: none; cursor: pointer;
  font-family: Fredoka, system-ui, sans-serif; font-weight: 600; font-size: 1.02rem;
  color: var(--ink);
}
nav.site .navdrop > summary::-webkit-details-marker { display: none; }
nav.site .navdrop > summary::after { content: " \25be"; font-size: .8em; }
nav.site .navdrop > summary:hover { color: var(--dress); }
nav.site .navdrop.here-drop > summary {
  color: var(--dress); border-bottom: 3px solid var(--dress); padding-bottom: 2px;
}
nav.site .navdrop-panel {
  position: absolute; right: 0; top: calc(100% + .7rem); z-index: 60;
  display: grid; gap: .1rem; min-width: 14.5rem; padding: .5rem;
  background: var(--cream); border: 0;
  border-radius: 18px; box-shadow: var(--pop);
}
nav.site .navdrop-panel a {
  display: block; padding: .55rem .8rem; border-radius: 12px;
  white-space: nowrap; font-size: .98rem; text-decoration: none; color: var(--ink);
}
nav.site .navdrop-panel a:hover { background: var(--ochre); color: var(--ink); }
nav.site .navdrop-panel a.on { color: var(--dress); font-weight: 600; }
@media (max-width: 640px) {
  nav.site .navdrop-panel {
    position: static; box-shadow: none; border: none; padding: .2rem 0 .2rem .9rem;
    min-width: 0; background: none;
  }
  nav.site .navdrop-panel a { white-space: normal; }
}

/* ---- the list of twenty-seven friends -------------------------------- */
.friend-links {
  list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .6rem 1rem;
}
.friend-links a {
  display: block; padding: .5rem .8rem; border-bottom: 0; border-radius: 12px;
  text-decoration: none; font-weight: 600; color: var(--ink);
  font-family: Fredoka, system-ui, sans-serif; background: var(--cream);
  box-shadow: var(--pop-sm); transition: transform .16s ease;
}
.friend-links a:hover { transform: translateY(-3px); color: var(--dress); }

/* ---- email signup ----------------------------------------------------- */
.signup { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.2rem; }
.signup input[type=email] {
  font: inherit; padding: .7em 1.1em; border: 3px solid var(--rule);
  border-radius: 999px; min-width: min(19rem, 80vw); background: #fff;
}
.signup input[type=email]:focus { border-color: var(--dress); outline: none; }
.signup button {
  font-family: Fredoka, system-ui, sans-serif; font-weight: 600; font-size: 1.02rem;
  cursor: pointer; border: 0; color: #fff; background: var(--dress);
  padding: .75em 1.6em; border-radius: var(--blob-btn); box-shadow: var(--shadow);
  transition: transform .18s ease;
}
.signup button:hover { transform: translateY(-3px) rotate(-1.5deg); }
.signup-trap { position: absolute; left: -9999px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- gentle movement -------------------------------------------------- */
@keyframes bob   { 0%,100%{transform:translateY(0)}      50%{transform:translateY(-14px)} }
@keyframes sway  { 0%,100%{transform:rotate(-2.5deg)}    50%{transform:rotate(2.5deg)} }
@keyframes drift { from{transform:translateX(-8vw)}      to{transform:translateX(108vw)} }
@keyframes pulse { 0%,100%{transform:scale(1) rotate(12deg)} 50%{transform:scale(1.12) rotate(12deg)} }
.anim-bob  { animation: bob 3.6s ease-in-out infinite; }
.anim-sway { animation: sway 4.4s ease-in-out infinite; transform-origin: 50% 100%; }
.d1{animation-delay:-.4s} .d2{animation-delay:-1.1s} .d3{animation-delay:-1.9s} .d4{animation-delay:-2.6s}

/* Nothing moves for anyone who has asked their machine to stop animations. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ======================================================================
   AUTOMATIC ISLAND EDGES
   Every page shares this stylesheet, so rather than hand-editing eight
   pages the wavy edges are drawn with CSS pseudo-elements. Any page with
   a hero followed by bands gets the island look for free, and any page
   added later inherits it.
   ====================================================================== */

/* the wave shape, as a background image so no markup is needed.
   %23 is a # so the colour can live inside a data URI. */
header.hero, .band { position: relative; }

header.hero::after,
.band.tint::before,
.band.tint::after {
  content: ""; position: absolute; left: 0; right: 0;
  height: clamp(42px, 6vw, 90px); pointer-events: none; z-index: 2;
}

/* hero sits on sky and spills into the cream below it */
header.hero { padding-bottom: clamp(4rem, 9vw, 7rem); }
header.hero::after {
  bottom: -1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath d='M0,54 C190,116 400,-6 660,34 C900,70 1170,-4 1440,46 L1440,120 L0,120 Z' fill='%23fdf6e9'/%3E%3C/svg%3E") bottom/100% 100% no-repeat;
}

/* an ochre band becomes an island with a wave top and bottom */
.band.tint { padding-top: clamp(4rem, 8vw, 6rem); padding-bottom: clamp(4rem, 8vw, 6rem); }
.band.tint::before {
  top: -1px; transform: scaleY(-1);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C240,-14 520,104 790,54 C1020,12 1240,102 1440,36 L1440,120 L0,120 Z' fill='%23fdf6e9'/%3E%3C/svg%3E") bottom/100% 100% no-repeat;
}
.band.tint::after {
  bottom: -1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath d='M0,62 C210,118 470,-8 720,42 C980,94 1220,-6 1440,54 L1440,120 L0,120 Z' fill='%23fdf6e9'/%3E%3C/svg%3E") bottom/100% 100% no-repeat;
}
/* a wave into the dark footer would look wrong, so the last one is flat */
.band.tint:last-of-type::after { display: none; }

/* cards need to lift off the cream page, so they are white here */
.card { background: #fff; }
.band.tint .card, .isle .card { background: #fff; }

/* keep page content above the wave art */
header.hero > .wrap, .band > .wrap { position: relative; z-index: 3; }

/* ======================================================================
   PHONES
   Added 24 September 2026 after looking at the live site at 414px wide.
   Four things were wrong and all four are layout, not a missing mobile
   site: the menu wrapped onto two ragged lines, a row of three round
   tiles left one orphan sitting alone next to a big empty space, the
   gaps above the waves were desktop-sized, and the buttons poked out
   through the curve of the speech blob.
   ====================================================================== */
@media (max-width: 700px) {

  /* three round doors used to go 2 + 1, leaving the third stranded.
     Now the odd one out spans the row and centres itself. */
  .doors { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .doors > :last-child:nth-child(odd) {
    grid-column: 1 / -1; justify-self: center; width: calc(50% - .5rem);
  }
}

@media (max-width: 640px) {

  /* the menu sits under the logo as one centred row instead of wrapping */
  nav.site .wrap { flex-direction: column; gap: .4rem; padding-bottom: .6rem; }
  nav.site .links { width: 100%; justify-content: center; gap: .95rem; }
  nav.site .links a { font-size: .98rem; }

  /* the home page has its own bar, same treatment */
  .bar { flex-direction: column; gap: .35rem; padding-bottom: .6rem; }
  .bar nav { width: 100%; justify-content: center; gap: .9rem; }
  .grownups { border-left: 0; padding-left: 0 !important; }

  /* desktop-sized air above every wave left big empty bands on a phone */
  .isle { padding-top: 2rem; }
  .wave { margin-top: 1.4rem; }
  .band { padding: 2.4rem 0; }
  .band.tint { padding-top: 3rem; padding-bottom: 3rem; }

  /* a round blob is too round at this width and the buttons broke out
     through the curve, so it becomes a soft rounded panel instead */
  .blob { border-radius: 30px; padding: 1.3rem 1.25rem; }
  .btn { font-size: 1rem; padding: .7em 1.15em; }

  /* a long centred paragraph is hard to read on a narrow screen */
  .grown p, .grown { text-align: left; }
  .grown h2 { text-align: center; }

  /* nothing should ever need a sideways swipe */
  .shelf { gap: .8rem; }
  h1 { font-size: clamp(1.9rem, 8.5vw, 2.6rem); }
}
