/* ============================================================
   ONION CORE HUB — component styles. Consumes tokens.css only.
   ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--sp-4); }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--c-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-border);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--tap); padding-top: var(--sp-2); padding-bottom: var(--sp-2);
}
.brand { display: flex; align-items: center; gap: var(--sp-3); text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name { font-weight: var(--fw-bold); letter-spacing: 0.02em; font-size: var(--fs-h3); }
.head-nav { display: flex; gap: var(--sp-2); }
.head-nav a {
  text-decoration: none; color: var(--c-text-muted);
  padding: var(--sp-2) var(--sp-3); border-radius: var(--r-full);
  font-size: var(--fs-small); font-weight: var(--fw-medium);
  min-height: var(--tap); display: inline-flex; align-items: center;
}
.head-nav a:hover { color: var(--c-text); background: var(--c-surface-2); }

/* ---------- Hero ---------- */
.hero { padding: var(--sp-8) 0 var(--sp-7); text-align: center; }
.hero-mark { width: 96px; height: 96px; margin: 0 auto var(--sp-5); filter: drop-shadow(0 10px 26px rgba(0, 229, 255, 0.28)); }
.hero h1 {
  margin: 0 0 var(--sp-3); font-size: var(--fs-display);
  line-height: var(--lh-tight); font-weight: var(--fw-bold); letter-spacing: -0.01em;
}
.hero h1 .accent {
  background: linear-gradient(92deg, var(--c-accent) 10%, var(--c-violet) 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-actions { margin-top: var(--sp-5); display: flex; justify-content: center; gap: var(--sp-3); flex-wrap: wrap; }
.hero p {
  margin: 0 auto; max-width: 36rem; color: var(--c-text-muted);
  font-size: var(--fs-h3); line-height: var(--lh-body);
}
.hero .free-line {
  margin-top: var(--sp-4); color: var(--c-gold);
  font-size: var(--fs-small); font-weight: var(--fw-medium); letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Product grid ---------- */
.section-title {
  font-size: var(--fs-h2); font-weight: var(--fw-bold);
  margin: var(--sp-7) 0 var(--sp-2); line-height: var(--lh-tight);
}
.section-sub { color: var(--c-text-muted); margin: 0 0 var(--sp-5); max-width: 40rem; }
.grid {
  display: grid; gap: var(--sp-4);
  grid-template-columns: 1fr;
  padding-bottom: var(--sp-7);
}
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  padding: var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-3);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--sh-glow); border-color: var(--c-border-strong); }
.card .icon {
  width: 52px; height: 52px; border-radius: var(--r-md);
  background: var(--c-surface-2); border: 1px solid var(--c-border);
  display: grid; place-items: center; color: var(--c-accent);
}
.card .icon svg { width: 28px; height: 28px; }
.card h3 { margin: 0; font-size: var(--fs-h3); font-weight: var(--fw-bold); line-height: var(--lh-tight); }
.card p { margin: 0; color: var(--c-text-muted); flex: 1; }
.card .actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }

.badge {
  align-self: flex-start;
  font-size: var(--fs-small); font-weight: var(--fw-medium);
  color: var(--c-accent-strong);
  border: 1px solid var(--c-border-strong);
  background: var(--c-surface-2);
  border-radius: var(--r-full);
  padding: var(--sp-1) var(--sp-3);
}
.badge.locked { color: var(--c-gold); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--tap); padding: var(--sp-2) var(--sp-5);
  border-radius: var(--r-full);
  font-weight: var(--fw-medium); text-decoration: none;
  border: 1px solid var(--c-border-strong);
  background: var(--c-surface-2); color: var(--c-text);
}
.btn:hover { border-color: var(--c-accent); color: var(--c-accent-strong); }
.btn.primary { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-accent-ink); }
.btn.primary:hover { background: var(--c-accent-strong); color: var(--c-accent-ink); }
.btn svg { width: 18px; height: 18px; }

/* ---------- About band ---------- */
.about {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); box-shadow: var(--sh-md);
  padding: var(--sp-6); margin-bottom: var(--sp-8);
}
.about h2 { margin: 0 0 var(--sp-3); font-size: var(--fs-h2); line-height: var(--lh-tight); }
.about p { margin: 0 0 var(--sp-3); color: var(--c-text-muted); max-width: 44rem; }
.about p:last-child { margin-bottom: 0; }
.about strong { color: var(--c-text); }

/* ---------- Websites directory ---------- */
.btn.small { min-height: 40px; padding: var(--sp-1) var(--sp-4); font-size: var(--fs-small); }
.btn.disabled { opacity: 0.55; pointer-events: none; }
.badge.soon { color: var(--c-violet-strong); }

