:root {
  --bg: #050816;
  --bg-soft: rgba(12, 18, 38, 0.72);
  --panel: rgba(10, 16, 32, 0.76);
  --panel-border: rgba(83, 124, 255, 0.25);
  --text: #eef4ff;
  --muted: rgba(206, 219, 255, 0.72);
  --accent: #4a8dff;
  --accent-2: #9b7bff;
  --glow: rgba(72, 126, 255, 0.32);
}

body.light-mode {
  --bg: #eff5ff;
  --bg-soft: rgba(255, 255, 255, 0.76);
  --panel: rgba(255, 255, 255, 0.82);
  --panel-border: rgba(70, 95, 170, 0.15);
  --text: #101522;
  --muted: rgba(40, 51, 77, 0.72);
  --glow: rgba(80, 110, 255, 0.16);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at top, #101b39 0, #050816 42%, #02030a 100%);
  background-color: var(--bg);
  color: var(--text);
  font-family: "Inter", "Noto Sans SC", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .18;
  pointer-events: none;
}

body.light-mode::before {
  opacity: .08;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  padding: 24px clamp(16px, 3vw, 40px) 40px;
}

#particle-canvas,
.bg-grid,
.bg-orbit {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#particle-canvas { z-index: 0; }
.bg-grid {
  z-index: 1;
  background: linear-gradient(to bottom, rgba(5,8,22,.2), rgba(5,8,22,.9)),
    radial-gradient(circle at center, transparent 10%, rgba(0,0,0,.3) 100%);
  mask-image: linear-gradient(to bottom, transparent 0, black 10%, black 90%, transparent 100%);
}
.bg-orbit {
  z-index: 0;
  filter: blur(30px);
  opacity: .45;
}
.bg-orbit-1 {
  background: radial-gradient(circle at 35% 40%, rgba(76, 145, 255, .32), transparent 35%),
    radial-gradient(circle at 75% 30%, rgba(164, 112, 255, .22), transparent 28%);
}
.bg-orbit-2 {
  background: radial-gradient(circle at 50% 80%, rgba(44, 111, 255, .16), transparent 34%);
}

.topbar, main { position: relative; z-index: 2; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 6px 2px 24px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(145deg, #1a3fff, #8ab6ff);
  display: grid; place-items: center; font-weight: 800; box-shadow: 0 0 24px var(--glow);
}
.brand-mark-custom {
  background: transparent;
  border: 1px dashed rgba(132, 167, 255, 0.35);
  box-shadow: none;
  overflow: hidden;
}
.brand-mark-custom img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.brand-name { font-weight: 800; letter-spacing: .4px; }
.brand-sub { font-size: 12px; color: var(--muted); }
.nav { display: flex; gap: 30px; }
.nav-link {
  color: rgba(230,240,255,.72); text-decoration: none; font-weight: 500; position: relative;
}
.nav-link.active::after, .nav-link:hover::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 2px;
  background: linear-gradient(90deg, transparent, #6fa8ff, transparent);
}
.topbar-actions { display: flex; gap: 12px; align-items: center; }
.icon-btn, .cta-btn {
  border: 1px solid rgba(132, 167, 255, .25); color: var(--text);
  background: rgba(10, 16, 32, .55); backdrop-filter: blur(12px);
  border-radius: 14px; padding: 12px 16px; cursor: pointer;
}
.cta-btn-primary { background: linear-gradient(135deg, #2c84ff, #6f6eff); box-shadow: 0 10px 30px rgba(44,132,255,.28); }
.cta-btn-secondary, .cta-btn-ghost { background: rgba(10,16,32,.35); }
.cta-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  filter: grayscale(.2);
  box-shadow: none;
}
.icon-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  filter: grayscale(.2);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  margin-top: 8px;
  padding: 20px 0 34px;
}
.hero-copy {
  position: relative;
  z-index: 3;
  max-width: min(620px, 48vw);
  padding-right: clamp(16px, 4vw, 56px);
}
.hero-copy h1 {
  margin: 12px 0 10px; font-size: clamp(46px, 7vw, 88px); line-height: .95; letter-spacing: -2px;
}
.eyebrow, .token-line, .hero-note { color: var(--muted); }
.eyebrow {
  display: inline-flex; padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(120,160,255,.25); background: rgba(10,16,32,.45);
  font-size: 13px;
}
.hero-lead { font-size: clamp(20px, 2.5vw, 30px); margin: 0 0 12px; color: #d9e7ff; }
.hero-desc { max-width: 620px; line-height: 1.8; color: rgba(220,230,255,.76); }
.token-line { display: flex; align-items: center; gap: 10px; margin: 28px 0 18px; }
.spark { width: 10px; height: 10px; border-radius: 50%; background: #7fc6ff; box-shadow: 0 0 18px #7fc6ff; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 13px; }

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero-image-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 28px;
  overflow: hidden;
  border: none;
  box-shadow: none;
  background: rgba(6, 10, 22, 0.35);
}
.hero-image-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5,8,22,.92) 0%, rgba(5,8,22,.78) 22%, rgba(5,8,22,.18) 58%, rgba(5,8,22,.06) 100%),
    linear-gradient(180deg, rgba(255,255,255,.05), transparent 24%, rgba(8,10,20,.24));
  pointer-events: none;
  z-index: 1;
}
.hero-image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 76% 28%, transparent 0 16%, rgba(5,8,22,.02) 34%, rgba(5,8,22,.18) 58%, rgba(5,8,22,.56) 100%);
  z-index: 1;
}
.hero-image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.status-card {
  position: absolute;
  right: clamp(14px, 2.8vw, 40px);
  top: clamp(20px, 4vw, 40px);
  width: clamp(240px, 24vw, 320px);
  max-width: calc(100% - clamp(28px, 5vw, 80px));
  padding: 18px; border-radius: 22px; background: var(--panel);
  border: 1px solid var(--panel-border); box-shadow: 0 0 0 1px rgba(120,160,255,.08) inset, 0 20px 60px rgba(0,0,0,.4);
  backdrop-filter: blur(18px);
}
.status-head, .latency-panel, .status-list li { display: flex; align-items: center; justify-content: space-between; }
.status-head { margin-bottom: 12px; }
.status-pill { color: #71d28d; font-size: 12px; }
.status-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.status-list li {
  padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05); font-size: 14px;
}
.status-list strong { color: #80e39a; font-weight: 600; }
.latency-panel {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); gap: 10px;
}
.latency-panel span { display: block; color: var(--muted); font-size: 12px; }
.latency-panel strong { font-size: 16px; }
.latency-graph {
  flex: 1; height: 46px; border-radius: 10px;
  background: linear-gradient(90deg, transparent, rgba(98,150,255,.8), transparent),
    radial-gradient(circle at 20% 55%, rgba(109,163,255,.9) 0 2px, transparent 3px),
    radial-gradient(circle at 55% 40%, rgba(109,163,255,.9) 0 2px, transparent 3px),
    radial-gradient(circle at 80% 60%, rgba(109,163,255,.9) 0 2px, transparent 3px);
  opacity: .75;
}

