/* Public pages (home, pricing, legal…). Builds on sb.css. */

/* ---------------------------------------------------------------- hero (v1.1)
   A sky that drifts, a kite on a string, and a picture book that turns its
   own pages with the name the visitor types. */
.hero { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(36px, 6vw, 90px) clamp(60px, 9vw, 130px); }
.hero-live { background: linear-gradient(180deg, #e8ebff 0%, #f2ecfd 48%, var(--paper) 100%); }
/* The hero runs up under the see-through header, so there's no seam. */
.hero { margin-top: -65px; padding-top: calc(clamp(36px, 6vw, 90px) + 65px); }
:root[data-theme="dark"] .hero-live { background: linear-gradient(180deg, #0f1540 0%, #1d1b4d 55%, var(--paper) 100%); }
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; gap: clamp(40px, 6vw, 80px); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1fr 1.05fr; } }
.hero h1 { max-width: 13ch; font-size: clamp(2.5rem, 1.4rem + 4.6vw, 5rem); line-height: 1.02; letter-spacing: -.01em; }
.hero-form { margin-top: 2rem; max-width: 540px; }
.hero-form label { display: block; margin-bottom: .5rem; }
.hero-input { display: flex; gap: .6rem; flex-wrap: wrap; padding: 8px; border-radius: calc(var(--r-md) + 8px); background: color-mix(in srgb, var(--sheet) 70%, transparent); backdrop-filter: blur(10px); border: 1.5px solid color-mix(in srgb, var(--line) 80%, transparent); box-shadow: 0 20px 50px -30px rgba(28, 36, 89, .5); }
.hero-input .input { flex: 1 1 200px; min-height: 56px; font-size: var(--t-lg); border-color: transparent; background: var(--sheet); }
.hero-form .tiny { margin-top: .7rem; }

/* One orchestrated entrance: words pop in, then the rest rises. */
.pop-words .w { display: inline-block; animation: pop-in .75s var(--spring) both; animation-delay: calc(var(--i) * 75ms + .1s); }
.rise { animation: rise .9s var(--ease) both; animation-delay: var(--delay, 0s); }

/* The sky */
.sky-scene { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); }
.night .sky-scene { -webkit-mask-image: none; mask-image: none; }
.sky-scene .orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; will-change: transform; }
.sky-scene .o1 { width: 40vw; height: 40vw; background: var(--plum); top: -18vw; inset-inline-start: -12vw; animation: drift 18s ease-in-out infinite alternate; }
.sky-scene .o2 { width: 32vw; height: 32vw; background: var(--yellow); top: 8%; inset-inline-end: -10vw; animation: drift-b 22s ease-in-out infinite alternate; }
.sky-scene .o3 { width: 34vw; height: 34vw; background: var(--teal); bottom: -20vw; inset-inline-start: 30%; opacity: .32; animation: drift 26s ease-in-out infinite alternate-reverse; }
.star { position: absolute; left: var(--x); top: var(--y); width: 10px; height: 10px; background: var(--yellow); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: twinkle 2.8s ease-in-out infinite; animation-delay: var(--d); opacity: .85; }
.star:nth-child(3n) { background: var(--pink); width: 7px; height: 7px; }
.star:nth-child(4n) { background: var(--blue); width: 6px; height: 6px; }
.cloud { position: absolute; width: 190px; fill: #fff; opacity: .85; filter: drop-shadow(0 10px 20px rgba(47, 85, 212, .12)); animation: cloud-x 48s linear infinite; }
:root[data-theme="dark"] .cloud { fill: #2a3170; opacity: .6; }
.cloud.c1 { top: 9%; }
.cloud.c2 { top: 70%; width: 130px; animation-duration: 64s; animation-delay: -30s; opacity: .7; }
@keyframes cloud-x { from { transform: translateX(-25vw); } to { transform: translateX(115vw); } }
[dir="rtl"] .cloud { animation-name: cloud-x-rtl; }
@keyframes cloud-x-rtl { from { transform: translateX(25vw); } to { transform: translateX(-115vw); } }
.kite { position: absolute; top: calc(65px + 3%); inset-inline-end: 4%; width: 64px; transform-origin: 50% 100%; animation: bob 4.5s ease-in-out infinite; }
.kite-body { fill: var(--yellow); stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.kite-x { stroke: var(--ink); stroke-width: 2; }
.kite-tail { fill: none; stroke: var(--pink); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 7 7; animation: tail 1s linear infinite; }
@keyframes tail { to { stroke-dashoffset: -28; } }
@media (max-width: 700px) { .kite { width: 44px; inset-inline-end: 2%; top: 2%; } }

/* The living book */
.hero-stage { position: relative; perspective: 2400px; width: min(100%, 640px); justify-self: center; padding: 28px 10px 18px; }
.live-badge { position: absolute; top: -6px; inset-inline-start: 50%; translate: -50% 0; z-index: 5; display: inline-flex; gap: .5rem; align-items: center; padding: .35rem .85rem; border-radius: var(--r-pill); background: #1c2459; color: #fff; font-size: var(--t-xs); font-weight: 700; white-space: nowrap; box-shadow: 0 10px 24px -12px rgba(28, 36, 89, .7); }
[dir="rtl"] .live-badge { translate: 50% 0; }
.live-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #3ee08f; box-shadow: 0 0 0 0 rgba(62, 224, 143, .7); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(62, 224, 143, 0); } 100% { box-shadow: 0 0 0 0 rgba(62, 224, 143, 0); } }
.flipbook { position: relative; width: 100%; aspect-ratio: 2 / 1; transform-style: preserve-3d; transform: rotateX(10deg) rotateZ(-1.5deg); container-type: inline-size; cursor: pointer; animation: book-float 7s ease-in-out infinite; }
[dir="rtl"] .flipbook { transform: rotateX(10deg) rotateZ(1.5deg); }
@keyframes book-float { 50% { translate: 0 -10px; } }
/* Cover boards peeking out behind the pages, printed with the pink offset. */
.flipbook::before { content: ""; position: absolute; inset: -2.2cqi -1.6cqi; border-radius: 2.4cqi; background: var(--blue); box-shadow: 1.6cqi 1.6cqi 0 var(--pink), 0 4cqi 6cqi -2cqi rgba(28, 36, 89, .55); transform: translateZ(-2px); }
.fb-left, .fb-right, .leaf { position: absolute; top: 0; bottom: 0; width: 50%; }
.fb-left { left: 0; } .fb-right { right: 0; }
.leaf { right: 0; transform-origin: 0 50%; transform-style: preserve-3d; z-index: calc(var(--n) - var(--k)); transition: transform 1.15s cubic-bezier(.62, .04, .3, 1), z-index 0s .57s; }
.leaf.turned { transform: rotateY(-180deg); z-index: calc(var(--k) + 1); }
[dir="rtl"] .fb-left { left: auto; right: 0; } [dir="rtl"] .fb-right { right: auto; left: 0; }
[dir="rtl"] .leaf { right: auto; left: 0; transform-origin: 100% 50%; }
[dir="rtl"] .leaf.turned { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.face.back { transform: rotateY(180deg); }
.fb-spine { position: absolute; top: 0; bottom: 0; left: calc(50% - 1.2cqi); width: 2.4cqi; background: linear-gradient(90deg, transparent, rgba(28, 36, 89, .22), transparent); transform: translateZ(1px); pointer-events: none; }
.pg { position: absolute; inset: 0; background: #fffdf8; color: #1c2459; }
/* Inner shading towards the spine. */
.fb-right .pg, .leaf .front .pg { border-radius: 0 1.4cqi 1.4cqi 0; box-shadow: inset 2.2cqi 0 2.2cqi -1.6cqi rgba(28, 36, 89, .25); }
.fb-left .pg, .leaf .back .pg { border-radius: 1.4cqi 0 0 1.4cqi; box-shadow: inset -2.2cqi 0 2.2cqi -1.6cqi rgba(28, 36, 89, .25); }
[dir="rtl"] .fb-right .pg, [dir="rtl"] .leaf .front .pg { border-radius: 1.4cqi 0 0 1.4cqi; box-shadow: inset -2.2cqi 0 2.2cqi -1.6cqi rgba(28, 36, 89, .25); }
[dir="rtl"] .fb-left .pg, [dir="rtl"] .leaf .back .pg { border-radius: 0 1.4cqi 1.4cqi 0; box-shadow: inset 2.2cqi 0 2.2cqi -1.6cqi rgba(28, 36, 89, .25); }
.pg-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-img { overflow: hidden; }
.pg-text, .pg-title, .pg-end { display: grid; place-content: center; text-align: center; padding: 3.5cqi 4cqi; gap: 1.4cqi; }
.pg-text p { margin: 0; font: 600 3.4cqi/1.45 var(--f-display); }
[dir="rtl"] .pg-text p { font-weight: 400; }
.pg-text b { color: var(--blue); background: linear-gradient(transparent 62%, rgba(255, 210, 63, .7) 0); padding-inline: .1em; }
.pg-no { position: absolute; bottom: 2cqi; inset-inline: 0; font-size: 1.8cqi; color: #8a90b5; }
.pg-kicker { font-size: 1.8cqi; letter-spacing: .3em; color: #8a90b5; font-weight: 700; }
.pg-h { font: 700 4.6cqi/1.1 var(--f-display); color: var(--blue); }
[dir="rtl"] .pg-h { font-weight: 400; }
.pg-h.bump { animation: bump .45s var(--spring); }
@keyframes bump { 40% { transform: scale(1.08) rotate(-2deg); } }
.pg-stars { color: var(--pink); font-size: 2.6cqi; letter-spacing: .4em; }
.pg-blank { background: #f6f1e6; }
/* Stars flying from the name to the book */
.spark { position: absolute; z-index: 6; font-style: normal; color: var(--hue); font-size: 20px; pointer-events: none; animation: spark 1.1s var(--ease) forwards; text-shadow: 0 0 12px currentColor; }
@keyframes spark { from { opacity: 1; transform: translate(0, 0) scale(.4) rotate(0); } to { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(1.4) rotate(160deg); } }

/* Scroll-driven reveals (with an IntersectionObserver fallback in site.js). */
@supports (animation-timeline: view()) {
  .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 75%; }
  @keyframes reveal { from { opacity: 0; transform: translateY(46px) scale(.97); } to { opacity: 1; transform: none; } }
}
.no-sda .reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.no-sda .reveal.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- sections */
.band { background: var(--paper-2); }
.section h2 { max-width: 22ch; }
.h-sub { font-family: var(--f-body); font-size: var(--t-xl); margin-top: 2.5rem; }
.h-step { font-family: var(--f-body); font-size: var(--t-xl); }

/* A real sequence, so it's numbered, joined by a dotted trail that draws itself. */
.howto { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: clamp(20px, 3vw, 36px); counter-reset: step; position: relative; }
@media (min-width: 760px) {
  .howto { grid-template-columns: repeat(4, 1fr); }
  .howto::before { content: ""; position: absolute; top: 1.4rem; inset-inline: 1.4rem 12%; border-top: 3px dashed color-mix(in srgb, var(--blue) 45%, transparent); transform-origin: 0 50%; }
  [dir="rtl"] .howto::before { transform-origin: 100% 50%; }
  @supports (animation-timeline: view()) { .howto::before { animation: fill-x linear both; animation-timeline: view(); animation-range: entry 30% cover 55%; } }
}
.howto li { counter-increment: step; position: relative; padding-top: 3.8rem; }
.howto li::before {
  content: counter(step); position: absolute; top: 0; inset-inline-start: 0;
  width: 2.8rem; height: 2.8rem; display: grid; place-items: center; border-radius: 50%;
  background: var(--blue); color: var(--on-blue); font: 700 1.4rem/1 var(--f-display);
  box-shadow: 3px 3px 0 var(--pink); transition: transform .4s var(--spring);
}
.howto li:hover::before { transform: scale(1.15) rotate(-8deg); }
.howto h3 { margin-bottom: .35rem; }
.howto p { color: var(--ink-2); margin: 0; }

/* Cards with a rainbow edge that rotates on hover, and a spotlight under the pointer. */
.glow-card { position: relative; isolation: isolate; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .3s var(--ease), border-color .2s; }
.glow-card::before { content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: inherit; background: conic-gradient(from var(--ang), var(--pink), var(--yellow), var(--teal), var(--blue), var(--pink)); opacity: 0; transition: opacity .35s; animation: spin-ang 4s linear infinite; }
.glow-card::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--yellow) 22%, var(--sheet)), var(--sheet) 60%); }
.glow-card:hover { border-color: transparent !important; }
.glow-card:hover::before { opacity: 1; }
.ways { margin-top: 1.5rem; }
.way { display: grid; align-content: start; gap: .5rem; padding: clamp(22px, 3vw, 34px); border-radius: var(--r-lg); text-decoration: none; color: var(--ink); background: var(--sheet); border: 2px solid var(--line); }
.way:hover { color: var(--ink); }
.way h3 { font-family: var(--f-display); font-size: var(--t-xl); }
[dir="rtl"] .way h3 { font-weight: 400; }
.way p { color: var(--ink-2); margin: 0 0 .5rem; }
.way .chip { justify-self: start; }
.way-own { border-style: dashed; }

.why { margin-top: 1.5rem; row-gap: 2.2rem; }
.why-item { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; align-items: start; }
.why-item > :not(.why-ico) { grid-column: 2; }
.why-ico { grid-row: span 2; width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 16px; font: 700 1.4rem/1 var(--f-display); color: var(--ink); background: var(--yellow); box-shadow: 3px 3px 0 var(--pink); animation: bob 5s ease-in-out infinite; animation-delay: calc(var(--i) * -1.2s); }
.why-item:nth-child(2) .why-ico { background: var(--tint-teal); } .why-item:nth-child(3) .why-ico { background: var(--tint-pink); } .why-item:nth-child(4) .why-ico { background: var(--tint-blue); }
.why h3 { margin-bottom: .3rem; }

/* Families' books glide past on a moving shelf. */
.shelf-sec { overflow: hidden; }
.marquee { margin-top: 1.5rem; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); padding-block: 1.5rem 1rem; }
.marquee-track { display: flex; width: max-content; animation: marquee calc(var(--count) * 7s) linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
[dir="rtl"] .marquee-track { animation-name: marquee-rtl; }
@keyframes marquee-rtl { to { transform: translateX(50%); } }
.mq-item { width: clamp(190px, 21vw, 270px); padding-inline-end: 30px; margin: 0; flex: none; }
.mq-item:nth-child(odd) .book { rotate: -2deg; } .mq-item:nth-child(even) .book { rotate: 1.5deg; translate: 0 14px; }
.mq-item figcaption { margin-top: .8rem; font-weight: 700; }
.tilt { transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s var(--ease); }

/* The last section is bedtime: night sky, moon, stars. */
.final { text-align: center; }
.final h2 { margin-inline: auto; }
.night { position: relative; isolation: isolate; overflow: hidden; background: radial-gradient(120% 90% at 50% 100%, #3b2f8f 0%, #1a1650 55%, #0d0d33 100%); color: #fff; padding-block: clamp(80px, 12vw, 160px); }
.night .wrap { position: relative; z-index: 1; }
.night h2 { color: #fff; font-size: clamp(2.2rem, 1.4rem + 3vw, 3.8rem); }
.night .star { background: #fff7cf; }
.night .orb { opacity: .25; }
.night .cloud { opacity: .18; }
.moon { position: absolute; top: 14%; inset-inline-end: 12%; width: clamp(60px, 9vw, 120px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fffbe6, #ffe48a 60%, #f6c94c); box-shadow: 0 0 60px 20px rgba(255, 228, 138, .35), inset -12px -10px 0 rgba(200, 150, 40, .25); animation: bob 9s ease-in-out infinite; }
:root[data-theme="dark"] .band { background: color-mix(in srgb, var(--paper-2) 80%, transparent); }

/* ---------------------------------------------------------------- pricing */
.packs { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-block: 1rem 1.25rem; }
.pack { display: grid; gap: .4rem; align-content: start; }
.pack h3 { font-size: var(--t-lg); margin: 0; }
.pack-credits { margin: 0; font-size: var(--t-md); }
.pack-credits strong { font: 700 2.4rem/1 var(--f-display); color: var(--blue); }
.pack-price { font-weight: 700; font-size: var(--t-xl); margin: .2rem 0 .3rem; }
.pack .btn { margin-top: .5rem; }
td.num { white-space: nowrap; font-weight: 700; text-align: end; }

/* ---------------------------------------------------------------- gifts */
.gifts { margin-top: 1.5rem; }
.gift { text-decoration: none; color: var(--ink); transition: border-color .15s; }
.gift:hover { color: var(--ink); border-color: var(--blue); }
.gift h2 { font-size: var(--t-xl); }
.ideas { padding-inline-start: 1.2em; margin-bottom: 2rem; }
.ideas li { margin-bottom: .4rem; font-size: var(--t-lg); }

/* ---------------------------------------------------------------- legal */
.legal h1 { font-size: var(--t-2xl); }
.legal > p:first-of-type { color: var(--ink-3); font-size: var(--t-sm); }

/* ---------------------------------------------------------------- shared book reader */
.reader { max-width: 820px; }
.read-head { display: grid; gap: 2rem; align-items: center; margin-bottom: 3rem; }
@media (min-width: 760px) { .read-head { grid-template-columns: 1fr 1fr; } }
.read-page { margin: 0 0 3.5rem; display: grid; gap: 1.2rem; }
.read-text { font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem); line-height: 1.7; margin: 0 0 .6rem; }
.read-2 { color: var(--ink-2); font-size: var(--t-lg); }

/* ---------------------------------------------------------------- library, gallery, studio pages (1.3.0) */
.crumbs ol { display: flex; flex-wrap: wrap; gap: .25rem .5rem; list-style: none; padding: 0; margin: 0 0 1.4rem; font-size: var(--t-sm); color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin-inline-end: .5rem; color: var(--line); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--blue); text-decoration: underline; }
.st-top { padding-block-end: clamp(16px, 3vw, 32px); }
.st-top h1 { max-width: 20ch; }
.st-list { padding-block-start: 0; }
.st-chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: .8rem 0 0; }
.st-chips .chip { font-size: var(--t-sm); padding: .4em .9em; text-decoration: none; }
.st-chips .chip .muted { font-weight: 400; }

.st-grid { display: grid; gap: clamp(20px, 2.6vw, 32px) clamp(16px, 2.2vw, 28px); grid-template-columns: repeat(auto-fill, minmax(min(calc(50% - 10px), 176px), 1fr)); }
.st-card { display: flex; flex-direction: column; gap: .2rem; color: var(--ink); text-decoration: none; min-width: 0; }
.st-card:hover { color: var(--ink); }
.st-cover { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 4px 12px 12px 4px; background: var(--paper-2);
  box-shadow: 4px 4px 0 var(--pink), var(--shadow-lift); transition: transform .4s var(--spring); transform-origin: 0 50%; }
[dir="rtl"] .st-cover { border-radius: 12px 4px 4px 12px; box-shadow: -4px 4px 0 var(--pink), var(--shadow-lift); transform-origin: 100% 50%; }
.st-cover::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 6%; z-index: 2; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, .22), rgba(255, 255, 255, .2) 55%, rgba(0, 0, 0, .05)); }
.st-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-card:hover .st-cover, .st-card:focus-visible .st-cover { transform: perspective(900px) rotateY(-10deg) translateY(-4px); }
[dir="rtl"] .st-card:hover .st-cover { transform: perspective(900px) rotateY(10deg) translateY(-4px); }
.st-card-title { margin-top: .8rem; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-card-meta { font-size: var(--t-xs); color: var(--ink-3); }
.st-print { --c: var(--blue); display: flex; align-items: flex-end; padding: 14% 12% 13% 16%; color: #fff;
  background: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .16) 1.2px, transparent 1.6px) 0 0 / 14px 14px, radial-gradient(120% 70% at 85% 0%, rgba(255, 255, 255, .22), transparent 60%), var(--c); }
.st-print::after { content: ""; position: absolute; inset-block-start: 11%; inset-inline-end: 12%; width: 26%; aspect-ratio: 1; border-radius: 50%; background: var(--yellow); box-shadow: inset -6px -4px 0 rgba(0, 0, 0, .12); }
.st-print.has-bg { background: var(--bg) center / cover, var(--c); }
.st-print.has-bg::after { display: none; }
.st-print.has-bg .st-print-title { background: rgba(255, 255, 255, .9); color: #1c2459; padding: .35em .5em; border-radius: 10px; }
.st-print-title { position: relative; z-index: 1; font: 700 clamp(1.05rem, .8rem + .9vw, 1.4rem)/1.1 var(--f-display); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ink-blue { --c: var(--blue); } .ink-pink { --c: var(--pink); } .ink-teal { --c: var(--teal); } .ink-plum { --c: var(--plum); } .ink-ink { --c: #1c2459; }

.st-head { display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.st-head h1 { margin-top: 0; }
.st-facts { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1.2rem; }
.st-facts li { padding: .25em .8em; border-radius: var(--r-pill); background: var(--paper-2); font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
.st-facts a { color: inherit; }
.st-read { padding-block-start: clamp(16px, 3vw, 32px); }
.st-page { margin: 0 0 clamp(32px, 6vw, 64px); display: grid; gap: 1.2rem; }
.st-page-img { max-width: 560px; margin-inline: auto; }
.st-text { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); line-height: 1.7; max-width: 34em; margin: 0 auto .4rem; }
.st-text-2 { color: var(--ink-2); }
.st-page figcaption { text-align: center; }
.st-cta { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; background: color-mix(in srgb, var(--tint-blue) 60%, var(--sheet)); }
.st-cta h2 { margin-top: 0; }
.st-pager { justify-content: center; margin-top: 2rem; align-items: center; }

.gal-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(calc(50% - 8px), 220px), 1fr)); }
.gal-card { display: grid; gap: .5rem; color: var(--ink); text-decoration: none; }
.gal-thumb { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--r-md); background: var(--paper-2); }
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gal-card:hover .gal-thumb img { transform: scale(1.04); }
.gal-play { position: absolute; z-index: 1; inset: 0; margin: auto; width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .9); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); }
.gal-play::after { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-block: 9px solid transparent; border-inline-start: 14px solid var(--blue); transform: translateX(2px); }
.gal-title { font-weight: 600; font-size: var(--t-sm); }
.gal-item { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.gal-item h1 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); margin-top: 0; }
.gal-media { width: 100%; max-height: 80vh; object-fit: contain; border-radius: var(--r-lg); background: var(--paper-2); }

