/* Erpilo marketing site — hand-written, no build step, no CDN.
   Replaces the dev-only cdn.tailwindcss.com script. */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; }
a { color: inherit; }

/* ---------- tokens ---------- */
:root {
  --ink:        #0f172a;
  --ink-2:      #334155;
  --muted:      #64748b;
  --line:       #e2e8f0;
  --line-2:     #cbd5e1;
  --bg:         #f8fafc;
  --surface:    #ffffff;
  --surface-2:  #f1f5f9;

  --brand:      #059669;
  --brand-ink:  #047857;
  --brand-soft: #ecfdf5;
  --brand-line: #a7f3d0;
  --brand-text: #065f46;

  --accent:     #2563eb;
  --accent-soft:#eff6ff;
  --accent-text:#1d4ed8;

  --radius:     10px;
  --radius-lg:  16px;
  --shadow:     0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.04);
  --shadow-md:  0 4px 12px rgba(15,23,42,.07), 0 2px 4px rgba(15,23,42,.04);
  --shadow-lg:  0 18px 40px -12px rgba(15,23,42,.22);

  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 20px; }
@media (min-width: 640px) { .wrap { padding-inline: 28px; } }

/* ---------- a11y ---------- */
:where(a, button, summary, input):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-block: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--ink); color: #fff; font-weight: 700; font-size: 16px;
}
.brand__name { font-weight: 650; letter-spacing: -.02em; font-size: 16px; }
.brand__beta {
  font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent-text); background: var(--accent-soft);
  border: 1px solid #bfdbfe; padding: 2px 6px; border-radius: 999px;
}

.site-nav { display: none; align-items: center; gap: 28px; }
.site-nav a { font-size: 14px; color: var(--ink-2); text-decoration: none; }
.site-nav a:hover { color: var(--ink); }
@media (min-width: 900px) { .site-nav { display: flex; } }

.header-actions { display: none; align-items: center; gap: 12px; }
@media (min-width: 900px) { .header-actions { display: flex; } }

.lang {
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--surface-2); border-radius: 8px; padding: 3px;
}
.lang a {
  font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 4px 8px; border-radius: 6px; text-decoration: none;
}
.lang a:hover { color: var(--ink); }
.lang a[aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.header-mobile { display: flex; align-items: center; gap: 8px; }
@media (min-width: 900px) { .header-mobile { display: none; } }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; }

.mobile-menu {
  display: none; border-top: 1px solid var(--line); background: var(--surface);
}
.mobile-menu[data-open="true"] { display: block; }
.mobile-menu ul { display: grid; gap: 2px; padding-block: 12px; }
.mobile-menu a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 4px; font-size: 15px; color: var(--ink-2); text-decoration: none;
  border-radius: 8px;
}
.mobile-menu a:hover { background: var(--surface-2); color: var(--ink); }
.mobile-menu__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 4px 18px; border-top: 1px solid var(--line);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius);
  font-size: 14.5px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--brand-ink); }
.btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); box-shadow: var(--shadow); }
.btn--secondary:hover { background: var(--surface-2); }
.btn--ghost { background: transparent; color: var(--ink-2); padding-inline: 6px; }
.btn--ghost:hover { color: var(--ink); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #e2e8f0; }
.btn--sm { padding: 8px 14px; font-size: 13.5px; }
.btn--block { width: 100%; }

/* ---------- generic section ---------- */
.section { padding-block: 64px; }
.section--tight { padding-block: 52px; }
.section--surface { background: var(--surface); border-block: 1px solid var(--line); }
@media (min-width: 768px) { .section { padding-block: 84px; } }

.section-head { max-width: 980px; margin-bottom: 36px; }
.section-head--center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 650;
  letter-spacing: .06em; text-transform: uppercase; color: var(--brand-text);
  margin-bottom: 12px;
}
h1, h2, h3 { letter-spacing: -.022em; line-height: 1.2; font-weight: 660; }
.section-head h2 { font-size: 27px; }
.section-head p { margin-top: 10px; color: var(--muted); font-size: 16.5px; }
@media (min-width: 768px) { .section-head h2 { font-size: 33px; } }

