/*!
Theme Name: Deep Focus Daily
Theme URI: https://deepfocusdaily.com
Description: Astra child theme — Forge Signal design system
Author: Deep Focus Daily
Template: astra
Version: 1.0.0
*/

/* ── Custom Properties ─────────────────────────────────── */
:root {
  --bg:           #faf6f0;
  --bg-card:      #ffffff;
  --bg-hero:      #0a0f1c;
  --text:         #0a0f1c;
  --text-muted:   #6b6259;
  --accent:       #c5943b;
  --border:       #e8e0d8;
  --bg-code:      #f0ebe3;
  --reading-width: 65ch;
  --site-width:   1140px;
  --nav-height:   68px;
  /* footer — intentionally always dark, not overridden in dark mode */
  --footer-bg:     #0a0f1c;
  --footer-border: #c5943b;
  --footer-text:   #f8f5f0;
  --footer-muted:  #888070;
  /* hero — intentionally always dark, not overridden in dark mode */
  --hero-text:     #f8f5f0;
  --hero-muted:    #a09890;
  --hero-meta:     #555e70;
  --hero-placeholder: #131c2e;
}

[data-theme="dark"] {
  --bg:        #0a0f1c;
  --bg-card:   #141920;
  --text:      #f8f5f0;
  --text-muted:#888070;
  --border:    #2a2f3a;
  --bg-code:   #1e2535;
  /* --footer-*, --hero-*, --bg-hero, --accent: intentionally unchanged in dark mode */
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Literata', Georgia, serif;
  font-size: 18px;
  line-height: 1.8;
  font-optical-sizing: auto;
  transition: background 0.2s, color 0.2s;
}

*, *::before, *::after {
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

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

/* ── Typography ────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
}
h1 { font-size: clamp(36px, 5vw, 56px); }
h2 { font-size: clamp(24px, 3.5vw, 36px); }
h3 { font-size: 20px; }

/* ── Layout ────────────────────────────────────────────── */
.site-container {
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navigation ────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: var(--nav-height);
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0 32px;
  gap: 0;
}

.site-logo {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
}
.site-logo:hover { text-decoration: none; color: var(--text); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
  margin-left: auto;
  margin-right: 48px;
}
.nav-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
  transition: color 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-links a:hover::after { width: 100%; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dark-toggle {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}
.dark-toggle:hover { color: var(--accent); }
.dark-toggle .icon-moon { display: block; }
.dark-toggle .icon-sun  { display: none; }
/* JS overrides both via element.style.display */

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
}

.nav-mobile {
  display: none;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
}
.nav-mobile.open { display: block; }
.nav-mobile ul { list-style: none; }
.nav-mobile ul li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.nav-mobile ul li:last-child { border-bottom: none; }
.nav-mobile a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-decoration: none;
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  background: var(--bg-hero);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: var(--site-width);
  margin: 0 auto;
  min-height: 480px;
}

.hero-content {
  padding: 64px 48px 64px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero h1 {
  color: var(--hero-text);
  font-size: clamp(28px, 4vw, 48px);
  margin-bottom: 20px;
  line-height: 1.15;
}

.hero-excerpt {
  color: var(--hero-muted);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 48ch;
}

.hero-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--hero-meta);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero-cta {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--footer-bg);
  background: var(--accent);
  padding: 12px 24px;
  text-decoration: none;
  align-self: flex-start;
  transition: opacity 0.15s;
}
.hero-cta:hover { opacity: 0.88; text-decoration: none; }

.hero-image { overflow: hidden; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; }
.hero-image-placeholder { width: 100%; height: 100%; background: var(--hero-placeholder); }

