/* ===== EVENING — BLOG =====
   Loaded after ../evening.css on blog/index.html, every post and the
   build_blog.py template. Re-themes blog.css for the night palette and sets
   long-form reading type: ~70 characters a line, 1.125rem / 1.75 body,
   serif headlines, ember links with underlines. English-only by design.
   Removing this link returns the blog to evening.css + blog.css. */

/* ---------- ARTICLE: column ---------- */
.blog-article { padding: 0 0 clamp(64px, 9vw, 120px); background: var(--night); }
.blog-article .container,
.blog-article .blog-article-hero-inner {
  max-width: calc(41rem + 2 * var(--gutter));
  padding-inline: var(--gutter);
}

/* ---------- ARTICLE: hero ---------- */
.blog-article-hero {
  min-height: clamp(340px, 44vw, 500px);
  margin-bottom: clamp(32px, 5vw, 56px);
  background-color: var(--night-2);
}
/* The artwork fades into the night instead of the old tan page. */
.blog-article-hero-fade {
  background:
    linear-gradient(to bottom,
      rgba(26, 22, 48, 0.55) 0%,
      rgba(26, 22, 48, 0.20) 26%,
      rgba(26, 22, 48, 0.62) 55%,
      rgba(26, 22, 48, 0.92) 80%,
      var(--night) 100%);
}
.blog-article-hero-inner {
  padding-top: 3rem; padding-bottom: 0.5rem;
  text-shadow: 0 1px 16px rgba(26, 22, 48, 0.9), 0 0 2px rgba(26, 22, 48, 0.6);
}
.blog-article-hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.1rem, 1.35rem + 2.6vw, 3.3rem);
  line-height: 1.08; letter-spacing: -0.015em;
  color: var(--candle);
  margin: 0.35rem 0 0.7rem;
  text-wrap: balance;
}
.blog-breadcrumb { font-size: 0.875rem; color: var(--haze); margin-bottom: 1.1rem; }
.blog-article .blog-breadcrumb a { color: var(--candle); text-decoration: underline; text-decoration-color: rgba(255, 243, 228, 0.4); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.blog-article .blog-breadcrumb a:hover { color: var(--candle); text-decoration-color: var(--candle); }
.blog-breadcrumb span { color: var(--haze); }

/* Category label: sentence case, serif italic, no tracking. */
.blog-eyebrow {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 1.1rem; letter-spacing: 0; text-transform: none;
  color: var(--ember); margin-bottom: 0.2rem;
}
.blog-article .blog-eyebrow a { color: var(--ember); text-decoration: none; }
.blog-article .blog-eyebrow a:hover { color: var(--ember-soft); text-decoration: underline; text-underline-offset: 3px; }
.blog-meta { font-size: 0.92rem; color: var(--haze); }

/* ---------- ARTICLE: body type ---------- */
.blog-article article { color: #E6DDF0; }
.blog-article p,
.blog-article li {
  font-size: 1.125rem; line-height: 1.75;
  color: #E6DDF0;
  text-wrap: pretty;
}
.blog-article p { margin: 0 0 1.25rem; }
.blog-article .blog-lead {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.45rem);
  line-height: 1.6;
  color: var(--candle);
  margin: 0 0 2.5rem;
}
.blog-article h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.6rem, 1.25rem + 1.2vw, 2.1rem);
  line-height: 1.18; letter-spacing: -0.01em;
  color: var(--candle);
  margin: 3.25rem 0 1rem;
  text-wrap: balance;
}
.blog-article h3 {
  font-family: var(--sans); font-weight: 500;
  font-size: 1.22rem; line-height: 1.35;
  color: var(--candle);
  margin: 2.25rem 0 0.55rem;
}
.blog-article strong, .blog-article b { color: var(--candle); font-weight: 500; }
.blog-article em { color: var(--candle); }

.blog-article a {
  color: var(--ember);
  text-decoration: underline;
  text-decoration-color: rgba(255, 176, 102, 0.5);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s, color 0.2s;
}
.blog-article a:hover { color: var(--ember-soft); text-decoration-color: currentColor; text-decoration-thickness: 2px; }

.blog-article ul, .blog-article ol { padding-inline-start: 1.35rem; margin: 0 0 1.4rem; }
.blog-article li { margin-bottom: 0.5rem; padding-inline-start: 0.25rem; }
.blog-article li::marker { color: var(--ember); }
.blog-article ol li::marker { font-family: var(--serif); }

.blog-article blockquote {
  margin: 2rem 0; padding: 0.2rem 0 0.2rem 1.4rem;
  padding-inline: 1.4rem 0;
  border-inline-start: 2px solid var(--ember);
}
.blog-article blockquote p {
  font-family: var(--serif); font-style: italic;
  font-size: 1.35rem; line-height: 1.5; color: var(--candle);
}
.blog-article blockquote p:last-child { margin-bottom: 0; }

