/* Full-site illustrated prologue: a sealed parchment opens before the site begins. */
.b-illustrated-curtain{position:fixed;inset:0;z-index:2000;display:grid;place-items:center;overflow:hidden;isolation:isolate;pointer-events:auto;background:#050505}
.b-illustrated-curtain::before,.b-illustrated-curtain::after{display:none}
.b-illustrated-scroll{position:relative;z-index:1;width:min(72vw,980px);aspect-ratio:3.32;display:grid;place-items:center;will-change:opacity}
.b-illustrated-roll{position:absolute;inset:0;z-index:2;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 18px 16px #0009);will-change:transform,opacity;transition:transform .34s cubic-bezier(.22,.75,.2,1),filter .34s ease}
/* A touch response: the parchment settles under pressure and its folds briefly catch the light. */
/* The sheet starts concealed behind the sealed roll, then drops downward as real paper would. */
.b-illustrated-unroll{position:absolute;z-index:1;left:50%;top:50%;width:100vw;height:0;overflow:hidden;opacity:0;transform:translate(-50%,-50%);transform-origin:center;filter:drop-shadow(0 22px 18px #0009)}
.b-illustrated-unroll::before{content:"";position:absolute;inset:0;z-index:1;pointer-events:none}
.b-illustrated-unroll img{display:block;width:100%;height:100%;object-fit:fill;transform-origin:top center}
.b-illustrated-seal{position:absolute;z-index:3;left:50%;top:51%;width:10.4%;aspect-ratio:1;border:0;padding:0;background:transparent;cursor:pointer;transform:translate(-50%,-50%);isolation:isolate;transition:filter .18s ease}
/* On release, two wax halves cover the original seal, carrying the engraved mark with them. */
.b-illustrated-seal::before,.b-illustrated-seal::after{content:"";position:absolute;inset:0;z-index:1;opacity:0;background:url('assets/illustrated-wax-seal-optimized.webp') center/100% 100% no-repeat;filter:drop-shadow(0 2px 3px #0009)}
.b-illustrated-seal::before{clip-path:polygon(0 0,100% 0,52% 50%,100% 100%,0 100%)}
.b-illustrated-seal::after{clip-path:polygon(0 0,48% 50%,0 100%,100% 100%,100% 0)}
.b-illustrated-seal:focus-visible{outline:2px solid #f3eddf;outline-offset:10px}
/* A low-relief, debossed mark -- pressed into the wax rather than printed above it. */
.b-illustrated-logo{position:absolute;z-index:2;inset:0;width:100%;height:100%;object-fit:contain;opacity:1;filter:drop-shadow(0 2px 3px #0009);transition:opacity .12s linear,transform .18s ease}
.b-illustrated-wordmark{position:absolute;z-index:3;left:50%;top:50%;width:60%;height:32%;object-fit:contain;pointer-events:none;opacity:1;transform:translate(-50%,-50%);filter:brightness(0) invert(1) drop-shadow(0 1px 1px #5e1f14cc);transition:opacity .12s linear,transform .18s ease}
.b-wax-crumb{position:absolute;z-index:4;width:17%;aspect-ratio:1;border-radius:46% 54% 49% 51%;opacity:0;background:radial-gradient(circle at 38% 30%,#d47c5f 0 9%,#a54630 35%,#632014 100%);box-shadow:inset 0 0 0 1px #e39a7a66,0 2px 3px #0009;pointer-events:none}
.b-wax-crumb:nth-of-type(2){left:7%;top:6%}.b-wax-crumb:nth-of-type(3){right:5%;top:13%}.b-wax-crumb:nth-of-type(4){left:18%;bottom:3%}.b-wax-crumb:nth-of-type(5){right:14%;bottom:5%}.b-wax-crumb:nth-of-type(6){left:45%;top:-8%}.b-wax-crumb:nth-of-type(7){left:45%;bottom:-9%}
/* Hover makes the seal feel unstable before the click breaks it. */
.b-illustrated-seal:hover{filter:brightness(.94) saturate(1.06)}
.b-illustrated-seal:hover .b-illustrated-logo{transform:translateY(1px) scale(.992);filter:drop-shadow(0 3px 4px #0009)}
.b-illustrated-seal:hover .b-illustrated-wordmark{transform:translate(-50%,-49%) scale(.992)}
/* Hover is only the pressure of an old seal giving way. The actual break happens on click. */
.b-illustrated-seal:hover::before,.b-illustrated-seal:hover::after{opacity:0}
/* Break the seal, unroll the sheet down from the rollers, pause on black, then reveal the page. */
.b-illustrated-curtain.is-opening{animation:illustrated-paper-to-page 1.15s cubic-bezier(.38,0,.18,1) 2.05s forwards}
.b-illustrated-curtain.is-opening .b-illustrated-logo,.b-illustrated-curtain.is-opening .b-illustrated-wordmark{opacity:0;transition:none}
.b-illustrated-curtain.is-opening .b-illustrated-seal{animation:wax-core-break 1.1s cubic-bezier(.2,.8,.2,1) forwards;background:transparent;clip-path:none}
.b-illustrated-curtain.is-opening .b-illustrated-seal::before,.b-illustrated-curtain.is-opening .b-illustrated-seal::after{opacity:1}
.b-illustrated-curtain.is-opening .b-illustrated-seal::before{animation:seal-left-break 1.1s cubic-bezier(.2,.8,.2,1) forwards}.b-illustrated-curtain.is-opening .b-illustrated-seal::after{animation:seal-right-break 1.1s cubic-bezier(.2,.8,.2,1) forwards}
.b-illustrated-curtain.is-opening .b-wax-crumb{animation:wax-crumb 1.1s cubic-bezier(.15,.8,.25,1) forwards}
.b-illustrated-curtain.is-opening .b-wax-crumb:nth-of-type(2){--x:-150%;--y:-180%;--r:-38deg}.b-illustrated-curtain.is-opening .b-wax-crumb:nth-of-type(3){--x:170%;--y:-115%;--r:46deg}.b-illustrated-curtain.is-opening .b-wax-crumb:nth-of-type(4){--x:-145%;--y:150%;--r:22deg}.b-illustrated-curtain.is-opening .b-wax-crumb:nth-of-type(5){--x:150%;--y:135%;--r:-34deg}.b-illustrated-curtain.is-opening .b-wax-crumb:nth-of-type(6){--x:18%;--y:-200%;--r:55deg}.b-illustrated-curtain.is-opening .b-wax-crumb:nth-of-type(7){--x:-16%;--y:198%;--r:-45deg}
.b-illustrated-curtain.is-opening .b-illustrated-roll{animation:roll-gives-way .5s ease-out .54s forwards}
.b-illustrated-curtain.is-opening .b-illustrated-unroll{animation:parchment-unroll 1.82s cubic-bezier(.18,.82,.16,1) .66s forwards}
.b-illustrated-curtain.is-complete{visibility:hidden;opacity:0}
@keyframes wax-core-break{0%,30%{opacity:1;transform:translate(-50%,-50%) scale(1)}44%{opacity:1;transform:translate(-50%,-50%) scale(1.045)}100%{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@keyframes seal-left-break{0%,30%{transform:translate(0) rotate(0);opacity:1}100%{transform:translate(-108%,-62%) rotate(-35deg);opacity:0}}@keyframes seal-right-break{0%,30%{transform:translate(0) rotate(0);opacity:1}100%{transform:translate(108%,62%) rotate(35deg);opacity:0}}
@keyframes wax-crumb{12%{opacity:1}100%{opacity:0;transform:translate(var(--x),var(--y)) rotate(var(--r)) scale(.35)}}
@keyframes roll-gives-way{0%,48%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-8px)}}
@keyframes parchment-unroll{0%{height:0;opacity:0}8%{height:0;opacity:1}82%{height:112svh;opacity:1}100%{height:112svh;opacity:1}}
@keyframes illustrated-paper-to-page{to{opacity:0;visibility:hidden}}
/* The first home-screen message arrives with the parchment clearing. */
.b-growth.b-curtain-reveal .b-growth-heading h1{opacity:0;transform:translateY(18px);transition:opacity .84s cubic-bezier(.22,.75,.2,1),transform .84s cubic-bezier(.22,.75,.2,1)}
.b-growth.b-curtain-reveal.b-headline-visible .b-growth-heading h1{opacity:1;transform:translateY(0)}
@media(max-width:700px){.b-illustrated-scroll{width:94vw}.b-illustrated-seal{width:12.4%}.b-illustrated-unroll{width:86%}}
@media(prefers-reduced-motion:reduce){.b-illustrated-curtain{display:none}}

/* Visible invitation below the introductory scroll. */
.b-scroll-enter{position:absolute;top:calc(100% + 22px);left:50%;transform:translateX(-50%);z-index:5;border:0;background:transparent;color:#f3eddf;font-family:"Snell Roundhand","Apple Chancery","Segoe Script",cursive;font-size:clamp(26px,3vw,40px);font-style:italic;white-space:nowrap;cursor:pointer;padding:8px 20px;transition:opacity .2s ease}
.b-scroll-enter:focus-visible{outline:2px solid #f3eddf;outline-offset:4px}
.b-illustrated-curtain.is-opening .b-scroll-enter{opacity:0;pointer-events:none}

body.sv.beyond .b-illustrated-curtain .b-scroll-enter{color:#f3eddf;background:transparent}

/* Gentle invitation; respect reduced-motion preferences. */
@keyframes enter-invitation-pulse{0%,100%{opacity:1}50%{opacity:.48}}
body.sv.beyond .b-illustrated-curtain:not(.is-opening) .b-scroll-enter{animation:enter-invitation-pulse 2.8s ease-in-out infinite}
@media(prefers-reduced-motion:reduce){body.sv.beyond .b-illustrated-curtain .b-scroll-enter{animation:none!important}}
