/* ATENA · logo nella barra e splash di avvio */

/* ---------- marchio nella barra ---------- */
img.logo { width: 52px; height: auto; color: inherit; filter: drop-shadow(0 0 8px rgba(40, 120, 255, .45)); }
.brand-name {
  color: #e9f0ff;
  background: linear-gradient(180deg, #ffffff 10%, #9db9ee 95%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---------- splash ----------
   Per la massima fluidità si animano SOLO transform e opacity (composizione su GPU,
   a pieno refresh del monitor). Niente filtri, sfocature o ombre animate. */
.splash {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(900px 600px at 50% 42%, #0d1f45 0%, #071022 45%, #03060d 100%);
  color: #e6edf7; overflow: hidden;
  transition: opacity 1s cubic-bezier(.4, 0, .2, 1), transform 1s cubic-bezier(.4, 0, .2, 1);
  will-change: opacity, transform;
}
.splash.done { opacity: 0; transform: scale(1.08); pointer-events: none; }
.splash * { will-change: transform, opacity; backface-visibility: hidden; }

/* griglia in prospettiva che scorre (si sposta di una cella: ciclo continuo) */
.sp-grid {
  position: absolute; left: -50%; right: -50%; top: -20%; height: 200%;
  background-image:
    linear-gradient(rgba(56, 140, 255, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 140, 255, .08) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(700px) rotateX(60deg) translateY(0);
  animation: sp-grid 2.4s linear infinite;
  -webkit-mask-image: radial-gradient(closest-side at 50% 40%, #000 25%, transparent 80%);
  mask-image: radial-gradient(closest-side at 50% 40%, #000 25%, transparent 80%);
}

.sp-stage { position: relative; width: min(46vmin, 420px); aspect-ratio: 1; display: grid; place-items: center; }
.sp-stage > * { grid-area: 1 / 1; }
.sp-rings { width: 100%; height: 100%; overflow: visible; }
.sp-rings circle, .sp-rings path { fill: none; transform-box: view-box; transform-origin: 50% 50%; }
.sp-r1 { stroke: rgba(56, 140, 255, .6); stroke-width: 2; stroke-dasharray: 60 22 8 22; animation: sp-draw 1.6s cubic-bezier(.2, .8, .2, 1) both, sp-spin 16s linear infinite; }
.sp-r2 { stroke: rgba(160, 185, 230, .4); stroke-width: 1; stroke-dasharray: 2 10; animation: sp-draw 1.8s .2s cubic-bezier(.2, .8, .2, 1) both, sp-spin-rev 24s linear infinite; }
.sp-r3 { stroke: rgba(80, 160, 255, .45); stroke-width: 5; stroke-dasharray: 140 860; stroke-linecap: round; animation: sp-fade .8s .3s both, sp-spin 2.6s linear infinite; }
.sp-tick { stroke: rgba(120, 170, 255, .75); stroke-width: 2; animation: sp-ticks 1.2s .5s cubic-bezier(.2, .8, .2, 1) both; }

/* fascio radar */
.sp-sweep {
  width: 82%; height: 82%; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(56, 140, 255, .34), rgba(56, 140, 255, 0) 75deg, transparent 360deg);
  animation: sp-fade 1.2s both, sp-spin 2.6s linear infinite;
}

/* alone che pulsa dietro il logo (opacità e scala, non filtri) */
.sp-halo {
  width: 70%; height: 70%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(50, 130, 255, .55), rgba(50, 130, 255, .18) 55%, transparent 100%);
  animation: sp-halo-in 1.6s .5s ease-out both, sp-halo 3.2s 2.1s ease-in-out infinite;
}

.sp-emblem {
  width: 78%; height: auto;
  filter: drop-shadow(0 0 22px rgba(40, 120, 255, .5)); /* statico: disegnato una volta sola */
  animation: sp-emblem 1.9s .5s cubic-bezier(.16, 1, .3, 1) both;
}

/* riflesso che attraversa il logo: la maschera è ferma, si muove solo la banda di luce */
.sp-shine {
  width: 78%; aspect-ratio: 640 / 584; overflow: hidden; pointer-events: none;
  -webkit-mask-image: url(img/atena-emblem.png); mask-image: url(img/atena-emblem.png);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
}
.sp-shine::before {
  content: ""; display: block; width: 45%; height: 100%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, .0) 20%, rgba(255, 255, 255, .75) 50%, rgba(170, 210, 255, .35) 60%, transparent 85%);
  transform: translateX(-120%);
  animation: sp-shine 1.9s 2.2s cubic-bezier(.45, 0, .25, 1) both;
}

/* "ping" sul punto luminoso del radar nel logo */
.sp-ping {
  position: relative; left: 20.5%; top: -23%; width: 10px; height: 10px; border-radius: 50%;
  background: #8fd6ff; box-shadow: 0 0 12px 4px rgba(80, 180, 255, .9);
  animation: sp-ping 1.8s 2.4s ease-out infinite both;
}

.sp-title { display: flex; gap: .55em; margin-top: 2.4vmin; font: 800 clamp(34px, 6vmin, 64px)/1 "Segoe UI", system-ui, sans-serif; letter-spacing: .02em; }
.sp-title span {
  display: inline-block;
  background: linear-gradient(180deg, #ffffff 15%, #8fb1f0 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: sp-letter 1.1s cubic-bezier(.16, 1, .3, 1) both;
}
.sp-title span:nth-child(1) { animation-delay: 1.5s; }
.sp-title span:nth-child(2) { animation-delay: 1.65s; }
.sp-title span:nth-child(3) { animation-delay: 1.8s; }
.sp-title span:nth-child(4) { animation-delay: 1.95s; }
.sp-title span:nth-child(5) { animation-delay: 2.1s; }

.sp-rule { display: flex; align-items: center; gap: 8px; width: min(52vmin, 460px); margin: 1.8vmin 0 1.1vmin; }
.sp-rule i { flex: 1; height: 2px; background: linear-gradient(90deg, transparent, #2f7bff); transform-origin: right center; animation: sp-rule 1.2s 2.4s cubic-bezier(.16, 1, .3, 1) both; }
.sp-rule i:last-child { background: linear-gradient(90deg, #2f7bff, transparent); transform-origin: left center; }
.sp-rule b { width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 11px solid #2f7bff; filter: drop-shadow(0 0 6px #2f7bff); animation: sp-drop .7s 2.7s cubic-bezier(.16, 1, .3, 1) both; }
.sp-sub { font: 600 13px/1 "Segoe UI", system-ui, sans-serif; letter-spacing: .5em; text-transform: uppercase; color: #8da2c8; padding-left: .5em; animation: sp-rise .9s 2.9s cubic-bezier(.16, 1, .3, 1) both; }

/* barra di avanzamento: si riempie con scaleX (fluido) */
.sp-bar { width: min(36vmin, 320px); height: 3px; margin-top: 4vmin; background: rgba(120, 160, 230, .15); border-radius: 3px; overflow: hidden; animation: sp-fade .6s .6s both; }
.sp-bar span {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, #1d5fd6, #59b8ff); box-shadow: 0 0 10px #3d8bff;
  transform-origin: left center; transform: scaleX(0); transition: transform .9s cubic-bezier(.4, 0, .2, 1);
}
.sp-status { margin-top: 12px; font: 12px/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .12em; color: #6f86b0; text-transform: uppercase; min-height: 1.2em; animation: sp-fade .6s .7s both; transition: opacity .25s; }
.sp-status.swap { opacity: 0; }

@keyframes sp-spin { to { transform: rotate(360deg); } }
@keyframes sp-spin-rev { to { transform: rotate(-360deg); } }
@keyframes sp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sp-draw { from { opacity: 0; transform: scale(.78) rotate(-60deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes sp-ticks { from { opacity: 0; transform: scale(1.25); } to { opacity: 1; transform: scale(1); } }
@keyframes sp-emblem { from { opacity: 0; transform: scale(.72) translateY(18px); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes sp-halo-in { from { opacity: 0; transform: scale(.5); } to { opacity: .8; transform: scale(1); } }
@keyframes sp-halo { 0%, 100% { opacity: .8; transform: scale(1); } 50% { opacity: 1; transform: scale(1.12); } }
@keyframes sp-shine { from { transform: translateX(-120%); } to { transform: translateX(260%); } }
@keyframes sp-ping { 0% { transform: scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: scale(3.4); opacity: 0; } }
@keyframes sp-letter { from { opacity: 0; transform: translateY(26px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes sp-rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sp-drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes sp-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sp-grid { from { transform: perspective(700px) rotateX(60deg) translateY(0); } to { transform: perspective(700px) rotateX(60deg) translateY(48px); } }

@media (prefers-reduced-motion: reduce) {
  .splash *, .splash *::before { animation-duration: .01s !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; }
  .sp-ping, .sp-sweep, .sp-r3 { display: none; }
}
