
/* Full-bleed modules — remove horizontal padding from .main on homepage */
body.page-home {
  /* Match JS initial values: barH0=100, mainPadTop=4.5rem so body paddingTop=100-72=28px */
  --chrome-bar-height: 40px;
  padding-top: calc(100px - 4.5rem);
  background: linear-gradient(
    180deg,
    var(--grad-white) 0%,
    var(--grad-blue) 25%,
    var(--grad-pink) 75%,
    var(--grad-white) 100%
  );
}
body.page-home .main {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

/* ---------- Module 1: Gallery marquee ---------- */

/* Home image gallery -- spans the first viewport */
.home-hero {
  min-height: calc(100vh - var(--card-nav-height));
  /* display: flex; */
  flex-direction: column;
  /* padding: 0 calc(var(--card-padding) * 3); */
}
.home-module {
  min-height: calc(80vh - var(--card-nav-height));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--card-padding) * 3);
}

.home-hero .home-module--gallery {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

/* Fallback when there's no gallery — shows the latest report card instead */
.home-hero .home-module--latest-report {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--card-padding) * 3);
}

.home-hero .home-module--latest-report .reports-latest-card {
  width: 100%;
  max-width: 37rem;
  aspect-ratio: 3 / 4;
  padding: 3%;
}

.marquee {
  width: 100%;
  overflow: hidden;
  /* pause on hover */
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.marquee-track {
  display: flex;
  flex-direction: row;
  gap: clamp(1rem, 3vw, 2rem);
  width: max-content;
  animation: marquee-scroll 50s linear infinite;
}

.marquee-item {
  flex-shrink: 0;
  margin: 0;
}

.marquee-item a {
  display: block;
  height: clamp(14rem, 30vh, 24rem);
  cursor: zoom-in;
}

.marquee-item img {
  display: block;
  height: 100%;
  width: auto;
  object-fit: cover;
}

/* Caption below image on hover */
.marquee-item {
  position: relative;
}
.marquee-caption {
  display: block;
  padding: 0.4rem 0;
  font-family: var(--font-family-mono);
  font-size: 0.8rem;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
}
.marquee-item:hover .marquee-caption {
  opacity: 1;
}

@media (max-width: 47.999rem) {
  .marquee-item a {
    height: clamp(10rem, 40vw, 16rem);
  }
}



/* Per-module gradient slice colours — commented out in favour of full-page gradient */
/* .home-module--gallery { background: #5eb0eb; box-shadow: 0 0 80px 90px #5eb0eb; } 
.home-module--about  { background: transparent; }
.home-module--reports   { background: #8799ff; box-shadow: 0 0 80px 90px #8799ff; }
.home-module--substack { background: #ff9c9d; box-shadow: 0 0 80px 90px #ff9c9d; }
.home-module--signup   { background: transparent; } */

/* ---------- Module 2: About preview ---------- */
.about-preview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

.about-preview-headline {
  line-height: 1.30;
}
.about-preview-text {
  font-size: var(--font-body1);
  line-height: 1.35;
  color: var(--color-text);
}
.about-preview-text p { margin: 0 0 1em; }
.about-preview-text p:last-child { margin-bottom: 0; }

/* ---------- Module 3: Reports (folders) ---------- */
.reports-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: stretch;
}

/* Large folder container */
.reports-folder-large {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

/* Tab — left-aligned, ~33% wide, no bottom border */
.reports-folder-tab {
  width: 35%;
  padding: 1% 3% ;
  border: 1px solid var(--color-black);
  border-bottom: none;
  font-size: var(--font-h4);
  font-weight: 400;
  line-height: 105%;
  /* text-align: center; */
  /* padding-left: 4%; */
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  /* white-space: nowrap; */
  box-sizing: border-box;
}

/* Body — full width, aspect ratio matches the SVG (1426 × 836 body area) */
.reports-folder-body {
  width: 100%;
  aspect-ratio: 1426 / 836;
  border: 1px solid var(--color-black);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* Interior content — two-column grid inside the folder body */
.reports-folder-interior {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4%;
  padding: 3%;
  overflow: hidden;
}

/* Shine sweep on the large folder body */
.reports-folder-body::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 25%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 75%
  );
  transform: translateX(var(--shine-x, -130%));
  pointer-events: none;
  will-change: transform;
  z-index: 1;
}

