/* Blog — pure black canvas, LoL-style blur hero, AAA card hover */

/* ── Kill wood / diamond room chrome on blog pages ───────────────────── */
html:has(body.page-blog),
html:has(body.page-blog-article) {
  background: #000 !important;
}
html:has(body.page-blog)::before,
html:has(body.page-blog)::after,
html:has(body.page-blog-article)::before,
html:has(body.page-blog-article)::after {
  display: none !important;
  content: none !important;
  opacity: 0 !important;
  background: none !important;
}
body.page-blog,
body.page-blog-article {
  background: #000 !important;
  background-image: none !important;
  color: #e8e0d4;
}
body.page-blog::before,
body.page-blog::after,
body.page-blog-article::before,
body.page-blog-article::after {
  display: none !important;
  content: none !important;
  opacity: 0 !important;
  background: none !important;
}

.page-blog .site-header,
.page-blog-article .site-header {
  background: rgba(0, 0, 0, 0.88);
  border-bottom: 1px solid rgba(255, 200, 80, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Index banner (tight — keep cards on first screen) ───────────────── */
.blog-hero-banner {
  position: relative;
  /* Air under nav + above H1 */
  padding: clamp(36px, 4.5vw, 56px) 0 clamp(16px, 2.2vw, 22px);
  text-align: center;
  border-bottom: 1px solid rgba(255, 180, 60, 0.1);
  background:
    radial-gradient(ellipse 70% 80% at 50% -10%, rgba(255, 160, 40, 0.12), transparent 55%),
    #000;
}

.blog-hero-banner h1 {
  margin: 0;
  font: 800 clamp(28px, 4.5vw, 44px)/1.05 "Funnel Display", system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff8ec;
  text-shadow: 0 2px 28px rgba(255, 180, 60, 0.15);
}

.blog-hero-banner .blog-sub {
  margin: 12px auto 0;
  max-width: 42ch;
  font: 500 14px/1.45 system-ui, sans-serif;
  color: #b0a090;
}

/* ── Index grid ──────────────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
  /* Extra space under subcopy + bottom pad for hover/safe-area */
  padding: clamp(28px, 3.8vw, 44px) 0 max(48px, env(safe-area-inset-bottom, 0px) + 40px);
  align-items: stretch;
}

@media (max-width: 1100px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: minmax(0, 1fr); }
  .blog-hero-banner { padding: 12px 0 8px; }
  .blog-hero-banner h1 { font-size: clamp(26px, 8vw, 34px); }
}

/* Short laptop viewports — still a little air, without clipping authors */
@media (min-width: 961px) and (max-height: 920px) {
  .blog-hero-banner {
    padding: 28px 0 14px;
  }
  .blog-hero-banner h1 {
    font-size: clamp(26px, 3.6vw, 36px);
  }
  .blog-hero-banner .blog-sub {
    margin-top: 10px;
    font-size: 13px;
  }
  .blog-grid {
    padding-top: 24px;
    gap: 14px;
  }
  .blog-card-art {
    aspect-ratio: 16 / 9;
  }
  .blog-card-body {
    padding: 12px 12px 14px;
    gap: 6px;
  }
  .blog-card-title {
    font-size: 16px;
  }
  .blog-card-dek {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }
}

/* ── AAA card + shine ────────────────────────────────────────────────── */
.blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: 16px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 190, 70, 0.18);
  background: linear-gradient(165deg, #14100c 0%, #0a0806 55%, #050403 100%);
  box-shadow:
    0 10px 32px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 220, 140, 0.06);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.28s ease,
    box-shadow 0.28s ease;
}

/* Diagonal shine sweep */
.blog-card::before {
  content: "";
  position: absolute;
  inset: -40% -60%;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 245, 210, 0) 42%,
    rgba(255, 230, 160, 0.14) 48%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(255, 230, 160, 0.12) 52%,
    transparent 58%,
    transparent 100%
  );
  transform: translateX(-45%) rotate(8deg);
  opacity: 0;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

/* Soft edge glow ring */
.blog-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 210, 100, 0);
  transition: box-shadow 0.28s ease;
}

.blog-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(255, 210, 90, 0.55);
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 190, 70, 0.28),
    0 0 36px rgba(255, 170, 40, 0.28),
    0 0 72px rgba(255, 140, 20, 0.12),
    inset 0 1px 0 rgba(255, 240, 180, 0.14);
}

.blog-card:hover::before {
  opacity: 1;
  transform: translateX(45%) rotate(8deg);
}

.blog-card:hover::after {
  box-shadow: inset 0 0 0 1px rgba(255, 220, 120, 0.35);
}

