/* Picture Book Snob. Tokens from the approved Figma (section 9741:387): Caprasimo for display, Lexend for text. */
:root {
  --cocoa: #2B1D18;      /* text, night, footer */
  --muted: #4A3A33;
  --white: #FFFFFF;
  --rose: #F7DDE5;       /* endpaper ground */
  --rose-soft: #FBF1F4;
  --rose-line: #EFD3DC;
  --raspberry: #9D244C;  /* links and actions */
  --pool: #C6E9ED;       /* chips, craft band */
  --corn: #F4CE6A;       /* torch light, tips */
  --display: "Caprasimo", Georgia, serif;
  --text: "Lexend", system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 120px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--white); color: var(--cocoa); font: 300 18px/1.6 var(--text); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--raspberry); text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--raspberry); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--cocoa); margin: 0; letter-spacing: 0; }
h2 { font-size: clamp(30px, 3vw, 44px); line-height: 1.14; }
p { margin: 0 0 1em; }
strong { font-weight: 600; }
.wrap { width: 100%; max-width: calc(1200px + 2 * var(--gutter)); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.skip { position: absolute; left: 12px; top: 0; transform: translateY(-120%); background: var(--cocoa); color: var(--white); padding: 10px 16px; border-radius: 8px; z-index: 10; }
.skip:focus { transform: translateY(12px); }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 28px; }
.brand { font: 400 26px/1.2 var(--display); color: var(--cocoa); text-decoration: none; }
.brand--light { color: var(--white); font-size: 28px; }
.nav { display: flex; gap: 8px 32px; flex-wrap: wrap; }
.nav a { color: var(--cocoa); text-decoration: none; font-weight: 400; font-size: 16px; padding: 10px 0; background: linear-gradient(var(--raspberry), var(--raspberry)) 0 85% / 0 2px no-repeat; transition: background-size .25s ease; }
.nav a:hover { background-size: 100% 2px; }

/* shared bits */
.eyebrow { font: 600 13px/1.4 var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--raspberry); margin: 0 0 4px; }
.chip { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; background: var(--pool); color: var(--cocoa); font: 600 13px/18px var(--text); white-space: nowrap; }
.chip--link { padding: 11px 16px; font-size: 15px; text-decoration: none; transition: transform .15s ease, background-color .15s ease; }
.chip--link:hover { background: #b3dfe5; transform: translateY(-2px); }
.btn { display: inline-flex; align-items: center; min-height: 52px; padding: 14px 28px; border-radius: 999px; background: var(--raspberry); color: var(--white); font: 600 17px/1.4 var(--text); text-decoration: none; transition: transform .15s ease, background-color .15s ease; }
.btn:hover { background: #87193f; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.more { font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 500px) minmax(0, 1fr); gap: 56px; align-items: center; padding-top: 24px; padding-bottom: 72px; }
.hero h1 { font-size: clamp(40px, 4.4vw, 56px); line-height: 1.07; margin: 14px 0 20px; }
.hero__sub { font-size: 20px; line-height: 1.5; color: var(--muted); margin: 0 0 22px; }
.ages { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.ages__k { font: 600 15px/1.4 var(--text); margin-right: 4px; }

/* the torch: sceneai.art "Stories in Light", re-cast. The colour layer shows only inside a soft oval that follows the pointer. */
.torch { position: relative; aspect-ratio: 644 / 520; border-radius: 28px; overflow: hidden; background: #1F1612; isolation: isolate;
  --x: 58%; --y: 62%; --mw: 300px; --mh: 270px; }
.torch img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }
.torch__day { -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%); mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: var(--mw) var(--mh); mask-size: var(--mw) var(--mh);
  -webkit-mask-position: 56% 70%; mask-position: 56% 70%; }
/* site.js sets --x/--y/--mw/--mh in pixels (the oval's centre and size) and marks the panel live */
.torch[data-live] .torch__day { -webkit-mask-position: calc(var(--x) - var(--mw) / 2) calc(var(--y) - var(--mh) / 2); mask-position: calc(var(--x) - var(--mw) / 2) calc(var(--y) - var(--mh) / 2); }
.torch__glow { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(calc(var(--mw) * .56) calc(var(--mh) * .56) at var(--x) var(--y), rgba(244, 206, 106, 0) 55%, rgba(244, 206, 106, .28) 72%, rgba(244, 206, 106, 0) 100%); }

/* endpaper index */
.index { background: var(--rose); padding: 88px 0 96px; }
.index__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 40px; flex-wrap: wrap; margin-bottom: 40px; }
.index__head p { margin: 0; color: var(--muted); font-size: 18px; }
.guides { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px 32px; }
.guides--three { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.guide a { display: block; color: var(--cocoa); text-decoration: none; }
.guide img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; transition: transform .35s ease; }
.guide a:hover img { transform: scale(1.025); }
.guide { border-radius: 14px; }
.guide a > img { margin-bottom: 12px; }
.guide__name { font-size: 26px; line-height: 1.15; display: block; transition: transform .15s ease; }
.guide a:hover .guide__name { transform: translateY(-2px); }
.guide__desc { display: block; font: 400 15px/1.45 var(--text); color: var(--muted); margin-top: 6px; }
.guide a { overflow: visible; }

