/* Open Membership — site stylesheet
   Single file, no framework, no external assets except the optional og.png.
   Modeled on opensubscriptionplatforms.com: clean, technical, sober. */

:root {
  --bg: #fbfaf6;
  --bg-alt: #f3f0e8;
  --fg: #161513;
  --fg-soft: #4a4844;
  --fg-mute: #7a7770;
  --rule: #e3dfd2;
  --accent: #b1480f;
  --accent-soft: #fbe9d8;
  --check: #2f7a3a;
  --x: #b54040;
  --code-bg: #1c1b18;
  --code-fg: #f3f0e8;
  --max: 980px;
  --pad: 1.5rem;
  --radius: 4px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 "Inter", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  line-height: 1.2;
}
h1 { font-size: 2.6rem; letter-spacing: -0.02em; }
h2 { font-size: 1.7rem; margin-top: 0; }
h3 { font-size: 1.15rem; }
h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-mute); }

p { margin: 0 0 1em; }

code {
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--bg-alt);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

pre {
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 1.5em 0;
}

pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.logo {
  font-weight: 600;
  text-decoration: none;
  color: var(--fg);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.logo-mark {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  background: var(--accent);
  color: var(--bg);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  margin-left: 0.4em;
  vertical-align: 1px;
}
nav a {
  margin-left: 1.4rem;
  color: var(--fg-soft);
  text-decoration: none;
  font-size: 0.92rem;
}
nav a:hover { color: var(--fg); }

/* Hero */
.hero {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--rule);
}
.hero .kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 1rem;
  font-weight: 600;
}
.hero h1 {
  max-width: 18ch;
  margin-bottom: 1.2rem;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero .lede {
  font-size: 1.15rem;
  color: var(--fg-soft);
  max-width: 60ch;
  line-height: 1.55;
  margin-bottom: 2rem;
}
.cta-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0;
}
.cta {
  display: inline-block;
  padding: 0.7em 1.2em;
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--fg);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
}
.cta:hover { border-color: var(--fg); }
.cta.primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.cta.primary:hover { background: var(--accent); border-color: var(--accent); }

/* Sections */
.section {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.section-alt { background: var(--bg-alt); }

.section h2 { max-width: 28ch; }
.section > .container > p { max-width: 65ch; color: var(--fg-soft); }

.footnote {
  font-size: 0.9rem;
  color: var(--fg-mute);
  max-width: 65ch;
}

/* Three-card grid (under code block) */
.three-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.three-cards article {
  border: 1px solid var(--rule);
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.2rem;
}
.three-cards h3 { margin-bottom: 0.4rem; }
.three-cards p {
  font-size: 0.95rem;
  color: var(--fg-soft);
  margin: 0;
}

/* Comparison table */
.table-wrap {
  overflow-x: auto;
  margin: 2rem 0 1rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
table th, table td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
table thead th {
  font-weight: 600;
  background: var(--bg-alt);
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}
table tbody th {
  font-weight: 500;
  color: var(--fg);
  background: var(--bg-alt);
}
table tr:last-child th, table tr:last-child td { border-bottom: 0; }

td.check { color: var(--check); font-weight: 600; }
td.x { color: var(--x); font-weight: 500; }

.compare th[scope="row"] { white-space: nowrap; }

.levels td:first-child {
  font-weight: 600;
  width: 4em;
  text-align: center;
  background: var(--bg-alt);
}

/* Personas */
.personas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.personas article h3 {
  font-size: 1rem;
  margin-bottom: 0.5em;
}
.personas article p {
  font-size: 0.95rem;
  color: var(--fg-soft);
  margin: 0;
}

/* Status list */
.status-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 1rem;
  border-top: 1px solid var(--rule);
}
.status-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--fg-soft);
}
.status-list strong { color: var(--fg); font-weight: 600; }

/* Get involved */
.involved-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.involved-grid article {
  border: 1px solid var(--rule);
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
}
.involved-grid h3 { margin-bottom: 0.5em; }
.involved-grid p { font-size: 0.95rem; color: var(--fg-soft); flex-grow: 1; }
.involved-grid .cta { align-self: flex-start; margin-top: 0.5rem; }

/* Footer */
.site-footer {
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 4rem 0 2rem;
  font-size: 0.92rem;
}
.site-footer a { color: #f6c69b; }
.site-footer a:hover { color: var(--bg); }
.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-brand {
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
  color: var(--bg);
}
.footer-brand span {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  background: var(--accent);
  color: var(--bg);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  margin-left: 0.3em;
  vertical-align: 2px;
}
.footer-tag {
  color: #b9b6ad;
  max-width: 40ch;
  margin: 0;
  line-height: 1.55;
}
.site-footer h4 {
  color: var(--bg);
  font-size: 0.78rem;
  margin: 0 0 0.7rem;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer li {
  padding: 0.2rem 0;
  color: #b9b6ad;
}
.copyright {
  border-top: 1px solid #2c2b27;
  padding-top: 1.5rem;
  margin: 0;
  color: #8a877f;
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 720px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.4rem; }
  .hero { padding: 3rem 0 2.5rem; }
  .section { padding: 3rem 0; }
  nav { display: none; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 480px) {
  .footer-cols { grid-template-columns: 1fr; }
  pre { font-size: 0.78rem; padding: 1rem; }
}

/* Print */
@media print {
  .site-header, .cta-row, .site-footer { display: none; }
  body { background: white; color: black; }
  .section { padding: 1.5rem 0; border-bottom: 1px solid #ccc; }
  pre { background: #f4f4f4; color: black; border: 1px solid #ccc; }
}
