/* EternityArc animated logo (Components/Common/EternityArcLogo.razor) — intro once, then idle loop.
   Fonts are self-hosted latin subsets (lib/fonts); the wordmark is ASCII only. */
/* OFL-1.1: this subset of Russo One may count as a Modified Version, which may not use the Reserved Font Name "Russo"; so it is presented under its own family name. */
@font-face { font-family: 'EA Wordmark'; font-style: normal; font-weight: 400; font-display: swap; src: url(lib/fonts/russo-one-latin.woff2) format('woff2'); }
@font-face { font-family: 'Exo 2'; font-style: normal; font-weight: 500 600; font-display: swap; src: url(lib/fonts/exo2-latin.woff2) format('woff2'); }

.ea-logo { --ea-size: 56px; --ea-dist: 48px; display: inline-flex; align-items: center; gap: 16px; text-decoration: none; }

/* ---- Icon stack ---- */
.ea-logo-icon { position: relative; width: var(--ea-size); height: var(--ea-size); flex-shrink: 0; }
.ea-logo-mark {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(1px 1px 3px rgba(0,0,0,.25));
  animation: eaMarkIn 1s cubic-bezier(.22,1,.36,1) .4s both,
             eaGlow 3s ease-in-out 1.4s infinite;
}
.ea-logo-spin { position: absolute; inset: 0; animation: eaSpin 6s linear infinite; }
.ea-logo-arc {
  position: absolute; inset: calc(var(--ea-size) * -.16); border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 55%, rgba(111,192,244,.15) 62%, #6fc0f4 88%, #ffffff 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
  animation: eaArcIn 1.1s cubic-bezier(.3,.7,.3,1) .6s both,
             eaSpin 3.5s linear 1.7s infinite;
}
.ea-logo-particles { position: absolute; inset: 0; pointer-events: none; }
.ea-logo-particles i {
  position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%;
  background: #6fc0f4; box-shadow: 0 0 6px 1px rgba(111,192,244,.9);
  opacity: 0; animation: eaParticle .75s cubic-bezier(.55,0,.75,.4) both;
  animation-delay: calc(var(--p) * 35ms);
}
.ea-logo-particles i:nth-child(1) { --a: 0deg;   --p: 0; }
.ea-logo-particles i:nth-child(2) { --a: 45deg;  --p: 3; }
.ea-logo-particles i:nth-child(3) { --a: 90deg;  --p: 1; }
.ea-logo-particles i:nth-child(4) { --a: 135deg; --p: 5; }
.ea-logo-particles i:nth-child(5) { --a: 180deg; --p: 2; }
.ea-logo-particles i:nth-child(6) { --a: 225deg; --p: 6; }
.ea-logo-particles i:nth-child(7) { --a: 270deg; --p: 4; }
.ea-logo-particles i:nth-child(8) { --a: 315deg; --p: 7; }

