:root {
  --rapeseed: #F6D84A;
  --pollen: #E9A91B;
  --cream: #FFF7DF;
  --river: #8ED8E8;
  --teal: #236E73;
  --leaf: #7FAE55;
  --coral: #F28A6B;
  --reed: #47372A;
  --mincho: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
  --gothic: "Zen Kaku Gothic New", Inter, "Hiragino Sans", system-ui, sans-serif;
  --rounded: "M PLUS Rounded 1c", "Arial Rounded MT Bold", ui-rounded, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: rgba(71, 55, 42, .92);
  font-family: var(--gothic);
  background:
    radial-gradient(circle at 18% 8%, rgba(142, 216, 232, .22), transparent 28rem),
    radial-gradient(circle at 82% 18%, rgba(246, 216, 74, .18), transparent 26rem),
    linear-gradient(110deg, rgba(255,247,223,1), rgba(255,247,223,.88) 45%, rgba(246,216,74,.12)),
    var(--cream);
}

.paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: .5;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(71,55,42,.09) 0 1px, transparent 1.8px),
    radial-gradient(circle at 80% 60%, rgba(35,110,115,.07) 0 1px, transparent 2px),
    repeating-linear-gradient(90deg, rgba(71,55,42,.025) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.2) 0 2px, transparent 2px 9px);
  background-size: 80px 80px, 110px 110px, 18px 18px, 22px 22px;
}

.cursor-ripple-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 18;
}

.ripple {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(35, 110, 115, .35);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(.2);
  animation: rippleSpread 1.6s ease-out forwards;
}

@keyframes rippleSpread {
  to { transform: translate(-50%, -50%) scale(9); opacity: 0; }
}

.river-nav {
  position: fixed;
  top: 1.1rem;
  left: 50%;
  display: flex;
  gap: .4rem;
  align-items: center;
  transform: translateX(-50%);
  z-index: 30;
  padding: .45rem .55rem;
  border: 1px solid rgba(71,55,42,.16);
  border-radius: 999px;
  background: rgba(255,247,223,.76);
  box-shadow: 0 18px 40px rgba(71,55,42,.09);
  backdrop-filter: blur(12px);
}

.nav-title, .tiny-label, .ink-coordinate, .paper-slip, .thread-label {
  font-family: var(--rounded);
  letter-spacing: .08em;
  text-transform: lowercase;
}

.nav-title {
  padding: 0 .55rem;
  color: var(--teal);
  font-size: .72rem;
  white-space: nowrap;
}

.river-nav button, .current-button {
  border: 0;
  color: var(--reed);
  background: rgba(246,216,74,.22);
  border-radius: 999px;
  padding: .48rem .75rem;
  font: 700 .72rem var(--rounded);
  cursor: pointer;
  transition: transform .35s ease, background .35s ease, color .35s ease;
}

.river-nav button.active, .river-nav button:hover, .current-button:hover {
  background: var(--pollen);
  color: var(--cream);
  transform: translateY(-2px);
}

.broadcast {
  position: relative;
  width: 500vw;
  height: 100vh;
  display: flex;
  transition: transform .08s linear;
  will-change: transform;
}

.scene {
  width: 100vw;
  height: 100vh;
  position: relative;
  flex: 0 0 100vw;
  overflow: hidden;
  padding: clamp(4rem, 8vw, 8rem);
}

