/* whitelabel-logos · logos.whitelabel.dev */

:root {
  --bg: #ffffff;
  --bg-card: rgba(5,5,5,0.02);
  --ink: #050505;
  --ink-soft: rgba(5,5,5,0.65);
  --ink-quiet: rgba(5,5,5,0.42);
  --line: rgba(5,5,5,0.16);
  --line-soft: rgba(5,5,5,0.07);
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
::selection { background: var(--ink); color: var(--bg); }

/* ── topbar ──────────────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 2rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.6));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  font-family: var(--font-mono); font-size: 0.75rem;
  letter-spacing: 0.12em; text-transform: lowercase;
}
.brand-mark { display: inline-block; width: 1rem; height: 1rem; border: 1.5px solid var(--ink); position: relative; }
.brand-mark::after { content: ''; position: absolute; inset: 28%; border: 1.5px solid var(--ink); }
.brand-name { font-weight: 500; }
.brand-dot  { color: rgba(5,5,5,0.45); }
.brand-sub  { color: rgba(5,5,5,0.45); padding-left: 0.35rem; border-left: 1px solid var(--line-soft); margin-left: 0.35rem; }
.topbar nav { display: flex; gap: 1.2rem; }
.topbar nav a {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  transition: color 0.2s ease;
}
.topbar nav a:hover { color: var(--ink); }

/* ── hero ────────────────────────────────────────────────────────── */
.hero {
  padding: 9rem 2rem 3rem;
  max-width: 60rem;
  margin: 0 auto;
  text-align: center;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.35em;
  text-transform: lowercase;
  color: var(--ink-quiet);
  margin: 0 0 1.6rem;
}
.hero h1 {
  font-family: var(--font-sans);
  font-weight: 200;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0 0 1.4rem;
}
.hero-sub {
  font-family: var(--font-sans);
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 44rem;
  margin: 0 auto;
}

/* ── controls ────────────────────────────────────────────────────── */
.controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2.5rem auto 2rem;
  padding: 0 2rem;
}
.ctrl-group {
  display: inline-flex;
  border: 1px solid var(--line);
  background: rgba(5,5,5,0.02);
}
.ctrl-btn {
  background: transparent;
  border: 0;
  color: var(--ink-quiet);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  padding: 0.7rem 1.2rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.ctrl-btn + .ctrl-btn { border-left: 1px solid var(--line); }
.ctrl-btn:hover { color: var(--ink); background: rgba(5,5,5,0.04); }
.ctrl-btn.is-active { color: #ffffff; background: var(--ink); }
.ctrl-btn.is-disabled, .ctrl-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.ctrl-btn.is-disabled:hover, .ctrl-btn:disabled:hover { color: var(--ink-quiet); background: transparent; }

/* ── grid ────────────────────────────────────────────────────────── */
.grid {
  max-width: 96rem;
  margin: 0 auto;
  padding: 0 2rem 5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
  gap: 1.2rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: rgba(5,5,5,0.32); transform: translateY(-3px); box-shadow: 0 8px 30px rgba(5,5,5,0.05); }

/* Canvas defaults to light; flip to dark via [data-bg="dark"]. */
.canvas {
  background: #fafafa;
  color: #050505;
  height: 14rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.25s ease, color 0.25s ease;
}
.grid[data-bg="dark"] .canvas { background: #050505; color: #ffffff; }

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
}
.lockup .mark {
  width: 5rem;
  height: 5rem;
  flex-shrink: 0;
  color: inherit;
}
.lockup .mark svg { width: 100%; height: 100%; display: block; }

.wordmark {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 2.2rem;
  letter-spacing: -0.02em;
  line-height: 1;
  color: currentColor;
}
/* em is the product-noun hook. Defaults to 500 (semi-bold) — this is the
   original "product · bold ON" state. The product-bold toggle starts
   pre-active; clicking it OFF lowers em to 300 to match the name. */
.wordmark em {
  font-style: normal;
  font-weight: 500;
}
.wordmark .wm-dot { opacity: 0.45; }

/* mark-only view */
.grid[data-view="mark"] .wordmark { display: none; }
.grid[data-view="mark"] .lockup .mark { width: 7rem; height: 7rem; }

/* ── card footer ─────────────────────────────────────────────────── */
.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 1.1rem 1.3rem;
  gap: 1rem;
}
.card-name {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1.05rem;
  margin: 0 0 0.2rem;
}
.card-domain {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--ink-quiet);
  margin: 0;
}
.card-actions {
  display: inline-flex;
  gap: 0.4rem;
}
.dl {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 0.45rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.dl:hover { color: var(--ink); border-color: rgba(5,5,5,0.4); background: rgba(5,5,5,0.04); }

/* ── rules ───────────────────────────────────────────────────────── */
.rules {
  max-width: 60rem;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}
.rules h2 {
  font-family: var(--font-sans);
  font-weight: 200;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.03em;
  margin: 0 0 1.6rem;
}
.rules-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.rules-list li {
  font-family: var(--font-sans);
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.6;
  padding-left: 1.2rem;
  position: relative;
}
.rules-list li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: var(--ink-quiet);
  font-size: 0.7em;
  top: 0.45em;
}
.rules-list strong { color: var(--ink); font-weight: 500; }

/* ── footer ──────────────────────────────────────────────────────── */
.bottombar {
  border-top: 1px solid var(--line-soft);
  padding: 1.5rem 2rem;
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--ink-quiet);
}
.bottombar a:hover { color: var(--ink); }