/* home text */
.home-text { padding-top: 96px; padding-bottom: 24px; }
.lede { max-width: 860px; font-size: 21px; line-height: 1.55; margin-bottom: 48px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.col h2, .how h2, .flow h2, .extra h2, .start > h2, .related h2, .quick h2, .books__h { font-size: clamp(28px, 2.4vw, 36px); line-height: 1.18; margin-bottom: 18px; }
.col p, .flow p { color: var(--cocoa); }
.start { padding-top: 72px; padding-bottom: 32px; scroll-margin-top: 24px; }
.plates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-top: 28px; }
.plate { padding: 28px 30px; border: 1.5px solid var(--rose-line); border-radius: 22px; background: var(--white); }
.plate__title { font-size: 26px; line-height: 1.2; margin: 14px 0 6px; }
.plate__meta { font: 400 14px/1.5 var(--text); color: var(--muted); margin-bottom: 12px; }
.plate p:last-child { margin-bottom: 0; }
.how { max-width: 860px; margin-top: 64px; }
#by-age, #by-age p { scroll-margin-top: 24px; }

/* craft band */
.craft { padding-top: 72px; padding-bottom: 104px; }
.craft__band { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; align-items: center; background: var(--pool); border-radius: 28px; padding: 48px 56px; }
.craft h2 { font-size: clamp(32px, 3vw, 40px); line-height: 1.15; margin: 8px 0 14px; }
.craft__img { border-radius: 18px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* guide page */
.opening { background: var(--rose); }
.opening__in { display: grid; grid-template-columns: minmax(0, 1fr) 520px; gap: 64px; align-items: center; padding-top: 56px; padding-bottom: 64px; }
.crumbs { display: flex; gap: 8px; font: 400 14px/1.4 var(--text); color: var(--raspberry); margin-bottom: 16px; }
.crumbs a { text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.opening h1 { font-size: clamp(36px, 4vw, 52px); line-height: 1.1; margin-bottom: 18px; }
.opening p { font-size: 19px; line-height: 1.58; color: var(--muted); }
.opening .byline { font: 400 14px/1.5 var(--text); color: var(--muted); margin: 6px 0 0; }
.opening__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; }
.quick { padding-top: 56px; }
.picks { list-style: none; margin: 0; padding: 8px 28px; border: 1.5px solid var(--rose-line); border-radius: 20px; }
.picks li + li { border-top: 1px solid #F3E3E8; }
.picks a { display: grid; grid-template-columns: 92px minmax(0, auto) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 0; color: var(--cocoa); text-decoration: none; }
.pick__t { font: 400 21px/1.25 var(--display); }
.pick__by { font-size: 15px; color: var(--muted); }
.pick__go { font: 600 14px/1.4 var(--text); color: var(--raspberry); white-space: nowrap; transition: transform .15s ease; }
.picks a:hover .pick__go { transform: translateY(2px); }
.picks a:hover .pick__t { color: var(--raspberry); }
.article { padding-top: 48px; padding-bottom: 64px; }
.article > .flow, .books__h { max-width: 968px; padding-left: 288px; }
.flow { margin-bottom: 40px; }
.books__h { margin-top: 24px; margin-bottom: 24px; }
.book { display: grid; grid-template-columns: 240px minmax(0, 680px); gap: 48px; justify-content: start; padding: 28px 0; scroll-margin-top: 24px; }
.book__rail { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 6px; }
.kv { display: flex; flex-direction: column; gap: 2px; }
.kv__k { font: 600 11px/1.45 var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--raspberry); }
.kv__v { font: 400 15px/1.45 var(--text); }
.book__title { font-size: 32px; line-height: 1.18; margin-bottom: 14px; }
.tip { background: rgba(244, 206, 106, .35); border-radius: 16px; padding: 16px 20px; margin-top: 6px; }
.tip__k { display: block; font: 600 11px/1.45 var(--text); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.tip p { margin: 0; font-size: 16px; line-height: 1.55; font-weight: 400; }
.extra { background: var(--rose-soft); padding: 64px 0 72px; }
.extra__in { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.extra__tips h2 + p { margin-top: 0; }
.extra__tips h2:not(:first-child) { margin-top: 32px; }
.q { border-bottom: 1px solid #EBCFD8; }
.q summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font: 400 17px/1.45 var(--text); }
.q summary::-webkit-details-marker { display: none; }
.q summary::after { content: "+"; color: var(--raspberry); font-size: 24px; line-height: 1; transition: transform .2s ease; }
.q[open] summary::after { transform: rotate(45deg); }
.q p { margin: 0 0 18px; font-size: 16px; }
.related { padding-top: 72px; padding-bottom: 96px; }
.related .guides { margin-top: 28px; }
.plain { max-width: 820px; padding-top: 48px; padding-bottom: 96px; }
.plain h1 { font-size: clamp(36px, 4vw, 52px); line-height: 1.1; margin-bottom: 24px; }
.plain .guides { margin: 28px 0 36px; grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* footer */
.foot { background: var(--cocoa); color: var(--rose); padding: 64px 0 56px; }
.foot__top { display: flex; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; margin-bottom: 28px; }
.foot__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 26px; max-width: 760px; justify-content: flex-end; }
.foot__links a { color: var(--rose); text-decoration: none; font: 400 15px/2 var(--text); }
.foot__links a:hover { color: var(--white); text-decoration: underline; }
.foot a:focus-visible { outline-color: var(--corn); }
.foot__note { font-size: 15px; line-height: 1.6; max-width: 900px; }
.foot__small { font: 400 13px/1.5 var(--text); color: #C9B8B0; margin: 0; }

/* compact layouts */
@media (max-width: 1099px) {
  .guides, .guides--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .article > .flow, .books__h { padding-left: 232px; max-width: none; }
  .book { grid-template-columns: 200px minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 1023px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-bottom: 56px; }
  .opening__in { grid-template-columns: 1fr; gap: 32px; }
  .craft__band { grid-template-columns: 1fr; padding: 36px 32px; }
  .craft__img { max-width: 520px; }
  .extra__in, .cols { grid-template-columns: 1fr; gap: 40px; }
  .picks a { grid-template-columns: auto minmax(0, 1fr) auto; }
  .pick__by { grid-column: 2 / 4; grid-row: 2; margin-top: -10px; }
}
@media (min-width: 760px) and (max-width: 1023px) {
  .torch { aspect-ratio: 16 / 9; }
  .opening__img { max-width: 480px; justify-self: center; }
  .hero, .opening__in { padding-bottom: 40px; }
}
@media (max-width: 759px) {
  body { font-size: 17px; }
  .guides, .guides--three, .plain .guides { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
  .plates { grid-template-columns: 1fr; }
  .book { grid-template-columns: 1fr; gap: 14px; padding: 22px 0; }
  .article > .flow, .books__h { padding-left: 0; }
  .book__rail { gap: 6px; padding-top: 0; order: 2; }
  .kv { flex-direction: row; align-items: baseline; gap: 8px; }
  .book__col { display: contents; }
  .book__title { order: 1; margin-bottom: 0; }
  .book__col > p, .tip { order: 3; }
  .index { padding: 64px 0 72px; }
  .home-text { padding-top: 64px; }
  .foot__links { justify-content: flex-start; }
}
@media (max-width: 559px) {
  .guides, .guides--three, .plain .guides { grid-template-columns: 1fr; gap: 16px; }
  .guide a { display: grid; grid-template-columns: 120px minmax(0, 1fr); column-gap: 16px; align-items: center; }
  .guide a > img { grid-row: 1 / 3; margin: 0; }
  .guide__name { font-size: 22px; align-self: end; }
  .guide__desc { align-self: start; margin-top: 2px; font-size: 14px; }
  .picks { padding: 4px 18px; }
  .pick__go { display: none; }
  .picks a { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .pick__by { grid-column: auto; grid-row: auto; margin: 0; }
  .picks .chip { justify-self: start; }
  .nav__long { display: none; }
  .plate { padding: 22px; }
  .craft__band { padding: 28px 22px; border-radius: 22px; }
  .hero h1 { font-size: 38px; }
}
