/* -------------------------------------------
   BASE PAGE SETTINGS
-------------------------------------------- */
body {
  margin: 0;
  padding: 0;
  /* font-family: Arial, sans-serif; */
  overflow-x: hidden;
}

/* -------------------------------------------
   FIXED BACKGROUND
-------------------------------------------- */
#bg-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: #7D8E95;
  overflow: hidden;

  /* center the image whether it's full or 95% */
  display: flex;
  align-items: center;
  justify-content: center;
}

#bg-container.map-exit-background {
  z-index: 9;
}

#bg-container img {
  filter: brightness(1);
  transition: opacity 0.45s ease-in-out,
              filter 0.7s ease-in-out;
}

#bg-container.opening-crossfade img {
  transition: opacity 2s ease-in-out,
              filter 0.7s ease-in-out;
}

#bg-container img.bg-layer {
  position: absolute;
  opacity: 0;
}

#bg-container img.bg-layer.active {
  opacity: 1;
}

/* full-screen background (index-image, silo) */
#bg-container img.full-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 95% photo (all other photo panels) */
#bg-container img.small-bg {
  width: 95vw;
  max-height: 95vh;
  height: auto;
  object-fit: contain;
}

/* Dimmed version used ONLY on opening section */
#bg-container img.dimmed {
  filter: brightness(0.5);  /* ← 50% brightness */
}

/* -------------------------------------------
   PANELS
-------------------------------------------- */
.story {
  position: relative;
  z-index: 10;
}

.panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.opening-exit-spacer {
  min-height: 30vh;
  padding: 0;
  background: transparent;
  pointer-events: none;
}

.opening-panel {
  position: relative;
  flex-direction: column;
}

.opening-logo {
  position: static;
  width: 110px;
  height: auto;
  margin-top: 2rem;
  transform: none;
  z-index: 2;
}

@media (max-width: 500px) {
  .opening-logo {
    width: 76px;
    margin-top: 1.25rem;
  }
}

/* TEXT OVER IMAGES */
.overlay {
  max-width: 900px;
  text-align: left;
  color: white;
}

.plain-overlay h2 {
  font-size: 3rem;
  text-align: center;
}

/* -------------------------------------------
   TYPOGRAPHY (UPDATED OPENING FONTS)
-------------------------------------------- */
.opening-overlay {
  margin-left: -20px;
  text-align: left;
  margin: 0.2em auto;
}

.opening-overlay h1 { 
  font-size: 6rem;
  margin-bottom: 1rem;
  font-weight: 980;
  font-family: 'Utopia Std Bold', serif;
}

.opening-overlay .title-label {
  display: inline-block;
  position: relative;
  white-space: nowrap;
  font-family: 'acumin-pro', 'Acumin Pro', 'Arial Black', sans-serif;
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.opening-overlay .title-label::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 0.14em;
  background: currentColor;
  opacity: 0.8;
}

.title-broken-u {
  position: relative;
  display: inline-block;
  width: 0.72em;
  height: 0.92em;
  vertical-align: -0.02em;
}

.title-u-piece {
  position: absolute;
  inset: 0;
  line-height: 0.92;
}

.title-u-top {
  clip-path: polygon(0 0, 100% 0, 100% 44%, 0 59%);
  transform: translate(-0.025em, -0.012em);
}

.title-u-bottom {
  clip-path: polygon(0 59%, 100% 44%, 100% 100%, 0 100%);
  transform: translate(0.035em, 0.018em);
}

@media (max-width: 900px) {
  .opening-overlay .title-label {
    font-size: 3rem;
  }
}

/* Small phones */
@media (max-width: 500px) {
  .opening-overlay h1 {
    font-size: 2.5rem;
  }

  .opening-overlay .title-label {
    font-size: 1.3rem;
  }
}

.opening-overlay h2 { 
  font-weight: 500;
  font-size: 3rem;
  margin-bottom: 0.75rem;
  font-family: 'Utopia Std', serif;
  line-height: 1.4;
}

/* Small phones */
@media (max-width: 500px) {
  .opening-overlay h2 {
    font-size: 1.2rem;
  }
}

.opening-overlay h3 { 
  font-weight: 400;
  font-size: 1.5rem;
  font-family: 'Utopia Std', serif;
  line-height: 1.3;
  color: #b8b8b8;
}

/* Small phones */
@media (max-width: 500px) {
  .opening-overlay h3 {
    font-size: 0.8rem;
  }
}

