/* ===== Color tokens (dark, muted greens/grays like the mockup) ===== */
:root {
  --ink: #1e2026; /* page background below hero */
  --ink-2: #0c0f12; /* deeper for gradient */
  --gen: rgba(200, 164, 105, 0.4);
  --raq: rgba(64, 130, 112, 0.4);
  --white-90: rgba(255, 255, 255, 0.92);
  --white-80: rgba(255, 255, 255, 0.8);
  --white-70: rgba(255, 255, 255, 0.7);
  --white-10: rgba(255, 255, 255, 0.1);
}

html {
  font-size: 20px;
}

/* Default body font: Noto Sans */
body,
p,
a,
li,
small,
span,
div {
  font-family: "Noto Sans", sans-serif;
}

/* Headings: Source Serif Pro */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "source-serif-pro", serif;
  font-weight: 600; /* adjust to match desired weight */
}

/* Utility aliases to keep markup clean */
.bg-ink {
  background-color: var(--ink);
}
.text-white-90 {
  color: var(--white-90);
}
.text-white-80 {
  color: var(--white-80);
}
.text-white-70 {
  color: var(--white-70);
}
.border-white-10 {
  border-color: var(--white-10) !important;
}

.section-pad {
  padding: clamp(3rem, 6vw, 5.5rem) 0;
  overflow: hidden;
}

.rounded-4 {
  border-radius: 1.25rem !important;
}
.shadow-soft {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.top-n15 {
  top: -15% !important;
}

/* ===== Hero ===== */

/* Keep focal point control */
#hero .hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 90% 45%;

  /* fade to transparent at bottom (reveals page bg) */
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 60%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(to bottom, #000 60%, rgba(0, 0, 0, 0) 100%);
}

/* tweak focal point per breakpoint as needed */
@media (max-width: 575.98px) {
  #hero .hero-bg img {
    object-position: 85% 40%;
    top: -25%;
  }
}
@media (min-width: 768px) and (max-width: 991.98px) {
  #hero .hero-bg img {
    object-position: 75% 35%;
  }
}
@media (min-width: 992px) {
  #hero .hero-bg img {
    object-position: 40% 50%;
  }
}

@media (min-width: 1600px) {
  .hero-content {
    top: -15%;
  }
}

/* Make sure stacking is right */
#hero {
  position: relative;
}
#hero .hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
#hero .container {
  position: relative;
  z-index: 1;
}

.scroll-down {
  width: 50px;
  height: 50px;
  border: 1px solid var(--white-70);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(4px);
  font-size: 1.2rem;
}
.scroll-down:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ===== Navbar behavior ===== */
#siteNav.nav-solid,
#siteNav:has(.collapse.show) {
  background: rgba(15, 18, 22, 0.8);
  backdrop-filter: blur(6px);
}
#siteNav .nav-link {
  color: var(--white-80);
}
#siteNav .nav-link:hover,
#siteNav .nav-link:focus {
  color: #fff;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg id='squiggle-link' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:ev='http://www.w3.org/2001/xml-events' viewBox='0 0 20 4'%3E%3Cstyle type='text/css'%3E.squiggle{animation:shift .5s linear infinite;}@keyframes shift {from {transform:translateX(0);}to {transform:translateX(-20px);}}%3C/style%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='1' class='squiggle' d='M0,3.5 c 5,0,5,-3,10,-3 s 5,3,10,3 c 5,0,5,-3,10,-3 s 5,3,10,3'/%3E%3C/svg%3E");
  background-position: 0 90%;
  background-size: auto 4px;
  background-repeat: repeat-x;
  text-decoration: none;
}

#siteNav .nav-link.active {
  color: #fff;
  font-weight: 600;
}

/* Helpful when images are not yet final */
.object-fit-cover {
  object-fit: cover;
}

footer img {
  width: auto;
}

.link-arrow i {
  display: inline-block;
  transition: transform 0.2s ease;
}
.link-arrow:hover i {
  transform: translateX(4px);
}

