/* =========================================================
   STEPLIMIT.COM · article styles
   Dark-first. Warm amber accent. Geist + Instrument Serif.
   Matches the home page palette so an article does not feel
   like a different site.
   ========================================================= */

:root {
  --bg:            #0A0908;
  --bg-2:          #100E0B;
  --bg-3:          #1A1612;
  --bg-4:          #221C16;
  --ink:           #FAF7F0;
  --ink-2:         rgba(250,247,240,0.62);
  --ink-3:         rgba(250,247,240,0.38);
  --ink-4:         rgba(250,247,240,0.18);
  --line:          rgba(250,247,240,0.08);
  --line-2:        rgba(250,247,240,0.14);
  --amber:         #F5A524;
  --amber-2:       #FFB845;
  --amber-soft:    rgba(245,165,36,0.14);
  --amber-faint:   rgba(245,165,36,0.06);
  --green:         #6FCF94;
  --red:           #E5664A;
  --font-sans:     "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --font-mono:     "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-serif:    "Instrument Serif", Georgia, "Times New Roman", serif;
  --radius:        16px;
  --radius-lg:     24px;
  --radius-pill:   999px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }

html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--amber); color: var(--bg); }

/* ─── nav ─── */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: rgba(10,9,8,0.7);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  max-width: 1100px; margin: 0 auto; padding: 0 28px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; letter-spacing: -0.01em; font-size: 17px;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--amber);
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 8px 24px -8px rgba(245,165,36,0.6);
}
.brand-mark::after {
  content: "";
  position: absolute; inset: 7px;
  border-radius: 999px;
  border: 2px solid var(--bg);
  border-top-color: transparent;
  border-right-color: transparent;
  transform: rotate(-45deg);
}
.nav-links {
  display: flex; align-items: center; gap: 24px;
  font-size: 14px; color: var(--ink-2);
}
.nav-links a:hover { color: var(--ink); }
.nav-links .here { color: var(--ink); }
@media (max-width: 720px) {
  .nav-links a:not(.btn) { display: none; }
}

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  border-radius: var(--radius-pill);
  font-weight: 500; font-size: 14px;
  letter-spacing: -0.005em;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--ink); }

/* ─── article shell ─── */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 28px 96px;
}
.article-meta {
  display: flex; flex-wrap: wrap; gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 24px;
}
.article-meta .dot { color: var(--ink-4); }
.article h1 {
  font-size: clamp(34px, 5.6vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 24px;
}
.article h1 .ital {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
}
.article .lead {
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0 0 40px;
}

.article h2 {
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 600;
  margin: 56px 0 20px;
}
.article h3 {
  font-size: 19px;
  line-height: 1.3;
  font-weight: 600;
  margin: 36px 0 12px;
}
.article p { margin: 0 0 20px; }
.article ul, .article ol {
  margin: 0 0 24px;
  padding-left: 22px;
}
.article li { margin-bottom: 8px; }
.article a:not(.btn):not(.related-card) {
  color: var(--amber-2);
  border-bottom: 1px solid var(--amber-soft);
  transition: border-color 0.12s ease;
}
.article a:not(.btn):not(.related-card):hover {
  border-bottom-color: var(--amber);
}
.article strong { color: var(--ink); font-weight: 600; }
.article em { color: var(--ink); }

.article blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--amber);
  color: var(--ink-2);
  font-style: normal;
}
.article code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--bg-3);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ─── inline CTA strip ─── */
.cta-strip {
  margin: 40px 0;
  padding: 24px 24px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.cta-strip .cta-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-bottom: 8px;
}
.cta-strip p {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 17px;
}
.cta-strip .cta-row {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
.btn-app-store {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--bg);
  border-radius: var(--radius-pill);
  padding: 10px 18px 10px 14px;
  font-weight: 500;
}
.btn-app-store .as-icon { width: 22px; height: 22px; }
.btn-app-store .as-meta { display: flex; flex-direction: column; line-height: 1.1; }
.btn-app-store .as-eyebrow { font-size: 10px; opacity: 0.7; }
.btn-app-store .as-title { font-size: 15px; font-weight: 600; }

/* ─── related articles ─── */
.related {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.related-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 16px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.related-card {
  display: block;
  padding: 18px 20px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.related-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.related-card .rc-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.related-card .rc-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
}

/* ─── back to hub ─── */
.back-hub {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.back-hub:hover { color: var(--ink); }

/* ─── hub page (articles/index.html) ─── */
.hub {
  max-width: 1000px;
  margin: 0 auto;
  padding: 64px 28px 96px;
}
.hub-header { margin-bottom: 48px; }
.hub-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-bottom: 12px;
}
.hub h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 16px;
}
.hub h1 .ital {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}
.hub-lead {
  font-size: 20px;
  color: var(--ink-2);
  max-width: 62ch;
  line-height: 1.5;
}
.hub-section { margin-top: 56px; }
.hub-section h2 {
  font-size: 14px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  font-weight: 500;
  margin: 0 0 16px;
}
.hub-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.hub-card {
  display: block;
  padding: 22px 22px 20px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.hub-card:hover { border-color: var(--amber-soft); transform: translateY(-1px); }
.hub-card .hc-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.hub-card .hc-title {
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 8px;
}
.hub-card .hc-blurb {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
}

/* ─── footer ─── */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 80px;
  padding: 40px 28px;
  font-size: 13px;
  color: var(--ink-3);
}
.site-footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: var(--ink); }
.site-footer .mono { font-family: var(--font-mono); }
