/* Tokens, reset, layout rails, buttons, nav and footer.
   The design language is a direct port of dub.co's: neutral greys, Satoshi display,
   Inter body, Geist Mono numbers, 1080px bordered rails and one accent per product. */
:root {
  --n-50: #fafafa; --n-100: #f5f5f5; --n-200: #e5e5e5; --n-300: #d4d4d4;
  --n-400: #a3a3a3; --n-500: #737373; --n-600: #525252; --n-700: #404040;
  --n-800: #262626; --n-900: #171717; --n-950: #0a0a0a;
  --grid-border: #e5e5e5;
  --grid-width: 1080px;
  /* One accent per product, as dub does for Links / Analytics / Partners. */
  --publish: #ea580c; --publish-bg: #fb923c; --publish-ink: #7c2d12;
  --analytics: #16a34a; --analytics-bg: #4ade80; --analytics-ink: #14532d;
  --crosspost: #7c3aed; --crosspost-bg: #a78bfa; --crosspost-ink: #4c1d95;
  --api-bg: #a3a3a3; --api-ink: #171717;
  --font-display: "Satoshi", system-ui, sans-serif;
  --font-sans: "Inter", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: #fff; color: var(--n-950);
  font: 16px/24px var(--font-sans); -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--n-900); outline-offset: 2px; border-radius: 6px; }

/* ── Rails: every section is a full-bleed row with a 1080px bordered column ── */
.grid-section { position: relative; overflow: clip; padding: 0 16px; border-block: 1px solid var(--grid-border); }
.grid-section + .grid-section { border-top: 0; }
.grid-section.flush-top { border-top: 0; }
.rail { position: relative; z-index: 0; max-width: var(--grid-width); margin: 0 auto; border-inline: 1px solid var(--grid-border); }
.bg-50 { background: var(--n-50); }
.bg-100 { background: var(--n-100); }

/* The 60px grid that sits behind the hero and the closing CTA. */
.grid-bg {
  position: absolute; pointer-events: none; inset: 0;
  background-image:
    linear-gradient(to right, rgb(229 229 229 / .6) 2px, transparent 2px),
    linear-gradient(to bottom, rgb(229 229 229 / .6) 2px, transparent 2px);
  background-size: 60px 60px;
}
.dots-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background-image: radial-gradient(var(--n-300) 1px, transparent 1px);
  background-size: 12px 12px; opacity: .55;
}

/* ── Type ── */
.display { font-family: var(--font-display); font-weight: 500; color: var(--n-900); text-wrap: pretty; }
.h1 { font-size: 48px; line-height: 1.15; }
.h2 { font-size: 48px; line-height: 1; }
.h2-sm { font-size: 36px; line-height: 40px; }
.h2-md { font-size: 40px; line-height: 1; }
.lede { font-size: 20px; line-height: 28px; color: var(--n-600); text-wrap: pretty; }
.sub { font-size: 18px; line-height: 28px; color: var(--n-500); text-wrap: pretty; }

/* ── Buttons: black primary, white secondary, ring on hover ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 20px; border-radius: 8px; border: 1px solid var(--n-200);
  background: #fff; color: var(--n-800); font-size: 14px; line-height: 20px; font-weight: 500;
  white-space: nowrap; box-shadow: 0 1px 2px rgb(0 0 0 / .05);
  transition: box-shadow .15s, background-color .15s;
}
.btn:hover { box-shadow: 0 0 0 4px var(--n-200); }
.btn-dark { background: #000; border-color: #000; color: #fff; }
.btn-sm { height: 32px; padding: 0 16px; font-weight: 400; box-shadow: none; }
.btn-sm:hover { background: var(--n-50); }
.btn-sm.btn-dark:hover { background: var(--n-800); }

/* ── Nav: transparent at the top, frosted once you scroll ── */
.nav { position: sticky; top: 0; z-index: 30; }
.nav::before {
  content: ""; position: absolute; inset: 0; border-bottom: 1px solid transparent;
  transition: background-color .2s, border-color .2s, backdrop-filter .2s;
}
.nav.is-scrolled::before {
  background: rgb(255 255 255 / .75); border-color: var(--n-100);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.nav-inner { position: relative; max-width: calc(var(--grid-width) - 56px); margin: 0 auto; padding: 0 12px; height: 56px; display: flex; align-items: center; }
.nav-side { flex: 1 1 0; display: flex; align-items: center; }
.nav-side.end { justify-content: flex-end; gap: 8px; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: -0.05em; line-height: 1; padding: 8px 8px 8px 0; }
.nav-links { position: relative; display: flex; }
.nav-links a {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px;
  border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--n-700); transition: color .15s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--n-900); }
