/* =============================================================
   ComHub — shared design tokens + base components
   Tokens mirror admin/src/theme.css so the public site and the
   admin dashboard read as one product.
   ============================================================= */

:root {
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --bg: #f7f4ed;
  --bg-soft: #efebe0;
  --bg-card: #ffffff;
  --fg: #1a1814;
  --fg-strong: #0a0907;
  --fg-muted: #6b6760;
  --fg-subtle: #94908a;
  --border: #e0dac9;
  --border-strong: #c9c2ae;

  --accent: oklch(0.56 0.14 38);
  --accent-hover: oklch(0.5 0.14 38);
  --accent-soft: oklch(0.93 0.04 38);
  --accent-fg: #ffffff;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  --shadow-sm: 0 1px 2px rgba(20, 18, 14, 0.04), 0 1px 1px rgba(20, 18, 14, 0.03);
  --shadow-md: 0 4px 12px rgba(20, 18, 14, 0.06), 0 2px 4px rgba(20, 18, 14, 0.04);
  --shadow-lg: 0 20px 40px -16px rgba(20, 18, 14, 0.18);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); color: var(--fg); }
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

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

/* ---- Header ---- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg-strong);
}
.brand__mark {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--accent-fg);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}
.brand__name { font-size: 16px; }

.topnav { display: flex; align-items: center; gap: 4px; }
.topnav a {
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg-muted);
  transition: background 120ms, color 120ms;
}
.topnav a:hover { color: var(--fg); background: var(--bg-soft); }
.topnav a[aria-current="page"] { color: var(--fg); background: var(--bg-soft); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms, border-color 120ms, transform 100ms;
}
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--accent); color: var(--accent-fg); }
.btn--accent:hover { background: var(--accent-hover); }
.btn--ghost { color: var(--fg); border-color: var(--border); background: var(--bg-card); }
.btn--ghost:hover { border-color: var(--border-strong); background: var(--bg-soft); }

/* ---- Hero ---- */
.hero { padding: 72px 0 56px; text-align: center; }
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.hero__eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.hero__title {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--fg-strong);
  margin: 0 0 18px;
  max-width: 16ch;
  margin-left: auto;
  margin-right: auto;
}
.hero__lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 56ch;
  margin: 0 auto 32px;
}
.hero__ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- Card grid ---- */
.section { padding: 0 0 72px; }
.section__head { text-align: center; margin-bottom: 36px; }
.section__title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg-strong);
  margin: 0 0 8px;
}
.section__desc { font-size: 15px; color: var(--fg-muted); margin: 0; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) {
  .card-grid { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow 160ms, border-color 160ms, transform 160ms;
}
.card--link:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.card__icon svg { width: 20px; height: 20px; }
.card__title { font-size: 16.5px; font-weight: 600; color: var(--fg-strong); margin: 0; }
.card__desc { font-size: 13.5px; line-height: 1.6; color: var(--fg-muted); margin: 0; flex: 1; }
.card__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-subtle);
  background: var(--bg-soft);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  display: inline-block;
  width: fit-content;
}
.card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
}
.card__cta svg { width: 14px; height: 14px; transition: transform 160ms; }
.card--link:hover .card__cta svg { transform: translateX(2px); }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}
.site-footer__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--fg-subtle);
}
