/*
  Shared theme for every surface: landing page, legal pages, generated content
  pages, and (linked from login.html / play.html) the React app. The landing page
  is the spec. Plain CSS on purpose so static pages need no JavaScript or build
  step to use it. Class names are prefixed dbj- so they never collide with a
  page's own selectors.

  Fonts are self-hosted from /fonts (Fraunces and Inter, both OFL), so no page
  makes a third-party request.
*/

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('/fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;

  /* Felt and trim */
  --felt-900: #0a3519;
  --felt-800: #0d4420;
  --felt-700: #145c2e;
  --felt-600: #1b7a3d;
  --gold: #c9a84c;
  --gold-hi: #e6c86e;
  --ivory: #fbf8f1;

  /* Surfaces */
  --ink: #0e1210;
  --charcoal: #161a17;
  --surface-alt: #111412;
  --tile: #1d221e;
  --tile-hi: #232a24;
  --footer-bg: #0c0f0d;
  --line: rgba(255, 255, 255, 0.06);

  /* Text */
  --text: #f1f5f1;
  --muted: #a3aea6;
  --muted-2: #96a39a;
  --faint: #77847b;

  /* Feedback */
  --good: #34d399;
  --bad: #f87171;

  /* The four actions. Same everywhere: game, landing, strategy chart. */
  --hit: #e3b92f;
  --stand: #d14b3c;
  --double: #3f8fd6;
  --split: #8b6fd1;
  --hit-bg: rgba(227, 185, 47, 0.16);
  --stand-bg: rgba(209, 75, 60, 0.2);
  --double-bg: rgba(63, 143, 214, 0.2);
  --split-bg: rgba(139, 111, 209, 0.22);
  --hit-fg: #f0c94a;
  --stand-fg: #ff7b6b;
  --double-fg: #6fb2f0;
  --split-fg: #b39cf0;

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.dbj-wrap { max-width: 1160px; margin: 0 auto; padding: 0 28px; }

/* ---- Site nav ------------------------------------------------------------ */

.dbj-nav { background: var(--felt-900); font-family: var(--sans); }
.dbj-nav .dbj-wrap { display: flex; align-items: center; height: 64px; gap: 28px; }
.dbj-logo {
  display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 800;
  font-size: 18px; letter-spacing: 0.02em; color: var(--text); text-decoration: none;
}
.dbj-logo img { width: 34px; height: 34px; flex: none; }
.dbj-logo b { font-weight: 800; color: var(--gold); }
.dbj-links { display: flex; gap: 22px; font-size: 14px; white-space: nowrap; }
.dbj-links a { color: rgba(255, 255, 255, 0.7); text-decoration: none; }
.dbj-links a:hover { color: #fff; }
.dbj-links a[aria-current='page'] { color: #fff; font-weight: 600; }
.dbj-right { margin-left: auto; display: flex; gap: 14px; align-items: center; font-size: 14px; }
.dbj-right .dbj-sign { color: rgba(255, 255, 255, 0.75); white-space: nowrap; text-decoration: none; }
.dbj-right .dbj-sign:hover { color: #fff; }

@media (max-width: 920px) { .dbj-links { display: none; } }
@media (max-width: 760px) { .dbj-right .dbj-btn { display: none; } }

/* ---- Buttons ------------------------------------------------------------- */

.dbj-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 14.5px var(--sans); text-decoration: none; text-align: center; white-space: nowrap;
  padding: 13px 18px; border-radius: 12px; border: 1.5px solid transparent; cursor: pointer;
  transition: filter 0.15s, background 0.15s, border-color 0.15s, transform 0.08s;
}
.dbj-btn[hidden] { display: none; }
.dbj-btn:disabled, .dbj-btn[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; }
.dbj-btn:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.dbj-btn--gold {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #231a05; font-weight: 800;
  letter-spacing: 0.04em; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.28);
}
.dbj-btn--gold:hover:not(:disabled) { filter: brightness(1.06); }
.dbj-btn--gold:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.28); }
.dbj-btn--ghost { background: transparent; border-color: rgba(201, 168, 76, 0.7); color: var(--gold); font-weight: 600; padding: 8px 14px; border-radius: 10px; font-size: 14px; }
.dbj-btn--ghost:hover:not(:disabled) { background: rgba(201, 168, 76, 0.1); }
.dbj-btn--outline { background: transparent; border-color: rgba(255, 255, 255, 0.25); color: var(--text); }
.dbj-btn--outline:hover:not(:disabled) { border-color: rgba(255, 255, 255, 0.5); }
.dbj-btn--light { background: #fff; color: #222; }
.dbj-btn--light:hover:not(:disabled) { filter: brightness(0.95); }

/* ---- Callout and keycap -------------------------------------------------- */

.dbj-callout {
  background: var(--tile); border-left: 4px solid var(--gold); border-radius: 12px;
  padding: 16px 20px; color: var(--muted); font-size: 15px; line-height: 1.6;
}
.dbj-callout strong { color: var(--text); }
.dbj-kbd {
  display: inline-block; background: rgba(0, 0, 0, 0.3); border-radius: 5px; padding: 2px 6px;
  font: 600 11px var(--sans); color: rgba(255, 255, 255, 0.8);
}

/* ---- Footer -------------------------------------------------------------- */

.dbj-footer { background: var(--footer-bg); padding: 30px 0; color: var(--faint); font-size: 13px; font-family: var(--sans); }
.dbj-footer .dbj-wrap { display: flex; flex-wrap: wrap; gap: 14px 22px; }
.dbj-footer .dbj-wrap > :first-child { margin-right: auto; }
.dbj-footer a { color: inherit; text-decoration: none; }
.dbj-footer a:hover { color: #c6cfc8; }
