/*
  Little Acorns: nursery school website (Screenery template)
  A child's picture on manila paper: wax crayon drawings, torn construction-paper bands, rounded hand-lettered headings.
  Body copy stays in a clear, legible reading face; every colour pair meets WCAG AA.

  Contents
   1. Tokens
   2. Base and browser surfaces
   3. Paper: grounds, torn edges, crayon scribbles
   4. Components: buttons, chips, fields, icons
   5. Header
   6. Hero
   7. A day (timeline)
   8. Rooms (tabs and sheets)
   9. Planner: week grid, the sum, book a visit
  10. Team (the fridge door)
  11. Questions
  12. Footer
  13. Motion
  14. Narrow screens
*/

/* ---------- 1. Tokens ---------- */
:root {
  /* Paper */
  --manila: #f1dfae;          /* the ground of the page */
  --manila-deep: #e3c98a;     /* folds and rules on manila */
  --cream: #fffaf0;           /* drawing paper */
  --sky-paper: #c4def1;       /* construction paper, light blue */
  --yellow-paper: #f7cd55;
  --green-paper: #2e6a37;     /* deep green sugar paper, cream text on it */
  --blue-paper: #24488c;      /* deep blue sugar paper, cream text on it */

  /* Crayons */
  --red: #d6402c;
  --red-ink: #a3271a;         /* red as text on manila, cream and yellow (AA) */
  --yellow: #f5be2a;
  --blue: #2f63b5;
  --green: #3f8f3e;
  --brown: #8a5528;
  --orange: #ea7a2a;

  /* Ink */
  --ink: #23304a;             /* the dark blue crayon all text is written in */
  --ink-soft: #414b63;        /* secondary text on light paper */
  --on-dark: #fff6dd;         /* text on deep green and blue paper */
  --on-dark-soft: #e6dcc0;

  /* Room tints (ink text on all three) */
  --tint-green: #cfe6b9;
  --tint-yellow: #fbe28f;
  --tint-blue: #c6daf3;

  /* Type */
  --hand: "Sniglet", "Comic Neue", "Trebuchet MS", sans-serif;
  --read: "Andika", "Verdana", sans-serif;
  --fs-xs: 0.875rem;
  --fs-sm: 0.9688rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.6rem;
  --fs-h2: clamp(2.1rem, 1.3rem + 2.8vw, 3.6rem);
  --fs-h1: clamp(2.9rem, 1.4rem + 5vw, 5.6rem);

  /* Space */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 72px;
  --s-9: 112px;
  --gutter: clamp(16px, 4vw, 48px);
  --wrap: 1240px;
  --tear: 22px;

  /* Shape: nothing is a perfect rectangle */
  --r-hand: 255px 18px 225px 16px / 16px 225px 18px 255px;
  --r-hand-2: 18px 240px 16px 210px / 220px 16px 240px 18px;
  --r-paper: 3px;
  --stroke: 3px;

  /* Depth: paper lying on paper */
  --lift: 0 2px 2px rgb(60 40 10 / 0.12), 0 14px 28px -16px rgb(60 40 10 / 0.45);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 150ms;
  --t-mid: 380ms;

  /* Textures (SVG noise, inline) */
  --fibre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .1 0 0 0 .5 -.14'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  --flecks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.03 .2' numOctaves='2' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .5 -.18'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  --tear-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 24' preserveAspectRatio='none'%3E%3Cpath d='M0 24V12l11-3 8 4 14-7 9 5 13-3 10 6 12-8 9 6 16-4 8 5 12-7 11 6 9-3 15 5 10-8 12 6 9-2 14 5 11-7 10 4 13-5 8 6 15-4 9 5 12-7 10 6 14-3 9 4 12-6 11 5 9-3 13 5 10-6 9 4 11-5L400 12V24z'/%3E%3C/svg%3E");
  --scrawl-red: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 24' preserveAspectRatio='none'%3E%3Cpath d='M4 14C60 6 140 4 296 10M20 20c80-6 170-8 260-4' fill='none' stroke='%23d6402c' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E");
  --scribble-am: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60' preserveAspectRatio='none'%3E%3Cpath d='M-5 8L20 2L2 22L40 4L6 40L64 6L12 58L90 6L30 62L116 8L56 62L140 6L84 62L166 8L110 62L192 8L138 62L206 18L166 62L206 40L190 62' fill='none' stroke='%23f5be2a' stroke-width='11' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
  --scribble-pm: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60' preserveAspectRatio='none'%3E%3Cpath d='M-5 8L20 2L2 22L40 4L6 40L64 6L12 58L90 6L30 62L116 8L56 62L140 6L84 62L166 8L110 62L192 8L138 62L206 18L166 62L206 40L190 62' fill='none' stroke='%239cc7ea' stroke-width='11' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
  --scribble-full: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60' preserveAspectRatio='none'%3E%3Cpath d='M-5 8L20 2L2 22L40 4L6 40L64 6L12 58L90 6L30 62L116 8L56 62L140 6L84 62L166 8L110 62L192 8L138 62L206 18L166 62L206 40L190 62' fill='none' stroke='%23a6d68f' stroke-width='11' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
  --scribble-none: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60' preserveAspectRatio='none'%3E%3Cpath d='M-5 8L20 2L2 22L40 4L6 40L64 6L12 58L90 6L30 62L116 8L56 62L140 6L84 62L166 8L110 62L192 8L138 62L206 18L166 62L206 40L190 62' fill='none' stroke='%23e8d7a6' stroke-width='11' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
  --tape-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 30' preserveAspectRatio='none'%3E%3Cpath d='M3 3l6-3 5 3 6-2 5 3 7-3 6 2 7-3 6 3 7-2 6 3 6-3 7 2 6-1 5 2 6-1v24l-5 3-6-2-6 3-7-3-6 2-6-2-7 3-6-3-6 2-7-2-6 3-6-3-6 2-5-2-6 3-5-3z'/%3E%3C/svg%3E");
  --line-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 200' preserveAspectRatio='none'%3E%3Cpath d='M10 0c-4 30 5 50 0 100s5 70 0 100' fill='none' stroke='%23d6402c' stroke-width='5' stroke-linecap='round' stroke-dasharray='14 10'/%3E%3C/svg%3E");
}

