/* ============================================
   benpage.us — Editorial Design System
   Adapted from brainpage.ai
   Newsreader / Manrope / Inter
   #faf9f4 cream  |  #03241f forest green
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400;1,6..72,500&family=Manrope:wght@300;400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #faf9f4;
  --bg-surface: #f4f2ec;
  --bg-surface-low: #efede6;
  --bg-surface-container: #e8e5dd;
  --fg: #1a1a18;
  --fg-muted: #6b6962;
  --fg-light: #8f8a80;
  --green: #03241f;
  --green-light: #0a3d34;
  --border: rgba(3,36,31,.08);

  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Manrope', -apple-system, sans-serif;
  --label: 'Inter', -apple-system, sans-serif;
  --mono: var(--mono);

  --col-text: 680px;
  --col-visual: 900px;
  --col-max: 1080px;
}

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

html { font-size: 18px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body { font-family: var(--sans); color: var(--fg); background: var(--bg); line-height: 1.65; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.2; color: var(--green); }
h1 { font-size: 3rem; letter-spacing: -.02em; }
h2 { font-size: 2rem; letter-spacing: -.01em; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.15rem; }
p { margin-bottom: 1.25rem; }
p:last-child { margin-bottom: 0; }

/* Layout */
.container { max-width: var(--col-max); margin: 0 auto; padding: 0 1.5rem; }
.reading { max-width: var(--col-text); margin: 0 auto; }
.visual { max-width: var(--col-visual); margin: 0 auto; }
.section { padding: 3rem 0; }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,249,244,.85); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); padding: .85rem 0;
}
.nav-inner {
  max-width: var(--col-max); margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--serif); font-size: 1.3rem; font-weight: 500;
  color: var(--green); text-decoration: none; letter-spacing: -.02em;
}
.nav-logo em { font-style: italic; }
.nav-logo:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; list-style: none; }
.nav-links a {
  font-family: var(--label); font-size: .85rem; font-weight: 500;
  color: var(--fg-muted); text-decoration: none; transition: color .2s;
}
.nav-links a:hover { color: var(--green); text-decoration: none; }
.nav-links a.active { color: var(--green); }
.nav-subscribe {
  background: var(--green); color: #fff !important; padding: .45rem 1.1rem;
  border-radius: 6px; font-size: .8rem; font-weight: 600; transition: background .2s;
}
.nav-subscribe:hover { background: var(--green-light); color: #fff !important; }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--green); margin: 5px 0; transition: .3s; }

/* ---- Buttons ---- */
.btn {
  display: inline-block; font-family: var(--label); font-weight: 600; font-size: .9rem;
  padding: .75rem 1.75rem; border-radius: 8px; transition: all .2s;
  cursor: pointer; text-decoration: none; border: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-light); color: #fff; }
.btn-secondary { background: transparent; color: var(--green); border: 1.5px solid var(--green); }
.btn-secondary:hover { background: var(--green); color: #fff; }

/* ---- Sub-nav ---- */
.sub-nav {
  background: var(--bg); border-bottom: 1px solid var(--border);
  padding: .75rem 0;
}
.sub-nav .container { display: flex; gap: 1.5rem; }
.sub-nav-link {
  font-family: var(--label); font-size: .8rem; font-weight: 500;
  color: var(--fg-muted); text-decoration: none; padding: .25rem 0;
  border-bottom: 2px solid transparent; transition: all .2s;
}
.sub-nav-link:hover { color: var(--green); text-decoration: none; }
.sub-nav-link.active { color: var(--green); border-bottom-color: var(--green); }

/* ---- Manifesto page — paper treatment ---- */
.manifesto-page .manifesto-body .section-break { padding: 1.5rem 0; }
.manifesto-paper {
  max-width: 780px; margin: 0 auto; padding: 3rem 3rem 4rem;
  background: #fff; box-shadow: 0 1px 8px rgba(0,0,0,.06), 0 4px 24px rgba(0,0,0,.04);
  border-radius: 4px;
}
.manifesto-paper .reading { max-width: 680px; margin: 0 auto; }
.manifesto-page .manifesto-header {
  max-width: 780px; margin: 0 auto; padding: 4rem 3rem 2rem;
  background: #fff; border-radius: 4px 4px 0 0;
  box-shadow: 0 -1px 8px rgba(0,0,0,.06), 0 -2px 24px rgba(0,0,0,.04);
}
.manifesto-page .manifesto-header h1 { max-width: 100%; }
.manifesto-page .manifesto-body > .container > .manifesto-paper {
  border-radius: 0 0 4px 4px; padding-top: 0;
}
.manifesto-page .email-capture { background: var(--bg-surface); }

/* Manifesto diagrams */
.manifesto-diagram {
  max-width: var(--col-text); margin: 2rem auto; text-align: center;
}
.manifesto-diagram svg { max-width: 100%; height: auto; display: block; margin: 0 auto; }

/* ---- Hero ---- */
.hero { padding: 4rem 0 2rem; height: auto; min-height: 0; }
.hero .reading { max-width: 720px; }
.hero h1 { margin-bottom: 1.5rem; }
.hero-body { font-size: 1.05rem; line-height: 1.7; color: var(--fg); }
.hero-body p { margin-bottom: 1.25rem; }
.hero-cta { margin-top: 2rem; }
.hero-cta .btn { margin-right: .75rem; }
.hero-note {
  font-family: var(--label); font-size: .8rem; color: var(--fg-light);
  margin-top: .75rem;
}
.hero-layout { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; align-items: start; }
.hero-photo {
  border-radius: 12px; overflow: hidden;
  position: sticky; top: 6rem; aspect-ratio: 3/4;
}
.hero-photo img { width: 100%; height: 100%; border-radius: 12px; object-fit: cover; object-position: center top; }
.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.75rem; }

/* ---- Section label ---- */
.section-label {
  font-family: var(--label); font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--fg-muted); margin-bottom: 1.5rem;
}

