/* ============================================================
   NOVARA — token system
   ============================================================ */
:root{
  --bg:            #06030F;
  --bg-alt:        #0B0620;
  --violet:        #7B2FF7;
  --violet-soft:   #9B6BFF;
  --magenta:       #C026D3;
  --blue:          #3B82F6;
  --text:          #F8F7FC;
  --text-secondary:#B7AFD9;
  --text-muted:    #756E96;
  --glass-bg:      rgba(255,255,255,0.045);
  --glass-border:  rgba(255,255,255,0.09);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --header-h: 64px;
  --bottom-h: 76px;
  --side-pad: 20px;
}

@media (min-width:390px){ :root{ --side-pad: 22px; } }
@media (min-width:430px){ :root{ --side-pad: 26px; } }

*,*::before,*::after{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }

html{
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}

body{
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

a{ color:inherit; text-decoration:none; }
button{ font-family: inherit; border:none; background:none; color:inherit; cursor:pointer; }
ul{ list-style:none; margin:0; padding:0; }
svg{ display:block; }

::selection{ background: var(--violet); color:#fff; }

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============================================================
   Background — ambient plasma
   ============================================================ */
.bg{
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg);
}

.bg__glow{
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
}

.bg__glow--violet{
  width: 130vw;
  height: 60vh;
  top: -10vh;
  left: -25vw;
  background: radial-gradient(closest-side, rgba(123,47,247,0.55), rgba(123,47,247,0) 70%);
  animation: drift1 22s ease-in-out infinite;
}

.bg__glow--magenta{
  width: 110vw;
  height: 55vh;
  top: 6vh;
  right: -30vw;
  background: radial-gradient(closest-side, rgba(192,38,212,0.42), rgba(192,38,212,0) 70%);
  animation: drift2 26s ease-in-out infinite;
}

@keyframes drift1{
  0%,100%{ transform: translate(0,0) scale(1); }
  50%{ transform: translate(3%, 4%) scale(1.06); }
}
@keyframes drift2{
  0%,100%{ transform: translate(0,0) scale(1); }
  50%{ transform: translate(-4%, -3%) scale(1.08); }
}

.bg__grain{
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
  opacity: 0.4;
}

/* ============================================================
   Page shell
   ============================================================ */
.page{
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--bottom-h);
}

/* ============================================================
   Header
   ============================================================ */
.header{
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--side-pad);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(6,3,15,0.65), rgba(6,3,15,0));
}

.brand{
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand__mark{ width: 64px; height: 64px; flex-shrink: 0; object-fit: contain; display:block; }

.brand__name{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.01em;
  color: var(--text);
}

.menu-btn{
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 10px;
}
.menu-btn:focus-visible{ outline: 2px solid var(--blue); outline-offset: 2px; }

.menu-btn span{
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* ============================================================
   Full-screen mobile menu
   ============================================================ */
.mobile-menu{
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(6,3,15,0.88);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.32s ease, transform 0.32s ease, visibility 0.32s;
}

.mobile-menu[data-open="true"]{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-close{
  position: absolute;
  top: 16px;
  right: var(--side-pad);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  border-radius: 10px;
}
.menu-close:focus-visible{ outline: 2px solid var(--blue); outline-offset: 2px; }

.mobile-menu__list{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

.mobile-menu__link{
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(10px);
  transition: color 0.2s ease;
}

.mobile-menu[data-open="true"] .mobile-menu__link{
  animation: linkIn 0.5s ease forwards;
  animation-delay: calc(0.08s * var(--i) + 0.08s);
}

@keyframes linkIn{
  to{ opacity: 1; transform: translateY(0); }
}

.mobile-menu__link:hover,
.mobile-menu__link:focus-visible{ color: var(--text); }

.mobile-menu__link--accent{
  color: #fff;
  padding: 12px 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--violet), var(--magenta));
  font-size: 16px;
}

/* ============================================================
   Hero
   ============================================================ */
.hero{
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px var(--side-pad) 8px;
  text-align: center;
}

.orb-stage{
  width: min(88vw, 380px);
  aspect-ratio: 1 / 1;
  margin: 6px auto 4px;
  position: relative;
}

#sphereCanvas{
  width: 100%;
  height: 100%;
  display: block;
}

.hero__content{
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 6px;
}

.eyebrow{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--violet-soft);
  margin: 0 0 14px;
  text-transform: uppercase;
}

.headline{
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.08;
}

.headline__lead{
  display: block;
  font-size: clamp(17px, 5vw, 21px);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.headline__big{
  display: block;
  font-size: clamp(48px, 15vw, 76px);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, #cdbdfb 65%, var(--blue) 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub{
  max-width: 340px;
  margin: 18px 0 28px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* CTA */
.cta{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 17px 34px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--violet) 0%, var(--magenta) 100%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 8px 30px -6px rgba(123,47,247,0.55),
    0 0 40px -10px rgba(192,38,212,0.5);
  min-height: 52px;
  min-width: 220px;
  transition: transform 0.15s ease, box-shadow 0.25s ease, filter 0.2s ease;
}

.cta:hover{
  filter: brightness(1.08);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08) inset,
    0 10px 36px -6px rgba(123,47,247,0.65),
    0 0 52px -8px rgba(192,38,212,0.6);
}

.cta:active{
  transform: scale(0.96);
}

.cta:focus-visible{
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* ============================================================
   Bottom navigation
   ============================================================ */
.bottom-nav{
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: var(--bottom-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: rgba(10, 6, 24, 0.72);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--glass-border);
}

.bottom-nav__item{
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  flex: 1;
  text-align: center;
  padding: 6px 2px;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.bottom-nav__item:hover,
.bottom-nav__item:focus-visible{ color: var(--text-secondary); }

.bottom-nav__item--btn{
  font-family: inherit;
}

.bottom-nav__center{
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(123,47,247,0.35), rgba(59,130,246,0.35));
  border: 1px solid var(--glass-border);
  margin: 0 4px;
  box-shadow: 0 0 24px -4px rgba(123,47,247,0.6);
}

.bottom-nav__center img{
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}

/* ============================================================
   Toast
   ============================================================ */
.toast{
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottom-h) + 14px);
  transform: translate(-50%, 12px);
  z-index: 60;
  background: rgba(18, 12, 34, 0.92);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  padding: 13px 20px;
  border-radius: 14px;
  box-shadow: 0 10px 30px -8px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
  max-width: min(86vw, 320px);
  text-align: center;
}

.toast[data-show="true"]{
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============================================================
   Responsive tuning
   ============================================================ */
@media (max-width: 340px){
  .hero__sub{ font-size: 14px; }
  .cta{ min-width: 0; width: 100%; max-width: 260px; padding: 15px 20px; }
  .bottom-nav__item{ font-size: 9.5px; }
}

@media (min-width: 430px){
  .orb-stage{ width: min(78vw, 400px); }
}

@media (min-width: 600px){
  .page{ max-width: 480px; margin: 0 auto; }
  .bottom-nav{ max-width: 480px; left: 50%; transform: translateX(-50%); }
}
