/* KSTR public site: dark + gold theme over the treasure-pile background. */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Inter:wght@400;600;700;800;900&display=swap');

:root {
  --ink: #0c0b08;
  --white: #fff7e8;
  --muted: rgba(255, 247, 232, 0.66);
  --panel: rgba(14, 12, 9, 0.62);
  --panel-strong: rgba(14, 12, 9, 0.82);
  --border: rgba(255, 198, 86, 0.34);
  --border-soft: rgba(255, 247, 232, 0.14);
  --gold: #ffce4d;
  --gold-d: #c98f1c;
  --orange: #f5821f;
  --orange-d: #b85e0c;
  --green: #74e08a;
  --pixel: 'Press Start 2P', monospace;
  --sans: 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--white);
  background: var(--ink) url('bg.png') center top / cover no-repeat fixed;
}
/* dark scrim so the gold image stays visible but text remains readable */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 7, 5, 0.62) 0%, rgba(8, 7, 5, 0.74) 45%, rgba(8, 7, 5, 0.86) 100%);
}
.wrap { position: relative; z-index: 1; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
a { color: var(--gold); text-decoration: none; }

/* nav */
nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px;
  background: rgba(10, 9, 6, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
nav .inner { max-width: 1140px; margin: 0 auto; width: 100%; display: flex; align-items: center; gap: 14px; }
nav img { width: 40px; height: 40px; border-radius: 9px; object-fit: contain; }
nav .name { font-family: var(--pixel); font-size: 15px; color: var(--gold); text-shadow: 2px 2px 0 #000; }
nav .links { margin-left: auto; display: flex; gap: 20px; align-items: center; }
nav .links a { color: var(--white); font-weight: 600; font-size: 14px; }
nav .links a:hover { color: var(--gold); }
nav .pill { font-family: var(--pixel); font-size: 9px; color: #1c1404; padding: 7px 10px; border-radius: 8px; background: var(--gold); border: 1px solid var(--gold-d); box-shadow: 0 3px 0 var(--gold-d); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #1c1404; margin-right: 6px; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* hero */
.hero { min-height: calc(100vh - 70px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 0 64px; position: relative; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 66% 56% at 50% 42%, rgba(5, 6, 10, 0.74), transparent 72%); }
.hero img.coin { width: 136px; height: 136px; border-radius: 28px; image-rendering: auto; box-shadow: 0 18px 46px rgba(0, 0, 0, 0.6); }
.hero h1 { font-family: var(--pixel); font-size: clamp(40px, 7vw, 64px); margin: 0 0 16px; color: var(--white); text-shadow: 4px 4px 0 #000, 0 0 26px rgba(255, 198, 86, 0.35); letter-spacing: 1px; }
.hero p.tag { font-size: clamp(19px, 2.4vw, 26px); font-weight: 800; margin: 0 0 14px; color: var(--gold); text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7); }
.hero p.sub { font-size: 17px; color: #f4ecdd; max-width: 660px; margin: 0 auto 30px; line-height: 1.7; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8); }
.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  font-family: var(--pixel); font-size: 12px; color: #1c1404;
  background: var(--gold); border: 1px solid var(--gold-d);
  border-radius: 12px; padding: 15px 22px; cursor: pointer;
  box-shadow: 0 5px 0 var(--gold-d); transition: transform .05s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--gold-d); }
.btn.ghost { background: rgba(20, 17, 11, 0.6); color: var(--white); border-color: var(--border); box-shadow: 0 5px 0 rgba(0, 0, 0, 0.5); }

/* live stat band */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 28px 0 12px; }
.stat {
  background: var(--panel); border: 1px solid var(--border);
  border-bottom: 4px solid var(--gold-d);
  border-radius: 16px; padding: 18px 16px; text-align: center; backdrop-filter: blur(7px);
}
.stat .k { font-family: var(--pixel); font-size: 8px; letter-spacing: 1px; color: var(--gold); text-transform: uppercase; }
.stat .v { font-size: 26px; font-weight: 900; margin-top: 12px; color: var(--white); text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); }
.stat .s { font-size: 12px; color: var(--muted); margin-top: 6px; }
.stat .v.coin { color: var(--gold); }
.updated { text-align: center; color: var(--muted); font-size: 12px; margin-top: 4px; }

/* sections */
section { padding: 54px 0; }
h2.sec { font-family: var(--pixel); font-size: 20px; text-align: center; color: var(--gold); text-shadow: 3px 3px 0 #000; margin: 0 0 8px; }
p.lead { text-align: center; color: var(--muted); max-width: 690px; margin: 0 auto 36px; font-size: 16px; line-height: 1.65; }

/* steps / flow */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step {
  background: var(--panel); border: 1px solid var(--border-soft);
  border-bottom: 4px solid var(--gold-d);
  border-radius: 16px; padding: 22px 18px; backdrop-filter: blur(7px);
}
.step .num { font-family: var(--pixel); font-size: 11px; color: var(--gold); }
.step h3 { font-size: 19px; margin: 12px 0 10px; color: var(--white); }
.step p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; }

.flow { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.node {
  background: var(--panel-strong); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 18px; text-align: center; min-width: 120px;
}
.node b { display: block; font-size: 15px; color: var(--white); }
.node span { font-size: 12px; color: var(--muted); }
.node.k { border-color: var(--orange); }
.node.g { border-color: var(--gold); }
.arrow { font-size: 22px; color: var(--gold); }

/* hermes block */
.hermes {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 20px; padding: 30px; backdrop-filter: blur(7px);
}
.hermes h2 { font-family: var(--pixel); font-size: 17px; color: var(--gold); text-shadow: 2px 2px 0 #000; margin: 0 0 14px; }
.hermes p { color: var(--muted); line-height: 1.7; font-size: 15px; }
.hermes .term {
  background: #07100a; border: 1px solid rgba(116, 224, 138, 0.25); border-radius: 12px;
  padding: 16px; font-family: monospace; font-size: 13px; line-height: 1.8; color: #b8f0c6;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.55);
}
.term .ok { color: var(--green); }
.term .gold { color: var(--gold); }

/* faq */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.qa { background: var(--panel); border: 1px solid var(--border-soft); border-radius: 14px; padding: 18px 20px; }
.qa b { font-size: 16px; color: var(--white); }
.qa p { color: var(--muted); margin: 8px 0 0; line-height: 1.6; font-size: 14px; }

footer { text-align: center; padding: 40px 0 60px; color: var(--muted); font-size: 13px; }
footer a { margin: 0 10px; }

@media (max-width: 920px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .hermes { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  nav .links a:not(.pill) { display: none; }
}
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } .steps { grid-template-columns: 1fr; } }

/* contract chip */
.ca {
  font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .3px;
  color: var(--gold); background: rgba(20, 17, 11, 0.6);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; cursor: pointer;
}
.ca:hover { border-color: var(--gold); }
.ca.copied { color: var(--green); border-color: var(--green); }
.ca-line { font-size: 13px; color: var(--muted); }
.ca-foot { margin-left: 6px; }

/* hover polish */
.stat, .step, .qa { transition: transform .3s ease, box-shadow .2s ease, border-color .2s ease; }
.stat:hover, .step:hover, .qa:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5); }
.node { transition: transform .16s ease, border-color .16s ease; }
.node:hover { transform: translateY(-3px); }

/* scroll-down hint in the hero */
.scrolldown { position: absolute; bottom: 22px; left: 50%; color: var(--gold); font-size: 24px; text-decoration: none; opacity: .75; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 9px); } }

/* scroll progress bar */
#progress { position: fixed; inset: 0 0 auto 0; height: 3px; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, var(--gold), var(--orange)); z-index: 60; }

/* scroll-driven reveal (pure CSS scroll timelines). If unsupported, content just shows. */
@keyframes revealIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes growbar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@supports (animation-timeline: view()) {
  .reveal { opacity: 0; animation: revealIn linear both; animation-timeline: view(); animation-range: entry 4% cover 26%; }
  #progress { animation: growbar linear both; animation-timeline: scroll(root); }
}

/* hero entrance + slow title glow */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes glow { 0%, 100% { text-shadow: 4px 4px 0 #000, 0 0 22px rgba(255, 198, 86, 0.30); } 50% { text-shadow: 4px 4px 0 #000, 0 0 36px rgba(255, 198, 86, 0.6); } }
.hero h1 { animation: glow 3.6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; }
  #progress, .scrolldown { animation: none; }
  .hero h1, .hero p.tag, .hero p.sub, .hero .cta { animation: none; }
}
