/* Hallmark · shape: river album, one cream river line runs the page, every day is a stop whose key photo stands on the water and is mirrored in it, the photos follow · genre: atmospheric · theme: brand (ECW Trips, logo C + Hoàng hôn, accent Vàng nắng) · job: visit (look through the photos) · redesign: full (picked demo C "Sông Hương", canvas page Huế)
 * paper: #17121C · accent: #F4B942 · display: LF Curve Retro · body: Danta · outlier: LF Mileast (lead line and stop names) · hero: the lake of lăng Tự Đức on the river line, its reflection rippling below, the title on the water · nav: logo left, one link right · footer: one line, logo, credit, other trips · signature: every key photo is mirrored in moving water (three.js), ripples follow the pointer and the scroll
 * axes: dark/display-heavy/warm · posture: horizon · accent: the stop dots, the sun glint on the water, focus · motion: anime.js draws the river line and lifts the title in, motion.dev reveals each stop on scroll, three.js moves the water; all off under reduced motion, the still mirror stays · sound: off until asked, river bed, a paddle at each new stop, a slow bamboo flute in the Vietnamese pentatonic, all Web Audio · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P5 H4 E4 S5 R5 V5 · weakest: H, the place grids keep the album masonry; the river line now runs past them and the film stop changes the rung */
/* Hallmark · finish-review: subagent · fix · 6 findings · 6 resolved (full-size key photos, river line through the page, film stop as a strip, no repeated head, every group named, end crop) */
@import url("../album/album.css");

:root {
  --line: 6px;
  --water-depth: 0.42;
  --stop-gap: var(--section-gap-s);
}
body.river { background: var(--color-paper); }

/* water: the still mirror is the fallback, the canvas covers it once three.js is running */
.water { position: relative; overflow: hidden; background: var(--color-paper); }
.water::before { content: ""; position: absolute; z-index: 2; inset: 0 0 auto; height: var(--line); background: var(--color-rule); }
.water .mirror { width: 100%; height: 100%; object-fit: cover; object-position: center 100%; transform: scaleY(-1); opacity: 0.38; filter: blur(1.5px) brightness(0.8); -webkit-mask-image: linear-gradient(var(--color-paper), transparent 92%); mask-image: linear-gradient(var(--color-paper), transparent 92%); }
/* the canvas fades in over the still mirror once its texture is ready: no black frame, no jump */
.water canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; opacity: 0; transition: opacity 0.9s var(--ease-out); }
.water.gl canvas { opacity: 1; }

/* the opening: photo on the river, the title floating on its reflection */
.river-hero { padding-top: var(--space-3xl); }
.hero-shot { display: block; margin: 0; border-radius: 0; }
.hero-shot img { width: 100%; height: min(56dvh, 620px); object-fit: cover; object-position: center 40%; }
.hero-shot:hover { transform: none; box-shadow: none; }
.hero-water { position: relative; height: clamp(300px, 40dvh, 440px); }
.hero-water .water { position: absolute; inset: 0; }
.hero-water .mirror { object-position: center 40%; }
.hero-text { position: relative; z-index: 3; padding-top: var(--space-xl); display: flex; flex-direction: column; gap: var(--space-sm); pointer-events: none; }
.hero-text h1 { font-size: clamp(4rem, 8vw + 1rem, 9rem); line-height: 0.95; }
.hero-text .lead { font-family: var(--font-outlier); color: var(--color-accent); font-size: clamp(1.25rem, 1vw + 0.9rem, 1.875rem); }
.stops-nav { position: absolute; z-index: 3; top: calc(var(--line) / 2 - 15px); left: 0; right: 0; display: flex; justify-content: flex-end; gap: clamp(var(--space-lg), 6vw, var(--space-3xl)); }
.stops-nav a { display: flex; flex-direction: column; align-items: center; gap: var(--space-sm); color: var(--color-ink); text-decoration: none; font-size: var(--text-md); }
.stops-nav .buoy { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--color-accent); background: var(--color-paper); transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.stops-nav a:hover .buoy, .stops-nav a[aria-current="true"] .buoy { background: var(--color-accent); }
.stops-nav a:hover { color: var(--color-accent); }
.stops-nav a:active .buoy { transform: scale(0.9); }
.stops-nav a:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 4px; border-radius: var(--radius-card); }