.dir-controls {
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  align-items: stretch; margin-bottom: var(--sp-4);
}
.search-box {
  flex: 1 1 260px; display: flex; align-items: center; gap: var(--sp-2);
  background: var(--c-surface); border: 1px solid var(--c-border-strong);
  border-radius: var(--r-full); padding: 0 var(--sp-4); min-height: var(--tap);
  color: var(--c-text-faint);
}
.search-box svg { width: 20px; height: 20px; flex: none; }
.search-box input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: var(--c-text); font: inherit; font-size: var(--fs-body);
}
.search-box input::placeholder { color: var(--c-text-faint); }
.search-box:focus-within { border-color: var(--c-accent); box-shadow: var(--sh-glow); }
.sort-box {
  display: flex; align-items: center; gap: var(--sp-2);
  color: var(--c-text-muted); font-size: var(--fs-small); font-weight: var(--fw-medium);
}
.sort-box select {
  min-height: var(--tap); border-radius: var(--r-full);
  background: var(--c-surface); color: var(--c-text);
  border: 1px solid var(--c-border-strong); padding: 0 var(--sp-4); font: inherit;
}
.chip-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.chip {
  min-height: 40px; padding: var(--sp-1) var(--sp-4); border-radius: var(--r-full);
  background: var(--c-surface); color: var(--c-text-muted);
  border: 1px solid var(--c-border); font: inherit; font-size: var(--fs-small);
  font-weight: var(--fw-medium); cursor: pointer;
}
.chip:hover { color: var(--c-text); border-color: var(--c-border-strong); }
.chip.on {
  background: var(--c-accent); border-color: var(--c-accent); color: var(--c-accent-ink);
  font-weight: var(--fw-bold);
}
.cat-title {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-h3); font-weight: var(--fw-bold);
  margin: var(--sp-6) 0 var(--sp-4); line-height: var(--lh-tight);
}
.cat-title svg { width: 20px; height: 20px; color: var(--c-violet-strong); }
.site-grid { padding-bottom: var(--sp-4); }
.site-card .site-top { display: flex; align-items: flex-start; justify-content: space-between; }
.site-card .fqdn {
  color: var(--c-violet-strong); font-size: var(--fs-small); font-weight: var(--fw-medium);
  margin-top: calc(-1 * var(--sp-2));
}
.fav-btn {
  width: 40px; height: 40px; flex: none; border-radius: var(--r-full);
  display: grid; place-items: center; cursor: pointer;
  background: var(--c-surface-2); border: 1px solid var(--c-border);
  color: var(--c-text-faint);
}
.fav-btn svg { width: 20px; height: 20px; }
.fav-btn:hover { color: var(--c-gold); border-color: var(--c-gold); }
.fav-btn.on { color: var(--c-gold); border-color: var(--c-gold); }
.fav-btn.on svg path { fill: var(--c-gold); }
.site-meta {
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
  color: var(--c-text-muted); font-size: var(--fs-small); font-weight: var(--fw-medium);
}
.site-meta .badge { margin-left: auto; }
.dot { width: 9px; height: 9px; border-radius: var(--r-full); flex: none; }
.dot.live { background: var(--c-live); box-shadow: 0 0 8px var(--c-live); }
.dot.soon { background: var(--c-soon); box-shadow: 0 0 8px var(--c-soon); }
.site-sections { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.sec-chip {
  display: inline-flex; align-items: center; min-height: 34px;
  padding: var(--sp-1) var(--sp-3); border-radius: var(--r-full);
  border: 1px solid var(--c-border-strong); background: var(--c-bg);
  color: var(--c-accent-strong); text-decoration: none;
  font-size: var(--fs-small); font-weight: var(--fw-medium);
}
.sec-chip:hover { border-color: var(--c-accent); box-shadow: var(--sh-glow); }
.recent-row {
  display: flex; gap: var(--sp-2); overflow-x: auto; padding-bottom: var(--sp-3);
  scrollbar-width: thin;
}
.recent-chip {
  display: inline-flex; align-items: center; gap: var(--sp-2); flex: none;
  min-height: 40px; padding: var(--sp-1) var(--sp-4); border-radius: var(--r-full);
  background: var(--c-surface); border: 1px solid var(--c-border);
  color: var(--c-text); text-decoration: none; font-size: var(--fs-small);
  font-weight: var(--fw-medium);
}
.recent-chip svg { width: 18px; height: 18px; color: var(--c-accent); }
.recent-chip:hover { border-color: var(--c-accent); }
.dir-empty { color: var(--c-text-muted); padding-bottom: var(--sp-6); }

/* ---------- Footer ---------- */
.site-foot {
  background: var(--c-bg-deep); border-top: 1px solid var(--c-border);
  padding: var(--sp-6) 0 var(--sp-7);
  color: var(--c-text-faint); font-size: var(--fs-small);
}
.site-foot .wrap { display: flex; flex-direction: column; gap: var(--sp-2); }
.site-foot .foot-brand { color: var(--c-text-muted); font-weight: var(--fw-medium); }
