/* ==========================================================================
   NoorInk — scrapbook storybook
   Colours follow the NoorInk "Logo and colours" brand sheet.
   ========================================================================== */

:root {
  /* Paper & sky */
  --paper: #faf6f0;      /* matches the paper sky of the hero illustration */
  --paper-2: #f1eadf;
  --paper-edge: #e5dccd;
  --sky: #f1eadf;
  --sky-2: #faf6f0;

  /* Ink (text) — brand text colours */
  --ink: #333333;
  --ink-soft: #666666;
  --ink-warm: #8b6f5a;
  --night: #1f4f70;      /* deepest shade of the brand Deep Blue */
  --night-2: #2a5f84;

  /* Lantern light */
  --glow: #ffc75a;
  --glow-soft: #ffe7a8;
  --brass: #e0a23a;
  --brass-dark: #c9862a;

  /* Brand primaries — decoration only, never for body text */
  --logo-cyan: #3e9ed9;    /* Sky Blue */
  --logo-red: #e46b63;     /* Coral Red */
  --logo-orange: #f4a14b;  /* Sunny Orange */
  --logo-green: #8ec06c;   /* Leaf Green */
  --logo-yellow: #f3d364;  /* Sun Yellow */
  --logo-purple: #b894d9;  /* Lavender */
  --logo-lime: #8ec06c;
  --kraft: #bfa58a;        /* Kraft Brown */
  --sand: #eadfc8;         /* Sand */

  /* Restrained system: paper + ink + three accents.
     Deep Blue = actions and links · Coral = the one highlight · Sun Yellow = small sparks.
     Colour lives in the illustrations; interface surfaces stay neutral. */
  --blue: #2e6e9c;       /* brand Deep Blue (white text 5.4:1) */
  --coral: #c2474a;      /* brand Coral, deepened so white text passes AA */
  --sun: #f3d364;        /* brand Sun Yellow — fills only, never text */

  /* Legacy section names now all resolve to the restrained system */
  --rose: var(--paper-2);   --rose-ink: var(--coral);
  --honey: var(--paper-2);  --honey-ink: var(--blue);
  --sage: var(--paper-2);   --sage-ink: var(--blue);
  --lilac: var(--paper-2);  --lilac-ink: var(--blue);
  --sea: var(--paper-2);    --sea-ink: var(--blue);

  /* Type */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Nunito", "Trebuchet MS", system-ui, sans-serif;
  --step--1: 0.889rem;
  --step-0: 1.125rem;                                  /* 18px base — easy for young readers */
  --step-1: clamp(1.25rem, 1.15rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 1.85rem);
  --step-3: clamp(1.85rem, 1.5rem + 1.6vw, 2.5rem);
  --step-4: clamp(2.2rem, 1.6rem + 2.8vw, 3.5rem);

  /* Space & shape */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
  --radius-sm: 12px;
  --radius: 22px;
  --radius-blob: 30px 22px 34px 20px / 22px 32px 20px 30px;  /* hand-cut paper */
  --shadow-paper: 0 1px 0 rgba(42, 51, 82, 0.06), 0 10px 24px -14px rgba(42, 51, 82, 0.35);
  --shadow-lift: 0 2px 0 rgba(42, 51, 82, 0.06), 0 18px 32px -16px rgba(42, 51, 82, 0.45);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-swing: cubic-bezier(0.34, 1.56, 0.64, 1);

  --wrap: 1180px;
  --header-h: 84px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
  /* When a phone "bounces" past the ends of the page, show paper at the top and footer blue at the bottom
     instead of a strip of blank colour under the footer. */
  background: linear-gradient(var(--paper) 50%, var(--night) 50%);
  overscroll-behavior-y: none;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);   /* flat paper: the illustrations bring their own texture */
  overflow-x: hidden;
  overflow-x: clip;   /* clip (where supported) stops sideways spill without turning the page into its own scroll box on iPhones */
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
svg { flex-shrink: 0; }

a { color: var(--sea-ink); text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
a:hover { color: var(--ink); }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100, "WONK" 0;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.25; }
p { margin: 0 0 1em; max-width: 64ch; text-wrap: pretty; }

.sr-only {
  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 {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; color: #fff; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }

.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-fill { fill: currentColor; stroke: none; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--rose-ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 48px; padding: 0.7em 1.5em;
  border: 0; border-radius: 999px;
  background: var(--btn-bg); color: #fff;
  font: 700 1.05rem/1.1 var(--font-body);
  text-decoration: none; cursor: pointer;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--btn-bg) 70%, #000), 0 10px 18px -10px color-mix(in srgb, var(--btn-bg) 80%, #000);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: #fff; transform: translateY(-2px); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--btn-bg) 70%, #000); }
.btn .icon { width: 1.1em; height: 1.1em; transition: transform 0.2s var(--ease-out); }
.btn:hover .icon-arrow { transform: translateX(3px); }

.btn-rose  { --btn-bg: var(--rose-ink); }
.btn-honey { --btn-bg: var(--honey-ink); }
.btn-sage  { --btn-bg: var(--sage-ink); }
.btn-lilac { --btn-bg: var(--lilac-ink); }
.btn-sea   { --btn-bg: var(--sea-ink); }
.btn-ink   { --btn-bg: var(--ink); }

.btn-glow {
  --btn-bg: var(--sun);
  color: var(--ink);
}
.btn-glow:hover { color: var(--ink); }

.btn-ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}
.btn-ghost:hover { color: var(--ink); background: rgba(42, 51, 82, 0.06); }
.btn-ghost:active { box-shadow: inset 0 0 0 2px var(--ink); }

.text-link {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-weight: 700; color: var(--sea-ink); text-decoration: none;
}
.text-link:hover { text-decoration: underline; }
.text-link .icon { width: 1em; height: 1em; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.site-header.is-scrolled { border-color: var(--paper-edge); box-shadow: 0 6px 20px -16px rgba(42, 51, 82, 0.5); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  min-height: var(--header-h);
}

.brand { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--ink-soft); line-height: 1; }
.brand img { width: 172px; height: auto; margin: 2px 0 1px; transform: rotate(-1.5deg); transition: transform 0.3s var(--ease-swing); }
.brand:hover img { transform: rotate(1deg) scale(1.03); }
.brand-tag { font-family: var(--font-display); font-variation-settings: "SOFT" 100; font-size: 0.92rem; letter-spacing: 0.02em; }

.site-nav { display: flex; align-items: center; gap: var(--space-3); }
.site-nav ul { display: flex; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.site-nav a:not(.btn) {
  display: block; padding: 0.55rem 1rem; border-radius: 999px;
  color: var(--ink); font-weight: 700; text-decoration: none;
  transition: background-color 0.2s;
}
.site-nav a:not(.btn):hover { background: var(--paper-2); }
.site-nav a[aria-current="page"] { background: var(--sky); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--sea-ink) 30%, transparent); }

