/* ============================================
   QuickerReply Blog  - Stylesheet
   ============================================ */

/* Reuse main site variables */
:root {
  --bg: #FDFAF6;
  --bg-warm: #F7F2EB;
  --bg-card: #FFFFFF;
  --border: #E8E0D4;
  --border-hover: #D4C9BA;
  --text: #1A1714;
  --text-2: #6B6259;
  --text-3: #A39889;
  --accent: #E8590C;
  --accent-light: #FFF1EB;
  --accent-hover: #D14B07;
  --green: #16A34A;
  --green-light: #ECFDF5;
  --star: #F59E0B;
  --font-display: 'Satoshi', sans-serif;
  --font-body: 'General Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(26,23,20,0.04), 0 1px 2px rgba(26,23,20,0.06);
  --shadow-md: 0 4px 16px rgba(26,23,20,0.06), 0 2px 4px rgba(26,23,20,0.04);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: inherit; text-decoration: none; transition: color 0.2s; }

/* === LAYOUT === */
.container { max-width: 1120px; margin: 0 auto; padding: 0 2rem; }

/* === NAV (mirrored from main) === */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253,250,246,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.nav-inner { display: flex; align-items: center; justify-content: space-between; }

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav-logo .accent { color: var(--accent); }
.nav-logo .dot { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 2.5rem; list-style: none; }
.nav-links a { font-size: 0.85rem; color: var(--text-2); font-weight: 500; }
.nav-links a:hover { color: var(--text); }

.nav-cta {
  padding: 0.5rem 1.3rem;
  border-radius: 8px;
  background: var(--accent);
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  transition: background 0.2s !important;
}

.nav-cta:hover { background: var(--accent-hover); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block; width: 20px; height: 1.5px;
  background: var(--text); border-radius: 2px; transition: all 0.3s;
}

/* === FOOTER (mirrored from main) === */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  background: var(--bg);
}

.footer p { font-size: 0.8rem; color: var(--text-2); }

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}

.footer-links a { color: var(--text-3); font-size: 0.8rem; }
.footer-links a:hover { color: var(--text); }

.footer-tagline {
  margin-top: 0.5rem;
  font-size: 0.7rem;
  font-style: italic;
  color: var(--text-3);
  opacity: 0.6;
}

/* ============================================
   BLOG INDEX
   ============================================ */

.blog-header {
  padding: 4rem 0 2rem;
  text-align: center;
}

.blog-header h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.035em;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.blog-header p {
  color: var(--text-2);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto;
}

.blog-grid {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 0 5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.blog-card {
  display: block;
  padding: 1.75rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.blog-card-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.blog-card h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.blog-card p {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.6;
}

.blog-card-arrow {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

.blog-card:hover .blog-card-arrow { text-decoration: underline; }

/* ============================================
   ARTICLE PAGE
   ============================================ */

.article-hero {
  padding: 3.5rem 0 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.article-hero .breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-3);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.article-hero .breadcrumb a { color: var(--accent); }
.article-hero .breadcrumb a:hover { text-decoration: underline; }

.article-hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.035em;
  color: var(--text);
  max-width: 720px;
  margin: 0 auto 0.75rem;
  line-height: 1.15;
}

.article-meta {
  font-size: 0.82rem;
  color: var(--text-3);
}

.article-meta time { font-weight: 500; }

/* Article body */
.article-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.article-body h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 2.5rem 0 0.75rem;
  line-height: 1.2;
}

.article-body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  margin: 2rem 0 0.5rem;
}

.article-body p {
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

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

.article-body a:hover { color: var(--accent-hover); }

.article-body strong { color: var(--text); font-weight: 600; }

.article-body ul,
.article-body ol {
  margin: 0 0 1.25rem 1.25rem;
  color: var(--text-2);
  line-height: 1.8;
}

.article-body li { margin-bottom: 0.35rem; }

.article-body ol { list-style-type: decimal; }

/* Blockquote / callout */
.article-body blockquote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
}

.article-body blockquote p { color: var(--text); margin-bottom: 0; }

/* Template boxes */
.template-box {
  margin: 1.25rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.template-box-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.65rem;
}

.template-box p {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 0;
  font-style: italic;
}

/* Table */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.88rem;
}

.article-body thead th {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  text-align: left;
  padding: 0.65rem 1rem;
  border-bottom: 2px solid var(--border);
  background: var(--bg-warm);
}

.article-body tbody td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: top;
}

.article-body tbody tr:last-child td { border-bottom: none; }
.article-body tbody tr:hover { background: var(--bg-warm); }

/* Sources section */
.sources {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.sources h2 { font-size: 1.1rem; margin-bottom: 0.75rem; }

.sources ol {
  font-size: 0.85rem;
  color: var(--text-3);
}

.sources ol li { margin-bottom: 0.25rem; }

/* CTA box */
.article-cta {
  margin: 2.5rem 0;
  padding: 2rem;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-align: center;
}

.article-cta h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.article-cta p {
  font-size: 0.9rem;
  color: var(--text-2);
  margin-bottom: 1.25rem;
}

.article-cta .glow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2.2rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(232,89,12,0.2);
  text-decoration: none;
}

.article-cta .glow-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232,89,12,0.25);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: rgba(253,250,246,0.97);
    backdrop-filter: blur(16px);
    padding: 1.25rem;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
  }

  nav.nav.nav-open .nav-links { display: flex; }
  .nav-toggle { display: flex; }

  .blog-header { padding: 3rem 0 1.5rem; }
  .article-hero { padding: 2.5rem 0 1.5rem; }
  .article-body { padding: 2rem 1.25rem 4rem; }
  .container { padding: 0 1.25rem; }

  .article-body table { font-size: 0.8rem; }
  .article-body thead th,
  .article-body tbody td { padding: 0.5rem 0.65rem; }
}

@media (max-width: 480px) {
  .article-hero h1 { font-size: 1.6rem; }
  .template-box { padding: 1rem 1.15rem; }
}
