:root {
  --cream: #F7EED8;
  --green: #3E6F58;
  --petal: #F2A0A8;
  --ink: #1B1714;
  --vermilion: #E4472E;
  --brass: #D9A441;
  --indigo: #16213A;
  --mincho: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", Georgia, serif;
  --gothic: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  --serif-jp: "Noto Serif JP", "Yu Mincho", serif;
  --cormorant: "Cormorant Garamond", Garamond, Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--indigo);
  color: var(--cream);
  font-family: var(--gothic);
  overflow-x: hidden;
}

button { font: inherit; color: inherit; }

.washi-grain,
.sky-clock,
.petal-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}

.washi-grain {
  opacity: .22;
  mix-blend-mode: soft-light;
  background:
    repeating-linear-gradient(92deg, transparent 0 9px, rgba(247,238,216,.3) 10px, transparent 12px),
    repeating-linear-gradient(177deg, transparent 0 13px, rgba(27,23,20,.24) 14px, transparent 16px);
}

.sky-clock {
  z-index: -2;
  background:
    radial-gradient(circle at 75% var(--sun-y, 92%), rgba(217,164,65,.65), transparent 14rem),
    linear-gradient(180deg, #16213A 0%, #16213A 18%, #3E6F58 48%, #F7EED8 72%, #1B1714 100%);
  opacity: .95;
}

.stone-nav {
  position: fixed;
  left: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: grid;
  gap: .8rem;
}

.stone {
  width: 4.8rem;
  min-height: 2.1rem;
  border: 1px solid rgba(247,238,216,.28);
  border-radius: 48% 42% 45% 40%;
  background: rgba(247,238,216,.14);
  color: var(--cream);
  font: 700 .62rem/1 var(--gothic);
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: inset 0 -10px 18px rgba(27,23,20,.18);
  transition: transform .35s ease, background .35s ease, color .35s ease;
}

.stone.active,
.stone:hover { background: var(--cream); color: var(--ink); transform: translateX(.45rem) rotate(-2deg); }

.ritual-path { position: relative; z-index: 1; }

.scene {
  position: relative;
  min-height: 105vh;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: center;
  padding: 7rem clamp(1.2rem, 4vw, 5rem);
  isolation: isolate;
  overflow: hidden;
}

.scene::before {
  content: attr(data-hour);
  position: absolute;
  right: 3rem;
  top: 2rem;
  font: 600 .72rem/1 var(--cormorant);
  letter-spacing: .34em;
  text-transform: uppercase;
  color: rgba(247,238,216,.58);
}

.scene::after {
  content: "";
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: 2rem;
  height: 1.1rem;
  background: radial-gradient(ellipse at center, rgba(247,238,216,.38) 0 25%, transparent 28%) 0 0 / 4.5rem 1rem repeat-x;
  opacity: .45;
}

h1, h2 {
  margin: 0;
  font-family: var(--mincho);
  font-weight: 600;
  letter-spacing: -.03em;
}

h1 { font-size: clamp(4.2rem, 13vw, 12rem); line-height: .82; }
h1 span { color: var(--brass); text-shadow: 0 0 24px rgba(217,164,65,.45); }
h2 { font-size: clamp(3rem, 8vw, 8rem); line-height: .86; }

p { font-size: clamp(1rem, 1.4vw, 1.2rem); line-height: 1.75; }

.kicker {
  margin: 0 0 1rem;
  font: 800 .72rem/1 var(--gothic);
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--vermilion);
}

.jp { font-family: var(--serif-jp); letter-spacing: .12em; color: var(--brass); }

.plaque,
.paper-slip,
.ema {
  position: relative;
  padding: clamp(1.4rem, 3vw, 2.6rem);
  color: var(--ink);
  background:
    linear-gradient(110deg, rgba(255,255,255,.24), transparent 32%),
    var(--cream);
  box-shadow: 0 2rem 4rem rgba(0,0,0,.28), inset 0 0 0 1px rgba(27,23,20,.1);
}

.plaque { clip-path: polygon(8% 0, 92% 0, 100% 18%, 100% 100%, 0 100%, 0 18%); }
.paper-slip { clip-path: polygon(0 0, 96% 0, 100% 7%, 96% 100%, 4% 100%, 0 92%); }
.ema { clip-path: polygon(50% 0, 100% 20%, 100% 100%, 0 100%, 0 20%); }

