/* Signal Theme v3 — Matching iran-internal-share.html design system */

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

/* Variables */
:root {
  --ink:        #111110;
  --ink-mid:    #3a3935;
  --ink-soft:   #7a7870;
  --sand:       #f7f4ef;
  --cream:      #faf9f6;
  --white:      #ffffff;
  --border:     #e8e4df;
  --accent:     #c9a96e;
  --red:        #b91c1c;
  --red-soft:   #fee2e2;
  --amber:      #92400e;
  --amber-soft: #fef3c7;
  --green:      #15803d;
  --green-soft: #dcfce7;
  --blue:       #1d4ed8;
  --blue-soft:  #dbeafe;
}

/* Base */
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
}

/* Google Fonts — loaded in default.hbs */

/* ── Header ── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
}
.header-inner {
  max-width: 740px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.site-title:hover { color: var(--ink-mid); }
.site-logo {
  height: 44px;
  width: auto;
}
.site-icon {
  height: 22px;
  width: auto;
  vertical-align: middle;
  margin-right: 6px;
  position: relative;
  top: -1px;
}

/* Nav */
.site-nav ul.nav {
  list-style: none;
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}
.site-nav ul.nav li { margin: 0; white-space: nowrap; }
.site-nav a {
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-current a { color: var(--ink); font-weight: 600; }

/* ── Homepage Hero ── */
.homepage-hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 64px 24px 56px;
  text-align: center;
}
.hero-inner {
  max-width: 560px;
  margin: 0 auto;
}
.hero-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--ink-mid);
  line-height: 1.6;
  margin-bottom: 10px;
  font-weight: 400;
}
.hero-tagline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 32px;
}
.subscribe-form--hero {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0;
}
.subscribe-form--hero input[type="email"] {
  flex: 1;
  min-width: 220px;
  max-width: 300px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  background: var(--cream);
  color: var(--ink);
}
.subscribe-form--hero input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}
.subscribe-btn--hero {
  display: inline-block;
  padding: 14px 32px;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.02em;
  transition: background 0.2s;
}
.subscribe-btn--hero:hover { background: var(--ink-mid); }
.subscribe-note {
  font-size: 0.72rem;
  color: var(--ink-soft);
  margin-top: 12px;
  letter-spacing: 0.02em;
}

/* ── Featured Post ── */
.featured-post {
  background: var(--sand);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 8px;
  text-align: center;
}
.featured-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.featured-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
}
.featured-title a {
  color: var(--ink);
  text-decoration: none;
}
.featured-title a:hover { color: var(--ink-mid); }
.featured-excerpt {
  color: var(--ink-mid);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 12px;
  font-weight: 300;
}
.featured-meta {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.featured-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.featured-link:hover { text-decoration: underline; }

/* ── Post card beat tags ── */
.post-card-beat {
  color: var(--accent);
  font-weight: 600;
}

/* ── Subscribe Interstitial ── */
.subscribe-interstitial {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 28px;
  margin: 32px 0;
  text-align: center;
}
.interstitial-hook {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 18px;
}
.subscribe-form--inline {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.subscribe-form--inline input[type="email"] {
  flex: 1;
  min-width: 200px;
  max-width: 280px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  background: var(--cream);
}
.subscribe-form--inline input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}

/* ── Improved Post Cards ── */
.post-feed .post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
}
.post-feed .post-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
}

/* ── Content wrap ── */
.content-wrap {
  max-width: 740px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ── Site description (index) ── */
.site-description {
  font-size: 1.05rem;
  color: var(--ink-mid);
  line-height: 1.65;
  font-weight: 300;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

/* ── Post cards (index) ── */
.post-card {
  margin: 28px 0;
}
.post-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}
.post-card-title a {
  color: var(--ink);
  text-decoration: none;
}
.post-card-title a:hover { color: var(--ink-mid); }
.post-card-excerpt {
  color: var(--ink-mid);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 8px;
  font-weight: 300;
}
.post-card-meta {
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.post-card + hr { border-color: var(--border); margin: 28px 0; }

/* ── Dividers ── */
hr, .rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

/* ── Single post ── */
.post-full { padding-bottom: 40px; }

/* Article meta line */
.post-meta-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.post-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.post-meta {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-bottom: 0;
}

/* Article title */
.post-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 18px;
}

/* Article subtitle / excerpt */
.post-excerpt {
  font-size: 1.05rem;
  color: var(--ink-mid);
  line-height: 1.65;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  font-weight: 300;
}

/* Feature image */
.post-feature-image {
  margin: 0 0 28px 0;
}
.post-feature-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}
.post-feature-image figcaption {
  color: var(--ink-soft);
  font-size: 0.8rem;
  margin-top: 8px;
}