.reports-description {
  font-family: 'Space Mono', monospace;
  font-size: var(--font-body3);
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Paper card — white sheet in the right column of the large folder */
.reports-latest-card {
  background: white;
  box-shadow: 4px 12px 32px rgba(0, 0, 0, 0.18);
    /* transform: translateX(var(--shine-x, -130%)); */

  padding: 6%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  cursor: default;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.reports-latest-card[data-report-pdf] {
  cursor: pointer;
}

.reports-latest-card[data-report-pdf]:hover {
  box-shadow: 4px 16px 40px rgba(0, 0, 0, 0.26);
}

.reports-latest-card-meta {
  font-family: 'Space Mono', monospace;
  font-size: var(--font-body4);
  line-height: 1.4;
  margin: 0;
}

.reports-latest-card-title {
  font-size: var(--font-h2);
  font-weight: 400;
  text-align: center;
  text-transform: uppercase;
  margin: 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.reports-latest-card-blurb {
  font-family: 'Space Mono', monospace;
  font-size: var(--font-body4);
  line-height: 1.5;
}
.reports-latest-card-blurb p { margin: 0 0 0.5em; }
.reports-latest-card-blurb p:last-child { margin: 0; }

/* Horizontal-scroll strip of small folders */
.reports-grid {
  list-style: none;
  padding: 0 0 1rem;
  margin: 0;
  display: flex;
  flex-direction: row;
  gap: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
  width: 100%;
}

.report-folder {
  flex: 0 0 auto;
  width: clamp(160px, 18vw, 240px);
  display: flex;
  flex-direction: column;
  cursor: default;
  user-select: none;
}
.report-folder[data-report-pdf] {
  cursor: pointer;
}

.report-folder-tab {
  align-self: flex-start;
  width: 45%;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(0, 0, 0, 0.6);
  border-bottom: none;
  border-radius: 3px 3px 0 0;
  background: var(--folder-bg, transparent);
}
.report-folder-body {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.6);
  background:
    linear-gradient(150deg, rgba(255,255,255,0.30) 0%, transparent 45%),
    var(--folder-bg, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4/3;
  padding: 1rem;
}

/* Scroll-driven shine on small folders */
.report-folder-body::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 25%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 75%
  );
  transform: translateX(var(--shine-x, -130%));
  pointer-events: none;
  will-change: transform;
}
.report-folder-title {
  font-size: var(--font-h2);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.2;
}
.report-folder-date {
  font-family: 'Space Mono', monospace;
  font-size: var(--font-body4);
  color: var(--color-black);
  margin-top: 0.4rem;
}

/* Folder color palette — applied only on hover */
.report-folder--green:hover  { --folder-bg: #8ec97a; }
.report-folder--pink:hover   { --folder-bg: #f0a0a8; }
.report-folder--blue:hover   { --folder-bg: #b8d0e8; }
.report-folder--yellow:hover { --folder-bg: #d8e86a; }
.report-folder--grey:hover   { --folder-bg: #b4b8b0; }

/* PDF popup */
.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pdf-modal[hidden] { display: none; }
.pdf-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}
.pdf-modal-window {
  position: relative;
  z-index: 1;
  width: min(90vw, 960px);
  height: min(90vh, 800px);
  background: var(--color-white);
  display: flex;
  flex-direction: column;
}
.pdf-modal-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  color: var(--color-white);
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.pdf-modal-frame {
  flex: 1;
  width: 100%;
  border: none;
}



/* ---------- Module 4: Substack ---------- */
.substack-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

.substack-right {

max-height: auto;
  position: relative;
  overflow-y: none;
}

.substack-name {
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
/* .btn handles border, padding, font, hover — only layout overrides here */
.substack-cta {
  display: block;
  max-width: 500px;
  width: 100%;
}
.substack-posts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  max-width: 100%;
}
.substack-post {
  /* border-top: 1px solid var(--color-light); */
  padding: 1rem 0;
}

li.substack-post {
  list-style: none;
}


/* .substack-post:last-child {
  border-bottom: 1px solid var(--color-light);
} */
.substack-post a {
  display: block;
}
.substack-post a:hover .substack-post-title {
  text-decoration: 2px solid black underline;
  text-underline-offset: 3px;
}
.substack-post-title {
  font-weight: 400;
  margin-bottom: 0.25rem;
  line-height: 1.35;
}
.substack-post-meta {
  font-size: var(--font-body4);
  font-weight: 400;
  color: var(--color-black);
}

/* ---------- Module 5: Mailing list signup (mailchimp tbd) ---------- */
.signup-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.signup-label {
  font-size: var(--font-h4);
  font-weight: 400;
  text-transform: uppercase;
  /* letter-spacing: 0.08em; */
  margin-bottom: 1rem;
}
.signup-input {
  font: inherit;
  font-size: var(--font-h4);
  width: 100%;
  height: 200px;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-bottom: none;
  padding: 1rem var(--card-padding);
  background: rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.08);
  outline: none;
  margin-bottom: var(--margin-m);
}
.signup-input:focus {
  background: var(--color-light);
  border-color: var(--color-black);
}
.signup-submit {
  width: 100%;
}

/* --------- Media Queries------------------------------------------------ */


/* ------------------DESKTOP--------------- */

@media (min-width: 60rem) {

  
  .about-preview.has-text,
  .substack-inner {
    grid-template-columns: 1fr 1fr;
    gap: 14rem;
  }

  .reports-inner {
    width: 75%;
    margin: 0 auto;
  }


  .reports-folder-interior {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4%;
    padding: 3%;
    overflow: hidden;
  }

  .substack-right {
    max-height: 400px;  
    position: relative;
    overflow-y: scroll;
  }

  .substack-cta {
    max-width: 600px;
  }
}