/* ============================================
   ALPHA STRATEGY — design tokens
   Bitcoin orange against deep exchange-graphite.
   Mono for anything that's a number; grotesk for
   voice; plex sans for reading.
   ============================================ */

:root {
  --bg: #0b0e11;
  --surface: #12161c;
  --surface-2: #1a1f27;
  --border: #262c35;
  --border-bright: #3a4250;
  --text: #e8e6e1;
  --text-muted: #8b92a0;
  --text-dim: #5c6472;
  --accent: #f7931a;
  --accent-dim: #c97a1a;
  --accent-glow: rgba(247, 147, 26, 0.15);
  --positive: #4fae9c;
  --negative: #d9645f;

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --radius: 3px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.mono { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 17, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  border: 1px solid var(--accent);
  color: var(--accent) !important;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 13px !important;
  font-family: var(--font-mono);
}
.nav-cta:hover { background: var(--accent-glow); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: #14100a;
  font-weight: 600;
}
.btn-primary:hover { background: #ffa435; }
.btn-ghost {
  border-color: var(--border-bright);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- hero ---------- */
.hero {
  padding: 96px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 18px 0 22px;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero p.lede {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 14px; margin-bottom: 40px; }
.hero-stats {
  display: flex;
  gap: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.hero-stat-num {
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--accent);
}
.hero-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---------- stack visual (signature element) ---------- */
.stack-visual {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px;
  position: relative;
}
.stack-visual .stack-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.stack-visual .stack-head .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--positive);
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 8px var(--positive);
}
.sat-blocks {
  display: flex;
  flex-direction: column-reverse;
  gap: 3px;
  height: 220px;
  justify-content: flex-start;
}
.sat-block {
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  border-radius: 2px;
  height: 16px;
  transform-origin: bottom;
  animation: rise 0.6s ease backwards;
}
@keyframes rise {
  from { transform: scaleY(0); opacity: 0; }
  to { transform: scaleY(1); opacity: 1; }
}
.stack-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  font-family: var(--font-mono);
  font-size: 13px;
}
.stack-foot .up { color: var(--positive); }

/* ---------- sections ---------- */
section { padding: 88px 0; border-top: 1px solid var(--border); }
.section-head { max-width: 620px; margin-bottom: 48px; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 38px);
  margin-top: 12px;
  letter-spacing: -0.01em;
}
.section-head p { color: var(--text-muted); margin-top: 14px; font-size: 15.5px; }

/* allocation bars */
.alloc {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.alloc-cell {
  background: var(--surface);
  padding: 28px;
}
.alloc-cell .pct {
  font-family: var(--font-mono);
  font-size: 34px;
  color: var(--accent);
}
.alloc-cell.core .pct { color: var(--text); font-size: 22px; }
.alloc-cell h3 { font-family: var(--font-display); font-size: 16px; margin: 10px 0 8px; }
.alloc-cell p { font-size: 13.5px; color: var(--text-muted); }

/* cycle wheel */
.cycle-wrap {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 56px;
  align-items: center;
}
.cycle-list { display: flex; flex-direction: column; gap: 2px; }
.cycle-item {
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: default;
  transition: background 0.15s ease;
}
.cycle-item:hover { background: var(--surface); border-color: var(--border); }
.cycle-item .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.cycle-item.active .tag { color: var(--accent); }
.cycle-item h4 { font-family: var(--font-display); font-size: 16px; margin: 4px 0 4px; }
.cycle-item p { font-size: 13.5px; color: var(--text-muted); }

/* cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 6px; overflow: hidden;}
.card { background: var(--surface); padding: 30px 26px; }
.card .num { font-family: var(--font-mono); color: var(--accent); font-size: 13px; }
.card h3 { font-family: var(--font-display); font-size: 17px; margin: 10px 0 8px; }
.card p { font-size: 13.5px; color: var(--text-muted); }

/* risk callout */
.risk {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--negative);
  border-radius: 4px;
  padding: 28px 30px;
}
.risk h3 { font-family: var(--font-display); font-size: 17px; margin-bottom: 12px; color: var(--negative); }
.risk ul { padding-left: 18px; color: var(--text-muted); font-size: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; }
.risk li { margin-bottom: 2px; }

/* footer */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- forms ---------- */
.form-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.form-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 40px;
}
.form-card h1 {
  font-family: var(--font-display);
  font-size: 26px;
  margin: 10px 0 6px;
}
.form-card > p { color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.field input, .field select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-bright);
  color: var(--text);
  padding: 12px 14px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14.5px;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-muted);
}
.check-row input { margin-top: 3px; }
.btn-block { width: 100%; justify-content: center; margin-top: 8px; }
.form-foot { text-align: center; margin-top: 22px; font-size: 13px; color: var(--text-muted); }

.id-result {
  display: none;
  background: var(--bg);
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
  text-align: center;
}
.id-result .label { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.id-result .idval { font-family: var(--font-mono); font-size: 22px; color: var(--accent); margin: 8px 0; letter-spacing: 0.04em; }

/* ---------- dashboard ---------- */
.dash-shell { min-height: 100vh; }
.dash-top {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.dash-top .container { display: flex; justify-content: space-between; align-items: center; }
.dash-body { padding: 44px 0 80px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 36px; flex-wrap: wrap; gap: 16px; }
.dash-head h1 { font-family: var(--font-display); font-size: 30px; }
.dash-head .sub { color: var(--text-muted); font-size: 13.5px; margin-top: 6px; }
.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-bright);
  color: var(--text-muted);
}

.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin-bottom: 40px;}
.kpi { background: var(--surface); padding: 24px; }
.kpi .lbl { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em;}
.kpi .val { font-family: var(--font-mono); font-size: 25px; margin-top: 10px; }
.kpi .delta { font-family: var(--font-mono); font-size: 12px; margin-top: 6px; }
.kpi .delta.up { color: var(--positive); }
.kpi .delta.down { color: var(--negative); }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 28px; margin-bottom: 28px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.panel-head h2 { font-family: var(--font-display); font-size: 18px; }
.panel-head .muted { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; font-size: 13.5px; border-bottom: 1px solid var(--border); }
th { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500;}
td.mono, th.mono { font-family: var(--font-mono); }
td.pos { color: var(--positive); }
td.neg { color: var(--negative); }

.dash-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; }

.bar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.bar-row .name { width: 90px; font-size: 13px; color: var(--text-muted); font-family: var(--font-mono); }
.bar-track { flex: 1; height: 8px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 6px; }
.bar-row .pct { width: 44px; text-align: right; font-family: var(--font-mono); font-size: 13px; }

.lookup-box { text-align: center; padding: 80px 20px; }

@media (max-width: 860px) {
  .hero-grid, .cycle-wrap, .dash-grid { grid-template-columns: 1fr; }
  .alloc, .grid-3, .kpi-row { grid-template-columns: 1fr; }
  .risk ul { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

/* fix: native <button> elements default to a white background */
button.btn { background-color: transparent; }
button.btn-primary { background-color: var(--accent); }

/* fix: force off native OS button chrome so background-color actually applies */
button.btn {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: transparent;
}
button.btn-primary {
  background-color: var(--accent);
}