.blog-article hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

.blog-article table {
  width: 100%; border-collapse: collapse; margin: 1.75rem 0;
  font-size: 1rem; line-height: 1.55;
}
.blog-article th, .blog-article td {
  padding: 0.75rem 0.9rem; text-align: start; vertical-align: top;
  border-bottom: 1px solid var(--line); color: #E6DDF0;
}
.blog-article th { color: var(--candle); font-weight: 500; border-bottom-color: var(--border-strong); }
@media (max-width: 640px) {
  .blog-article table { display: block; overflow-x: auto; }
}

.blog-article img { border-radius: 16px; }
.blog-article code {
  font-size: 0.9em; padding: 0.1em 0.4em; border-radius: 6px;
  background: rgba(255, 243, 228, 0.07); color: var(--ember-soft);
}

/* ---------- Key takeaways ---------- */
.blog-takeaways {
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(1.4rem, 3vw, 2rem) clamp(1.4rem, 3.5vw, 2.25rem);
  margin: 0 0 2.75rem;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}
.blog-takeaways h2 {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 1.3rem; color: var(--ember);
  margin: 0 0 0.9rem;
}
.blog-takeaways ul { margin: 0; padding-inline-start: 1.2rem; }
.blog-takeaways li { font-size: 1.05rem; line-height: 1.6; margin-bottom: 0.5rem; color: var(--candle); }
.blog-takeaways li:last-child { margin-bottom: 0; }

/* ---------- CTA box (guided experiences) ---------- */
.blog-cta-box {
  position: relative;
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(255, 176, 102, 0.10), transparent 60%),
    var(--night-2);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  margin: 3rem 0;
  font-size: 1.08rem; line-height: 1.7;
  color: #E6DDF0;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}
.blog-cta-box h2 {
  font-size: clamp(1.4rem, 1.2rem + 0.7vw, 1.7rem);
  margin: 0 0 0.65rem;
}
.blog-cta-box p { font-size: 1.08rem; }
.blog-cta-box p:last-child { margin-bottom: 0; }
.blog-cta-link { font-weight: 500; }

/* ---------- FAQ ---------- */
.blog-faq { margin-top: 0.5rem; border-bottom: 1px solid var(--line); }
.blog-faq h3 {
  font-size: 1.15rem; font-weight: 500;
  margin: 0; padding: 1.4rem 0 0.5rem;
  border-top: 1px solid var(--line);
}
.blog-faq p { color: #DCD3EC; margin: 0 0 1.4rem; }
/* If a post ever uses <details> for its FAQ */
.blog-article details { border-top: 1px solid var(--line); }
.blog-article details:last-of-type { border-bottom: 1px solid var(--line); }
.blog-article summary {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 1.25rem 0; cursor: pointer; list-style: none;
  font-size: 1.15rem; font-weight: 500; color: var(--candle);
}
.blog-article summary::-webkit-details-marker { display: none; }
.blog-article summary::after {
  content: ""; flex: none; width: 11px; height: 11px;
  border-inline-end: 1.5px solid var(--ember); border-bottom: 1.5px solid var(--ember);
  transform: translateY(-3px) rotate(45deg); transition: transform 0.35s var(--ease-out);
}
.blog-article details[open] summary::after { transform: translateY(3px) rotate(-135deg); }

/* ---------- App pointer (.blog-tool) ---------- */
.blog-tool {
  position: relative;
  margin: 3.25rem 0 0;
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  border: 0;
  border-radius: 24px;
  background:
    radial-gradient(90% 140% at 100% 0%, rgba(255, 176, 102, 0.16), transparent 62%),
    linear-gradient(180deg, #2A2348, var(--night-2));
  box-shadow:
    0 0 0 1px rgba(255, 176, 102, 0.28) inset,
    0 30px 60px -30px rgba(0, 0, 0, 0.75);
}
.blog-tool h2 {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 1.3rem; color: var(--ember);
  margin: 0 0 0.75rem;
}
.blog-tool p { margin: 0; color: var(--candle); font-size: 1.1rem; line-height: 1.7; }
.blog-tool a { font-weight: 500; }
.blog-tool .blog-tool-all {
  margin-top: 1.1rem; padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem; color: var(--haze);
}
.blog-tool .blog-tool-all a { font-weight: 400; }

/* ---------- Keep reading ---------- */
.blog-related { margin-top: clamp(48px, 7vw, 80px); padding-top: 0; border-top: 0; }
.blog-related h2 { font-size: clamp(1.4rem, 1.2rem + 0.7vw, 1.7rem); margin: 0 0 0.75rem; }
.blog-related ul { list-style: none; padding: 0; margin: 0; }
.blog-related li { margin: 0; padding: 0; border-top: 1px solid var(--line); }
.blog-related li:last-child { border-bottom: 1px solid var(--line); }
.blog-related a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 1rem 0;
  font-family: var(--serif); font-size: 1.2rem; line-height: 1.35;
  color: var(--candle); text-decoration: none;
}
.blog-related a::after { content: "\2192"; flex: none; font-family: var(--sans); color: var(--ember); transition: transform 0.25s var(--ease-out); }
.blog-related a:hover { color: var(--ember-soft); }
.blog-related a:hover::after { transform: translateX(4px); }

/* ---------- HUB (blog/index.html) ---------- */
.blog-hub { padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 9vw, 120px); background: var(--night); }
.blog-hub .container { max-width: calc(1080px + 2 * var(--gutter)); padding-inline: var(--gutter); }
.blog-hub-header { margin-bottom: 2.25rem; }
.blog-hub-header h1 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.5rem, 1.4rem + 4vw, 4.4rem);
  line-height: 1.04; letter-spacing: -0.02em;
  color: var(--candle); margin: 0 0 0.4em;
  text-wrap: balance;
}
.blog-hub-header p { color: var(--haze); font-size: 1.15rem; line-height: 1.6; max-width: 38rem; }

