/* Milli & Mitzi — site styles
   Idea: the page is a colouring sheet. White paper, black ink lines,
   flat brand colours filled in (a little outside the lines on buttons). */

@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* Brand colours, sampled from the logo and banners */
  --paper: #ffffff;
  --ink: #000000;
  --teal: #0b4f4a;      /* logo badge */
  --cream: #f9dfb8;     /* logo lettering */
  --coral: #ea8460;     /* the "&" and Mitzi's bow */
  --pink: #f4b6c6;      /* Milli's bow, the picnic blanket */
  --sky: #dcecf8;
  --lawn: #a8d08d;
  --sun: #ffd978;

  --line: 2.5px;        /* ink line weight */
  --wrap: 1080px;
  --section: clamp(64px, 9vw, 112px);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
a:hover { text-decoration-color: var(--coral); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: 6px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 1.45rem + 3.3vw, 3.7rem); line-height: 1.06; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.55rem); }
h3 { font-size: 1.4rem; line-height: 1.2; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.visually-hidden {
  position: absolute !important; 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: 16px; top: -100px; z-index: 10;
  background: var(--paper); border: var(--line) solid var(--ink); border-radius: 999px;
  padding: 10px 18px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* ---------- Buttons: ink outline + a fill that's coloured a little outside the lines ---------- */
.btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0.55em 1.55em;
  border: 0; border-radius: 999px; background: transparent;
  font: 600 1.0625rem/1.2 var(--font); color: var(--ink);
  text-decoration: none; text-align: center; cursor: pointer;
}
.btn::before, .btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.btn::before { z-index: -2; background: var(--fill, var(--paper)); transform: translate(5px, 4px); transition: transform 0.2s ease; }
.btn::after  { z-index: -1; border: var(--line) solid var(--ink); }
.btn:hover::before, .btn:focus-visible::before { transform: translate(0, 0); }
.btn:focus-visible { outline-offset: 7px; border-radius: 999px; }
.btn--primary { --fill: var(--teal); color: #fff; }
.btn--cream { --fill: var(--cream); }
.btn--pink { --fill: var(--pink); }
.btn--plain { --fill: transparent; }
.btn--plain:hover::before { background: var(--cream); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px 18px; }

/* ---------- Header ---------- */
.site-header { background: var(--sky); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { font-weight: 700; font-size: 1.15rem; text-decoration: none; letter-spacing: -0.01em; }
.nav { display: flex; gap: clamp(14px, 3vw, 30px); font-weight: 600; font-size: 0.98rem; }
.nav a { text-decoration: none; padding: 6px 0; border-bottom: var(--line) solid transparent; }
.nav a:hover { border-bottom-color: var(--ink); }

/* ---------- Hero: the garden, drawn like a colouring page ---------- */
.hero { position: relative; overflow: hidden; background: var(--sky); padding-bottom: 150px; }
.hero__logo {
  width: min(64vw, 270px); margin: 8px auto 22px;
  animation: pop-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}
.hero__text { position: relative; z-index: 2; }
.hero__text h1 { max-width: 13.5em; }
.hero__lead { font-size: clamp(1.08rem, 1rem + 0.35vw, 1.22rem); line-height: 1.55; max-width: 34em; margin: 18px 0 28px; }
.hero__ground { position: absolute; left: 0; right: 0; bottom: 0; height: 130px; z-index: 1; }
.hero__ground svg { width: 100%; height: 100%; }
.hero__sky-bits { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.cloud, .sun { position: absolute; }
.cloud--a { width: 120px; left: -22px; top: 26px; }
.cloud--b { width: 150px; right: 12%; top: 120px; display: none; }
.sun { width: 86px; right: -14px; top: 10px; }

@keyframes pop-in {
  0% { opacity: 0; transform: scale(0.86) translateY(10px); }
  100% { opacity: 1; transform: none; }
}

@media (max-width: 759px) {
  .hero__text { text-align: left; }
  .hero .btn-row .btn { flex: 1 1 100%; }
}

@media (min-width: 760px) {
  .hero { min-height: 690px; padding-bottom: 0; }
  .hero__text { padding-top: clamp(48px, 7vw, 96px); padding-bottom: 300px; }
  .hero__text h1 { max-width: 10.5em; }
  .hero__lead { max-width: 27em; }
  .hero__logo {
    position: absolute; z-index: 3; margin: 0;
    width: clamp(300px, 33vw, 450px);
    right: max(28px, calc(50% - 560px)); bottom: 34px;
  }
  .hero__ground { height: 236px; }
  .cloud--a { width: 170px; left: auto; right: calc(50% + 40px); top: auto; bottom: 330px; display: none; }
  .cloud--b { display: block; width: 190px; right: calc(50% - 250px); top: 64px; }
  .sun { width: 118px; right: 5%; top: 34px; }
}
@media (min-width: 760px) and (max-width: 979px) {
  .hero__text { padding-bottom: 320px; }
  .hero__logo { width: 260px; }
}
@media (min-width: 1100px) {
  .hero__text { padding-top: 92px; }
}

/* ---------- Free colouring page: a sheet on the picnic blanket ---------- */
.free {
  padding-block: var(--section);
  border-top: var(--line) solid var(--ink);
  border-bottom: var(--line) solid var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, rgba(244, 182, 198, 0.45) 50%, transparent 50%),
    linear-gradient(rgba(244, 182, 198, 0.45) 50%, transparent 50%);
  background-size: 64px 64px;
}
.free__grid { display: grid; gap: 40px; align-items: center; }
.sheet {
  width: min(58%, 240px); margin: 0 auto; transform: rotate(-4deg);
  background: var(--paper); border: var(--line) solid var(--ink); border-radius: 6px;
  aspect-ratio: 210 / 297; padding: 14px;
}
.sheet img { width: 100%; height: 100%; object-fit: contain; }
.sheet--page { padding: 0; overflow: hidden; }
.sheet--page img { object-fit: cover; }
.sheet__placeholder {
  height: 100%; display: grid; place-items: center; text-align: center;
  border: 2px dashed #9a9a9a; border-radius: 4px; color: #555; font-size: 0.95rem; padding: 16px;
}
.signup {
  background: var(--paper); border: var(--line) solid var(--ink); border-radius: 24px;
  padding: clamp(24px, 4vw, 44px);
}
.signup h2 { margin-bottom: 12px; }
.signup__intro { margin-bottom: 24px; max-width: 32em; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { font-weight: 600; }
.input {
  width: 100%; min-height: 56px; padding: 0 18px;
  font: 400 1.0625rem var(--font); color: var(--ink); background: var(--paper);
  border: var(--line) solid var(--ink); border-radius: 16px;
}
.input:focus { outline: none; box-shadow: 0 0 0 4px var(--cream), 0 0 0 6.5px var(--ink); }
.check { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; margin-bottom: 24px; font-size: 0.98rem; line-height: 1.5; }
.check input { width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--teal); }
.signup .btn { width: 100%; }
.signup__small { margin: 16px 0 0; font-size: 0.92rem; }
.honey { display: none; }

@media (min-width: 860px) {
  .free__grid { grid-template-columns: 0.85fr 1.15fr; gap: 64px; }
  .sheet { width: 100%; max-width: 360px; }
}

/* ---------- Episodes and books ---------- */
.episodes { padding-block: var(--section); }
.section-intro { max-width: 36em; margin: 14px 0 40px; font-size: 1.1rem; }
.episode-grid { display: grid; gap: 32px; }
.episode {
  border: var(--line) solid var(--ink); border-radius: 22px; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr; background: var(--paper);
}
.episode__img { border-bottom: var(--line) solid var(--ink); background: #fdf1e8; }
.episode__img img { width: 100%; aspect-ratio: 780 / 586; object-fit: cover; }
.episode__body { padding: 26px 26px 30px; display: flex; flex-direction: column; }
.episode__number { font-weight: 600; margin: 0 0 6px; }
.episode__body h3 { margin-bottom: 12px; }
.episode__learn { font-size: 0.98rem; margin-bottom: 22px; }
.episode__learn strong { font-weight: 600; }
.episode .btn-row { margin-top: auto; gap: 12px 14px; }
.episode .btn { min-height: 50px; padding-inline: 1.15em; font-size: 1rem; }
.episodes__more { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.episodes__more p { margin: 0; font-weight: 600; }

@media (min-width: 760px) {
  .episode-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- The real Milli and Mitzi: photos pinned to coloured cards ---------- */
.real { padding-top: var(--section); }
.real__intro { max-width: 34em; margin: 14px 0 48px; font-size: 1.1rem; }
.real__grid { display: grid; gap: 56px; }
.friend { position: relative; isolation: isolate; padding: 0 28px 30px; }
.friend::before, .friend::after { content: ""; position: absolute; inset: 120px 0 0 0; border-radius: 22px; }
.friend::before { z-index: -2; background: var(--fill); transform: translate(7px, 6px); }
.friend::after { z-index: -1; border: var(--line) solid var(--ink); }
.friend--milli { --fill: var(--pink); }
.friend--mitzi { --fill: var(--cream); }
.friend h3 { margin-bottom: 8px; }
.friend p { margin: 0; }
.polaroid {
  width: min(86%, 330px); margin: 0 auto 24px; padding: 12px 12px 14px;
  background: var(--paper); border: var(--line) solid var(--ink); transform: rotate(-3deg);
}
.friend--mitzi .polaroid { transform: rotate(2.5deg); }
.polaroid img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.polaroid figcaption { margin-top: 10px; text-align: center; font-weight: 600; font-size: 0.98rem; line-height: 1.35; text-wrap: balance; }
.grown-ups { max-width: 40em; margin: 48px 0 0; font-size: 1.1rem; }

@media (min-width: 760px) {
  .real__grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

/* ---------- Simple inner pages ---------- */
.page { padding-block: clamp(48px, 7vw, 88px) var(--section); }
.page h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); margin-bottom: 18px; max-width: 16em; }
.page h2 { font-size: 1.45rem; margin: 36px 0 10px; }
.page p, .page li { max-width: 40em; }
.page ul { padding-left: 1.2em; margin: 0 0 1em; }
.page li { margin-bottom: 0.4em; }
.page__logo { width: 190px; margin-bottom: 28px; }
.box {
  border: var(--line) solid var(--ink); border-radius: 22px; padding: clamp(22px, 4vw, 36px);
  margin-top: 36px; max-width: 46em;
}
.box h2 { margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: var(--line) solid var(--ink); padding-block: 40px 48px; font-size: 0.98rem; }
.site-footer .wrap { display: grid; gap: 18px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 26px; list-style: none; margin: 0; padding: 0; font-weight: 600; }
.site-footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__logo { animation: none; }
  .btn::before { transition: none; }
}
