/* =========================================================================
   Sera · cover hero (home)
   A magazine cover: the SERAFIM logo as masthead, the 3D bust in front of it,
   four cover lines. One ruler for every screen: the logo's width (--lw) and its
   stroke (--u); the bust box and the text columns derive from them.
   Everything is scoped to #cover so the rest of the theme is untouched.
   ========================================================================= */
#cover{
	--hdr:80px;
	--hh:max(320px,calc(100svh - var(--hdr)));
	--lw:min(86vw,1600px,calc(var(--hh) * 1.32));
	--lh:calc(var(--lw) / 3.09);
	--u:calc(var(--lw) * 8.99 / 305.55);
	--mt:calc(var(--hh) * .03);
	--bt:calc(var(--mt) + var(--lh) * .3);
	--bh:calc(var(--hh) - var(--bt));
	--bw:min(100vw,calc(var(--bh) * 1.3));
	--cw:calc(var(--lw) / 2 - var(--bh) * .2 - 20px);
	--hw:calc(var(--lw) / 2 - var(--bh) * .12 - 20px);
	--rowB:44px;
	--cv-paper:var(--bg,#F5F4EF);--cv-ink:#111110;--cv-ink-2:#3B3A36;--cv-teal:#0B5F63;
	position:relative;height:var(--hh);overflow-x:clip;overflow-y:visible;color:var(--cv-ink)
}
#cover *{box-sizing:border-box}
#cover .thin{font-family:var(--display);font-weight:220;font-stretch:76%;text-transform:uppercase;letter-spacing:.015em;line-height:.92;text-wrap:balance}
#cover .cap{font:400 13px/1.5 var(--mono);letter-spacing:.16em;text-transform:uppercase}

/* the floor is drawn three times; each copy is blurred a little more and kept only where it sits further away: depth of field */
#cover .grid3d{position:absolute;left:0;right:0;bottom:0;height:72%;z-index:0;pointer-events:none;overflow:hidden;
	-webkit-mask-image:linear-gradient(to top,transparent 0%,#000 26%);mask-image:linear-gradient(to top,transparent 0%,#000 26%)}
#cover .grid3d .fl{position:absolute;left:-30%;right:-30%;top:0;bottom:0}
#cover .grid3d .pl{position:absolute;inset:0;
	background-image:linear-gradient(rgba(17,17,16,.12) 1px,transparent 1px),linear-gradient(90deg,rgba(17,17,16,.12) 1px,transparent 1px);background-size:84px 84px;background-position:center bottom;
	transform:perspective(900px) rotateX(64deg) rotateZ(var(--gz,0deg));transform-origin:50% 100%}
#cover .grid3d .near{-webkit-mask-image:linear-gradient(to top,#000 0%,#000 16%,transparent 40%);mask-image:linear-gradient(to top,#000 0%,#000 16%,transparent 40%)}
#cover .grid3d .mid{filter:blur(1.3px);-webkit-mask-image:linear-gradient(to top,transparent 12%,#000 32%,#000 46%,transparent 66%);mask-image:linear-gradient(to top,transparent 12%,#000 32%,#000 46%,transparent 66%)}
#cover .grid3d .far{filter:blur(3.4px);opacity:.85;-webkit-mask-image:linear-gradient(to top,transparent 40%,#000 60%,rgba(0,0,0,.6) 78%,transparent 96%);mask-image:linear-gradient(to top,transparent 40%,#000 60%,rgba(0,0,0,.6) 78%,transparent 96%)}

#cover .mast{position:absolute;left:50%;top:var(--mt);z-index:1;transform:translateX(-50%);width:var(--lw);margin:0;color:var(--cv-ink)}
#cover .mast svg{display:block;width:100%;height:auto}
#cover .bust-box{position:absolute;left:50%;top:var(--bt);height:var(--bh);width:var(--bw);transform:translateX(-50%);visibility:hidden;pointer-events:none}
/* the canvas reaches up behind the header so the particles can build the small logo there */
#cover canvas.bust{position:absolute;left:0;top:calc(var(--hdr) * -1);width:100%;height:calc(100% + var(--hdr));z-index:2;display:block;opacity:0;transition:opacity 1.2s ease;pointer-events:none}
#cover canvas.bust.is-ready{opacity:1}
/* first paint: the still ASCII portrait (cover-pre.js) holds the spot until the live bust takes over */
#cover canvas.bust-pre{position:absolute;left:0;top:calc(var(--hdr) * -1);width:100%;height:calc(100% + var(--hdr));z-index:2;display:block;pointer-events:none;opacity:0;transition:opacity .35s ease}
#cover canvas.bust-pre.on{opacity:1}
#cover.cv-fallback canvas.bust-pre{display:none}
/* the bust always ends in a veil to transparent at the bottom of its box (--cv-f0/--cv-f1: px from the canvas top, set by cover-pre.js and cover.js) */
#cover canvas.bust,#cover canvas.bust-pre{-webkit-mask-image:linear-gradient(to bottom,#000 var(--cv-f0,74%),transparent var(--cv-f1,100%));mask-image:linear-gradient(to bottom,#000 var(--cv-f0,74%),transparent var(--cv-f1,100%))}
#cover .cv-lab{display:none!important}