/* Infographic */

/* --- Section base & backgrounds --- */
#river-stats {
  position: relative;
  background: #171b20; /* base gray */
  overflow: hidden;
  --fade-dur: 250ms; /* JS updates this for in/out speed */
  perspective: 1000px; /* for the card's float (3D) */
  --parallax-x: 0px; /* JS updates */
  --parallax-y: 0px; /* JS updates */
}

#river-stats .stats-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  background-size: cover;
  /* parallax: we will offset from center using CSS vars */
  background-position: calc(50% + var(--parallax-x))
    calc(40% + var(--parallax-y));
  transition: opacity var(--fade-dur) ease, background-position 120ms linear;
  pointer-events: none;
}

/* Tint for legibility */
#river-stats .stats-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.6));
}

/* Your images (swap to your real paths if different) */
#river-stats .stats-bg--genesee {
  background-image: url("../img/genesee.jpg");
}
#river-stats .stats-bg--raquette {
  background-image: url("../img/raquette.jpg");
}

/* Active (shown) backgrounds */
#river-stats.show-genesee .stats-bg--genesee {
  opacity: 1;
}
#river-stats.show-raquette .stats-bg--raquette {
  opacity: 1;
}

/* Keep foreground content above the bg layers */
#river-stats .container {
  position: relative;
  z-index: 1;
}

/* --- Stat card polish + float-up effect --- */
.stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.25rem;
  transform: translateZ(0) translateY(0) scale(1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: transform 260ms cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 260ms ease, background-color 180ms ease, border-color 180ms ease;
}

/* Frosted blur on hover/focus */
.stat-card:hover,
.stat-card:focus-within {
  transform: translateY(-6px) translateZ(40px) scale(1.015);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  background: var(--gen); /* more translucent */
  border-color: rgba(255, 255, 255, 0.15);

  /* Frosted blur effect */
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.stat-card[data-river="raquette"]:hover,
.stat-card[data-river="raquette"]:focus-within {
  background: var(--raq); /* unique tint */
}

@media (min-width: 992px) {
  .stat-card {
    padding: 1.5rem;
  }
}

.stat-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #7cc7ff;
}

.stat-row {
  padding: 0.75rem 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}
.stat-row:first-child {
  border-top: 0;
}
.stat-label {
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.25rem;
}
.stat-value {
  font-size: 1.15rem;
  font-weight: 600;
}
.stat-analogy {
  font-size: 0.95rem;
}

.stat-card[data-river="genesee"] header {
  justify-content: flex-end; /* push icon + text to the right */
  text-align: right;
}

/* Right-align all text under Genesee */
.stat-card[data-river="genesee"] {
  text-align: right;
}

/* Position the watershed figure on the LEFT side of the Genesee card */
.stat-card[data-river="genesee"] {
  position: relative;
}

/* Scope to Genesee card */
.stat-card[data-river="genesee"],
.stat-card[data-river="raquette"] {
  position: relative;
}

/* Static SVG as a background, placed on the left side of the card */
.watershed-figure.is-static {
  position: absolute;
  left: 0; /* nudge from left edge */
  top: 0;
  bottom: 0;
  width: 400px;
  margin: 0;

  /* Show your SVG file as a static shape */
  background: url("../img/gen.svg") no-repeat center / cover;

  /* Don’t block interactions with card content */
  pointer-events: none;
  z-index: 0;

  /* Fade/slide in */
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.watershed-figure.is-static.raqq {
  left: auto;
  right: 0; /* nudge from right edge */
  background-image: url(../img/raq.svg);
  width: 475px;
  z-index: -1;
}

/* Keep main content above the figure */
.stat-card[data-river="genesee"] > *:not(.watershed-figure) {
  position: relative;
  z-index: 1;
}

/* Reveal on hover/focus within the card */
.stat-card[data-river="genesee"]:hover .watershed-figure.is-static,
.stat-card[data-river="genesee"]:focus-within .watershed-figure.is-static,
.stat-card[data-river="raquette"]:hover .watershed-figure.is-static.raqq,
.stat-card[data-river="raquette"]:focus-within
  .watershed-figure.is-static.raqq {
  opacity: 1;
  transform: translateX(0);
}

/* Optional: hide the figure on tighter screens */
@media (max-width: 991.98px) {
  .watershed-figure.is-static {
    display: none;
  }
}

/* Visual hint when locked */
#river-stats .stat-river.is-active {
  outline: 1px solid rgba(255, 255, 255, 0.5);
}
#river-stats .stat-river.is-inactive {
  opacity: 0.7;
}