.st-tools .st-tool h3 { margin: .9rem 0 .3rem; }
.st-tools .st-tool p { margin: 0; }
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ba figure { margin: 0; position: relative; }
.ba img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; }
.ba figcaption { position: absolute; inset-block-end: 6px; inset-inline-start: 6px; padding: .1em .55em; border-radius: var(--r-pill); background: rgba(255, 255, 255, .9); color: #1c2459; font-size: var(--t-xs); font-weight: 700; }
.st-steps { list-style: none; counter-reset: s; padding: 0; display: grid; gap: 1rem; }
.st-steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: .2rem 1rem; align-items: start; }
.st-steps li::before { content: counter(s); grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--tint-blue); color: var(--blue-deep); font: 700 1.1rem var(--f-display); }

@media (max-width: 720px) {
  .st-head, .gal-item, .st-cta { grid-template-columns: 1fr; }
  .st-head-cover { max-width: 220px; }
}
@media (prefers-reduced-motion: reduce) { .st-cover, .gal-thumb img { transition: none; } }

/* Landing: Image and Video studio cards (only while switched on) */
.studio-tools { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.studio-tools li { font-size: var(--t-xs); font-weight: 600; padding: .25rem .7rem; border-radius: var(--r-pill); background: var(--paper-2); color: var(--ink-2); }

/* 1.7: kinds of books (/personalized and the home grid) */
.kind-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); margin-top: 1.2rem; }
.kind-card { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start; padding: 18px; color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.kind-card:hover { color: var(--ink); border-color: var(--blue); transform: translateY(-2px); }
.kind-card:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.kind-icon { width: 52px; height: 52px; display: grid; place-items: center; font-size: 28px; border-radius: 14px; background: var(--paper-2); }
.kind-body { display: grid; gap: .35rem; justify-items: start; }
.kind-body strong { font-size: var(--t-lg); line-height: 1.2; }
.kind-hero { display: grid; gap: clamp(20px, 4vw, 48px); align-items: center; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.kind-hero h1 { margin-bottom: .6rem; }
.kind-hero .row { align-items: center; gap: 12px; margin-top: 1.2rem; }
.kind-cover { max-width: 420px; justify-self: center; width: 100%; }
.kind-points { gap: 14px; margin-bottom: 1.6rem; }
.kind-points h3 { font-size: var(--t-md); margin-bottom: .25rem; }
.kind-points p { margin: 0; }
.kind-occ { gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; }
@media (max-width: 760px) { .kind-hero { grid-template-columns: 1fr; } .kind-cover { max-width: 300px; } }
@media (prefers-reduced-motion: reduce) { .kind-card, .kind-card:hover { transition: none; transform: none; } }
.kind-occ .chip { font-size: var(--t-sm); padding: .4em 1em; text-decoration: none; border: 1.5px solid var(--line); }
.kind-occ .chip:hover { border-color: var(--blue); color: var(--blue-deep); }

/* 1.7.3: trending kinds take turns with the book in the hero */
[data-hero-rotator] { display: grid; }
[data-hero-rotator] > .hr-slide { grid-area: 1 / 1; transition: opacity .7s ease, transform .7s ease, visibility 0s linear .7s; opacity: 0; visibility: hidden; transform: translateY(10px) scale(.98); }
[data-hero-rotator] > .hr-slide.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .7s ease, transform .7s ease, visibility 0s; }
.hr-trend { display: grid; justify-items: center; align-content: center; gap: .35rem; text-decoration: none; color: inherit; text-align: center; padding-top: 4px; }
.trend-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .8rem; border-radius: var(--r-pill); color: #fff; font-size: var(--t-xs); font-weight: 800;
  background: linear-gradient(90deg, #ff4d8d, #ff8a3d); box-shadow: 0 10px 24px -12px rgba(255, 77, 141, .8); }
.trend-chip::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: #fff; animation: chip-pulse 1.6s ease-in-out infinite; }
.trend-chip-sm { padding: .12rem .55rem; margin-bottom: .2rem; justify-self: start; width: fit-content; }
.trend-chip-sm::before { display: none; }
@keyframes chip-pulse { 50% { opacity: .35; } }
.deck { position: relative; display: block; width: min(42%, 236px); aspect-ratio: 4 / 5; margin: .5rem 0 .2rem; margin-inline-end: 40px; }
.deck img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 18px; border: 4px solid #fff; box-shadow: 0 24px 48px -20px rgba(28, 36, 89, .55);
  --pos: 0; transform: translateX(calc(min(var(--pos), 3) * 9%)) rotate(calc(min(var(--pos), 3) * 3deg)) scale(calc(1 - min(var(--pos), 3) * .05));
  z-index: calc(10 - var(--pos)); opacity: calc(1 - max(var(--pos) - 2, 0)); transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .4s; }
[dir="rtl"] .deck img { transform: translateX(calc(min(var(--pos), 3) * -9%)) rotate(calc(min(var(--pos), 3) * -3deg)) scale(calc(1 - min(var(--pos), 3) * .05)); }
.deck-label { font-weight: 800; font-size: var(--t-sm); min-height: 1.4em; }
.deck-name { font-family: var(--font-display, inherit); font-size: var(--t-lg, 1.25rem); }
.deck-hook { color: var(--muted, #556); font-size: var(--t-sm); max-width: 34ch; }
.hr-dots { grid-area: 2 / 1; display: flex; justify-content: center; gap: .5rem; margin-top: .6rem; }
.hr-dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 0; background: color-mix(in srgb, currentColor 25%, transparent); cursor: pointer; transition: width .3s, background .3s; }
.hr-dots button[aria-pressed="true"] { width: 26px; border-radius: 6px; background: linear-gradient(90deg, #ff4d8d, #ff8a3d); }
.hr-dots button:focus-visible { outline: 2px solid var(--blue, #2f55d4); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { [data-hero-rotator] > .hr-slide, .deck img { transition: none; } .trend-chip::before { animation: none; } }
/* 1.7.6: link to the stories in the other language */
.st-other { margin: .4rem 0 0; font-weight: 700; }
.st-other a { text-decoration: underline; text-underline-offset: 3px; }
