/* ==========================================================================
   The Four Seasons Tea House
   One locked dusk-painting theme. Season attribute retints it.
   Radius system: panels 14px, interactive pills/circles full-round.
   ========================================================================== */

:root {
  --bg0: #0c141b;
  --bg1: #101c24;
  --ink: #f2ecdb;
  --ink-dim: rgba(233, 226, 207, 0.6);
  --amber: #e2a95e;
  --amber-bright: #f4d9a8;
  --vermilion: #b3452e;

  --paper: #efe6cf;
  --paper-ink: #33291f;
  --paper-ink-dim: #75644d;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --serif: 'Cormorant Garamond', 'Georgia', serif;
  --sans: 'Inter', 'Segoe UI', sans-serif;
  --jp: 'Yu Mincho', 'YuMincho', 'Hiragino Mincho ProN', 'Noto Serif JP', serif;
}

/* Season tints: sky, mountains, moon */
html[data-season="summer"] {
  --sky-top: #0e1a28; --sky-mid: #16323a; --sky-low: #2a5049;
  --m-far: #30504f; --m-mid: #203c3e; --m-near: #12242a;
  --moon: #f2e8c9;
}
html[data-season="spring"] {
  --sky-top: #191527; --sky-mid: #3a2c3e; --sky-low: #6d4a55;
  --m-far: #5a4453; --m-mid: #3d2f41; --m-near: #221b29;
  --moon: #f5e9d6;
}
html[data-season="autumn"] {
  --sky-top: #16111b; --sky-mid: #3a2430; --sky-low: #6b3d34;
  --m-far: #5c3a33; --m-mid: #3d2626; --m-near: #201417;
  --moon: #f2e3c2;
}
html[data-season="winter"] {
  --sky-top: #0c1220; --sky-mid: #1c2c40; --sky-low: #3a5068;
  --m-far: #45596e; --m-mid: #2c3c50; --m-near: #16202e;
  --moon: #f4f0e4;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg0);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  overflow-x: hidden;
}

::selection { background: rgba(226, 169, 94, 0.35); }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Paper grain over everything */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* ==================== HERO ==================== */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
}

.hero-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(
    to bottom,
    var(--sky-top) 0%,
    var(--sky-mid) 52%,
    var(--sky-low) 78%,
    var(--bg1) 100%
  );
  transition: background 1.6s ease;
}

.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene path, .scene ellipse, .scene rect, .scene circle {
  transition: fill 1.6s ease;
}