.nav-toggle {
  display: none;
  width: 48px; height: 48px; border: 0; border-radius: 14px;
  background: var(--paper-2); color: var(--ink); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle .icon { width: 26px; height: 26px; }

@media (max-width: 960px) {
  :root { --header-h: 72px; }
  .brand img { width: 140px; }
  .brand-tag { font-size: 0.8rem; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: var(--space-2);
    padding: var(--space-2) 16px var(--space-4);
    background: var(--paper);
    border-bottom: 1px solid var(--paper-edge);
    box-shadow: 0 24px 40px -24px rgba(42, 51, 82, 0.45);
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out), visibility 0s linear 0.25s;
  }
  .site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .site-nav ul { flex-direction: column; }
  .site-nav a:not(.btn) { padding: 0.85rem 1rem; font-size: 1.2rem; }
}

/* --------------------------------------------------------------------------
   Torn paper edges (shared)
   -------------------------------------------------------------------------- */
.torn { position: absolute; left: 0; width: 100%; height: 34px; pointer-events: none; }
.torn path { fill: var(--paper); }
.torn-bottom { bottom: -1px; }
.torn-top { top: -1px; transform: scaleY(-1); }

/* --------------------------------------------------------------------------
   Home hero — the balloon illustration
   -------------------------------------------------------------------------- */
.hero { position: relative; background: var(--paper); }

.hero-stage {
  position: relative; overflow: hidden;
  height: clamp(480px, 42vw, 680px);
}
.hero-art, .hero-art img { display: block; width: 100%; height: 100%; }
.hero-art img { object-fit: cover; object-position: 40% 50%; }

/* Copy floats in the open sky of the illustration */
.hero-copy {
  position: absolute; z-index: 3;
  left: 35%; width: 48%; top: 14%;
  text-align: center;
  padding: 1.2rem 1.5rem 1.4rem;
  isolation: isolate;
}
.hero-copy::before {   /* faint paper glow so words stay crisp where they cross a cloud */
  content: ""; position: absolute; inset: -6% -4%; z-index: -1;
  background: radial-gradient(closest-side, rgba(250, 246, 240, 0.7), rgba(250, 246, 240, 0.45) 60%, rgba(250, 246, 240, 0) 100%);
  border-radius: 50%;
}
.hero .torn { z-index: 2; height: 30px; }
.hero-copy h1 { font-size: clamp(1.9rem, 3.05vw, 3.3rem); margin-bottom: 0.3em; }
.hero-lede { margin: 0 auto 1.1em; font-size: clamp(1.05rem, 0.9rem + 0.4vw, 1.3rem); color: var(--ink); max-width: 38ch; font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-actions .btn-ghost { background: rgba(250, 246, 240, 0.85); }

/* Sticker stars used as little headings ornaments */
.sticker { width: 1.1em; height: 1.1em; object-fit: contain; display: inline-block; flex-shrink: 0; }
.section-head h2 .sticker { width: 0.95em; height: 0.95em; transform: rotate(-8deg); }
.stars .sticker { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   Four door tiles (illustrated)
   -------------------------------------------------------------------------- */
.door-tile {
  --door-ink: var(--rose-ink);
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  text-align: center; text-decoration: none; color: var(--ink);
  border-radius: var(--radius);
  -webkit-tap-highlight-color: transparent;
}
.door-tile:hover { color: var(--ink); }
/* Feathered edges: the illustration paper melts into the page paper */
.feather {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent), linear-gradient(to bottom, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent), linear-gradient(to bottom, transparent, #000 5%, #000 95%, transparent);
  mask-composite: intersect;
}
.feather-y {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 4%, #000 96%, transparent);
}
/* Each illustration sits in the same-sized box so the four tiles line up whatever the object's shape */
.door-art { position: relative; display: block; width: 100%; aspect-ratio: 5 / 4; }
.door-tile img {
  position: absolute; inset: 0 6%; width: 88%; height: 100%; object-fit: contain; object-position: center bottom;
  transition: transform 0.35s var(--ease-swing), filter 0.35s var(--ease-out);
}
.door-title {
  font-family: var(--font-display); font-variation-settings: "SOFT" 100; font-weight: 700;
  font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.9rem); line-height: 1.1; color: var(--ink);
  margin-top: 0.5rem; padding-bottom: 0.35rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8'%3E%3Cpath d='M2 5 Q30 1 60 4 T118 3' fill='none' stroke='%23f3d364' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center bottom / 70% 8px no-repeat;
}
.door-tile p { margin-top: 0.2rem !important; }
@media (hover: hover) {
  .door-tile:hover img { transform: translateY(-6px) rotate(-1.2deg); }
  .door-tile:nth-child(even):hover img { transform: translateY(-6px) rotate(1.2deg); }
}
.door-tile:active img { transform: scale(0.98); }
.door-tile p { margin: -0.4rem 0 0; font-size: 1rem; color: var(--ink-soft); max-width: 28ch; }
.door-cta { display: inline-flex; align-items: center; gap: 0.4em; font-weight: 800; color: var(--door-ink); }
.door-cta .icon { width: 1em; height: 1em; transition: transform 0.2s var(--ease-out); }
.door-tile:hover .door-cta .icon { transform: translateX(3px); }
.door-tile { --door-ink: var(--blue); }   /* the tiles carry the colour; links stay one blue */

/* --------------------------------------------------------------------------
   Scrapbook pieces — used sparingly
   One paper device (the cream torn note), at most two per page.
   -------------------------------------------------------------------------- */

/* Section headings: plain type, a single sticker star does the decorating */
.strip { display: inline-flex; align-items: center; gap: 0.4em; margin: 0; }

/* The cream torn notes: hand-made paper scans, each matched to the shape of the box it backs
   (wide boxes get the wide sheet, tall boxes the tall sheet) so the torn edges barely stretch. */
.paper-note, .collage-note, .banner-copy, .shop-door, .more-note {
  border: 0;
  background: url("../img/scrap/paper-rect-tape.jpg") center / 100% 100% no-repeat !important;
  box-shadow: none !important;
  position: relative;
}
.more-note { background-image: url("../img/scrap/paper-tall-tape.jpg") !important; }

/* These sheets come with their own washi tape, so the drawn tape is switched off */
.collage-note.tape::before, .banner-copy.tape::before, .more-note.tape::before, .sponsor-form.tape::before { display: none; }
@media (max-width: 820px) {
  .banner-copy { background-image: url("../img/scrap/paper-square-tape.jpg") !important; padding-top: 3.6rem; }
}

/* Washi tape — one quiet blue gingham, used on the notes only */
.tape::before {
  content: ""; position: absolute; z-index: 2; top: -30px; left: 50%;
  width: 96px; height: 28px; transform: translateX(-50%) rotate(-3deg);
  background:
    repeating-linear-gradient(90deg, rgba(46, 110, 156, 0.28) 0 8px, rgba(255, 255, 255, 0) 8px 16px),
    repeating-linear-gradient(0deg, rgba(46, 110, 156, 0.28) 0 8px, rgba(255, 255, 255, 0.6) 8px 16px);
  box-shadow: 0 1px 2px rgba(51, 51, 51, 0.12);
}

/* Sticker cluster beside inner-page titles (still — no looping motion) */
/* One composition on every page: a main sticker centred in its own box (so tall and wide
   stickers carry the same visual weight), a small accent top-left and a slightly larger one
   bottom-right, each in its own box clear of the main sticker. */
.sticker-cluster { position: relative; width: min(320px, 100%); aspect-ratio: 4 / 3; }
.sticker-cluster img { position: absolute; object-fit: contain; }
.sticker-cluster .c-main { left: 20%; top: 14%; width: 60%; height: 72%; }
.sticker-cluster .c-a { left: 1%; top: 2%; width: 16%; height: 21%; transform: rotate(-8deg); }
.sticker-cluster .c-b { right: 1%; bottom: 2%; width: 20%; height: 26%; transform: rotate(6deg); }
.sticker-cluster .c-c { display: none; }

/* "A little creativity" collage */
.collage {
  display: grid; grid-template-columns: 0.62fr 1.05fr 1.15fr; align-items: end; gap: var(--space-3);
  position: relative;
}
.collage-plane { align-self: center; margin-left: -4%; margin-right: -6%; }   /* nose tucks toward the note, as if flying in */
.collage-plane img { width: 100%; height: auto; display: block; }
.collage-note {
  align-self: center; text-align: center;
  padding: 2rem clamp(1rem, 2.4vw, 2rem) 1.6rem;
  transform: rotate(-1deg);
}
.collage-note h2 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.3rem); margin-bottom: 0.4em; }
.collage-note p { margin: 0 auto 1.2em; color: var(--ink); max-width: 34ch; }
.collage-sign { position: relative; max-width: 240px; justify-self: center; width: 100%; }
.collage-sign img { width: 100%; height: auto; display: block; }
.collage-sign a {   /* labels painted onto the signpost boards */
  position: absolute; left: 13%; width: 78%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-variation-settings: "SOFT" 100;
  font-weight: 700; font-size: clamp(1rem, 0.85rem + 0.5vw, 1.25rem);
  color: var(--ink); text-decoration: none;
  height: 13%;
  transition: transform 0.25s var(--ease-swing);
}
.collage-sign a:nth-of-type(1) { top: 9%; left: 6%; width: 82%; transform: rotate(-1deg); }
.collage-sign a:nth-of-type(2) { top: 30%; left: 11%; width: 84%; transform: rotate(1deg); }
.collage-sign a:nth-of-type(3) { top: 49%; left: 18%; width: 72%; transform: rotate(-1deg); }
@media (hover: hover) { .collage-sign a:hover { transform: scale(1.08) rotate(0); color: var(--ink); } }
.collage-sign a:focus-visible { outline-offset: 0; }

