/* ============================================================
   Blockstream Capital ISG — Minimal Landing
   Per BCIS Branding Guide v1.1
   ============================================================ */

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

:root {
  --bg: #111316;
  --bg-gradient: linear-gradient(160deg, #0A0C0E 0%, #111316 40%, #0D1520 100%);
  --text: #FFFFFF;
  --text-body: #B5BDC2;
  --accent: #00C3FF;
  --accent-light: #7EE0FF;
  --surface: #1A1D22;
  --border: #2A2D33;
  --green: #0f0;
  --mono: 'Courier New', Courier, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --particle-rgb: 0,195,255;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-gradient: #ffffff;
  --text: #0C0C0F;
  --text-body: #080B0E;
  --accent: #0088B3;
  --accent-light: #00C3FF;
  --surface: #f5f7fa;
  --border: #D0D5DA;
  --green: #0a0;
  --particle-rgb: 0,136,179;
}

html, body {
  font-family: var(--sans);
  background: var(--bg-gradient);
  color: var(--text-body);
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
}

/* --- Canvas --- */
#canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* --- Intro (terminal) --- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-gradient);
  transition: opacity 0.6s ease;
}

.intro.out {
  opacity: 0;
  pointer-events: none;
}

.intro-terminal {
  font-family: var(--mono);
  font-size: clamp(12px, 1.8vw, 15px);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--accent);
  line-height: 1.8;
  text-align: left;
}

.intro-line {
  opacity: 0.8;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* --- Main --- */
.main {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.main.visible {
  opacity: 1;
}

/* --- Logo --- */
.logo {
  display: inline-block;
  cursor: default;
}

.logo img {
  max-width: clamp(260px, 40vw, 420px);
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

/* Show correct logo per theme */
.logo-light { display: none; }
.logo-dark  { display: block; }
[data-theme="light"] .logo-dark  { display: none; }
[data-theme="light"] .logo-light { display: block; }

/* --- Disclaimer --- */
.disclaimer {
  max-width: 520px;
  margin-top: 3rem;
  text-align: center;
  font-family: var(--sans);
  font-size: clamp(10px, 1.4vw, 12px);
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-body);
  letter-spacing: 0.02em;
}

.disclaimer p {
  margin-bottom: 0.75rem;
}

.disclaimer p:last-child {
  margin-bottom: 0;
}

/* --- Theme toggle --- */
.theme-btn {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.theme-btn:hover {
  opacity: 0.7;
}

/* --- Footer --- */
.footer {
  position: fixed;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  z-index: 1;
  text-align: center;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-body);
  opacity: 0.5;
}

/* --- Easter Egg: Bitcoin Rain --- */
.bitcoin-rain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bitcoin-rain.active { opacity: 1; }

.rain-symbol {
  position: absolute;
  top: -40px;
  animation: fall linear forwards;
  user-select: none;
}

@keyframes fall {
  to { transform: translateY(calc(100vh + 80px)) rotate(720deg); opacity: 0; }
}

/* --- Easter Egg: Secret Terminal --- */
.secret-terminal {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid var(--green);
  border-radius: 6px;
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--green);
  max-width: 380px;
  line-height: 1.6;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.15);
  display: none;
  transform: translateY(120%);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.secret-terminal.visible {
  transform: translateY(0);
}

.secret-terminal .prompt { color: var(--accent); }
.secret-terminal .cursor-t {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--green);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

/* --- Easter Egg: Logo rainbow --- */
.logo.rainbow img {
  animation: hueShift 2s linear infinite;
}

@keyframes hueShift {
  to { filter: hue-rotate(360deg) brightness(1.2); }
}

/* --- Easter Egg: Bitcoin Miner --- */
.miner {
  position: fixed;
  inset: 0;
  z-index: 9997;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.miner.visible {
  opacity: 1;
  visibility: visible;
}

.miner-window {
  background: #0a0c0e;
  border: 1px solid #00C3FF;
  border-radius: 8px;
  width: 460px;
  max-width: 92vw;
  box-shadow: 0 0 40px rgba(0, 195, 255, 0.15);
  overflow: hidden;
}

.miner-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(0, 195, 255, 0.08);
  border-bottom: 1px solid rgba(0, 195, 255, 0.15);
}

.miner-title {
  font-family: var(--mono);
  font-size: 11px;
  color: #00C3FF;
  letter-spacing: 0.06em;
}

.miner-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.2s;
}

.miner-close:hover { color: #DD1F48; }

.miner-body {
  padding: 16px;
}

.miner-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.miner-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 11px;
}

.miner-label {
  color: rgba(0, 195, 255, 0.5);
  letter-spacing: 0.08em;
  flex-shrink: 0;
  margin-right: 12px;
}

.miner-val {
  color: #e8ebed;
  text-align: right;
  word-break: break-all;
}

.miner-hash {
  font-size: 9px;
  max-width: 280px;
  opacity: 0.7;
}

.miner-log {
  background: #060709;
  border: 1px solid rgba(0, 195, 255, 0.1);
  border-radius: 4px;
  padding: 8px 10px;
  height: 100px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.6;
  color: rgba(0, 195, 255, 0.6);
  margin-bottom: 12px;
}

.miner-log .found {
  color: #f7931a;
  font-weight: 700;
}

.miner-start {
  width: 100%;
  padding: 10px;
  background: rgba(0, 195, 255, 0.1);
  border: 1px solid #00C3FF;
  border-radius: 4px;
  color: #00C3FF;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.2s ease;
}

.miner-start:hover {
  background: rgba(0, 195, 255, 0.2);
}

.miner-start.mining {
  border-color: #f7931a;
  color: #f7931a;
  background: rgba(247, 147, 26, 0.1);
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .disclaimer { margin-top: 2rem; padding: 0 0.5rem; }
  .theme-btn { top: 1rem; right: 1rem; font-size: 11px; padding: 5px 10px; }
  .miner-window { width: 95vw; }
  .miner-hash { max-width: 180px; }
}