.blog-card:focus-visible {
  outline: 2px solid rgba(255, 200, 80, 0.7);
  outline-offset: 3px;
}

.blog-card-art {
  position: relative;
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
  overflow: hidden;
  background: #080604;
  z-index: 1;
}

.blog-card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
  z-index: 1;
  opacity: 0.65;
  transition: opacity 0.28s ease;
}

.blog-card:hover .blog-card-art::after {
  opacity: 0.35;
}

.blog-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease;
  filter: saturate(1.02) brightness(0.96);
}

.blog-card:hover .blog-card-art img {
  transform: scale(1.07);
  filter: saturate(1.12) brightness(1.06);
}

.blog-card-body {
  position: relative;
  z-index: 1;
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  background: linear-gradient(180deg, #0e0b08 0%, #070504 100%);
}

.blog-card-meta {
  font: 700 11px/1.2 "Funnel Display", system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d4a050;
}

.blog-card-meta span + span::before {
  content: " · ";
  color: #6a5a48;
  letter-spacing: 0;
}

.blog-card-title {
  margin: 0;
  font: 800 clamp(15px, 1.15vw, 18px)/1.25 "Funnel Display", system-ui, sans-serif;
  color: #fff4e0;
  letter-spacing: 0.01em;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.blog-card:hover .blog-card-title {
  color: #fffaf0;
  text-shadow: 0 0 20px rgba(255, 190, 80, 0.25);
}

.blog-card-dek {
  margin: 0;
  font: 500 13.5px/1.4 system-ui, sans-serif;
  color: #a89888;
  flex: 1 1 auto;
  min-height: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.blog-card-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 180, 60, 0.1);
  flex-shrink: 0;
}

.blog-card-author img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 180, 60, 0.35);
  background: #1a120c;
  box-shadow: 0 0 0 0 rgba(255, 180, 60, 0);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.blog-card:hover .blog-card-author img {
  border-color: rgba(255, 210, 100, 0.55);
  box-shadow: 0 0 12px rgba(255, 180, 60, 0.35);
}

.blog-card-author .ba-name {
  font: 700 13px/1.2 system-ui, sans-serif;
  color: #e8d4b0;
}

.blog-card-author .ba-role {
  font: 600 11px/1.2 system-ui, sans-serif;
  color: #7a6a58;
}

/* ── Article: LoL blurred banner + framed hero (simple, soft blend) ──── */
.blog-article-top {
  position: relative;
  width: 100%;
  padding: 0 0 clamp(8px, 2vw, 16px);
  overflow: hidden;
}

/* Full-bleed blurred wash behind the framed image */
.blog-blur-banner {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  /* Tall band so dissolve can run long past the frame */
  height: min(78vh, 760px);
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
  /*
   * Whole wash (image + vignette) feathers into page black.
   * Long, multi-stop mask = no hard horizon line.
   */
  -webkit-mask-image: linear-gradient(
    180deg,
    #000 0%,
    #000 28%,
    rgba(0, 0, 0, 0.97) 42%,
    rgba(0, 0, 0, 0.78) 55%,
    rgba(0, 0, 0, 0.48) 68%,
    rgba(0, 0, 0, 0.22) 80%,
    rgba(0, 0, 0, 0.08) 90%,
    transparent 100%
  );
  mask-image: linear-gradient(
    180deg,
    #000 0%,
    #000 28%,
    rgba(0, 0, 0, 0.97) 42%,
    rgba(0, 0, 0, 0.78) 55%,
    rgba(0, 0, 0, 0.48) 68%,
    rgba(0, 0, 0, 0.22) 80%,
    rgba(0, 0, 0, 0.08) 90%,
    transparent 100%
  );
}

.blog-blur-banner-img {
  position: absolute;
  inset: -22%;
  width: 144%;
  height: 144%;
  object-fit: cover;
  object-position: center 30%;
  filter: blur(52px) saturate(1.28) brightness(0.5);
  transform: scale(1.1);
  opacity: 0.92;
  display: block;
}

/* Soft center focus only — no solid black floor stripe */
.blog-blur-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(
      ellipse 80% 65% at 50% 30%,
      transparent 0%,
      transparent 45%,
      rgba(0, 0, 0, 0.25) 70%,
      rgba(0, 0, 0, 0.45) 100%
    ),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.2) 0%,
      rgba(0, 0, 0, 0.06) 22%,
      rgba(0, 0, 0, 0.1) 45%,
      rgba(0, 0, 0, 0.28) 70%,
      rgba(0, 0, 0, 0.4) 100%
    );
}

.blog-article-hero {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(16px, 2.8vw, 32px) 16px 0;
}