/* If you need different fade timing while locked */
#river-stats[data-locked="true"] {
  --fade-dur: 240ms;
}

/* METHODOLOGY PAGE */

/* Subtle carousel dots centered under the pill */
#methodCarousel .carousel-indicators [data-bs-target] {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.25);
}
#methodCarousel .carousel-indicators .active {
  background-color: rgba(0, 0, 0, 0.6);
}

/* Softer controls */
#methodCarousel .carousel-control-prev-icon,
#methodCarousel .carousel-control-next-icon {
  filter: invert(1) opacity(0.65);
}
/* Stacked Center Carousel */
.stacked {
  --h: clamp(220px, 44vw, 420px);
  --gapX: 32%; /* horizontal offset between layers */
  --zStep: 140; /* depth per layer (px) */
  --scaleStep: 0.08; /* scale decrease per layer */
  --blurStep: 1px; /* blur increase per layer */
  perspective: 1600px;
  user-select: none;
}
.stacked-track {
  position: relative;
  height: var(--h);
  transform-style: preserve-3d;
}

.stacked-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%; /* fill the container’s width */
  transform-origin: center center;
  transition: transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1),
    filter 600ms ease, opacity 600ms ease, z-index 0s step-end;
  border-radius: 28px;
  overflow: hidden;
  /* subtler shadow */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  aspect-ratio: 3 / 2; /* 👈 keeps 3:2 ratio */
  height: auto; /* let width dictate height */
  max-width: min(86vw, 980px);
}
.stacked-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* shrink the whole carousel area */
#stackedCarousel {
  max-width: 590px; /* 👈 adjust to taste */
  margin-inline: auto; /* keep it centered */
}

/* Dots */
.stacked-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.stacked-dots button {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.25);
}
.stacked-dots button[aria-current="true"] {
  background: rgba(0, 0, 0, 0.65);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .stacked-slide {
    transition: none;
  }
}

/* RIVER STORIES */

.sortable {
  cursor: pointer;
  user-select: none;
}
.sort-arrow {
  font-size: 0.8rem;
  margin-left: 0.3rem;
}

.story-card .card {
  transition: background-color 0.3s ease;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.story-card:hover .card {
  background-color: rgba(0, 123, 255, 0.05); /* Bootstrap primary tint */
  transform: translateY(-4px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.logo-link img {
  transition: transform 0.4s ease, filter 0.4s ease;
}

.logo-link:hover img {
  transform: scale(1.05); /* subtle zoom */
  filter: hue-rotate(10deg) brightness(1.1); /* watery tint */
}

ul.team img {
  width: 200px;
  height: 200px;
  object-fit: cover;
}

.financial-support img {
  width: 150px;
}

.bg-gen {
  background-color: var(--gen);
}

.bg-raq {
  background-color: var(--raq);
}

f-small {
  font-size: 0.75rem;
}

footer a {
  color: rgb(110, 168, 254);
}

footer a:hover {
  color: #8bb9fe;
}

/* keeps \n as line breaks, preserves multiple spaces, still wraps long lines */
.transcript {
  white-space: pre-wrap;
  overflow-wrap: anywhere; /* avoids overflow on very long words/URLs */
  line-height: 1.6;
}