/* Family reviews: big quiet quotes on the paper, no boxes */
/* Family reviews: quiet, centred, a soft yellow quote mark instead of big type */
.quote-plain { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.8rem; text-align: center; max-width: 34ch; margin-inline: auto; }
.quote-plain::before {
  content: "\201C"; display: block; height: 2.2rem; margin-bottom: -0.4rem;
  font-family: var(--font-display); font-size: 4rem; line-height: 1; color: var(--sun);
}
.quote-plain blockquote {
  margin: 0; font-family: var(--font-display); font-variation-settings: "SOFT" 100;
  font-size: 1.05rem; font-style: italic; font-weight: 400; line-height: 1.6; color: var(--ink-soft);
}
.quote-plain figcaption { display: block; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.quote-plain .quote-avatar { width: 44px; height: 44px; font-size: 1.1rem; background: var(--blue) !important; }
.quote-plain .stars { margin-left: auto; }

/* --------------------------------------------------------------------------
   Inner page hero — on the paper, no colour bands
   -------------------------------------------------------------------------- */
.page-hero { position: relative; padding: var(--space-5) 0 var(--space-3); background: var(--paper); }
.page-hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.3fr 0.7fr; gap: var(--space-4); align-items: center; }
.page-hero h1 { margin-bottom: 0.3em; }
.page-hero p { font-size: var(--step-1); color: var(--ink-soft); max-width: 40ch; }
.page-hero-art { justify-self: center; width: min(300px, 100%); }
.page-hero .torn { display: none; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: var(--space-5) 0; position: relative; }
.section-tight { padding: var(--space-4) 0; }

.section-head {
  display: flex; align-items: end; justify-content: space-between; gap: var(--space-2);
  margin-bottom: var(--space-3); flex-wrap: wrap;
}
.section-head h2 { margin: 0; display: inline-flex; align-items: center; gap: 0.45em; }
.section-head h2 .star { width: 0.7em; height: 0.7em; color: var(--logo-orange); }
.section-head p { margin: 0.4em 0 0; color: var(--ink-soft); }
.section-head-center { flex-direction: column; align-items: center; text-align: center; }
.section-head-center p { margin-inline: auto; }

/* Four doors */
.doors-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }

/* --------------------------------------------------------------------------
   Story / activity cards + carousel
   -------------------------------------------------------------------------- */
.rail-wrap { position: relative; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * var(--space-3)) / 4);
  gap: var(--space-3);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 6px 4px 18px; margin: -6px -4px 0;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

.rail-btn {
  position: absolute; top: calc(50% - 40px); z-index: 3;
  width: 48px; height: 48px; border-radius: 50%; border: 0;
  display: grid; place-items: center; cursor: pointer;
  background: var(--sea-ink); color: #fff;
  box-shadow: 0 6px 16px -6px rgba(31, 111, 139, 0.7);
  transition: transform 0.2s var(--ease-out), opacity 0.2s;
}
.rail-btn:hover { transform: scale(1.06); }
.rail-btn:disabled { opacity: 0; pointer-events: none; }
.rail-btn .icon { width: 22px; height: 22px; stroke-width: 2.5; }
.rail-prev { left: -24px; }
.rail-next { right: -24px; }