/* ── Ad Slots ───────────────────────────────────────────── */
.ad-slot {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.ad-slot--homepage-below-hero {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.ad-slot--in-content {
  padding: 20px 0;
  margin: 8px 0 24px;
}
.ad-slot--before-footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.ad-slot > div { max-width: 728px; width: 100%; }

/* ── Archive Header ─────────────────────────────────────── */
.archive-header {
  padding: 40px 32px 36px;
  border-top: 2px solid #c5943b;
  border-bottom: 1px solid var(--border);
  max-width: var(--site-width);
  margin: 0 auto;
}

.archive-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.archive-section-label,
.archive-post-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}
.archive-section-label { color: var(--accent); }
.archive-post-count    { color: var(--text-muted); }

.archive-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 600;
  color: var(--text);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.archive-description {
  font-family: 'Literata', Georgia, serif;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 58ch;
}

/* ── Card Grid ──────────────────────────────────────────── */
.card-grid-section {
  padding: 56px 0;
  background: var(--bg);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0 24px;
}

.post-card {
  background: var(--bg-card);
  color: var(--text);           /* override a{color:var(--accent)} inheritance */
  border: 1px solid var(--border);
  border-top: 3px solid transparent;
  transition: border-top-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.post-card:hover {
  border-top-color: #c5943b;
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(10, 15, 28, 0.09);
  text-decoration: none;
  color: var(--text);
}

.post-card-image {
  height: 280px;
  overflow: hidden;
  background: var(--border);
  flex-shrink: 0;
}
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s;
}
.post-card:hover .post-card-image img {
  transform: scale(1.03);
  opacity: 0.92;
}

.post-card-body {
  padding: 22px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-category {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 10px;
}

.post-card-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 10px;
}

.post-card-excerpt {
  font-size: 14px;
  color: #4a4a4a;              /* warm dark gray — never gold */
  line-height: 1.65;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
[data-theme="dark"] .post-card-excerpt { color: #b0a898; }

.post-card-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-top: auto;
}

.pagination {
  text-align: center;
  padding: 40px 0 56px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
}
.pagination a {
  color: var(--text-muted);
  margin: 0 12px;
  text-transform: uppercase;
  text-decoration: none;
}
.pagination a:hover { color: var(--accent); }
.pagination .page-numbers.current {
  color: var(--accent);
  margin: 0 12px;
}

/* ── Single Post ────────────────────────────────────────── */
.post-header {
  padding: 56px 24px 0;
  max-width: var(--reading-width);
  margin: 0 auto;
}

.post-category-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
  text-decoration: none;
}
.post-category-label:hover { text-decoration: underline; }

.post-header h1 {
  margin-bottom: 20px;
  color: var(--text);
}

.post-byline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 36px;
}

.post-featured-image {
  max-width: 860px;
  margin: 0 auto 48px;
  padding: 0 24px;
}
.post-featured-image img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
}

.post-body {
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.post-body p { margin-bottom: 1.6em; }

.post-body h2 {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin: 2.4em 0 0.8em;
  font-size: clamp(20px, 2.5vw, 28px);
}

.post-body h3 { margin: 2em 0 0.6em; }

.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 8px 0 8px 20px;
  margin: 1.8em 0;
  font-style: italic;
  color: var(--text-muted);
}

.post-body ul,
.post-body ol { padding-left: 1.5em; margin-bottom: 1.6em; }
.post-body li { margin-bottom: 0.4em; }

.post-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background: var(--bg-code);
  padding: 2px 6px;
}

.post-body pre {
  background: var(--bg-code);
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 1.6em;
}
.post-body pre code {
  background: none;
  padding: 0;
  font-size: 14px;
  line-height: 1.6;
}

.post-body img {
  width: 100%;
  border: 1px solid var(--border);
  margin: 1.6em 0;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.6em;
  font-size: 15px;
}
.post-body th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  border-bottom: 2px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}
.post-body td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.post-body tr:nth-child(even) td { background: var(--bg-code); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--footer-bg);
  border-top: 2px solid var(--footer-border);
  padding: 32px 24px;
}

.footer-inner {
  max-width: var(--site-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  color: var(--footer-text);
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}
.footer-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--footer-muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--accent); text-decoration: none; }

.footer-copy {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--footer-muted);
  letter-spacing: 0.06em;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1023px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-content { padding: 48px 24px; }
  .hero-image { display: none; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

@media (max-width: 639px) {
  .card-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .post-card-image { height: 220px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .post-header,
  .post-body { padding-left: 16px; padding-right: 16px; }
  .post-featured-image { padding: 0 16px; }
}