/* ── Article body ── */
.post-content h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
  margin: 48px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  line-height: 1.2;
}
.post-content h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin: 32px 0 12px;
  letter-spacing: 0.01em;
}
.post-content p {
  font-size: 1rem;
  color: var(--ink-mid);
  line-height: 1.8;
  margin-bottom: 18px;
}
.post-content strong {
  color: var(--ink);
  font-weight: 600;
}
.post-content em {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  color: var(--ink);
}
.post-content a {
  color: var(--blue);
  text-decoration: none;
}
.post-content a:hover { text-decoration: underline; }
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 12px 0;
}
.post-content ul, .post-content ol {
  margin: 18px 0 18px 28px;
  color: var(--ink-mid);
  line-height: 1.8;
}
.post-content li { margin-bottom: 8px; font-size: 1rem; }
.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* Blockquotes — key figure style from Iran page */
.post-content blockquote {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 16px 18px;
  margin: 18px 0;
}
.post-content blockquote p {
  margin-bottom: 0;
  font-size: 0.95rem;
  color: var(--ink-mid);
}
.post-content blockquote strong {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  display: block;
  margin-bottom: 5px;
}

/* ── Subscribe block ── */
.post-subscribe {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin: 10px 0;
}
.post-subscribe p {
  font-size: 0.95rem;
  color: var(--ink-mid);
  margin: 0 0 14px 0;
  line-height: 1.6;
}
.post-subscribe strong {
  color: var(--ink);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
}
.subscribe-form form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.subscribe-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  background: var(--cream);
  color: var(--ink);
}
.subscribe-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}
.subscribe-form button {
  padding: 12px 24px;
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.02em;
}
.subscribe-form button:hover { background: var(--ink-mid); }

/* ── Tag & Author headers ── */
.tag-header h1, .author-header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.8rem;
  margin-bottom: 8px;
}
.tag-description, .author-bio {
  color: var(--ink-mid);
  font-size: 0.95rem;
  font-weight: 300;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 0;
  padding: 36px 24px;
  background: var(--white);
}
.footer-inner {
  max-width: 740px;
  margin: 0 auto;
  text-align: center;
}
.footer-inner p {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 8px;
}
.footer-link a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.82rem;
}
.footer-link a:hover { text-decoration: underline; }

/* ── Pagination ── */
.pagination {
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-align: center;
  padding: 20px 0;
}
.pagination a {
  color: var(--ink);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-weight: 500;
}
.pagination a:hover {
  background: var(--sand);
}

/* ── Key figure cards (via HTML card in Ghost) ── */
.key-figure {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 16px 18px;
  margin: 18px 0;
}
.key-figure-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 5px;
}
.key-figure p { margin-bottom: 0; font-size: 0.9rem; color: var(--ink-mid); line-height: 1.6; }

/* ── Alert box ── */
.alert-box {
  background: var(--red-soft);
  border: 1px solid rgba(185,28,28,0.25);
  border-radius: 8px;
  padding: 18px 20px;
  margin: 24px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.alert-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.alert-body p { color: var(--red); margin-bottom: 0; font-size: 0.9rem; }
.alert-body strong { color: var(--red); }

/* ── Finding box (amber) ── */
.finding-box {
  background: var(--amber-soft);
  border: 1px solid rgba(146,64,14,0.2);
  border-radius: 8px;
  padding: 18px 20px;
  margin: 24px 0;
}
.finding-box p { color: var(--amber); margin-bottom: 0; font-size: 0.92rem; }
.finding-box strong { color: var(--amber); }

/* ── Timeline table ── */
.timeline-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
}
.timeline-table th {
  background: var(--sand);
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.timeline-table td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  vertical-align: top;
  color: var(--ink-mid);
  line-height: 1.5;
}
.timeline-table td:first-child {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  background: var(--cream);
  width: 70px;
}
.timeline-table tr:hover td { background: #f3efe9; }
.timeline-table tr:hover td:first-child { background: #ede8df; }

/* ── Sources section ── */
.sources-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin: 48px 0 0;
}
.sources-section h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.source-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.source-item:last-child { border-bottom: none; padding-bottom: 0; }
.source-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
  width: 22px;
}
.source-body { flex: 1; min-width: 0; }
.source-name { font-size: 0.9rem; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.source-desc { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.5; margin-bottom: 5px; }
.source-url { font-size: 0.8rem; color: var(--blue); text-decoration: none; word-break: break-all; }
.source-url:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .content-wrap { padding: 32px 16px 60px; }
  .post-title { font-size: 1.7rem; }
  .post-card-title { font-size: 1.2rem; }
  .header-inner { flex-direction: row; align-items: center; gap: 12px; }
  .site-nav ul.nav { gap: 12px; }
  .site-logo { height: 32px; }
  .subscribe-form form { flex-direction: column; }
  .subscribe-form input[type="email"] { min-width: 100%; }
}
