/*
 * Bitdrum brand foundation — Brand Guidelines v1.0.
 *
 * Archivo carries the voice: expanded italic for display, normal width for
 * reading. JetBrains Mono carries anything a person might need to verify —
 * amounts, codes, addresses, receipts. Both are self-hosted so the approval
 * page keeps its `default-src 'self'` policy and makes no third-party request
 * while someone is confirming a payment.
 */

@font-face {
  font-family: Archivo;
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/assets/archivo-latin.woff2") format("woff2");
}
@font-face {
  font-family: Archivo;
  font-style: italic;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/assets/archivo-latin-italic.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/jetbrains-mono-latin.woff2") format("woff2");
}

:root {
  color-scheme: light dark;

  /* Palette. Gold is the ring: primary actions and approval moments. Pulse is
     the signal: live activity and links. Settled appears only once money moved. */
  --gold: #f7931a;
  --on-gold: #17140f;
  --pulse: #2e9bff;
  --settled: #2fa36b;
  --danger: #b3261e;

  /* Paper ground. */
  --bg: #f5f2ec;
  --surface: #ffffff;
  --raised: #faf8f4;
  --line: #ddd6cb;
  --ink: #17140f;
  --body: #4a443b;
  --muted: #6b6358;
  --accent: #e8730c; /* gold darkened to stay readable as text on Paper */

  --radius: 12px;
  --radius-lg: 20px;
  --sans: Archivo, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Ink ground for the utility pages. The landing page pins itself to Paper with
   data-theme="light", the way most marketing sites keep one fixed identity. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17140f;
    --surface: #1f1b15;
    --raised: #221e18;
    --line: #3a342c;
    --ink: #f5f2ec;
    --body: #c9c0b3;
    --muted: #a39a8c;
    --accent: var(--gold);
    --danger: #ff8a80;
    --settled: #4fc08d;
  }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  font-stretch: 115%;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--pulse);
  outline-offset: 2px;
  border-radius: 4px;
}

img {
  max-width: 100%;
}

/* --- Brand marks ---------------------------------------------------------- */

/* The wordmark leans into motion: Archivo Black Italic at full width. */
.wordmark {
  font-weight: 850;
  font-style: italic;
  font-stretch: 125%;
  letter-spacing: -0.055em;
  line-height: 1;
}

/* Clear space equal to the ring width (a third of the mark) on every side. */
.mark {
  display: block;
  flex: none;
  aspect-ratio: 1;
  object-fit: contain;
}

.lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

/* --- Type ----------------------------------------------------------------- */

.display {
  font-weight: 850;
  font-style: italic;
  font-stretch: 125%;
  letter-spacing: -0.05em;
  line-height: 0.95;
  text-wrap: balance;
}

.mono,
code,
kbd,
samp {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* Section numbering and labels, per the guide's "01 · Core idea". */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--body);
}

/* --- Controls ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  font-stretch: 110%;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary {
  background: var(--gold);
  color: var(--on-gold);
}
.btn-primary:hover {
  background: #ffa83a;
  color: var(--on-gold);
}

.btn-secondary {
  border-color: var(--line);
  color: var(--ink);
}
.btn-secondary:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn-ghost {
  padding: 4px 2px;
  border-radius: 4px;
  color: var(--muted);
  font-weight: 500;
  font-stretch: 100%;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-ghost:hover {
  color: var(--ink);
}

.btn[disabled] {
  opacity: 0.55;
  cursor: progress;
}

.btn-block {
  width: 100%;
}

/* Something to read back and verify: a URL, an address, a receipt line. */
.code-box {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  user-select: all;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

/* --- Status --------------------------------------------------------------- */

.is-settled {
  color: var(--settled);
}
.is-error {
  color: var(--danger);
}
.is-muted {
  color: var(--muted);
}

@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;
  }
}