a {
  color: #c9e2ff;          
  text-decoration: underline; 
}

a:visited {
  color: #c9e2ff;          
}

a:hover {
  text-decoration-thickness: 2px; 
}

.subtitle-intro a,
.subtitle-intro a:visited {
  color: inherit;
}

/* LEFT-ALIGNED FINAL PARAGRAPHS */
.text-left {
  text-align: left;
  max-width: 800px;
}

/* -------------------------------------------
   PLAIN SECTIONS
-------------------------------------------- */
.plain {
  position: relative;
  min-height: 100vh;
  background: #344648;
  overflow: hidden;
}

/* Remove the old 120px pseudo-layer from regular plain sections */
.plain::before {
  content: none;
}

/* Adds breathing room before subtitle text */
.plain-overlay {
  padding-top: 10vh;
}


/* -------------------------------------------
   SUBTITLE PANELS — COAL DUST BACKGROUND
-------------------------------------------- */
.subtitle-panel {
  position: relative;
  background: #000;
  overflow: hidden;
}

/* Full-panel coal dust image */
.subtitle-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("images/sketchsketch.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.7;
  z-index: 0;
}

.subtitle-intro {
  background: transparent;
}

.subtitle-intro::before {
  content: none;
}

/* Dark readability layer */
.subtitle-panel::after {
  content: "";
  position: absolute;
  inset: 0;

  background: #344648;
  z-index: 1;
}

.subtitle-intro::after {
  content: none;
}

.subtitle-intro .opening-overlay {
  opacity: 0;
  transition: opacity 0.7s ease-in-out;
  transition-delay: 0s;
}

.subtitle-intro.is-active .opening-overlay {
  opacity: 1;
  transition-delay: 0.12s;
}

.title-photo-hold {
  min-height: 35vh;
  padding: 0;
  background: transparent;
  pointer-events: none;
}

/* Keep text above image */
.subtitle-panel .overlay {
  position: relative;
  z-index: 2;
}

/* CENTER ALIGN SUBTITLE PANEL CONTENT */
.subtitle-panel .opening-overlay {
  text-align: center;
  margin-left: auto;
  margin-right: auto;

  display: flex;
  flex-direction: column;
  align-items: center;
}

/* -------------------------------------------
   PHOTO FRAME MASK
   (still used as a layout box; photo is background)
-------------------------------------------- */
.photo-frame {
  width: 90vw;
  height: 90vh;
  background: transparent;
  position: relative;
  overflow: hidden;
}

/* -------------------------------------------
   READ MORE
-------------------------------------------- */

.readmore-panel {
  position: relative;
  min-height: 35vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  text-align: left;
  background: transparent;
  z-index: 6;
}

/* Uniform left anchor for all Read More buttons */
.readmore-container {
  position: relative;
  left: auto;
  bottom: auto;
  margin-left: 18vw;
  margin-bottom: 8vh;
  max-width: 600px;
}

/* Button */
.readmore-btn {
  background: transparent;
  border: none;
  padding: 10px 0;
  font-size: 16px;
  cursor: pointer;
  color: rgb(215, 212, 212);
  letter-spacing: 0.04em;
}

/* Hidden text */
.readmore-text {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
  color: rgb(255, 255, 255);
  font-size: 1.5em;
  line-height: 1.4;
  margin-top: 0.6em;
}

/* When opened */
.readmore-text.open {
  max-height: 500px;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .readmore-container {
    margin-left: 5vw;
    margin-right: 5vw;
    margin-bottom: 10vh;
    max-width: 90vw;
  }
}


/* -------------------------------------------
   PHOTO SEQUENCE
-------------------------------------------- */

.sequence-group {
  position: relative;
}

.sequence-photo {
  position: relative;
  z-index: 1;
}

.rollover-photo {
  cursor: pointer;
  outline: none;
}

