/* JBlock brand page
   Swap the two font stacks below to whatever the frontpage already loads. */
:root {
  --jb-orange: #eb6423;
  --jb-bone: #f8fcf8;
  --jb-white: #ffffff;
  --jb-ink: #0a0a0c;

  --surface-0: #0a0a0c;
  --surface-1: #131317;
  --surface-2: #1b1b21;
  --line: #2a2a33;
  --text: #e8e8ec;
  --text-dim: #8b8b98;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Barlow', sans-serif;
  --font-mono:    'Share Tech Mono', monospace;
  
  --radius: 4px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--surface-0);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--jb-orange); }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.masthead { padding: 72px 0 40px; border-bottom: 1px solid var(--line); }
.masthead__mark { height: 64px; width: auto; display: block; margin-bottom: 28px; }
.masthead h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 7vw, 68px);
  line-height: .95;
  letter-spacing: -.02em;
  margin: 0 0 16px;
  text-transform: uppercase;
}
.masthead h1 em { font-style: normal; color: var(--jb-orange); }
.masthead p { max-width: 58ch; color: var(--text-dim); margin: 0 0 24px; }

/* ---------- sticky surface switcher (the one bold thing) ---------- */
.surfacebar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10,10,12,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.surfacebar__inner {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px; max-width: 1140px; margin: 0 auto;
  flex-wrap: wrap;
}
.surfacebar__label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-dim);
}
.swatches { display: flex; gap: 8px; }
.swatch {
  width: 34px; height: 34px; border-radius: var(--radius);
  border: 1px solid var(--line); cursor: pointer; padding: 0;
  transition: transform .12s ease, box-shadow .12s ease;
}
.swatch:hover { transform: translateY(-1px); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--jb-orange); }
.swatch:focus-visible { outline: 2px solid var(--jb-orange); outline-offset: 2px; }
.swatch--ink { background: #0a0a0c; }
.swatch--bone { background: #f8fcf8; }
.swatch--orange { background: var(--jb-orange); }
.swatch--checker {
  background-image:
    linear-gradient(45deg, #2a2a33 25%, transparent 25%),
    linear-gradient(-45deg, #2a2a33 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2a2a33 75%),
    linear-gradient(-45deg, transparent 75%, #2a2a33 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0;
  background-color: #16161b;
}

/* ---------- sections ---------- */
section { padding: 56px 0; border-bottom: 1px solid var(--line); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
h2 {
  font-family: var(--font-display);
  font-size: 22px; text-transform: uppercase; letter-spacing: .04em;
  margin: 0;
}
.sec-note { color: var(--text-dim); font-size: 13px; margin: 0; }

/* ---------- asset cards ---------- */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-1);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.card__preview {
  min-height: 180px;
  display: grid; place-items: center;
  padding: 28px;
  transition: background-color .18s ease;
}
.card__preview img { max-width: 100%; max-height: 124px; height: auto; }

/* surfaces applied via data attribute on <body> */
body[data-surface="ink"]    .card__preview { background: #0a0a0c; }
body[data-surface="bone"]   .card__preview { background: #f8fcf8; }
body[data-surface="orange"] .card__preview { background: var(--jb-orange); }
body[data-surface="checker"] .card__preview {
  background-color: #16161b;
  background-image:
    linear-gradient(45deg, #22222a 25%, transparent 25%),
    linear-gradient(-45deg, #22222a 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #22222a 75%),
    linear-gradient(-45deg, transparent 75%, #22222a 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}

.card__body { padding: 16px 18px 18px; border-top: 1px solid var(--line); }
.card__name { font-family: var(--font-display); font-size: 14px; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 2px; }
.card__meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); margin: 0 0 14px; }

.filerow { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-family: var(--font-mono); font-size: 11px;
  padding: 5px 9px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); text-decoration: none; cursor: pointer;
  transition: border-color .12s ease, color .12s ease;
}
.chip:hover { border-color: var(--jb-orange); color: var(--jb-orange); }
.chip:focus-visible { outline: 2px solid var(--jb-orange); outline-offset: 2px; }
.chip--primary { border-color: var(--jb-orange); color: var(--jb-orange); }

/* ---------- palette ---------- */
.palette { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.colour {
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-align: left; padding: 0;
  background: var(--surface-1); color: var(--text); cursor: pointer; font: inherit;
}
.colour:focus-visible { outline: 2px solid var(--jb-orange); outline-offset: 2px; }
.colour__chip { height: 76px; }
.colour__info { padding: 12px 14px; }
.colour__name { font-size: 13px; font-weight: 600; }
.colour__hex, .colour__var { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); display: block; }

/* ---------- rules ---------- */
.rules { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.rule { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: var(--surface-1); }
.rule h3 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; font-family: var(--font-display); }
.rule p { margin: 0; color: var(--text-dim); font-size: 13px; }
.rule--no h3 { color: #ff6b6b; }
.rule--ok h3 { color: var(--jb-orange); }

/* ---------- embed ---------- */
pre.embed {
  font-family: var(--font-mono); font-size: 12px;
  background: var(--surface-1); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; margin: 0 0 10px;
}

footer { padding: 40px 0 72px; color: var(--text-dim); font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px);
  background: var(--jb-orange); color: #fff;
  font-family: var(--font-mono); font-size: 12px;
  padding: 9px 16px; border-radius: var(--radius);
  opacity: 0; pointer-events: none; transition: opacity .16s ease, transform .16s ease;
  z-index: 50;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
