:root{--navy:#14294f;--blue:#3d74c9;--sky:#9cc4ef;--gold:#f2c14e;--gold2:#ffe7a3;--cream:#fdf6e6;--ink:#1b2a45;--rose:#e9a7a0;--teal:#7cc7c0}
*{box-sizing:border-box}html{scroll-behavior:smooth}
body{margin:0;font:18px/1.6 Nunito,system-ui,sans-serif;color:var(--ink);background:var(--navy)}
h1,h2,h3{font-family:"Baloo 2",system-ui,sans-serif;line-height:1.1;margin:.2em 0 .4em}
h1{font-size:clamp(2.4rem,7vw,5rem);color:var(--gold2);text-shadow:0 0 24px rgba(242,193,78,.6),0 3px 0 #b98722}
h2{font-size:clamp(2rem,5vw,3.2rem);color:var(--navy)}
.skip{position:absolute;left:-999px}.skip:focus{left:10px;top:10px;z-index:99;background:#fff;padding:8px}
:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
/* scene */
.scene{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none}
.sky{position:absolute;inset:0;background:radial-gradient(ellipse at 70% 20%,#4d7fc6 0%,#28487f 45%,#14294f 100%)}
.layer{position:absolute;left:-5%;right:-5%;bottom:0;height:45vh}.layer svg{width:100%;height:100%}
.l3{height:30vh}
.lighthouse{position:absolute;right:5vw;bottom:4vh;width:clamp(150px,21vw,300px);filter:drop-shadow(0 0 30px rgba(255,226,150,.35))}
.lh{width:100%;display:block;position:relative;z-index:2}
.beam{position:absolute;left:43%;top:12%;width:200vmax;height:200vmax;margin:-100vmax 0 0 -100vmax;z-index:1;
 background:conic-gradient(from 0deg,rgba(255,236,170,.0) 0deg,rgba(255,236,170,.45) 8deg,rgba(255,236,170,0) 22deg,transparent 180deg,rgba(255,236,170,0) 180deg,rgba(255,236,170,.3) 188deg,rgba(255,236,170,0) 202deg,transparent 360deg);
 -webkit-mask:radial-gradient(circle,#000 0,#000 8%,transparent 45%);mask:radial-gradient(circle,#000 0,#000 8%,transparent 45%);
 animation:spin 14s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.lantern{position:absolute;right:calc(5vw + clamp(150px,21vw,300px) - 10px);bottom:8vh;width:clamp(56px,7vw,90px);animation:bob 3.2s ease-in-out infinite;filter:drop-shadow(0 0 18px rgba(120,180,255,.9))}
.lantern .flame{animation:flick 2.4s ease-in-out infinite}
@keyframes bob{50%{transform:translateY(-14px) rotate(3deg)}}
@keyframes flick{50%{opacity:.75}}
.sparkles{position:absolute;inset:0;width:100%;height:100%}
.cursor-glow{position:absolute;inset:0;background:radial-gradient(420px circle at var(--x,70%) var(--y,25%),rgba(255,214,140,.22),transparent 60%);mix-blend-mode:screen}
/* header */
.top{position:fixed;top:0;left:0;right:0;z-index:20;display:flex;justify-content:space-between;align-items:center;padding:8px 14px}
.logo{display:block;width:126px;height:126px;position:fixed;right:0;bottom:0;z-index:21}
.top{justify-content:flex-end}
.logo-vid,.logo-img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 0 10px rgba(242,193,78,.5))}
.logo-img{display:none}
.burger{width:52px;height:52px;border-radius:50%;border:0;background:var(--gold);box-shadow:0 0 18px rgba(242,193,78,.8);display:grid;place-content:center;gap:5px;cursor:pointer}
.burger span{display:block;width:24px;height:3px;border-radius:2px;background:var(--navy)}
.menu{position:absolute;right:14px;top:70px;background:var(--cream);border-radius:20px;padding:10px;display:flex;flex-direction:column;min-width:230px;box-shadow:0 10px 40px rgba(0,0,0,.35)}
.menu[hidden]{display:none}
.menu a{padding:10px 14px;border-radius:12px;color:var(--navy);text-decoration:none;font:700 1.05rem "Baloo 2",sans-serif}
.menu a:hover,.menu a:focus-visible{background:var(--gold2)}
/* content */
main{position:relative;z-index:5}
section{max-width:1060px;margin:0 auto;padding:clamp(70px,10vh,120px) 18px}
.hero{min-height:100vh;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;color:#eef4ff}
.lead{font-size:clamp(1.2rem,2.6vw,1.6rem);max-width:30ch}.sub{opacity:.9}
.panel{background:rgba(253,246,230,.93);border-radius:36px;margin:12vh auto;box-shadow:0 0 0 6px rgba(242,193,78,.25),0 20px 60px rgba(0,0,0,.35);max-width:1000px;padding:clamp(28px,5vw,60px)}
.split{display:grid;grid-template-columns:1fr 1.3fr;gap:32px;align-items:center}.split.rev{grid-template-columns:1.3fr 1fr}.split.rev figure{order:2}
figure{margin:0}figure img{width:100%;height:auto;display:block;border-radius:24px}
.strip{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:24px}
.tiles{list-style:none;padding:0;display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
@media (max-width:720px){.tiles{grid-template-columns:repeat(2,1fr)}}
.tiles li{background:linear-gradient(135deg,#dbe9fb,#fbeccb);border-radius:20px;padding:16px;font:700 1.05rem "Baloo 2",sans-serif;color:var(--navy);text-align:center}
.langs{list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px}
.langs li{background:#fff;border-radius:18px;padding:12px 14px;display:flex;flex-direction:column;gap:6px;border:2px solid #e3ecf8}
.langs .hero-ed{grid-column:1/-1;background:linear-gradient(135deg,#fff4cf,#dcebff);border-color:var(--gold)}
.fivetips{counter-reset:t;list-style:none;padding:0;display:grid;gap:12px}
.fivetips li{counter-increment:t;background:#fff;border-radius:20px;padding:14px 18px 14px 70px;position:relative}
.fivetips li::before{content:counter(t);position:absolute;left:16px;top:50%;transform:translateY(-50%);width:40px;height:40px;border-radius:50%;background:var(--gold);color:var(--navy);display:grid;place-content:center;font:800 1.3rem "Baloo 2"}
.art{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:20px}
.art figcaption{display:flex;flex-direction:column;gap:6px;padding:10px 4px}
.small-note{font-size:.85rem;opacity:.8}
.ph{background:#fff1b8;border:2px dashed #d9a420;border-radius:12px;padding:6px 10px;font-size:.9rem}
.credit{font-size:.82rem;opacity:.8;font-style:italic}
.getbox{margin-top:30px;text-align:center}
/* buttons */
.btn{position:relative;display:inline-block;padding:.75em 1.5em;border-radius:999px;border:0;background:linear-gradient(180deg,#ffe28a,#f2b636);color:var(--navy);font:800 1.05rem "Baloo 2",sans-serif;text-decoration:none;cursor:pointer;
 box-shadow:0 0 0 3px rgba(255,255,255,.5) inset,0 0 26px 6px rgba(242,193,78,.55),0 0 50px 10px rgba(110,170,255,.25);transition:transform .2s;overflow:visible;isolation:isolate}
.btn::after{content:"";position:absolute;left:-40%;right:-40%;top:-90%;bottom:-90%;z-index:-1;pointer-events:none;background:radial-gradient(closest-side,rgba(255,226,150,.75),rgba(140,195,255,.4) 55%,rgba(140,195,255,0) 100%);animation:glowp 3.2s ease-in-out infinite}
@keyframes glowp{0%,100%{opacity:.55;transform:scale(.92)}50%{opacity:1;transform:scale(1.06)}}
@property --a{syntax:"<angle>";inherits:false;initial-value:0deg}
@keyframes wisp{to{--a:360deg}}
.btn:hover,.btn:focus-visible{transform:translateY(-2px) scale(1.04)}
.btn.big{font-size:1.4rem;padding:.8em 2em}.btn.small{font-size:.9rem;padding:.45em 1em;align-self:flex-start}
.btn.off{filter:grayscale(.6);opacity:.7;cursor:default}
.spark{position:fixed;width:8px;height:8px;pointer-events:none;z-index:50;border-radius:50%;background:radial-gradient(circle,#fff,#8fc3ff 40%,transparent 70%)}
/* reveals: base state visible (no-JS / reduced motion) */
.reveal img{clip-path:none}
/* chapter page-turn */
.chapter-break{position:relative;z-index:5;height:40vh;perspective:1400px;display:grid;place-items:center}
.leaf{width:min(60vw,420px);height:min(30vh,260px);position:relative;transform-style:preserve-3d;transform-origin:left center}
.face{position:absolute;inset:0;border-radius:6px 18px 18px 6px;backface-visibility:hidden}
.front{background:linear-gradient(90deg,#e9dcc0,#fdf6e6 30%);box-shadow:0 10px 30px rgba(0,0,0,.3)}
.back{background:linear-gradient(270deg,#e9dcc0,#fdf6e6 30%);transform:rotateY(180deg)}
.foot{position:relative;z-index:5;background:rgba(10,22,45,.92);color:#e9f0ff;padding:40px 18px;text-align:center}
.notify label{display:block;font:700 1.3rem "Baloo 2";margin-bottom:8px}
.notify .row{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.notify input{padding:.8em 1em;border-radius:999px;border:2px solid var(--gold);min-width:240px;font:inherit}
.foot a{color:var(--gold2)}
/* melt */
.melt{position:fixed;inset:0;z-index:100;pointer-events:none}.melt svg{width:100%;height:100%}
@media (max-width:720px){.split,.split.rev{grid-template-columns:1fr}.split.rev figure{order:0}.strip{grid-template-columns:repeat(2,1fr)}.logo{width:96px;height:96px}body{font-size:17px}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}html{scroll-behavior:auto}.melt,.sparkles,.chapter-break{display:none}.logo-vid{display:none}.logo-img{display:block}}
section{scroll-margin-top:96px}.panel h2{padding-left:0}

.hero h1,.hero p{text-shadow:0 2px 12px rgba(10,20,45,.9),0 0 3px rgba(10,20,45,.8)}
@media (max-width:720px){.lighthouse{right:-4vw;bottom:2vh;width:42vw;opacity:.9}.lantern{right:40vw;bottom:5vh}.hero{padding-right:30vw}}

/* v3: whole front cover as the scene */
.cover-bg{position:absolute;inset:-4vh 0;overflow:hidden}
.cover-bg img{width:100%;height:100%;object-fit:cover;object-position:80% 50%;display:block}
.scene .beam{left:var(--lx,80%);top:var(--ly,30%);z-index:1;mix-blend-mode:screen}
.veil{position:absolute;inset:0;z-index:1;background:linear-gradient(90deg,rgba(12,24,50,.72) 0%,rgba(12,24,50,.45) 40%,rgba(12,24,50,.05) 65%,transparent 100%)}
.scene .lantern{left:calc(var(--lx,80%) - 22vw);right:auto;top:calc(var(--ly,30%) + 22vh);bottom:auto;z-index:2}
.scene .sparkles,.scene .cursor-glow{z-index:2}
@media (max-width:720px){.veil{background:linear-gradient(180deg,rgba(12,24,50,.15) 0%,rgba(12,24,50,.7) 45%,rgba(12,24,50,.75) 100%)}.scene .lantern{left:calc(var(--lx,80%) - 40vw);top:calc(var(--ly,30%) + 14vh)}.hero{padding-right:18px;justify-content:flex-end;padding-bottom:12vh}}
.cover-bg .bg-loop{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:80% 50%;display:block}
@media (prefers-reduced-motion:reduce){.cover-bg .bg-loop{display:none}}

/* v4 responsive + light-only (Joel 29 Oct 5:32 PM): show the WHOLE cover on every screen, blurred fill behind */
:root{color-scheme:light only}
html,body{background:var(--navy);forced-color-adjust:none}
.scene{height:100vh;height:100lvh}
.cover-bg{inset:0;background:#14294f}
.cover-bg::before{content:"";position:absolute;inset:-40px;background:url(assets/img/cover-bg.jpg) center/cover no-repeat;filter:blur(28px) brightness(.75);z-index:0}
.cover-bg picture,.cover-bg img,.cover-bg .bg-loop{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;z-index:1}
.cover-bg img,.cover-bg .bg-loop{object-position:right center}
@media (max-aspect-ratio:1/1){.cover-bg img,.cover-bg .bg-loop{object-position:center top}}
.hero{min-height:100vh;min-height:100svh}
img,video{max-width:100%}
@media (max-aspect-ratio:1/1){.veil{background:linear-gradient(180deg,transparent 0%,rgba(12,24,50,.2) 40%,rgba(12,24,50,.75) 70%,rgba(12,24,50,.8) 100%)}.hero{justify-content:flex-end;padding-bottom:12vh;padding-right:18px}}
.cover-bg img,.cover-bg .bg-loop{-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 14%);mask-image:linear-gradient(90deg,transparent 0,#000 14%)}
@media (max-aspect-ratio:1/1){.cover-bg img,.cover-bg .bg-loop{-webkit-mask-image:linear-gradient(180deg,#000 82%,transparent 100%);mask-image:linear-gradient(180deg,#000 82%,transparent 100%)}}
@media (min-aspect-ratio:1/1){.cover-bg img,.cover-bg .bg-loop{left:auto;right:0;width:min(100%,calc(100vh * 1.146));width:min(100%,calc(100lvh * 1.146))}}
@media (max-aspect-ratio:1/1){.cover-bg img,.cover-bg .bg-loop{height:min(100%,calc(100vw / 1.146))}}

/* wide 16:9 loop on landscape/desktop */
html.wide .cover-bg::before{display:none}
html.wide .cover-bg picture,html.wide .cover-bg img{display:none}
html.wide .cover-bg .bg-loop{position:absolute;inset:0;left:0;right:0;width:100%;height:100%;object-fit:cover;object-position:center center;-webkit-mask-image:none;mask-image:none}
/* phone/portrait: square loop fills hero (cover) */
html:not(.wide) .cover-bg{inset:0}
html:not(.wide) .cover-bg::before{display:none}
html:not(.wide) .cover-bg picture,html:not(.wide) .cover-bg img{display:none}
html:not(.wide) .cover-bg .bg-loop{position:absolute;inset:0;left:0;right:0;width:100%;height:100%;object-fit:cover;object-position:72% 50%;-webkit-mask-image:none;mask-image:none}
@media (prefers-reduced-motion:reduce){html:not(.wide) .cover-bg picture,html:not(.wide) .cover-bg img{display:block;width:100%;height:100%;object-fit:cover;object-position:72% 50%;-webkit-mask-image:none;mask-image:none}}

/* button twinkles */
.btn .twk{position:absolute;width:var(--s,12px);height:var(--s,12px);margin:calc(var(--s,12px)/-2) 0 0 calc(var(--s,12px)/-2);pointer-events:none;opacity:0;z-index:2;
 background:radial-gradient(circle,#fff 0,rgba(255,240,190,.9) 18%,rgba(255,220,130,0) 45%),linear-gradient(90deg,rgba(255,250,220,0) 0,#fff8e0 50%,rgba(255,250,220,0) 100%) center/100% 3px no-repeat,linear-gradient(0deg,rgba(255,250,220,0) 0,#fff8e0 50%,rgba(255,250,220,0) 100%) center/3px 100% no-repeat;
 animation:twk var(--d,1.8s) ease-in-out var(--dl,0s) infinite;will-change:transform,opacity}
@keyframes twk{0%,100%{opacity:0;transform:scale(.2) rotate(0)}45%{opacity:1;transform:scale(1) rotate(45deg)}60%{opacity:.9;transform:scale(.8) rotate(60deg)}}
.btn.off .twk{display:none}
@media (prefers-reduced-motion:reduce){.btn .twk{display:none}}
/* title light-up synced to loop */
.hero h1{position:relative}
.hero h1 .tglint{position:absolute;width:var(--s,22px);height:var(--s,22px);margin:calc(var(--s,22px)/-2) 0 0 calc(var(--s,22px)/-2);pointer-events:none;opacity:0;
 background:radial-gradient(circle,#fff 0,rgba(255,244,200,.95) 16%,rgba(255,220,130,0) 46%),linear-gradient(90deg,rgba(255,250,220,0),#fffbe8 50%,rgba(255,250,220,0)) center/100% 3px no-repeat,linear-gradient(0deg,rgba(255,250,220,0),#fffbe8 50%,rgba(255,250,220,0)) center/3px 100% no-repeat}
@media (prefers-reduced-motion:reduce){.hero h1 .tglint{display:none}}

.hero h1 .tspark{position:absolute;width:var(--s,10px);height:var(--s,10px);margin:calc(var(--s,10px)/-2) 0 0 calc(var(--s,10px)/-2);pointer-events:none;opacity:0;
 background:radial-gradient(circle,#fff 0,rgba(255,240,190,.95) 18%,rgba(255,220,130,0) 48%),linear-gradient(90deg,rgba(255,250,220,0),#fffbe8 50%,rgba(255,250,220,0)) center/100% 2px no-repeat,linear-gradient(0deg,rgba(255,250,220,0),#fffbe8 50%,rgba(255,250,220,0)) center/2px 100% no-repeat}
.hero h1 .tspark.go{animation:tsp .65s ease-out forwards}
@keyframes tsp{0%{opacity:0;transform:scale(.2) rotate(0)}35%{opacity:1;transform:scale(1.1) rotate(30deg)}100%{opacity:0;transform:translateY(-6px) scale(.3) rotate(80deg)}}
@media (prefers-reduced-motion:reduce){.hero h1 .tspark{display:none}}
/* phone/portrait tint, light areas kept bright */
html:not(.wide) .cover-bg::after{content:"";position:absolute;inset:0;z-index:3;pointer-events:none;
 background:radial-gradient(ellipse 34% 20% at var(--lx,80%) var(--ly,27%),rgba(10,20,50,0) 0,rgba(10,20,50,0) 45%,rgba(10,20,50,.22) 100%),linear-gradient(180deg,rgba(10,20,50,.18) 0,rgba(10,20,50,.38) 38%,rgba(10,20,50,.34) 70%,rgba(10,20,50,.2) 100%);
 -webkit-mask-image:radial-gradient(ellipse 30% 18% at var(--lx,80%) var(--ly,27%),transparent 0,rgba(0,0,0,.35) 55%,#000 100%);mask-image:radial-gradient(ellipse 30% 18% at var(--lx,80%) var(--ly,27%),transparent 0,rgba(0,0,0,.35) 55%,#000 100%)}

/* stop sideways overflow from glows/sparkles */
html,body{overflow-x:hidden}@supports (overflow-x:clip){html,body{overflow-x:clip}}

/* hero: sub line big + centred, button below sailor's beard */
.hero{position:relative}
.hero .sub{font-family:"Baloo 2",system-ui,sans-serif;font-weight:800;font-size:clamp(2.4rem,4.4vw,4.6rem);line-height:1.05;color:#fff6e0;opacity:1;text-align:center;max-width:min(92vw,12em);margin:.25em 0 .4em;
 text-shadow:0 2px 14px rgba(10,20,45,.85),0 0 4px rgba(10,20,45,.7),0 0 26px rgba(255,214,140,.35)}
html.wide .hero .btn.big.beard{position:absolute;margin:0;z-index:5}
html:not(.wide) .hero .btn.big{margin-top:auto;margin-bottom:max(4vh,120px);align-self:center}
@media (max-width:420px){.hero .sub{font-size:2.3rem}}
/* phone/portrait: title centred on one line */
html:not(.wide) .hero h1{white-space:nowrap;text-align:center;align-self:center;font-size:clamp(1.6rem,8.4vw,3rem);max-width:100%}
html:not(.wide) .hero h1 > div{white-space:nowrap}
.hero h1 > div{white-space:nowrap}
/* phone/portrait: sub line clearly smaller than title */
html:not(.wide) .hero .sub,html:not(.wide) body .hero .sub{font-size:clamp(14px,4.5vw,21px);font-weight:700;line-height:1.25;max-width:min(92vw,24em);align-self:center;margin:.3em auto .6em}
/* phone/portrait: title on two centred lines */
.hero h1 br.t2br{display:none}
html:not(.wide) .hero h1 br.t2br{display:inline}
html:not(.wide) .hero h1{font-size:clamp(2rem,13.4vw,3.6rem);font-weight:800;line-height:1.02;
 text-shadow:0 3px 14px rgba(10,20,45,.95),0 0 4px rgba(10,20,45,.9)}
/* picture-book line: half size on wide; pink/green pulse inside letters */
html.wide .hero .sub{font-size:clamp(1.2rem,1.92vw,2.3rem)}
.hero .sub{background-image:linear-gradient(100deg,#ffd6e8 0%,#d8f5dc 50%,#ffd6e8 100%);background-size:200% 100%;background-position:0% 50%;
 -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:#fff0f4;text-shadow:none;
 filter:drop-shadow(0 2px 6px rgba(10,20,45,.85)) drop-shadow(0 0 2px rgba(10,20,45,.8));animation:pbpulse 5s ease-in-out infinite alternate}
@keyframes pbpulse{0%{background-position:0% 50%}100%{background-position:100% 50%}}
@media (prefers-reduced-motion:reduce){.hero .sub{animation:none!important;background-position:50% 50%}}

/* PC nudge: picture-book line a little right (clear of the finger) */
html.wide .hero .sub{position:relative;left:3vw}
/* keep hero CTA visible above the fixed scene while scrolling */
.hero{z-index:2}
.hero .btn.big{opacity:1;visibility:visible;z-index:6}

.lantern.firefly{width:clamp(110px,13vw,190px);filter:drop-shadow(0 0 14px rgba(255,230,160,.55))}.lantern.firefly video,.lantern.firefly img{display:block;width:100%;height:auto}
@media (max-width:720px){.lantern.firefly{width:30vw}}
@media (min-width:721px){.scene .lantern.firefly{left:calc(var(--lx,80%) + 7vw);top:calc(var(--ly,30%) + 6vh)}}
@media (max-width:720px){.scene .lantern.firefly{width:min(28vw,120px);right:auto;bottom:auto}}

.lantern.firefly{will-change:transform;backface-visibility:hidden}.logo,.cover-bg,.scene{transform:translateZ(0)}
/* flick-through book: open-book base + lined pages (fixes plain cream rectangle on iPad) */
.chapter-break .leaf{--w:min(42vw,380px);width:var(--w);height:min(28vh,250px);margin-left:var(--w);-webkit-transform-style:preserve-3d;will-change:transform}
.chapter-break::before{content:"";position:absolute;left:50%;top:50%;width:calc(2*min(42vw,380px) + 16px);height:calc(min(28vh,250px) + 12px);transform:translate(-50%,-50%);border-radius:10px;background:linear-gradient(90deg,#d9c79f,#fdf6e6 8%,#fdf6e6 46%,#c9b48a 50%,#fdf6e6 54%,#fdf6e6 92%,#d9c79f),repeating-linear-gradient(180deg,transparent 0 17px,rgba(120,95,55,.18) 17px 18px);background-blend-mode:multiply;box-shadow:0 14px 34px rgba(0,0,0,.35),inset 0 0 0 6px #6b3f22}
.face{-webkit-backface-visibility:hidden;background-blend-mode:multiply}
.front{background:linear-gradient(90deg,#c9b48a,#fdf6e6 14%),repeating-linear-gradient(180deg,transparent 0 20px,rgba(120,95,55,.22) 20px 21px) padding-box;background-clip:padding-box;padding:22px}
.back{background:linear-gradient(270deg,#c9b48a,#fdf6e6 14%),repeating-linear-gradient(180deg,transparent 0 20px,rgba(120,95,55,.22) 20px 21px)}
/* Real-page flipbooks */
.flipwrap{position:relative;z-index:5;padding:4vh 0;text-align:center;background:none;border:0;box-shadow:none}
.flipbook{--pw:min(47vw,600px,calc(100vh - 200px));position:relative;width:calc(2*var(--pw));height:var(--pw);margin:0 auto;perspective:2200px;-webkit-perspective:2200px;touch-action:pan-y;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;outline-offset:6px}
.fb-book{position:absolute;top:0;left:0;width:calc(2*var(--pw));height:100%;transform-style:preserve-3d;-webkit-transform-style:preserve-3d;transition:transform .7s ease}
.flipbook.closed .fb-book{transform:translateX(-25%)}
.flipbook.end .fb-book{transform:translateX(25%)}
.fb-sheet{position:absolute;left:50%;top:0;width:50%;height:100%;transform-origin:left center;transform-style:preserve-3d;-webkit-transform-style:preserve-3d;transition:transform .8s cubic-bezier(.45,.05,.3,1);will-change:transform}
.fb-sheet.flipped{transform:rotateY(-180deg)}
.fb-face{position:absolute;inset:0;padding:0!important;margin:0;border:0!important;border-radius:0;backface-visibility:hidden;-webkit-backface-visibility:hidden;background:#efe3c6;overflow:hidden}
.fb-face img{position:absolute;inset:0;margin:0;padding:0;border:0;border-radius:0;max-width:none;width:100%;height:100%;display:block;object-fit:cover;pointer-events:none}
.fb-face.back{transform:rotateY(180deg)}
.fb-face.front{box-shadow:4px 6px 18px rgba(0,0,0,.35)}
.fb-face.front::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(0,0,0,.28),rgba(0,0,0,.06) 6%,transparent 14%);pointer-events:none}
.fb-face.back::after{content:"";position:absolute;inset:0;background:linear-gradient(270deg,rgba(0,0,0,.28),rgba(0,0,0,.06) 6%,transparent 14%);pointer-events:none}
.fb-nav{display:flex;justify-content:center;align-items:center;gap:1em;margin-top:.8em}
.fb-nav button{font-size:1.8rem;line-height:1;width:2em;height:2em;border-radius:50%;border:0;background:var(--navy);color:var(--gold2);cursor:pointer;box-shadow:0 0 0 2px var(--gold2)}
.fb-nav button:disabled{opacity:.35;cursor:default}
.fb-count{min-width:7em;color:var(--gold2);font-weight:700;text-shadow:0 1px 3px #000}
.fb-label{margin:.3em 0 0;color:var(--cream);font-weight:700;text-shadow:0 1px 4px #000}
@media (max-width:700px){.flipbook{--pw:min(96vw,520px);width:var(--pw);overflow:hidden;border-radius:4px}
.flipbook.one .fb-book{transform:translateX(calc(-1*var(--pw)))}
.flipbook.one.showleft .fb-book{transform:translateX(0)}}
/* menu loop button */
.burger{position:relative;width:68px;height:68px;min-width:44px;min-height:44px;padding:0;border-radius:50%;background:transparent;box-shadow:none;display:block;overflow:visible;-webkit-tap-highlight-color:transparent}
.burger .mb-vid,.burger .mb-img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 0 8px rgba(242,193,78,.6))}
.burger .mb-x{position:absolute;right:-4px;top:-4px;width:26px;height:26px;border-radius:50%;background:var(--navy);color:var(--gold2);font:700 22px/24px system-ui,sans-serif;text-align:center;box-shadow:0 0 0 2px var(--gold2);opacity:0;transform:scale(.6);transition:opacity .2s,transform .2s;pointer-events:none}
.burger[aria-expanded="true"] .mb-x{opacity:1;transform:none}
.burger[aria-expanded="true"] .mb-vid,.burger[aria-expanded="true"] .mb-img{opacity:.75}
.menu{top:84px}
/* menu loop v2: phone 2x, PC ~3x placed in the sky between the top-right star and the moon's top tip */
.burger{width:136px;height:136px}
.burger .mb-x{width:34px;height:34px;font-size:28px;line-height:32px;right:6px;top:6px}
.menu{top:150px}
html.wide .burger.sky{position:fixed;z-index:21}
html.wide .menu.sky{position:fixed;right:auto}
/* menu loop v3: phone slightly smaller to clear the title */
@media (max-width:720px){.burger{width:var(--mb,96px);height:var(--mb,96px)}.burger .mb-x{width:30px;height:30px;font-size:24px;line-height:28px}.menu{top:110px}}
/* menu loop v4: phone nudge right */
@media (max-width:720px){html:not(.wide) .burger{left:10px}}
/* moon1: brightened moon overlay, landscape only */
.cover-bg .moon-ov{display:none;position:absolute;pointer-events:none;z-index:2;max-width:none}
html.wide .cover-bg .moon-ov{display:block}
/* helmtop: helm wheel = back to top */
.logo{pointer-events:auto;cursor:pointer;-webkit-tap-highlight-color:transparent}.logo>*{pointer-events:none}
.fb-count{font-size:.85em;letter-spacing:.02em;white-space:nowrap}
/* langtiles: one tile per edition (all coming soon) */
.langs.langtiles{list-style:none;padding:0;margin:18px 0 0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px}
.langtiles .lt{display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;padding:10px 10px 12px;border-radius:14px;background:rgba(10,24,58,.72);border:1px solid rgba(242,193,78,.45);box-shadow:0 4px 14px rgba(0,0,0,.35)}
.langtiles .lt img{width:100%;height:auto;aspect-ratio:357/360;object-fit:cover;border-radius:8px;margin-bottom:6px}
.langtiles .lt b{color:var(--gold2);font-size:1rem;line-height:1.2}
.langtiles .nat{color:#fff;font-size:.92rem;opacity:.9}
.langtiles .soon{margin-top:6px;font-style:normal;font-size:.75rem;letter-spacing:.06em;text-transform:uppercase;padding:3px 10px;border-radius:999px;background:rgba(242,193,78,.18);color:var(--gold2);border:1px solid rgba(242,193,78,.5)}
.langtiles .buy{margin-top:6px;font-style:normal;font-size:.75rem;letter-spacing:.06em;text-transform:uppercase;padding:3px 10px;border-radius:999px;background:#2e9e5b38;color:#bff0d0;border:1px solid rgba(46,158,91,.7)}
@media (max-width:720px){.langs.langtiles{grid-template-columns:repeat(2,1fr);gap:10px}}
@media (min-width:1400px){.langs.langtiles{grid-template-columns:repeat(5,1fr)}}
.langtiles .lt-link{display:contents;color:inherit;text-decoration:none}.langtiles .lt:has(.lt-link){cursor:pointer;transition:transform .2s}.langtiles .lt:has(.lt-link):hover{transform:translateY(-3px)}
/* tablet: landscape tablets, menu panel fits its links (was stretched to screen bottom) */
@media (max-width:1440px){html.wide .menu.sky{bottom:auto;height:auto;max-height:calc(100vh - 24px);overflow:auto}}
/* sparkle-fx (reusable): halo around [data-sparkle] buttons; trail canvas is fixed full-screen */
.fx-halo-wrap{position:relative;display:inline-block;isolation:isolate}
.fx-halo-wrap>.fx-halo{z-index:-1}
.fx-halo-wrap>[data-sparkle]{position:relative;z-index:1;box-shadow:0 0 18px rgba(255,214,110,.55),0 0 42px rgba(255,190,60,.28)}
.fx-trail{will-change:contents}
/* flickfix: flat stacking + perspective on the book so z-index orders sheets (no z-fighting); GPU layers; same size as edition page */
.flipbook .fb-book{transform-style:flat;-webkit-transform-style:flat;perspective:2200px;-webkit-perspective:2200px}
.fb-sheet{backface-visibility:visible}
.fb-face{transform:translateZ(.1px);will-change:transform}
.fb-face.back{transform:rotateY(180deg) translateZ(.1px)}
.fb-face img{transform:translateZ(0);backface-visibility:hidden;-webkit-backface-visibility:hidden}
.flipbook{--pw:min(41vw,520px,calc(100vh - 260px))}
@media (max-width:700px){.flipbook{--pw:min(84vw,450px)}}
@media (min-width:721px) and (max-width:1399px){.langs.langtiles{grid-template-columns:repeat(4,1fr)}}
/* 75% flip books (Joel 9:10) */
.flipbook,.edition .flipbook{--pw:calc(.75*min(41vw,520px,calc(100vh - 260px)))}
@media (max-width:700px){.flipbook,.edition .flipbook{--pw:calc(.75*min(84vw,450px))}}
@media (max-width:700px) and (max-device-height:700px){.flipbook,.edition .flipbook{--pw:calc(.75*min(84vw,450px,calc(100vh - 390px)))}}
/* buy buttons: a little more yellow (colour only) */
.hero .btn.big,.btn.big.off,.ed-buybtn{background:linear-gradient(180deg,#fff08a,#ffcc1f)}
.hero .btn.big{box-shadow:0 0 0 3px rgba(255,255,255,.5) inset,0 0 26px 6px rgba(255,210,40,.6),0 0 50px 10px rgba(110,170,255,.25)}
.btn.big.off,.btn.ed-buybtn.off{filter:grayscale(.3)}
/* sixpage end note */ .fb-end{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.4em;padding:14%;text-align:center;background:#efe0bb center/cover no-repeat;color:#3b2a14;font-family:Georgia,"Times New Roman",serif;font-size:calc(var(--pw,300px)*.075);line-height:1.25}.fb-end p{margin:0}.fb-end b{color:#7a4a12;font-size:1.25em}.fb-end p+p{font-style:italic;font-size:.85em;color:#5a4222}
/* Joel 2026-11-03 22:50: homepage flip books = language-page size (150%) */
.flipbook{--pw:min(calc(1.125*min(41vw,520px,calc(100vh - 260px))),calc((100vw - 40px)/2))}
@media (max-width:700px){.flipbook{--pw:min(calc(1.125*min(84vw,450px)),calc(100vw - 24px))}}
@media (max-width:700px) and (max-device-height:700px){.flipbook{--pw:min(calc(1.125*min(84vw,450px,calc(100vh - 390px))),calc(100vw - 24px))}}

/* Joel 2026-11-03 23:02 landscape phone fix */
@media (orientation:landscape) and (max-height:500px){.flipbook,.edition .flipbook{--pw:min(calc(100vh - 80px),calc((100vw - 40px)/2))}}

/* Joel 2026-11-03 23:08 spread in landscape */
@media (max-width:700px) and (orientation:landscape){.flipbook,.edition .flipbook{width:calc(2*var(--pw));overflow:visible;border-radius:0}.flipbook.one .fb-book,.flipbook.one.showleft .fb-book{transform:none}}

/* PC-only brighter looping hamburger (Joel 5 Nov 2026 2:26/2:27 PM) */
@media (min-width:1000px){.burger .mb-vid,.burger .mb-img{opacity:1;filter:brightness(1.06) saturate(1.04) drop-shadow(0 0 3px rgba(255,225,140,.6)) drop-shadow(0 0 9px rgba(242,193,78,.7))}}

/* Get the Book row + official Available at Amazon badge (English paperback link) */
.getbox{margin-top:36px;text-align:center}
.getrow{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;gap:28px;max-width:100%}
.getbox .btn.gtb{font-size:clamp(2.55rem,2.2rem + 2.2vw,4.2rem);padding:.55em 1.35em;line-height:1.1;cursor:pointer;pointer-events:auto;filter:none;opacity:1;background:linear-gradient(180deg,#fff08a,#ffcc1f);color:var(--navy);box-shadow:0 0 0 3px rgba(255,255,255,.5) inset,0 0 26px 6px rgba(255,210,40,.6),0 0 50px 10px rgba(110,170,255,.25);max-width:100%;text-align:center}
.getbox .btn.gtb:hover,.getbox .btn.gtb:focus-visible{transform:none}
.getrow .amz-link{flex:0 0 auto;display:block;line-height:0}
.getrow .amz{width:min(260px,26vw);height:auto;display:block;flex:0 0 auto}
@media (max-width:720px){.getrow{flex-direction:column;gap:22px}.getrow .amz{width:min(240px,80vw)}}
/* iOS: keep the fixed background loop on its own compositor layer so it does not go blank while scrolling */
.cover-bg .bg-loop{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}

/* Phone-only (max-width:720px): centre free-PDF buttons, squash Get the Book, drop shop button after last artwork tile. Joel 9:37 PM AEDT 12 Nov 2026. Desktop/iPad unchanged. */
@media (max-width:720px){
  #paintings .dl-row:not(.cs-row){flex-direction:column;align-items:center;justify-content:center}
  #paintings .dl-row:not(.cs-row) .btn{display:flex;align-items:center;justify-content:center;text-align:center;box-sizing:border-box;width:100%;max-width:22.5em}
  .getbox .btn.gtb{width:90vw;max-width:90vw;flex:none;height:auto;box-sizing:border-box;font-size:clamp(30px,8.4vw,36px);line-height:1.15;padding:.32em 1.1em;white-space:nowrap}
  #artworks .studio-shop-col{display:contents}
  #artworks .studio-entry > .studio-tile,
  #artworks #studio-only-tile{order:1}
  #artworks .studio-shop{order:2;margin-top:24px;width:100%;justify-content:center}
}

/* Phone landscape (short height): keep the portrait loop covering the viewport,
   phone typography (html.wide stays off), and a compact firefly. Desktops and
   iPad landscape (height >= 500) are unchanged. */
@media (orientation: landscape) and (max-height: 500px) {
  html:not(.wide) .cover-bg img,
  html:not(.wide) .cover-bg .bg-loop {
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 72% 50%;
    -webkit-mask-image: none;
    mask-image: none;
  }
  html:not(.wide) .hero {
    justify-content: flex-end;
    padding-bottom: 8px;
    padding-right: 18px;
  }
  html:not(.wide) .lantern.firefly,
  html:not(.wide) .scene .lantern.firefly {
    width: min(16vw, 88px);
    right: auto;
    bottom: auto;
  }
}

/* First-screen scroll hint: peek the book panel at the bottom of the first
   screen so visitors can see there is more to scroll (Joel, 8:22 PM AEDT
   21 Nov 2026). Replaces the 12vh top margin on #book only. Get the Book and
   the fixed logo loop stay clear on phone and desktop. Short phone landscape
   keeps the original 12vh margin so the button is not covered. */
#book.panel{margin-top:-96px}
@media (orientation:landscape) and (max-height:500px){
  #book.panel{margin-top:12vh}
}

/* Phone firefly: document-anchored in the hero so it scrolls with the page (Joel, 8:55 PM AEDT 21 Nov 2026). */
.hero .lantern.firefly{position:absolute;right:auto;bottom:auto;z-index:5;margin:0;pointer-events:none}
@media (max-width:720px){.hero .lantern.firefly{width:min(28vw,120px)}}

/* Hero Get the Book -> #get: keep the Amazon box below the live header when
   JS is off (Joel, 9:45 PM AEDT 21 Nov 2026). --gtb-head is set from the
   measured header; 112px is the phone .top bar, 64px a desktop fallback. */
#get{scroll-margin-top:var(--gtb-head, calc(env(safe-area-inset-top, 0px) + 122px))}
@media (min-width:721px){
  #get{scroll-margin-top:var(--gtb-head, calc(env(safe-area-inset-top, 0px) + 64px))}
}
