:root{
  --bg:#070A12;
  --bg2:#05060C;
  --glass: rgba(255,255,255,.06);
  --text:#E9EEF8;
  --muted: rgba(233,238,248,.68);

  --gold:#FFD700;
  --gold2:#FFB800;
  --blue:#58A6FF;

  --shadow: 0 20px 60px rgba(0,0,0,.55);
  --border: rgba(255,255,255,.08);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background: radial-gradient(1200px 800px at 50% -10%, rgba(88,166,255,.18), transparent 60%),
              radial-gradient(900px 600px at 20% 20%, rgba(255,215,0,.12), transparent 55%),
              radial-gradient(800px 600px at 80% 40%, rgba(255,184,0,.10), transparent 55%),
              linear-gradient(180deg, var(--bg), var(--bg2) 70%);
  overflow-x:hidden;
}

section { scroll-margin-top: 84px; }

/* Make hidden attribute actually hide elements */
[hidden]{display:none !important}

/* WebGL background canvas always behind content */
#bg, canvas{
  position:fixed !important;
  inset:0;
  width:100%;
  height:100%;
  z-index:-2 !important;
  pointer-events:none;
}

/* Subtle overlay grid */
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  background:
    radial-gradient(circle at 50% 30%, rgba(255,215,0,.10), transparent 55%),
    linear-gradient(transparent 0, rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, transparent 0, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: auto, 46px 46px, 46px 46px;
  opacity:.55;
  pointer-events:none;
}

.page{max-width:1180px;margin:0 auto;padding:0 20px}
.section{padding:38px 0; position:relative; z-index:2;}
.section__head{max-width:880px;margin-bottom:16px}

.h2{
  font-family:"Space Grotesk", Inter, sans-serif;
  font-size:38px; line-height:1.05; margin:0 0 10px;
  letter-spacing:.2px;
}
.h3{
  font-family:"Space Grotesk", Inter, sans-serif;
  font-size:18px; margin:12px 0 8px;
}
.p{margin:0; color:var(--muted); font-size:16px; line-height:1.6}
.muted{color:var(--muted)}
.gold{color:rgba(255,215,0,.95)}
code{font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}

/* =========================
   NAV (fixed, clean)
========================= */
.nav{
  position:fixed;
  top:0; left:0; right:0;
  z-index:50;
  height:64px;

  backdrop-filter: blur(14px);
  background: rgba(5,6,12,.78);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav__inner{
  max-width:1180px;margin:0 auto;
  height:64px;
  padding:0 20px;
  display:flex; align-items:center; justify-content:space-between;
  gap:16px;
}
.nav__brand{display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--text)}
.nav__mark{
  width:26px;height:26px;
  border-radius:8px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
  animation: logo-glow 3s infinite alternate;
  overflow:hidden;
}
.nav__mark img{
  width:100%;
  height:100%;
  object-fit:cover;
}

@keyframes logo-glow {
  from { box-shadow: 0 0 10px rgba(255, 215, 0, 0.2); border-color: rgba(255, 255, 255, 0.1); }
  to { box-shadow: 0 0 25px rgba(255, 215, 0, 0.5); border-color: rgba(255, 215, 0, 0.4); }
}

.nav__name{font-family:"Space Grotesk"; font-weight:700; letter-spacing:.6px}
.nav__links{display:flex; gap:16px; align-items:center}
.nav__links a{
  color:rgba(233,238,248,.82);
  text-decoration:none;
  font-size:14px;
  padding:8px 10px;
  border-radius:10px;
}
.nav__links a:hover{background:rgba(255,255,255,.05); color:#fff}
.nav__cta{display:flex; gap:10px; align-items:center}

.nav__burger{
  display:none;
  width:42px;height:42px;border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
}
.nav__burger span{display:block;height:2px;background:rgba(233,238,248,.9); margin:7px 9px}

/* Mobile menu overlay */
.nav__mobile{
  position:fixed;
  top:64px;
  left:0; right:0;
  z-index:60;

  max-width:1180px;
  margin:0 auto;
  padding:14px 20px 16px;

  display:grid;
  gap:10px;

  background: rgba(5,6,12,.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.08);
  border-top: 0;
  border-radius: 0 0 18px 18px;
}
.nav__mobile a{
  text-decoration:none;
  color:rgba(233,238,248,.85);
  padding:10px 12px;
  border-radius:12px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.06)
}
.nav__mobile a:hover{border-color:rgba(255,215,0,.25)}

