/* ============================================
   JWW.NETWORK — TRON-matched typography
   Primary: DM Serif Display (headings)
   Body: Inter
   Mono: JetBrains Mono
   ============================================ */
:root {
  --white:   #ffffff;
  --off:     #f5f4f2;
  --black:   #0d0d0d;
  --dark:    #1a1a1a;
  --mid:     #666;
  --muted:   #999;
  --light:   #ccc;
  --rule:    #e4e4e4;
  --red:     #cc0008;
  --red-soft:#fff0f0;
  --serif:   'DM Serif Display', Georgia, 'Times New Roman', serif;
  --sans:    'Inter', 'Helvetica Neue', Arial, sans-serif;
  --cond:    'Inter', 'Helvetica Neue', Arial, sans-serif;
  --mono:    'JetBrains Mono', 'Courier New', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--white);
  color: var(--black);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── TICKER ── */
.ticker { background: #060404; padding: .38rem 0; overflow: hidden; position: relative; z-index: 10; border-bottom: 1px solid rgba(200,0,8,0.3); }
.ticker-track { display: flex; gap: 3rem; animation: ticker 45s linear infinite; white-space: nowrap; width: max-content; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.t-item { font-family: var(--mono); font-size: .58rem; color: rgba(255,255,255,.4); letter-spacing: .08em; }
.t-item span { color: var(--red); margin-right: .5rem; }

/* ══════════════════════════════════════════
   NAV — TRON-style dark nav with dropdowns
   ══════════════════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4%; height: 68px;
  background: rgba(8,4,4,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background .3s, box-shadow .3s;
}
nav.scrolled {
  background: rgba(6,2,2,0.97);
  box-shadow: 0 1px 32px rgba(0,0,0,0.5);
}

/* ── BRAND ── */
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.nav-wordmark {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem; font-weight: 800;
  letter-spacing: .08em; color: #fff;
}

/* ── LINKS ── */
.nav-links {
  display: flex; list-style: none;
  align-items: center; gap: 0;
  flex: 1; justify-content: center;
}
.nav-links > li { position: relative; }
.nav-links > li > a {
  font-family: 'Inter', sans-serif;
  font-size: .88rem; font-weight: 400;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  padding: 0 1.1rem;
  line-height: 68px; display: flex; align-items: center; gap: .3rem;
  transition: color .18s;
  white-space: nowrap;
}
.nav-links > li > a:hover { color: #fff; }
.nav-links > li > a.active { color: #fff; }
.nav-links > li > a.active::after {
  content: '';
  position: absolute; bottom: 0; left: 1.1rem; right: 1.1rem;
  height: 2px; background: var(--red);
}
.dd-arrow {
  font-size: .7rem;
  color: rgba(255,255,255,.3);
  transition: transform .2s, color .2s;
  transform: rotate(90deg);
}
.has-dd:hover .dd-arrow { transform: rotate(-90deg); color: rgba(255,255,255,.7); }

/* ── DROPDOWN ── */
.dropdown {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  background: #100203;
  border: 1px solid rgba(255,255,255,.08);
  border-top: 2px solid var(--red);
  box-shadow: 0 16px 48px rgba(0,0,0,.6);
  opacity: 0; visibility: hidden;
  transform: translateX(-50%) translateY(-8px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 300;
  pointer-events: none;
}
.has-dd:hover .dropdown {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: all;
}
.dd-item {
  display: flex; flex-direction: column; gap: .2rem;
  padding: .85rem 1.2rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background .15s;
}
.dd-item:last-child { border-bottom: none; }
.dd-item:hover { background: rgba(255,255,255,.05); }
.dd-item.dd-highlight .dd-label { color: var(--red); }
.dd-label {
  font-family: 'Inter', sans-serif;
  font-size: .88rem; font-weight: 500;
  color: rgba(255,255,255,.85);
  display: flex; align-items: center; gap: .5rem;
}
.dd-desc {
  font-family: 'Inter', sans-serif;
  font-size: .75rem; color: rgba(255,255,255,.3);
  font-weight: 300;
}
.dd-badge {
  font-family: 'Inter', sans-serif;
  font-size: .55rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  background: var(--red); color: #fff;
  padding: .1rem .4rem; border-radius: 2px;
}

/* ── RIGHT SIDE ── */
.nav-right { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }

.nav-chain-status {
  display: flex; align-items: center; gap: .45rem;
  font-family: 'Inter', sans-serif;
  font-size: .75rem; font-weight: 400;
  color: rgba(255,255,255,.4);
  text-decoration: none;
  transition: color .2s;
}
.nav-chain-status:hover { color: rgba(255,255,255,.8); }
.chain-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34,197,94,.6);
  animation: pulse 2.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%,100% { opacity: 1; box-shadow: 0 0 6px rgba(34,197,94,.6); }
  50%      { opacity: .7; box-shadow: 0 0 12px rgba(34,197,94,.3); }
}

.btn-nav {
  font-family: 'Inter', sans-serif;
  font-size: .85rem; font-weight: 500;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255,255,255,.22);
  padding: .48rem 1.3rem;
  border-radius: 20px;
  cursor: pointer; text-decoration: none;
  white-space: nowrap;
  transition: all .2s;
}
.btn-nav:hover { background: var(--red); border-color: var(--red); }

/* ── HAMBURGER ── */
.hamburger {
  display: none; flex-direction: column;
  justify-content: center; gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.hamburger span {
  display: block; height: 1.5px; width: 100%;
  background: rgba(255,255,255,.7);
  transition: all .25s;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── MOBILE MENU ── */
.mobile-menu {
  display: none;
  position: fixed; top: 68px; left: 0; right: 0; bottom: 0;
  background: rgba(6,2,2,.98);
  z-index: 190;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.mobile-menu.open {
  display: block;
  transform: translateX(0);
}
.mobile-menu ul { list-style: none; padding: .5rem 0; }
.mobile-menu > ul > li { border-bottom: 1px solid rgba(255,255,255,.05); }
.mobile-menu > ul > li > a {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 1rem; font-weight: 500;
  color: rgba(255,255,255,.8);
  text-decoration: none;
  padding: .9rem 1.5rem;
  transition: color .2s;
}
.mobile-menu > ul > li > a:hover,
.mobile-menu > ul > li > a.active { color: #fff; }
.mob-sub {
  display: none;
  padding: 0 1.5rem .5rem 2rem;
  background: rgba(255,255,255,.02);
}
.mob-sub.open { display: block; }
.mob-sub a {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: .85rem; color: rgba(255,255,255,.4);
  text-decoration: none; padding: .42rem 0;
  transition: color .2s;
}
.mob-sub a:hover { color: rgba(255,255,255,.8); }
.mob-cta {
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: .75rem;
  border-top: 1px solid rgba(255,255,255,.08);
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-chain-status { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: block; }
}

/* ── PAGE WRAP ── */
.page-wrap { padding-top: 68px; }

/* ── SECTIONS ── */
.section { padding: 96px 5%; }
.section-sm { padding: 56px 5%; }

.section-tag {
  font-family: 'Inter', sans-serif;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: 1rem;
}

/* TRON-style big bold titles */
.section-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.01em;
  color: var(--black);
  margin-bottom: 1.2rem;
  text-transform: none;
}
.section-title em {
  font-style: normal;
  color: var(--red);
}

.section-sub {
  font-family: 'Inter', sans-serif;
  font-size: .98rem;
  font-weight: 300;
  color: var(--mid);
  max-width: 520px;
  line-height: 1.8;
}
.center { text-align: center; }
.center .section-sub { margin: 0 auto; }

/* ── RED BAR ── */
.red-bar { width: 40px; height: 3px; background: var(--red); margin: 1.6rem 0; }

/* ── BUTTONS ── */
.btn-primary {
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--white);
  background: var(--black);
  border: 2px solid var(--black);
  padding: .75rem 2rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background .2s, border-color .2s;
}
.btn-primary:hover { background: var(--red); border-color: var(--red); }
.btn-primary.red { background: var(--red); border-color: var(--red); }
.btn-primary.red:hover { background: #a0000a; border-color: #a0000a; }

.btn-secondary {
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--black);
  background: transparent;
  border: 2px solid var(--black);
  padding: .75rem 2rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background .2s, color .2s;
}
.btn-secondary:hover { background: var(--black); color: var(--white); }
.btn-group { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ── SOFT SECTION ── */
.soft { background: var(--off); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

/* ── STATS BAR ── */
.stats-bar {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--off);
  padding: 2rem 5%;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.stat-item { text-align: center; }
.stat-value {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--black);
  display: block;
  line-height: 1;
  margin-bottom: .3rem;
  letter-spacing: -.02em;
}
.stat-value.red { color: var(--red); }
.stat-label {
  font-family: 'Inter', sans-serif;
  font-size: .72rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: none;
}

/* ── CARDS ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.card { background: var(--white); padding: 2.4rem; transition: background .2s; }
.card:hover { background: var(--off); }
.card-num {
  font-family: var(--mono);
  font-size: .58rem;
  color: var(--light);
  letter-spacing: .1em;
  margin-bottom: 1.4rem;
  display: block;
}
.card-title {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  text-transform: none;
  margin-bottom: .7rem;
  color: var(--black);
}
.card-desc { font-size: .9rem; color: var(--mid); line-height: 1.75; font-weight: 300; }

/* ── TABLE ── */
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table th {
  font-family: 'Inter', sans-serif;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: .8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}
.data-table td { padding: .9rem 1rem; border-bottom: 1px solid var(--rule); color: var(--dark); }
.data-table tr:hover td { background: var(--off); }
.tag { display: inline-block; font-family: 'Inter', sans-serif; font-size: .6rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: .2rem .6rem; }
.tag-red { background: var(--red-soft); color: var(--red); border: 1px solid rgba(204,0,8,.15); }
.tag-green { background: #f0faf4; color: #0a8a3c; border: 1px solid rgba(10,138,60,.15); }
.tag-blue { background: #f0f4ff; color: #1a4ed8; border: 1px solid rgba(26,78,216,.15); }

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  padding: 80px 5% 72px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.page-hero::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--red);
}
.breadcrumb {
  font-family: 'Inter', sans-serif;
  font-size: .65rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--red); text-decoration: none; }
.page-hero h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -.01em;
  text-transform: none;
  margin-bottom: 1.1rem;
  color: var(--black);
}
.page-hero h1 em { font-style: normal; color: var(--red); }
.page-hero p {
  font-size: 1rem;
  color: var(--mid);
  font-weight: 300;
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 2rem;
}

/* ── FOOTER ── */
footer { background: var(--black); color: rgba(255,255,255,.65); padding: 5rem 5% 2.5rem; }
.footer-top { display: grid; grid-template-columns: 1.8fr 3fr; gap: 4rem; margin-bottom: 3.5rem; }
.footer-brand p { font-size: .88rem; color: rgba(255,255,255,.35); line-height: 1.8; max-width: 240px; font-weight: 300; margin-top: 1rem; }
.socials { display: flex; gap: .5rem; margin-top: 1.5rem; }
.soc { width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.35); text-decoration: none; font-family: var(--mono); font-size: .58rem; transition: all .2s; }
.soc:hover { border-color: rgba(255,255,255,.4); color: var(--white); }
.footer-cols { display: grid; grid-template-columns: repeat(4,1fr); gap: 2rem; }
.fc h4 { font-family: 'Inter', sans-serif; font-size: .7rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--white); margin-bottom: 1.1rem; }
.fc ul { list-style: none; }
.fc li { margin-bottom: .55rem; }
.fc a { color: rgba(255,255,255,.45); text-decoration: none; font-family: 'Inter', sans-serif; font-size: .88rem; font-weight: 400; transition: color .2s; }
.fc a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 1.8rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { font-family: 'Inter', sans-serif; font-size: .62rem; font-weight: 600; letter-spacing: .12em; color: rgba(255,255,255,.18); text-transform: uppercase; }
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a { font-family: 'Inter', sans-serif; font-size: .62rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.25); text-decoration: none; transition: color .2s; }
.footer-legal a:hover { color: rgba(255,255,255,.7); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .footer-top { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-cols { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 600px) {
  .section { padding: 64px 4%; }
  .card-grid { grid-template-columns: 1fr; }
  .stats-bar { padding: 1.5rem 4%; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
   ══════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s cubic-bezier(.4,0,.2,1),
              transform .65s cubic-bezier(.4,0,.2,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity .65s cubic-bezier(.4,0,.2,1),
              transform .65s cubic-bezier(.4,0,.2,1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity .65s cubic-bezier(.4,0,.2,1),
              transform .65s cubic-bezier(.4,0,.2,1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s cubic-bezier(.4,0,.2,1),
              transform .5s cubic-bezier(.4,0,.2,1);
}
.stagger.visible > *:nth-child(1)  { opacity:1; transform:none; transition-delay: .00s; }
.stagger.visible > *:nth-child(2)  { opacity:1; transform:none; transition-delay: .08s; }
.stagger.visible > *:nth-child(3)  { opacity:1; transform:none; transition-delay: .16s; }
.stagger.visible > *:nth-child(4)  { opacity:1; transform:none; transition-delay: .24s; }
.stagger.visible > *:nth-child(5)  { opacity:1; transform:none; transition-delay: .32s; }
.stagger.visible > *:nth-child(6)  { opacity:1; transform:none; transition-delay: .40s; }
.stagger.visible > *:nth-child(7)  { opacity:1; transform:none; transition-delay: .48s; }
.stagger.visible > *:nth-child(8)  { opacity:1; transform:none; transition-delay: .56s; }

/* Page transition */
.page-wrap { animation: fadeIn .4s ease both; }
@keyframes fadeIn { from{ opacity:0; transform:translateY(10px) } to{ opacity:1; transform:none } }

/* Hover lift for cards */
.card, .dapp-card, .featured-card, .hf-card, .social-card, .event-card {
  transition: background .2s, transform .2s, box-shadow .2s;
}
.card:hover, .dapp-card:hover, .featured-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.07);
}

/* ── PRINT STYLES ── */
@media print {
  nav, .ticker, footer, .btn-primary, .btn-secondary { display: none !important; }
  body { background: #fff; color: #000; }
  .page-wrap { padding-top: 0; }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── MOBILE FINE-TUNING ── */
@media (max-width: 480px) {
  .section { padding: 56px 4%; }
  .section-title { font-size: clamp(1.8rem, 7vw, 2.5rem); }
  .home-stats { gap: .6rem; padding: 1.2rem 4%; }
  .hstat-val { font-size: 1.4rem; }
  .btn-group { flex-direction: column; }
  .btn-primary, .btn-secondary { text-align: center; }
  .hi-stat-grid { grid-template-columns: 1fr 1fr; }
  .hi-big { font-size: 2rem; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .home-cta { grid-template-columns: 1fr; }
  .hcta-left, .hcta-right { padding: 56px 4%; }
  .hcta-left { border-right: none; border-bottom: 1px solid rgba(255,255,255,.07); }
}

/* ── FOCUS ACCESSIBILITY ── */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* ── SELECTION COLOR ── */
::selection { background: rgba(200,0,8,.18); color: var(--black); }

/* ── NAV LIGHT MODE (inner pages) ── */
nav.nav-light {
  background: rgba(255,255,255,0.96) !important;
  border-bottom: 1px solid var(--rule) !important;
}
nav.nav-light .nav-wordmark { color: var(--black) !important; }
nav.nav-light .nav-links > li > a { color: var(--mid) !important; }
nav.nav-light .nav-links > li > a:hover { color: var(--black) !important; }
nav.nav-light .nav-links > li > a.active { color: var(--black) !important; }
nav.nav-light .nav-chain-status { color: var(--muted) !important; }
nav.nav-light .chain-dot { box-shadow: 0 0 6px rgba(34,197,94,.5); }
nav.nav-light .btn-nav {
  color: var(--black) !important;
  border-color: rgba(0,0,0,.18) !important;
  background: transparent !important;
}
nav.nav-light .btn-nav:hover { background: var(--red) !important; color: #fff !important; border-color: var(--red) !important; }
nav.nav-light .hamburger span { background: rgba(0,0,0,.7) !important; }
nav.nav-light.scrolled {
  background: rgba(255,255,255,0.98) !important;
  box-shadow: 0 1px 24px rgba(0,0,0,.07) !important;
}
nav.nav-light .dd-arrow { color: rgba(0,0,0,.3) !important; }
