/* Layout: a storybook. Parchment pages, wooden signs for titles, painted ribbons for names, the art does the talking.
   Deliberately one warm "daylight" theme, like a printed book. */
:root {
  --paper: #F5ECD8;
  --page: #FCF7EC;
  --ink: #3A2516;
  --muted: #7A5D45;
  --line: #E2D0AE;
  --wood: #94602F;
  --wood-dark: #5B381A;
  --glow: #F2B23A;
  --leaf: #4F7F2C;
  --rj: #2260D6;
  --lex: #C01C88;
  --ally: #0E9389;
  --vin: #E2600F;
  --shadow: 0 2px 0 rgba(90, 56, 26, .08), 0 18px 40px -22px rgba(90, 56, 26, .55);
  --f-display: "Fraunces", "Georgia", serif;
  --f-body: "Nunito", "Trebuchet MS", system-ui, sans-serif;
  --f-hand: "Gochi Hand", "Comic Sans MS", cursive;
  --wrap: 72rem;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0; color: var(--ink); background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(242, 178, 58, .18), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%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 .22 0 0 0 0 .1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  font: 18px/1.65 var(--f-body);
  padding-inline: clamp(16px, 4vw, 40px);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--glow); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--wood); }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 {
  font-family: var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 700; line-height: 1.08; text-wrap: balance; margin: 0;
}
h1 { font-size: clamp(2.3rem, 6vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 4.2vw, 2.6rem); }
h3 { font-size: 1.4rem; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin-inline: auto; }
.eyebrow, .label { font: 800 .76rem/1.2 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hand { font-family: var(--f-hand); color: var(--wood); line-height: 1.3; font-size: 1.35rem; }
section { padding-block: clamp(2.5rem, 7vw, 4.5rem); }
.center { text-align: center; justify-items: center; margin-inline: auto; }

/* Wooden sign title */
.sign {
  display: inline-block; position: relative; transform: rotate(-1.5deg);
  padding: .55em 1.3em .6em; border-radius: 10px;
  color: #FFF4DE; text-shadow: 0 2px 0 rgba(60, 30, 10, .45);
  background:
    repeating-linear-gradient(176deg, rgba(255,255,255,.07) 0 3px, transparent 3px 11px),
    repeating-linear-gradient(183deg, rgba(0,0,0,.08) 0 2px, transparent 2px 17px),
    linear-gradient(180deg, #A9703A, var(--wood) 55%, #7C4E24);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.25), inset 0 -3px 0 rgba(0,0,0,.25), 0 10px 22px -12px rgba(60, 30, 10, .8);
}
.sign::before, .sign::after { content: ""; position: absolute; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: #4A2C12; box-shadow: inset 0 1px 1px rgba(255,255,255,.35); }
.sign::before { left: .55em; } .sign::after { right: .55em; }
.sign small { display: block; font: 700 .5em/1.3 var(--f-body); letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.sec-head { display: grid; gap: .9rem; margin-bottom: 2.2rem; }
.sec-head > p:not(.eyebrow) { color: var(--muted); max-width: 38rem; font-size: 1.05rem; }
.sec-head.center > p { margin-inline: auto; }

/* Painted ribbon (brush stroke) */
.ribbon { display: inline-block; position: relative; padding: .12em .6em .2em; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.25); isolation: isolate; }
.ribbon::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--kid, var(--wood));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 48' preserveAspectRatio='none'%3E%3Cpath d='M4 11C30 3 70 6 118 4c38-1 64 2 78 5 2 9-1 18 2 26-3 6-1 7-4 9-40 2-80 0-120 2-24 1-46 0-70-3-3-9 1-18-2-26 0-3 1-5 2-6z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 48' preserveAspectRatio='none'%3E%3Cpath d='M4 11C30 3 70 6 118 4c38-1 64 2 78 5 2 9-1 18 2 26-3 6-1 7-4 9-40 2-80 0-120 2-24 1-46 0-70-3-3-9 1-18-2-26 0-3 1-5 2-6z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.c-rj { --kid: var(--rj); } .c-lex { --kid: var(--lex); } .c-ally { --kid: var(--ally); } .c-vin { --kid: var(--vin); }

/* Header */
#site-header {
  max-width: var(--wrap); margin-inline: auto; padding-block: .9rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1.5rem;
}
.brand img { height: clamp(40px, 6vw, 56px); width: auto; filter: drop-shadow(0 3px 4px rgba(60, 30, 10, .25)); }
#site-header nav { display: flex; flex-wrap: wrap; gap: .3rem; }
#site-header nav a { text-decoration: none; padding: .42rem .9rem; border-radius: 999px; font-weight: 800; font-size: .95rem; color: var(--wood-dark); }
#site-header nav a:hover { background: var(--page); }
#site-header nav a[aria-current="page"] { background: var(--wood-dark); color: #FFF4DE; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .8rem 1.4rem; border-radius: 999px; font-weight: 800; text-decoration: none;
  background: var(--leaf); color: #fff; border: 2px solid var(--leaf);
  box-shadow: 0 4px 0 #355A1C; transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { color: #fff; transform: translateY(2px); box-shadow: 0 2px 0 #355A1C; }
.btn-ghost { background: var(--page); color: var(--wood-dark); border-color: var(--line); box-shadow: 0 4px 0 var(--line); }
.btn-ghost:hover { color: var(--wood-dark); box-shadow: 0 2px 0 var(--line); }
.btn-kid { background: var(--kid); border-color: var(--kid); box-shadow: 0 4px 0 rgba(0,0,0,.25); justify-self: start; }
.btn-kid:hover { box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.btn-off { background: transparent; color: var(--muted); border: 2px dashed var(--line); box-shadow: none; cursor: default; }
.btn-off:hover { transform: none; color: var(--muted); box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Art frames */
.art { margin: 0; position: relative; max-width: 100%; }
.art img { width: 100%; height: auto; }
.art.is-empty .sketch, .sketch {
  display: grid; place-content: center; justify-items: center; gap: .3rem; text-align: center;
  min-height: 12rem; height: 100%; padding: 1.2rem; color: var(--muted);
  border: 2px dashed var(--line); border-radius: 50% 50% 18px 18px / 30% 30% 18px 18px; background: rgba(255,255,255,.35);
}
.sketch svg { width: 2.6rem; color: var(--wood); }
.sketch span { font: 700 1.2rem var(--f-display); color: var(--ink); }
.sketch small { font-family: var(--f-hand); font-size: 1.05rem; }

/* Hero */
.hero { padding-block: .5rem clamp(2rem, 6vw, 3.5rem); }
.hero-plate {
  position: relative; border-radius: clamp(18px, 3vw, 34px); overflow: hidden; box-shadow: var(--shadow);
  aspect-ratio: 16 / 7.4; max-width: 100%;
}
.hero-bg { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero-plate::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 55%, transparent 55%, rgba(58, 37, 22, .35)); pointer-events: none; }
.hero-logo { display: block; width: min(100%, 46rem); height: auto; margin: 0 auto clamp(.8rem, 2vw, 1.4rem); filter: drop-shadow(0 6px 8px rgba(60, 30, 10, .35)); animation: settle 1.1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes settle { from { transform: translateY(-8px) rotate(-1deg); } to { transform: none; } }
.hero-card {
  position: relative; z-index: 2; margin: clamp(-4rem, -7vw, -2rem) auto 0; max-width: 46rem;
  background: var(--page); border-radius: 22px; box-shadow: var(--shadow);
  padding: 1.6rem clamp(1.2rem, 4vw, 2.6rem) 2rem; display: grid; gap: 1rem; justify-items: center; text-align: center;
}
.hero-card .sign { font: 700 clamp(1.25rem, 3.4vw, 1.75rem)/1.15 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; margin-top: -3.2rem; }
.hero-card .status { margin-top: -.2rem; }
.hero-lede { font-size: 1.12rem; max-width: 36rem; }
.status { display: inline-block; padding: .2rem .8rem; border-radius: 999px; background: #FBE3AE; color: var(--wood-dark); font-weight: 800; font-size: .82rem; letter-spacing: .04em; }

/* Marks */
.marks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.8rem, 3vw, 2rem); }
.mk { display: grid; justify-items: center; gap: .15rem; text-align: center; }
.mk .mark { width: min(100%, 9.5rem); aspect-ratio: 1; filter: drop-shadow(0 8px 10px rgba(90, 56, 26, .25)); transition: transform .25s ease; }
.mk:hover .mark { transform: rotate(-6deg) scale(1.04); }
.mk-name { font: 700 1.4rem var(--f-display); color: var(--kid); margin-top: .4rem; }
.mk small { color: var(--muted); font-weight: 700; }

/* Kid cards (home) */
.kids { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.8rem, 2vw, 1.4rem); }
.kid {
  position: relative; display: grid; text-decoration: none; background: var(--page); border-radius: 22px; box-shadow: var(--shadow);
  padding: 1rem 1rem 1.3rem; transition: transform .2s ease;
}
.kid:hover { transform: translateY(-4px) rotate(-.5deg); color: inherit; }
.kid-art { background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--kid) 14%, var(--page)), var(--page) 70%); border-radius: 16px; overflow: hidden; }
.kid-art img { mix-blend-mode: multiply; aspect-ratio: 2 / 3; object-fit: cover; }
.kid-mark { position: absolute; top: .4rem; right: .4rem; width: 3.6rem; z-index: 1; filter: drop-shadow(0 4px 5px rgba(60, 30, 10, .3)); transform: rotate(8deg); }
.kid-body { display: grid; gap: .3rem; justify-items: center; text-align: center; margin-top: -1.2rem; position: relative; }
.kid h3 { font-size: 1.6rem; }
.role { color: var(--muted); font-weight: 800; font-size: .92rem; }
.quote { font-family: var(--f-hand); font-size: 1.25rem; line-height: 1.25; color: var(--ink); }
.quote.big { font-size: 1.6rem; }

