/* 100xBrands web: clean system. Quiet UI, pixel art only as visuals. */
@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(fonts/instrument-serif-latin-400-normal.woff2) format("woff2"); font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(fonts/instrument-serif-latin-400-italic.woff2) format("woff2"); font-style: italic; font-display: swap; }

:root {
  --bg: #FFFFFF;
  --surface: #F7F8FB;
  --line: #E7E9F0;
  --line-2: #D5D9E5;
  --ink: #0A1230;
  --text: #3D4566;
  --mute: #8A93B2;
  --blue: #0066FF;
  --blue-ink: #0052CC;
  --tint: #EEF4FF;
  --sky: #6FA3FF;
  --grid: #CFDDFF;
  --white: #FFFFFF;
  --paper: #F5F7FC;
  --soft: #DCE4F7;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(10,18,48,.04), 0 8px 28px rgba(10,18,48,.06);
  --gutter: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font-family: "Jakarta", system-ui, sans-serif; font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "calt" 0; /* stop Jakarta turning the x in 100xBrands into × */
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- type ---------- */
.display { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; letter-spacing: -0.01em; line-height: 1.02; text-wrap: balance; }
.display em, .serif { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; }
.lede { color: var(--text); font-size: 17px; }
.label { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.muted { color: var(--mute); }
.small { font-size: 13px; }

/* pill badge */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: 13px; font-weight: 500; color: var(--text);
}
.pill i { width: 7px; height: 7px; background: var(--blue); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1;
  cursor: pointer; transition: background .2s, border-color .2s, color .2s, transform .2s;
  white-space: nowrap;
}
.btn .arr { transition: transform .2s; }
.btn:hover .arr { transform: translateX(3px); }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-ink); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-white { background: var(--white); color: var(--blue); }
.btn-white:hover { background: var(--tint); }
.btn[disabled] { opacity: .6; cursor: wait; }
.link { font-weight: 700; color: var(--blue); display: inline-flex; gap: 6px; align-items: center; }
.link:hover { color: var(--blue-ink); }

/* ---------- cards ---------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card.hover:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-2px); }

/* pixel icons (visual accents, drawn by pixel.js) */
[data-icon] { display: inline-grid; place-items: center; color: var(--blue); }
[data-icon] svg { width: 100%; height: 100%; }

/* ---------- cover cards + rows ---------- */
.cover { display: block; position: relative; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--radius-sm); background: var(--ink); }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.cover:hover img { transform: scale(1.03); }
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: 40%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.shelf > * { scroll-snap-align: start; }

/* ---------- forms ---------- */
.field { display: grid; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink); }
.field i { font-style: normal; font-weight: 500; color: var(--mute); }
.input, .field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=password], .field textarea {
  width: 100%; font: inherit; font-size: 16px; font-weight: 500; color: var(--ink);
  padding: 13px 14px; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  -webkit-appearance: none; appearance: none; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 110px; resize: vertical; }
.input:focus, .field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,102,255,.12); }
.field ::placeholder, .input::placeholder { color: #A9B0C7; }
fieldset.field { border: 0; min-width: 0; }
fieldset.field legend { font-size: 13px; font-weight: 600; margin-bottom: 9px; padding: 0; }
.hp { position: absolute; left: -9999px; }
.status { font-size: 14px; font-weight: 600; }
.status:empty { display: none; }
.status.ok { color: #0A7A3B; }
.status.err { color: #C0332B; }

/* choice chips (checkbox / radio) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--white);
  font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; user-select: none; transition: all .15s;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip:has(input:checked) { background: var(--tint); border-color: var(--blue); color: var(--blue); font-weight: 600; }
.chip:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }

/* dropdown (replaces the OS select menu; built by pixel.js) */
.pselect { position: relative; }
.pselect select { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.pselect-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font: inherit; font-size: 16px; font-weight: 500; text-align: left; color: var(--ink);
  padding: 13px 14px; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius-sm); cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.pselect-btn:hover { border-color: var(--ink); }
.pselect.open .pselect-btn { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,102,255,.12); }
.pselect-caret { width: 10px; height: 7px; flex: 0 0 auto; color: var(--mute); transition: transform .2s; }
.pselect.open .pselect-caret { transform: rotate(180deg); }
.pselect-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30;
  list-style: none; margin: 0; padding: 6px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  max-height: 280px; overflow-y: auto;
  opacity: 0; transform: translateY(-4px); visibility: hidden; transition: opacity .15s, transform .15s, visibility 0s .15s;
}
.pselect.open .pselect-list { opacity: 1; transform: none; visibility: visible; transition: opacity .15s, transform .15s; }
.pselect-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 15px; font-weight: 500; color: var(--ink); cursor: pointer; }
.pselect-list li[aria-selected="true"] { color: var(--blue); font-weight: 600; }
.pselect-list li[aria-selected="true"]::after { content: ""; width: 6px; height: 6px; background: var(--blue); }
.pselect-list li.active { background: var(--surface); }

/* ---------- pixel icon motion: a quiet pixel rebuild on hover ---------- */
.px-build rect { animation: pxin .05s steps(1, end) both; }
@keyframes pxin { from { opacity: 0; } to { opacity: 1; } }

/* ---------- legacy hooks still used by pixel.js ---------- */
.wipe { display: none; }
@keyframes blink { 50% { opacity: .2; } }

@media (prefers-reduced-motion: reduce) {
  .px-build rect { animation: none; }
  .btn, .card, .cover img, .pselect-list, .pselect-caret { transition: none; }
}
