html, body { overflow-x: clip; }

.intro-scroll { position: relative; z-index: 1; height: 100vh; }
.intro-scroll-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }

body[style*="overflow: hidden"] .intro-scroll.is-pinned .intro-scroll-stage { position: fixed; left: 0; right: 0; }

.intro-scroll-stage::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: #050608 url("assets/video/ecn-intro-scroll-poster.jpg?v=20261110_4") 50% 50% / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 90%, transparent);
  mask-image: linear-gradient(to bottom, #000 90%, transparent);
}
.intro-scroll:not(.is-live) .intro-scroll-video { opacity: 0 !important; }
.intro-scroll.is-live .intro-scroll-stage::before { opacity: 0; transition: opacity 0.3s ease 0.35s; }

.intro-scroll-video {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: 50% 50%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 90%, transparent);
  mask-image: linear-gradient(to bottom, #000 90%, transparent);
}

html.intro-ui-hidden .navbar {
  background: transparent; border-bottom-color: transparent; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none; pointer-events: none;
}
html.intro-ui-hidden .navbar :is(.nav-links > a, .nav-actions > *, .nav-lang, .burger-btn),
html.intro-ui-hidden .mo-progress { opacity: 0; }
html.intro-ui-hidden :is(.ecn-chat-launcher, .ecn-chat-nudge) { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
html.intro-ui-hidden .navbar:focus-within { pointer-events: auto; }
html.intro-ui-hidden .navbar:focus-within :is(.nav-links > a, .nav-actions > *, .nav-lang, .burger-btn) { opacity: 1; animation: none; }

html.intro-ui-anim .navbar { transition: background-color 0.9s ease, border-color 0.9s ease, box-shadow 0.9s ease, -webkit-backdrop-filter 0.9s ease, backdrop-filter 0.9s ease; }
html.intro-ui-anim:not(.intro-ui-hidden) .navbar :is(.nav-links > a, .nav-actions > *, .nav-lang, .burger-btn) {
  animation: intro-nav-in 0.85s cubic-bezier(0.16, 1, 0.3, 1) calc(var(--ni, 0) * 70ms + 80ms) backwards;
}
html.intro-ui-anim.intro-ui-hidden .navbar :is(.nav-links > a, .nav-actions > *, .nav-lang, .burger-btn) { animation: intro-nav-out 0.3s ease both; }
html.intro-ui-anim:not(.intro-ui-hidden) .ecn-chat-launcher { animation: intro-pop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s backwards; }
html.intro-ui-anim:not(.intro-ui-hidden) .mo-progress { animation: intro-fade 0.8s ease 0.3s backwards; }
.navbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(246, 226, 158, 0.9) 40%, #fff 50%, rgba(246, 226, 158, 0.9) 60%, transparent) no-repeat;
  background-size: 36% 100%; background-position: -60% 0;
}
.navbar.is-revealing::after { animation: intro-gleam 1.5s cubic-bezier(0.45, 0, 0.2, 1) 0.15s both; }

.navbar .brand-logo { position: relative; }
.navbar .brand-logo::before, .navbar .brand-logo::after { content: ''; position: absolute; pointer-events: none; opacity: 0; }
.navbar .brand-logo::before {
  inset: 0; z-index: 1;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 250, 225, 0.95) 50%, transparent 70%) no-repeat;
  background-size: 260% 100%; background-position: 120% 0;
  -webkit-mask: url("assets/images/logo_ecn.png") center / contain no-repeat; mask: url("assets/images/logo_ecn.png") center / contain no-repeat;
}
.navbar .brand-logo::after { inset: -4px; border-radius: 50%; border: 1.5px solid rgba(246, 226, 158, 0.85); box-shadow: 0 0 18px rgba(212, 175, 55, 0.55); }
.navbar .brand-logo.is-landing .brand-logo-img { animation: intro-land 0.9s cubic-bezier(0.2, 1.4, 0.4, 1); }
.navbar .brand-logo.is-landing::before { animation: intro-glint 1s ease 0.12s both; }
.navbar .brand-logo.is-landing::after { animation: intro-ring 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

@keyframes intro-nav-in { from { opacity: 0; transform: translateY(-18px) scale(0.9); filter: blur(8px); } 55% { filter: blur(0); } to { opacity: 1; transform: none; filter: none; } }
@keyframes intro-nav-out { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px); filter: blur(4px); } }
@keyframes intro-pop { from { opacity: 0; transform: translateY(18px) scale(0.4); } }
@keyframes intro-fade { from { opacity: 0; } }
@keyframes intro-gleam { 0% { opacity: 0; background-position: -60% 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; background-position: 160% 0; } }
@keyframes intro-land { 0% { transform: scale(1); } 40% { transform: scale(1.12); filter: drop-shadow(0 0 14px rgba(212, 175, 55, 0.9)); } 100% { transform: scale(1); } }
@keyframes intro-glint { 0% { opacity: 0; background-position: 120% 0; } 25% { opacity: 1; } 100% { opacity: 0; background-position: -20% 0; } }
@keyframes intro-ring { 0% { opacity: 0.9; transform: scale(0.92); } 100% { opacity: 0; transform: scale(2.2); } }