/* Kid pages (characters) */
.lineup { border-radius: 26px; overflow: hidden; background: var(--page); box-shadow: var(--shadow); }
.lineup img { mix-blend-mode: multiply; }
.kid-stack { display: grid; gap: clamp(1.5rem, 4vw, 2.5rem); }
.kid-page {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(1rem, 4vw, 3rem); align-items: center;
  background: var(--page); border-radius: 26px; box-shadow: var(--shadow); padding: clamp(1rem, 3vw, 2rem);
  border-left: 8px solid var(--kid); scroll-margin-top: 1rem;
}
.kid-page.flip { border-left: 0; border-right: 8px solid var(--kid); }
.kid-page.flip .kid-art { order: 2; }
.kid-page .kid-art img { aspect-ratio: 2 / 3; max-height: 34rem; margin-inline: auto; width: auto; }
.kid-text { display: grid; gap: 1rem; min-width: 0; }
.kid-title { display: flex; align-items: center; gap: 1rem; }
.kid-mark-lg { width: 5rem; flex: none; filter: drop-shadow(0 5px 6px rgba(60, 30, 10, .3)); }
.kid-title h2 { font-size: clamp(2rem, 5vw, 2.8rem); }
.traits { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.traits li { font-size: .88rem; font-weight: 700; padding: .2rem .7rem; border-radius: 999px; border: 2px solid color-mix(in srgb, var(--kid) 35%, var(--page)); color: var(--ink); }
.sg { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.sg dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--kid); font-weight: 800; }
.sg dd { margin: 0; line-height: 1.4; }