/* =========================
   HERO 
========================= */
.hero{
  padding-top:96px; 
}
.hero__grid{
  display:grid;
  grid-template-columns: 1.25fr .95fr;
  gap:18px;
  align-items:stretch;
}

/* Kicker + titles */
.kicker{
  display:inline-flex; gap:10px; align-items:center;
  font-size:12px; letter-spacing:.18em; text-transform:uppercase;
  color:rgba(233,238,248,.72);
  padding:10px 12px;
  border-radius:999px;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.06);
}
.title{
  font-family:"Space Grotesk";
  font-weight:700;
  font-size:58px;
  line-height:1.0;
  margin:16px 0 10px;
  letter-spacing:.8px;
}
.glow{
  background: linear-gradient(90deg, var(--gold), var(--gold2));
  -webkit-background-clip:text; background-clip:text;
  color:transparent;
  text-shadow: 0 0 28px rgba(255,215,0,.18);
}
.subtitle{font-size:18px;margin:0 0 12px;color:rgba(233,238,248,.92)}
.lead{max-width:680px;margin:0 0 18px;color:rgba(233,238,248,.72);line-height:1.7}

.hero__actions{display:flex; gap:12px; flex-wrap:wrap; margin-bottom:18px}
.hero__badges{display:flex; gap:10px; flex-wrap:wrap}
.badge{
  padding:12px 14px; border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
}
.badge__label{font-size:12px;color:rgba(233,238,248,.65)}
.badge__value{font-size:14px;margin-top:4px;color:#fff}

/* Improved Glassmorphism */
.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  border-radius: 22px;
}

/* Brand visual (banner + coin) */

.hero__panel .panel__head{
  margin-top:10px;
}

.panel__head{display:flex; justify-content:space-between; align-items:baseline; gap:10px; margin:0 18px 14px}
.panel__title{font-family:"Space Grotesk"; font-weight:700}
.panel__hint{font-size:12px; color:rgba(233,238,248,.65)}
.panel__foot{display:flex; align-items:center; justify-content:flex-start; margin:12px 18px 18px}

.stats{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  padding: 0 18px 18px;
}

.stat{
  padding:18px;
  border-radius:18px;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,.06),
    rgba(255,255,255,.03)
  );
  border:1px solid rgba(255,255,255,.08);
  transition:.2s ease;
}

.stat:hover{
  border-color: rgba(255,215,0,.25);
  box-shadow: 0 0 25px rgba(255,215,0,.10);
}

.stat__k{font-size:12px;color:rgba(233,238,248,.65)}
.stat__v{font-family:"Space Grotesk"; font-size:20px; margin-top:6px}
.stat__s{font-size:12px;color:rgba(233,238,248,.55); margin-top:4px}

/* =========================
   CARDS / LISTS / FACTS
========================= */
.cards{display:grid; grid-template-columns:repeat(3,1fr); gap:14px}
.card{padding:18px}
.card__icon{
  width:42px;height:42px;border-radius:14px;
  display:grid; place-items:center;
  background: rgba(255,215,0,.10);
  border: 1px solid rgba(255,215,0,.18);
  box-shadow: 0 0 26px rgba(255,215,0,.08);
}
.list{margin:10px 0 0; padding-left:18px; color:rgba(233,238,248,.70); line-height:1.8}

/* Fact Grid optimized for text fielding */
.factgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.fact {
  padding: 24px;
  text-align: left;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease;
}

.fact:hover {
  transform: translateY(-5px);
  border-color: var(--gold);
}

.fact__k {
  font-size: 13px;
  color: rgba(233, 238, 248, 0.65);
}

.fact__v {
  font-family: "Space Grotesk", sans-serif;
  font-size: 26px; 
  font-weight: 700;
  margin: 8px 0;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* Prevents layout break on long strings */
}