.card {
  position: relative; display: flex; flex-direction: column;
  background: #fffdf8; border-radius: var(--radius);
  box-shadow: var(--shadow-paper);
  overflow: hidden; color: var(--ink); text-decoration: none;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
@media (hover: hover) {
  .card:hover { transform: translateY(-4px) rotate(-0.4deg); box-shadow: var(--shadow-lift); color: var(--ink); }
  .card:hover .play { transform: scale(1.08); }
}
.card-art { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.card-art svg { width: 100%; height: 100%; }
.card-body { padding: 0.9rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.card-title { font-family: var(--font-display); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: 1.2rem; line-height: 1.25; margin: 0; color: var(--sea-ink); }
.card-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-top: auto; }
.card p { font-size: 1rem; color: var(--ink-soft); margin: 0; }

.play {
  position: absolute; left: 12px; bottom: 12px;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 253, 248, 0.95); color: var(--ink);
  box-shadow: 0 4px 12px -4px rgba(30, 36, 64, 0.5);
  transition: transform 0.25s var(--ease-swing);
}
.play .icon { width: 18px; height: 18px; margin-left: 3px; }

.pill {
  display: inline-flex; align-items: center; gap: 0.35em;
  padding: 0.22rem 0.7rem; border-radius: 999px;
  font-size: 0.86rem; font-weight: 700; line-height: 1.3;
  background: var(--sage); color: var(--sage-ink);
}
.pill .icon { width: 0.95em; height: 0.95em; }
.pill-rose { background: var(--rose); color: var(--rose-ink); }
.pill-honey { background: var(--honey); color: var(--honey-ink); }
.pill-lilac { background: var(--lilac); color: var(--lilac-ink); }
.pill-sea { background: var(--sea); color: var(--sea-ink); }
.pill-plain { background: var(--paper-2); color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   Banner
   -------------------------------------------------------------------------- */
.banner {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 0.9fr 1.4fr 0.9fr; align-items: center; gap: var(--space-3);
  padding: var(--space-4) var(--space-4);
  background: linear-gradient(180deg, #fdf6e6, #f7ecd3);
  border-radius: var(--radius-blob);
  box-shadow: var(--shadow-paper), inset 0 0 0 2px rgba(224, 162, 58, 0.25);
}
.banner-copy { text-align: center; }
.banner-copy h2 { margin-bottom: 0.4em; font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.85rem); }
.banner-copy p { margin-inline: auto; color: var(--ink-soft); font-size: 0.97rem; }
.banner-art svg { width: 100%; height: auto; }

/* --------------------------------------------------------------------------
   Testimonials
   -------------------------------------------------------------------------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.quote {
  margin: 0; padding: var(--space-3);
  background: #fffdf8; border-radius: var(--radius-blob); box-shadow: var(--shadow-paper);
  display: grid; grid-template-columns: 56px 1fr; gap: 1rem; align-items: start;
}
.quote-avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: #fff; }
.quote blockquote { margin: 0; font-size: 1.05rem; line-height: 1.5; }
.quote figcaption { margin-top: 0.6rem; font-weight: 700; color: var(--ink-soft); display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.stars { display: inline-flex; gap: 2px; color: var(--logo-orange); }
.stars .icon { width: 16px; height: 16px; }
.placeholder-note { text-align: center; font-size: 0.9rem; color: var(--ink-soft); margin: var(--space-2) auto 0; }


/* --------------------------------------------------------------------------
   Footer — night sky
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  background: var(--night); color: #d9dcec;
  padding: calc(var(--space-5) + 10px) 0 var(--space-3);
  overflow: hidden;
}
.site-footer .torn-top path { fill: var(--paper); }

.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--space-4); position: relative; z-index: 1; }
.footer-brand .badge { display: inline-block; }
.footer-brand img { width: 190px; height: auto; transform: rotate(-2deg); }
.footer-brand p { margin-top: 1rem; font-size: 1rem; max-width: 32ch; }
.site-footer h2 { font-size: 1.2rem; color: var(--logo-yellow); margin-bottom: 0.8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.site-footer a { color: #eef0f8; text-decoration: none; display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.2rem 0; }
.site-footer a:hover { color: var(--glow); text-decoration: underline; }
.site-footer a .icon { width: 1.1em; height: 1.1em; }
.site-footer :focus-visible { outline-color: var(--glow); }
.footer-base { margin-top: var(--space-4); padding-top: var(--space-2); border-top: 1px solid rgba(217, 220, 236, 0.18); text-align: center; font-size: 0.95rem; position: relative; z-index: 1; }
.footer-base p { margin: 0 auto; }

/* --------------------------------------------------------------------------
   Tabs + filters (Stories, Activities)
   -------------------------------------------------------------------------- */
.tabs, .filters {
  display: inline-flex; flex-wrap: wrap; gap: 0.4rem;
  padding: 6px; border-radius: 999px; background: var(--paper-2);
  margin-bottom: var(--space-3);
}
.tab, .filter {
  min-height: 46px; padding: 0 1.2rem; border-radius: 999px; border: 0;
  display: inline-flex; align-items: center; gap: 0.5em;
  background: transparent; color: var(--ink); font: 700 1.02rem var(--font-body); cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.tab .icon, .filter .icon { width: 1.15em; height: 1.15em; }
.tab:hover, .filter:hover { background: rgba(42, 51, 82, 0.07); }
.tab[aria-selected="true"], .filter[aria-pressed="true"] { background: var(--ink); color: #fff; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }

.platforms { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--space-3); }
.platforms .btn { min-width: 180px; }

.episode-length { display: inline-flex; align-items: center; gap: 0.35em; font-size: 0.92rem; font-weight: 700; color: var(--ink-soft); }
.episode-length .icon { width: 1em; height: 1em; }

/* Story of the week */
.spotlight {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-4); align-items: center;
  padding: var(--space-4); border-radius: var(--radius-blob);
  background: var(--night); color: #e6e8f3; box-shadow: var(--shadow-lift);
}
.spotlight h2 { color: var(--paper); }
.spotlight p { color: #cfd3e6; }
.spotlight-art { position: relative; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; }
.spotlight .pill { margin-bottom: 0.8rem; }
.spotlight .btn .icon { width: 1em; height: 1em; }
.play.play-lg { left: 50%; top: 50%; bottom: auto; width: 76px; height: 76px; transform: translate(-50%, -50%); }
.play.play-lg .icon { width: 28px; height: 28px; }
@media (hover: hover) { .spotlight-art:hover .play-lg { transform: translate(-50%, -50%) scale(1.08); } }

/* YouTube thumbnails are 4:3 with letterbox bars; a 16:9 frame with object-fit: cover trims them off */
.card-art.video { position: relative; aspect-ratio: 16 / 9; }
.card-art.video > img, .spotlight-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* --------------------------------------------------------------------------
   Parchment treatment for outside images (YouTube, Amazon, Etsy)
   Mutes their colour, warms it, and lays a cream wash + paper grain over it,
   so every image looks printed on the same paper as the rest of the site.
   Applies automatically to any <img> placed in a story, book or shop slot.
   -------------------------------------------------------------------------- */
.card-art:has(> img), .spotlight-art:has(> img), .book-cover:has(> img), .art-slot:has(> img) { position: relative; overflow: hidden; }
.card-art > img, .spotlight-art > img, .book-cover > img, .art-slot > img {
  filter: saturate(0.72) sepia(0.14) contrast(0.93) brightness(1.04);
  transition: filter 0.4s var(--ease-out);
}
.card-art:has(> img)::before, .spotlight-art:has(> img)::before,
.book-cover:has(> img)::before, .art-slot:has(> img)::before {   /* paper grain */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .36 0 0 0 0 .25 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply; opacity: 0.35;
}
.card-art:has(> img)::after, .spotlight-art:has(> img)::after,
.book-cover:has(> img)::after, .art-slot:has(> img)::after {     /* cream parchment wash */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(250, 246, 240, 0.14) 40%, rgba(241, 234, 223, 0.42) 100%), rgba(250, 246, 240, 0.2);
  transition: opacity 0.4s var(--ease-out);
}
.card-art .play, .spotlight-art .play { z-index: 2; }

/* A real cover fills the book; the placeholder title text steps aside */
.book-cover:has(> img) { padding: 0; }
.book-cover:has(> img) > span { display: none; }
.book-cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.activity-art { display: block; aspect-ratio: 1 / 1; }
.activity-art > img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) { .activity:hover .activity-art > img { filter: saturate(0.9) sepia(0.06) contrast(0.97) brightness(1.02); } .activity:hover .activity-art::after { opacity: 0.45; } }
.activity-actions { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; padding-top: 0.4rem; }
.activity .activity-actions .btn { margin-top: 0; }
.activity-actions .text-link .icon { width: 1.05em; height: 1.05em; }

/* "Lots more on Instagram" card: a taped cream note with stickers, closing the printables grid */
.more-card { position: relative; display: grid; place-items: center; padding: var(--space-4) var(--space-2); }
.more-note { text-align: center; transform: rotate(1.5deg); padding: 3rem 1.8rem 2rem; max-width: 340px; }
.more-note h3 { margin: 0 0 0.4em; font-size: clamp(1.15rem, 1rem + 0.45vw, 1.35rem); color: var(--ink); }
.more-note p { margin: 0 0 0.9em; color: var(--ink); font-size: 0.93rem; }
.more-list { list-style: none; margin: 0 0 1.2rem; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.45rem; }
.more-list li {
  font-size: 0.84rem; font-weight: 700; color: var(--ink);
  padding: 0.3em 0.8em; border-radius: 999px; border: 1.5px dashed var(--kraft); background: rgba(255, 255, 255, 0.55);
}
.more-list li:nth-child(odd) { transform: rotate(-2deg); }
.more-list li:nth-child(even) { transform: rotate(2deg); }
.more-sticker { position: absolute; height: auto; pointer-events: none; z-index: 3; }
.more-sticker-a { width: 92px; right: 2%; bottom: 4%; transform: rotate(8deg); }
.more-sticker-b { width: 58px; left: 4%; top: 6%; transform: rotate(-10deg); }
.product .card-art:has(> img) { display: block; }
.product .card-art > img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) {
  .card:hover .card-art > img, .spotlight-art:hover > img, .book:hover .book-cover > img, .product:hover .art-slot > img { filter: saturate(0.9) sepia(0.06) contrast(0.97) brightness(1.02); }
  .card:hover .card-art::after, .spotlight-art:hover::after, .book:hover .book-cover::after, .product:hover .art-slot::after { opacity: 0.45; }
}
/* Phones and tablets can't hover, so they show the brighter "lit" look from the start */
@media (hover: none) {
  .card-art > img, .spotlight-art > img, .book-cover > img, .art-slot > img, .activity-art > img { filter: saturate(0.9) sepia(0.06) contrast(0.97) brightness(1.02); }
  .card-art::after, .spotlight-art::after, .book-cover::after, .art-slot::after { opacity: 0.45; }
}
.series .section-head { margin-bottom: var(--space-2); }