/* ---- Text ---- */
.ea-logo-text { display: flex; flex-direction: column; gap: 7px; min-width: 0; animation: eaSlideOut .9s cubic-bezier(.22,1,.36,1) .9s both; }
.ea-logo-word {
  font: 400 30px/1.05 'EA Wordmark', sans-serif; letter-spacing: .02em; white-space: nowrap;
  filter: drop-shadow(0 1px 1.5px rgba(15,53,168,.35));
}
.ea-logo-word > span {
  display: inline-block; min-width: .28em;
  background-image:
    linear-gradient(110deg, transparent 35%, rgba(255,255,255,.9) 50%, transparent 65%),
    linear-gradient(180deg,#6fc0f4 0%,#3a8ae8 35%,#1e56d6 65%,#0f35a8 100%);
  background-size: 300% 100%, 100% 100%; background-repeat: no-repeat; background-position: 150% 0, 0 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: eaLetterIn .55s cubic-bezier(.22,1,.36,1) both,
             eaShine 6s ease-in-out infinite;
  animation-delay: calc(1s + var(--i) * 50ms), calc(2.6s + var(--i) * 60ms);
}
.ea-logo-tag {
  font: 600 11px/1 'Exo 2', sans-serif; letter-spacing: .34em; text-transform: uppercase; white-space: nowrap; color: #1e56d6;
  animation: eaTagIn .9s cubic-bezier(.22,1,.36,1) 1.8s both;
}
.ea-logo:hover .ea-logo-arc { animation-duration: 1.1s, 1.2s; }

/* ---- Dark backgrounds ---- */
.ea-logo--dark .ea-logo-mark { filter: drop-shadow(0 2px 8px rgba(90,180,255,.5)); }
.ea-logo--dark .ea-logo-word { filter: drop-shadow(0 0 .6px rgba(255,255,255,.95)) drop-shadow(0 0 1px rgba(205,238,255,.8)) drop-shadow(0 0 10px rgba(111,192,244,.55)); }
.ea-logo--dark .ea-logo-tag { color: #a8dcf5; }

/* ---- Compact (app header) ---- */
.ea-logo--sm { --ea-size: 36px; --ea-dist: 32px; gap: 13px; }
.ea-logo--sm .ea-logo-arc { -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px)); }
.ea-logo--sm .ea-logo-particles i { width: 4px; height: 4px; margin: -2px; }
.ea-logo--sm .ea-logo-text { gap: 3px; }
.ea-logo--sm .ea-logo-word { font-size: 25px; }
.ea-logo--sm .ea-logo-tag { font-size: 9px; letter-spacing: .32em; }

/* ---- Keyframes ---- */
@keyframes eaParticle {
  0%   { opacity: 0; transform: rotate(var(--a)) translateX(var(--ea-dist)) scale(1.2); }
  25%  { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateX(0) scale(.2); }
}
@keyframes eaMarkIn { from { opacity: 0; transform: scale(.3) rotate(-270deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes eaSpin { to { transform: rotate(360deg); } }
@keyframes eaGlow {
  0%, 100% { filter: drop-shadow(1px 1px 3px rgba(0,0,0,.25)) drop-shadow(0 0 0 rgba(90,180,255,0)); }
  50%      { filter: drop-shadow(1px 1px 3px rgba(0,0,0,.25)) drop-shadow(0 0 10px rgba(90,180,255,.75)); }
}
@keyframes eaArcIn { from { opacity: 0; transform: rotate(-540deg) scale(.7); } to { opacity: 1; transform: rotate(0) scale(1); } }
@keyframes eaSlideOut { from { opacity: 0; transform: translateX(-28px); clip-path: inset(0 100% 0 0); } to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); } }
@keyframes eaLetterIn { from { opacity: 0; transform: translateY(-14px) scale(1.4); filter: blur(4px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes eaShine { 0% { background-position: 150% 0, 0 0; } 22%, 100% { background-position: -50% 0, 0 0; } }
@keyframes eaTagIn { from { opacity: 0; transform: translateY(5px); letter-spacing: .7em; } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .ea-logo *, .ea-logo-word > span { animation: none !important; }
  .ea-logo-particles { display: none; }
}

/* ---- Navigation rail (264px wide, toggle beside it) ---- */
.ea-logo--rail { --ea-size: 30px; --ea-dist: 26px; gap: 10px; min-width: 0; }
.ea-logo--rail .ea-logo-arc { -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px)); }
.ea-logo--rail .ea-logo-particles i { width: 3px; height: 3px; margin: -1.5px; }
.ea-logo--rail .ea-logo-text { gap: 3px; }
.ea-logo--rail .ea-logo-word { font-size: 18px; }
.ea-logo--rail .ea-logo-tag { font-size: 7.5px; letter-spacing: .3em; }
.dark-theme .ea-logo--rail .ea-logo-tag { color: #a8dcf5; }
.dark-theme .ea-logo--rail .ea-logo-word { filter: drop-shadow(0 0 1px rgba(205,238,255,.8)) drop-shadow(0 0 8px rgba(111,192,244,.45)); }