/* Specific styling for long strings like Genesis Message */
.fact__v--small {
  font-size: 15px;
  white-space: normal;
  word-wrap: break-word; /* Ensure long words break safely */
  line-height: 1.4;
  color: #fff;
}

.fact__s {
  font-size: 13px;
  color: rgba(233, 238, 248, 0.55);
}

.divider{
  height:1px;
  background: linear-gradient(90deg, transparent, rgba(255,215,0,.35), transparent);
  margin:6px 0 14px;
}

/* bullets section */
.bullets{display:grid; grid-template-columns:repeat(2,1fr); gap:12px}
.bullet{padding:18px}
.bullet__k{font-family:"Space Grotesk"; font-weight:700; margin-bottom:6px}
.bullet__v{color:rgba(233,238,248,.72)}

/* two-column block */
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:14px}
.pad{padding:22px}
.codebox{
  margin-top:10px;
  background: rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.06);
  border-radius:16px;
  overflow:hidden;
}
pre{margin:0; padding:14px; font-size:13px; color:rgba(233,238,248,.82); overflow-x:auto;}

/* =========================
   BUTTONS
========================= */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:10px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color:#fff;
  text-decoration:none;
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
  user-select:none;
}
.btn:hover{transform: translateY(-1px); border-color: rgba(255,215,0,.22)}
.btn--gold{
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  border-color: rgba(255,215,0,.35);
  box-shadow: 0 16px 40px rgba(255,184,0,.22);
  color:#130F00;
  font-weight:700;
}
.btn--gold:hover{box-shadow: 0 18px 50px rgba(255,184,0,.30)}
.btn--ghost{
  background: rgba(0,0,0,.18);
  border-color: rgba(255,255,255,.12);
}
.btn--mini{padding:9px 11px; font-size:13px; border-radius:12px}
.row{display:flex; gap:10px; flex-wrap:wrap}

/* =========================
   SOCIAL BAR + FOOTER
========================= */
.socialbar{padding:14px; display:flex; gap:10px; flex-wrap:wrap;}
.social{
  display:inline-flex; align-items:center; gap:10px;
  text-decoration:none;
  color:rgba(233,238,248,.85);
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  transition: transform .15s ease, border-color .15s ease;
}
.social:hover{transform: translateY(-2px); border-color: rgba(255,215,0,.25)}

.footer{padding:40px 0 80px}
.footer__inner{
  display:flex; gap:12px; flex-wrap:wrap;
  justify-content:space-between; align-items:center;
  border-top:1px solid rgba(255,255,255,.06);
  padding-top:18px;
}

/* =========================
   REVEAL ANIMATIONS
========================= */
.reveal{opacity:0; transform: translateY(10px); transition: opacity .7s ease, transform .7s ease}
.reveal.is-on{opacity:1; transform:none}

/* =========================
   LOADER
========================= */
.loader{
  position:fixed; inset:0; z-index:9999;
  display:grid; place-items:center;

  background:
    radial-gradient(900px 700px at 50% 35%, rgba(255,215,0,.12), transparent 60%),
    radial-gradient(900px 700px at 35% 10%, rgba(88,166,255,.10), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.78), rgba(0,0,0,.92)),
    url("../img/whitepaper_background.png") center/cover no-repeat;

  border-bottom:1px solid rgba(255,255,255,.06);
}
.loader__inner{display:flex; gap:18px; align-items:center; position:relative; padding: 16px 18px; border-radius:18px;}

.loader__coin{
  width:62px;
  height:62px;
  border-radius:16px;
  border:1px solid rgba(255,215,0,.45);
  background: rgba(0,0,0,.25);
  box-shadow: 0 0 40px rgba(255,215,0,.22);
  object-fit: cover;
  animation: coin-pulse 2s ease-in-out infinite;
}

@keyframes coin-pulse {
  0% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.05); filter: brightness(1.3); }
  100% { transform: scale(1); filter: brightness(1); }
}

.loader__text{min-width:240px}
.loader__title{
  font-family:"Space Grotesk";
  font-weight:700;
  letter-spacing:.18em;
  font-size:14px;
  color:rgba(255,215,0,.95);
}
.loader__sub{margin-top:6px;color:rgba(233,238,248,.78)}