.photo-rollover-text {
  position: absolute;
  left: 50%;
  bottom: 8vh;
  z-index: 3;
  width: min(680px, calc(95vw - 48px));
  padding: 1.4rem 1.6rem;
  color: #fff;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  line-height: 1.4;
  background: rgba(18, 31, 33, 0.78);
  opacity: 0;
  transform: translate(-50%, 18px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.photo-rollover-text p {
  margin: 0 0 0.75rem;
}

.photo-rollover-text p:last-child {
  margin-bottom: 0;
}

.rollover-photo:hover .photo-rollover-text,
.rollover-photo:focus-visible .photo-rollover-text,
.rollover-photo.is-active .photo-rollover-text {
  opacity: 1;
  transform: translate(-50%, 0);
}

.scroll-rollover-photo {
  min-height: 170vh;
}

.scroll-rollover-photo .photo-rollover-text {
  bottom: 55vh;
}

@media (max-width: 600px) {
  .scroll-rollover-photo {
    min-height: 185vh;
  }

  .scroll-rollover-photo .photo-rollover-text {
    bottom: 60vh;
  }
}

.photo3-panel {
  min-height: 75vh;
}

/* 
   This is no longer sticky.
   It now scrolls naturally after each photo.
*/
.sequence-sticky {
  position: relative;
  min-height: 35vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  z-index: 5;
  background: transparent;
}

.sequence-sticky.readmore-before-text {
  min-height: 120vh;
}

/* -------------------------------------------
   FRANKLIN DIABETES RATE GRAPHIC
-------------------------------------------- */
.diabetes-graphic-scroll {
  position: relative;
  min-height: 300vh;
  z-index: 12;
  background: #203335;
}

.diabetes-graphic-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  color: #fff;
  background: #203335;
}

.diabetes-stat-copy {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: min(760px, 86vw);
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.97);
  transition: top 0.55s ease, transform 0.55s ease;
}

.diabetes-stat-copy.visible {
  transform: translate(-50%, -50%) scale(1);
}

.diabetes-stat-copy strong,
.diabetes-stat-copy span,
.diabetes-stat-copy small {
  display: block;
}

.diabetes-stat-copy strong {
  color: #f2a545;
  font-family: 'Utopia Std Bold', serif;
  font-size: clamp(6rem, 18vw, 13rem);
  line-height: 0.82;
  transition: font-size 0.55s ease;
}

.diabetes-stat-copy span {
  margin-top: 0.16em;
  font-family: 'Utopia Std Bold', serif;
  font-size: clamp(2.2rem, 7vw, 5rem);
  line-height: 1;
  transition: font-size 0.55s ease;
}

.diabetes-stat-copy small {
  max-width: 620px;
  margin: 1.2rem auto 0;
  color: #d7e1df;
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  line-height: 1.35;
  transition: margin-top 0.55s ease, font-size 0.55s ease;
}

.diabetes-dot-chart {
  position: absolute;
  top: 39vh;
  left: 50%;
  z-index: 2;
  width: min(340px, 72vw);
  height: min(44vh, 340px);
  overflow: visible;
  transform: translateX(-50%);
}

.diabetes-graphic-sticky.with-dots .diabetes-stat-copy {
  top: 8vh;
  transform: translateX(-50%) scale(1);
}

.diabetes-graphic-sticky.with-dots .diabetes-stat-copy strong {
  font-size: clamp(4rem, 11vw, 7.5rem);
}

.diabetes-graphic-sticky.with-dots .diabetes-stat-copy span {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
}

.diabetes-graphic-sticky.with-dots .diabetes-stat-copy small {
  margin-top: 0.7rem;
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
}

.diabetes-graphic-source {
  position: absolute;
  right: 3vw;
  bottom: 2.5vh;
  z-index: 3;
  margin: 0;
  color: #b9c7c5;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.diabetes-graphic-sticky.show-stat .diabetes-graphic-source {
  opacity: 1;
}

.diabetes-graphic-steps {
  position: relative;
  z-index: 3;
  margin-top: -100vh;
  pointer-events: none;
}

.diabetes-graphic-step {
  min-height: 100vh;
}

.diabetes-graphic-text-step {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8vw;
  pointer-events: auto;
}

.diabetes-graphic-intro {
  width: min(760px, 84vw);
  margin: 0;
  color: #fff;
  font-family: 'Utopia Std', serif;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
}

/* Photo 6 sits beneath the graphic's final viewport for a layered reveal. */
.photo6-parallax-reveal {
  display: block;
  min-height: 280vh;
  margin-top: -100vh;
  padding: 0;
  z-index: 11;
}

