/* hero.css — home hero v2 (page 1, map transition, word mask, inside). Owned by the hero build; loaded after core.css. */
#hero{height:560vh;position:relative;background:var(--cream)}
#hero .stage{position:sticky;top:0;height:100vh;height:100svh;overflow:hidden;background:#022BA5;isolation:isolate}
#hero .stage.nogl{background:linear-gradient(160deg,#022BA5 0%,#021f80 60%,#010F3D 130%)}
#hbg{position:absolute;inset:0;width:100%;height:100%;display:block;z-index:0}
.hgrain{position:absolute;inset:0;z-index:1;pointer-events:none;background:url(img/paper.jpg) center/cover;mix-blend-mode:multiply;opacity:1}
.hgrain::after{content:'';position:absolute;inset:0;background:url(img/paper.jpg) center/cover;mix-blend-mode:soft-light;opacity:.5}
.hmapbox{position:absolute;inset:0;z-index:1;pointer-events:none}
.hmapbox .hmap{position:absolute;inset:0;width:100%;height:100%}

/* Lena: flush to the stage's right+bottom edges (hides the straight cuts of the cutout); the note covers the baked-in white rectangle (x 0-37.3%, y 48.7-72.3%) */
.hlena{--lh:min(90vh,90svh,1196px);position:absolute;z-index:2;bottom:0;right:0;width:min(calc(var(--lh) * 850 / 1040),62vw);height:auto;aspect-ratio:850/1040;container-type:inline-size;transform-origin:50% 100%;will-change:transform,opacity;pointer-events:none;user-select:none}
.hlena img{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:fill;z-index:1}
.hburst{position:absolute;z-index:0;left:-22%;top:-24%;width:152%;height:auto;aspect-ratio:1;display:block;overflow:visible;transform:rotate(-8deg)}
.hnote{position:absolute;z-index:2;left:-9%;width:46.8%;top:48.1%;height:27.6%;margin:0;box-sizing:border-box;padding:3.2cqw 3.4cqw 3cqw 4.6cqw;display:flex;align-items:center;background:#F9F6F0;color:#010F3D;font:500 max(13px,3.35cqw)/1.32 var(--sans);letter-spacing:0;text-align:left;transform:rotate(-.5deg);box-shadow:0 8px 16px -6px rgba(1,15,61,.35);clip-path:polygon(0 1%,18% 0,40% 1.5%,63% 0,85% 1%,100% 0,99.4% 38%,100% 70%,99% 100%,78% 98.5%,52% 100%,27% 98.6%,0 100%,.8% 62%,0 30%)}

/* copy: white torn-paper strips */
#hero .hcopy{position:absolute;inset:0;z-index:4;display:flex;align-items:center;color:#fff;bottom:auto;height:100%;padding-top:var(--hdr);will-change:transform,opacity;text-shadow:none;pointer-events:none}
#hero .hcopy::before{display:none}
#hero .hcopy .wrap{pointer-events:none}
#hero .hcopy .wrap>*{max-width:none}
#hero .hcopy .wrap>.hsub{max-width:min(560px,52%)}
#hero .hcopy a{pointer-events:auto}
#hero .hcopy h1,html[lang=ru] #hero .hcopy h1,html[lang=en] #hero .hcopy h1{font-family:var(--serif);font-weight:500;font-size:clamp(32px,4.1vw,64px);line-height:1;letter-spacing:-.015em;color:var(--ink);display:flex;flex-direction:column;align-items:flex-start;gap:10px}
#hero .hcopy h1 .l{display:flex;flex-direction:column;align-items:flex-start;gap:6px;filter:drop-shadow(0 5px 10px rgba(1,15,61,.28));overflow:visible;transform:none}
#hero .hcopy h1 .l:nth-child(2){margin-left:clamp(10px,2vw,34px)}
#hero .hcopy h1 .strip{display:inline-block;background:#F9F6F0;padding:.17em .46em .22em .4em;opacity:0;transform:translateX(-32px) rotate(var(--r,0deg));transform-origin:0 50%;transition:opacity .7s var(--ease),transform .9s var(--ease);transition-delay:calc(var(--i) * .13s);will-change:transform;white-space:nowrap;--r:-.7deg}
#hero .hcopy h1 .strip:nth-child(1){clip-path:polygon(0 6%,2% 0,5% 5%,9% 1%,14% 6%,19% 0,26% 4%,33% 1%,41% 5%,49% 0,57% 4%,64% 1%,72% 5%,80% 0,88% 4%,95% 1%,100% 5%,99% 44%,100% 70%,98.6% 100%,93% 95%,86% 100%,78% 95%,69% 100%,60% 94%,51% 100%,42% 95%,33% 100%,24% 94%,15% 100%,7% 95%,1% 100%,0 72%,1% 40%)}
#hero .hcopy h1 .l:nth-child(2) .strip:nth-child(1){--r:.5deg;clip-path:polygon(1% 3%,6% 0,12% 5%,20% 1%,29% 6%,38% 0,47% 4%,56% 0,66% 5%,75% 1%,85% 5%,93% 0,100% 4%,98.5% 38%,100% 66%,99% 96%,92% 100%,83% 95%,74% 100%,64% 95%,53% 100%,43% 94%,32% 100%,21% 95%,11% 100%,3% 96%,0 64%,1.5% 34%)}
#hero .hcopy h1 .l:nth-child(2) .strip:nth-child(2){--r:-.4deg;color:var(--blue);margin-left:clamp(0px,1.4vw,22px);background:#00B1FF;color:#010F3D;clip-path:polygon(0 4%,4% 0,10% 5%,17% 1%,25% 5%,34% 0,44% 4%,52% 1%,61% 5%,70% 0,79% 4%,88% 1%,96% 5%,100% 2%,99% 40%,100% 74%,97% 100%,90% 95%,81% 100%,71% 94%,62% 100%,52% 95%,41% 100%,31% 95%,20% 100%,10% 94%,3% 100%,1% 70%,0 36%)}
#hero .hcopy h1.on .strip{opacity:1;transform:rotate(var(--r,0deg))}
.hsub,#hero .hsub{font-size:clamp(17px,1.5vw,21px);max-width:520px;margin-top:26px;font-weight:500;line-height:1.45;color:#fff;text-shadow:none}
#hero .hcta{margin-top:30px}
#hero .scrollhint{z-index:4;right:24px;bottom:5vh}

/* paper sheet */
#maskSvg{position:absolute;inset:0;width:100%;height:100%;z-index:3;visibility:hidden;overflow:hidden;pointer-events:none;will-change:auto}
#hsm text{paint-order:normal}

/* inside */
#hero .inside{z-index:4;display:grid;place-items:center;text-align:center;color:#fff;opacity:0;visibility:hidden;pointer-events:none}
#hero .inside h2{font-family:var(--serif);font-weight:500;line-height:1;letter-spacing:-.02em;color:var(--ink);filter:drop-shadow(0 6px 12px rgba(1,15,61,.3));margin:0}
#hero .inside .istrip{display:inline-block;background:#F9F6F0;color:var(--ink);font-size:clamp(40px,8.4vw,132px);padding:.14em .42em .2em .38em;transform:rotate(-1deg);overflow-wrap:anywhere;clip-path:polygon(0 5%,3% 0,8% 4%,14% 0,21% 4%,29% 0,38% 4%,47% 0,56% 4%,65% 0,74% 4%,83% 0,91% 4%,97% 0,100% 4%,99% 45%,100% 72%,98% 100%,91% 96%,82% 100%,72% 95%,62% 100%,51% 96%,41% 100%,30% 95%,20% 100%,10% 96%,3% 100%,0 70%,1% 40%)}
html[lang=ru] #hero .inside .istrip,html[lang=en] #hero .inside .istrip{font-size:clamp(38px,7.2vw,112px)}
#hero .inside .inote{display:inline-block;margin:26px auto 0;font-size:clamp(16px,1.5vw,21px);font-weight:500;line-height:1.4;color:var(--ink);background:#F9F6F0;padding:16px 22px 18px;max-width:min(440px,86vw);transform:rotate(.8deg);box-shadow:0 8px 18px rgba(1,15,61,.28);clip-path:polygon(0 0,100% 1%,99% 100%,1% 99%)}
#hero .inside .btn{margin-top:30px}
#hero .inside::after{display:none}
#hero .fog{z-index:6;height:130%;background:linear-gradient(180deg,rgba(244,238,227,0),var(--cream) 55%)}
#hero .sky,#hero .shade{display:none}

@media (max-width:860px){
  #hero{height:500vh}
  #hero .stage{contain:paint}
  .hgrain{opacity:.28}
  #hero .hcopy{align-items:flex-start;padding:84px 0 26px}
  #hero .hcopy .wrap{height:100%;display:flex;flex-direction:column}
  #hero .hcopy .wrap>*{max-width:100%}
  #hero .hcopy .wrap>.hcta{max-width:min(340px,100%)}
  #hero .hcopy h1,html[lang=ru] #hero .hcopy h1,html[lang=en] #hero .hcopy h1{font-size:clamp(26px,7.6vw,52px);gap:7px}
  #hero .hcopy h1 .l{gap:5px}
  .hsub,#hero .hsub{font-size:clamp(15px,4.2vw,19px);margin-top:16px;max-width:min(420px,70%)}
  #hero .hcta{margin-top:22px;flex-direction:column;align-items:stretch;gap:10px}
  #hero .hcta .btn.big{height:54px}
  .hlena{--lh:min(58svh,520px);width:min(calc(var(--lh) * 850 / 1040),92vw);height:auto}
  #hero .scrollhint{display:none}
  #hero .inside .btn{max-width:100%}
}
@media (max-width:420px){#hero .hcopy h1{gap:6px}}
@media (prefers-reduced-motion:reduce){#hero .hcopy h1 .strip{transition:none;opacity:1;transform:rotate(var(--r,0deg))}}
#hero .hcopy h1 .l:nth-child(2) .strip:nth-child(2){line-height:1.02}