/* The loading bar */
.loader__bar{
  margin-top:12px;
  width:100%;
  height:10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.35);
  overflow:hidden;
}
.loader__bar span{
  display:block; height:100%;
  width:0%;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
  box-shadow: 0 0 20px rgba(255,215,0,.20);
  animation: loadbar 1.5s ease forwards;
}

.icon{
  width:18px;
  height:18px;
  display:inline-block;
}

.social:hover .icon{
  color: var(--gold);
}

.social .icon{
  color: var(--gold);
}

@keyframes loadbar{to{width:100%}}

/* =========================
   TIMELINE COMPARISON
========================= */
.insight {
  padding: 24px;
  margin-top: 24px;
}

.insight__eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 20px;
  font-weight: 600;
}

.timelinecompare {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timelinecard {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timelinecard__title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
}

.timelinebar {
  width: 100%;
  height: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.timelinebar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  animation: bar-grow 1.5s ease-out forwards;
  transform-origin: left;
}

/* Bitcoin bar (100% width, muted color) */
.timelinebar--btc span {
  width: 100%;
  background: rgba(233, 238, 248, 0.2); 
}

/* ENDG bar (~10% width to represent 12.6 vs 130 years, glowing gold) */
.timelinebar--endg span {
  width: 9.6%; 
  background: linear-gradient(90deg, var(--gold), var(--gold2));
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.timelinecard__meta {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

@keyframes bar-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (min-width: 768px) {
  .timelinecompare {
    gap: 32px;
  }
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 980px){
  .hero__grid{grid-template-columns:1fr; gap:14px}
  .stats{grid-template-columns:1fr 1fr}
  .cards{grid-template-columns:1fr}
  .bullets{grid-template-columns:1fr}
  .grid2{grid-template-columns:1fr}
  .nav__links, .nav__cta{display:none}
  .nav__burger{display:block}
  .nav__mobile{max-width: calc(100% - 40px);}
}
@media (max-width: 520px){
  .title{font-size:44px}
  .stats{grid-template-columns:1fr}
}

/* Scroll lock helper */
body.menu-open{overflow:hidden;}

.explorer-chart-card{padding:22px;}
.explorer-chart-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:14px;}
.explorer-chart-status{font-size:13px;color:rgba(233,238,248,.62);}
.explorer-chart-status.is-error{color:#ffb4b4;}
.explorer-chart-wrap{position:relative;min-height:360px;width:100%;}
.explorer-chart-wrap canvas{width:100% !important;height:360px !important;display:block;}
@media (max-width: 980px){.explorer-chart-wrap{min-height:300px}.explorer-chart-wrap canvas{height:300px !important;}}

.explorer-chart-wrap--standalone{height:360px;}
.explorer-chart-card .explorer-chart-wrap{position:relative;min-height:320px;}
.explorer-chart-card canvas{width:100% !important;height:100% !important;display:block;}

.panel__foot .row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Container for the bars */
.timelinebar-container {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  margin: 10px 0;
}

.timelinebar {
  height: 100%;
  border-radius: 6px;
  transform-origin: left;
}

/* ENDG fills to 100% in 1.5 seconds */
.timelinebar--endg {
  background: linear-gradient(90deg, #f7931a, #ffca28);
  box-shadow: 0 0 15px rgba(247, 147, 26, 0.4);
  width: 100%;
  animation: fillEndg 1.5s ease-out forwards;
}

/* BTC fills to only 9.6% in the same 1.5 seconds */
.timelinebar--btc-partial {
  background: #4a4a4a;
  width: 100%;
  animation: fillBtcPartial 1.5s ease-out forwards;
}

@keyframes fillEndg {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

@keyframes fillBtcPartial {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(0.096); } /* 9.6% of total width */
}


a {
  color: #d4af37; /* gold */
  text-decoration: none;
}

a:hover {
  color: #f5d76e; /* lighter gold on hover */
  text-decoration: underline;
}

.gold-link {
  color: #d4af37;
  text-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
}