.blog-article-hero .blog-back {
  position: relative;
  z-index: 3;
  margin-bottom: 12px;
}

/* Natural 16:9 frame */
.blog-article-hero-frame {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 200, 90, 0.22);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(255, 160, 40, 0.1);
  aspect-ratio: 16 / 9;
  background: #050403;
}

.blog-article-hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.blog-article-head {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(20px, 3.5vw, 36px) 20px 8px;
  text-align: center;
  background: #000;
}

.blog-article-head h1 {
  margin: 0 0 12px;
  font: 800 clamp(24px, 4vw, 40px)/1.15 "Funnel Display", system-ui, sans-serif;
  color: #fff6e8;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Scale whole hero via max-width (aspect-ratio stays correct) — no max-height hacks */
@media (max-height: 900px) {
  .blog-blur-banner {
    height: min(64vh, 560px);
  }
  .blog-article-hero {
    max-width: min(780px, 92vw);
    padding-top: 12px;
  }
  .blog-article-head {
    padding-top: 16px;
  }
  .blog-article-head h1 {
    font-size: clamp(22px, 3.4vw, 32px);
  }
}

@media (max-width: 640px) {
  .blog-blur-banner {
    height: min(58vh, 440px);
  }
  .blog-blur-banner-img {
    filter: blur(40px) saturate(1.28) brightness(0.52);
  }
  .blog-article-hero {
    max-width: 100%;
    padding: 12px 12px 0;
  }
  .blog-article-hero-frame {
    border-radius: 12px;
  }
  .blog-card-art {
    aspect-ratio: 16 / 9;
  }
  .blog-card-dek {
    -webkit-line-clamp: 3;
  }
}

.blog-article-head .blog-dek {
  margin: 0 auto 18px;
  max-width: 48ch;
  font: 500 16px/1.5 system-ui, sans-serif;
  color: #b8a080;
}

.blog-article-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  font: 600 13px/1.3 system-ui, sans-serif;
  color: #8a7868;
  padding-bottom: 8px;
}

.blog-article-body {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 32px) 20px 0;
  font: 500 17px/1.7 system-ui, sans-serif;
  color: #d8cbb8;
  background: #000;
}

.blog-article-body p {
  margin: 0 0 1.15em;
}

.blog-article-body h2 {
  margin: 1.75em 0 0.65em;
  font: 700 clamp(1.15rem, 2.4vw, 1.4rem) / 1.3 system-ui, sans-serif;
  letter-spacing: 0.01em;
  color: #f0e6d4;
}

.blog-article-body h2:first-child {
  margin-top: 0.5em;
}

.blog-article-body ul,
.blog-article-body ol {
  margin: 0 0 1.15em;
  padding-left: 1.35em;
}

.blog-article-body li {
  margin-bottom: 0.4em;
}

.blog-article-body a {
  color: #ffc060;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-article-body a:hover {
  color: #ffe08a;
}

/* Footer meta: tags + author at bottom of article */
.blog-article-foot {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 40px) 20px clamp(72px, 10vw, 120px);
  background: #000;
  border-top: 1px solid rgba(255, 180, 60, 0.12);
  text-align: center;
}

.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
  font: 700 12px/1 "Funnel Display", system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c8a070;
  text-decoration: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.blog-back:hover {
  color: #ffe08a;
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 0 20px;
}

.blog-tag {
  font: 700 10px/1 system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1a1008;
  background: linear-gradient(135deg, #ffe08a, #e0a040);
  padding: 5px 10px;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(255, 160, 40, 0.2);
}

.blog-article-author-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.blog-article-author-block img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 180, 60, 0.45);
  box-shadow: 0 0 16px rgba(255, 170, 40, 0.2);
}

.blog-article-author-block .ba-name {
  font: 700 14px/1.2 system-ui, sans-serif;
  color: #f0e0c8;
  text-align: left;
}

.blog-article-author-block .ba-role {
  font: 600 12px/1.2 system-ui, sans-serif;
  color: #8a7868;
  text-align: left;
}

/* Prefer pure black under main — never clip card/author bottoms */
.page-blog #main,
.page-blog-article #main {
  background: #000;
  position: relative;
  z-index: 1;
  overflow: visible;
  padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
}

.page-blog,
.page-blog-article {
  overflow-x: hidden;
  overflow-y: auto;
}

/* Prefer reduced motion: no hover lift that can push content past edges */
@media (prefers-reduced-motion: reduce) {
  .blog-card,
  .blog-card::before,
  .blog-card-art img {
    transition: none !important;
  }
  .blog-card:hover {
    transform: none;
  }
}