.nav-links svg { width: 12px; height: 12px; color: var(--n-500); }
.nav-pill { position: absolute; top: 0; height: 32px; border-radius: 8px; background: rgb(23 23 23 / .05); opacity: 0; pointer-events: none; transition: left .2s var(--ease-out), width .2s var(--ease-out), opacity .15s; }
.nav-toggle { display: none; width: 36px; height: 36px; border-radius: 8px; align-items: center; justify-content: center; }
.burger, .burger::before, .burger::after { display: block; width: 16px; height: 1.5px; background: var(--n-900); position: relative; content: ""; }
.burger::before { position: absolute; top: -5px; } .burger::after { position: absolute; top: 5px; }
.nav-sheet { display: none; }

/* ── Footer ── */
.footer { max-width: calc(var(--grid-width) - 56px); margin: 0 auto; padding: 64px 12px; }
.footer-top { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 24px; }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.footer h3 { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--n-900); }
.footer ul { margin-top: 12px; display: grid; gap: 12px; }
.footer li a { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; color: var(--n-500); transition: color 75ms; }
.footer li a:hover { color: var(--n-700); }
.footer-bottom { margin-top: 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.status { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--n-200); border-radius: 8px; padding: 6px 10px; font-size: 12px; line-height: 12px; font-weight: 500; color: var(--n-600); }
.status i { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }
.legal { font-size: 12px; line-height: 16px; color: var(--n-500); max-width: 640px; }

/* ── Small shared atoms ── */
.icon-sq {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgb(0 0 0 / .05);
}
.icon-sq svg { width: 10px; height: 10px; }
.is-publish { background: var(--publish-bg); color: var(--publish-ink); }
.is-analytics { background: var(--analytics-bg); color: var(--analytics-ink); }
.is-crosspost { background: var(--crosspost-bg); color: var(--crosspost-ink); }
.is-api { background: var(--api-bg); color: var(--api-ink); }
/* Network marks: the real logos from assets/img/networks.svg, sized per context. */
.net { display: block; flex: none; width: 20px; height: 20px; }

/* Entrance animation used on first paint, staggered by --delay. */
.rise { animation: rise 1s var(--ease-out) both; animation-delay: var(--delay, 0ms); }
@keyframes rise { from { opacity: 0; transform: translateY(var(--offset, 10px)); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ── Big screens: a 1080px rail leaves half of a wide monitor empty, so from 1536px up the
   whole page scales and the rails widen, keeping the layout at roughly 90% of the viewport.
   Every size on the site is in px, so zoom scales type, widgets and rails together. ── */
@media (min-width: 1536px) { :root { --grid-width: 1120px; } body { zoom: 1.2; } }
@media (min-width: 1680px) { :root { --grid-width: 1180px; } body { zoom: 1.3; } }
@media (min-width: 1840px) { :root { --grid-width: 1280px; } body { zoom: 1.35; } }
@media (min-width: 2160px) { :root { --grid-width: 1320px; } body { zoom: 1.5; } }
@media (min-width: 2480px) { :root { --grid-width: 1400px; } body { zoom: 1.6; } }

@media (max-width: 1023px) {
  .nav-links, .nav-side.end .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-sheet.is-open { display: grid; gap: 4px; position: absolute; top: 56px; left: 0; right: 0; padding: 12px 16px 16px; background: #fff; border-bottom: 1px solid var(--n-200); }
  .nav-sheet a { padding: 10px 4px; font-size: 16px; font-weight: 500; border-bottom: 1px solid var(--n-100); }
  .nav-sheet .btn { margin-top: 8px; height: 40px; }
}
@media (max-width: 767px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 639px) {
  .h1 { font-size: 36px; line-height: 40px; }
  .h2 { font-size: 30px; line-height: 36px; }
  .h2-sm, .h2-md { font-size: 30px; line-height: 36px; }
  .lede { font-size: 16px; line-height: 24px; }
  .sub { font-size: 16px; line-height: 24px; }
}