/* "Prefer to listen?" */
.listen { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-3) 0; border-top: 2px dashed var(--paper-edge); }
.listen h2 { margin-bottom: 0.2em; font-size: var(--step-2); }
.listen p { margin: 0; color: var(--ink-soft); }
.listen .platforms { margin-top: 0; }

/* Stories page: a quiet beige strip inviting families to sponsor a story */
.sponsor-strip {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space-3);
  background: var(--paper-2); border: 1.5px solid #e4d8c6; border-radius: 18px;
  padding: 1.4rem clamp(1.2rem, 3vw, 2.2rem);
}
.sponsor-strip-art { width: 64px; height: auto; transform: rotate(-8deg); }
.sponsor-strip h2 { font-size: clamp(1.2rem, 1rem + 0.7vw, 1.55rem); margin: 0 0 0.3em; }
.sponsor-strip p { margin: 0; color: var(--ink-soft); max-width: 60ch; }
@media (max-width: 820px) {
  .sponsor-strip { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: var(--space-2); }
  .sponsor-strip-art { width: 54px; }
}

/* On-page video player (privacy-enhanced YouTube embed, loaded only when a story is opened) */
.video-modal { width: min(960px, 94vw); max-width: none; padding: 0; border: 0; border-radius: var(--radius); background: #000; overflow: visible; }
.video-modal::backdrop { background: rgba(31, 79, 112, 0.82); }
.video-modal .frame-16x9 { position: relative; aspect-ratio: 16 / 9; }
.video-modal iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius); }
.video-modal .close {
  position: absolute; top: -56px; right: 0; width: 48px; height: 48px; border-radius: 50%; border: 0;
  display: grid; place-items: center; background: var(--paper); color: var(--ink); cursor: pointer;
}
.video-modal .close .icon { width: 22px; height: 22px; }

/* --------------------------------------------------------------------------
   Books — shelf
   -------------------------------------------------------------------------- */
.shelf { position: relative; padding-bottom: 26px; }
.shelf::after {
  content: ""; position: absolute; left: -12px; right: -12px; bottom: 0; height: 22px;
  background: linear-gradient(180deg, #c9925a, #a8743f); border-radius: 6px;
  box-shadow: 0 10px 18px -10px rgba(80, 50, 20, 0.6);
}
.shelf-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4) var(--space-3); align-items: stretch; position: relative; z-index: 1; }

.book { display: flex; flex-direction: column; gap: 0.8rem; }
.book-cover {
  --cover: var(--rose);
  position: relative; aspect-ratio: 3 / 4; border-radius: 6px 14px 14px 6px;
  background: var(--cover); overflow: hidden;
  box-shadow: inset 8px 0 0 rgba(0, 0, 0, 0.08), inset 10px 0 0 rgba(255, 255, 255, 0.25), 0 14px 22px -14px rgba(42, 51, 82, 0.6);
  display: flex; flex-direction: column; justify-content: space-between; padding: 14px 14px 14px 22px;
  transition: transform 0.3s var(--ease-out);
  transform-origin: bottom left;
}
@media (hover: hover) { .book:hover .book-cover { transform: rotate(-2deg) translateY(-6px); } }
.book-cover .cover-title { font-family: var(--font-display); font-variation-settings: "SOFT" 100; font-weight: 700; font-size: 1.25rem; line-height: 1.15; color: var(--ink); }
.book-cover .cover-by { font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); }
.book-cover svg { width: 100%; height: auto; }
.book h3 { margin: 0; font-size: 1.15rem; }
.book p { margin: 0; font-size: 0.98rem; color: var(--ink-soft); }
.book .book-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: auto; }   /* covers line up at the top, buttons at the bottom */
.book .btn { min-height: 44px; padding: 0.55em 1.1em; font-size: 0.98rem; }

