/* ============================================================
   JOURNAL PAGE — houses the WATER MONOLOGUES passages
   ============================================================ */

body.journal-body {
  background: #EFEAE0;
  color: #0E0E10;
  font-family: 'Cormorant Garamond', serif;
  overflow-x: hidden;
}

/* MASTHEAD — the journal's title page above the passages.
   Full-screen ripple film with the title floating on top. */
.journal-masthead {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(80px, 12vw, 160px) clamp(28px, 6vw, 96px);
  text-align: center;
  background: #000000;
  overflow: hidden;
}

/* Ripple film beneath the title page */
.jm-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  /* tint the grayscale ripples a deep blue */
  filter: brightness(0.62) sepia(1) hue-rotate(188deg) saturate(4.2);
}

/* Scrim over the film — the ripples stay clear across the large center
   of the frame, then fall off to pure black at the edges so the film
   reads full-bleed (matching the WATER hero). A slight top/bottom band
   keeps the nav and coordinates legible. */
.jm-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 82% 82% at 50% 46%,
      transparent 0%,
      transparent 56%,
      rgba(0, 0, 0, 0.45) 80%,
      rgba(0, 0, 0, 0.85) 100%),
    linear-gradient(180deg,
      rgba(0, 0, 0, 0.42) 0%,
      rgba(0, 0, 0, 0.10) 20%,
      rgba(0, 0, 0, 0.10) 80%,
      rgba(0, 0, 0, 0.48) 100%);
}

/* Paper grain — matches the passage grain */
.journal-masthead::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.55'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.18;
  z-index: 2;
}

.journal-masthead > * {
  position: relative;
  z-index: 3;
}
/* keep the film + veil behind everything — these MUST stay absolutely
   positioned (the `.journal-masthead > *` rule above otherwise forces
   them to position:relative and breaks the full-bleed background) */
.journal-masthead > .jm-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.journal-masthead > .jm-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Top + bottom hairlines */
.journal-masthead::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(82%, 1240px);
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(207, 227, 245, 0.85) 30%, rgba(207, 227, 245, 0.85) 70%, transparent);
  opacity: 0.55;
  z-index: 4;
}

.jm-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: #CFE3F5;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  margin-bottom: 36px;
  opacity: 0;
  animation: jmTitleFade 2.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.jm-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: clamp(60px, 11vw, 188px);
  line-height: 0.9;
  letter-spacing: 0.015em;
  margin: 0 0 28px;

  /* light-blue + white gradient clipped to the text */
  background: linear-gradient(180deg,
    #FFFFFF 0%, #F2F8FF 28%, #CCE6FF 64%, #A6D4FF 100%);
  background-size: 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter:
    drop-shadow(0 0 42px rgba(150, 200, 255, 0.55))
    drop-shadow(0 6px 50px rgba(0, 0, 0, 0.6));

  opacity: 0;
  animation: jmTitleFade 3.6s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

/* "The Journal" emerges from the ripple (opacity + rise only, so the
   blue glow filter is preserved) */
@keyframes jmTitleFade {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .jm-label,
  .jm-title,
  .jm-deck,
  .jm-meta {
    opacity: 1;
    animation: none;
  }
}
/* "Journal" — a touch more vivid light blue than "The", with a brighter
   glow so it still stands out, but stays in the light-blue/white family */
.jm-title em {
  font-style: italic;
  font-weight: 600;
  background: linear-gradient(180deg,
    #FFFFFF 0%, #E3F3FF 22%, #ABDBFF 60%, #7FC4FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 36px rgba(130, 195, 255, 0.7));
}

.jm-deck {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 1.8vw, 26px);
  color: var(--cream);
  letter-spacing: 0.04em;
  text-shadow: 0 0 28px rgba(239, 227, 198, 0.35), 0 1px 8px rgba(0, 0, 0, 0.55);
  max-width: 720px;
  margin: 0 auto clamp(40px, 5vw, 72px);
  line-height: 1.5;
  opacity: 0;
  animation: jmTitleFade 2.8s cubic-bezier(0.22, 1, 0.36, 1) 0.9s forwards;
}

.jm-meta {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: #CFE3F5;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  opacity: 0;
  animation: jmTitleFade 2.8s cubic-bezier(0.22, 1, 0.36, 1) 1.3s forwards;
}
.jm-meta .dot {
  color: #9FD3FF;
  font-size: 13px;
}

/* Hide the first passage's top hairline since the masthead has one
   right above it (avoids visual double-line) */
.journal-body .passage:first-of-type::before {
  display: none;
}

/* FOOTER on journal page — invert to dark since the passages end on warm paper */
.journal-body .foot {
  background: #03060F;
  color: #EFE3C6;
}

/* RESPONSIVE */
@media (max-width: 700px) {
  .jm-meta {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 14px;
  }
}

/* PASSAGE I — second figure (crushed Sprite can) sits beneath the
   opening paragraph, pushed to the right edge of its column so it sits
   closer to the center portrait */
.p-figure-lc {
  margin-top: clamp(18px, 1.8vw, 26px);
  margin-left: auto;
  margin-right: 0;
  max-width: 190px;
  /* shift right so it slightly overlaps the center portrait, layered on top */
  position: relative;
  z-index: 5;
  transform: translateX(clamp(45px, 6vw, 85px));
}

@media (max-width: 900px) {
  .p-figure-lc {
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    transform: none;
  }
}

/* ============================================================
   MOVING-WATER VEIL — one cobalt ripple film overlaid across
   ALL passages (the masthead "first page" keeps its own film).
   A sticky layer pinned to the viewport while the passages are
   in view, lifted out of flow with a negative margin so the
   essays sit directly beneath it. Same cobalt tint as the
   masthead's .jm-video.
   ============================================================ */
.journal-passages {
  position: relative;
}
.jp-water {
  position: sticky;
  top: 0;
  height: 100vh;
  margin-bottom: -100vh;   /* removes the layer from flow — passages overlap it */
  z-index: 6;              /* rides above the passage paper + text */
  pointer-events: none;
  overflow: hidden;
}
.jp-water-vid {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.09;
  mix-blend-mode: multiply;   /* dark cobalt ripples read as caustic shadows on the paper */
  filter: brightness(0.7) sepia(1) hue-rotate(188deg) saturate(4.2);
}
@media (prefers-reduced-motion: reduce) {
  .jp-water { display: none; }
}