/* Creatures */
.creatures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.creature { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1.2rem; align-items: center; background: var(--page); border-radius: 22px; padding: 1rem; box-shadow: var(--shadow); }
.creature-art img { mix-blend-mode: multiply; aspect-ratio: 1; width: 100%; object-fit: contain; border-radius: 14px; }
.creature-art .sketch { min-height: 11rem; }
.creature-text { display: grid; gap: .4rem; }
.more { font-weight: 800; color: var(--leaf); }

/* Book */
.book { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 3.5rem); align-items: center; }
.book-text { display: grid; gap: 1rem; min-width: 0; }
.open-book { position: relative; padding: clamp(6px, 1.2vw, 12px); background: linear-gradient(90deg, #E9DABC, #F8F0DF 48%, #CDB993 50%, #F8F0DF 52%, #E9DABC); border-radius: 10px; box-shadow: var(--shadow); }
.open-book .art img { border-radius: 4px; }
.open-book::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 8%; transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(60, 35, 15, .28), transparent); pointer-events: none; }
.caption { text-align: center; margin-top: .7rem; font-size: 1.15rem; }
.cover { box-shadow: var(--shadow); border-radius: 4px 14px 14px 4px; overflow: hidden; }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1.5rem; margin: .5rem 0 0; padding-top: 1rem; border-top: 2px dashed var(--line); }
.specs dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 800; }
.specs dd { margin: 0; font-variant-numeric: tabular-nums; }

/* Panels */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.panel { background: var(--page); border-radius: 22px; padding: clamp(1.3rem, 3vw, 2rem); box-shadow: var(--shadow); display: grid; gap: .9rem; align-content: start; min-width: 0; }
.panel h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); }
.panel-art { border-radius: 14px; overflow: hidden; }
.panel-art img { aspect-ratio: 16 / 9; object-fit: cover; }
.dedication { text-align: center; justify-items: center; }
.dedication .hand { font-size: clamp(1.5rem, 4vw, 2rem); color: var(--ink); }

/* Videos */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.vtile {
  display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: .9rem;
  align-items: center; padding: .9rem 1rem; background: var(--page); border-radius: 18px; text-decoration: none; box-shadow: var(--shadow);
  transition: transform .15s ease;
}
.vtile:hover { transform: translateY(-3px); color: var(--ink); }
.vnum, .vmark { grid-row: span 2; width: 3.4rem; height: 3.4rem; }
.vnum { display: grid; place-items: center; border-radius: 50%; font: 700 1.25rem var(--f-display); color: #FFF4DE; background: radial-gradient(circle at 35% 30%, #B57A40, var(--wood-dark)); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); font-variant-numeric: tabular-nums; }
.vmark { filter: drop-shadow(0 3px 3px rgba(60, 30, 10, .25)); }
.vtitle { font-weight: 800; line-height: 1.25; }
.vpage { color: var(--muted); font-size: .85rem; grid-column: 2; }
.vplay { grid-row: 1 / span 2; grid-column: 3; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--glow); color: var(--wood-dark); font-size: .8rem; padding-left: 2px; }
.vgroup + .vgroup { margin-top: 2.8rem; }
.vgroup h2 { margin-bottom: 1.2rem; font-size: clamp(1.5rem, 3.5vw, 2rem); }