/* ---- Stats bar ---- */
.stats-bar { display: flex; gap: 3rem; padding: 2.5rem 0; flex-wrap: wrap; }
.stat { text-align: center; flex: 1; min-width: 120px; }
.stat-num {
  font-family: var(--serif); font-size: 2.5rem; font-weight: 500;
  color: var(--green); line-height: 1.1;
}
.stat-label {
  font-family: var(--label); font-size: .75rem; font-weight: 500;
  color: var(--fg-muted); text-transform: uppercase; letter-spacing: .06em; margin-top: .35rem;
}

/* ---- Working-on list ---- */
.working-list { list-style: none; }
.working-list li { padding: 1rem 0; border-bottom: 1px solid var(--border); font-size: .95rem; line-height: 1.6; }
.working-list li:last-child { border-bottom: none; }
.working-num { font-family: var(--mono); font-size: .8rem; color: var(--fg-light); margin-right: .75rem; }
.datestamp { font-family: var(--label); font-size: .75rem; color: var(--fg-light); margin-bottom: 1rem; }

/* ---- Lane pills ---- */
.pills { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 1.5rem 0; }
.pill {
  font-family: var(--label); font-size: .7rem; font-weight: 500;
  color: var(--fg-muted); background: var(--bg-surface); padding: .3rem .75rem;
  border-radius: 100px; letter-spacing: .03em;
}

