@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&family=Inter:wght@400;500;600&display=swap');

:root {
  --cream: #faf7f0;
  --paper: #f2ece0;
  --bark: #1e160a;
  --bark-mid: #4a3522;
  --bark-light: #8c6e4f;
  --moss: #3d6b44;
  --moss-mid: #5a8a62;
  --moss-light: #e6f0e7;
  --clay: #c4713a;
  --clay-light: #fceee3;
  --sage: #7a9e7e;
  --sage-light: #d4e5d6;
  --gold: #9a7b2e;
  --gold-light: #fdf3d8;
  --rule: #ddd0bc;
  --rule-light: #ece5d8;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--bark);
  background: var(--cream);
  margin: 0;
}

/* ── Nav ── */
.site-nav {
  background: var(--bark);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 52px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav .wordmark {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--cream);
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.9;
}

.site-nav .wordmark em {
  font-style: italic;
  color: var(--sage);
}

.nav-links {
  display: flex;
  gap: 0.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--sage-light);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  opacity: 0.8;
}

.nav-links a:hover { background: rgba(255,255,255,0.1); opacity: 1; }
.nav-links a.active { color: white; opacity: 1; }

/* ── Page header ── */
.page-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: 3.5rem 2rem 3rem;
  text-align: center;
}

.page-header .eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clay);
  margin: 0 0 0.75rem;
}

.page-header h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--bark);
  margin: 0 0 1rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-header h1 em {
  font-style: italic;
  color: var(--moss);
}

.page-header .lede {
  font-size: 1.05rem;
  color: var(--bark-mid);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Container ── */
.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Section titles ── */
.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bark-light);
  margin: 0 0 0.5rem;
}

h2.section-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--bark);
  margin: 0 0 1rem;
}

/* ── Callouts ── */
.callout {
  border-radius: 8px;
  padding: 1rem 1.2rem;
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 1.5rem 0;
}

.callout-moss { background: var(--moss-light); border-left: 3px solid var(--moss); }
.callout-clay { background: var(--clay-light); border-left: 3px solid var(--clay); }
.callout-gold { background: var(--gold-light); border-left: 3px solid var(--gold); }

.callout strong { display: block; margin-bottom: 0.3rem; font-size: 0.85rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
}

.btn-moss {
  background: var(--moss);
  color: white;
}
.btn-moss:hover { background: var(--moss-mid); }

.btn-outline {
  background: transparent;
  color: var(--bark-mid);
  border: 1.5px solid var(--rule);
}
.btn-outline:hover { border-color: var(--bark-light); color: var(--bark); }

/* ── Tags / Badges ── */
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2em 0.6em;
  border-radius: 20px;
  white-space: nowrap;
}

.tag-free { background: var(--moss-light); color: var(--moss); }
.tag-paid { background: var(--clay-light); color: var(--clay); }
.tag-freemium { background: var(--gold-light); color: var(--gold); }
.tag-nocode { background: #e8eaf6; color: #3949ab; }
.tag-code { background: #f3e5f5; color: #7b1fa2; }

/* ── Code blocks ── */
pre {
  background: var(--bark);
  color: #c8d3c5;
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.6;
  margin: 1rem 0;
}

code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.84em;
  background: var(--rule-light);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  color: var(--clay);
}

pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

/* ── Details/summary ── */
details {
  border: 1px solid var(--rule);
  border-radius: 8px;
  margin: 1.5rem 0;
  overflow: hidden;
}

summary {
  padding: 0.9rem 1.2rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  background: var(--paper);
  color: var(--bark-mid);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

summary::-webkit-details-marker { display: none; }
summary::before { content: '▶'; font-size: 0.7rem; transition: transform 0.2s; }
details[open] summary::before { transform: rotate(90deg); }

details > *:not(summary) {
  padding: 1.2rem;
  background: white;
}

/* ── Footer ── */
.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--rule);
  padding: 2.5rem 2rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--bark-light);
  margin-top: 6rem;
}

.site-footer a { color: var(--moss); text-decoration: none; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .page-header { padding: 2.5rem 1.5rem 2rem; }
  .container, .container-wide { padding: 0 1.25rem; }

  .site-nav {
    padding: 0.6rem 1.25rem;
    height: auto;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
  }

  .nav-links {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.15rem;
    padding-bottom: 0.25rem;
  }

  .nav-links a {
    font-size: 0.78rem;
    padding: 0.25rem 0.55rem;
  }
}
