/* ── Blog post styles ─────────────────────────────────────
   Scoped to blog posts. Does not conflict with custom.css.
   ──────────────────────────────────────────────────────── */

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

body {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 134%;
  letter-spacing: -0.15px;
  color: rgb(51, 51, 51);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ──────────────────────────────────────────────── */
.blog-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* ── Back link ───────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin-top: 140px;
  margin-bottom: 48px;
  font-size: 0.95rem;
  font-weight: 400;
  color: #857A75;
  text-decoration: none;
  transition: color 0.2s;
}
.back-link:hover { color: #333; }

/* ── Article date ────────────────────────────────────────── */
.article-date {
  font-family: 'Kode Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.01em;
  font-weight: 400;
  color: #b0a8a2;
  margin-bottom: 0.75rem;
}

/* ── Article intro ───────────────────────────────────────── */
.article-intro {
  margin-top: 32px;
  margin-bottom: 80px;
}

.article-intro p {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.5px;
  line-height: 1.45;
  color: #333;
  margin: 0;
}

/* ── Section labels ──────────────────────────────────────── */
.section-label {
  font-family: 'Kode Mono', monospace;
  font-size: 14px;
  letter-spacing: 0.01em;
  font-weight: 400;
  color: #857A75;
  margin-bottom: 1.25rem;
}

/* ── Article headings ────────────────────────────────────── */
.article-body h2 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.3px;
  line-height: 1.4;
  color: #111;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

/* ── Body copy ───────────────────────────────────────────── */
.article-body p {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: -0.1px;
  margin-bottom: 1.25rem;
  color: #444;
}

.article-body strong {
  font-weight: 500;
  color: #111;
}

.article-body em {
  font-style: italic;
}

.article-body a {
  color: #111;
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.article-body a:hover {
  color: #555;
}

/* ── Lists ───────────────────────────────────────────────── */
.article-body ul,
.article-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.article-body ul li,
.article-body ol li {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.75;
  color: #444;
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.article-body ul {
  list-style-type: disc;
}

.article-body ul li::marker,
.article-body ol li::marker {
  color: #857A75;
}

/* ── Divider ─────────────────────────────────────────────── */
.blog-divider {
  border: none;
  border-top: 1px solid #ececec;
  margin: 3rem 0;
}

/* ── Inline demo ─────────────────────────────────────────── */
.demo-wrap {
  border: 1px solid #ececec;
  border-radius: 24px;
  overflow: hidden;
  margin: 2rem 0 2.5rem;
  background: #fafafa;
}

.demo-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #ececec;
  background: #fff;
}

.demo-label-text {
  font-family: 'Kode Mono', monospace;
  font-size: 13px;
  color: #857A75;
}

.demo-label-hint {
  font-size: 13px;
  font-weight: 400;
  color: #b0a8a2;
}

.demo-viewport {
  position: relative;
  height: 160px;
  background: #f5f5f5;
  cursor: default;
  overflow: hidden;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-btn {
  padding: 0.55rem 1.25rem;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
}

/* ── Hotspot flash (scoped to demo) ──────────────────────── */
.demo-hs-flash {
  position: absolute;
  pointer-events: none;
  z-index: 50;
  background: rgba(24, 160, 251, 0.08);
  border: 2px solid rgba(24, 160, 251, 1);
  box-shadow: 0 0 0 3px rgba(24, 160, 251, 0.25);
  opacity: 0;
  transition: opacity 80ms ease;
}
.demo-hs-flash.hs-in  { opacity: 1; }
.demo-hs-flash.hs-out { opacity: 0; transition: opacity 220ms ease; }

/* ── Code block ──────────────────────────────────────────── */
.code-wrap {
  position: relative;
  background: #1a1a1a;
  border-radius: 16px;
  margin: 1.5rem 0 2rem;
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.code-header-label {
  font-family: 'Kode Mono', monospace;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
}

.copy-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: rgba(255,255,255,0.6);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  padding: 0.3em 0.8em;
  cursor: pointer;
  transition: all 0.15s;
}
.copy-btn:hover {
  border-color: rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.9);
}

.code-block {
  padding: 1.25rem;
  overflow-x: auto;
  font-family: 'Kode Mono', monospace;
  font-size: 13.5px;
  line-height: 1.65;
  color: #c9d1d9;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Newsletter (blog) ───────────────────────────────────── */
.blog-newsletter-card {
  border: 1px solid #ececec;
  border-radius: 24px;
  padding: 0.8rem 1rem 1.15rem 1.15rem;
  margin-top: 3rem;
}

.blog-newsletter-title {
  font-size: 1.1rem;
  font-weight: 400;
  color: #181818;
  margin-bottom: 0.25rem;
}

.blog-newsletter-desc {
  font-size: 1rem;
  color: #857A75;
  line-height: 1.4;
  margin-bottom: 1.25rem;
}

.blog-newsletter-form {
  display: flex;
  gap: 0.5rem;
}

.blog-newsletter-form input {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.blog-newsletter-form input:focus {
  border-color: #999;
}

.blog-newsletter-form button {
  padding: 0.6rem 1.4rem;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.blog-newsletter-form button:hover {
  background: #333;
}

/* ── Fade-in ─────────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: blogFadeUp 0.8s ease-out forwards;
}
.fade-up-d1 { animation-delay: 0.15s; }
.fade-up-d2 { animation-delay: 0.3s; }

@keyframes blogFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Kit form ────────────────────────────────────────────── */
.kit-form {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
}

.kit-form input[type="email"] {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1px solid #ddd;
  border-radius: 999px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  background: #fff;
  color: #333;
  outline: none;
  transition: border-color 0.2s;
}

.kit-form input[type="email"]:focus {
  border-color: #999;
}

.kit-form button {
  flex-shrink: 0;
  padding: 0.6rem 1rem;
  background: #fff;
  color: #000;
  border: 1px solid #ececec;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 400;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.kit-form button:hover {
  background: #ececec;
  border-color: #857A75;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .article-intro p { font-size: 19px; }
  .demo-viewport { height: 140px; }
  .blog-newsletter-form { flex-direction: column; }
}