.photo6-parallax-reveal .photo-frame {
  position: sticky;
  top: 2.5vh;
  width: 95vw;
  height: 95vh;
  margin: 0 auto;
  background-image: url("images/photo6.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.photo6-parallax-reveal .readmore-panel {
  position: absolute;
  top: 130vh;
  left: 0;
  width: 100%;
}

@media (max-width: 600px) {
  .diabetes-dot-chart {
    top: 39vh;
    width: min(300px, 78vw);
    height: min(42vh, 300px);
  }

  .diabetes-graphic-sticky.with-dots .diabetes-stat-copy {
    top: 6vh;
  }

  .diabetes-graphic-intro {
    width: min(88vw, 620px);
    font-size: clamp(1.25rem, 5.5vw, 1.65rem);
  }
}

/* Smooth blend where the sequence transitions to text */
.sequence-group::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 150px;
  pointer-events: none;
  z-index: 4;
}

/* -------------------------------------------
   VIRGINIA TO FRANKLIN MAP SCROLL
-------------------------------------------- */
.map-scroll {
  position: relative;
  min-height: 300vh;
  background: #292b2b;
  z-index: 12;
}

.map-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  background: #101414;
}

.map-steps {
  position: relative;
  margin-top: -100vh;
  z-index: 2;
  pointer-events: none;
}

.map-step {
  min-height: 100vh;
}

.mapboxgl-map {
  font-family: Arial, sans-serif;
}

.mapboxgl-ctrl-logo,
.mapboxgl-ctrl-attrib {
  opacity: 0.78;
}

@media (max-width: 600px) {
  .map-scroll {
    min-height: 310vh;
  }
}

/* -------------------------------------------
   FRANKLIN CENSUS TRACT FOOD ACCESS MAP
-------------------------------------------- */
.tract-map-scroll {
  position: relative;
  min-height: 500vh;
  background: #101414;
  z-index: 12;
}

.map-scroll + .panel,
.tract-map-scroll + .panel,
.map-scroll + .sequence-group,
.tract-map-scroll + .sequence-group {
  position: relative;
  z-index: 20;
  margin-top: -100vh;
}

.tract-map-scroll + .sequence-group > .sequence-photo:first-child {
  background: #7D8E95;
}

.tract-map-scroll + .sequence-group > .sequence-photo:first-child .photo-frame {
  width: 95vw;
  height: 95vh;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 1;
}

.tract-map-scroll.map-covered .tract-map-sticky {
  opacity: 0;
}

.tract-map-scroll.map-covered {
  background: transparent;
}

.tract-map-scroll + .sequence-group > .sequence-photo:first-child.map-exit-handoff {
  background-color: transparent;
}

.tract-map-scroll + .sequence-group > .sequence-photo:first-child.map-exit-handoff .photo-frame {
  opacity: 0;
}

.tract-map-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #101414;
}

.tract-map {
  width: 100%;
  height: 100%;
}

.tract-map-steps {
  position: relative;
  margin-top: -100vh;
  z-index: 2;
  pointer-events: none;
}

.tract-map-step {
  min-height: 100vh;
}

.tract-map-text-step {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: 0 8vw;
}

.tract-map-intro {
  width: min(520px, 78vw);
  padding: 18px 22px;
  color: #fff;
  font-size: clamp(1.2rem, 2.3vw, 1.75rem);
  line-height: 1.4;
  background: rgba(16, 20, 20, 0.82);
  border-left: 4px solid #c9e2ff;
  pointer-events: auto;
}

.tract-map-intro p {
  margin: 0;
}

