/* Bedrock Pay Systems — shared styles */

:root {
  /* Black + gold — sourced directly from the BPS business card */
  --bg: #0a0806;            /* near-black, hint of warmth */
  --bg-elev-1: #14110b;
  --bg-elev-2: #1d1810;
  --bg-elev-3: #2a2316;

  /* Gold scale: dark trace → bright highlight (chip / contactless) */
  --stratum-1: #3a2d10;
  --stratum-2: #6e5520;
  --stratum-3: #b89240;
  --stratum-4: #e5c46a;

  --ink: #FFFFFF;
  --ink-muted: #d4cfc1;
  --ink-dim: #8a8170;
  --ink-faint: #4a4538;

  --accent: #D4A84A;        /* primary brand gold — CTAs, "Pay" wordmark, accents */
  --accent-soft: #E5C46A;   /* hover / highlight */
  --accent-strong: #BC9035; /* pressed / dim variant */
  --brass: #D4A84A;         /* alias — kept for backward-compat in existing rules */
  --brass-soft: #E5C46A;

  --line: rgba(212, 168, 74, 0.10);
  --line-strong: rgba(212, 168, 74, 0.22);

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;

  --shadow-1: 0 1px 0 rgba(255,255,255,0.04) inset, 0 8px 24px rgba(0,0,0,0.4);

  --font-sans: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Source Serif 4", "Source Serif Pro", "Iowan Old Style", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  /* Warm halo + subtle circuit-pattern texture nodding to the card back */
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(212, 168, 74, 0.10) 0%, transparent 60%),
    var(--bg);
  min-height: 100vh;
  position: relative;
}
body::before {
  /* Faint circuit-trace lattice pulled from the business card pattern */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image:
    linear-gradient(0deg, transparent 49.6%, rgba(212, 168, 74, 0.04) 49.8%, rgba(212, 168, 74, 0.04) 50.2%, transparent 50.4%),
    linear-gradient(90deg, transparent 49.6%, rgba(212, 168, 74, 0.04) 49.8%, rgba(212, 168, 74, 0.04) 50.2%, transparent 50.4%);
  background-size: 64px 64px, 64px 64px;
  mask-image: radial-gradient(ellipse at top, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at top, black 0%, transparent 75%);
}
#root { position: relative; z-index: 1; }

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

/* ---------- Layout primitives ---------- */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}
.container-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.display {
  font-size: clamp(48px, 6vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 500;
}
.display .serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.h1 { font-size: clamp(36px, 4.2vw, 56px); line-height: 1.04; letter-spacing: -0.03em; }
.h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.1; letter-spacing: -0.025em; }
.h3 { font-size: 22px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 500; }
.h4 { font-size: 16px; line-height: 1.3; font-weight: 500; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stratum-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--stratum-2);
  display: inline-block;
}
.eyebrow.no-rule::before { display: none; }

.lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 60ch;
}
.muted { color: var(--ink-muted); }
.dim { color: var(--ink-dim); }
.serif-num {
  font-family: var(--font-serif);
  font-feature-settings: "lnum", "tnum";
  font-style: normal;
}

/* ---------- Stratum motif ---------- */
.stratum {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 28px;
}
.stratum > span {
  display: block;
  height: 4px;
  border-radius: 1px;
}
.stratum.size-lg { width: 64px; gap: 5px; }
.stratum.size-lg > span { height: 8px; border-radius: 2px; }

.stratum > span:nth-child(1) { background: var(--stratum-1); width: 100%; }
.stratum > span:nth-child(2) { background: var(--stratum-2); width: 85%; }
.stratum > span:nth-child(3) { background: var(--stratum-3); width: 70%; }
.stratum > span:nth-child(4) { background: var(--stratum-4); width: 50%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 160ms cubic-bezier(0.2, 0.6, 0.3, 1);
  background: transparent;
  color: var(--ink);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-soft);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  transform: translateY(-1px);
}
.btn-accent {
  background: var(--accent);
  color: var(--accent-soft);
  border-color: var(--accent);
  letter-spacing: 0.01em;
}
.btn-accent:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  transform: translateY(-1px);
}
.btn-light {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-light:hover {
  background: var(--brass-soft);
  border-color: var(--brass-soft);
}
.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--stratum-3);
  background: rgba(212, 168, 74, 0.05);
}
.btn-link {
  padding: 0;
  border: none;
  background: none;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--stratum-2);
  border-radius: 0;
  padding-bottom: 2px;
}
.btn-link:hover { border-bottom-color: var(--brass); color: var(--brass-soft); }

.btn .arrow {
  display: inline-block;
  transition: transform 160ms ease;
}
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(10, 8, 6, 0.82);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 16px;
  color: var(--ink);
}
/* Three-bar gold logo mark from the BPS card — right-aligned descending staircase */
.bps-mark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  flex-shrink: 0;
}
.bps-mark .bar {
  display: block;
  height: 4px;
  border-radius: 1px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(212, 168, 74, 0.25);
}
.bps-mark .bar-1 { width: 100%; }
.bps-mark .bar-2 { width: 72%; }
.bps-mark .bar-3 { width: 46%; }

.bps-wordmark {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.005em;
  color: var(--ink);
  white-space: nowrap;
}
.bps-wordmark .gold {
  color: var(--accent);
  font-weight: 600;
}
/* Footer / oversized variant */
.footer .bps-mark { width: 36px; height: 28px; }
.footer .bps-wordmark { font-size: 19px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}
.nav-link {
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--ink-muted);
  transition: color 120ms, background 120ms;
  cursor: pointer;
}
.nav-link:hover { color: var(--ink); background: rgba(212, 168, 74, 0.05); }
.nav-link.active { color: var(--ink); }
.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  margin-top: 120px;
  padding: 64px 0 40px;
  background: var(--bg-elev-1);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stratum-3);
  margin: 0 0 18px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--ink-muted); font-size: 14px; transition: color 120ms; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.05em;
}

/* ---------- Section primitives ---------- */
.section {
  padding: 100px 0;
  position: relative;
}
.section-tight { padding: 64px 0; }
.section-header {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  margin-bottom: 64px;
  align-items: end;
}
.section-header.center {
  grid-template-columns: 1fr;
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 800px) {
  .section-header { grid-template-columns: 1fr; gap: 16px; }
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 0;
  border: none;
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-elev-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 200ms, transform 200ms;
}
.card:hover {
  border-color: var(--line-strong);
}
.card-elevated {
  background: linear-gradient(180deg, var(--bg-elev-2) 0%, var(--bg-elev-1) 100%);
}

/* ---------- Tag / chip ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  background: rgba(58, 45, 16, 0.5);
}
.chip .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

/* ---------- Utility ---------- */
.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.between { display: flex; justify-content: space-between; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Visually-hidden but accessible */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Striped placeholder for imagery */
.placeholder-img {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(212, 168, 74, 0.04) 0 14px,
      rgba(212, 168, 74, 0.07) 14px 28px
    ),
    var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  text-transform: uppercase;
}
