/* builtbyzero — v3
   Aesthetic: 2025 modern. Sans-serif headlines, vivid accent palette,
   generous whitespace, soft cards, smooth motion, real grid. */

:root {
  /* light */
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --border: rgba(9, 9, 11, 0.08);
  --border-strong: rgba(9, 9, 11, 0.14);
  --ink: #09090b;
  --ink-2: #18181b;
  --muted: #52525b;
  --muted-2: #71717a;

  --brand: #6366f1;        /* indigo-500 */
  --brand-2: #a855f7;      /* purple-500 */
  --brand-ink: #4338ca;
  --brand-glow: rgba(99, 102, 241, 0.18);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.10);

  --shadow-xs: 0 1px 2px rgba(9,9,11,0.04);
  --shadow-sm: 0 2px 6px rgba(9,9,11,0.05), 0 1px 2px rgba(9,9,11,0.04);
  --shadow-md: 0 8px 24px rgba(9,9,11,0.06), 0 2px 4px rgba(9,9,11,0.04);
  --shadow-lg: 0 24px 60px rgba(9,9,11,0.10), 0 4px 12px rgba(9,9,11,0.06);
  --ring: 0 0 0 4px rgba(99,102,241,0.18);

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

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --container: 1120px;
  --maxw-text: 680px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b;
    --surface: #0e0e10;
    --surface-2: #161618;
    --border: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.14);
    --ink: #fafafa;
    --ink-2: #e4e4e7;
    --muted: #a1a1aa;
    --muted-2: #71717a;

    --brand: #818cf8;
    --brand-2: #c084fc;
    --brand-ink: #c7d2fe;
    --brand-glow: rgba(129, 140, 248, 0.30);

    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.14);

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.5);
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.3);
    --shadow-lg: 0 30px 70px rgba(0,0,0,0.55), 0 6px 16px rgba(0,0,0,0.35);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-feature-settings: "cv11", "ss01", "ss03";
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* subtle background mesh */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60vmax 50vmax at 80% -10%, var(--brand-glow), transparent 60%),
    radial-gradient(50vmax 40vmax at -10% 110%, rgba(168, 85, 247, 0.14), transparent 60%);
  z-index: -1;
  pointer-events: none;
}
@media (prefers-color-scheme: dark) {
  body::before {
    background:
      radial-gradient(60vmax 50vmax at 80% -10%, rgba(99, 102, 241, 0.18), transparent 60%),
      radial-gradient(50vmax 40vmax at -10% 110%, rgba(168, 85, 247, 0.12), transparent 60%);
  }
}

a { color: var(--brand-ink); text-decoration: none; }
a:hover { color: var(--brand); }
@media (prefers-color-scheme: dark) { a { color: var(--brand); } a:hover { color: var(--brand-2); } }

/* ───── nav ───── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand__mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: conic-gradient(from 220deg at 50% 50%, var(--brand), var(--brand-2), var(--brand));
  box-shadow: 0 4px 14px var(--brand-glow), inset 0 0 0 1px rgba(255,255,255,0.18);
  position: relative;
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 4px;
  background: var(--bg);
  opacity: 0.85;
}
.nav-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--r-sm);
  transition: color 120ms ease, background 120ms ease;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-cta {
  padding: 0.5rem 0.9rem !important;
  background: var(--ink);
  color: var(--bg) !important;
  font-weight: 500;
}
.nav-cta:hover { background: var(--ink-2) !important; color: var(--bg) !important; }

main {
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
  flex: 1;
}

/* ───── hero ───── */
.hero { display: grid; gap: 1.5rem; padding: 1.5rem 0 3rem; max-width: 820px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: max-content;
  padding: 0.4rem 0.85rem 0.4rem 0.65rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: var(--shadow-xs);
}
.eyebrow .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 var(--success);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
.hero h1 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin: 0;
  color: var(--ink);
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__sub {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--muted);
  margin: 0;
  max-width: 56ch;
}
.hero__cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  align-items: center;
}
.hero__hint {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted-2);
}

/* ───── buttons ───── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  border-radius: var(--r-md);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, color 120ms ease, border-color 120ms ease;
  white-space: nowrap;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: var(--ink-2); color: var(--bg); transform: translateY(-1px); }
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); transform: translateY(-1px); }
.btn-brand {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-brand:hover { color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ───── section header ───── */
.section {
  margin: 4rem 0 1.25rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.section h2 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}
