/* ============================================================
   Karin's Blog - /blog list page + /blog/:slug single post.
   Loaded alongside style.css. Reuses brand tokens.
   ============================================================ */

:root {
  --b-accent: var(--coral);
  --b-card-radius: 22px;
  --b-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* =============================================================
   /blog - LIST PAGE
   ============================================================= */

.blog-page {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(227,99,41,0.08) 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 20%, rgba(251,200,0,0.08) 0%, transparent 55%),
    var(--paper);
}

/* ---- Hero ---- */
.blog-hero {
  padding: clamp(80px, 14vw, 140px) 0 clamp(30px, 5vw, 50px);
  position: relative;
  overflow: hidden;
}
.blog-hero__inner {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}
.blog-hero__eyebrow {
  font-family: "Caveat", cursive;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--coral);
  margin: 0 0 4px;
  line-height: 1;
}
.blog-hero__title {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: clamp(4rem, 14vw, 9rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
  text-shadow: 4px 5px 0 rgba(17,20,24,0.06);
}
.blog-hero__title-dot { color: var(--coral); }
.blog-hero__sub {
  max-width: 620px;
  margin: 22px auto 0;
  font-size: clamp(1rem, 1.6vw, 1.08rem);
  line-height: 1.65;
  color: var(--ink-2);
}

/* Filter pills */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 32px auto 0;
  max-width: 820px;
}
.blog-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(17, 20, 24, 0.04);
  border: 1.5px solid transparent;
  color: var(--ink-2);
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s var(--b-ease), color 0.2s var(--b-ease), border-color 0.2s var(--b-ease), transform 0.2s var(--b-ease);
}
.blog-filter:hover {
  background: rgba(17, 20, 24, 0.08);
  transform: translateY(-1px);
}
.blog-filter.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  box-shadow: 0 6px 16px rgba(17, 20, 24, 0.25);
}
.blog-filter__count {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.15);
}
.blog-filter.is-active .blog-filter__count {
  background: rgba(251, 200, 0, 0.85);
  color: var(--ink);
}

/* ---- Grid / cards ---- */
/* .blog-body has bottom padding because it's an INNER section above the
   footer (not body's last child) — so its space lives above the footer. */
.blog-body {
  padding-bottom: clamp(60px, 10vw, 120px);
}
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 720px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (min-width: 1080px) {
  .blog-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; }
}

/* Featured = full-width card spanning all columns */
.blog-card--featured {
  grid-column: 1 / -1;
}

/* The card itself - background-image hero, bottom-aligned content. */
.blog-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--b-card-radius);
  aspect-ratio: 4 / 5;
  background: #222;
  color: #fff;
  text-decoration: none;
  box-shadow:
    0 18px 44px -18px rgba(17, 20, 24, 0.35),
    0 4px 14px -6px rgba(17, 20, 24, 0.15);
  transition: transform 0.45s var(--b-ease), box-shadow 0.45s var(--b-ease);
  isolation: isolate;
}
.blog-card--featured {
  aspect-ratio: 16 / 9;
  min-height: 420px;
}
@media (min-width: 720px) {
  .blog-card { aspect-ratio: 3 / 4; }
}
@media (min-width: 1080px) {
  .blog-card { aspect-ratio: 4 / 5; }
  .blog-card--featured { aspect-ratio: 21 / 9; min-height: 460px; }
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 30px 60px -22px rgba(17, 20, 24, 0.5),
    0 12px 24px -8px rgba(17, 20, 24, 0.25);
}

.blog-card__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.blog-card__media img,
.blog-card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.blog-card:hover .blog-card__media img,
.blog-card:hover .blog-card__media video {
  transform: scale(1.06);
}

/* Dark gradient so the text is readable over any photo */
.blog-card__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(10, 12, 16, 0.85) 0%,
    rgba(10, 12, 16, 0.4) 40%,
    rgba(10, 12, 16, 0.05) 65%,
    rgba(10, 12, 16, 0) 100%
  );
  pointer-events: none;
}

/* Top row: category eyebrow */
.blog-card__topbar {
  position: absolute;
  top: 22px;
  left: 22px;
  right: 22px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
/* Matches the "stories from the forest ✦" hero eyebrow — Caveat cursive
   with a sun-yellow accent on the category value. */
.blog-card__eyebrow {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: "Caveat", cursive;
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}
.blog-card__eyebrow-label { opacity: 0.7; font-weight: 500; }
.blog-card__eyebrow-dot {
  opacity: 0.55;
  font-weight: 400;
}
.blog-card__eyebrow-category {
  font-weight: 700;
  color: var(--sun);
}

.blog-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--sun);
  color: var(--ink);
  font-family: "Anton", sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 6px 14px rgba(251, 200, 0, 0.4);
}

/* Play overlay for video posts */
.blog-card__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  display: grid; place-items: center;
  color: #fff;
  z-index: 2;
  transition: transform 0.3s var(--b-ease), background 0.3s var(--b-ease);
}
.blog-card__play svg {
  width: 24px; height: 24px;
  transform: translateX(2px); /* optical center */
}
.blog-card:hover .blog-card__play {
  transform: translate(-50%, -50%) scale(1.08);
  background: rgba(255, 255, 255, 0.3);
}

/* Bottom content */
.blog-card__body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* Card meta (read time · date) — Caveat too, so all the smaller texts on
   the card share the brand script style. */
