/* SuperMirror Blog — shared styles
   Matches the main site's warm cream design language */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:ital,wght@0,400;0,500;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --warm-bg: #F5F0E8;
  --warm-bg-deep: #EDE6D9;
  --ink: #1A1612;
  --ink-soft: #4A4239;
  --ink-muted: #8A7E6F;
  --accent: #5C4A2F;
  --accent-hover: #4A3A22;
  --paper-white: #FAF8F4;
  --border: #D9D0C2;
  --highlight: #C4A46C;
  --amber: #D4860A;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--warm-bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Nav */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 clamp(24px, 5vw, 80px);
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(245, 240, 232, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600; font-size: 17px;
  letter-spacing: -0.02em; color: var(--ink);
  text-decoration: none;
}
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 14px; color: var(--ink-soft); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  background: var(--accent) !important; color: var(--paper-white) !important;
  padding: 8px 20px; border-radius: 8px; font-weight: 500;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--accent-hover) !important; }

/* Blog listing page */
.blog-header {
  padding: 140px clamp(24px, 5vw, 80px) 60px;
  max-width: 800px; margin: 0 auto;
  text-align: center;
}
.blog-header h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 400; line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink); margin-bottom: 16px;
}
.blog-header p {
  font-size: 17px; color: var(--ink-muted); line-height: 1.6;
}

.blog-list {
  max-width: 720px; margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 80px) 100px;
}
.blog-list a {
  display: block; text-decoration: none; color: inherit;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.2s;
}
.blog-list a:first-child { border-top: 1px solid var(--border); }
.blog-list a:hover { opacity: 0.7; }
.blog-list time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 0.04em;
  color: var(--ink-muted);
  display: block; margin-bottom: 8px;
}
.blog-list h2 {
  font-family: 'Instrument Serif', serif;
  font-size: 24px; font-weight: 400;
  line-height: 1.3; letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.blog-list p {
  font-size: 15px; color: var(--ink-soft); line-height: 1.6;
}

/* Blog post page */
.blog-post {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 80px);
}
.post-header {
  padding-top: 140px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.post-header time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 0.04em;
  color: var(--ink-muted);
  display: block; margin-bottom: 20px;
}
.post-header h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 400; line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink); margin-bottom: 16px;
}
.post-subtitle {
  font-size: 18px; color: var(--ink-muted); line-height: 1.6;
}

/* Post body */
.post-body {
  padding-bottom: 80px;
}
.post-body p {
  font-size: 17px; line-height: 1.75;
  color: var(--ink-soft); margin-bottom: 24px;
}
.post-body h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 400; line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-top: 56px; margin-bottom: 20px;
}
.post-body h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 19px; font-weight: 600;
  color: var(--ink);
  margin-top: 40px; margin-bottom: 16px;
}
.post-body ul, .post-body ol {
  margin-bottom: 24px; padding-left: 24px;
}
.post-body li {
  font-size: 17px; line-height: 1.75;
  color: var(--ink-soft); margin-bottom: 8px;
}
.post-body a {
  color: var(--accent); text-decoration: underline;
  text-underline-offset: 3px;
}
.post-body a:hover { color: var(--accent-hover); }
.post-body strong { color: var(--ink); font-weight: 600; }
.post-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; background: var(--warm-bg-deep);
  padding: 2px 6px; border-radius: 4px;
}
.post-body pre {
  background: var(--ink); color: var(--paper-white);
  padding: 24px; border-radius: 12px;
  overflow-x: auto; margin-bottom: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; line-height: 1.6;
}
.post-body pre code {
  background: none; padding: 0; color: inherit;
}
.post-body blockquote {
  border-left: 3px solid var(--highlight);
  padding-left: 20px; margin-bottom: 24px;
}
.post-body blockquote p {
  color: var(--ink); font-style: italic;
}

/* Comparison table */
.post-body table {
  width: 100%; border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 15px;
}
.post-body th {
  text-align: left; padding: 12px 16px;
  background: var(--warm-bg-deep);
  font-weight: 600; color: var(--ink);
  border-bottom: 2px solid var(--border);
}
.post-body td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-soft);
}
.post-body tr:hover td { background: var(--paper-white); }

/* FAQ section within posts */
.post-faq {
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.post-faq h2 { margin-top: 0; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 24px 0; font-family: 'DM Sans', sans-serif;
  font-size: 17px; font-weight: 500; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center;
}
.faq-q::after { content: '+'; font-size: 22px; color: var(--ink-muted); transition: transform 0.2s; }
.faq-item.open .faq-q::after { content: '\2212'; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; }
.faq-item.open .faq-a { max-height: 500px; padding-bottom: 24px; }
.faq-a p { font-size: 15px; line-height: 1.7; color: var(--ink-soft); margin-bottom: 0; }

/* CTA box */
.post-cta {
  background: var(--paper-white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  margin: 48px 0;
  text-align: center;
}
.post-cta h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 24px; font-weight: 400;
  margin-bottom: 12px; margin-top: 0;
}
.post-cta p {
  font-size: 15px; color: var(--ink-muted);
  margin-bottom: 20px;
}
.post-cta .btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: var(--paper-white);
  padding: 14px 32px; border-radius: 10px;
  font-size: 15px; font-weight: 500; font-family: 'DM Sans', sans-serif;
  text-decoration: none; transition: all 0.2s;
  border: none; cursor: pointer;
}
.post-cta .btn-primary:hover { background: var(--accent-hover); }

/* Footer */
footer {
  padding: 48px clamp(24px, 5vw, 80px);
  border-top: 1px solid var(--border); background: var(--warm-bg);
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-inner a { font-size: 14px; color: var(--ink-muted); text-decoration: none; }
.footer-inner a:hover { color: var(--ink); }
.footer-links { display: flex; gap: 28px; }

/* Responsive */
@media (max-width: 768px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .footer-inner { flex-direction: column; gap: 20px; }
  .post-body table { font-size: 13px; }
  .post-body th, .post-body td { padding: 8px 10px; }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --warm-bg: #1A1612;
    --warm-bg-deep: #231F1A;
    --ink: #F0EBE3;
    --ink-soft: #C4BAA9;
    --ink-muted: #8A7E6F;
    --accent: #C4A46C;
    --accent-hover: #D4B47C;
    --paper-white: #252018;
    --border: #3A332A;
    --highlight: #C4A46C;
    --amber: #D4960A;
  }
  body { background: #1A1612; }
  nav { background: rgba(26, 22, 18, 0.9); border-bottom-color: #3A332A; }
  .nav-cta { background: var(--accent) !important; color: #1A1612 !important; }
  .nav-cta:hover { background: var(--accent-hover) !important; }
  .btn-primary { background: var(--accent); color: #1A1612; }
  .btn-primary:hover { background: var(--accent-hover); }
  footer { background: #141210; border-top-color: #3A332A; }
  .post-body pre { background: #0D0B08; }
}