#cover .frame{position:absolute;z-index:4;top:0;bottom:0;left:50%;width:var(--lw);transform:translateX(-50%);pointer-events:none}
#cover .frame a{pointer-events:auto}
#cover .cl{position:absolute;z-index:2;width:var(--cw)}
#cover .cl h2{margin:0 0 8px;font-size:clamp(18px,calc(var(--cw) / 8.5),52px);color:var(--cv-ink)}
#cover .cl p{margin:0;font-size:clamp(13px,calc(var(--cw) / 19),17px);line-height:1.5;color:var(--cv-ink-2);max-width:34ch}
#cover .c2 p,#cover .c4 p{margin-left:auto}
#cover .cl .k{color:var(--cv-teal);margin-bottom:8px;display:block}
#cover .c1{left:0;top:calc(var(--mt) + var(--lh) + var(--u))}
#cover .c2{right:0;top:calc(var(--mt) + var(--lh) + var(--u));text-align:right}
#cover .c3{left:0;bottom:var(--rowB);width:var(--hw)}
#cover .c3 h1{margin:0;font-size:clamp(26px,calc(var(--hw) / 9.6),74px);color:var(--cv-ink)}
#cover .c4{right:0;bottom:var(--rowB);text-align:right}
#cover .cv-btn{display:inline-flex;align-items:center;min-height:52px;margin-top:16px;padding:0 24px;border-radius:999px;font:400 13.5px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;background:var(--cv-ink);color:#fff;text-decoration:none}
#cover .cv-btn:focus-visible{outline:2px solid var(--cv-teal);outline-offset:3px}
@media (min-aspect-ratio:4/5) and (min-width:761px) and (max-height:940px){#cover .c1 p,#cover .c2 p{display:none}}
@media (min-aspect-ratio:4/5) and (min-width:761px) and (max-height:780px){#cover .c4 p{display:none}}

/* portrait and phones: the cover lines become a three-column strip under the headline */
@media (max-aspect-ratio:4/5),(max-width:760px){
	#cover{--lw:min(calc(100vw - 40px),820px);--mt:calc(var(--hh) * .045);--bt:calc(var(--mt) + var(--lh) * .62);--bw:100vw;--rowB:26px;
		--fs:clamp(26px,min(8.6vw,6.2svh),64px);--fs2:clamp(13px,min(4.3vw,3.1svh),28px);--pH:0px;
		--stack:calc(var(--rowB) + var(--fs2) * 1.84 + 34px + var(--pH) + var(--fs) * 1.84 + 64px + clamp(16px,3.2vh,28px));
		--bh:min(calc((var(--hh) - var(--bt)) * .9),calc((var(--hh) - var(--stack) - var(--bt)) * 1.95));overflow:hidden}
	#cover .frame{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:1fr auto auto;column-gap:14px;padding-bottom:var(--rowB)}
	#cover .cl{position:static;width:auto;text-align:left!important}
	#cover .c3{grid-column:1/-1;grid-row:2;margin-bottom:clamp(16px,3.2vh,28px)}
	#cover .c3 h1{font-size:var(--fs)}
	#cover .c1{grid-column:1;grid-row:3}#cover .c2{grid-column:2;grid-row:3}#cover .c4{grid-column:3;grid-row:3}
	#cover .c1,#cover .c2,#cover .c4{padding-top:10px;border-top:1px solid rgba(17,17,16,.28)}
	#cover .cl .k{font-size:clamp(9px,2.3vw,12px);letter-spacing:.12em;margin-bottom:6px}
	#cover .cl h2{font-size:var(--fs2);margin:0}
	#cover .cl p{display:none}
	#cover .cv-btn{min-height:46px;margin-top:14px;padding:0 20px;font-size:12.5px}
	/* the shirt melts into the paper so the cover lines always read */
	#cover::after{height:50%;background:linear-gradient(to top,var(--cv-paper) 0%,color-mix(in srgb,var(--cv-paper) 84%,transparent) 40%,transparent 100%)}
}
@media (max-aspect-ratio:4/5) and (min-width:600px) and (min-height:900px),(max-width:760px) and (min-width:600px) and (min-height:900px){#cover{--pH:66px}#cover .cl p{display:block;margin:8px 0 0;font-size:14px;max-width:none}}
@media (max-aspect-ratio:4/5) and (max-height:700px),(max-width:760px) and (max-height:700px){#cover .cv-btn{min-height:42px;margin-top:10px}}

/* phones on their side: logo and text on the left, the bust on the right */
@media (min-aspect-ratio:4/5) and (max-height:520px){
	#cover{--hh:max(500px,calc(100svh - var(--hdr)));--lw:min(46vw,calc(var(--hh) * 1.3));--mt:14px;--bt:0px;--bh:var(--hh);--bw:54vw;--rowB:20px}
	#cover .mast{left:max(20px,env(safe-area-inset-left,0px));transform:none}
	#cover .bust-box{left:auto;right:0;transform:none}
	#cover .frame{left:max(20px,env(safe-area-inset-left,0px));transform:none;top:calc(var(--mt) + var(--lh) + 14px);
		display:flex;flex-direction:column;justify-content:flex-end;gap:7px;padding-bottom:var(--rowB)}
	#cover .cl{position:static;width:auto;text-align:left!important}
	#cover .c3{order:-1;margin-bottom:8px}
	#cover .c3 h1{font-size:clamp(22px,3.6vw,34px)}
	#cover .c1,#cover .c2,#cover .c4{display:flex;align-items:baseline;gap:10px;padding-top:6px;border-top:1px solid rgba(17,17,16,.22)}
	#cover .c1 p,#cover .c2 p,#cover .c4 p{display:none}
	#cover .cl .k{flex:0 0 7.5em;margin:0;font-size:10px}
	#cover .cl h2{font-size:15px;margin:0}
	#cover .cv-btn{min-height:40px;margin-top:10px;padding:0 16px;font-size:11.5px}
}

/* the cover melts into the page: the shirt and the floor fade into the paper, so the next section starts on clean ground */
#cover::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:clamp(90px,20%,220px);z-index:3;pointer-events:none;
	background:linear-gradient(to top,var(--cv-paper) 0%,color-mix(in srgb,var(--cv-paper) 72%,transparent) 45%,transparent 100%)}
/* what follows the cover: the logo strip, with air proportional to the logo's stroke and no hard rule on top */
#cover + .hero-scope .hero-logos-only{padding-top:0}
#cover + .hero-scope .hero-logos-only .logos{margin-top:calc(var(--u-out,clamp(40px,5vw,72px)));border-top-color:transparent}

/* no model (load failed): the cover still reads as a cover */
#cover .cv-photo{display:none}
#cover.cv-fallback canvas.bust{display:none}
/* the source photo of the 3D scan, framed like the bust; multiply turns its white backdrop into the page's paper */
#cover.cv-fallback .cv-photo{-webkit-mask-image:linear-gradient(to bottom,#000 74%,transparent);mask-image:linear-gradient(to bottom,#000 74%,transparent);display:block;position:absolute;z-index:2;left:50%;transform:translateX(-50%);top:var(--bt);height:var(--bh);width:var(--bw);max-width:100%;object-fit:contain;object-position:50% 100%}
.cv-hud{position:fixed;z-index:9999;left:8px;right:8px;bottom:8px;margin:0;padding:10px 12px;border-radius:8px;background:rgba(17,17,16,.88);color:#EFEEE8;font:11px/1.45 var(--mono,monospace);white-space:pre-wrap;word-break:break-all;max-height:45vh;overflow:auto}

/* header on the home: the brand logo is built by the particles on the way down, so it waits for them */
html.cv-on .site-header .brand svg{opacity:0;transition:opacity .25s linear}
html.cv-on .site-header.logo-on .brand svg{opacity:1}
/* while the dots fly into the header its glass stays clear, so they read */
html.cv-on .site-header.cv-flying::before,html.cv-on .site-header.cv-flying>.v2-pill-tint{opacity:0!important}

@media (prefers-reduced-motion:reduce){#cover *{transition:none!important}}

/* the cover script loads after Three.js: until it has laid the header out, the menu waits hidden instead of jumping */
html.cv-on .site-header>.wrap>:not(.brand){transition:opacity .35s ease}
html.cv-pre .site-header>.wrap>:not(.brand){opacity:0}
/* home: the top menu is part of the page (stays put and scrolls away with the cover, no background);
   the sticky bar slides in once the brands strip reaches the top */
html.cv-on .site-header:not(.cv-bar){position:relative;top:auto}
html.cv-on .site-header:not(.cv-bar)::before,html.cv-on .site-header:not(.cv-bar)::after{opacity:0!important}
/* invisible glass still costs the GPU a blur of the whole strip every frame: off until the bar arrives */
html.cv-on .site-header:not(.cv-bar)::before{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
/* ...except the logo: it is the sticky bar's logo from the start, waiting fixed on its spot in the bar
   (--cv-bl/--cv-bt, measured by cover.js), so the particles that become the logo always head there */
html.cv-on .site-header:not(.cv-bar):not(.cv-meas) .brand{position:fixed;left:var(--cv-bl,24px);top:var(--cv-bt,22px);margin:0;z-index:2}
html.cv-on .site-header.logo-on .brand{pointer-events:auto}
@media (max-width:900px){html.cv-on .site-header:not(.cv-bar):not(.cv-meas)>.wrap>.header-actions{margin-left:auto}}
/* the bar arrives around the logo: background fades in, menu and buttons drop into place */
html.cv-on .site-header.cv-bar>.wrap>:not(.brand){animation:cvBarIn .5s cubic-bezier(.2,.8,.2,1) both}
html.cv-on .site-header.cv-bar .brand svg{opacity:1}
@keyframes cvBarIn{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){html.cv-on .site-header.cv-bar>.wrap>:not(.brand){animation:none}}

/* home header at the top: no name, menu + language + button grouped in the middle, never wider than the logo */
@media (min-width:901px){
	html.cv-on .site-header.cv-top .brand-name{display:none}
	html.cv-on .site-header.cv-top .brand{position:absolute;left:var(--gutter,24px);pointer-events:none}
	html.cv-on .site-header.cv-top .wrap{max-width:var(--cv-lw,100%);margin-inline:auto;justify-content:center;gap:34px}
}
/* home header scrolled: a full-width bar across the top, not the floating pill */
html.cv-on .site-header::before{inset:0!important;border-radius:0!important;transform:none!important;box-shadow:0 1px 0 rgba(17,17,16,.08)!important}
html.cv-on .site-header::after{left:0!important;right:0!important;bottom:0!important}
/* over dark blocks the bar turns ink (v2's tint layer), full width like the bar itself; never on the static top menu */
html.cv-on .site-header>.v2-pill-tint{inset:0!important;border-radius:0!important}
html.cv-on .site-header:not(.cv-bar)>.v2-pill-tint{opacity:0!important}
/* 3.57 · home bar "camaleão": vidro de ponta a ponta (blur + saturação no ::before, sem cor). O tom são duas
   camadas translúcidas na .v2-pill-tint, papel e tinta, cruzadas por --cv-mix (0 = papel, 1 = tinta). Nos blocos
   comuns a troca leva 0,7 s; sobre o degradê que leva à Approach (data-header-ramp) o v2.js põe --cv-mix igual
   ao escuro do degradê atrás da barra, então ela acompanha o fundo quadro a quadro. */
html.cv-on .site-header.cv-bar{--cv-mix:0;--cv-line:rgba(17,17,16,.08)}
html.cv-on .site-header.cv-bar:is(.v2-dark,.hdr-escuro){--cv-mix:1;--cv-line:rgba(239,238,232,.08)}
html.cv-on .site-header.cv-bar::before{background:transparent!important;-webkit-backdrop-filter:blur(18px) saturate(170%)!important;backdrop-filter:blur(18px) saturate(170%)!important;box-shadow:none!important}
html.cv-on .site-header.cv-bar:not(.cv-flying)>.v2-pill-tint{opacity:1!important;background:transparent!important;box-shadow:0 1px 0 var(--cv-line);transition:box-shadow .7s cubic-bezier(.4,0,.2,1)!important}
html.cv-on .site-header.cv-bar>.v2-pill-tint::before,html.cv-on .site-header.cv-bar>.v2-pill-tint::after{content:"";position:absolute;inset:0;transition:opacity .7s cubic-bezier(.4,0,.2,1)}
html.cv-on .site-header.cv-bar>.v2-pill-tint::before{background:rgba(245,244,239,.74);opacity:calc(1 - var(--cv-mix))}
html.cv-on .site-header.cv-bar>.v2-pill-tint::after{background:rgba(17,17,16,.8);opacity:var(--cv-mix)}
html.cv-on .site-header.cv-ramp>.v2-pill-tint::before,html.cv-on .site-header.cv-ramp>.v2-pill-tint::after{transition:none}
@supports not ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){
  html.cv-on .site-header.cv-bar>.v2-pill-tint::before{background:rgba(245,244,239,.96)}
  html.cv-on .site-header.cv-bar>.v2-pill-tint::after{background:rgba(17,17,16,.96)}
}
html.cv-on .site-header.cv-bar,html.cv-on .site-header.cv-bar .brand,html.cv-on .site-header.cv-bar .lang-trigger,html.cv-on .site-header.cv-bar .lang-chev,html.cv-on .site-header.cv-bar .menu-toggle,html.cv-on .site-header.cv-bar>.wrap>.header-actions>.btn-dark,html.cv-on .site-header.cv-bar .primary-nav ul{transition:color .7s cubic-bezier(.4,0,.2,1),background-color .7s cubic-bezier(.4,0,.2,1),border-color .7s cubic-bezier(.4,0,.2,1)}