/* ── mobile ──────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .topbar { padding: 0.9rem 1.1rem; }
  .topbar nav { gap: 0.7rem; }
  .brand-sub { display: none; }
  .hero { padding: 6rem 1rem 2rem; }
  .grid { padding: 0 1rem 3rem; }
  .canvas { height: 11rem; padding: 1rem; }
  .lockup { gap: 0.9rem; }
  .lockup .mark { width: 3.5rem; height: 3.5rem; }
  .wordmark { font-size: 1.4rem; }
}

/* ── app icon view (iOS-style preview) ───────────────────────────── */
.grid[data-view="appicon"] .wordmark { display: none; }
.grid[data-view="appicon"] .lockup .mark {
  width: 8rem;
  height: 8rem;
  padding: 1.5rem;
  background: #ffffff;
  border-radius: 1.8rem;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.4) inset,
    0 12px 30px rgba(0,0,0,0.18);
  color: #050505;
  box-sizing: border-box;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.grid[data-view="appicon"][data-bg="dark"] .lockup .mark {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.5) inset,
    0 12px 36px rgba(0,0,0,0.55);
}
.grid[data-view="appicon"] .lockup .mark svg {
  width: 100%;
  height: 100%;
}

/* ── brand-name input (top of controls) ──────────────────────────── */
.ctrl-input-wrap {
  display: inline-flex; align-items: stretch;
  border: 1px solid var(--line);
  background: rgba(5,5,5,0.02);
  overflow: hidden;
}
.ctrl-input-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--ink-quiet);
  padding: 0.7rem 0.9rem;
  border-right: 1px solid var(--line);
  background: rgba(5,5,5,0.04);
  display: inline-flex; align-items: center;
}
.ctrl-input {
  border: 0; outline: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.55rem 0.85rem;
  min-width: 9rem;
  letter-spacing: -0.005em;
}
.ctrl-input:focus { background: rgba(5,5,5,0.04); }
.ctrl-input::placeholder { color: var(--ink-quiet); }

/* ── color picker (filled mode) ──────────────────────────────────── */
.ctrl-group-fill { gap: 0; }
.ctrl-color {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem 0.25rem 0.55rem;
  border-left: 1px solid var(--line);
  background: rgba(5,5,5,0.02);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--ink-quiet);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}
.ctrl-color:hover { background: rgba(5,5,5,0.04); color: var(--ink); }
.ctrl-color.is-disabled { opacity: 0.4; cursor: not-allowed; }
.ctrl-color.is-disabled:hover { background: rgba(5,5,5,0.02); color: var(--ink-quiet); }
.ctrl-color input[type="color"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: inherit;
  border: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}
.ctrl-color-swatch {
  display: inline-block;
  width: 1.1rem; height: 1.1rem;
  border: 1px solid var(--line);
  background: #ffffff;
  pointer-events: none;
}
.ctrl-color-reset {
  position: relative;
  background: transparent;
  border: 0;
  font-family: inherit;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--ink-quiet);
  text-transform: lowercase;
  cursor: pointer;
  padding: 0 0.15rem;
  z-index: 2;
}
.ctrl-color-reset:hover { color: var(--ink); }

/* ── colors panel (3 colors: stroke / glyph / fill) ──────────────── */
.color-panel {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin: 0 auto 2rem;
  padding: 0 2rem;
}
.color-row {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line);
  background: rgba(5,5,5,0.02);
  overflow: hidden;
  transition: opacity 0.2s ease;
}
.color-row.is-disabled { opacity: 0.35; pointer-events: none; }
.color-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--ink-quiet);
  padding: 0.55rem 0.8rem;
  background: rgba(5,5,5,0.05);
  border-right: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
}
.color-swatch {
  position: relative;
  display: inline-block;
  width: 2.2rem;
  cursor: pointer;
  background: var(--bg);
  border-right: 1px solid var(--line);
}
.color-swatch input[type="color"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%; height: 100%;
  border: 0; padding: 0;
  cursor: pointer;
}
.color-swatch-chip {
  display: block;
  width: 100%; height: 100%;
  background: #fff;
  pointer-events: none;
}
.color-hex {
  border: 0; outline: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  padding: 0.55rem 0.7rem;
  width: 5.4rem;
  text-transform: uppercase;
  border-right: 1px solid var(--line);
}
.color-hex:focus { background: rgba(5,5,5,0.04); }
.color-hex.is-invalid { color: rgba(220,80,80,0.95); }
.color-reset {
  background: transparent;
  border: 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--ink-quiet);
  padding: 0 0.7rem;
  cursor: pointer;
  visibility: hidden;
}
.color-reset.is-shown { visibility: visible; }
.color-reset:hover { color: var(--ink); }
.controls-cont { margin-top: 0; }

/* ── name / product bold toggles ──────────────────────────────────
   Default state: name = 300 (light), product (em) = 500 (semi-bold).
   - "name · bold" toggle ON  → name jumps to 500 to match product.
   - "product · bold" toggle OFF → product drops to 300 to match name. */
.grid[data-name-bold="1"] .wordmark       { font-weight: 500; }
.grid[data-product-bold="0"] .wordmark em { font-weight: 300; }
.grid[data-name-bold="1"] .card-name      { font-weight: 500; }
