/* NEXORA V19 - full-height editorial scroll experience
   First screen fills the viewport. Each following area snaps to its own edge.
   Long sections never clip: min-height, not fixed height. */
:root { --section-vh: 100svh; --topbar-h: 68px; }
html { scroll-behavior: smooth; scroll-padding-top: 0 !important; scroll-snap-type: y mandatory; }
body { overscroll-behavior-y: none; }
main > section { min-height: var(--section-vh) !important; height: auto; scroll-snap-align: start; scroll-margin-top: 0; }
/* Avoid showing part of Project while viewing the first screen. */
main > .hero { height: var(--section-vh) !important; min-height: var(--section-vh) !important; }
/* Header remains accessible when a section fills the viewport. */
.topbar {
  position: fixed !important; inset: 0 0 auto; z-index: 60;
  height: var(--topbar-h);
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
  border-bottom: 1px solid transparent;
}
.topbar.is-scrolled {
  background: rgba(5, 11, 33, .84);
  border-bottom-color: rgba(105, 136, 249, .16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 8px 28px #03061b32;
}
main > .hero .hero-globe-webgl { top: calc(50% - 340px) !important; }
/* Give each section enough interior room for its own composition. */
main > section:not(.hero) { display: flex; align-items: center; padding-top: max(94px, 10vh); padding-bottom: max(72px, 8vh); }
main > section:not(.hero) > .wrap { width: min(var(--max), calc(100% - 110px)); }
main > .about .about-inner { min-height: calc(var(--section-vh) - 166px); }
main > .about .coin-visual { top: 50% !important; right: -3% !important; transform: translateY(-50%) !important; }
main > .swap .swap-inner, main > .staking .staking-inner { min-height: 0; }
/* Step indicators make the section-by-section navigation discoverable. */
.section-rail {
  position: fixed; z-index: 45; top: 50%; right: 18px; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 11px;
}
.section-rail a {
  position: relative; display: block; width: 9px; height: 9px; border-radius: 50%;
  border: 1px solid rgba(170, 190, 255, .62); background: rgba(74, 95, 152, .28);
  box-shadow: 0 0 0 4px #050a2019; transition: all .25s ease;
}
.section-rail a.is-current, .section-rail a:hover {
  background: #a4d9ff; border-color: #ddf2ff;
  box-shadow: 0 0 11px #4d92ffb0, 0 0 0 4px #6e75ff28; transform: scale(1.25);
}
.section-rail a:focus-visible { outline: 2px solid #b9eaff; outline-offset: 4px; }
.section-rail a::before {
  content: attr(data-title); position: absolute; white-space: nowrap;
  top: -9px; right: 20px; font-size: 11px; font-weight: 700;
  padding: 5px 10px; background: #0d1838ee; border: 1px solid #6073ac8a; border-radius: 9px;
  color: #e4ecff; opacity: 0; pointer-events: none; transform: translateX(4px); transition: .2s;
}
.section-rail a:hover::before, .section-rail a:focus-visible::before { opacity: 1; transform: translateX(0); }
.section-scroll-cue {
  position: absolute; z-index: 10; bottom: 31px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: #cfdaff; text-transform: uppercase; letter-spacing: .15em;
  font-size: 10px; font-weight: 700; text-shadow: 0 0 10px #20366a;
}
.section-scroll-cue svg { width: 20px; height: 20px; animation: scrollNudge 2s ease-in-out infinite; }
.section-scroll-cue:hover { color: white; }
@keyframes scrollNudge { 50% { transform: translateY(5px); } }
/* Mobile/tablet: native scroll first. Snap is gentle, no accidental page skipping. */
@media (max-width: 900px) {
  html { scroll-snap-type: y proximity; }
  main > section:not(.hero) > .wrap { width: calc(100% - 64px); }
  main > .hero .hero-globe-webgl { top: 35px !important; }
  .section-rail { display: none; }
  main > .about .coin-visual { top: auto !important; bottom: 0 !important; transform: none !important; right: -7% !important; }
}
@media (max-width: 760px) {
  main > section:not(.hero) { display: block; padding: 75px 0 66px; }
  main > section:not(.hero) > .wrap { width: calc(100% - 36px); }
  main > .about { padding-top: 0 !important; padding-bottom: 0 !important; }
  main > .about .about-inner { min-height: max(100svh, 740px); padding-top: 106px; padding-bottom: 360px; }
  main > .hero .hero-globe-webgl { top: 38px !important; }
  main > .hero .hero-content { padding-bottom: 110px; }
  .section-scroll-cue { bottom: 22px; font-size: 9px; }
}
@media (max-width: 460px) {
  main > .about .about-inner { min-height: max(100svh, 710px); padding-top: 100px; padding-bottom: 300px; }
  main > .hero .hero-globe-webgl { top: 48px !important; }
  main > .hero .hero-content { padding-bottom: 103px; }
}
/* Small landscape screens often have less than 600px usable height. Allow natural scroll. */
@media (max-height: 610px) and (min-width: 901px) {
  html { scroll-snap-type: y proximity; }
  main > .hero { min-height: 600px !important; height: 600px !important; }
  main > .hero .hero-globe-webgl { top: -25px !important; }
}
/* Scrolling forms, opened modals and accessible reduced-motion settings must not lock people into snap positions. */
html.snap-suspended { scroll-snap-type: none !important; }
body.modal-open, body.dapp-modal-open { overscroll-behavior-y: contain; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; scroll-snap-type: y proximity; }
  .section-scroll-cue svg { animation: none !important; }
}

/* V20: 마지막 가입 가이드와 푸터에서는 스크롤 스냅을 해제합니다.
   이전 7개 페이지는 V19의 스냅을 그대로 유지합니다. */
html.snap-footer-free { scroll-snap-type: none !important; }
/* 푸터는 정렬 지점으로 사용하지 않고 문서의 자연스러운 높이를 유지합니다. */
footer.footer { scroll-snap-align: none !important; scroll-snap-stop: normal; }