/* ---------- 2. Base and browser surfaces ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
  scrollbar-color: var(--brown) var(--manila);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--read);
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--ink);
  background: var(--fibre), var(--manila);
  accent-color: var(--blue);
  caret-color: var(--red);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--yellow); color: var(--ink); }

h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset, legend, address { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
address { font-style: normal; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
p { text-wrap: pretty; }
h1, h2, h3 { font-family: var(--hand); font-weight: 800; line-height: 1.05; text-wrap: balance; letter-spacing: -0.01em; }
[hidden] { display: none !important; }

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--red);
}
a:hover { text-decoration-thickness: 3px; }

:focus-visible {
  outline: 3px solid var(--focus, var(--blue));
  outline-offset: 3px;
  border-radius: 6px;
}

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip {
  position: absolute; left: var(--s-4); top: -60px; z-index: 20;
  padding: var(--s-2) var(--s-4);
  background: var(--yellow); color: var(--ink);
  font-family: var(--hand); font-weight: 800;
  border-radius: var(--r-hand);
}
.skip:focus { top: var(--s-4); }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.icon {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}

/* ---------- 3. Paper ---------- */
/* A band of construction paper with a torn top and bottom edge. Set --paper to its colour. */
.paper {
  --paper: var(--sky-paper);
  position: relative;
  background: var(--flecks), var(--fibre), var(--paper);
  margin-block: var(--tear);
}
.paper::before,
.paper::after {
  content: "";
  position: absolute; left: 0; right: 0;
  height: var(--tear);
  background: var(--flecks), var(--fibre), var(--paper);
  -webkit-mask: var(--tear-mask) 0 0 / 400px 100% repeat-x;
  mask: var(--tear-mask) 0 0 / 400px 100% repeat-x;
  pointer-events: none;
}
.paper::before { bottom: calc(100% - 1px); }
.paper::after { top: calc(100% - 1px); transform: scaleY(-1); -webkit-mask-position: 130px 0; mask-position: 130px 0; }

.paper--sky { --paper: var(--sky-paper); }
.paper--yellow { --paper: var(--yellow-paper); }
.paper--green { --paper: var(--green-paper); color: var(--on-dark); --focus: var(--yellow); }
.paper--blue { --paper: var(--blue-paper); color: var(--on-dark); --focus: var(--yellow); }
.paper--green ::selection, .paper--blue ::selection { background: var(--yellow); color: var(--ink); }