.blog-card__meta {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-family: "Caveat", cursive;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.blog-card__meta-sep {
  opacity: 0.55;
  margin: 0 2px;
  font-weight: 400;
}
.blog-card__title {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  letter-spacing: 0.01em;
  line-height: 1.12;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}
.blog-card--featured .blog-card__title {
  font-size: clamp(1.8rem, 3.6vw, 3rem);
}
.blog-card__excerpt {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card--featured .blog-card__excerpt {
  -webkit-line-clamp: 3;
  max-width: 640px;
  font-size: 14.5px;
}

/* Empty / loading / error states */
.blog-status {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-3);
  font-size: 14px;
  grid-column: 1 / -1;
}
.blog-skeleton {
  aspect-ratio: 4/5;
  border-radius: var(--b-card-radius);
  background: linear-gradient(
    100deg,
    rgba(17,20,24,0.04) 0%,
    rgba(17,20,24,0.1) 40%,
    rgba(17,20,24,0.04) 80%
  );
  background-size: 200% 100%;
  animation: blogShimmer 1.4s linear infinite;
}
@keyframes blogShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =============================================================
   /blog/:slug - SINGLE POST PAGE
   ============================================================= */

.post-page {
  background: var(--paper);
  /* NOTE: no padding-bottom on <body> — the footer is the last child, so
     any padding here would leave a dark empty strip below the footer. The
     space between the last article section and the footer is handled by
     the sections themselves (.post-related, .post-outro margins). */
}

.post-top {
  padding: clamp(70px, 12vw, 120px) 0 18px;
}
.post-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(17, 20, 24, 0.05);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.2s var(--b-ease), transform 0.2s var(--b-ease);
}
.post-breadcrumb:hover {
  background: rgba(17, 20, 24, 0.09);
  transform: translateX(-2px);
}

.post-header {
  margin-top: 24px;
  max-width: 920px;
}
.post-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  margin: 0 0 14px;
}
.post-header__category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
}
.post-header__meta-sep {
  opacity: 0.4;
}
.post-header__title {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.post-header__excerpt {
  max-width: 720px;
  margin: 18px 0 0;
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink-2);
}

/* Hero media */
.post-hero {
  margin: clamp(26px, 4vw, 40px) 0 clamp(28px, 5vw, 50px);
  border-radius: clamp(14px, 2vw, 24px);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #181a20;
  box-shadow:
    0 24px 60px -24px rgba(17, 20, 24, 0.35),
    0 8px 22px -8px rgba(17, 20, 24, 0.15);
}
.post-hero img,
.post-hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Article body - readable, brand-aware typography */
.post-article {
  max-width: 720px;
  margin: 0 auto;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.78;
  font-family: "DM Sans", sans-serif;
}
.post-article > * + * { margin-top: 1.1em; }
.post-article h2 {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.005em;
  margin-top: 1.8em;
  margin-bottom: 0.5em;
  color: var(--ink);
}
.post-article h3 {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  letter-spacing: 0.005em;
  margin-top: 1.6em;
  margin-bottom: 0.3em;
  color: var(--ink);
}
.post-article p {
  margin: 0;
}
.post-article a {
  color: var(--coral-deep);
  text-decoration: none;
  border-bottom: 1.5px solid rgba(177, 72, 41, 0.3);
  transition: border-color 0.2s var(--b-ease);
}
.post-article a:hover {
  border-bottom-color: var(--coral-deep);
}
.post-article strong { font-weight: 700; color: var(--ink); }
.post-article em { font-style: italic; }
.post-article ul,
.post-article ol {
  padding-left: 1.4em;
}
.post-article li + li { margin-top: 0.4em; }
.post-article blockquote {
  margin: 1.5em 0;
  padding: 14px 22px;
  border-left: 3px solid var(--coral);
  background: rgba(227, 99, 41, 0.06);
  color: var(--ink-2);
  font-style: italic;
  border-radius: 0 10px 10px 0;
}
.post-article code {
  font-family: "Courier New", monospace;
  font-size: 0.92em;
  padding: 2px 7px;
  background: rgba(17, 20, 24, 0.06);
  border-radius: 5px;
}
.post-article pre {
  padding: 16px 20px;
  background: rgba(17, 20, 24, 0.07);
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.9em;
}
.post-article pre code { background: none; padding: 0; }
.post-article hr {
  margin: 2.2em auto;
  width: 80px;
  border: none;
  border-top: 2px solid rgba(17, 20, 24, 0.15);
}
.post-article img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 1.5em 0;
}

/* After-article CTA row */
.post-outro {
  max-width: 720px;
  margin: 48px auto 0;
  padding: 30px 28px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--b-card-radius);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.post-outro::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(251,200,0,0.2) 0%, transparent 55%), radial-gradient(circle at 100% 100%, rgba(227,99,41,0.2) 0%, transparent 55%);
  pointer-events: none;
}
.post-outro__title {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.05;
  margin: 0;
  position: relative;
}
.post-outro__sub {
  margin: 8px 0 18px;
  color: rgba(243, 241, 228, 0.65);
  font-size: 13.5px;
  position: relative;
}
.post-outro__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--sun);
  color: var(--ink);
  font-family: "Anton", sans-serif;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(251, 200, 0, 0.35);
  position: relative;
  transition: transform 0.2s var(--b-ease);
}
.post-outro__cta:hover { transform: translateY(-2px) scale(1.02); }

/* Related posts */
.post-related {
  margin-top: 56px;
}
.post-related__title {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 22px;
  text-align: center;
}
