/* ─────────────────────────────────────────────────────────────
   EDGEFOLK — design tokens + base
   Warm humanist sans on pure white. Blue accent.
   ───────────────────────────────────────────────────────────── */

@import url('https://api.fontshare.com/v2/css?f[]=general-sans@300,400,500,600,700&f[]=jetbrains-mono@400,500&display=swap');

:root {
  /* color */
  --bg:           #ffffff;
  --bg-soft:      #fafaf8;       /* a whisper of warmth */
  --bg-tint:      #f4f4f1;
  --ink:          #0c0d0e;
  --ink-2:        #2a2b2d;
  --ink-3:        #5b5c60;
  --ink-4:        #8a8b8f;
  --rule:         #ececea;
  --rule-2:       #e2e2df;

  --accent:       #005aa7;
  --accent-hover: #004585;
  --accent-soft:  #e8f1f8;
  --accent-ink:   #ffffff;

  /* type */
  --font-sans: "General Sans", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* spacing */
  --gutter: clamp(20px, 4vw, 56px);
  --max:    1280px;

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

  /* motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss02", "cv11";
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--ink); color: #fff; }

/* ── layout ─────────────────────────────────────────────────── */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ── typography ─────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
  text-wrap: balance;
}

.display {
  font-size: clamp(44px, 7.2vw, 104px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.h-xl { font-size: clamp(36px, 4.6vw, 64px); letter-spacing: -0.028em; }
.h-lg { font-size: clamp(28px, 3vw, 42px); letter-spacing: -0.022em; }
.h-md { font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -0.018em; line-height: 1.15; }
.h-sm { font-size: 18px; line-height: 1.25; letter-spacing: -0.012em; }

.lead {
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
  max-width: 56ch;
}

p { text-wrap: pretty; }

.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-3); }
.dim   { color: var(--ink-4); }
.accent-ink { color: var(--accent); }
.italic { font-style: italic; }

/* ── header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--rule);
  background: rgba(255,255,255,0.92);
}
.site-header .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 19px;
}
.brand-mark {
  width: 22px; height: 22px;
  display: inline-block;
}
.nav {
  display: flex; align-items: center; gap: 28px;
}
.nav a {
  font-size: 15px;
  color: var(--ink-2);
  transition: color .15s var(--ease);
  position: relative;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  height: 1px;
  background: var(--ink);
}
.nav .cta {
  margin-left: 4px;
}

/* ── buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover { background: var(--accent); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-2);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-link {
  padding: 0;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding-bottom: 2px;
}
.btn-link:hover { color: var(--accent); border-color: var(--accent); }
.btn .arrow {
  display: inline-block;
  transition: transform .2s var(--ease);
}
.btn:hover .arrow { transform: translateX(3px); }

/* ── section scaffold ───────────────────────────────────────── */
section { padding: clamp(72px, 9vw, 140px) 0; }
.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(24px, 4vw, 80px);
  margin-bottom: clamp(40px, 5vw, 72px);
  align-items: end;
}
@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; align-items: start; }
}

/* ── footer ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 72px 0 36px;
}
.site-footer .grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 64px;
}
@media (max-width: 760px) {
  .site-footer .grid { grid-template-columns: 1fr 1fr; }
}
.site-footer h5 {
  font-size: 12px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  margin: 0 0 16px;
  font-weight: 500;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: var(--accent); }
.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--ink-4);
}
.foot-bottom .mono { font-size: 12px; }

/* ── scroll reveal ──────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal-delay="3"] { transition-delay: .24s; }
[data-reveal-delay="4"] { transition-delay: .32s; }
[data-reveal-delay="5"] { transition-delay: .40s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ── utilities ──────────────────────────────────────────────── */
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--ink-3);
  padding: 5px 10px;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  background: var(--bg);
}
.tag-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}
.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-tint);
  border: 1px solid var(--rule-2);
  color: var(--ink-2);
}