.plaque-opening { grid-column: 3 / 9; align-self: end; margin-bottom: 8vh; transform: rotate(-1.5deg); }
.basin-slip { grid-column: 2 / 7; z-index: 4; transform: rotate(1deg); }
.ema-noon { grid-column: 8 / 12; z-index: 5; transform: rotate(2deg); }
.fortune-slip { grid-column: 2 / 7; z-index: 5; }
.closing-plaque { grid-column: 6 / 12; z-index: 5; transform: rotate(-1deg); }

.scene-torii { background: linear-gradient(180deg, rgba(22,33,58,.98), rgba(22,33,58,.72) 62%, rgba(27,23,20,.4)); }
.horizon { position: absolute; inset: auto 0 15%; height: 2px; background: linear-gradient(90deg, transparent, var(--brass), transparent); opacity: .58; }
.torii-crop { position: absolute; inset: 0; z-index: -1; filter: drop-shadow(0 3rem 3rem rgba(0,0,0,.4)); }
.torii-beam, .torii-post { position: absolute; background: var(--vermilion); box-shadow: inset 0 -1rem 0 rgba(27,23,20,.18), 0 0 2rem rgba(228,71,46,.22); }
.beam-top { width: 86vw; height: 3.4rem; left: -6vw; top: 12vh; transform: rotate(-4deg); border-radius: .35rem; }
.beam-low { width: 58vw; height: 2.5rem; left: 7vw; top: 22vh; transform: rotate(-4deg); }
.post-left { width: 4.6rem; height: 90vh; left: 18vw; top: 13vh; transform: rotate(2deg); }
.post-right { width: 3.8rem; height: 75vh; right: 13vw; top: 25vh; transform: rotate(-1deg); opacity: .78; }
.shimenawa { position: absolute; left: 18%; right: 18%; top: 30vh; height: 2rem; border-top: .75rem double #D9A441; transform: rotate(-3deg); }
.shimenawa i { position: relative; display: inline-block; width: 1.5rem; height: 4rem; margin-left: 12%; background: var(--cream); clip-path: polygon(0 0, 100% 0, 50% 38%, 100% 38%, 38% 100%, 45% 52%, 0 52%); animation: flutter 3.5s ease-in-out infinite; }
.shimenawa i:nth-child(3) { animation-delay: .5s; }.shimenawa i:nth-child(4) { animation-delay: 1s; }.shimenawa i:nth-child(5) { animation-delay: 1.5s; }

.ritual-pull, .tie-button {
  border: 0;
  background: var(--vermilion);
  color: var(--cream);
  padding: 1rem 1.5rem;
  border-radius: 999px;
  font: 800 .75rem/1 var(--gothic);
  letter-spacing: .22em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 1rem 2rem rgba(228,71,46,.24);
}
.gate-pull { grid-column: 9 / 12; align-self: end; margin-bottom: 16vh; }
.return-pull { grid-column: 8 / 11; margin-top: 28rem; background: var(--brass); color: var(--ink); }

.scene-basin { background: linear-gradient(180deg, rgba(22,33,58,.5), rgba(62,111,88,.68), rgba(247,238,216,.38)); }
.curved-path { position: absolute; width: 70vw; height: 70vw; border: 2rem dotted rgba(247,238,216,.22); border-left-color: transparent; border-bottom-color: transparent; border-radius: 50%; left: -20vw; bottom: -18vw; transform: rotate(20deg); }
.basin-bowl { grid-column: 7 / 12; position: relative; height: min(46vw, 34rem); border-radius: 48%; background: radial-gradient(circle at 48% 45%, rgba(247,238,216,.52), transparent 8%), radial-gradient(ellipse at center, rgba(22,33,58,.88), #3E6F58 66%, #1B1714 67%, #F7EED8 70%); box-shadow: inset 0 0 4rem rgba(0,0,0,.44), 0 2rem 6rem rgba(0,0,0,.32); cursor: pointer; }
.water-name { position: absolute; inset: 38% 0 auto; text-align: center; font: italic 4rem/1 var(--cormorant); letter-spacing: .4em; color: rgba(247,238,216,.3); filter: blur(.3px); }
.ladle { position: absolute; width: 62%; height: .7rem; background: #D9A441; right: 8%; top: 22%; transform: rotate(-18deg); transform-origin: right center; border-radius: 1rem; transition: transform .8s ease; }
.ladle span { position: absolute; width: 5.5rem; height: 5.5rem; left: -2.7rem; top: -2.4rem; border: .8rem solid #D9A441; border-radius: 50%; background: rgba(247,238,216,.12); }
.basin-bowl.active .ladle { transform: rotate(-7deg); }
.ripple { position: absolute; left: 50%; top: 50%; width: 4rem; height: 4rem; border: 2px solid rgba(247,238,216,.45); border-radius: 50%; transform: translate(-50%, -50%) scale(.2); opacity: 0; }
.basin-bowl.active .ripple { animation: ripple 1.8s ease-out; }.basin-bowl.active .r2 { animation-delay: .25s; }.basin-bowl.active .r3 { animation-delay: .5s; }
.cedar { position: absolute; left: 4%; bottom: 8%; width: 18rem; height: 18rem; background: repeating-conic-gradient(from -25deg, transparent 0 5deg, rgba(62,111,88,.8) 6deg 8deg); border-radius: 50%; opacity: .55; }

.scene-bell { background: linear-gradient(180deg, rgba(247,238,216,.42), rgba(217,164,65,.25), rgba(228,71,46,.26)); }
.bell-shrine { grid-column: 2 / 8; height: 42rem; position: relative; }
.roof { position: absolute; left: 5%; right: 5%; top: 7%; height: 4rem; background: var(--vermilion); clip-path: polygon(0 60%, 50% 0, 100% 60%, 94% 100%, 6% 100%); }
.bell { position: absolute; left: 47%; top: 21%; width: 8.5rem; height: 7.2rem; transform: translateX(-50%); background: radial-gradient(circle at 35% 25%, #F7EED8, #D9A441 32%, #8b631c); clip-path: polygon(18% 0, 82% 0, 100% 75%, 85% 100%, 15% 100%, 0 75%); transform-origin: 50% 0; }
.bell b { position: absolute; left: 45%; bottom: -.65rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--ink); }
.bell.rung { animation: bellRing 1.2s ease; }
.rope { position: absolute; left: 50%; top: 34%; width: 3rem; height: 21rem; margin-left: -1.5rem; border: 0; background: repeating-linear-gradient(45deg, #F7EED8 0 .45rem, #D9A441 .45rem .9rem); border-radius: 2rem; cursor: pointer; transform-origin: 50% 0; }
.rope.pulled { animation: ropeSway 1.6s ease; }
.tassel { position: absolute; left: 50%; top: 72%; width: 6rem; height: 5rem; margin-left: -3rem; background: var(--vermilion); clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%); }
.sound-ring { position: absolute; left: 47%; top: 28%; width: 9rem; height: 9rem; border: 1px solid rgba(217,164,65,.5); border-radius: 50%; opacity: 0; transform: translate(-50%,-50%) scale(.3); }
.bell-shrine.ringing .sound-ring { animation: sound 1.5s ease-out; }.bell-shrine.ringing .sr2 { animation-delay: .3s; }
.shide-row { position: absolute; left: 8%; right: 8%; top: 13%; border-top: .35rem solid var(--brass); }
.shide-row i { display: inline-block; width: 2rem; height: 5rem; margin: 1rem 7%; background: var(--cream); clip-path: polygon(0 0, 100% 0, 45% 40%, 100% 40%, 35% 100%, 48% 52%, 0 52%); animation: flutter 2.6s ease-in-out infinite; }

.scene-fortune { background: linear-gradient(180deg, rgba(62,111,88,.7), rgba(62,111,88,.85), rgba(22,33,58,.56)); }
.branch { position: absolute; right: -5%; top: 8%; width: 68vw; height: 38rem; border-top: 1.4rem solid var(--ink); border-radius: 50%; transform: rotate(-10deg); }
.twig { position: absolute; height: .45rem; background: var(--ink); transform-origin: right center; border-radius: 1rem; }
.t1 { width: 17rem; left: 14%; top: 6rem; transform: rotate(35deg); }.t2 { width: 22rem; left: 30%; top: 12rem; transform: rotate(-28deg); }.t3 { width: 15rem; left: 53%; top: 8rem; transform: rotate(42deg); }
.fortune-paper { position: absolute; display: grid; place-items: center; width: 3rem; height: 12rem; background: var(--cream); color: var(--ink); font-family: var(--serif-jp); box-shadow: 0 .8rem 1.5rem rgba(0,0,0,.18); animation: rustle 4s ease-in-out infinite; }
.fp1 { left: 20%; top: 7rem; }.fp2 { left: 38%; top: 15rem; animation-delay: .8s; }.fp3 { left: 61%; top: 10rem; animation-delay: 1.6s; }.fp4 { left: 75%; top: 19rem; animation-delay: 2.2s; }
.fortune-text { font-family: var(--cormorant); font-size: 1.45rem; color: var(--green); }
.fortune-slip.tying { animation: paperFold .9s ease; }
.fox-shadow { position: absolute; right: 10%; bottom: 8%; width: 18rem; height: 7rem; background: rgba(27,23,20,.28); clip-path: polygon(0 70%, 18% 40%, 35% 43%, 46% 20%, 58% 45%, 75% 48%, 100% 0, 82% 76%, 35% 100%); filter: blur(3px); }

.scene-lantern { background: linear-gradient(180deg, rgba(22,33,58,.66), #16213A 45%, #1B1714 100%); }
.lanterns { position: absolute; inset: 0; }
.lantern { position: absolute; width: 7rem; height: 10rem; border-radius: 48% 48% 38% 38%; background: radial-gradient(circle at 50% 58%, rgba(217,164,65,var(--lit,.12)), rgba(242,160,168,.12) 48%, rgba(228,71,46,.75) 50%, #7b1f17 100%); border: .35rem solid var(--vermilion); box-shadow: 0 0 calc(var(--lit, .12) * 5rem) rgba(217,164,65,var(--lit,.12)); transition: --lit .6s ease; animation: lanternFloat 5s ease-in-out infinite; }
.lantern span { position: absolute; left: 50%; top: -4rem; width: 1px; height: 4rem; background: rgba(247,238,216,.35); }
.lantern.lit { --lit: .9; }
.l1 { left: 10%; top: 20%; }.l2 { left: 27%; top: 54%; animation-delay: .9s; }.l3 { right: 22%; top: 18%; animation-delay: 1.8s; }.l4 { right: 8%; top: 58%; animation-delay: 2.4s; }
.incense { position: absolute; width: 8rem; height: 20rem; border-left: 2px solid rgba(247,238,216,.25); border-radius: 50%; filter: blur(1px); animation: smoke 7s ease-in-out infinite; }
.smoke-a { left: 39%; bottom: 10%; }.smoke-b { left: 44%; bottom: 5%; animation-delay: 2s; }

.petal { position: absolute; width: .9rem; height: 1.4rem; border-radius: 90% 10% 80% 20%; background: var(--petal); opacity: .86; transform: translate3d(0,0,0) rotate(0deg); box-shadow: inset -.15rem -.2rem rgba(228,71,46,.18); }

@keyframes flutter { 0%,100% { transform: rotate(2deg) skewX(0deg); } 50% { transform: rotate(-6deg) skewX(8deg); } }
@keyframes ripple { 0% { opacity: .75; transform: translate(-50%,-50%) scale(.25); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(5.4); } }
@keyframes bellRing { 0%,100% { transform: translateX(-50%) rotate(0deg); } 20% { transform: translateX(-50%) rotate(11deg); } 45% { transform: translateX(-50%) rotate(-9deg); } 70% { transform: translateX(-50%) rotate(5deg); } }
@keyframes ropeSway { 0%,100% { transform: rotate(0deg) translateY(0); } 25% { transform: rotate(7deg) translateY(1.4rem); } 55% { transform: rotate(-5deg) translateY(.4rem); } }
@keyframes sound { to { opacity: 0; transform: translate(-50%,-50%) scale(4); } 10% { opacity: .8; } }
@keyframes rustle { 0%,100% { transform: rotate(-2deg); } 50% { transform: rotate(4deg) translateY(.35rem); } }
@keyframes paperFold { 0%,100% { clip-path: polygon(0 0, 96% 0, 100% 7%, 96% 100%, 4% 100%, 0 92%); } 50% { clip-path: polygon(8% 8%, 92% 0, 82% 50%, 100% 100%, 4% 92%, 0 18%); } }
@keyframes lanternFloat { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-.8rem) rotate(1.5deg); } }
@keyframes smoke { 0%,100% { transform: translateX(0) scaleX(1); opacity: .2; } 50% { transform: translateX(2rem) scaleX(1.6); opacity: .45; } }

@media (max-width: 760px) {
  .stone-nav { left: .5rem; top: auto; bottom: .8rem; transform: none; grid-template-columns: repeat(5, 1fr); right: .5rem; }
  .stone { width: auto; font-size: .52rem; }
  .scene { grid-template-columns: 1fr; padding: 6rem 1.1rem; }
  .plaque-opening, .basin-slip, .ema-noon, .fortune-slip, .closing-plaque, .gate-pull, .return-pull, .basin-bowl, .bell-shrine { grid-column: 1; }
  .plaque-opening { margin-top: 25vh; }
  .basin-bowl { height: 22rem; margin-top: 2rem; }
  .bell-shrine { height: 33rem; }
  .branch { width: 95vw; right: -20%; }
  h1 { font-size: 5rem; }
  h2 { font-size: 3.4rem; }
}