.reads { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.read {
  display: grid; grid-template-columns: 88px 1fr; gap: 1.1rem; align-items: start;
  padding: var(--space-3); background: #fffdf8; border-radius: var(--radius); box-shadow: var(--shadow-paper);
}
/* Small cover thumbnails, softened with the same parchment treatment as the other outside images */
.read-cover { display: block; width: 88px; border-radius: 3px 6px 6px 3px; overflow: hidden; box-shadow: 0 6px 14px rgba(80, 60, 30, 0.18); transform: rotate(-2deg); transition: transform 0.25s var(--ease-out); }
.reads .read:nth-child(even) .read-cover { transform: rotate(2deg); }
.read-cover img { display: block; width: 100%; height: auto; filter: saturate(0.82) sepia(0.1) contrast(0.96) brightness(1.03); }
@media (hover: hover) { .read:hover .read-cover { transform: rotate(0) translateY(-3px); } }
.read h3 { margin-bottom: 0.2em; font-size: 1.1rem; }
.read p { margin: 0 0 0.5rem; font-size: 0.98rem; color: var(--ink-soft); }
.read p.read-by { margin: 0 0 0.35rem; font-size: 0.9rem; font-weight: 700; font-style: italic; color: var(--ink); }

/* --------------------------------------------------------------------------
   Activities
   -------------------------------------------------------------------------- */
.activity { background: #fffdf8; border-radius: var(--radius); box-shadow: var(--shadow-paper); overflow: hidden; display: flex; flex-direction: column; }
.activity[hidden] { display: none; }
.activity .card-body { gap: 0.6rem; }
.activity h3 { margin: 0; font-size: 1.2rem; color: var(--ink); }
.activity ul.materials { margin: 0; padding-left: 1.1rem; font-size: 0.98rem; color: var(--ink-soft); }
.activity .btn { align-self: flex-start; margin-top: auto; min-height: 44px; padding: 0.55em 1.15em; font-size: 0.98rem; }

.riddle-q { font-family: var(--font-display); font-variation-settings: "SOFT" 100; font-size: 1.2rem; line-height: 1.35; font-weight: 500; margin: 0; }
.riddle-a {
  margin: 0; padding: 0.8rem 1rem; border-radius: var(--radius-sm);
  background: var(--honey); color: var(--ink); font-weight: 700;
}
.riddle-a[hidden] { display: none; }
.reveal-btn { align-self: flex-start; }

.think-prompts { margin: 0; padding-left: 1.1rem; font-size: 0.98rem; color: var(--ink-soft); }


/* --------------------------------------------------------------------------
   Shop
   -------------------------------------------------------------------------- */
.shop-doors { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.shop-door {
  display: grid; grid-template-columns: 1fr 140px; gap: var(--space-2); align-items: center;
  padding: var(--space-4); border-radius: var(--radius-blob); box-shadow: var(--shadow-paper);
}
.shop-door h2 { font-size: var(--step-2); }
.shop-door p { color: var(--ink-soft); }
.shop-door svg { width: 100%; height: auto; }
.shop-door-amazon { background: var(--honey); }
.shop-door-etsy { background: var(--lilac); }

.product { background: #fffdf8; border-radius: var(--radius); box-shadow: var(--shadow-paper); overflow: hidden; display: flex; flex-direction: column; }
.product .card-art { aspect-ratio: 1 / 1; display: grid; place-items: center; }
.product .card-art .frame {
  width: 72%; aspect-ratio: 4 / 5; background: #fffdf8; padding: 8px;
  box-shadow: 0 0 0 6px #e7d4b4, 0 14px 22px -12px rgba(42, 51, 82, 0.55);
}
.product .card-art .frame svg { width: 100%; height: 100%; }
.product .card-art .book-cover { width: 64%; padding: 10px 10px 10px 18px; }
.product .book-cover .cover-title { font-size: clamp(0.85rem, 0.7rem + 0.5vw, 1.05rem); }
.product h3 { margin: 0; font-size: 1.15rem; }
.product .price { font-weight: 800; color: var(--ink); }
.product .where { font-size: 0.9rem; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 0.35em; }
.product .where .icon { width: 1em; height: 1em; }
.product .btn { margin-top: auto; align-self: stretch; min-height: 46px; font-size: 1rem; }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.founder {
  display: grid; grid-template-columns: 0.8fr 1.2fr; gap: var(--space-5); align-items: center;
}
.founder-portrait {
  aspect-ratio: 4 / 5; border-radius: var(--radius-blob); overflow: hidden;
  background: linear-gradient(180deg, var(--sky), var(--honey));
  display: grid; place-items: center; box-shadow: var(--shadow-lift); position: relative;
}
.founder-portrait svg { width: 70%; height: auto; }
.founder-portrait figcaption { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); background: rgba(251, 245, 233, 0.92); padding: 0.3rem 0.9rem; border-radius: 999px; font-size: 0.9rem; font-weight: 700; white-space: nowrap; }
.founder-letter p { font-size: 1.12rem; }
.founder-letter .salutation { font-family: var(--font-display); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: 1.3rem; margin-bottom: 0.6em; }
.founder-letter .signature { font-size: 1.6rem; line-height: 1.2; margin-top: 1rem; }
/* The founder's note on its own, in a handwritten letter style */
.founder.founder-solo { display: block; max-width: 720px; margin-inline: auto; }
/* The letter sits on a sheet of notepaper: soft white card, faint ruled lines, washi tape on top */
.letter-card {
  position: relative; background-color: #fffdf8;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(2.14rem - 1px), rgba(46, 110, 156, 0.10) calc(2.14rem - 1px), rgba(46, 110, 156, 0.10) 2.14rem);
  background-position: 0 2.6rem;
  border: 1px solid #ece2d2; border-radius: 6px;
  box-shadow: 0 2px 0 #f3ebdd, 0 18px 40px rgba(90, 70, 40, 0.12);
  padding: 2.6rem clamp(1.4rem, 5vw, 3.2rem) 2.2rem;
  transform: rotate(-0.6deg);
}
.letter-card.tape::before { top: -14px; }
/* every line of the letter is exactly one ruled line tall, so the writing sits on the lines */
.founder-solo .letter-card p, .founder-solo .letter-card .salutation, .founder-solo .letter-card .signature { line-height: 2.14rem; margin: 0 0 2.14rem; }
.founder-solo .letter-card .signature { margin: 0; }
.founder-solo .founder-letter p { font-family: "Patrick Hand", "Comic Sans MS", cursive; font-size: 1.38rem; line-height: 1.55; color: var(--ink); }
.founder-solo .founder-letter .salutation { font-family: "Patrick Hand", cursive; font-weight: 400; font-size: 1.7rem; }
.founder-solo .founder-letter .signature { font-family: "Patrick Hand", cursive; font-style: normal; font-size: 2rem; text-align: right; color: var(--coral); }
.signature { font-family: var(--font-display); font-variation-settings: "SOFT" 100, "WONK" 1; font-style: italic; font-size: var(--step-2); color: var(--rose-ink); }

.value-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.value-card { padding: var(--space-3); border-radius: var(--radius-blob); background: var(--vc, var(--rose)); }
.value-card .v-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 253, 248, 0.75); color: var(--vci, var(--rose-ink)); margin-bottom: 0.9rem; }
.value-card .v-icon .icon { width: 28px; height: 28px; }
.value-card h3 { color: var(--vci, var(--rose-ink)); }
.value-card p { margin: 0; font-size: 1rem; color: var(--ink-soft); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps li { position: relative; padding: var(--space-3); background: #fffdf8; border-radius: var(--radius); box-shadow: var(--shadow-paper); }
.steps li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 0.8rem;
  border-radius: 50%; background: var(--glow); color: var(--ink);
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
}
.steps h3 { margin-bottom: 0.3em; }
.steps p { margin: 0; font-size: 1rem; color: var(--ink-soft); }

.faq { max-width: 780px; margin-inline: auto; display: grid; gap: 0.8rem; }
.faq details { background: #fffdf8; border-radius: var(--radius); box-shadow: var(--shadow-paper); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.1rem 1.3rem; min-height: 48px;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-weight: 800; font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform 0.25s var(--ease-out); width: 22px; height: 22px; flex-shrink: 0; }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { padding: 0 1.3rem 1.2rem; margin: 0; color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   Restraint layer (after the base component rules)
   Neutral surfaces; colour comes from NoorInk's illustrations.
   -------------------------------------------------------------------------- */

/* Banners: one cream note between two stickers */
.banner { background: none; box-shadow: none; padding: var(--space-3) 0; }
.banner-copy { padding: 2.6rem 2.4rem 2.2rem; transform: rotate(-0.8deg); }
.banner-art img { width: 100%; height: auto; max-width: 210px; margin-inline: auto; display: block; }

/* Newsletter: a stitched outline on the paper instead of a coloured block */

/* Tags: one neutral style */
.pill, .pill-rose, .pill-honey, .pill-lilac, .pill-sea, .pill-plain { background: var(--paper-2); color: var(--ink-soft); }

/* Image slots: an empty scrapbook page with four kraft photo corners, waiting for the real
   story / activity / book / product image. To fill one, put an <img> inside the slot. */
.card-art, .spotlight-art, .art-slot {
  background:
    linear-gradient(135deg, var(--kraft) 0 13px, transparent 13px) top 10px left 10px / 24px 24px no-repeat,
    linear-gradient(225deg, var(--kraft) 0 13px, transparent 13px) top 10px right 10px / 24px 24px no-repeat,
    linear-gradient(45deg, var(--kraft) 0 13px, transparent 13px) bottom 10px left 10px / 24px 24px no-repeat,
    linear-gradient(315deg, var(--kraft) 0 13px, transparent 13px) bottom 10px right 10px / 24px 24px no-repeat,
    var(--paper-2);
  display: grid; place-items: center;
}
.card-art > img, .spotlight-art > img, .art-slot > img { width: 100%; height: 100%; object-fit: cover; }
.card { background: #fff; }
.card-title { color: var(--ink); }

/* Book covers: paper boards with a kraft spine, title-only until the real cover arrives */
.book-cover { background: var(--paper) !important; box-shadow: inset 10px 0 0 var(--kraft), inset 11px 0 0 rgba(0, 0, 0, 0.08), 0 14px 22px -14px rgba(51, 51, 51, 0.45); outline: 1px solid var(--paper-edge); }
.product .card-art { background: var(--paper-2) !important; }
.product .card-art .frame { background: var(--paper); box-shadow: 0 0 0 6px #fff, 0 14px 22px -12px rgba(51, 51, 51, 0.4); }

/* --------------------------------------------------------------------------
   Decorative stickers (NoorInk's own cut-outs). Decoration only: aria-hidden, never content.
   -------------------------------------------------------------------------- */
.h-deco {   /* a sticker tucked in at the end of a section heading */
  display: inline-block; height: 1.5em; width: auto; margin-left: 0.35em;
  vertical-align: -0.35em; transform: rotate(6deg);
}
.h-deco.h-deco-tall { height: 2.3em; vertical-align: -0.75em; margin-left: 0.3em; transform: rotate(10deg); }
.has-deco { position: relative; }
.deco-float { position: absolute; z-index: 1; height: auto; pointer-events: none; }
/* Paper airplane gliding in between the hero and the four doors, giving the tiles breathing room */
/* Homepage "Sponsor a Story" band: taped note, plane flying in from the right */
.sponsor-band { display: grid; grid-template-columns: 1.5fr 0.9fr; align-items: center; gap: var(--space-3); }
/* A soft sky-blue card that picks up the clouds around the boy on the plane */
.sponsor-note {
  text-align: center; padding: 2.6rem clamp(1.6rem, 3.6vw, 3.2rem) 2.4rem;
  background: #e6f0f7; border: 1.5px solid #cfe0ec; border-radius: 28px;
  box-shadow: 0 14px 30px rgba(46, 110, 156, 0.10);
}
.sponsor-note h2 { font-size: clamp(1.3rem, 1.05rem + 0.95vw, 1.8rem); margin-bottom: 0.45em; }
.sponsor-note p { margin: 0 auto 1.2em; color: var(--ink); max-width: 46ch; font-size: 0.97rem; }
.sponsor-band .collage-plane { margin: 0 -4% 0 0; }
.sponsor-note p { margin-bottom: 0.8em; }
.sponsor-note .btn { margin-top: 0.4em; }
.sponsor-note .sponsor-question { font-family: var(--font-display); font-variation-settings: "SOFT" 100; font-style: italic; font-weight: 600; font-size: 1.15rem; color: #a3373b; }

/* Sponsor a Story form */
.sponsor-form { max-width: 640px; margin: 0 auto; padding: 4rem clamp(1.6rem, 4vw, 2.8rem) 2.6rem; display: grid; gap: 1.2rem; }
/* The form sits on a plain beige card (no paper scan) */
.sponsor-form.paper-note { background: var(--paper-2) !important; border: 1.5px solid #e4d8c6; border-radius: 18px; box-shadow: 0 10px 28px rgba(120, 95, 60, 0.10) !important; padding: 2.2rem clamp(1.2rem, 4vw, 2.6rem) 2rem; }
.sponsor-form.tape::before { display: none; }
.field { display: grid; gap: 0.45rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font-weight: 800; color: var(--ink); padding: 0; }
.field legend { margin-bottom: 0.45rem; }
.field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: rgba(255, 255, 255, 0.82);
  border: 1.5px solid var(--kraft); border-radius: 12px; padding: 0.7rem 0.9rem; min-height: 48px;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.choice { display: flex; align-items: center; gap: 0.6rem; min-height: 48px; padding: 0.5rem 0.85rem; border-radius: 12px;
  border: 1.5px dashed var(--kraft); background: rgba(255, 255, 255, 0.55); cursor: pointer; font-weight: 600; }
.choice input { width: 1.15rem; height: 1.15rem; accent-color: var(--coral); flex-shrink: 0; margin: 0; }
.choice:has(input:checked) { border-style: solid; border-color: var(--coral); background: #fff; }
.choice:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 1px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.form-note { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
.sponsor-form[hidden], .sponsor-thanks[hidden], .form-status[hidden] { display: none; }
.form-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin: 0; padding: 0.7rem 0.9rem; border-radius: 12px; background: #fbe9e7; color: #8a2f2f; font-weight: 600; font-size: 0.95rem; }
.sponsor-form button[disabled] { opacity: 0.6; cursor: progress; }
.sponsor-thanks { max-width: 640px; margin: 0 auto; text-align: center; padding: 2.4rem clamp(1.2rem, 4vw, 2.6rem); background: var(--paper-2); border: 1.5px solid #e4d8c6; border-radius: 18px; }
.sponsor-thanks:focus { outline: none; }
.sponsor-thanks h2 { margin-bottom: 0.4em; }
.sponsor-thanks p { color: var(--ink-soft); margin: 0 auto 1.4rem; max-width: 46ch; }
@media (max-width: 820px) {
  .sponsor-band { grid-template-columns: 1fr; }
  .sponsor-band .collage-plane { max-width: 420px; justify-self: center; margin: 0; }
  .choices { grid-template-columns: 1fr; }
}

/* Page not found */
.notfound { min-height: calc(100vh - 430px); display: grid; align-items: center; }   /* keeps the footer at the bottom on tall screens */
.notfound-inner { max-width: 560px; margin-inline: auto; text-align: center; padding-block: var(--space-4); }
.notfound-art { width: 150px; height: auto; transform: rotate(-10deg); margin-bottom: var(--space-2); }
.notfound h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); margin-bottom: 0.4em; }
.notfound p { color: var(--ink-soft); margin: 0 auto 1.6rem; max-width: 44ch; }
.notfound-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }

html { scroll-behavior: smooth; }
#explore { scroll-margin-top: 80px; }   /* "Explore NoorInk" lands just under the sticky header */
.doors-flight { display: flex; justify-content: center; padding: 0 0 var(--space-3) 14%; margin-top: calc(var(--space-2) * -1); }
.doors-flight img { width: 132px; height: auto; transform: rotate(-6deg); }
.collage .deco-float.cloud { width: 130px; left: 30%; top: -6px; }
.collage .deco-float.bird { width: 86px; right: 24%; top: 8px; transform: scaleX(-1); }
.founder-portrait .art-slot { display: grid; width: 100%; aspect-ratio: 4 / 3; }
.rest-cat { display: block; width: 150px; height: auto; margin: var(--space-3) auto 0; }
.footer-moon { position: absolute; right: 5%; top: 46px; width: 104px; height: auto; pointer-events: none; z-index: 1; }

@media (max-width: 820px) {
  .doors-flight { padding: 0 0 var(--space-2) 18%; }
  .doors-flight img { width: 96px; }
  .footer-moon { width: 70px; top: 40px; right: 4%; }
}

/* Books we love: a calm list, kraft spines */
.read { background: transparent; box-shadow: none; padding: 0.6rem 0; }

/* Shop doorways: cream notes */
.shop-door { padding: 1rem 1.2rem; }
.shop-door.card { overflow: visible; background: none; }
.shop-door.card:hover { box-shadow: none; transform: translateY(-3px); }
.shop-door img { width: 100%; height: auto; }

/* About: values and steps sit straight on the paper */
.value-card { background: transparent; padding: 0; }
.value-card .v-icon { background: var(--paper-2); color: var(--blue); }
.value-card h3 { color: var(--ink); }
.value-card p { color: var(--ink-soft); }
.steps li { background: transparent; box-shadow: none; padding: 0; }
.steps li::before { background: var(--sun); }

/* Activities: riddle of the week is the page's one note */
.riddle-a { background: var(--paper-2); }

/* Founder placeholder: a taped-on photo */
.founder-portrait { background: #fff; aspect-ratio: auto; padding: 16px 14px 56px; border-radius: 4px; transform: rotate(-2deg); overflow: visible; }

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px);
  background: var(--ink); color: #fff; padding: 0.85rem 1.3rem; border-radius: 999px;
  font-weight: 700; box-shadow: var(--shadow-lift);
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   Motion — one orchestrated moment per page, everything else answers a tap
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  /* 1. One orchestrated moment: the hero settles and the words arrive, then everything rests */
  .js .hero-art img { animation: settle 1.8s var(--ease-out) both; }
  .js .hero-copy::before { animation: fade-in 1s ease-out 0.35s both; }
  .js .hero-copy > * { animation: rise 0.8s var(--ease-out) both; }
  .js .hero-copy > :nth-child(1) { animation-delay: 0.45s; }
  .js .hero-copy > :nth-child(2) { animation-delay: 0.6s; }
  .js .hero-copy > :nth-child(3) { animation-delay: 0.75s; }

  /* 2. The four doors unfold once, in sequence, when they first come into view */
  .js .reveal-group > * { opacity: 0; transform: translateY(18px) rotate(-1deg); }
  .js .reveal-group.is-in > * { animation: unfold 0.7s var(--ease-out) forwards; }
  .js .reveal-group.is-in > :nth-child(2) { animation-delay: 0.1s; }
  .js .reveal-group.is-in > :nth-child(3) { animation-delay: 0.2s; }
  .js .reveal-group.is-in > :nth-child(4) { animation-delay: 0.3s; }

  /* 3. Everything else only moves when someone reaches for it */
  .sticker-cluster:hover .c-main, .banner-art:hover img, .h-deco:hover, .rest-cat:hover { animation: wiggle 0.7s var(--ease-out); }
}

@keyframes settle { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: scale(1); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-5deg); } 60% { transform: rotate(4deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes unfold { to { opacity: 1; transform: none; } }

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

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .doors-grid, .value-cards, .steps { grid-template-columns: repeat(2, 1fr); }
  .rail { grid-auto-columns: calc((100% - 2 * var(--space-3)) / 3); }
  .grid-4, .shelf-row { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Below laptop width the sky gets too small for words: the illustration
   becomes a banner and the headline sits on paper beneath it. */
@media (max-width: 1024px) {
  .hero-stage { height: clamp(230px, 50vw, 460px); }
  .hero-art img { object-position: 24% 50%; }
  .hero-copy { position: static; width: auto; padding: 0 16px var(--space-3); margin-top: -0.5rem; }
  .hero-copy::before { display: none; }
  .hero-copy h1 { font-size: var(--step-4); }
  .hero-lede { color: var(--ink-soft); font-weight: 400; }
  .hero-actions .btn-ghost { background: transparent; }
}

@media (max-width: 820px) {
  :root { --space-5: 3rem; --space-6: 4.5rem; }
  .hero-stage { height: clamp(230px, 62vw, 420px); }
  .collage { grid-template-columns: 0.7fr 1.3fr; padding-top: var(--space-2); }
  .collage-note { grid-column: 1 / -1; order: -1; max-width: 560px; justify-self: center; padding-top: 4.2rem; }
  .collage-plane { margin-left: 0; }
  .hide-sm { display: none !important; }
  .banner { grid-template-columns: 1fr; padding: var(--space-4) var(--space-3); }
  .banner-art.left { display: none; }
  .banner-art.right { max-width: 280px; margin-inline: auto; }
  .quotes, .grid-3, .reads, .shop-doors { grid-template-columns: 1fr; }
  .grid-4, .shelf-row { grid-template-columns: 1fr 1fr; }
  .page-hero .wrap { grid-template-columns: 1fr; gap: var(--space-3); }
  /* phones: words first, then the sticker group small and tucked to the right */
  .page-hero { padding-top: var(--space-4); }
  .page-hero .wrap { gap: var(--space-1); }
  .page-hero-art { width: min(170px, 48%); justify-self: end; margin-top: calc(var(--space-1) * -1); }
  .spotlight, .founder { grid-template-columns: 1fr; gap: var(--space-3); }
  .spotlight { padding: var(--space-3); }
  .founder-portrait { max-width: 340px; margin-inline: auto; width: 100%; }
  .rail { grid-auto-columns: 72%; }
  .rail-btn { display: none; }
  .shop-door { grid-template-columns: 1fr 96px; padding: var(--space-3); }
}

@media (max-width: 520px) {
  .value-cards, .steps, .footer-grid { grid-template-columns: 1fr; }
  .doors-grid { grid-template-columns: 1fr 1fr; gap: var(--space-3) var(--space-2); }
  .door-tile p { font-size: 0.92rem; }
  .grid-4 { grid-template-columns: 1fr; }
  .shelf-row { grid-template-columns: 1fr 1fr; gap: var(--space-3) var(--space-2); }
  .book .btn { font-size: 0.88rem; padding: 0.5em 0.7em; gap: 0.35em; }
  .rail { grid-auto-columns: 82%; }
  .tabs, .filters { border-radius: var(--radius); }
  .book .btn { width: 100%; }
}
