/* AdShelf design system v2
   Clean marketplace: white ground, ink type, bold cobalt primary,
   bright content-driven color (chips, tiles, badges).
   Bricolage Grotesque for display, Instrument Sans for body, Spline Sans Mono for data. */

:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --surface-2: #eef0f4;
  --ink: #0e1015;
  --ink-soft: #4b5162;
  --ink-faint: #878ea0;
  --line: #e7e9ee;
  --line-strong: #d5d9e2;

  --accent: #2b5cff;
  --accent-deep: #1741d6;
  --accent-wash: #eef2ff;

  --green: #0d9b5c;
  --green-wash: #e7f8f0;
  --amber: #e07c00;
  --amber-wash: #fff4e3;
  --pink: #e0348b;
  --pink-wash: #fdeaf4;
  --violet: #7c3aed;
  --violet-wash: #f3ecfe;

  --radius: 12px;
  --radius-sm: 8px;
  --font-display: "Manrope", "Helvetica Neue", sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", sans-serif;
  --font-mono: "Spline Sans Mono", "SF Mono", monospace;
  --measure: 34rem;
  --shell: 76rem;

  --shadow-sm: 0 1px 2px rgba(14, 16, 21, 0.05);
  --shadow-md: 0 8px 24px -8px rgba(14, 16, 21, 0.12), 0 2px 6px rgba(14, 16, 21, 0.05);
  --shadow-lg: 0 20px 48px -16px rgba(14, 16, 21, 0.18), 0 4px 12px rgba(14, 16, 21, 0.06);
}

/* Legacy aliases kept so page-level styles keep working */
:root {
  --paper: var(--bg);
  --paper-raised: var(--bg);
  --paper-sunk: var(--surface);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* The site lives inside the window: no sideways scrolling, ever */
html, body { overflow-x: clip; max-width: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; }

img { max-width: 100%; display: block; }

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

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.04;
}

.display-xl { font-size: clamp(2.6rem, 6.2vw, 4.4rem); font-weight: 800; }
.display-lg { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.display-md { font-size: clamp(1.35rem, 2.4vw, 1.8rem); }

.display-it { font-style: normal; color: var(--accent); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--accent-wash);
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
}

/* Homepage live stats: cream/ink chip, not the blue kicker */
.live-ticker {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 0.55rem;
  margin: 0;
  padding: 0.38rem 0.95rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}

.live-ticker-online {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--green);
  font-weight: 600;
  white-space: nowrap;
}

.live-ticker-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-wash);
}

.live-ticker-sep {
  color: var(--ink-faint);
  font-weight: 400;
}

.live-ticker-visits {
  color: var(--ink);
  white-space: nowrap;
}

.live-ticker-stats {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.live-ticker-stats:hover { text-decoration: underline; }

.live-ticker-stats:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 4px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.warn { color: var(--amber); }

.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.22rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* ---------- Shell ---------- */

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.ruled-top { border-top: 1px solid var(--line); }
.ruled-strong { border-top: 1px solid var(--line-strong); }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 3.9rem;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.wordmark .tick-svg {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
}

.wordmark .tick-svg.tick-sm { width: 1em; height: 1em; }

.nav-links {
  display: flex;
  gap: 1.6rem;
  margin-left: auto;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.15s ease;
  white-space: nowrap;
}

.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--accent); }

