/* ==========================================================================
   Blog: the index reads like a screenplay, one scene per story, with the
   cover floating beside the cursor. Posts carry a timecode reading bar.
   ========================================================================== */

/* --- Index: scenes ----------------------------------------------------- */

.bl-script {
  max-width: 1100px;
  margin: 0 auto;
}

.bl-scene {
  position: relative;
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.4rem 2rem;
  padding: clamp(2rem, 5vh, 3.2rem) 0;
  border-top: 1px solid var(--paper-faint);
  transition: padding 0.6s var(--ease);
}

.bl-scene:last-child {
  border-bottom: 1px solid var(--paper-faint);
}

.bl-scene-no {
  grid-row: span 4;
  padding-top: 0.2rem;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Slug line: the date, set like a scene heading */
.bl-scene-slug {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-soft);
}

.bl-scene-title {
  margin: 0.4rem 0 0;
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  font-size: clamp(2rem, 4.6vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  transition: color 0.4s;
}

.bl-scene-excerpt {
  max-width: 34rem;
  margin: 0.8rem 0 0;
  color: var(--paper-soft);
}

.bl-scene-tags {
  margin-top: 0.6rem;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.bl-scene-thumb {
  display: none;
}

.bl-scene:hover .bl-scene-title {
  color: var(--accent);
}

.bl-scene:hover {
  padding-left: 1rem;
}

.bl-empty,
.bl-fade {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.bl-fade {
  margin: 2.5rem 0 0;
  text-align: right;
}

.bl-fade span {
  color: var(--paper);
}

/* Cover that follows the cursor */
.bl-peek {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  width: min(26vw, 360px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.35s, transform 0.5s var(--ease);
}

.bl-peek img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bl-peek.is-on {
  opacity: 1;
  transform: scale(1);
}

@media (hover: none), (max-width: 760px) {
  .bl-scene {
    grid-template-columns: 1fr;
  }

  .bl-scene-no {
    grid-row: auto;
  }

  .bl-scene-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    margin-top: 1.2rem;
  }

  .bl-peek {
    display: none;
  }
}

/* --- Post -------------------------------------------------------------- */

.bp-progress {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 75;
  display: flex;
  align-items: center;
  gap: 1rem;
  /* a soft fade behind it so the timecode never sits on the story text */
  padding: 28px var(--gutter) 14px;
  background: linear-gradient(to top, var(--ink) 45%, rgba(11, 11, 10, 0));
  pointer-events: none;
}

.bp-progress-bar {
  flex: 1;
  height: 1px;
  background: var(--paper-faint);
}

.bp-progress-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
}

.bp-progress-tc {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--paper-soft);
  font-variant-numeric: tabular-nums;
}

.bp-hero {
  position: relative;
  height: 92vh;
  height: 92svh;
  min-height: 520px;
  overflow: hidden;
}

.bp-hero-media {
  position: absolute;
  inset: 0;
  margin: 0;
}

.bp-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bp-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 11, 10, 0.92) 5%, rgba(11, 11, 10, 0.15) 60%, rgba(11, 11, 10, 0.4));
}

.bp-hero-copy {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(2.5rem, 8vh, 5rem);
  max-width: 60rem;
}

.bp-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 7vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
}

.bp-excerpt {
  max-width: 36rem;
  margin: 1.4rem 0 0;
  font-family: var(--display-em);
  font-style: italic;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  line-height: 1.35;
  color: var(--paper);
}

.bp-layout {
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 42rem);
  justify-content: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(4rem, 10vh, 6rem) var(--gutter);
}

.bp-side {
  position: sticky;
  top: 110px;
  align-self: start;
}

.bp-side-block {
  margin-bottom: 2rem;
}

.bp-side .dc-tag {
  margin: 0 0 0.8rem;
  color: var(--paper-dim);
}

.bp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.bp-tag {
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--paper-faint);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-soft);
}

.bp-share {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 14px;
}

.bp-share a:hover {
  color: var(--accent);
}

.bp-fade-in,
.bp-fade-out {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.bp-fade-out {
  margin: 3rem 0 2.5rem;
  text-align: right;
}

.bp-content {
  font-size: 17px;
  line-height: 1.8;
  color: var(--paper-soft);
}

.bp-content p {
  margin: 0 0 1.4em;
}

.bp-content h2,
.bp-content h3 {
  margin: 2.4em 0 0.8em;
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1;
  color: var(--paper);
}

.bp-content h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.bp-content h3 {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
}

.bp-content strong {
  color: var(--paper);
}

.bp-content a {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--accent);
}

.bp-content blockquote {
  margin: 2em 0;
  padding: 0 0 0 1.4rem;
  border-left: 1px solid var(--accent);
  font-family: var(--display-em);
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.4;
  color: var(--paper);
}

/* Photos break out of the text column */
.bp-content img {
  width: calc(100% + 12vw);
  max-width: calc(100vw - 2 * var(--gutter));
  margin: 2.4rem 0 2.4rem -6vw;
  cursor: zoom-in;
}

.bp-content figure {
  margin: 2.4rem 0;
}

.bp-content figure img {
  margin-top: 0;
  margin-bottom: 0.8rem;
}

.bp-content figcaption {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--paper-dim);
}

.bp-content .video-container {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 2.4rem 0;
}

.bp-content .video-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.bp-gallery {
  margin-top: 4rem;
}

.bp-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.bp-gallery-item {
  margin: 0;
}

.bp-gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  cursor: zoom-in;
}

.bp-lightbox-stage {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 0 var(--gutter) var(--gutter);
  min-height: 0;
}

.bp-lightbox-stage img {
  max-width: 100%;
  max-height: calc(100vh - 100px);
  object-fit: contain;
}

@media (max-width: 900px) {
  .bp-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .bp-side {
    position: static;
    order: 2;
  }

  .bp-content img {
    width: 100%;
    margin-left: 0;
  }
}