html.intro-logo-away .navbar .brand-logo-img { opacity: 0; }
.intro-logo-fly {
  position: fixed; left: 0; top: 0; z-index: 999;
  width: 100px; height: 100px; max-width: none;
  will-change: transform, opacity;
  opacity: 0; visibility: hidden; pointer-events: none; user-select: none;
}
.intro-logo-fly.is-front { z-index: 1001; }

.intro-scroll-hint {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  transform: translate(-50%, -50%) scale(0.86); opacity: 0; filter: blur(10px); pointer-events: none;
  transition: opacity 0.6s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}
.intro-scroll.is-hint .intro-scroll-hint { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); }
.ish-orb {
  position: relative; display: grid; place-items: center; width: 108px; height: 108px; border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, rgba(246, 226, 158, 0.2), rgba(8, 8, 12, 0.55) 68%);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(246, 226, 158, 0.42);
  box-shadow: 0 0 46px rgba(212, 175, 55, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.ish-orb::before, .ish-orb::after {
  content: ''; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid rgba(246, 226, 158, 0.55);
  animation: ish-pulse 2.4s cubic-bezier(0.2, 0.7, 0.3, 1) infinite;
}
.ish-orb::after { animation-delay: 1.2s; }
.ish-mouse { position: relative; width: 28px; height: 44px; border-radius: 15px; border: 2px solid rgba(246, 226, 158, 0.9); box-shadow: 0 0 16px rgba(212, 175, 55, 0.35); }
.ish-mouse i { position: absolute; left: 50%; top: 8px; width: 4px; height: 9px; margin-left: -2px; border-radius: 3px; background: linear-gradient(#f6e29e, #d4af37); animation: ish-wheel 2s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
.ish-hand { display: none; width: 48px; height: 48px; color: #f6e29e; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45)); animation: ish-swipe 2.2s cubic-bezier(0.45, 0, 0.2, 1) infinite; }
.ish-chevrons { display: flex; flex-direction: column; align-items: center; }
.ish-chevrons i { width: 14px; height: 14px; margin-top: -6px; border-right: 2px solid #f6e29e; border-bottom: 2px solid #f6e29e; transform: rotate(45deg); opacity: 0.2; animation: ish-chev 2s ease-in-out infinite; }
.ish-chevrons i:nth-child(2) { animation-delay: 0.18s; }
.ish-chevrons i:nth-child(3) { animation-delay: 0.36s; }
@media (hover: none), (pointer: coarse) {
  .intro-scroll-hint { flex-direction: column-reverse; }
  .ish-mouse { display: none; }
  .ish-hand { display: block; }
  .ish-chevrons { flex-direction: column-reverse; }
  .ish-chevrons i { transform: rotate(-135deg); margin: -6px 0 0; }
}
@keyframes ish-pulse { 0% { transform: scale(1); opacity: 0.75; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes ish-wheel { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
@keyframes ish-swipe { 0% { transform: translateY(15px); opacity: 0; } 10% { opacity: 1; } 72% { transform: translateY(-15px); opacity: 1; } 86% { transform: translateY(-18px); opacity: 0; } 100% { transform: translateY(15px); opacity: 0; } }
@media (hover: hover) and (pointer: fine) {
  .ish-orb { width: 128px; height: 128px; }
  .ish-mouse { transform: scale(1.15); }
}
@keyframes ish-chev { 0%, 100% { opacity: 0.2; } 45% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .ish-orb::before, .ish-orb::after, .ish-mouse i, .ish-hand, .ish-chevrons i { animation: none; }
}

@media print {
  .intro-scroll, .intro-logo-fly { display: none !important; }
  html.intro-logo-away .navbar .brand-logo-img,
  html.intro-ui-hidden .navbar :is(.nav-links > a, .nav-actions > *, .nav-lang, .burger-btn) { opacity: 1; }
}
