/* ============================================================
   The Indie Founder Stack — styles
   Palette: warm-dark "terminal editorial". Lime-amber accent.
   Type: Space Grotesk (display) / Inter (body) / JetBrains Mono (labels)
   ============================================================ */

:root {
  /* dark is the default */
  --bg:        #0c0d0f;
  --bg-soft:   #141619;
  --bg-card:   #16181c;
  --bg-card-2: #1b1e23;
  --line:      #262a31;
  --line-soft: #1e2127;
  --text:      #e9ebee;
  --text-dim:  #a3a9b3;
  --text-mute: #6b7280;
  --accent:    #c8f04a;   /* lime */
  --accent-2:  #ffb347;   /* amber */
  --accent-ink:#0c0d0f;
  --danger:    #ff6b6b;
  --radius:    14px;
  --radius-sm: 9px;
  --maxw:      1140px;
  --shadow:    0 1px 0 rgba(255,255,255,.03), 0 18px 40px -24px rgba(0,0,0,.8);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:        #fbfbf9;
    --bg-soft:   #f3f3ef;
    --bg-card:   #ffffff;
    --bg-card-2: #f7f7f3;
    --line:      #e3e3dc;
    --line-soft: #ececE5;
    --text:      #16181c;
    --text-dim:  #4b5159;
    --text-mute: #868d97;
    --accent:    #5b8c00;
    --accent-2:  #b86b00;
    --accent-ink:#ffffff;
    --shadow:    0 1px 0 rgba(0,0,0,.02), 0 16px 36px -26px rgba(0,0,0,.25);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* subtle grid texture on the page bg */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .35;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 25%, transparent 80%);
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

a { color: inherit; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- mono label ---------- */
.mono {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 62px;
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.02rem;
  text-decoration: none; letter-spacing: -.01em;
}
.brand .mark {
  font-family: var(--font-mono);
  color: var(--accent-ink);
  background: var(--accent);
  padding: .2rem .42rem;
  border-radius: 7px;
  font-size: .82rem;
  font-weight: 700;
}
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a {
  text-decoration: none; color: var(--text-dim);
  font-size: .9rem; font-weight: 500;
  transition: color .15s ease;
}
.nav a:hover { color: var(--text); }
@media (max-width: 720px) { .nav a.hide-sm { display: none; } }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 9vw, 110px) 0 40px; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.3rem, 6vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -.025em;
  margin: 1.1rem 0 0;
  max-width: 16ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
  position: relative;
}
.hero .lede {
  margin: 1.4rem 0 0;
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  color: var(--text-dim);
  max-width: 60ch;
}
.hero-actions { margin-top: 2.2rem; display: flex; gap: .8rem; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono);
  font-size: .82rem; letter-spacing: .04em;
  text-decoration: none; font-weight: 600;
  padding: .8rem 1.2rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--text);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); border-color: var(--text-mute); }
.btn-primary {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }

/* ---------- stack diagram ---------- */
.stack-section { padding: 30px 0 10px; }
.section-head { margin-bottom: 1.6rem; }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  margin: .5rem 0 .3rem;
}
.section-head p { color: var(--text-dim); margin: 0; max-width: 62ch; }

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}
.stack-cat {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-card), var(--bg-card-2));
  border-radius: var(--radius-sm);
  padding: 14px 14px 12px;
  text-decoration: none;
  display: flex; flex-direction: column; gap: .5rem;
  transition: border-color .15s ease, transform .15s ease;
}
.stack-cat:hover { border-color: var(--accent); transform: translateY(-2px); }
.stack-cat .num {
  font-family: var(--font-mono); font-size: .7rem;
  color: var(--accent);
}
.stack-cat .cat-name {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1rem; letter-spacing: -.01em;
}
.stack-cat .cat-tools {
  font-size: .8rem; color: var(--text-mute);
  line-height: 1.45;
}

/* ---------- filter bar ---------- */
.tools-section { padding: 56px 0 30px; }
.filterbar {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-bottom: 1.8rem;
  position: sticky; top: 62px; z-index: 20;
  padding: 14px 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
}
.chip {
  font-family: var(--font-mono);
  font-size: .74rem; letter-spacing: .03em;
  padding: .48rem .8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--text-dim);
  cursor: pointer;
  transition: all .14s ease;
}
.chip:hover { border-color: var(--text-mute); color: var(--text); }
.chip[aria-pressed="true"] {
  background: var(--accent); color: var(--accent-ink);
  border-color: var(--accent); font-weight: 600;
}