.blog-cats { gap: 8px; margin: 0 0 clamp(36px, 5vw, 56px); }
.blog-cat-pill {
  padding: 0.55rem 1.05rem;
  border: 0; border-radius: 999px;
  background: transparent;
  box-shadow: 0 0 0 1px var(--border-strong) inset;
  font-size: 0.92rem; font-weight: 400;
  color: var(--candle);
  transition: background-color 0.2s, box-shadow 0.2s;
}
.blog-cat-pill:hover { background: rgba(255, 243, 228, 0.07); box-shadow: 0 0 0 1px rgba(255, 243, 228, 0.45) inset; border-color: transparent; }
.blog-cat-pill:first-child { box-shadow: 0 0 0 1px rgba(255, 176, 102, 0.6) inset; }
.blog-cat-pill:first-child:hover { background: rgba(255, 176, 102, 0.12); }

.blog-grid { gap: clamp(18px, 2.2vw, 28px); }
.blog-card {
  height: 400px;
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--candle);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s;
}
.blog-card:hover, .blog-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 176, 102, 0.35);
  box-shadow: 0 36px 70px -30px rgba(0, 0, 0, 0.85);
}
.blog-card-overlay {
  background: linear-gradient(to top,
    rgba(20, 16, 38, 0.96) 0%,
    rgba(20, 16, 38, 0.82) 28%,
    rgba(20, 16, 38, 0.40) 55%,
    rgba(20, 16, 38, 0.06) 78%,
    rgba(20, 16, 38, 0) 100%);
}
.blog-card-eyebrow {
  padding: 0.3rem 0.7rem;
  background: rgba(26, 22, 48, 0.72);
  font-size: 0.8rem; font-weight: 400;
  letter-spacing: 0; text-transform: none;
  color: var(--candle);
}
.blog-card h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: 1.32rem; line-height: 1.2;
  color: var(--candle);
}
.blog-card p {
  color: var(--haze);
  font-size: 0.95rem; line-height: 1.55;
  max-height: calc(0.95rem * 1.55 * 3);
}
.blog-card-more { color: var(--ember); font-weight: 500; letter-spacing: 0; font-size: 0.9rem; }

@media (max-width: 640px) {
  .blog-hub-header { text-align: start; }
  .blog-hub-header p { margin: 0; }
  .blog-cats { justify-content: flex-start; }
  .blog-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .blog-card, .blog-related a::after, .blog-article summary::after { transition: none; }
  .blog-card:hover, .blog-card:focus-visible { transform: none; }
  .blog-related a:hover::after { transform: none; }
}

/* Category hubs end their related list with a link whose text already ends in
   an arrow; don't add a second one. */
.blog-related p a::after { content: none; }

/* Over the painted hero the breadcrumb sits on a small night pill, so it stays
   readable whatever part of the painting is behind it (light skies, sunsets). */
.blog-article-hero .blog-breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px;
  width: fit-content; max-width: 100%;
  padding: 6px 14px; border-radius: 14px;
  background: rgba(26, 22, 48, 0.72);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #DCD3EC;
}
.blog-article-hero .blog-breadcrumb span { color: var(--candle); }
.blog-article-hero .blog-eyebrow, .blog-article-hero h1, .blog-article-hero .blog-meta { text-shadow: 0 2px 18px rgba(26, 22, 48, 0.85); }
.blog-article-hero .blog-eyebrow a { color: var(--ember-soft); }