/* A crayon underline under a word */
.scrawl {
  background: var(--scrawl-red) 0 100% / 100% 0.34em no-repeat;
  padding-bottom: 0.08em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.scrawl--red { color: var(--red-ink); }

/* Section intro: heading and a short paragraph */
.section-head { display: grid; gap: var(--s-4); max-width: 46rem; margin-bottom: var(--s-7); }
.section-head h2 { font-size: var(--fs-h2); }
.section-head p { font-size: var(--fs-lg); line-height: 1.55; max-width: 62ch; color: var(--ink-soft); }
.section-head--light p { color: var(--on-dark-soft); }
.paper--sky .section-head p, .paper--yellow .section-head p { color: var(--ink); }

/* ---------- 4. Components ---------- */
.btn {
  --btn-bg: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 52px;
  padding: 10px 24px 11px;
  font-family: var(--hand); font-weight: 800; font-size: 1.125rem; line-height: 1.1;
  color: var(--ink);
  text-decoration: none;
  background: var(--btn-bg);
  border: var(--stroke) solid var(--ink);
  border-radius: var(--r-hand);
  box-shadow: 0 6px 14px -10px rgb(35 48 74 / 0.6);
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out), background-color var(--t-fast);
}
.btn:hover { transform: rotate(-1.2deg) translateY(-1px); box-shadow: 0 10px 18px -10px rgb(35 48 74 / 0.6); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn--yellow { --btn-bg: var(--yellow); }
.btn--yellow:hover { --btn-bg: #f8c943; }
.btn--ghost { --btn-bg: rgb(255 250 240 / 0.55); }
.btn--small { min-height: 44px; padding: 6px 18px 7px; font-size: 1rem; }
.btn--big { min-height: 60px; font-size: 1.25rem; padding-inline: 32px; }
.btn[disabled] { cursor: progress; }

/* Chips: radio buttons drawn as crayon blobs */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: baseline; gap: var(--s-2);
  min-height: 52px; min-width: 52px;
  padding: 10px 20px;
  justify-content: center;
  font-family: var(--hand); font-weight: 800; font-size: 1.5rem; line-height: 1.2;
  background: var(--cream);
  border: var(--stroke) solid var(--ink);
  border-radius: var(--r-hand-2);
  transition: background-color var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.chip small { font-family: var(--read); font-weight: 700; font-size: var(--fs-sm); }
.chip:hover span { transform: rotate(-1.5deg); }
.chip input:checked + span { background: var(--scribble-am) center / 100% 100%, var(--cream); }
.chip input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 3px; }
.chips--sm .chip span { min-height: 46px; min-width: 46px; padding: 8px 14px; font-size: 1.0625rem; }

/* Fields */
.field { display: grid; gap: 6px; align-content: start; }
.field > label, .field > legend {
  font-family: var(--hand); font-weight: 800; font-size: 1.0625rem; margin-bottom: 2px; padding: 0;
}
.field .opt { font-family: var(--read); font-weight: 400; font-size: var(--fs-sm); color: var(--ink-soft); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"] {
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  font-size: var(--fs-md);
  background: var(--cream);
  border: 2.5px solid var(--ink);
  border-radius: var(--r-hand-2);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input::placeholder { color: #6b6f7c; }
.field input:focus-visible { outline: none; box-shadow: 0 0 0 4px rgb(47 99 181 / 0.35); border-color: var(--blue); }
.field input[aria-invalid="true"] { border-color: var(--red-ink); background: #fff1ea; }
.field__err { min-height: 0; font-size: var(--fs-sm); font-weight: 700; color: var(--red-ink); }
.field__err:empty { display: none; }
.field .chips + .chips { margin-top: var(--s-2); }

/* ---------- 5. Header ---------- */
.top { position: relative; z-index: 5; padding-block: var(--s-4); }
.top__in { display: flex; align-items: center; gap: var(--s-5); }
.logo { display: inline-flex; align-items: center; gap: var(--s-2); text-decoration: none; margin-right: auto; }
.logo__mark { width: 48px; height: 48px; }
.logo__word { font-family: var(--hand); font-weight: 800; font-size: 1.6rem; line-height: 1; }
.nav { display: flex; align-items: center; gap: var(--s-5); }
.nav ul { display: flex; gap: var(--s-1); }
.nav ul a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-family: var(--hand); font-size: 1.0625rem; text-decoration: none;
  border-radius: var(--r-hand);
}
.nav ul a:hover { background: var(--scribble-am) center / 100% 70% no-repeat; }
.menu-btn {
  display: none; align-items: center; gap: var(--s-2);
  min-height: 44px; padding: 0 14px;
  font-family: var(--hand); font-weight: 800;
  background: var(--cream); border: 2.5px solid var(--ink); border-radius: var(--r-hand);
}

/* ---------- 6. Hero ---------- */
.hero { padding-block: var(--s-6) var(--s-8); }
.hero__in { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: var(--s-7); align-items: center; }
.hero h1 { font-size: var(--fs-h1); line-height: 0.98; max-width: 11ch; }
.hero__lede { margin-top: var(--s-5); font-size: 1.25rem; line-height: 1.55; max-width: 36rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.hero__facts { display: grid; gap: var(--s-2); margin-top: var(--s-6); font-size: var(--fs-sm); color: var(--ink-soft); }
.hero__facts li { display: flex; gap: var(--s-2); align-items: flex-start; }
.hero__facts .icon { margin-top: 3px; color: var(--red-ink); }
.hero__art { position: relative; }
.scene { display: block; width: 100%; height: auto; }
.hero__art figcaption {
  margin-top: var(--s-2); text-align: right;
  font-family: var(--hand); font-size: var(--fs-sm); color: var(--ink-soft);
}

/* ---------- 7. A day ---------- */
.day { padding-block: var(--s-8) var(--s-8); }
.timeline {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 120px;
  row-gap: 0;
}
.timeline::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 20px; margin-left: -10px;
  background: var(--line-down) 0 0 / 20px 200px repeat-y;
}
.stop {
  position: relative;
  grid-row: span 2;
  display: grid;
  grid-template-columns: 96px 1fr;
  column-gap: var(--s-4);
  align-content: start;
  padding: var(--s-5);
  margin-block: var(--s-3);
  background: var(--fibre), var(--cream);
  border-radius: var(--r-paper);
  box-shadow: var(--lift);
}
.stop:nth-child(odd) { grid-column: 1; transform: rotate(-0.6deg); }
.stop:nth-child(even) { grid-column: 2; transform: rotate(0.7deg); }
.stop:nth-child(1) { grid-row: 1 / span 2; }
.stop:nth-child(2) { grid-row: 2 / span 2; }
.stop:nth-child(3) { grid-row: 3 / span 2; }
.stop:nth-child(4) { grid-row: 4 / span 2; }
.stop:nth-child(5) { grid-row: 5 / span 2; }
.stop:nth-child(6) { grid-row: 6 / span 2; }
.stop:nth-child(7) { grid-row: 7 / span 2; }
.stop:nth-child(8) { grid-row: 8 / span 2; }
.stop:nth-child(9) { grid-row: 9 / span 2; }
.stop:nth-child(10) { grid-row: 10 / span 2; }
/* the crayon dot where each note meets the line */
.stop::after {
  content: ""; position: absolute; top: 34px; width: 22px; height: 22px;
  background: var(--yellow); border: 3px solid var(--ink); border-radius: 48% 52% 46% 54%;
}
.stop:nth-child(odd)::after { right: -71px; }
.stop:nth-child(even)::after { left: -71px; }
.stop__pic { grid-row: 1 / span 3; width: 96px; height: 80px; }
.stop__time { font-family: var(--hand); font-weight: 800; font-size: 1.25rem; color: var(--red-ink); font-variant-numeric: tabular-nums; }
.stop h3 { font-size: var(--fs-xl); margin-block: 2px 6px; }
.stop p:last-child { font-size: var(--fs-sm); line-height: 1.55; }

/* ---------- 8. Rooms ---------- */
.rooms { padding-block: var(--s-8) var(--s-9); }
.rooms__tabs { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: -3px; position: relative; z-index: 1; padding-left: var(--s-4); }
.tab {
  display: inline-flex; align-items: baseline; gap: var(--s-2);
  min-height: 52px; padding: 10px 22px 12px;
  font-family: var(--hand); font-weight: 800; font-size: 1.25rem;
  background: var(--tab, var(--cream));
  border: var(--stroke) solid var(--ink);
  border-bottom-color: transparent;
  border-radius: 22px 30px 0 0 / 18px 24px 0 0;
  transform: translateY(6px);
  transition: transform var(--t-fast) var(--ease-out);
}
.tab span { font-family: var(--read); font-weight: 400; font-size: var(--fs-sm); }
.tab:hover { transform: translateY(2px); }
.tab[aria-selected="true"] { transform: none; }
.tab--green { --tab: var(--tint-green); }
.tab--yellow { --tab: var(--tint-yellow); }
.tab--blue { --tab: var(--tint-blue); }
.rooms__sheets { display: grid; gap: var(--s-6); }
.js .rooms__sheets { gap: 0; }
.room {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s-6); align-items: center;
  padding: clamp(24px, 4vw, 56px);
  background: var(--flecks), var(--fibre), var(--sheet);
  border: var(--stroke) solid var(--ink);
  border-radius: 6px 14px 8px 18px;
  box-shadow: var(--lift);
}
.room--green { --sheet: var(--tint-green); }
.room--yellow { --sheet: var(--tint-yellow); }
.room--blue { --sheet: var(--tint-blue); }
.room h3 { font-size: clamp(2.2rem, 1.5rem + 2.4vw, 3.4rem); }
.room__who { margin-top: var(--s-2); font-family: var(--hand); font-size: var(--fs-lg); }
.room__words > p:not(.room__who) { margin-top: var(--s-4); max-width: 60ch; }
.room__facts { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); margin-top: var(--s-5); padding-top: var(--s-4); border-top: 2px dashed rgb(35 48 74 / 0.45); }
.room__facts dt { font-size: var(--fs-xs); font-weight: 700; color: var(--ink-soft); }
.room__facts dd { font-family: var(--hand); font-weight: 800; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.room__pic { width: 100%; max-width: 320px; height: auto; justify-self: center; }

/* ---------- 9. Planner ---------- */
.planner { padding-block: var(--s-8) var(--s-9); }
.planner .section-head h2 { color: var(--on-dark); }
.planner__sheet {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: var(--s-6);
  align-items: start;
  padding: clamp(20px, 3.4vw, 44px);
  background: var(--fibre), var(--cream);
  color: var(--ink);
  border-radius: var(--r-paper);
  box-shadow: 0 2px 2px rgb(0 0 0 / 0.2), 0 24px 40px -20px rgb(0 0 0 / 0.6);
  --focus: var(--blue);
}
.planner__sheet ::selection, .visit ::selection { background: var(--yellow); color: var(--ink); }
.plan { display: grid; gap: var(--s-6); }
.plan legend { font-family: var(--hand); font-weight: 800; font-size: var(--fs-xl); margin-bottom: var(--s-3); }
.plan__fund { margin-top: var(--s-3); font-size: var(--fs-sm); max-width: 60ch; }
.plan__fund strong { color: var(--red-ink); }
.plan__note { font-size: var(--fs-sm); color: var(--ink-soft); max-width: 64ch; }

.week__key { font-size: var(--fs-sm); color: var(--ink-soft); margin-bottom: var(--s-4); max-width: 62ch; }
.week__row {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--s-3); align-items: center;
  padding-block: var(--s-2);
  border-top: 2px dashed rgb(35 48 74 / 0.22);
}
.week__day { font-family: var(--hand); font-weight: 800; font-size: 1.2rem; }
.week__opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); }
.slot { position: relative; display: block; cursor: pointer; }
.slot input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.slot__face {
  position: relative; isolation: isolate;
  display: grid; align-content: center; gap: 0;
  min-height: 60px; padding: 6px 10px;
  text-align: center;
  background: var(--cream);
  border: 2.5px solid rgb(35 48 74 / 0.55);
  border-radius: var(--r-hand-2);
  transition: border-color var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.slot__face::before {
  content: ""; position: absolute; inset: 2px; z-index: -1;
  border-radius: inherit;
  background: var(--fill, none) center / 100% 100% no-repeat;
  opacity: 0;
}
.slot__name { font-family: var(--hand); font-weight: 800; font-size: 1rem; line-height: 1.15; }
.slot__left { font-size: var(--fs-xs); line-height: 1.3; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.slot:hover .slot__face { border-color: var(--ink); transform: rotate(-1deg); }
.slot input:checked + .slot__face { border-color: var(--ink); border-width: 3px; }
.slot input:checked + .slot__face::before { opacity: 1; }
.slot input:focus-visible + .slot__face { outline: 3px solid var(--blue); outline-offset: 3px; }
.slot--none { --fill: var(--scribble-none); }
.slot--am { --fill: var(--scribble-am); }
.slot--pm { --fill: var(--scribble-pm); }
.slot--full { --fill: var(--scribble-full); }
.slot.is-full .slot__face { border-style: dashed; }
.slot.is-full .slot__left { color: var(--red-ink); font-weight: 700; }

/* The sum: an exercise book page with blue rules and a red margin */
.sum {
  position: sticky; top: var(--s-5);
  padding: var(--s-5) var(--s-5) var(--s-6) 56px;
  background:
    linear-gradient(90deg, transparent 40px, rgb(214 64 44 / 0.55) 40px 42px, transparent 42px),
    repeating-linear-gradient(180deg, transparent 0 31px, rgb(47 99 181 / 0.28) 31px 32px),
    #fffdf6;
  background-position: 0 0, 0 12px, 0 0;
  border: 1px solid rgb(47 99 181 / 0.25);
  transform: rotate(0.6deg);
}
.sum h3 { font-size: var(--fs-xl); line-height: 32px; margin-bottom: var(--s-2); }
.sum__alert:empty { display: none; }
.sum__alert {
  display: flex; gap: var(--s-2); align-items: flex-start;
  margin-block: var(--s-2) var(--s-3); padding: 10px 12px;
  font-size: var(--fs-sm); font-weight: 700; line-height: 1.45;
  background: #ffe6dc; color: var(--red-ink);
  border: 2px solid var(--red-ink); border-radius: var(--r-hand-2);
}
.sum__alert .icon { margin-top: 1px; }
.sum__lines { display: grid; font-variant-numeric: tabular-nums; }
.sum__lines li { display: flex; justify-content: space-between; gap: var(--s-4); line-height: 32px; font-size: var(--fs-md); }
.sum__lines li span { min-width: 0; }
.sum__lines b { white-space: nowrap; font-weight: 700; }
.sum__lines .is-minus b { color: #1f6a2a; }
.sum__lines .is-wait b { color: var(--red-ink); }
.sum__total { margin-top: var(--s-2); padding-top: var(--s-2); border-top: 3px double var(--ink); }
.sum__total > p:first-child { font-family: var(--hand); font-size: var(--fs-lg); line-height: 32px; }
.sum__big { position: relative; display: inline-block; padding: 8px 18px 6px 10px; margin-left: -10px; }
.sum__big output { font-family: var(--hand); font-weight: 800; font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.sum__ring { position: absolute; inset: -6px -10px -8px -14px; width: calc(100% + 24px); height: calc(100% + 14px); overflow: visible; pointer-events: none; }
.sum__ring path { fill: none; stroke: var(--red); stroke-width: 4; stroke-linecap: round; filter: url(#crayon); stroke-dasharray: 1; stroke-dashoffset: 0; }
.sum__after { margin-top: var(--s-3); line-height: 1.6; font-variant-numeric: tabular-nums; }
.sum__fine { margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.55; }
.sum__go { margin-top: var(--s-5); width: 100%; }

/* Book a visit */
.visit {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: var(--s-7);
  margin-top: var(--s-8);
  padding: clamp(24px, 4vw, 52px);
  background: var(--fibre), var(--cream);
  color: var(--ink);
  border-radius: var(--r-paper);
  box-shadow: 0 2px 2px rgb(0 0 0 / 0.2), 0 24px 40px -20px rgb(0 0 0 / 0.6);
  transform: rotate(-0.35deg);
  --focus: var(--blue);
}
/* masking tape at the two top corners */
.visit::before, .visit::after {
  content: ""; position: absolute; top: -16px; width: 120px; height: 34px;
  background: rgb(246 232 186 / 0.85);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.15);
  -webkit-mask: var(--tape-mask) 0 0 / 100% 100%;
  mask: var(--tape-mask) 0 0 / 100% 100%;
}
.visit::before { left: 32px; transform: rotate(-4deg); }
.visit::after { right: 32px; transform: rotate(5deg); }
.visit__intro h3 { font-size: clamp(2rem, 1.5rem + 1.8vw, 3rem); }
.visit__intro p { margin-top: var(--s-4); }
.visit__plan { padding: var(--s-3) var(--s-4); background: var(--tint-yellow); border-radius: var(--r-hand-2); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.visit__wait { padding: var(--s-3) var(--s-4); background: #ffe6dc; color: var(--red-ink); border: 2px dashed var(--red-ink); border-radius: var(--r-hand-2); font-size: var(--fs-sm); font-weight: 700; }
.vform { display: grid; gap: var(--s-5); align-content: start; }
.vform__fields { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5) var(--s-5); }
.field--wide { grid-column: 1 / -1; }
.vform__error {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-3) var(--s-4);
  background: #ffe6dc; color: var(--red-ink); font-weight: 700; font-size: var(--fs-sm);
  border: 2px solid var(--red-ink); border-radius: var(--r-hand-2);
}
.vform__error .icon { margin-top: 2px; }
.vform__send { justify-self: start; position: relative; }
.vform__spin { display: none; width: 28px; height: 28px; }
.vform__spin path { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.vform__send.is-loading .vform__spin { display: block; }
.vform__send.is-loading .vform__label::after { content: "…"; }
.done { grid-column: 2; display: grid; justify-items: start; gap: var(--s-4); align-content: start; outline: none; }
.done__pic { width: 200px; height: 150px; }
.done h3 { font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.8rem); }
.done p { max-width: 52ch; }

/* ---------- 10. Team: drawings on the fridge door ---------- */
.team { padding-block: var(--s-8) var(--s-9); }
.fridge { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); }
.portrait {
  position: relative;
  padding: var(--s-5) var(--s-5) var(--s-5);
  background: var(--fibre), var(--cream);
  box-shadow: var(--lift);
  border-radius: 2px;
}
.portrait:nth-child(1) { transform: rotate(-2deg); }
.portrait:nth-child(2) { transform: rotate(1.4deg) translateY(18px); }
.portrait:nth-child(3) { transform: rotate(-0.8deg); }
.portrait:nth-child(4) { transform: rotate(2.2deg) translateY(12px); }
.portrait::before {
  content: ""; position: absolute; top: -14px; left: 50%; width: 96px; height: 28px; margin-left: -48px;
  background: rgb(143 192 230 / 0.7);
  -webkit-mask: var(--tape-mask) 0 0 / 100% 100%;
  mask: var(--tape-mask) 0 0 / 100% 100%;
  transform: rotate(-3deg);
}
.portrait:nth-child(even)::before { background: rgb(231 132 155 / 0.6); transform: rotate(4deg); }
.portrait svg { display: block; width: 100%; height: auto; aspect-ratio: 200 / 220; margin-bottom: var(--s-3); }
.portrait h3 { font-size: 1.5rem; }
.portrait__role { font-family: var(--hand); color: var(--red-ink); margin-block: 2px var(--s-2); }
.portrait p { font-size: var(--fs-sm); line-height: 1.55; }
.portrait__by { margin-top: var(--s-3); font-family: var(--hand); font-size: var(--fs-xs) !important; color: var(--ink-soft); text-align: right; }
.team__more { margin-top: var(--s-8); max-width: 64ch; font-size: var(--fs-md); color: var(--ink-soft); }

/* ---------- 11. Questions ---------- */
.faq { padding-block: var(--s-8) var(--s-8); }
.faq__in { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: var(--s-7); align-items: start; }
.faq .section-head { margin-bottom: 0; }
.faq__list { display: grid; gap: var(--s-3); }
.faq details {
  background: var(--fibre), var(--cream);
  border: 2.5px solid var(--ink);
  border-radius: var(--r-hand-2);
}
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  min-height: 56px; padding: 12px 20px;
  font-family: var(--hand); font-weight: 800; font-size: 1.25rem; line-height: 1.25;
  cursor: pointer; list-style: none;
  border-radius: inherit;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { width: 26px; height: 26px; color: var(--red-ink); stroke-width: 2.5; transition: transform var(--t-mid) var(--ease-out); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { padding: 0 20px 18px; max-width: 64ch; }

/* ---------- 12. Footer ---------- */
.foot { margin-bottom: 0; padding-block: var(--s-8) var(--s-5); }
.foot::after { display: none; }
.foot__in { display: grid; grid-template-columns: 1.3fr 1fr 1fr 0.8fr; gap: var(--s-6); }
.foot__name { font-family: var(--hand); font-weight: 800; font-size: 2.2rem; line-height: 1; margin-bottom: var(--s-3); }
.foot__brand p:not(.foot__name) { max-width: 30ch; color: var(--on-dark-soft); }
.foot__hog { width: 150px; height: 75px; margin-top: var(--s-4); }
.foot__h { font-family: var(--hand); font-weight: 800; font-size: 1.2rem; margin-bottom: var(--s-3); }
.foot__col p:not(.foot__h) { display: flex; gap: var(--s-2); align-items: flex-start; margin-bottom: var(--s-2); color: var(--on-dark-soft); }
.foot__col .icon { margin-top: 3px; color: var(--yellow); }
.foot__col ul { display: grid; gap: 2px; }
.foot__col li a { display: inline-flex; align-items: center; min-height: 36px; }
.foot a { text-decoration-color: var(--yellow); }
.foot__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3);
  margin-top: var(--s-7); padding-top: var(--s-4);
  border-top: 2px dashed rgb(255 246 221 / 0.4);
  font-size: var(--fs-xs); color: var(--on-dark-soft);
}

/* ---------- 13. Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* The signature: the sun's lines boil, like a hand-drawn cartoon redrawn every frame */
  .sun__a { animation: boil 0.75s steps(1) infinite; }
  @keyframes boil {
    0% { filter: url(#crayon); }
    33% { filter: url(#crayon-b); }
    66% { filter: url(#crayon-c); }
  }
  /* Colouring in: a picked session gets scribbled in from left to right */
  .slot input:checked + .slot__face::before { animation: colour-in 520ms var(--ease-out) both; }
  .chip input:checked + span { animation: wiggle 360ms var(--ease-out); }
  @keyframes colour-in {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
  }
  @keyframes wiggle {
    40% { transform: rotate(-3deg) scale(1.04); }
  }
  /* The ring round the total is redrawn whenever the sum changes */
  .sum__ring.is-drawing path { animation: ring 700ms var(--ease-out) both; }
  @keyframes ring {
    from { stroke-dashoffset: 1; }
    to { stroke-dashoffset: 0; }
  }
  .vform__send.is-loading .vform__spin { animation: spin 0.9s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .done:not([hidden]) .done__pic { animation: pop 600ms var(--ease-out) both; }
  @keyframes pop { from { transform: scale(0.6) rotate(-12deg); opacity: 0.3; } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; }
}

/* ---------- 14. Narrow screens ---------- */
@media (max-width: 1100px) {
  .fridge { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-7) var(--s-6); }
  .planner__sheet { grid-template-columns: 1fr; }
  .sum { position: relative; top: 0; transform: none; }
  .foot__in { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 920px) {
  .menu-btn { display: inline-flex; }
  .nav {
    position: absolute; top: calc(100% - 4px); right: var(--gutter); left: var(--gutter);
    display: none; flex-direction: column; align-items: stretch; gap: var(--s-3);
    padding: var(--s-4);
    background: var(--fibre), var(--cream);
    border: 2.5px solid var(--ink); border-radius: var(--r-hand-2);
    box-shadow: var(--lift);
  }
  .no-js .nav, .nav.is-open { display: flex; }
  .no-js .menu-btn { display: none; }
  .no-js .nav { position: static; background: none; border: 0; box-shadow: none; padding: 0; flex-direction: row; flex-wrap: wrap; }
  .nav ul { flex-direction: column; }
  .no-js .nav ul { flex-direction: row; flex-wrap: wrap; }

  .hero__in { grid-template-columns: 1fr; gap: var(--s-6); }
  .hero h1 { max-width: 12ch; }
  .hero__art { max-width: 620px; justify-self: center; width: 100%; }

  .timeline { grid-template-columns: 1fr; column-gap: 0; padding-left: 48px; }
  .timeline::before { left: 14px; margin-left: 0; }
  .stop, .stop:nth-child(n) { grid-column: 1; grid-row: auto; transform: none; }
  .stop:nth-child(n)::after { left: -46px; right: auto; }

  .room { grid-template-columns: 1fr; }
  .room__pic { max-width: 220px; grid-row: 1; justify-self: start; }

  .visit { grid-template-columns: 1fr; gap: var(--s-6); transform: none; }
  .done { grid-column: 1; }
  .faq__in { grid-template-columns: 1fr; gap: var(--s-6); }
}

@media (max-width: 640px) {
  :root { --tear: 16px; }
  .logo__word { font-size: 1.35rem; }
  .logo__mark { width: 40px; height: 40px; }
  .hero { padding-top: var(--s-4); }
  .hero__lede { font-size: 1.125rem; }
  .hero__cta .btn { width: 100%; }
  .section-head p { font-size: var(--fs-md); }

  .stop { grid-template-columns: 64px 1fr; padding: var(--s-4); column-gap: var(--s-3); }
  .stop__pic { width: 64px; height: 54px; }
  .timeline { padding-left: 36px; }
  .timeline::before { left: 4px; }
  .stop:nth-child(n)::after { left: -42px; top: 24px; width: 18px; height: 18px; }

  .rooms__tabs { padding-left: 0; }
  .tab { padding: 8px 14px 10px; font-size: 1.0625rem; flex: 1 1 auto; justify-content: center; }
  .tab span { display: none; }
  .room__facts { gap: var(--s-3) var(--s-5); }

  .planner__sheet { padding: var(--s-4); }
  .week__row { grid-template-columns: 1fr; gap: var(--s-2); padding-block: var(--s-3); }
  .week__opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* narrower margin in the exercise book */
  .sum {
    padding: var(--s-4) var(--s-4) var(--s-5) 44px;
    background:
      linear-gradient(90deg, transparent 32px, rgb(214 64 44 / 0.55) 32px 34px, transparent 34px),
      repeating-linear-gradient(180deg, transparent 0 31px, rgb(47 99 181 / 0.28) 31px 32px),
      #fffdf6;
    background-position: 0 0, 0 12px, 0 0;
  }
  .sum .sum__lines li { font-size: var(--fs-sm); }

  .vform__fields { grid-template-columns: 1fr; }
  .vform__send { width: 100%; justify-self: stretch; }
  .visit::before { left: 12px; width: 90px; }
  .visit::after { right: 12px; width: 90px; }

  .fridge { grid-template-columns: 1fr; gap: var(--s-6); }
  .portrait { display: grid; grid-template-columns: 108px 1fr; column-gap: var(--s-4); padding: var(--s-5) var(--s-4) var(--s-4); }
  .portrait svg { grid-row: 1 / span 4; margin: 0; }
  .portrait__by { grid-column: 1 / -1; }

  .plan__age .chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plan__age .chip span { flex-direction: column; align-items: center; gap: 0; width: 100%; padding: 8px 6px; }
  .chips--days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-2); }
  .chips--days .chip span { width: 100%; min-width: 0; padding-inline: 4px; }
  .portrait:nth-child(n) { transform: rotate(var(--tilt, -1deg)); }
  .portrait:nth-child(even) { --tilt: 1.2deg; }

  .faq summary { font-size: 1.125rem; padding: 12px 16px; }
  .faq details p { padding: 0 16px 16px; }
  .foot__in { grid-template-columns: 1fr; gap: var(--s-5); }
}