.tract-callout {
  position: absolute;
  z-index: 4;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

.tract-callout.visible {
  opacity: 1;
  transform: translateY(0);
}

.tract-callout-card {
  width: min(300px, 72vw);
  padding: 18px 20px 20px;
  color: #fff;
  background: rgba(68, 68, 68, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.tract-callout-number {
  display: block;
  font-family: 'Utopia Std Bold', serif;
  font-size: clamp(4rem, 9vw, 7rem);
  font-weight: 900;
  line-height: 0.9;
  color: #aeadad;
}

.tract-callout-text {
  display: block;
  margin-top: 0.55rem;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1.25;
  color: #f7f1e7;
}

.tract-callout-emphasis {
  font-weight: 800;
}

.tract-callout-emphasis-901 {
  color: #2f80ed;
}

.tract-callout-emphasis-902 {
  color: #f2a545;
}

.tract-callout-arrow {
  display: none;
}

.tract-callout-arrow::after {
  content: none;
}

.tract-callout-901 {
  top: 17vh;
  left: 8vw;
}

.tract-callout-901 .tract-callout-arrow {
  top: 50%;
  left: calc(100% - 8px);
  width: min(28vw, 360px);
  transform: rotate(14deg);
}

.tract-callout-902 {
  right: 8vw;
  bottom: 14vh;
}

.tract-callout-902 .tract-callout-arrow {
  top: 42%;
  right: calc(100% - 8px);
  width: min(28vw, 360px);
  transform: rotate(188deg);
}

@media (max-width: 700px) {
  .tract-callout-901,
  .tract-callout-902 {
    left: 6vw;
    right: auto;
  }

  .tract-callout-901 {
    top: 10vh;
  }

  .tract-callout-902 {
    bottom: 9vh;
  }

  .tract-callout-arrow {
    display: none;
  }
}
.quote {
  font-family: 'Utopia Std', serif;
  font-size: 2rem;
  font-style: italic;
  line-height: 1.4;
  color: rgb(255, 255, 255);
  max-width: 500px;
  display: block; 
  margin-left: 2em auto;
  text-align: left;
}

.photo4-quote-overlay,
.photo15-quote-overlay {
  width: min(1200px, 90vw);
}

.photo4-quote-overlay {
  transform: translateX(4vw);
}

.photo15-quote-overlay {
  transform: translateX(-6vw);
}

@media (max-width: 600px) {
  .photo4-quote-overlay {
    transform: translateX(2vw);
  }

  .photo15-quote-overlay {
    transform: translateX(-4vw);
  }
}

.photo15-image-lead {
  min-height: 55vh;
  padding: 0;
  background: transparent;
  pointer-events: none;
}

.quote.quote-left {
  margin-left: 0;
  margin-right: auto;
  text-align: left;
  transform: none;
}

.photo4-quote-overlay .quote {
  margin-left: auto;
  margin-right: 0;
  text-align: right;
  transform: none;
}

.photo15-quote-overlay .quote {
  margin-left: 0;
  margin-right: auto;
  text-align: left;
  transform: none;
}

@media (min-width: 1200px) {
  .quote {
    transform: translateX(420px);
  }

  .quote.quote-left {
    transform: none;
  }
}

@media (max-width: 900px) {
  .overlay {
    justify-content: center;
  }

  .quote {
    margin-left: 0;
    text-align: center;
  }

  .quote.quote-left {
    text-align: left;
  }
}

@media (max-width: 600px) {
  .quote {
    font-size: 1.6rem;
    max-width: 90%;
  }
}

.photo-text {
  font-family: 'Utopia Std', serif;
  font-size: 22px;
  line-height: 1.65;
  color: white;

  max-width: 800px;
  margin: 0 auto 1.2rem auto;

  text-align: center;
  display: block;
}

@media (max-width: 600px) {
  .photo-text {
    font-size: 20px;
    max-width: 90%;
  }
}

.text-left p {
  font-size: 22px;
  line-height: 1.65;
  text-align: left;
}

.text-left p.drop-cap::first-letter {
  float: left;
  margin: 0.1em 0.12em 0 0;
  font-family: 'Utopia Std Bold', serif;
  font-size: 4em;
  line-height: 0.72;
}

.hed-line {
  border: none;
  height: 1px;
  background-color: rgb(255, 255, 255);
  opacity: 0.5;
  width: 60%;
  margin: 1em auto;
}

.sketch {
  width: 300px;
  height: 200px;
  margin: 0 auto;
  border: none;
  background-image: url("images/sketchsketch.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.85;
  text-align: center;
}

.sketch-break {
  min-height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #7D8E95;
}


.logo {
  width: 120px;
  height: 120px;
  margin: 2em auto;
  border: none;
  background-image: url("images/VCIJ-logo-icon.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.85;
}


/* -------------------------------------------
   ROTATE GIF — MOBILE ONLY
-------------------------------------------- */
.rotate-mobile {
  display: none;               /* hidden by default */
  text-align: center;
  margin-top: 1.5rem;
}

.rotate-mobile img {
  width: 100px;
  height: auto;
  opacity: 0.9;
}

/* ✅ Only show on mobile */
@media (max-width: 600px) {
  .rotate-mobile {
    display: block;
  }
}


/* -------------------------------------------
   END CREDITS OVER FINAL IMAGE
-------------------------------------------- */
.end-credits-panel {
  position: relative;
  min-height: 100vh;

  background: transparent;

  z-index: 20;

  align-items: center;
  justify-content: center;
}

.end-credits-panel .overlay {
  text-align: center;
  font-size: 24px;
  color: white;
}
