/* ===== PAGE OVERRIDES ===== */
html, body {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  height: auto !important;
}

.page-story {
  background: #fff;
}

/* ===== BACK BUTTON ===== */
.back-home {
  position: fixed;
  top: 32px;
  left: 40px;
  z-index: 3000;
  color: #000;
  opacity: 0.4;
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
}

.back-home:hover {
  opacity: 1;
  transform: translateX(-4px);
}

/* Dark burger lines */
.burger__line--dark {
  background: #000 !important;
}

.burger.is-open .burger__line--dark {
  background: #000 !important;
}

/* ===== READING PROGRESS BAR ===== */
.reading-progress {
  position: fixed;
  top: 72px;
  left: 48px;
  width: 3px;
  height: calc(100vh - 100px);
  z-index: 3000;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 2px;
}

.reading-progress__fill {
  width: 100%;
  height: 0%;
  background: #0053A1;
  border-radius: 2px;
  transition: height 0.15s ease-out;
}

/* ===== ARTICLE HEADER ===== */
.story-header {
  padding: 160px 40px 80px;
  text-align: center;
}

.story-header__inner {
  max-width: 720px;
  margin: 0 auto;
}

.story-header__label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #0053A1;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(20px);
  animation: storyFadeUp 0.8s cubic-bezier(0.33, 1, 0.68, 1) 0.1s forwards;
}

.story-header__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 400;
  color: #000;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(20px);
  animation: storyFadeUp 0.8s cubic-bezier(0.33, 1, 0.68, 1) 0.25s forwards;
}

.story-header__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(20px);
  animation: storyFadeUp 0.8s cubic-bezier(0.33, 1, 0.68, 1) 0.4s forwards;
}

.story-header__date,
.story-header__author {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: #888;
  letter-spacing: 0.5px;
}

.story-header__separator {
  color: #ccc;
  font-size: 14px;
}

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

/* ===== ARTICLE BODY ===== */
.story-body {
  padding: 0 40px 80px;
}

.story-body__inner {
  max-width: 720px;
  margin: 0 auto;
}

.story-body__inner p {
  font-family: 'Inter', sans-serif;
  font-size: clamp(16px, 1.6vw, 18px);
  font-weight: 300;
  line-height: 1.85;
  color: #333;
  margin-bottom: 28px;
}

/* Drop cap on first paragraph */
.story-body__inner > p:first-of-type::first-letter {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 4em;
  float: left;
  line-height: 0.8;
  margin-right: 12px;
  margin-top: 8px;
  color: #000;
}

/* ===== PHOTOS ===== */
.story-photo {
  margin: 56px 0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.33, 1, 0.68, 1),
              transform 0.8s cubic-bezier(0.33, 1, 0.68, 1);
}

.story-photo.is-visible,
.story-photo-pair.is-visible,
.story-photo-pair.is-visible .story-photo {
  opacity: 1;
  transform: translateY(0);
}

.story-photo img {
  width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
  display: block;
  border-radius: 2px;
}

.story-photo figcaption {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: #999;
  margin-top: 12px;
  letter-spacing: 0.2px;
  line-height: 1.5;
  text-align: center;
}

/* Wide photos: break out of the text column */
.story-photo--wide {
  margin-left: -120px;
  margin-right: -120px;
}

.story-photo--wide img {
  width: 100%;
}

/* Portrait photos: centered, narrower */
.story-photo--portrait {
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Logo style photos */
.story-photo--logo {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  background: #fff;
  padding: 20px 0;
}

/* Photo pairs: side by side */
.story-photo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 56px -120px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.33, 1, 0.68, 1),
              transform 0.8s cubic-bezier(0.33, 1, 0.68, 1);
}

.story-photo-pair .story-photo {
  margin: 0;
}

.story-photo-pair .story-photo img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

/* Shorter pairs for landscape photos (e.g. tree photos) */
.story-photo-pair--short {
  grid-template-rows: minmax(0, 45vh);
}

/* ===== FOOTER ===== */
.story-footer {
  padding: 60px 40px;
  background: #000;
  display: flex;
  justify-content: center;
}

.story-footer__logo {
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.story-footer__logo:hover {
  opacity: 1;
}

.story-footer__logo img {
  width: 120px;
  height: auto;
}

/* ===== MOBILE ===== */
@media (max-width: 960px) {
  .story-photo--wide {
    margin-left: -40px;
    margin-right: -40px;
  }

  .story-photo-pair {
    margin-left: -40px;
    margin-right: -40px;
  }
}

@media (max-width: 768px) {
  .reading-progress {
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 3px;
    border-radius: 0;
  }

  .reading-progress__fill {
    width: 0%;
    height: 100%;
    transition: width 0.15s ease-out;
  }

  .back-home {
    top: 24px;
    left: 24px;
  }

  .story-header {
    padding: 120px 24px 60px;
  }

  .story-body {
    padding: 0 24px 60px;
  }

  .story-photo--wide {
    margin-left: -24px;
    margin-right: -24px;
  }

  .story-photo-pair {
    grid-template-columns: 1fr;
    margin-left: -24px;
    margin-right: -24px;
  }

  .story-photo--portrait {
    max-width: 280px;
  }

  .story-footer {
    padding: 48px 24px;
  }
}
