/* Abertura animada do Start UNIFADAP (views/partials/abertura.ejs). Duração: cerca de 8 s. */
.abertura { position: fixed; inset: 0; z-index: 1000; background: #060a16; color: #fff; overflow: hidden; display: grid; place-items: center; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; opacity: 1; transition: opacity .7s ease; }
.abertura[hidden] { display: none; }
.abertura.ab-saindo { opacity: 0; pointer-events: none; }
.abertura.ab-telao { cursor: none; }

/* fundo */
.ab-fundo { position: absolute; inset: 0; background: radial-gradient(900px 600px at 50% 60%, #13263b 0%, #0a1020 55%, #060a16 100%); }
.ab-constelacoes { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.ab-ativa .ab-constelacoes { animation: ab-fundo-entra 2.4s ease-out forwards; }
.ab-particula { position: absolute; bottom: -6px; width: 3px; height: 3px; border-radius: 50%; background: #e8c56a; box-shadow: 0 0 8px #e8c56a88; opacity: 0; }
.ab-particula:nth-child(3n) { background: #4cc9ff; box-shadow: 0 0 8px #4cc9ff77; }
.ab-ativa .ab-particula { animation-name: ab-particula; animation-timing-function: linear; animation-iteration-count: infinite; }

/* cena */
.ab-cena { position: relative; display: grid; grid-template-columns: auto auto; align-items: center; gap: clamp(28px, 6vw, 90px); padding: 24px; }
.ab-carta { position: relative; width: clamp(180px, 26vmin, 300px); aspect-ratio: 2 / 3; perspective: 1400px; opacity: 0; }
.ab-ativa .ab-carta { animation: ab-carta-entra 1.7s cubic-bezier(.2, .8, .25, 1) .5s forwards, ab-carta-flutua 5s ease-in-out 2.3s infinite; }
.ab-carta-3d { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.ab-ativa .ab-carta-3d { animation: ab-carta-gira 1.7s cubic-bezier(.3, .7, .2, 1) .5s forwards, ab-carta-vira 1.4s cubic-bezier(.45, .05, .25, 1) 4.9s forwards; }
.ab-face { position: absolute; inset: 0; border-radius: 18px; overflow: hidden; background: #0a1020; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 40px 90px #000c, 0 0 60px #e8c56a22; }
.ab-face::before { content: ''; position: absolute; inset: 0; border-radius: 18px; box-shadow: inset 0 0 0 1px #e8c56a66; z-index: 2; }
.ab-face::after { content: ''; position: absolute; inset: -40%; background: linear-gradient(112deg, transparent 44%, #fff3cf3d 50%, transparent 56%); transform: translateX(-60%); opacity: 0; }
.ab-ativa .ab-face::after { animation: ab-reflexo 1.6s ease-in-out 2.4s forwards; }
.ab-verso { transform: rotateY(180deg); }
.ab-face img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ab-flash { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: #fff2c4; transform: translate(-50%, -50%) scale(0); opacity: 0; filter: blur(2px); pointer-events: none; }
.ab-ativa .ab-flash { animation: ab-flash 1.1s ease-out 2.05s forwards; }
.ab-anel { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #e8c56a; transform: translate(-50%, -50%) scale(0); opacity: 0; pointer-events: none; }
.ab-ativa .ab-anel { animation: ab-anel 1.4s cubic-bezier(.1, .7, .3, 1) 2.1s forwards; }

/* texto */
.ab-texto { display: grid; gap: 14px; max-width: 520px; }
.ab-serie, .ab-titulo, .ab-sub { opacity: 0; }
.ab-serie { font: 700 .72rem/1 'JetBrains Mono', monospace; letter-spacing: .22em; color: #e8c56a; }
.ab-titulo { margin: 0; font: 800 clamp(2.6rem, 7vw, 5.4rem)/.95 'Sora', sans-serif; letter-spacing: -.03em; }
.ab-titulo span { color: #fff; display: inline-block; }
.ab-titulo strong { display: inline-block; font-weight: 800; background: linear-gradient(100deg, #fff1bd, #e8c56a 45%, #b8862b 80%, #ffe6a0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ab-sub { margin: 0; font-size: clamp(1.05rem, 2.2vw, 1.5rem); color: #c6d3e6; line-height: 1.35; }
.ab-sub em { font-style: normal; color: #e8c56a; font-weight: 700; }
.ab-ativa .ab-serie { animation: ab-sobe .7s ease-out 2.6s forwards; }
.ab-ativa .ab-titulo { animation: ab-titulo .9s cubic-bezier(.2, .8, .2, 1) 2.8s forwards; }
.ab-ativa .ab-titulo strong { animation: ab-brilho 2.4s ease-in-out 3.6s infinite; }
.ab-ativa .ab-sub { animation: ab-sobe .8s ease-out 3.7s forwards; }

/* marca e pular */
.ab-marca { position: absolute; left: 50%; bottom: clamp(20px, 5vh, 48px); transform: translateX(-50%); display: flex; align-items: center; gap: 12px; opacity: 0; }
.ab-marca img { height: 40px; width: auto; }
.ab-start { font: 700 .8rem/1 'JetBrains Mono', monospace; letter-spacing: .08em; color: #fff; border: 1px solid #e8c56a; border-radius: 6px; padding: 7px 10px; }
.ab-ativa .ab-marca { animation: ab-sobe .9s ease-out 5.3s forwards; }
.ab-pular { position: absolute; right: 18px; top: 18px; background: #0d172799; color: #b9cedb; border: 1px solid #738ea34a; border-radius: 8px; padding: 9px 14px; font: 600 .82rem/1 inherit; font-family: inherit; cursor: pointer; backdrop-filter: blur(4px); }
.ab-pular:hover { color: #fff0bf; border-color: #e8c56a88; }
.ab-telao .ab-pular { display: none; }

/* celular: carta em cima, texto embaixo */
@media (max-width: 720px), (max-aspect-ratio: 1/1) {
  .ab-cena { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 22px; }
  .ab-carta { width: clamp(150px, 34vmin, 220px); }
  .ab-texto { justify-items: center; }
  .ab-titulo { font-size: clamp(2.3rem, 11vw, 3.4rem); }
}

@keyframes ab-fundo-entra { from { opacity: 0; transform: scale(1.08); } to { opacity: .45; transform: scale(1); } }
@keyframes ab-particula { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .7; } 100% { transform: translateY(-105vh); opacity: 0; } }
@keyframes ab-carta-entra { from { opacity: 0; transform: translateY(40px) scale(.25); } 60% { opacity: 1; } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes ab-carta-gira { from { transform: rotateY(-540deg) rotateZ(-30deg); } to { transform: rotateY(0) rotateZ(-5deg); } }
@keyframes ab-carta-vira { from { transform: rotateY(0) rotateZ(-5deg); } to { transform: rotateY(180deg) rotateZ(5deg); } }
@keyframes ab-carta-flutua { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes ab-reflexo { from { transform: translateX(-60%); opacity: 0; } 30% { opacity: 1; } to { transform: translateX(60%); opacity: 0; } }
@keyframes ab-flash { 0% { transform: translate(-50%, -50%) scale(0); opacity: .9; } 100% { transform: translate(-50%, -50%) scale(140); opacity: 0; } }
@keyframes ab-anel { 0% { transform: translate(-50%, -50%) scale(0); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(90); opacity: 0; border-width: 1px; } }
@keyframes ab-sobe { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ab-titulo { from { opacity: 0; transform: translateX(-30px) skewX(-8deg); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes ab-brilho { 0%, 100% { filter: drop-shadow(0 0 0 #e8c56a00); } 50% { filter: drop-shadow(0 0 14px #e8c56a88); } }

@media (prefers-reduced-motion: reduce) {
  .ab-ativa * { animation-duration: .01s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
}
@media print { .abertura { display: none !important; } }