.stream-map {
  position: absolute;
  inset: 0;
  width: 500vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

.stream-shadow, .stream-fill, .stream-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stream-shadow {
  stroke: rgba(35,110,115,.12);
  stroke-width: 235;
  filter: blur(18px);
}

.stream-fill {
  stroke: rgba(142,216,232,.58);
  stroke-width: 170;
  filter: blur(2px);
}

.stream-line {
  stroke: rgba(35,110,115,.42);
  stroke-width: 4;
  stroke-dasharray: 18 22;
  animation: currentDash 10s linear infinite;
}

@keyframes currentDash { to { stroke-dashoffset: -220; } }

.paper-island {
  position: relative;
  z-index: 5;
  max-width: 34rem;
  padding: clamp(1.4rem, 3vw, 2.8rem);
  border: 1px solid rgba(71,55,42,.14);
  border-radius: 42% 58% 48% 52% / 56% 44% 60% 40%;
  background:
    radial-gradient(circle at 10% 15%, rgba(246,216,74,.16), transparent 9rem),
    radial-gradient(circle at 85% 85%, rgba(142,216,232,.18), transparent 10rem),
    rgba(255,247,223,.78);
  box-shadow: 0 24px 70px rgba(71,55,42,.12), inset 0 0 50px rgba(255,255,255,.42);
  backdrop-filter: blur(3px);
  opacity: .35;
  transform: translateY(28px) rotate(-1deg);
  transition: opacity .9s ease, transform .9s ease;
}

.scene.in-view .paper-island {
  opacity: 1;
  transform: translateY(0) rotate(-1deg);
}

h1, h2 {
  font-family: var(--mincho);
  font-weight: 600;
  margin: 0;
  color: rgba(71,55,42,.94);
}

.wordmark {
  font-size: clamp(3rem, 8vw, 8.5rem);
  line-height: .92;
  letter-spacing: -.06em;
  margin: .4rem 0 1.4rem;
  text-shadow: 0 2px 0 rgba(246,216,74,.2);
  background: linear-gradient(90deg, var(--reed), var(--teal), var(--pollen));
  -webkit-background-clip: text;
  color: transparent;
  filter: url(#none);
}

h2 {
  font-size: clamp(2rem, 4vw, 4.8rem);
  line-height: 1;
  margin-bottom: 1rem;
}

p {
  font-size: clamp(1rem, 1.35vw, 1.3rem);
  line-height: 1.78;
  margin: 0;
}

.tiny-label {
  display: inline-block;
  margin-bottom: .8rem;
  color: var(--teal);
  font-size: .76rem;
}

.hero-island { margin: 11vh 0 0 6vw; max-width: 52rem; }
.bank-marker { margin: 43vh 0 0 38vw; }
.current-note { margin: 12vh 0 0 12vw; }
.bridge-label { margin: 47vh 0 0 47vw; }
.delta-note { margin: 18vh 0 0 14vw; }

.wash, .yellow-bank, .dusk-wash, .snowbank, .flower-cluster, .rain-rings, .fish-glints, .delta-petals, .reeds {
  position: absolute;
  pointer-events: none;
}

.wash-blue {
  left: -14vw;
  top: -18vh;
  width: 58vw;
  height: 58vh;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(142,216,232,.48), rgba(142,216,232,.18) 42%, transparent 70%);
  filter: blur(14px);
  animation: pigmentBloom 12s ease-in-out infinite alternate;
}

@keyframes pigmentBloom { to { transform: scale(1.16) rotate(8deg); opacity: .72; } }

.snowbank {
  right: -8vw;
  bottom: 2vh;
  width: 48vw;
  height: 26vh;
  border-radius: 60% 40% 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,.48), rgba(142,216,232,.12));
  filter: blur(5px);
}

.petal-field::before, .petal-field::after, .delta-petals::before, .delta-petals::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at center, var(--rapeseed) 0 42%, transparent 46%),
    radial-gradient(ellipse at center, var(--pollen) 0 36%, transparent 40%);
  background-size: 36px 20px, 28px 16px;
  background-position: 0 0, 18px 40px;
  opacity: .8;
  animation: petalDrift 18s linear infinite;
}

.opening-petals {
  left: 4vw;
  top: 10vh;
  width: 50vw;
  height: 78vh;
  z-index: 3;
  mask-image: radial-gradient(circle at 40% 42%, black, transparent 70%);
}

@keyframes petalDrift {
  to { transform: translate(90px, 130px) rotate(14deg); }
}

.brush-line {
  height: 16px;
  width: 70%;
  margin-top: 1.6rem;
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(35,110,115,.62), rgba(142,216,232,.08));
  filter: blur(2px);
}

.ink-coordinate {
  position: absolute;
  right: 10vw;
  top: 26vh;
  color: rgba(71,55,42,.48);
  transform: rotate(9deg);
  z-index: 4;
}

.yellow-bank {
  width: 52vw;
  height: 48vh;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(246,216,74,.78) 0 2px, transparent 3px) 0 0 / 24px 22px,
    radial-gradient(circle, rgba(233,169,27,.5), transparent 58%);
  filter: blur(.2px);
  animation: bankBreathe 9s ease-in-out infinite alternate;
}
.bank-left { left: -8vw; top: 10vh; transform: rotate(-12deg); }
.bank-right { right: -8vw; bottom: -5vh; transform: rotate(8deg); }
@keyframes bankBreathe { to { filter: blur(1px) saturate(1.12); transform: scale(1.04) rotate(-8deg); } }

