/* ============================================================
   BRICKENCY — brand foundations
   ============================================================ */

:root {
  /* Surfaces */
  --bg:        #EFEFED;
  --bg-soft:   #E4E1DC;
  --bg-card:   #FFFFFF;
  --bg-elev:   #FAFAF8;

  /* Dark surfaces — deep brand navy (replaces the former near-black) */
  --surface-dark:    #232F57;
  --surface-dark-2:  #2C3A66;
  --surface-dark-3:  #36477E;
  --surface-darker:  #1A2444;
  --surface-darkest: #131B33;
  --bg-dark:   #232F57;
  --bg-darker: #1A2444;

  /* Ink */
  --ink:        #1A1E2A;
  --ink-2:      #3B3B40;
  --ink-3:      #6B6A65;
  --ink-mute:   #97958F;
  --ink-faint:  #B0ADA5;
  --ink-onDark: #FFFFFF;
  --ink-onDark-2: rgba(255,255,255,.62);
  --ink-onDark-3: rgba(255,255,255,.32);

  /* Borders */
  --line:       #E4E1DC;
  --line-2:     #D6D2CB;
  --line-3:     #C7C2BA;
  --line-dark:  rgba(255,255,255,.10);
  --line-dark-2:rgba(255,255,255,.18);

  /* Brand accents */
  --orange:     #E8790A;
  --orange-2:   #F08828;
  --orange-3:   #C9620A;
  --blue:       #2457C5;
  --blue-2:     #3E70DE;
  --blue-3:     #1B4399;

  /* States */
  --ok:    #2A8C3C;
  --warn:  #C97A0A;
  --err:   #C0271C;

  /* Radii — very tight (industrial) */
  --r-xs: 2px;
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-pill: 999px;

  /* Type */
  --font-sans: 'IBM Plex Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-display: 'Exo 2', 'IBM Plex Sans', sans-serif;
}

/* Reset (light) */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }

/* Utility tokens used everywhere */
.mono      { font-family: var(--font-mono); }
.display   { font-family: var(--font-display); font-weight: 800; letter-spacing: .02em; }
.uc        { text-transform: uppercase; }
.t-xs      { font-size: 10px; letter-spacing: .14em; }
.t-sm      { font-size: 11px; letter-spacing: .08em; }
.t-md      { font-size: 13px; }
.t-lg      { font-size: 15px; }
.t-or      { color: var(--orange); }
.t-bl      { color: var(--blue); }
.t-mute    { color: var(--ink-mute); }
.t-faint   { color: var(--ink-faint); }

/* ============================================================
   Wordmark — reusable across pages
   ============================================================ */
.brk-mark {
  display: inline-flex; align-items: center; gap: 10px;
  user-select: none;
}
.brk-mark img { height: 40px; width: auto; }
.brk-mark .wm {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: .12em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink);
}
.brk-mark .wm .k { color: var(--orange); }
.brk-mark .wm .y { color: var(--blue); }
.brk-mark.on-dark .wm { color: #fff; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  height: 40px; padding: 0 18px;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, transform .05s;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn-primary   { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-3); }
.btn-dark      { background: var(--surface-dark); color: #fff; }
.btn-dark:hover { background: var(--surface-darkest); }
.btn-ghost     { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-link      { background: transparent; color: var(--ink); padding: 0; height: auto; }
.btn-link:hover { color: var(--orange); }
.btn-sm  { height: 32px; padding: 0 12px; font-size: 11px; }
.btn-lg  { height: 48px; padding: 0 22px; font-size: 13px; }

/* ============================================================
   Pill / chip / tag
   ============================================================ */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase;
  background: #fff;
  color: var(--ink-2);
}
.chip-or { background: rgba(232,121,10,.10); border-color: rgba(232,121,10,.30); color: var(--orange-3); }
.chip-bl { background: rgba(36,87,197,.08); border-color: rgba(36,87,197,.25); color: var(--blue-3); }
.chip-dark { background: var(--surface-dark); color: #fff; border-color: var(--surface-dark); }

/* ============================================================
   Field
   ============================================================ */
.field {
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.field input, .field select {
  border: 0; outline: none; background: transparent; flex: 1;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .05em;
}
.field:focus-within { border-color: var(--surface-dark); }

/* ============================================================
   Page rule — used a lot
   ============================================================ */
.section-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.section-tag::before {
  content: ""; width: 24px; height: 1px; background: currentColor;
}

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

/* ============================================================
   Color swatch
   ============================================================ */
.swatch {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,.18);
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.18), inset 0 2px 3px rgba(255,255,255,.35);
  display: inline-block; flex-shrink: 0;
}

/* ============================================================
   Scrollbar polish (only where wanted)
   ============================================================ */
.fancy-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.fancy-scroll::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }
.fancy-scroll::-webkit-scrollbar-track { background: transparent; }