.section__meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted-2);
}

/* ───── product grid ───── */
.products {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.product {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  overflow: hidden;
}
.product::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent 60%, var(--brand) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}
.product:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.product:hover::after { opacity: 1; }
.product__head { display: flex; align-items: center; gap: 0.5rem; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
}
.tag--brand {
  color: var(--brand-ink);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
}
@media (prefers-color-scheme: dark) {
  .tag--brand { color: var(--brand); }
}
.product h3 {
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}
.product__desc { margin: 0; color: var(--muted); font-size: 0.97rem; }
.product__code {
  display: block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.7rem 0.85rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink-2);
  overflow-x: auto;
}
.product__price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--muted);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
}
.chip--free { color: var(--success); background: var(--success-bg); }
.chip--pro  { color: var(--brand-ink); background: color-mix(in srgb, var(--brand) 14%, transparent); }
@media (prefers-color-scheme: dark) { .chip--pro { color: var(--brand); } }
.product__price code {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: var(--surface-2);
  padding: 0.1em 0.4em;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--ink-2);
}
.product__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  margin-top: auto;
  border-top: 1px solid var(--border);
}
.product__links {
  display: inline-flex;
  gap: 0.4rem;
  font-size: 0.85rem;
}
.product__links a {
  color: var(--muted);
  padding: 0.3rem 0.55rem;
  border-radius: var(--r-sm);
  transition: color 120ms ease, background 120ms ease;
}
.product__links a:hover { color: var(--ink); background: var(--surface-2); }

/* ───── feature row ───── */
.features {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 1.25rem;
}
.feature {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
}
.feature__icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand-ink);
  margin-bottom: 0.85rem;
  font-size: 18px;
}
@media (prefers-color-scheme: dark) { .feature__icon { color: var(--brand); } }
.feature h3 { font-size: 1rem; font-weight: 600; margin: 0 0 0.25rem; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* ───── follow chips ───── */
.follow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.follow a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  transition: border-color 120ms ease, color 120ms ease, transform 120ms ease, background 120ms ease;
}
.follow a:hover {
  color: var(--brand-ink);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
  transform: translateY(-1px);
}
@media (prefers-color-scheme: dark) { .follow a:hover { color: var(--brand); } }

/* ───── prose (about / blog / thanks) ───── */
.prose {
  max-width: var(--maxw-text);
  margin: 0 auto;
  font-size: 1.02rem;
  color: var(--ink-2);
}
.prose h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 0.5rem;
  color: var(--ink);
}
.prose h2 {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2.5rem 0 0.75rem;
  font-weight: 600;
}
.prose p { margin: 0 0 1rem; color: var(--ink-2); }
.prose code, .prose pre code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.1em 0.4em;
  border-radius: 6px;
  color: var(--ink-2);
}
.prose pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1rem 1.15rem;
  overflow-x: auto;
  margin: 0 0 1.25rem;
  box-shadow: var(--shadow-xs);
}
.prose pre code { background: transparent; border: 0; padding: 0; font-size: 0.88rem; }
.post-meta { color: var(--muted); font-family: var(--mono); font-size: 0.82rem; margin: 0 0 2rem; }
.back {
  color: var(--muted);
  font-size: 0.88rem;
  display: inline-block;
  margin-bottom: 1.25rem;
}
.back:hover { color: var(--brand-ink); }

/* blog post list */
.post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.post-list li { margin: 0; }
.post-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.post-list a:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
  box-shadow: var(--shadow-md);
  color: var(--ink);
}
.post-list .post-title { font-weight: 600; letter-spacing: -0.01em; }
.post-list .post-date { color: var(--muted-2); font-family: var(--mono); font-size: 0.82rem; }

/* footer */
footer {
  max-width: var(--container);
  margin: 0 auto;
  padding: 2rem 1.5rem 2.5rem;
  font-size: 0.85rem;
  color: var(--muted-2);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }

/* mobile */
@media (max-width: 640px) {
  main { padding: 2.5rem 1.25rem 3.5rem; }
  .hero { padding: 1rem 0 2rem; }
  .section { margin-top: 3rem; }
  .product { padding: 1.25rem; }
  .product__cta { flex-direction: column; align-items: stretch; }
  .product__cta .btn { width: 100%; }
  .nav-links a { padding: 0.4rem 0.55rem; }
  .nav-links .nav-cta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