.feature-grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px;
  margin-top: 8px;
}
.feature-card {
  grid-column: span 3; min-height: 164px; padding: 18px;
  background: var(--bg-soft); border: 1px solid rgba(108,146,255,.18);
  border-radius: 20px; box-shadow: 0 15px 40px rgba(0,0,0,.22);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.feature-card:hover { transform: translateY(-3px); border-color: rgba(128,175,255,.38); box-shadow: 0 20px 50px rgba(0,0,0,.28); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 12px;
  background: rgba(74,141,255,.14); box-shadow: inset 0 0 0 1px rgba(122,165,255,.2);
}
.feature-card h3 { margin: 0 0 8px; font-size: 18px; }
.feature-card p { margin: 0 0 14px; color: var(--muted); line-height: 1.7; font-size: 14px; }
.feature-card span { font-size: 12px; color: #95b8ff; }
.feature-card-wide { grid-column: span 12; text-align: center; display: grid; place-items: center; }
.feature-card-wide .feature-icon { margin-inline: auto; }

.architecture-panel {
  margin-top: 20px; padding: 24px; border-radius: 24px;
  border: 1px solid rgba(118,157,255,.18); background: rgba(8,14,28,.64);
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}

.glass-card {
  backdrop-filter: blur(18px);
}
.architecture-panel h2 { margin: 10px 0; font-size: clamp(28px, 3vw, 42px); }
.architecture-list {
  display: grid; gap: 12px;
}
.architecture-list div {
  display: flex; justify-content: space-between; gap: 18px; padding: 14px 16px;
  border-radius: 18px; background: linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid rgba(122,165,255,.12); box-shadow: 0 12px 30px rgba(0,0,0,.12);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.architecture-list div:hover {
  transform: translateY(-2px);
  border-color: rgba(128,175,255,.3);
  background: rgba(255,255,255,.06);
}
.architecture-list strong { min-width: 140px; }
.architecture-list strong a {
  color: #cfe1ff;
  text-decoration: none;
  font-weight: 700;
}
.architecture-list span a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #9fc0ff;
  text-decoration: none;
  background: rgba(74,141,255,.10);
  border: 1px solid rgba(122,165,255,.16);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.architecture-list span a::after {
  content: '↗';
  font-size: 12px;
  opacity: .9;
}
.architecture-list span a:hover {
  transform: translateY(-1px);
  background: rgba(74,141,255,.18);
  border-color: rgba(122,165,255,.3);
}
.architecture-list span { text-align: right; }

@media (max-width: 980px) {
  .hero-copy { max-width: 100%; }
  .hero-visual { min-height: 620px; }
  .hero-image-frame { width: 100%; border-radius: 24px; }
  .status-card {
    width: min(320px, calc(100vw - 32px));
    right: 16px;
    top: 16px;
  }
}
.architecture-panel p { color: var(--muted); line-height: 1.8; }
.architecture-list { display: grid; gap: 12px; }


.floating { animation: float 7s ease-in-out infinite; }
.floating-delay { animation-delay: -2s; }

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}
@keyframes pulseGlow {
  0%, 100% { filter: drop-shadow(0 18px 40px rgba(0,0,0,.45)) saturate(1); }
  50% { filter: drop-shadow(0 20px 50px rgba(86,146,255,.25)) saturate(1.08); }
}

@media (max-width: 1180px) {
  .hero, .architecture-panel { grid-template-columns: 1fr; }
  .hero-copy { max-width: 100%; }
  .hero-visual { min-height: 560px; }
  .feature-card { grid-column: span 4; }
}

@media (max-width: 780px) {
  .page-shell {
    padding: 16px 14px 24px;
  }
  .topbar {
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 16px;
  }
  .brand {
    gap: 10px;
  }
  .brand-name {
    font-size: 14px;
  }
  .brand-sub {
    font-size: 11px;
  }
  .nav {
    order: 3;
    width: 100%;
    gap: 8px;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-link {
    white-space: nowrap;
    flex: 0 0 auto;
    padding: 6px 0;
    font-size: 13px;
  }
  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }
  .topbar-actions .cta-btn {
    flex: 1;
  }
  .hero {
    min-height: auto;
    padding-top: 10px;
    gap: 16px;
    display: flex;
    flex-direction: column;
  }
  .hero-copy {
    max-width: 100%;
    padding-right: 0;
    position: relative;
    z-index: 2;
  }
  .hero-copy h1 {
    font-size: clamp(34px, 12vw, 52px);
    letter-spacing: -1px;
  }
  .hero-lead {
    font-size: 18px;
  }
  .hero-desc {
    font-size: 14px;
    line-height: 1.7;
  }
  .hero-actions {
    gap: 10px;
  }
  .hero-actions .cta-btn {
    flex: 1 1 calc(50% - 10px);
    min-width: 0;
  }
  .hero-note {
    line-height: 1.6;
  }
  .hero-visual {
    position: relative;
    inset: auto;
    min-height: auto;
    width: 100%;
    display: grid;
    gap: 12px;
    pointer-events: auto;
    z-index: 1;
    margin-top: 10px;
  }
  .hero-image-frame {
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 20px;
  }
  .status-card {
    position: relative;
    right: auto;
    top: auto;
    width: 100%;
    margin-top: 0;
    margin-left: 0;
  }
  .status-list li,
  .latency-panel {
    gap: 8px;
  }
  .status-list li {
    font-size: 13px;
    padding: 9px 10px;
  }
  .latency-panel strong {
    font-size: 14px;
  }
  .feature-grid {
    gap: 10px;
  }
  .feature-card {
    grid-column: span 12;
    min-height: auto;
  }
  .feature-card h3 {
    font-size: 17px;
  }
  .feature-card p {
    font-size: 13px;
  }
  .architecture-panel {
    margin-top: 14px;
    padding: 18px;
  }
  .architecture-panel h2 {
    font-size: clamp(24px, 7vw, 34px);
  }
  .architecture-list div {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .architecture-list strong {
    min-width: 0;
  }
  .architecture-list span {
    text-align: left;
    width: 100%;
  }
}