/* ---------- hero ---------- */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); }
.hero__inner { padding-block: 36px 0; }
@media (min-width: 768px) { .hero__inner { padding-block: 36px 0; } }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-soft); color: var(--brand-text);
  border: 1px solid var(--brand-line);
  font-size: 12.5px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px;
}
.hero h1 {
  margin-top: 20px; font-size: 34px; max-width: 20ch;
}
@media (min-width: 768px) { .hero h1 { font-size: 52px; } }
.hero__lede {
  margin-top: 18px; max-width: 60ch;
  font-size: 17px; color: var(--ink-2);
}
@media (min-width: 768px) { .hero__lede { font-size: 19px; } }

/* The product's areas, named plainly under the lede. Deliberately quieter than
   a check-mark row: it states scope, it does not try to sell. */
.hero__domains {
  display: flex; flex-wrap: wrap; align-items: center;
  margin-top: 22px;
  font-size: 14.5px; font-weight: 500; color: var(--muted);
}
.hero__domains li { display: inline-flex; align-items: center; }
.hero__domains li::after {
  content: "\00b7";
  margin-inline: 12px;
  color: var(--line-2);
}
.hero__domains li:last-child::after { content: none; }

.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.hero__note { margin-top: 14px; font-size: 13px; color: var(--muted); }


.hero__shot {
  margin-top: 44px; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border: 1px solid var(--line); border-bottom: 0;
  background: var(--surface-2); box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero__shot img { width: 100%; height: auto; }

/* ---------- lead features ---------- */
.leads { display: grid; gap: 20px; }
@media (min-width: 900px) { .leads { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.lead {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow);
}
.lead__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand-ink);
  border: 1px solid var(--brand-line); margin-bottom: 16px;
}
.lead__icon svg { width: 20px; height: 20px; }
.lead h3 { font-size: 17.5px; }
.lead > p { margin-top: 10px; color: var(--ink-2); font-size: 15px; }
.lead ul { margin-top: 16px; display: grid; gap: 9px; }
.lead li {
  position: relative; padding-left: 24px;
  font-size: 14.5px; color: var(--muted);
}
.lead li::before {
  content: ""; position: absolute; left: 4px; top: 9px;
  width: 6px; height: 6px; border-radius: 999px; background: var(--brand-line);
}
.lead__foot {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
}

/* ---------- feature grid ---------- */
.grid-features { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid-features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-features { grid-template-columns: repeat(3, 1fr); } }