/* The nav CTA is a button, not a text link: keep its own colors */
.nav-links a.btn-solid { color: #fff; }
.nav-links a.btn-solid:hover { color: #fff; }
.nav-links a.btn-accent { color: #fff; }

@media (max-width: 720px) {
  .nav-links a.nav-hide-sm { display: none; }
  .nav-inner { gap: 0.75rem; }
  .nav-links { gap: 0.9rem; }
  .wordmark { font-size: 1.15rem; }
  .nav-links .btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.72rem 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  background: var(--bg);
  color: var(--ink);
}

.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }

.btn-solid { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-solid:hover { background: #23283a; border-color: #23283a; }

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(43, 92, 255, 0.55);
}
.btn-accent:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

.btn-ghost { border-color: var(--line-strong); color: var(--ink-soft); background: transparent; }
.btn-ghost:hover { color: var(--ink); border-color: var(--ink); background: transparent; }

.btn-sm { padding: 0.45rem 0.95rem; font-size: 0.85rem; }

.btn[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.btn .arrow { transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.24rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--surface);
  white-space: nowrap;
}

.badge-verified {
  border-color: transparent;
  color: var(--green);
  background: var(--green-wash);
}

.badge-promoted {
  border-color: transparent;
  color: var(--amber);
  background: var(--amber-wash);
}

.badge-soon {
  border-style: dashed;
  background: transparent;
  color: var(--ink-faint);
}

.badge-live { border-color: transparent; color: var(--green); background: var(--green-wash); }
.badge-draft { border-color: var(--line-strong); color: var(--ink-faint); }

.badge .dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- Listing rows (board) ---------- */

.listing-row {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) 1fr 1fr 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.15rem 1.1rem;
  margin: 0 -1.1rem;
  border-top: 1px solid var(--line);
  border-radius: 0;
  text-decoration: none;
  transition: background 0.15s ease;
  position: relative;
}

.listing-row:last-child { border-bottom: 1px solid var(--line); }

.listing-row:hover { background: var(--surface); border-radius: var(--radius); }
.listing-row:hover + .listing-row { border-top-color: transparent; }

.listing-row:hover .row-cta { background: var(--ink); border-color: var(--ink); color: #fff; }

.site-mark {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.site-logo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
  padding: 18%;
  box-sizing: border-box;
}

.row-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.row-name span.name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-niche {
  margin-top: 0.35rem;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.tag {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

.row-stat .stat-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 0.2rem;
}

.row-stat .stat-value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.row-stat .stat-value .faint { font-family: var(--font-mono); font-weight: 400; }

@media (max-width: 860px) {
  .listing-row { grid-template-columns: repeat(3, auto); justify-content: start; column-gap: 1.5rem; row-gap: 0.85rem; padding: 1.1rem 0.8rem; margin: 0 -0.8rem; }
  .listing-row .row-head { grid-column: 1 / -1; }
  .listing-row .row-cta { display: none; }
  .listing-row .row-stat .stat-value { white-space: nowrap; }
}

/* ---------- Forms ---------- */

.field { margin-bottom: 1.4rem; }

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.45rem;
}

.field label .req { color: var(--accent); }

.field .hint {
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-top: 0.35rem;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="url"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.68rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}

.field input:disabled,
.field select:disabled,
.field textarea:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  background: var(--paper-sunk);
}

.field textarea { resize: vertical; min-height: 6rem; }

.field input.invalid, .field select.invalid, .field textarea.invalid {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px var(--pink-wash);
}

.field-error {
  font-size: 0.82rem;
  color: var(--pink);
  margin-top: 0.35rem;
  display: none;
}

.field.show-error .field-error { display: block; }

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.25rem;
}

@media (max-width: 640px) {
  .field-grid { grid-template-columns: 1fr; }
}

/* ---------- Cards / panels ---------- */

.panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: var(--shadow-sm);
}

.panel-sunk {
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  box-shadow: none;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(4rem, 9vw, 7rem);
  padding: 2.5rem 0 3rem;
  background: var(--surface);
}

.footer a { text-decoration: none; color: var(--ink-soft); font-size: 0.9rem; font-weight: 500; }
.footer a:hover { color: var(--ink); }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* ---------- Reveal motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Utility ---------- */

.stack-xs > * + * { margin-top: 0.5rem; }
.stack-sm > * + * { margin-top: 1rem; }
.stack-md > * + * { margin-top: 1.75rem; }

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
}

hr.rule { border: none; border-top: 1px solid var(--line); }

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translate(-50%, 1rem);
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 200;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }
