/* newsletter template — editorial, centered, reader-focused. Substack feel. */

:root {
  --container: 800px;
  --container-wide: 960px;
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px;
  --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --space-7: 48px; --space-8: 64px; --space-9: 96px;
  --radius: 6px; --radius-lg: 12px;
  --transition: 180ms ease;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif Pro", "Iowan Old Style", "Georgia", serif;
}

[data-density="compact"]     { --section-pad: var(--space-7); --hero-pad: var(--space-7); }
[data-density="comfortable"] { --section-pad: var(--space-8); --hero-pad: var(--space-8); }
[data-density="airy"]        { --section-pad: var(--space-9); --hero-pad: 120px; }

[data-theme="light"] { --bg: #fdfcf8; --fg: #1a1814; --muted: #5b574c; --surface: #f4f0e6; --border: #e3ddc8; --on-primary: #fdfcf8; }
[data-theme="dark"]  { --bg: #14130f; --fg: #f0ece0; --muted: #a09988; --surface: #1c1a14; --border: #2a2620; --on-primary: #14130f; }
[data-theme="ai"]    { --bg: #0a0c10; --fg: #ecf0fa; --muted: #94a3bd; --surface: #11141a; --border: #1c2235; --on-primary: #0a0c10; }

[data-palette="slate"]   { --primary: #1f2937; --primary-hover: #0f172a; --accent: #64748b; }
[data-palette="indigo"]  { --primary: #3730a3; --primary-hover: #312e81; --accent: #6366f1; }
[data-palette="emerald"] { --primary: #047857; --primary-hover: #065f46; --accent: #10b981; }
[data-palette="rose"]    { --primary: #9f1239; --primary-hover: #881337; --accent: #e11d48; }
[data-palette="amber"]   { --primary: #92400e; --primary-hover: #78350f; --accent: #d97706; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); color: var(--fg); font-family: var(--font-sans); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

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

/* HEADER */
.hdr { border-bottom: 1px solid var(--border); }
.hdr-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); padding: var(--space-3) 0; max-width: var(--container-wide); }
.brand { display: flex; align-items: center; gap: var(--space-2); color: var(--fg); font-weight: 700; text-decoration: none; font-family: var(--font-serif); }
.brand img { width: auto; height: 28px; }
.hdr-nav { display: flex; gap: var(--space-5); }
.hdr-nav a { color: var(--muted); font-size: 0.95rem; text-decoration: none; }
.hdr-nav a:hover { color: var(--fg); }
@media (max-width: 720px) { .hdr-nav { display: none; } }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: var(--space-2); padding: 10px 18px; border-radius: var(--radius); font-weight: 600; transition: var(--transition); border: 1px solid transparent; text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 0.9rem; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--primary-hover); text-decoration: none; }

/* HERO */
.hero { padding: var(--hero-pad) 0; text-align: center; }
.hero-inner { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.hero-photo { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; margin-bottom: var(--space-5); border: 3px solid var(--border); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-name { font-family: var(--font-serif); font-weight: 700; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.1; margin: 0 0 var(--space-4); letter-spacing: -0.02em; }
.hero-tagline { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--muted); margin: 0 0 var(--space-6); max-width: 50ch; line-height: 1.5; }
.hero-proof { color: var(--muted); font-size: 0.9rem; margin: var(--space-4) 0 0; font-weight: 500; letter-spacing: 0.02em; }

/* SECTION HEADINGS */
.section-heading { font-family: var(--font-serif); font-weight: 700; font-size: clamp(1.4rem, 2.5vw, 1.9rem); margin: 0 0 var(--space-6); letter-spacing: -0.01em; }

/* ABOUT */
.about { padding: var(--section-pad) 0; border-top: 1px solid var(--border); }
.about-body { font-size: 1.05rem; color: var(--fg); max-width: 60ch; line-height: 1.7; }
.about-body p { margin: 0 0 var(--space-4); }
.about-body strong { font-weight: 700; }

/* ISSUES */
.issues { padding: var(--section-pad) 0; background: var(--surface); }
.issues-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0; counter-reset: issue; }
.issue-row { display: flex; gap: var(--space-5); padding: var(--space-5) 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.issue-row:last-child { border-bottom: 0; }
.issue-meta { flex-shrink: 0; width: 100px; padding-top: 2px; }
.issue-date { font-size: 0.85rem; color: var(--muted); font-weight: 500; white-space: nowrap; }
.issue-content { flex: 1; min-width: 0; }
.issue-title { font-family: var(--font-serif); font-weight: 700; font-size: 1.15rem; margin: 0 0 var(--space-2); line-height: 1.3; }
.issue-title a { color: var(--fg); text-decoration: none; }
.issue-title a:hover { color: var(--primary); text-decoration: underline; }
.issue-teaser { color: var(--muted); font-size: 0.95rem; margin: 0; line-height: 1.5; max-width: 56ch; }
@media (max-width: 600px) {
  .issue-row { flex-direction: column; gap: var(--space-2); }
  .issue-meta { width: auto; }
}

/* AUTHOR */
.author { padding: var(--section-pad) 0; border-top: 1px solid var(--border); }
.author-inner { display: flex; gap: var(--space-7); align-items: flex-start; }
.author-photo { flex-shrink: 0; width: 120px; height: 120px; border-radius: 50%; overflow: hidden; border: 3px solid var(--border); }
.author-photo img { width: 100%; height: 100%; object-fit: cover; }
.author-text { flex: 1; min-width: 0; }
.author-name { font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem; margin: 0 0 var(--space-3); color: var(--fg); }
.author-bio { font-size: 1.05rem; color: var(--fg); line-height: 1.7; max-width: 56ch; }
.author-bio p { margin: 0 0 var(--space-4); }
.author-bio strong { font-weight: 700; }
@media (max-width: 600px) {
  .author-inner { flex-direction: column; align-items: center; text-align: center; }
  .author-photo { width: 100px; height: 100px; }
}

/* TESTIMONIALS */
.testimonials { padding: var(--section-pad) 0; background: var(--surface); }
.testimonials-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-5); }
.testimonial-card { padding: var(--space-5) 0; border-bottom: 1px dashed var(--border); }
.testimonial-card:last-child { border-bottom: 0; }
.testimonial-card blockquote { margin: 0; }
.testimonial-card p { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 500; line-height: 1.5; margin: 0 0 var(--space-3); }
.testimonial-card cite { color: var(--muted); font-style: normal; font-weight: 600; font-size: 0.9rem; }
.testimonial-title { font-weight: 400; }

/* CTA */
.cta { padding: var(--section-pad) 0; background: var(--primary); color: var(--on-primary); text-align: center; }
.cta-inner { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.cta-heading { font-family: var(--font-serif); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 var(--space-3); letter-spacing: -0.02em; }
.cta-body { font-size: 1.05rem; opacity: 0.9; margin: 0 0 var(--space-5); max-width: 48ch; }
.cta .btn-primary { background: var(--bg); color: var(--fg); }
.cta .btn-primary:hover { background: var(--surface); }
.cta-proof { font-size: 0.85rem; opacity: 0.75; margin: var(--space-3) 0 0; font-weight: 500; }

/* FOOTER + WATERMARK */
.ddv-footer { padding: var(--space-6) 0; border-top: 1px solid var(--border); margin-top: 0; text-align: center; color: var(--muted); }
.ddv-footer-inner small { font-size: 0.85rem; }
.ddv-watermark { position: fixed; bottom: 12px; right: 12px; z-index: 50; }
.ddv-watermark a { display: inline-flex; align-items: center; padding: 6px 10px; background: var(--bg); color: var(--muted); border: 1px solid var(--border); border-radius: 999px; font-size: 0.78rem; box-shadow: 0 1px 4px rgba(0,0,0,0.06); text-decoration: none; }
.ddv-watermark a:hover { color: var(--fg); }