/* Watch page (QR landing, phone first) */
.watch { max-width: 27rem; margin-inline: auto; display: grid; gap: 1rem; padding-block: .5rem 3rem; text-align: center; }
.watch h1 { font-size: clamp(1.9rem, 7vw, 2.5rem); }
.player { position: relative; aspect-ratio: 16 / 9; max-height: 74vh; margin-inline: auto; width: 100%; max-width: 100%; border-radius: 26px; overflow: hidden; background: var(--wood-dark); box-shadow: var(--shadow); border: 6px solid var(--page); }
.player video { width: 100%; height: 100%; object-fit: cover; display: block; }
.player-ph { display: none; }
.player.missing video { display: none; }
.player.missing .player-ph { position: absolute; inset: 0; display: grid; align-content: end; justify-items: center; gap: .4rem; padding: 1.5rem 1.2rem 2rem; color: #FFF4DE; }
.player-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.player-ph::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(transparent 40%, rgba(40, 22, 8, .85)); }
.player-ph { isolation: isolate; }
.player-ph .hand { color: #FFF4DE; font-size: 1.6rem; }
.watch-nav { display: grid; gap: .8rem; }
.watch-back { font-size: 1.3rem; }

/* Shop */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1.5rem; }
.product { background: var(--page); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.product-art img { aspect-ratio: 1; object-fit: cover; }
.product-body { padding: 1.2rem 1.3rem 1.5rem; display: grid; gap: .6rem; flex: 1; align-content: start; }
.product-body .btn { margin-top: .5rem; justify-self: start; }
.price { font: 700 1.25rem var(--f-display); font-variant-numeric: tabular-nums; color: var(--wood-dark); }
.notice { padding: 1rem 1.3rem; border-radius: 16px; background: #FBE3AE; margin-top: 2rem; max-width: 44rem; }

/* Page title */
.page-head { padding-block: clamp(1.5rem, 5vw, 3rem) 0; display: grid; gap: 1rem; justify-items: center; text-align: center; }
.page-head .sign { font: 700 clamp(1.8rem, 5vw, 2.8rem)/1.1 var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1; }
.page-head > p:not(.eyebrow) { color: var(--muted); font-size: 1.1rem; max-width: 38rem; }

/* Footer */
#site-footer { max-width: var(--wrap); margin-inline: auto; padding-block: 2.5rem 2rem; margin-top: 2rem; border-top: 2px dashed var(--line); display: grid; gap: 1.5rem; }
.foot-grid { display: grid; grid-template-columns: 11rem minmax(0, 1.3fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.foot-grid > div { display: grid; gap: .5rem; min-width: 0; }
.foot-pub img { width: 100%; max-width: 11rem; }
.foot-tag { font-size: 1.4rem; margin-bottom: .6rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-weight: 700; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { padding: .3rem .85rem; border-radius: 999px; background: var(--page); border: 2px solid var(--line); text-decoration: none; font-size: .9rem; font-weight: 800; }
.tag-off { color: var(--muted); }
.tag-off small { font-weight: 600; }
.fine { font-size: .82rem; color: var(--muted); }

@media (max-width: 900px) {
  .kids { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book, .split, .creatures { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: 8rem minmax(0, 1fr); }
  .foot-grid > div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .hero-plate { aspect-ratio: 4 / 5; }
  .hero-bg { object-position: 50% 50%; }
  .hero-card .sign { margin-top: -2.6rem; }
  .marks { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.6rem; }
  .kid-page, .kid-page.flip { grid-template-columns: minmax(0, 1fr); border-left: 0; border-right: 0; border-top: 8px solid var(--kid); }
  .kid-page.flip .kid-art { order: 0; }
  .kid-page .kid-art img { max-height: 24rem; }
  .sg { grid-template-columns: minmax(0, 1fr); }
  .creature { grid-template-columns: 6.5rem minmax(0, 1fr); }
  .specs { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-pub img { max-width: 8rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Home: the hero carries the logo, so the header shows navigation only */
[data-page="home"] #site-header { justify-content: center; }
[data-page="home"] #site-header .brand { display: none; }
.lost-door { width: min(14rem, 60%); margin-inline: auto; mix-blend-mode: multiply; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Landscape videos get a wider player */
.watch.wide { max-width: 52rem; }
.watch.wide .player { max-height: none; }
