/* Nur Al-Qasas: a comic page in the artwork's own ink. Navy rock, red dusk, cream paper. The art holds still;
   panels slide in, captions drop on, and the pictures inside the frames drift slowly, as a camera moves over a still drawing. */
:root{--night:#080a1a;--navy:#141c4a;--rock:#3b5cb8;--red:#f0442c;--cream:#f3e9d2;--ink:#0b0d20;--serif:"Iowan Old Style","Palatino Linotype",Palatino,"Book Antiqua",Georgia,serif;--arabic:"Geeza Pro","Noto Naskh Arabic","Amiri","Scheherazade New","Traditional Arabic",serif}
*{box-sizing:border-box}
html{background:var(--night);-webkit-text-size-adjust:100%}
body{margin:0;color:var(--cream);font:400 19px/1.5 var(--serif);overflow-x:hidden}
.skip{position:absolute;left:-999px;top:0;background:var(--cream);color:var(--ink);padding:.7rem 1rem;z-index:30}.skip:focus{left:0}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
/* the page itself: the artwork, still, with a printed halftone over it */
#bg{position:fixed;inset:0;z-index:0;background:linear-gradient(rgba(8,10,26,.2),rgba(8,10,26,.05) 40%,rgba(8,10,26,.55)),url(img/art-right.webp) 62% 50%/cover no-repeat var(--night)}
#bg::after{content:"";position:absolute;inset:0;background:radial-gradient(rgba(8,10,26,.5) 1px,transparent 1.4px) 0 0/5px 5px;opacity:.35}
/* wide screens: the first page is the whole banner, with the name as the artist lettered it; the pages after it use the art without lettering */
@media (min-aspect-ratio:5/4){.hero{background:url(img/art-full.webp) 50% 50%/cover no-repeat var(--night)}.hero .titles{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#bg{background-position:50% 38%}}
/* the coin: one layer above the page, crossing it as you read */
#coin{position:fixed;left:0;bottom:max(1.2rem,env(safe-area-inset-bottom));z-index:3;width:clamp(120px,34vw,250px);height:auto;pointer-events:none;filter:drop-shadow(0 10px 14px rgba(0,0,0,.55));will-change:transform}
#speed{position:fixed;left:0;bottom:calc(max(1.2rem,env(safe-area-inset-bottom)) + 3vw);z-index:2;width:clamp(120px,34vw,250px);height:clamp(60px,17vw,120px);pointer-events:none;opacity:0;background:repeating-linear-gradient(0deg,transparent 0 9px,rgba(243,233,210,.75) 9px 11px,transparent 11px 21px);-webkit-mask:linear-gradient(90deg,transparent,#000 70%);mask:linear-gradient(90deg,transparent,#000 70%)}
html:not(.alive) #coin,html:not(.alive) #speed{display:none}
.page-panel{position:relative;z-index:1;min-height:100svh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;padding:max(1.4rem,env(safe-area-inset-top)) max(1.1rem,env(safe-area-inset-right)) 6.5rem max(1.1rem,env(safe-area-inset-left))}
.hero{justify-content:flex-start;padding-top:max(5svh,1.6rem);text-align:center;text-shadow:0 2px 14px rgba(8,10,26,.95),0 0 2px rgba(8,10,26,.9)}
.emblem{width:clamp(84px,24vw,130px);height:auto;border-radius:50%;filter:drop-shadow(0 6px 14px rgba(0,0,0,.6))}
.ar{margin:.3rem 0 0;font:700 clamp(2.9rem,15.5vw,6rem)/1.3 var(--arabic);color:var(--cream)}
h1{margin:0;font:700 clamp(1.9rem,9vw,3.8rem)/1.05 var(--serif)}
.tag{margin:.35rem 0 0;font:italic 700 clamp(1rem,4.6vw,1.4rem)/1.3 var(--serif)}
.hint{margin-top:auto;font:700 .85rem/1 var(--serif);letter-spacing:.24em;text-transform:uppercase;color:var(--cream);background:var(--red);padding:.55rem .9rem;transform:rotate(-2deg);box-shadow:4px 4px 0 var(--ink);text-shadow:none}
html:not(.alive) .hint{display:none}
/* a comic cell: cream gutter, ink line, a hard shadow; the picture inside drifts */
.cell{position:relative;z-index:1;width:min(100%,30rem);aspect-ratio:4/3;overflow:hidden;background:var(--night);border:6px solid var(--cream);outline:3px solid var(--ink);box-shadow:9px 10px 0 rgba(8,10,26,.85)}
.cell.wide{aspect-ratio:16/8;width:min(100%,36rem)}.cell.round{aspect-ratio:1;width:min(72%,19rem);border-radius:50%}
.cell .art{display:block;width:100%;height:100%;object-fit:cover}
.tilt-l{transform:rotate(-1.6deg)}.tilt-r{transform:rotate(1.4deg)}
@keyframes kb-pan{from{transform:scale(1.18) translate(-6%,2%)}to{transform:scale(1.18) translate(6%,-2%)}}
@keyframes kb-zoom{from{transform:scale(1.02)}to{transform:scale(1.2) translate(-2%,-3%)}}
.art.pan{animation:kb-pan 22s ease-in-out infinite alternate}.art.zoom{animation:kb-zoom 20s ease-in-out infinite alternate}
/* captions: cream boxes, ink type, set at a slight angle like lettering on a page */
.cap,.card{position:relative;z-index:4;width:min(100%,27rem);margin:0;padding:.85rem 1rem;background:var(--cream);color:var(--ink);font:700 clamp(1rem,4.4vw,1.15rem)/1.4 var(--serif);border:3px solid var(--ink);box-shadow:6px 6px 0 var(--red)}
.cap.c1{transform:rotate(-1.2deg);align-self:flex-start;margin-top:-2.2rem}.cap.c2{transform:rotate(1deg);align-self:flex-end}.cap.c3{transform:rotate(-.7deg);align-self:flex-start;background:var(--ink);color:var(--cream);border-color:var(--cream)}
.card{text-align:center;transform:rotate(-.8deg);margin-top:-1.6rem}
.card h2{margin:0;font:700 clamp(1.9rem,8.6vw,3rem)/1.04 var(--serif)}
.eyebrow{margin:0 0 .3rem;font:700 .82rem/1 var(--serif);letter-spacing:.22em;text-transform:uppercase;color:var(--red)}
.from{margin:.4rem 0 0;font:italic 700 1.1rem/1.3 var(--serif)}
.links{list-style:none;margin:.7rem 0 0;padding:0;display:grid;gap:.55rem}
.links a{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;min-height:56px;padding:.8rem 1rem;background:var(--ink);color:var(--cream);text-decoration:none;font:700 1.2rem/1.2 var(--serif);border:3px solid var(--ink);transition:transform .12s,background .12s}
.links a small{font:700 .8rem/1 var(--serif);color:#ff9a84}
.links a:hover,.links a:focus-visible{background:var(--red);transform:translate(-2px,-2px) rotate(-.6deg)}.links a:hover small,.links a:focus-visible small{color:var(--cream)}
.contact{margin:.7rem 0 0;font-size:.95rem;font-weight:400}.contact a{color:var(--ink);font-weight:700}
a:focus-visible{outline:4px solid var(--red);outline-offset:3px}
/* panels arrive like a page being turned; with scripts off or motion reduced they are simply there */
html.alive .cell,html.alive .cap,html.alive .card,html.alive .titles{opacity:0;transition:opacity .5s ease,translate .6s cubic-bezier(.2,.8,.2,1),scale .6s cubic-bezier(.2,.8,.2,1)}
html.alive .cell{translate:-42px 0}html.alive .cell.tilt-r{translate:42px 0}html.alive .cap,html.alive .card{scale:.9;translate:0 18px}html.alive .cap.c2{transition-delay:.18s}html.alive .cap.c3{transition-delay:.36s}html.alive .card{transition-delay:.15s}html.alive .titles{translate:0 14px}
html.alive .in{opacity:1!important;translate:0 0!important;scale:1!important}
footer{position:relative;z-index:5;padding:1.5rem 1.2rem calc(1.5rem + env(safe-area-inset-bottom));background:var(--ink);color:#cfc6b2;text-align:center;font-size:.95rem;border-top:4px solid var(--cream)}footer p{margin:.2rem 0}footer a{color:#ff9a84}
@media (min-width:860px){.page-panel{flex-direction:row;flex-wrap:wrap;align-content:center;gap:1.6rem 2.4rem}.hero{flex-direction:column}.cap.c1{margin-top:0}.card{margin-top:0}.cell{width:min(44%,34rem)}.cell.wide{width:min(52%,40rem)}.cell.round{width:min(30%,22rem)}.cap{width:min(34%,24rem);align-self:center!important}.card{width:min(40%,27rem)}}
@media (prefers-reduced-motion:reduce){.art.pan,.art.zoom{animation:none}html.alive .cell,html.alive .cap,html.alive .card,html.alive .titles{opacity:1;translate:0 0;scale:1;transition:none}.links a{transition:none}}
/* reading pages */
.page{position:relative;z-index:1;max-width:44rem;margin:0 auto;padding:max(1.5rem,env(safe-area-inset-top)) 1.3rem 3rem;font-size:1.05rem;line-height:1.6}
.page h1{font-size:clamp(2.2rem,10vw,3.6rem);margin:1.2rem 0 .5rem}.page h2{font:700 1.45rem/1.2 var(--serif);margin:2rem 0 .4rem;color:#ff9a84}
.page a{color:#ff9a84}.page .home{display:inline-flex;align-items:center;gap:.6rem;min-height:48px;text-decoration:none;color:var(--cream);font-weight:700;letter-spacing:.04em}.page .home img{width:44px;height:44px;border-radius:50%}.page li{margin:.3rem 0}
body.reading{background:radial-gradient(90% 50% at 50% 0%,#17204a 0%,rgba(23,32,74,0) 70%),var(--night)}
