/* BitFlight's token and button fork of Finance Bros' B3B house style.
 *
 * The source law lives in ../FBS/docs/HOUSE_STYLE.md. Chunky-flat retro UI:
 * pixel type on dark navy, gold means tappable, hard edges, flat shadows,
 * punchy copy. The test for any new surface: does it look deliberate, dense
 * and blocky, or soft, roomy and explained? Soft/roomy/explained is the tell.
 *
 * Self-hosted, not CDN: a Capacitor build has no network.
 */
@font-face {
  font-family: 'Press Start 2P';
  src: url('../../public/assets/fonts/press-start-2p.woff2') format('woff2'),
       url('../../public/assets/fonts/press-start-2p.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'VT323';
  src: url('../../public/assets/fonts/vt323.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  /* Surfaces — the world is dark navy. */
  --bg: #0a1628;
  --panel: #142238;
  --panel-alt: #102034;

  /* Gold is tappable. It is the only accent. */
  --accent: #ffd700;
  --accent-dim: #d2b200;

  /* Money green is money ONLY. Never decoration. */
  --money: #2ad27a;
  --danger: #ff4444;
  --success: #44dd66;

  /* Ink: dark on gold, cream on dark. Never pure white. */
  --ink: #0a1628;
  --cream: #f8f4e8;
  --dim: #8899aa;

  /* Two fonts. No third. Ever. */
  --font-pixel: 'Press Start 2P', 'Courier New', monospace;
  --font-pixel-body: 'VT323', 'Courier New', monospace;

  /* Flat shadows only. No glow, no blur, no gradient on chrome. */
  --drop: 0 3px 0 rgba(0, 0, 0, 0.45);
  --drop-sm: 0 2px 0 rgba(0, 0, 0, 0.45);
  --card: inset 0 0 0 2px rgba(0, 0, 0, 0.2), 0 3px 0 rgba(0, 0, 0, 0.35);
  --hairline: rgba(255, 255, 255, 0.12);

  --tile-size: 32px;

  /* Legacy aliases — old screens snap to canon instead of drifting off it. */
  --bg-deep: var(--bg);
  --bg-dark: var(--panel-alt);
  --panel-border: var(--accent);
  --text-primary: var(--cream);
  --text-secondary: var(--dim);
  --text-dim: var(--dim);
  --accent-gold: var(--accent);
  --accent-green: var(--money);
  --accent-red: var(--danger);
  --font-retro: var(--font-pixel);
}

/* Press Start 2P renders broken ff/fi/fl at pixel scale. */
* {
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "clig" 0;
  font-synthesis: none;
}

/* The flat gold slab. This is the primary CTA, everywhere, no exceptions. */
.fbs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px; /* touch floor */
  padding: 12px 24px;
  border: 2px solid var(--ink);
  border-radius: 0; /* square corners on chunky chrome */
  background: var(--accent);
  box-shadow: var(--drop);
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: clamp(9px, 1.15vw, 12px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 70ms ease, box-shadow 70ms ease, background 90ms ease;
}

.fbs-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.45); }
.fbs-btn:active { transform: translateY(3px); box-shadow: 0 0 0 rgba(0, 0, 0, 0.45); }
/* Gold ring, not white. Gold reads as ours; a white ring reads as the browser's,
   and BCB already killed white rings app-wide — the confirm modal was one of the
   five it got caught on. The 2px dark border keeps gold-on-gold legible. */
.fbs-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Secondary: transparent, gold text, hairline. Never a second gold slab. */
.fbs-btn--secondary {
  border-color: rgba(255, 215, 0, 0.5);
  background: rgba(20, 34, 56, 0.86);
  box-shadow: var(--drop-sm);
  color: var(--accent);
}
.fbs-btn--secondary:hover { border-color: var(--accent); background: var(--panel); }

.fbs-btn--danger { background: var(--danger); border-color: var(--ink); color: var(--cream); }
