/* LinkHub public site — shared styles
   Self-contained: doesn't depend on tokens.css.
   Responsive RTL, mobile-first. */

:root {
  --bg: #faf8f3;
  --bg-1: #ffffff;
  --bg-2: #f3efe6;
  --ink: #1a1612;
  --ink-2: #4a4137;
  --ink-3: #8a7e6e;
  --line: #e6dfd1;
  --line-2: #d4ccba;

  --lime: oklch(0.82 0.18 130);
  --lime-on: #0c1605;
  --lime-deep: oklch(0.55 0.15 130);

  --plum: oklch(0.55 0.18 295);
  --clay: oklch(0.66 0.16 50);
  --rose: oklch(0.72 0.16 18);

  --shadow-sm: 0 1px 2px rgba(20, 16, 12, 0.05), 0 2px 6px rgba(20, 16, 12, 0.04);
  --shadow-md: 0 4px 12px rgba(20, 16, 12, 0.08), 0 2px 4px rgba(20, 16, 12, 0.04);
  --shadow-lg: 0 24px 48px rgba(20, 16, 12, 0.12), 0 8px 16px rgba(20, 16, 12, 0.06);
  --shadow-glow: 0 12px 36px oklch(0.62 0.16 130 / 0.30);

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 18px;
  --r-xl: 28px;

  --serif: 'Heebo', system-ui, -apple-system, sans-serif;
  --sans: 'Heebo', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
}

[data-theme="dark"] {
  --bg: #13110f;
  --bg-1: #1c1916;
  --bg-2: #25211c;
  --ink: #f5f0e6;
  --ink-2: #c4b9a5;
  --ink-3: #807463;
  --line: #2e2922;
  --line-2: #3d362c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
.mono { font-family: var(--mono); font-feature-settings: 'tnum' 1; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; }
.serif { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; }

/* Container */
.wrap {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 24px;
}
@media (max-width: 640px) { .wrap { padding-inline: 18px; } }

/* ───── Topbar ───── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.3px;
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--lime) 0%, var(--lime-deep) 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--lime-on);
  font-weight: 900;
  font-size: 16px;
  box-shadow: var(--shadow-sm);
}
.brand--logo { gap: 10px; }
.brand-logo {
  height: 38px;
  width: auto;
  display: block;
}
footer .brand-logo { height: 44px; }
.nav {
  display: flex;
  gap: 4px;
  margin-inline-start: auto;
}
.nav a {
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s;
}
.nav a:hover { background: var(--bg-2); color: var(--ink); }
.cta-row {
  display: flex;
  gap: 8px;
}

/* Mobile menu */
.menu-btn {
  display: none;
  margin-inline-start: auto;
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
}
@media (max-width: 880px) {
  .nav, .cta-row { display: none; }
  .menu-btn { display: flex; }
  .topbar-inner.menu-open {
    flex-wrap: wrap;
    height: auto;
    align-items: stretch;
    padding-bottom: 16px;
    row-gap: 0;
  }
  .topbar-inner.menu-open .nav,
  .topbar-inner.menu-open .cta-row {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    gap: 4px;
    order: 3;
  }
  .topbar-inner.menu-open .nav {
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
  .topbar-inner.menu-open .nav a {
    padding: 12px 14px;
    font-size: 15px;
  }
  .topbar-inner.menu-open .cta-row {
    padding-top: 8px;
    gap: 8px;
  }
  .topbar-inner.menu-open .cta-row .btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px !important;
    font-size: 14px !important;
  }
}

/* ───── Buttons ───── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { box-shadow: var(--shadow-md); }
.btn-lime {
  background: var(--lime);
  color: var(--lime-on);
  font-weight: 700;
}
.btn-lime:hover { box-shadow: var(--shadow-glow); }
.btn-ghost {
  border: 1px solid var(--line-2);
  background: var(--bg-1);
}
.btn-ghost:hover { background: var(--bg-2); }
.btn-lg {
  padding: 14px 24px;
  font-size: 15px;
  border-radius: 12px;
}

/* ───── Eyebrow / Pill ───── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}
.pill-lime {
  background: oklch(0.82 0.18 130 / 0.16);
  border-color: oklch(0.82 0.18 130 / 0.30);
  color: var(--lime-deep);
}

/* ───── Headings ───── */
h1, h2, h3, h4 { margin: 0; line-height: 1.1; letter-spacing: -0.025em; font-weight: 800; }
h1 { font-size: clamp(38px, 6vw, 72px); font-family: var(--serif); font-weight: 600; line-height: 1.05; letter-spacing: -0.035em; }
h2 { font-size: clamp(28px, 4vw, 48px); font-family: var(--serif); font-weight: 600; }
h3 { font-size: clamp(20px, 2.4vw, 26px); }
h4 { font-size: 17px; }
p { margin: 0; }
.lede { font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-2); line-height: 1.6; }

/* ───── Section ───── */
section { padding-block: clamp(56px, 8vw, 110px); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head .lede { margin-top: 14px; }

/* ───── Cards ───── */
.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-2);
}

/* ───── Footer ───── */
footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding-block: 56px 32px;
  margin-top: 80px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
@media (max-width: 720px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
.foot-col h5 {
  font-size: 12px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin: 0 0 14px;
  font-weight: 700;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-col a {
  color: var(--ink-2);
  font-size: 14px;
  transition: color 0.15s;
}
.foot-col a:hover { color: var(--ink); }
.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-3);
}

/* ───── Utility ───── */
.tnum { font-variant-numeric: tabular-nums; }
.glow-lime { box-shadow: var(--shadow-glow); }
.gradient-text {
  background: linear-gradient(120deg, var(--lime-deep) 0%, var(--ink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.divider { height: 1px; background: var(--line); border: none; margin: 0; }