.flower-cluster {
  width: 20rem;
  height: 20rem;
  z-index: 4;
  background:
    radial-gradient(circle, var(--rapeseed) 0 5px, transparent 6px) 10px 15px / 38px 34px,
    linear-gradient(80deg, transparent 48%, rgba(127,174,85,.55) 49% 51%, transparent 52%) 0 0 / 30px 90px;
  border-radius: 50%;
}
.cluster-a { left: 12vw; bottom: 5vh; transform: rotate(-15deg); }
.cluster-b { right: 14vw; top: 11vh; transform: rotate(17deg); }

.paper-slip, .thread-label {
  position: absolute;
  z-index: 6;
  padding: .8rem 1rem;
  background: rgba(255,247,223,.82);
  border: 1px solid rgba(71,55,42,.16);
  box-shadow: 0 14px 25px rgba(71,55,42,.1);
  color: var(--teal);
}
.paper-slip { left: 20vw; top: 28vh; transform: rotate(-8deg); }

.waveform {
  position: absolute;
  left: 8vw;
  right: 8vw;
  top: 52vh;
  height: 24vh;
  z-index: 6;
}
.wave-petal {
  position: absolute;
  width: 18px;
  height: 10px;
  border-radius: 80% 20% 80% 20%;
  background: var(--rapeseed);
  box-shadow: 0 0 0 1px rgba(233,169,27,.2), 0 6px 16px rgba(233,169,27,.22);
  transform-origin: center;
  animation: waveformBob 2.4s ease-in-out infinite;
}
@keyframes waveformBob { 50% { translate: 0 -16px; rotate: 18deg; } }

.paper-boat {
  position: absolute;
  z-index: 7;
  left: 64vw;
  top: 30vh;
  width: 86px;
  height: 50px;
  animation: boatFloat 7s ease-in-out infinite;
}
.paper-boat::before, .paper-boat::after {
  content: "";
  position: absolute;
  border-style: solid;
}
.paper-boat::before { border-width: 0 43px 36px 0; border-color: transparent rgba(255,247,223,.95) transparent transparent; left: 0; }
.paper-boat::after { border-width: 0 0 36px 43px; border-color: transparent transparent rgba(255,247,223,.88) transparent; right: 0; }
@keyframes boatFloat { 50% { transform: translate(30px, 18px) rotate(5deg); } }

.fish-glints {
  right: 16vw;
  bottom: 18vh;
  width: 23vw;
  height: 18vh;
  background: radial-gradient(ellipse, rgba(255,255,255,.86) 0 2px, transparent 3px) 0 0 / 34px 22px;
  transform: skewX(-20deg);
  animation: glint 4s ease-in-out infinite;
}
@keyframes glint { 50% { opacity: .2; transform: skewX(-20deg) translateX(24px); } }

.eddy {
  position: absolute;
  z-index: 7;
  right: 21vw;
  top: 47vh;
  width: 8rem;
  height: 8rem;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(35,110,115,.4);
  border-radius: 50%;
  color: var(--teal);
  font: 700 .72rem var(--rounded);
  background: rgba(142,216,232,.12);
  animation: eddySpin 9s linear infinite;
}
.eddy.revealed { background: rgba(246,216,74,.34); color: var(--reed); }
@keyframes eddySpin { to { transform: rotate(360deg); } }

.bridge {
  position: absolute;
  z-index: 8;
  left: 15vw;
  top: 24vh;
  width: 56vw;
  height: 16vh;
  transform: rotate(-11deg);
  display: flex;
  gap: 1.2vw;
}
.bridge span {
  flex: 1;
  border-radius: 12px;
  background: linear-gradient(100deg, rgba(71,55,42,.78), rgba(71,55,42,.42));
  box-shadow: 0 24px 18px rgba(35,110,115,.17);
  animation: bridgeShadow 6s ease-in-out infinite alternate;
}
@keyframes bridgeShadow { to { transform: translateY(12px); box-shadow: 0 35px 26px rgba(35,110,115,.24); } }