/* ---------- tool cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
}
.card {
  border: 1px solid var(--line);
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); transform: translateY(-3px); }
.card[hidden] { display: none; }

.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.card h3 {
  font-family: var(--font-display);
  font-size: 1.28rem; font-weight: 700; letter-spacing: -.02em;
  margin: 0;
}
.card .cat-tag {
  font-family: var(--font-mono); font-size: .64rem;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-mute);
  border: 1px solid var(--line);
  padding: .25rem .5rem; border-radius: 6px;
  white-space: nowrap;
}
.card .tagline { color: var(--text-dim); margin: .55rem 0 0; font-size: .96rem; }

.badges { display: flex; gap: .4rem; flex-wrap: wrap; margin: 1rem 0 0; }
.badge {
  font-family: var(--font-mono); font-size: .66rem;
  letter-spacing: .05em; text-transform: uppercase;
  padding: .3rem .55rem; border-radius: 6px;
  border: 1px solid var(--line);
}
.badge-recurring { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 700; }
.badge-onetime { color: var(--text-dim); }

.rows { margin: 1.1rem 0 0; display: grid; gap: .75rem; }
.row { display: grid; grid-template-columns: 1fr; gap: .15rem; }
.row .label {
  font-family: var(--font-mono); font-size: .64rem;
  letter-spacing: .1em; text-transform: uppercase;
}
.row .label.best  { color: var(--accent); }
.row .label.why   { color: var(--text-mute); }
.row .label.caveat{ color: var(--accent-2); }
.row .label.free  { color: var(--text-mute); }
.row .val { font-size: .9rem; color: var(--text-dim); }
.row .val strong { color: var(--text); font-weight: 600; }

.card-foot {
  margin-top: auto; padding-top: 1.3rem;
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
}
.cta {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--font-mono); font-size: .76rem; letter-spacing: .03em;
  font-weight: 600; text-decoration: none;
  padding: .6rem .9rem; border-radius: 9px;
  background: var(--bg-card-2); border: 1px solid var(--line);
  color: var(--text);
  transition: all .15s ease;
}
.cta:hover { border-color: var(--accent); color: var(--accent); transform: translateX(2px); }
.cta.is-recurring { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cta.is-recurring:hover { color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 88%, #fff); }
.deep-link {
  font-family: var(--font-mono); font-size: .72rem;
  text-decoration: none; color: var(--text-mute);
  border-bottom: 1px dotted var(--text-mute);
}
.deep-link:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- transparency ---------- */
.transparency {
  margin: 64px 0 0;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
}
.transparency h2 {
  font-family: var(--font-display); font-size: 1.4rem; letter-spacing: -.02em;
  margin: .4rem 0 .7rem;
}
.transparency p { color: var(--text-dim); margin: 0 0 .8rem; max-width: 72ch; }
.transparency p:last-child { margin-bottom: 0; }
.transparency strong { color: var(--text); }

/* ---------- footer ---------- */
.site-foot {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  padding: 38px 0 56px;
}
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.site-foot a { color: var(--accent); text-decoration: none; font-weight: 600; }
.site-foot a:hover { text-decoration: underline; }
.site-foot .mono { max-width: 52ch; }

/* ---------- deep-dive pages ---------- */
.article { padding: clamp(40px, 7vw, 72px) 0 0; }
.article .wrap { max-width: 760px; }
.back-link {
  font-family: var(--font-mono); font-size: .76rem; letter-spacing: .04em;
  text-decoration: none; color: var(--text-mute);
}
.back-link:hover { color: var(--accent); }
.article h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.025em;
  line-height: 1.06; margin: 1.2rem 0 .4rem;
}
.article .sub { color: var(--text-dim); font-size: 1.15rem; margin: 0 0 1.6rem; }
.article h2 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em;
  font-size: 1.5rem; margin: 2.4rem 0 .6rem;
  padding-top: 1.2rem; border-top: 1px solid var(--line);
}
.article h3 { font-family: var(--font-display); font-size: 1.15rem; margin: 1.6rem 0 .4rem; }
.article p { color: var(--text-dim); margin: 0 0 1.1rem; }
.article p strong, .article li strong { color: var(--text); }
.article ul { color: var(--text-dim); padding-left: 1.2rem; margin: 0 0 1.1rem; }
.article li { margin: .4rem 0; }
.article .callout {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: var(--bg-soft); border-radius: var(--radius-sm);
  padding: 16px 20px; margin: 1.6rem 0;
}
.article .callout .mono { color: var(--accent); margin-bottom: .3rem; display: block; }

.pricing-table {
  width: 100%; border-collapse: collapse; margin: 1rem 0 1.6rem;
  font-size: .92rem;
}
.pricing-table th, .pricing-table td {
  text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line);
}
.pricing-table th { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-mute); }
.pricing-table td { color: var(--text-dim); }
.pricing-table td:first-child { color: var(--text); font-weight: 600; }

.article-cta {
  display: block; margin: 2rem 0;
  border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg-card));
  border-radius: var(--radius); padding: 22px 24px; text-decoration: none;
  transition: transform .15s ease;
}
.article-cta:hover { transform: translateY(-2px); }
.article-cta .mono { color: var(--accent); }
.article-cta .big { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin: .3rem 0 .2rem; color: var(--text); }
.article-cta .small { color: var(--text-dim); font-size: .9rem; }

/* reveal-on-scroll (respects reduced-motion via the rule above) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