/* a stop: its day and name, the key photo standing on the water */
.stop { padding-top: var(--stop-gap); }
.on-water { margin: 0 0 var(--space-2xl); display: grid; }
.on-water figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-xs) var(--space-lg); margin-bottom: var(--space-lg); }
.stop-day { width: 100%; color: var(--color-accent); }
.on-water h2 { font-family: var(--font-outlier); font-weight: 400; font-size: var(--text-section); }
.key-shot { margin: 0; border-radius: 0; aspect-ratio: 16 / 7; }
.key-shot img { width: 100%; height: 100%; object-fit: cover; }
.key-shot:hover { transform: none; box-shadow: 0 0 0 2px var(--color-accent); }
.on-water .water { aspect-ratio: 16 / 3.4; }
.place { margin-bottom: var(--space-2xl); }
.place:last-child { margin-bottom: 0; }
.place h3 { font-size: var(--text-2xl); margin-bottom: var(--space-lg); }
.end .on-water figcaption { justify-content: center; }
.end { padding-bottom: var(--space-2xl); }

/* the river runs the page: one straight vertical line in the left gutter, from the hero's waterline down to the
   last stop, joining every stop's waterline; motion.dev draws it as you scroll (--run), it stands whole without JS */
.river-run { position: relative; --run: 1; }
.river-run::before { content: ""; position: absolute; z-index: 4; left: calc(max(0px, (100% - var(--container)) / 2) + var(--gutter) / 2 - var(--line) / 2); top: calc(-1 * clamp(300px, 40dvh, 440px)); bottom: 0; width: var(--line); background: var(--color-rule); transform: scaleY(var(--run)); transform-origin: top; pointer-events: none; }
.on-water .water { overflow: visible; }
.on-water .water::before { left: calc(var(--gutter) / -2 - var(--line) / 2); }
.end-shot { aspect-ratio: 3 / 2; }
.end-shot img { object-position: center 30%; }

/* the film stop changes the rung: a tinted well, no water, the photos on a contact strip */
.stop.film { margin-top: var(--stop-gap); padding-block: var(--section-gap-s); background: var(--color-paper-2); }
.film-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-xs) var(--space-lg); margin-bottom: var(--space-xl); }
.film-head h2 { font-family: var(--font-outlier); font-weight: 400; font-size: var(--text-section); }
.grid.contact { --row: 220px; gap: var(--space-xs); padding: var(--space-lg) var(--space-sm); background:
  repeating-linear-gradient(90deg, var(--color-ink-2) 0 10px, transparent 10px 22px) top / 100% 8px no-repeat,
  repeating-linear-gradient(90deg, var(--color-ink-2) 0 10px, transparent 10px 22px) bottom / 100% 8px no-repeat,
  var(--color-paper-3); }

/* sound: one quiet switch, bottom right */
.sound { position: fixed; right: var(--space-md); bottom: var(--space-md); z-index: var(--z-sticky); display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 44px; padding: 0 var(--space-md); border: 1px solid color-mix(in oklab, var(--color-ink) 35%, transparent); border-radius: var(--radius-pill); background: color-mix(in oklab, var(--color-paper) 80%, transparent); color: var(--color-ink); cursor: pointer; transition: border-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.sound .wave { opacity: 0.35; }
.sound[aria-pressed="true"] { color: var(--color-accent); border-color: var(--color-accent); }
.sound[aria-pressed="true"] .wave { opacity: 1; }
.sound:hover { border-color: var(--color-accent); }
.sound:active { color: var(--color-ink-2); }
.sound:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }

@media (max-width: 40rem) {
  .stops-nav { justify-content: space-between; padding-inline: var(--gutter); }
  .key-shot { aspect-ratio: 4 / 3; }
  .on-water .water { aspect-ratio: 4 / 1.6; }
  .sound span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