.feature {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.feature h3 { font-size: 15px; display: flex; align-items: center; gap: 9px; }
.feature p { margin-top: 8px; font-size: 14px; color: var(--muted); }
.feature__emoji { font-size: 17px; line-height: 1; }

/* ---------- changelog cards ---------- */
.changelog-list { display: grid; gap: 16px; }
@media (min-width: 768px) { .changelog-list { grid-template-columns: repeat(3, 1fr); } }

.entry {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px;
  text-decoration: none; box-shadow: var(--shadow);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
a.entry:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.entry__meta { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.entry__date { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tag {
  font-size: 11px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; border: 1px solid transparent;
}
.tag--feature     { background: var(--brand-soft); color: var(--brand-text); border-color: var(--brand-line); }
.tag--improvement { background: var(--accent-soft); color: var(--accent-text); border-color: #bfdbfe; }
.tag--fix         { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.entry__emoji { font-size: 24px; line-height: 1; margin-bottom: 10px; }
.entry h3 { font-size: 16px; }
.entry p { margin-top: 9px; font-size: 14px; color: var(--muted); }
.entry__more { margin-top: auto; padding-top: 16px; font-size: 13.5px; font-weight: 600; color: var(--brand-ink); }

.section-foot { margin-top: 32px; }

/* ---------- changelog index / article ---------- */
.release-row {
  display: grid; gap: 6px 28px; padding-block: 26px;
  border-top: 1px solid var(--line);
}
.release-row:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 768px) { .release-row { grid-template-columns: 160px 1fr; } }
.release-row__aside { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.release-row h2 { font-size: 19px; }
.release-row h2 a { text-decoration: none; }
.release-row h2 a:hover { color: var(--brand-ink); }
.release-row p { margin-top: 8px; color: var(--muted); font-size: 15px; max-width: 68ch; }

.article { max-width: 720px; margin-inline: auto; }
.article__head { padding-bottom: 28px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.article__head h1 { margin-top: 16px; font-size: 30px; }
@media (min-width: 768px) { .article__head h1 { font-size: 38px; } }
.article__summary { margin-top: 16px; font-size: 18px; color: var(--ink-2); }

.prose { color: var(--ink-2); font-size: 16.5px; }
.prose > * + * { margin-top: 20px; }
.prose h2 { margin-top: 40px; font-size: 22px; color: var(--ink); }
.prose h3 { margin-top: 32px; font-size: 18px; color: var(--ink); }
.prose ul, .prose ol { display: grid; gap: 10px; padding-left: 4px; }
.prose ul li { position: relative; padding-left: 22px; }
.prose ul li::before {
  content: ""; position: absolute; left: 3px; top: 11px;
  width: 6px; height: 6px; border-radius: 999px; background: var(--line-2);
}
.prose ol { list-style: decimal; padding-left: 22px; }
.prose ol li { padding-left: 4px; }
.prose strong { color: var(--ink); font-weight: 640; }
.prose code {
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 1px 5px; border-radius: 5px; font-size: .88em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.prose a { color: var(--accent-text); text-underline-offset: 2px; }
.prose blockquote {
  border-left: 3px solid var(--brand-line); padding-left: 18px; color: var(--muted);
}
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--ink); font-weight: 640; background: var(--surface-2); }
.table-scroll { overflow-x: auto; }

.backlink {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none;
}
.backlink:hover { color: var(--ink); }

.article__cta {
  margin-top: 48px; padding: 26px; border-radius: var(--radius-lg);
  background: var(--surface-2); border: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.article__cta p { font-weight: 600; }
.article__cta span { display: block; font-weight: 400; color: var(--muted); font-size: 14.5px; margin-top: 4px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 4px 20px;
}
.faq details[open] { border-color: var(--line-2); box-shadow: var(--shadow); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 16px; font-weight: 600; font-size: 15.5px; cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 9px; height: 9px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(225deg) translate(-1px, -1px); }
.faq__body { padding-bottom: 18px; color: var(--muted); font-size: 15px; }
.faq__body > * + * { margin-top: 10px; }

/* ---------- closing CTA ---------- */
.cta-band { background: var(--ink); color: #fff; }
.cta-band__inner {
  display: flex; flex-direction: column; gap: 24px;
  padding-block: 56px;
}
@media (min-width: 820px) {
  .cta-band__inner { flex-direction: row; align-items: center; justify-content: space-between; padding-block: 68px; }
}
.cta-band h2 { font-size: 27px; max-width: 20ch; }
@media (min-width: 768px) { .cta-band h2 { font-size: 33px; } }
.cta-band p { margin-top: 12px; color: #94a3b8; font-size: 16px; max-width: 52ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); }
.site-footer__grid {
  display: grid; gap: 32px; padding-block: 48px;
}
@media (min-width: 700px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h3 {
  font-size: 12px; font-weight: 650; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.site-footer ul { display: grid; gap: 10px; }
.site-footer a { font-size: 14.5px; color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer__blurb { margin-top: 14px; font-size: 14.5px; color: var(--muted); max-width: 34ch; }
.site-footer__bar {
  display: flex; flex-wrap: wrap; gap: 12px 24px;
  align-items: center; justify-content: space-between;
  padding-block: 22px; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--muted);
}

/* ---------- button on a dark band ---------- */
.btn--outline {
  background: transparent; color: #fff;
  border-color: rgba(255,255,255,.3);
}
.btn--outline:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.5); }