/* ---- Cards ---- */
.card-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.card {
  background: var(--bg-surface-low); border-radius: 12px; padding: 2rem;
  transition: transform .2s; text-decoration: none; display: block; color: inherit;
}
.card:hover { transform: translateY(-2px); text-decoration: none; }
.card-label {
  font-family: var(--label); font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--fg-muted); margin-bottom: .75rem;
}
.card h3 { font-size: 1.2rem; margin-bottom: .75rem; }
.card-label-inline { font-family: var(--label); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.card-sep { color: var(--fg-light); font-weight: 300; margin: 0 .15rem; }
.card p { font-size: .95rem; color: var(--fg-muted); line-height: 1.55; }
.card-link {
  display: inline-block; margin-top: 1rem;
  font-family: var(--label); font-size: .85rem; font-weight: 600; color: var(--green);
}

/* ---- Subscribe section ---- */
.subscribe-section {
  background: var(--bg-surface); padding: 4rem 0; text-align: center;
}
.subscribe-section h2 { margin-bottom: .75rem; }
.subscribe-section p { color: var(--fg-muted); font-size: 1rem; max-width: 560px; margin: 0 auto 1.5rem; }
.subscribe-section .btn { margin-top: .5rem; }

/* ---- Page header (interior pages) ---- */
.page-header { padding: 5rem 0 3rem; }
.page-header h1 { margin-bottom: 1.5rem; }

/* ---- Long-form reading ---- */
.page-body { padding: 0 0 4rem; }
.page-body .reading p { font-size: 1rem; line-height: 1.7; }
.page-body .reading p + p { margin-top: 0; }

/* ---- Article list ---- */
.article-list { list-style: none; margin-top: 2rem; }
.article-list li {
  padding: 1rem 0; border-bottom: 1px solid var(--border);
}
.article-list li:last-child { border-bottom: none; }
.article-list a {
  font-family: var(--serif); font-size: 1.1rem; font-weight: 500;
  color: var(--green); text-decoration: none;
}
.article-list a:hover { text-decoration: underline; }

/* ---- Manifesto styles ---- */
.manifesto-header { text-align: center; padding: 5rem 0 3rem; }
.manifesto-header h1 { font-size: 2.75rem; max-width: 700px; margin: 0 auto 1rem; }
.manifesto-header .subtitle {
  font-family: var(--sans); font-size: 1.1rem; color: var(--fg-muted);
  max-width: 580px; margin: 0 auto 1rem; line-height: 1.6;
}
.manifesto-header .meta { font-family: var(--label); font-size: .8rem; color: var(--fg-light); }
.manifesto-body h2 { margin-top: 3.5rem; margin-bottom: 1.25rem; }
.manifesto-body p { font-size: 1rem; line-height: 1.7; }
.manifesto-body .section-break { text-align: center; padding: 3rem 0; color: var(--fg-light); font-size: 1.5rem; letter-spacing: .3em; }

.pull-quote {
  border-left: 3px solid var(--green); padding: 1.25rem 0 1.25rem 1.75rem; margin: 2.5rem 0;
}
.pull-quote p {
  font-family: var(--serif); font-style: italic; font-size: 1.35rem;
  line-height: 1.45; color: var(--green); margin: 0;
}

.screenshot-frame { max-width: var(--col-visual); margin: 2rem auto; border-radius: 12px; overflow: hidden; }
.screenshot-frame img { width: 100%; border-radius: 12px; }
.screenshot-caption {
  font-family: var(--label); font-style: italic; font-size: .8rem;
  color: var(--fg-light); text-align: center; margin-top: .75rem;
}

.diagram { max-width: var(--col-visual); margin: 2.5rem auto; text-align: center; }
.diagram svg { margin: 0 auto; display: block; max-width: 100%; height: auto; }

.quad-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; max-width: 600px; margin: 2rem auto; }
.quad-cell {
  background: var(--bg-surface); border-radius: 10px; padding: 1.75rem;
  text-align: center; font-family: var(--serif); font-size: 1.05rem; font-weight: 500; color: var(--green);
}

.doc-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
.doc-card { background: var(--bg-surface); border-radius: 10px; padding: 1.5rem; }
.doc-card h4 { font-family: var(--mono); font-size: .85rem; font-weight: 500; color: var(--green); margin-bottom: .5rem; }
.doc-card p { font-size: .85rem; color: var(--fg-muted); line-height: 1.5; margin: 0; }

.email-capture {
  background: var(--bg-surface); border-radius: 16px;
  padding: 3.5rem 2rem; text-align: center;
}
.email-capture h2 { font-size: 1.75rem; margin-bottom: .5rem; }
.email-capture p { color: var(--fg-muted); font-size: .95rem; margin-bottom: 1.5rem; }

.section-sm { padding: 3rem 0; }

/* ---- Footer ---- */
.footer { padding: 3rem 0; text-align: center; border-top: 1px solid var(--border); }
.footer p { font-size: .85rem; color: var(--fg-muted); line-height: 1.6; }
.footer-links {
  display: flex; justify-content: center; gap: 1.5rem; margin-top: .75rem; list-style: none;
  flex-wrap: wrap;
}
.footer-links a { font-family: var(--label); font-size: .8rem; color: var(--fg-muted); }
.footer-links a:hover { color: var(--green); }
.footer-sep { color: var(--fg-light); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  html { font-size: 16px; }
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.6rem; }
  .section { padding: 3rem 0; }
  .hero { padding: 3rem 0 2rem; }
  .hero-layout { grid-template-columns: 1fr; gap: 2rem; }
  .hero-photo { order: -1; max-width: 280px; position: static; }
  .stats-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
  .card-grid { grid-template-columns: 1fr; }
  .doc-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav-links.active {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(250,249,244,.98); backdrop-filter: blur(12px);
    padding: 1.5rem; gap: 1rem; border-bottom: 1px solid var(--border);
  }
  .hamburger { display: block; }
  .manifesto-header h1 { font-size: 2rem; }
  .manifesto-paper { padding: 2rem 1.5rem 3rem; }
  .manifesto-page .manifesto-header { padding: 3rem 1.5rem 1.5rem; }
  .pull-quote p { font-size: 1.15rem; }
  .subscribe-section { padding: 3rem 0; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.85rem; }
  .stat-num { font-size: 2rem; }
  .doc-grid { grid-template-columns: 1fr; }
  .email-capture { padding: 2.5rem 1.25rem; }
  .quad-grid { grid-template-columns: 1fr; }
  .btn-group { flex-direction: column; }
  .btn-group .btn { text-align: center; }
}