.thread-label::before {
  content: "";
  position: absolute;
  width: 72px;
  height: 1px;
  background: var(--coral);
  top: 50%;
  left: -72px;
}
.label-one { left: 24vw; bottom: 20vh; transform: rotate(7deg); }
.label-two { right: 12vw; top: 20vh; transform: rotate(-4deg); }

.rain-rings {
  inset: 5vh 8vw;
  z-index: 3;
  background:
    radial-gradient(circle, transparent 0 18px, rgba(35,110,115,.15) 19px 20px, transparent 21px) 0 0 / 160px 120px,
    radial-gradient(circle, transparent 0 8px, rgba(142,216,232,.2) 9px 10px, transparent 11px) 40px 40px / 120px 100px;
  animation: ringPulse 5s ease-in-out infinite;
}
@keyframes ringPulse { 50% { opacity: .35; transform: scale(1.03); } }

.reeds {
  width: 14vw;
  height: 38vh;
  bottom: 0;
  z-index: 6;
  background: linear-gradient(82deg, transparent 48%, rgba(71,55,42,.65) 49% 51%, transparent 52%) 0 0 / 24px 100%;
  transform-origin: bottom;
  animation: reedSway 5s ease-in-out infinite alternate;
}
.reeds-left { left: 2vw; }
.reeds-right { right: 4vw; animation-delay: -2s; }
@keyframes reedSway { to { transform: skewX(7deg); } }

.scene-five {
  background: linear-gradient(180deg, rgba(35,110,115,.08), rgba(71,55,42,.16));
}
.dusk-wash {
  inset: -12vh -12vw;
  background:
    radial-gradient(circle at 74% 35%, rgba(242,138,107,.38), transparent 22rem),
    radial-gradient(circle at 52% 88%, rgba(35,110,115,.35), transparent 28rem),
    linear-gradient(120deg, transparent, rgba(71,55,42,.16));
  filter: blur(8px);
}
.lanterns {
  position: absolute;
  z-index: 8;
  right: 14vw;
  top: 20vh;
  display: flex;
  gap: 4vw;
}
.lanterns span {
  width: 3.2rem;
  height: 4.4rem;
  display: block;
  border-radius: 48% 48% 42% 42%;
  background: radial-gradient(circle at 50% 35%, rgba(255,247,223,.9), var(--coral) 45%, rgba(242,138,107,.28));
  box-shadow: 0 0 36px rgba(242,138,107,.55), 0 12vh 22px rgba(242,138,107,.26);
  animation: lanternWobble 4.8s ease-in-out infinite;
}
.lanterns span:nth-child(2n) { animation-delay: -1.8s; transform: translateY(12vh); }
@keyframes lanternWobble { 50% { transform: translateY(12px) rotate(5deg); filter: blur(.4px); } }

.delta-petals {
  left: 0;
  bottom: 0;
  width: 100vw;
  height: 42vh;
  opacity: .55;
  z-index: 3;
}
.current-button {
  margin-top: 1.6rem;
  background: rgba(242,138,107,.28);
}

.progress-current {
  position: fixed;
  left: 1.2rem;
  bottom: 1.2rem;
  z-index: 30;
  width: min(22rem, calc(100vw - 2.4rem));
  height: .5rem;
  border-radius: 999px;
  background: rgba(142,216,232,.3);
  overflow: hidden;
  border: 1px solid rgba(35,110,115,.15);
}
.progress-current span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--river), var(--rapeseed), var(--coral));
  transition: width .15s linear;
}

@media (max-width: 760px) {
  .river-nav { left: .7rem; right: .7rem; transform: none; overflow-x: auto; justify-content: flex-start; }
  .nav-title { display: none; }
  .scene { padding: 5.5rem 1.1rem 4rem; }
  .paper-island { max-width: calc(100vw - 2.2rem); }
  .hero-island, .bank-marker, .current-note, .bridge-label, .delta-note { margin: 10vh 0 0; }
  .wordmark { font-size: 3.2rem; }
  .bridge { left: 4vw; width: 88vw; top: 18vh; }
  .lanterns { right: 5vw; gap: 1.4rem; transform: scale(.72); transform-origin: top right; }
  .waveform { left: 1rem; right: 1rem; }
}
