/* Abertura da Sonhare (landing e bio): o selo da marca nasce, a fresta de luz acende e as portas do guarda-roupa abrem.
   Só CSS/SVG. Tempo: 0–1,6 s marca e luz; 1,65 s o abertura.js abre as portas; ~2,6 s some. Tocar ou teclar pula. */
.abertura{--az1:#0d2a78;--az2:#061543;--az3:#030a24;--ouro:#f5b800;--ouro2:#ffd970;position:fixed;inset:0;z-index:100;pointer-events:none;perspective:1700px;display:none;overflow:hidden}
.js .abertura{display:block}
.abertura.fim{display:none}

/* portas: azul com veio leve, moldura, almofada e sombra que escurece ao girar */
.ab-porta{position:absolute;top:0;bottom:0;width:50.4%;background:
  repeating-linear-gradient(90deg,rgba(255,255,255,.018) 0 1px,transparent 1px 6px),
  radial-gradient(120% 70% at 50% 35%,rgba(77,134,255,.22),transparent 70%),
  linear-gradient(165deg,var(--az1),var(--az2) 58%,var(--az3));
  box-shadow:inset 0 0 0 10px rgba(3,10,36,.55),inset 0 0 0 11px rgba(255,255,255,.07);
  transition:transform .9s cubic-bezier(.62,.02,.22,1.04)}
.ab-porta::before{content:"";position:absolute;inset:7% 11%;border-radius:6px;border:1px solid rgba(255,255,255,.07);box-shadow:inset 0 0 40px rgba(0,0,0,.25)}
.ab-porta::after{content:"";position:absolute;inset:0;background:#000;opacity:0;transition:opacity .9s ease}
.ab-porta.esq{left:0;transform-origin:left center}
.ab-porta.dir{right:0;transform-origin:right center}
.ab-puxa{position:absolute;top:calc(50% + 92px);width:7px;height:112px;border-radius:7px;overflow:hidden;background:linear-gradient(var(--ouro2),var(--ouro) 50%,#a87800);box-shadow:0 0 16px rgba(245,184,0,.45)}
.esq .ab-puxa{right:24px}.dir .ab-puxa{left:24px}
.ab-puxa::after{content:"";position:absolute;left:0;right:0;height:40%;top:-45%;background:linear-gradient(transparent,rgba(255,255,255,.95),transparent);animation:ab-reflexo .7s 1.15s ease-in-out forwards}

/* fresta de luz entre as portas */
.ab-fresta{position:absolute;left:50%;top:0;bottom:0;width:2px;margin-left:-1px;background:linear-gradient(var(--ouro) ,var(--ouro2) 25%,#fff 50%,var(--ouro2) 75%,var(--ouro));box-shadow:0 0 22px 6px rgba(245,184,0,.45);transform:scaleY(0);opacity:0;animation:ab-fresta .55s 1s cubic-bezier(.3,0,.2,1) forwards;transition:opacity .25s}

/* selo da marca: contorno se desenha, azul enche, nome é escrito */
.ab-selo{position:absolute;left:50%;top:50%;width:min(250px,62vw);transform:translate(-50%,-62%);overflow:visible;transition:opacity .3s,transform .45s cubic-bezier(.3,0,.2,1)}
.ab-fundo{opacity:0;transform-box:fill-box;transform-origin:center;animation:ab-logo .6s .5s cubic-bezier(.22,1,.36,1) forwards}
@keyframes ab-logo{from{opacity:0;transform:scale(.82) rotate(-8deg)}to{opacity:1;transform:none}}
.ab-borda{fill:none;stroke:#fff;stroke-width:5;stroke-dasharray:1;stroke-dashoffset:1;animation:ab-desenha .75s .08s cubic-bezier(.5,0,.2,1) forwards}
.ab-nome{font-family:"Great Vibes",cursive;font-size:64px;fill:transparent;stroke:#fff;stroke-width:.8;stroke-dasharray:480;stroke-dashoffset:480;animation:ab-escreve .75s .6s ease-out forwards,ab-enche .3s 1.2s forwards}
.ab-sub{font:italic 700 11px Jakarta,system-ui,sans-serif;fill:#fff;opacity:0;animation:ab-entra .35s 1s ease-out forwards}
.ab-lema{font:italic 600 11px Jakarta,system-ui,sans-serif;fill:#dfe8ff;opacity:0;animation:ab-aparece .35s 1.15s forwards}

@keyframes ab-desenha{to{stroke-dashoffset:0}}
@keyframes ab-escreve{to{stroke-dashoffset:0}}
@keyframes ab-enche{to{fill:#fff}}
@keyframes ab-aparece{to{opacity:1}}
@keyframes ab-entra{from{opacity:0;transform:translateX(14px)}to{opacity:1;transform:none}}
@keyframes ab-fresta{to{transform:none;opacity:1}}
@keyframes ab-reflexo{to{top:105%}}

/* abrindo: o selo sobe e some, a luz apaga, as portas giram com sombra */
.abertura.abre .ab-selo{opacity:0;transform:translate(-50%,-70%) scale(1.06)}
.abertura.abre .ab-fresta{animation:none;opacity:0}  /* a luz é da fresta: portas abriram, ela some junto (animation:none, senão o "forwards" a mantém acesa) */
.abertura.abre .esq{transform:rotateY(-104deg)}
.abertura.abre .dir{transform:rotateY(104deg)}
.abertura.abre .ab-porta::after{opacity:.55}

/* o site chega com um zoom curto, como quem entra na loja */
.chegando main{animation:ab-chega .95s cubic-bezier(.2,0,.2,1)}
@keyframes ab-chega{from{transform:scale(1.04)}}

@media (prefers-reduced-motion:reduce){.abertura{display:none!important}.chegando main{animation:none}}

/* o desenho do selo só começa quando a página já está na tela (a landing pinta mais tarde que a bio e o selo passava sem ser visto) */
.abertura:not(.vai) *,.abertura:not(.vai) *::after{animation-play-state:paused!important}
