/* Sparky Newsletter — Site Styles */

:root {
  --navy: #1a1a2e;
  --dark: #16213e;
  --blue: #0f3460;
  --cyan: #00d2ff;
  --green: #00e676;
  --red: #ff5252;
  --orange: #ff9100;
  --light: #e8e8e8;
  --muted: #9e9eb8;
  --section-bg: #f0f4f8;
}

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f4f4f4;
  color: #333;
  line-height: 1.6;
}

/* ── Layout ── */
.wrapper {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
}

/* ── Masthead ── */
.masthead {
  background: var(--navy);
  padding: 32px 24px 20px;
  text-align: center;
}
.masthead h1 {
  color: #fff;
  font-size: 32px;
  letter-spacing: 3px;
  margin: 0 0 6px;
}
.masthead .tagline {
  color: #b0c4de;
  font-size: 14px;
  margin: 0 0 6px;
}
.masthead .date {
  color: #8899aa;
  font-size: 13px;
  margin: 0;
}
.masthead a {
  color: inherit;
  text-decoration: none;
}

/* ── Content area ── */
.content {
  padding: 24px 32px;
}

/* ── Pull quote ── */
.pull-quote {
  color: var(--blue);
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  padding: 12px 16px;
  line-height: 1.5;
}

hr {
  border: none;
  border-top: 1px solid #dde;
  margin: 16px 0;
}

/* ── Sections ── */
.section-header {
  background: var(--section-bg);
  border-bottom: 3px solid var(--cyan);
  padding: 12px 16px;
  margin: 24px 0 12px;
}
.section-header h2 {
  color: var(--blue);
  font-size: 20px;
  margin: 0;
}

.section-intro {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 12px;
}

/* ── Stories ── */
.story h3 {
  color: #1a237e;
  font-size: 16px;
  margin: 20px 0 8px;
}
.story p {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 10px;
}

.why-box {
  background: #1b5e20;
  border-radius: 6px;
  padding: 14px 16px;
  margin: 10px 0 16px;
}
.why-box p {
  color: #fff;
  font-size: 14px;
  font-style: italic;
  line-height: 1.5;
  margin: 0;
}

/* ── Charts ── */
.chart-pair {
  display: flex;
  gap: 12px;
  margin: 12px 0;
}
.chart-pair img {
  flex: 1;
  max-width: 50%;
  height: auto;
  border-radius: 4px;
}
.chart-single {
  margin: 12px 0;
  text-align: center;
}
.chart-single img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.chart-caption {
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
  text-align: center;
  margin: 6px 0 14px;
}

/* ── Looking Ahead ── */
.looking-ahead h2 {
  color: var(--blue);
  font-size: 20px;
  margin: 0 0 10px;
}

/* ── Footer ── */
.footer {
  color: #999;
  font-size: 12px;
  text-align: center;
  padding: 20px 24px;
  border-top: 1px solid #ccc;
}

/* ── Landing page (index.html) ── */
.hero {
  background: var(--navy);
  padding: 48px 24px 36px;
  text-align: center;
}
.hero h1 {
  color: #fff;
  font-size: 40px;
  letter-spacing: 3px;
  margin: 0 0 10px;
}
.hero .tagline {
  color: #b0c4de;
  font-size: 16px;
  margin: 0 0 20px;
}
.hero .cta {
  display: inline-block;
  background: var(--cyan);
  color: var(--navy);
  font-weight: bold;
  padding: 12px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 15px;
}
.hero .cta:hover { opacity: 0.9; }

.archive {
  padding: 32px;
}
.archive h2 {
  color: var(--blue);
  font-size: 22px;
  margin: 0 0 16px;
}
.archive ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.archive li {
  border-bottom: 1px solid #eee;
}
.archive li a {
  display: block;
  padding: 14px 8px;
  color: #333;
  text-decoration: none;
  font-size: 15px;
}
.archive li a:hover {
  background: var(--section-bg);
}
.archive li a .issue-date {
  color: var(--muted);
  font-size: 13px;
}

/* ── Email gate modal ── */
.gate-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.gate-overlay.active { display: flex; }
.gate-modal {
  background: #fff;
  border-radius: 10px;
  padding: 36px 32px;
  max-width: 420px;
  width: 90%;
  text-align: center;
}
.gate-modal h2 {
  color: var(--navy);
  margin: 0 0 10px;
}
.gate-modal p {
  color: #666;
  font-size: 14px;
  margin: 0 0 20px;
}
.gate-modal input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  margin-bottom: 12px;
}
.gate-modal button {
  width: 100%;
  padding: 12px;
  background: var(--cyan);
  color: var(--navy);
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
}
.gate-modal button:hover { opacity: 0.9; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .content { padding: 16px 18px; }
  .archive { padding: 20px 18px; }
  .masthead h1, .hero h1 { font-size: 26px; }
  .chart-pair { flex-direction: column; }
  .chart-pair img { max-width: 100%; }
}