.moon-disc { fill: var(--moon); opacity: 0.95; }
.moon-crater { fill: rgba(190, 178, 148, 0.35); }
.stars circle { fill: rgba(233, 226, 207, 0.75); }
.m-far  { fill: var(--m-far);  opacity: 0.55; }
.m-mid  { fill: var(--m-mid);  opacity: 0.88; }
.m-near { fill: var(--m-near); }
.mistband { fill: rgba(233, 226, 207, 0.05); }
.pines path { fill: #0c1a1c; stroke: #0c1a1c; stroke-width: 3; }

.pondg .pond-rim { stroke: rgba(233, 226, 207, 0.1); stroke-width: 2; }
.pondg .moon-refl { fill: rgba(242, 232, 201, 0.24); }
.pondg .water-ripple { stroke: rgba(233, 226, 207, 0.1); stroke-width: 2; stroke-linecap: round; }
.pondg .koi-hint { fill: rgba(201, 111, 58, 0.55); }
.pondg .koi-hint-pale { fill: rgba(232, 226, 210, 0.4); }
.pondg .lilypad { fill: rgba(21, 48, 39, 0.95); stroke: rgba(233, 226, 207, 0.07); }
.pondg .reed { stroke: #12271f; stroke-width: 3; stroke-linecap: round; }
.pondg .reed-head { fill: #1d3226; }

.teahouse .th-body   { fill: #101b21; }
.teahouse .th-roof   { fill: #060c10; }
.teahouse .th-roof2  { fill: #081015; }
.teahouse .th-ridge  { fill: #05090c; }
.teahouse .th-eaveshadow { fill: rgba(3, 7, 10, 0.75); }
.teahouse .th-stone  { fill: #1a2530; }
.teahouse .th-deck   { fill: #241d15; }
.teahouse .th-post   { fill: #1c160f; }
.teahouse .th-window { fill: var(--amber); }
.teahouse .th-window-core { fill: var(--amber-bright); opacity: 0.92; }
.teahouse .th-muntin line { stroke: #4a3416; stroke-width: 2.4; }
.teahouse .th-string { stroke: rgba(3, 7, 10, 0.9); stroke-width: 2; }
.teahouse .th-lantern { fill: var(--amber); opacity: 0.55; }
.teahouse .th-lantern-core { fill: var(--amber-bright); }
.teahouse .th-lantern-ring { stroke: rgba(58, 38, 14, 0.85); stroke-width: 1.6; }
.teahouse .th-smoke { stroke: rgba(233, 226, 207, 0.13); stroke-width: 8; stroke-linecap: round; }

.bamboo .stalk rect { fill: #16352a; opacity: 0.82; }
.bamboo .stalk.s2 rect { fill: #123024; opacity: 0.7; }
.bamboo .stalk.s3 rect { fill: #0f2a20; opacity: 0.6; }
.bamboo .node { fill: #0c211a !important; }
.bamboo .leaves path { fill: #16352a; opacity: 0.75; }

@media (prefers-reduced-motion: no-preference) {
  .stars circle { animation: twinkle 5s ease-in-out infinite alternate; }
  .stars circle:nth-child(2n) { animation-delay: 1.6s; }
  .stars circle:nth-child(3n) { animation-delay: 3.1s; }
  .teahouse .th-window-core,
  .teahouse .th-lantern-core { animation: lampFlicker 7s ease-in-out infinite; }
}
@keyframes twinkle { from { opacity: 0.35; } to { opacity: 0.95; } }
@keyframes lampFlicker {
  0%, 100% { opacity: 0.95; }
  48%      { opacity: 0.78; }
  52%      { opacity: 0.9; }
  74%      { opacity: 0.82; }
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.94;
}

#hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 52% at 16% 86%, rgba(8, 14, 19, 0.68), transparent 72%),
    linear-gradient(to top, var(--bg0) 0%, rgba(12, 20, 27, 0.45) 14%, transparent 40%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 0 clamp(1.4rem, 7vw, 7rem) clamp(4rem, 11vh, 7.5rem);
  max-width: 780px;
}

.kanji-mark {
  font-family: var(--jp);
  color: var(--amber);
  font-size: 0.95rem;
  letter-spacing: 0.55em;
  margin-bottom: 1.1rem;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3rem, 8vw, 5.4rem);
  line-height: 1.04;
  letter-spacing: 0.01em;
  margin-bottom: 1.1rem;
  text-wrap: balance;
  text-shadow: 0 2px 34px rgba(4, 8, 12, 0.65);
}

.hero-sub {
  font-style: italic;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  color: var(--ink-dim);
  margin-bottom: 2.2rem;
}

.cta {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--amber);
  text-decoration: none;
  border: 1px solid rgba(226, 169, 94, 0.55);
  border-radius: 999px;
  padding: 0.85rem 1.9rem;
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
              border-color 0.35s var(--ease), transform 0.2s var(--ease);
}
.cta:hover {
  background: var(--amber);
  border-color: var(--amber);
  color: #241a0e;
}
.cta:active { transform: translateY(1px); }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * {
    opacity: 0;
    animation: riseIn 1.1s var(--ease) forwards;
  }
  .hero-copy > *:nth-child(2) { animation-delay: 0.15s; }
  .hero-copy > *:nth-child(3) { animation-delay: 0.3s; }
  .hero-copy > *:nth-child(4) { animation-delay: 0.45s; }
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

/* ==================== SCROLL REVEAL ==================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ==================== TODAY'S STORY ==================== */

.story-section {
  position: relative;
  background: linear-gradient(to bottom, var(--bg0), var(--bg1) 60%, var(--bg0));
  padding: clamp(5.5rem, 12vh, 9rem) 1.4rem;
}

.washi {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 252, 240, 0.5), transparent 60%),
    repeating-linear-gradient(93deg, rgba(117, 100, 77, 0.045) 0 2px, transparent 2px 7px),
    var(--paper);
  color: var(--paper-ink);
  border-radius: 14px;
  padding: clamp(2.4rem, 6vw, 3.8rem);
  box-shadow:
    0 30px 80px rgba(4, 10, 14, 0.55),
    0 4px 18px rgba(4, 10, 14, 0.35);
  transform: rotate(-0.4deg);
}

.seal {
  position: absolute;
  top: clamp(1.4rem, 4vw, 2.2rem);
  right: clamp(1.4rem, 4vw, 2.2rem);
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--vermilion);
  color: var(--paper);
  font-family: var(--jp);
  font-size: 1.7rem;
  display: grid;
  place-items: center;
  transform: rotate(4deg);
  box-shadow: inset 0 0 0 2px rgba(239, 230, 207, 0.35);
  user-select: none;
}

.story-date {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--paper-ink-dim);
  margin-bottom: 1rem;
}

.story-title {
  font-weight: 600;
  font-size: clamp(1.9rem, 4.5vw, 2.5rem);
  line-height: 1.12;
  margin-bottom: 1.6rem;
  max-width: 14ch;
}

.story-body p {
  font-size: 1.22rem;
  font-weight: 500;
  line-height: 1.78;
  max-width: 58ch;
}
.story-body p + p { margin-top: 1.15em; }

.story-body .reveal { transform: translateY(12px); }

.keeper-sign {
  margin-top: 2.4rem;
  font-style: italic;
  color: var(--paper-ink-dim);
  font-size: 1.05rem;
}
.keeper-sign::before {
  content: "";
  display: block;
  width: 44px;
  height: 1px;
  background: var(--paper-ink-dim);
  opacity: 0.5;
  margin-bottom: 1rem;
}

.vignette {
  max-width: 390px;
  margin: 3.2rem auto 0;
}
.vignette img {
  width: 100%;
  display: block;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(4, 10, 14, 0.5);
}
.vignette figcaption {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.78rem;
  color: var(--ink-dim);
  text-align: center;
  margin-top: 0.8rem;
  letter-spacing: 0.04em;
}

.steep-note {
  text-align: center;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  margin-top: 3rem;
}

/* ==================== KOI POND ==================== */

.pond-section {
  position: relative;
  height: clamp(420px, 72vh, 660px);
  background: #0a161a;
}

/* soften the seams where the pond meets its neighbors */
.pond-section::before,
.pond-section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 130px;
  pointer-events: none;
  z-index: 1;
}
.pond-section::before { top: 0; background: linear-gradient(to bottom, var(--bg0), transparent); }
.pond-section::after  { bottom: 0; background: linear-gradient(to top, var(--bg0), transparent); }

#pond {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}

.pond-note {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: rgba(233, 226, 207, 0.55);
  pointer-events: none;
  white-space: nowrap;
}
.pond-note.visible { transform: translateX(-50%); }

/* ==================== FOUR SEASONS ==================== */

.seasons-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(5.5rem, 12vh, 9rem) clamp(1.4rem, 4vw, 2.5rem);
}

.seasons-title {
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  max-width: 16ch;
  line-height: 1.15;
  margin-bottom: clamp(2.2rem, 5vw, 3.4rem);
  text-wrap: balance;
}

.season-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.1rem;
}

.season-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  min-height: 270px;
  padding: 1.7rem 1.8rem;
  border: 1px solid rgba(233, 226, 207, 0.12);
  border-radius: 14px;
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease),
              box-shadow 0.45s var(--ease);
}
.season-card:nth-child(1) { grid-column: span 5; }
.season-card:nth-child(2) { grid-column: span 7; }
.season-card:nth-child(3) { grid-column: span 7; }
.season-card:nth-child(4) { grid-column: span 5; }

.season-card:hover {
  transform: translateY(-4px);
  border-color: rgba(226, 169, 94, 0.45);
  box-shadow: 0 22px 50px rgba(4, 10, 14, 0.45);
}
.season-card:active { transform: translateY(-1px) scale(0.995); }

.season-card.spring {
  background:
    radial-gradient(90% 120% at 85% 10%, rgba(211, 141, 155, 0.28), transparent 55%),
    linear-gradient(135deg, #322338, #55404e);
}
.season-card.summer {
  background:
    radial-gradient(80% 110% at 80% 90%, rgba(226, 169, 94, 0.2), transparent 55%),
    linear-gradient(135deg, #142e33, #245247);
}
.season-card.autumn {
  background:
    radial-gradient(90% 120% at 20% 10%, rgba(214, 140, 80, 0.26), transparent 55%),
    linear-gradient(135deg, #33201d, #6b3d34);
}
.season-card.winter {
  background:
    radial-gradient(90% 120% at 80% 15%, rgba(206, 224, 240, 0.16), transparent 55%),
    linear-gradient(135deg, #17232e, #3a5068);
}

.season-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: opacity 0.6s var(--ease), transform 0.9s var(--ease);
}
.season-card:hover img { opacity: 0.7; transform: scale(1.035); }

/* keeps the labels readable over the painting */
.season-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(9, 15, 20, 0.62) 0%, transparent 45%),
    linear-gradient(to top, rgba(9, 15, 20, 0.82) 0%, rgba(9, 15, 20, 0.35) 45%, transparent 70%);
  pointer-events: none;
}

.season-card > span { position: relative; z-index: 1; }

.sc-kanji {
  position: absolute !important;
  top: 0.6rem;
  right: 1.1rem;
  font-family: var(--jp);
  font-size: 4.4rem;
  line-height: 1;
  color: rgba(242, 236, 219, 0.28);
  text-shadow: 0 2px 18px rgba(4, 8, 12, 0.6);
  pointer-events: none;
  z-index: 1;
}

.sc-name {
  font-weight: 600;
  font-size: 1.65rem;
  margin-bottom: 0.5rem;
}

.sc-line {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 30ch;
}

.sc-hint {
  margin-top: auto;
  padding-top: 1.6rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  color: var(--amber);
}
.sc-hint::after {
  content: "";
  display: block;
  width: 0;
  height: 1px;
  background: var(--amber);
  transition: width 0.45s var(--ease);
  margin-top: 4px;
}
.season-card:hover .sc-hint::after { width: 100%; }

/* ==================== FOOTER ==================== */

.site-footer {
  padding: 4.5rem 1.4rem 5.5rem;
  text-align: center;
  background: linear-gradient(to bottom, var(--bg0), #090f15);
}

.footer-kanji {
  font-family: var(--jp);
  color: var(--amber);
  letter-spacing: 0.5em;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.footer-line {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.8rem;
  color: var(--ink-dim);
  letter-spacing: 0.05em;
}

/* ==================== SOUND TOGGLE ==================== */

#sound-toggle {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 70;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 1px solid rgba(233, 226, 207, 0.28);
  background: rgba(13, 22, 29, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ink-dim);
  font-family: var(--jp);
  font-size: 1.35rem;
  cursor: pointer;
  transition: color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease,
              transform 0.2s var(--ease);
}
#sound-toggle:hover { color: var(--ink); }
#sound-toggle:active { transform: scale(0.94); }
#sound-toggle[aria-pressed="true"] {
  color: var(--amber);
  border-color: rgba(226, 169, 94, 0.6);
  box-shadow: 0 0 0 1px rgba(226, 169, 94, 0.15), 0 8px 24px rgba(4, 10, 14, 0.5);
}

/* ==================== INTERLUDES (the walk between rooms) ==================== */

.interlude {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.interlude-path     { background: linear-gradient(to bottom, var(--bg0), #12242b 50%, var(--bg0)); }
.interlude-lanterns { background: linear-gradient(to bottom, var(--bg0), #152430 50%, var(--bg0)); }

.par { position: absolute; inset: 0; pointer-events: none; }

.par-photo img {
  width: 100%;
  height: 116%;
  object-fit: cover;
  opacity: 0.82;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
}

.par-mist {
  background:
    radial-gradient(70% 40% at 30% 65%, rgba(233, 226, 207, 0.05), transparent 70%),
    radial-gradient(60% 35% at 75% 40%, rgba(233, 226, 207, 0.04), transparent 70%);
}

.par-glow i {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--amber-bright);
  box-shadow: 0 0 22px 6px rgba(226, 169, 94, 0.4);
  opacity: 0.5;
}
.par-glow i:nth-child(1) { left: 12%; top: 30%; transform: scale(0.7); }
.par-glow i:nth-child(2) { left: 78%; top: 22%; }
.par-glow i:nth-child(3) { left: 64%; top: 68%; transform: scale(0.55); }
.par-glow i:nth-child(4) { left: 28%; top: 76%; transform: scale(0.8); }
.par-glow i:nth-child(5) { left: 88%; top: 55%; transform: scale(0.6); }
.par-glow-many i:nth-child(6) { left: 42%; top: 18%; transform: scale(0.5); }
.par-glow-many i:nth-child(7) { left: 8%; top: 58%; transform: scale(0.9); }

@media (prefers-reduced-motion: no-preference) {
  .par-glow i { animation: glowFloat 11s ease-in-out infinite alternate; }
  .par-glow i:nth-child(2n) { animation-duration: 14s; animation-delay: -5s; }
  .par-glow i:nth-child(3n) { animation-duration: 17s; animation-delay: -9s; }
}
@keyframes glowFloat {
  from { translate: 0 14px; opacity: 0.32; }
  to   { translate: 0 -14px; opacity: 0.62; }
}

.haiku {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1.4rem;
}
.haiku p {
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.5;
  color: var(--ink);
  text-shadow: 0 2px 26px rgba(4, 8, 12, 0.75);
  margin: 0.5rem 0;
}

/* scroll-driven drift, only where the browser understands it */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .par-photo img {
      animation: parDrift linear both;
      animation-timeline: view();
    }
    .par-mist {
      animation: mistDrift linear both;
      animation-timeline: view();
    }
    .hero-copy {
      animation: heroLift linear both;
      animation-timeline: view();
      animation-range: exit 0% exit 90%;
    }
  }
}
@keyframes parDrift {
  from { transform: translateY(-7%); }
  to   { transform: translateY(2%); }
}
@keyframes mistDrift {
  from { transform: translateY(28px); }
  to   { transform: translateY(-28px); }
}
@keyframes heroLift {
  to { opacity: 0; transform: translateY(-46px); }
}

/* ==================== TONIGHT ON THE MOUNTAIN (daily weather) ==================== */

.weather {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(to bottom, var(--bg0), #0e1e26 50%, var(--bg0));
}

.wx {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
}
html[data-weather="rainy"] .wx-rain,
html[data-weather="misty"] .wx-mist,
html[data-weather="windy"] .wx-wind,
html[data-weather="clear"] .wx-clear { opacity: 1; }

.wx-rain i {
  position: absolute;
  inset: -60px 0;
  background: repeating-linear-gradient(103deg,
    transparent 0 17px, rgba(233, 226, 207, 0.06) 17px 18px, transparent 18px 29px);
}
.wx-rain i:nth-child(2) {
  background: repeating-linear-gradient(100deg,
    transparent 0 31px, rgba(233, 226, 207, 0.04) 31px 32px, transparent 32px 46px);
}

.wx-mist::before, .wx-mist::after {
  content: "";
  position: absolute;
  width: 90%;
  height: 34%;
  border-radius: 999px;
  background: rgba(233, 226, 207, 0.05);
  filter: blur(46px);
}
.wx-mist::before { left: -6%; top: 24%; }
.wx-mist::after  { right: -8%; top: 55%; }

.wx-wind {
  background: repeating-linear-gradient(171deg,
    transparent 0 90px, rgba(233, 226, 207, 0.045) 90px 92px, transparent 92px 210px);
}

.wx-clear {
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(233,226,207,.8), transparent 60%),
    radial-gradient(1.2px 1.2px at 28% 64%, rgba(233,226,207,.7), transparent 60%),
    radial-gradient(1.6px 1.6px at 41% 18%, rgba(233,226,207,.8), transparent 60%),
    radial-gradient(1.1px 1.1px at 55% 48%, rgba(233,226,207,.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 68% 26%, rgba(233,226,207,.8), transparent 60%),
    radial-gradient(1.2px 1.2px at 79% 60%, rgba(233,226,207,.7), transparent 60%),
    radial-gradient(1.7px 1.7px at 90% 20%, rgba(233,226,207,.85), transparent 60%),
    radial-gradient(1.1px 1.1px at 18% 44%, rgba(233,226,207,.6), transparent 60%);
}

@media (prefers-reduced-motion: no-preference) {
  .wx-rain i { animation: rainShift 0.9s linear infinite; }
  .wx-rain i:nth-child(2) { animation: rainShiftSlow 1.4s linear infinite; }
  .wx-mist::before { animation: mistSlide 44s ease-in-out infinite alternate; }
  .wx-mist::after  { animation: mistSlide 52s ease-in-out infinite alternate-reverse; }
  .wx-wind { animation: windSweep 9s ease-in-out infinite alternate; }
  .wx-clear { animation: twinkle 5s ease-in-out infinite alternate; }
}
@keyframes rainShift     { to { transform: translateY(30px); } }
@keyframes rainShiftSlow { to { transform: translateY(47px); } }
@keyframes mistSlide     { from { transform: translateX(-5%); } to { transform: translateX(5%); } }
@keyframes windSweep     { from { transform: translateX(-2.5%); } to { transform: translateX(2.5%); } }

.wx-copy {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1.4rem;
  max-width: 640px;
}
.wx-head {
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  color: var(--ink);
  text-shadow: 0 2px 24px rgba(4, 8, 12, 0.7);
}
.wx-note {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-dim);
  margin-top: 1.1rem;
  max-width: 46ch;
  margin-left: auto;
  margin-right: auto;
}

/* ==================== THE LONG STORY (serial) ==================== */

.serial {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(6rem, 14vh, 10rem) clamp(1.4rem, 4vw, 2.5rem);
}

.serial-title {
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  margin-bottom: 0.8rem;
}

.serial-sub {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-dim);
  max-width: 56ch;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.serial-book {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  background: linear-gradient(160deg, #111c25, #0d161e);
  border: 1px solid rgba(226, 169, 94, 0.16);
  border-radius: 14px;
  overflow: hidden;
}

.chapter-list {
  display: flex;
  flex-direction: column;
  padding: 1.4rem 0;
  border-right: 1px solid rgba(233, 226, 207, 0.08);
  max-height: 640px;
  overflow-y: auto;
}

.ch-item {
  background: none;
  border: none;
  border-left: 2px solid transparent;
  text-align: left;
  font-family: var(--serif);
  font-size: 0.98rem;
  color: var(--ink-dim);
  padding: 0.55rem 1.3rem;
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease;
  line-height: 1.4;
}
.ch-item:hover { color: var(--ink); }
.ch-item.active { color: var(--amber); border-left-color: var(--amber); }
.ch-item.locked {
  color: rgba(233, 226, 207, 0.28);
  font-style: italic;
  cursor: default;
}

.chapter { padding: clamp(1.8rem, 4vw, 3rem); }

.chapter-no {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  margin-bottom: 0.7rem;
}

.chapter-title {
  font-weight: 600;
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  margin-bottom: 1.4rem;
}

.chapter-body p {
  font-size: 1.16rem;
  line-height: 1.8;
  color: rgba(242, 236, 219, 0.88);
  max-width: 60ch;
}
.chapter-body p + p { margin-top: 1.1em; }
.chapter-body p:first-child::first-letter {
  float: left;
  font-size: 3em;
  line-height: 0.82;
  padding: 0.06em 0.14em 0 0;
  font-weight: 600;
  color: var(--amber);
}

.chapter-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2.2rem;
}
.ch-btn {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--amber);
  background: none;
  border: 1px solid rgba(226, 169, 94, 0.4);
  border-radius: 999px;
  padding: 0.6rem 1.5rem;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}
.ch-btn:hover:not(:disabled) { background: var(--amber); color: #241a0e; }
.ch-btn:disabled { opacity: 0.25; cursor: default; }

/* ==================== THE GARDEN WALK ==================== */

.garden {
  padding: clamp(6rem, 14vh, 10rem) 0;
  overflow: hidden;
}

.garden-title {
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  max-width: 1080px;
  margin: 0 auto clamp(2.2rem, 5vw, 3.4rem);
  padding: 0 clamp(1.4rem, 4vw, 2.5rem);
}

.garden-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(400px, 80vw);
  gap: 1.4rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 0 clamp(1.4rem, 6vw, 5rem) 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(226, 169, 94, 0.3) transparent;
}

.garden-stop {
  scroll-snap-align: center;
  margin: 0;
}

.gs-img {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(233, 226, 207, 0.1);
}
.gs-basin { background: linear-gradient(150deg, #14302c, #23514a); }
.gs-gate  { background: linear-gradient(150deg, #241c28, #4a3a4a); }
.gs-maple { background: linear-gradient(150deg, #33201d, #64392f); }
.gs-plum  { background: linear-gradient(150deg, #1a2836, #3a5068); }

.gs-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gs-kanji {
  position: absolute;
  right: 0.9rem;
  bottom: 0.5rem;
  font-family: var(--jp);
  font-size: 3rem;
  color: rgba(242, 236, 219, 0.4);
  text-shadow: 0 2px 14px rgba(4, 8, 12, 0.6);
}

.garden-stop h3 {
  font-weight: 600;
  font-size: 1.35rem;
  margin: 1.1rem 0 0.5rem;
}

.garden-stop p {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-dim);
}

/* ==================== THE MOON TONIGHT ==================== */

.moon-sky {
  min-height: 68vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.4rem;
  background:
    radial-gradient(1.4px 1.4px at 18% 30%, rgba(233,226,207,.7), transparent 60%),
    radial-gradient(1.2px 1.2px at 76% 24%, rgba(233,226,207,.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 60% 70%, rgba(233,226,207,.65), transparent 60%),
    radial-gradient(1.1px 1.1px at 34% 74%, rgba(233,226,207,.5), transparent 60%),
    linear-gradient(to bottom, var(--bg0), #0b1522 55%, var(--bg0));
}

.moon-vis {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(242, 232, 201, 0.18);
  margin-bottom: 2rem;
}
.moon-face {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: radial-gradient(circle at 38% 36%, #f6efdb, #e2d5ae 75%);
}
.moon-dark {
  position: absolute;
  inset: -4%;
  border-radius: 999px;
  background: #0b131b;
}

.moon-name {
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  color: var(--ink);
}
.moon-note {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-dim);
  max-width: 46ch;
  margin-top: 1rem;
}

.almanac-title-second { margin-top: 3.5rem; }

/* ==================== KEEPER'S ALMANAC ==================== */

.almanac {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(5rem, 12vh, 8rem) 1.6rem;
}
.almanac-title {
  font-weight: 500;
  font-size: clamp(1.7rem, 3.6vw, 2.2rem);
  margin-bottom: 2.2rem;
}
.almanac-lines p {
  font-size: 1.18rem;
  font-style: italic;
  line-height: 1.8;
  color: var(--ink-dim);
  padding: 0.9rem 0;
}
.almanac-lines p + p { border-top: 1px solid rgba(233, 226, 207, 0.08); }

/* ==================== TEA OF THE DAY + SECOND CUP ==================== */

.tea-of-day {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  line-height: 1.6;
  color: var(--paper-ink-dim);
  margin: -0.4rem 0 1.4rem;
}
.tea-of-day span[lang="ja"] { color: var(--vermilion); font-family: var(--jp); }

.second-cup {
  max-width: 680px;
  margin: 3.2rem auto 0;
  text-align: center;
}
.cta-ghost { background: transparent; }
.washi-second {
  margin-top: 2.6rem;
  text-align: left;
  transform: rotate(0.35deg);
}
.seal-small { width: 44px; height: 44px; font-size: 1.3rem; }
.story-title-small { font-size: clamp(1.5rem, 3.2vw, 2rem); font-weight: 600; margin-bottom: 1.4rem; }

/* ==================== STEEP TIMER RITUAL ==================== */

.steep {
  position: relative;
  width: 170px;
  height: 170px;
  display: grid;
  place-items: center;
}
.steep-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: conic-gradient(var(--amber) calc(var(--p, 0) * 1%), rgba(233, 226, 207, 0.12) 0);
  -webkit-mask: radial-gradient(circle, transparent 61%, #000 62.5%);
  mask: radial-gradient(circle, transparent 61%, #000 62.5%);
}
.steep-btn {
  width: 134px;
  height: 134px;
  border-radius: 999px;
  border: 1px solid rgba(233, 226, 207, 0.3);
  background: rgba(13, 22, 29, 0.6);
  color: var(--ink);
  font-family: var(--serif);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  cursor: pointer;
  transition: border-color 0.4s ease, transform 0.2s var(--ease);
}
.steep-btn:hover { border-color: rgba(226, 169, 94, 0.55); }
.steep-btn:active { transform: scale(0.96); }
.steep-label { font-style: italic; font-size: 0.95rem; color: var(--ink-dim); }
.steep-time {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.45rem;
  letter-spacing: 0.06em;
}

/* ==================== READING COMFORT ==================== */

.washi { max-width: 680px; }

.story-body p:first-child::first-letter {
  float: left;
  font-size: 3.1em;
  line-height: 0.82;
  padding: 0.06em 0.14em 0 0;
  font-weight: 600;
  color: var(--vermilion);
}

.story-body .reveal {
  filter: blur(7px);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease), filter 1.2s var(--ease);
  transition-delay: var(--d, 0s);
}
.story-body .reveal.visible { filter: blur(0); }

/* ==================== ENSO DIVIDER ==================== */

.enso {
  width: 86px;
  margin: 0 0 2.4rem;
}
.enso svg { width: 100%; display: block; }
.enso path {
  stroke: rgba(233, 226, 207, 0.45);
  stroke-width: 5.5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .enso path {
      animation: ensoDraw linear both;
      animation-timeline: view();
      animation-range: entry 20% entry 90%;
    }
  }
}
@keyframes ensoDraw {
  from { stroke-dashoffset: 1; }
  to   { stroke-dashoffset: 0; }
}

/* ==================== SMALL RITUALS ==================== */

.rituals {
  max-width: 1020px;
  margin: 0 auto;
  padding: clamp(6rem, 14vh, 10rem) clamp(1.4rem, 4vw, 2.5rem);
}

.rituals-title {
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.ritual-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
}

.ritual {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.ritual-note {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-dim);
  max-width: 30ch;
  margin-top: 1.8rem;
}

/* the breathing lantern */
.breath {
  position: relative;
  width: 170px;
  height: 170px;
  display: grid;
  place-items: center;
}
.breath-core {
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(244, 217, 168, 0.85), rgba(226, 169, 94, 0.25) 60%, transparent 75%);
}
.breath-ring {
  position: absolute;
  inset: 12px;
  border-radius: 999px;
  border: 1px solid rgba(226, 169, 94, 0.4);
}
.breath-words {
  position: relative;
  height: 1.6em;
  width: 100%;
  margin-top: 0.8rem;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-dim);
}
.breath-words span {
  position: absolute;
  inset: 0;
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .breath-core { animation: breathe 12s ease-in-out infinite; }
  .breath-ring { animation: breatheRing 12s ease-in-out infinite; }
  .breath-words span:nth-child(1) { animation: bw1 12s infinite; }
  .breath-words span:nth-child(2) { animation: bw2 12s infinite; }
  .breath-words span:nth-child(3) { animation: bw3 12s infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .breath-words span { position: static; opacity: 1; display: inline-block; margin: 0 0.5em; }
}
@keyframes breathe {
  0%   { transform: scale(0.72); }
  33%  { transform: scale(1.18); }   /* in, 4s */
  50%  { transform: scale(1.18); }   /* hold, 2s */
  100% { transform: scale(0.72); }   /* out, 6s */
}
@keyframes breatheRing {
  0%   { transform: scale(0.86); opacity: 0.45; }
  33%  { transform: scale(1.06); opacity: 0.9; }
  50%  { transform: scale(1.06); opacity: 0.9; }
  100% { transform: scale(0.86); opacity: 0.45; }
}
@keyframes bw1 { 0% { opacity: 0; } 4% { opacity: 1; } 30% { opacity: 1; } 36% { opacity: 0; } 100% { opacity: 0; } }
@keyframes bw2 { 0%, 33% { opacity: 0; } 38% { opacity: 1; } 47% { opacity: 1; } 53% { opacity: 0; } 100% { opacity: 0; } }
@keyframes bw3 { 0%, 52% { opacity: 0; } 58% { opacity: 1; } 92% { opacity: 1; } 100% { opacity: 0; } }

/* the chime you can ring */
.chime-btn {
  position: relative;
  width: 108px;
  height: 108px;
  border-radius: 999px;
  border: 1px solid rgba(233, 226, 207, 0.3);
  background: rgba(13, 22, 29, 0.6);
  color: var(--ink);
  font-family: var(--jp);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.4s ease, border-color 0.4s ease, transform 0.2s var(--ease);
  margin-top: 26px;
}
.chime-btn:hover { color: var(--amber); border-color: rgba(226, 169, 94, 0.55); }
.chime-btn:active { transform: scale(0.95); }
.chime-btn::before,
.chime-btn::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 999px;
  border: 1px solid rgba(226, 169, 94, 0.7);
  opacity: 0;
  pointer-events: none;
}
.chime-btn.ringing::before { animation: ringOut 2.6s var(--ease); }
.chime-btn.ringing::after  { animation: ringOut 2.6s var(--ease) 0.4s; }
.chime-btn.ringing span    { animation: bellRock 2.6s var(--ease); display: inline-block; }
@keyframes ringOut {
  0%   { opacity: 0.55; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.4); }
}
@keyframes bellRock {
  0% { rotate: 0deg; } 12% { rotate: -9deg; } 28% { rotate: 7deg; }
  46% { rotate: -4deg; } 64% { rotate: 2deg; } 100% { rotate: 0deg; }
}

/* ==================== NIGHTFALL ==================== */

.night-close {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(to bottom, var(--bg0), #0a1420 55%, #080e15);
}

.night-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
}

.night-stars i {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 999px;
  background: rgba(233, 226, 207, 0.8);
}
.night-stars i:nth-child(1)  { left: 8%;  top: 18%; }
.night-stars i:nth-child(2)  { left: 22%; top: 34%; }
.night-stars i:nth-child(3)  { left: 31%; top: 12%; }
.night-stars i:nth-child(4)  { left: 44%; top: 28%; }
.night-stars i:nth-child(5)  { left: 57%; top: 15%; }
.night-stars i:nth-child(6)  { left: 66%; top: 38%; }
.night-stars i:nth-child(7)  { left: 74%; top: 20%; }
.night-stars i:nth-child(8)  { left: 85%; top: 30%; }
.night-stars i:nth-child(9)  { left: 92%; top: 14%; }
.night-stars i:nth-child(10) { left: 15%; top: 56%; }
.night-stars i:nth-child(11) { left: 50%; top: 60%; }
.night-stars i:nth-child(12) { left: 80%; top: 58%; }
@media (prefers-reduced-motion: no-preference) {
  .night-stars i { animation: twinkle 6s ease-in-out infinite alternate; }
  .night-stars i:nth-child(2n) { animation-delay: 2.2s; }
  .night-stars i:nth-child(3n) { animation-delay: 4.1s; }
}

.night-scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 50% 55%, rgba(6, 10, 15, 0.5), transparent 75%);
}

.night-words { position: relative; z-index: 1; }

/* ==================== MOON SCROLL PROGRESS ==================== */

.moon-progress {
  position: fixed;
  top: 1.4rem;
  right: 1.4rem;
  z-index: 70;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(233, 226, 207, 0.25);
  background: radial-gradient(circle at 38% 36%, #f6efdb, #e8ddba 70%);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  opacity: 0.9;
  transition: box-shadow 0.4s ease, opacity 0.4s ease;
}
.moon-progress:hover {
  opacity: 1;
  box-shadow: 0 0 24px rgba(242, 232, 201, 0.35);
}
.mp-shadow {
  position: absolute;
  inset: -2px;
  background: #0d161d;
  border-radius: 999px;
  transform: translateX(0);
}
/* the moon waxes as you travel down the page */
@supports (animation-timeline: scroll()) {
  .mp-shadow {
    animation: moonWax linear both;
    animation-timeline: scroll(root);
  }
}
@supports not (animation-timeline: scroll()) {
  .mp-shadow { display: none; }
}
@keyframes moonWax {
  from { transform: translateX(-18%) scale(1); }
  to   { transform: translateX(105%) scale(1); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-photo { animation: kenBurns 48s ease-in-out infinite alternate; }
}
@keyframes kenBurns {
  from { transform: scale(1) translateY(0); }
  to   { transform: scale(1.07) translateY(-1.2%); }
}

@media (prefers-reduced-motion: reduce) {
  .mp-shadow { display: none; }
  .par-photo img, .par-mist, .hero-copy, .enso path { animation: none !important; }
}

/* ==================== MOBILE ==================== */

@media (max-width: 640px) {
  /* keep the tea house and moon in frame when the viewport is narrow */
  .scene { width: 150%; left: auto; right: -4%; }
}

@media (max-width: 820px) {
  .season-grid { grid-template-columns: 1fr; }
  .season-card:nth-child(n) { grid-column: auto; min-height: 210px; }
  .washi { transform: none; }
  .seal { width: 48px; height: 48px; font-size: 1.4rem; }
  .pond-section { height: 58vh; }
  .ritual-grid { grid-template-columns: 1fr; }
  .interlude { min-height: 66vh; }
  .moon-progress { width: 34px; height: 34px; top: 1rem; right: 1rem; }
  .serial-book { grid-template-columns: 1fr; }
  .chapter-list {
    flex-direction: row;
    overflow-x: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid rgba(233, 226, 207, 0.08);
    padding: 0.8rem;
    gap: 0.3rem;
  }
  .ch-item { border-left: none; border-bottom: 2px solid transparent; white-space: nowrap; }
  .ch-item.active { border-bottom-color: var(--amber); }
}
