/* KANSO — washi, sumi, one vermilion seal */
:root {
  --washi: #fafaf7;
  --sumi: #1a1a18;
  --shu: #d93a2b;
  --stone: #8e8e88;
  --hinoki: #efe9db;
  --mincho: "Shippori Mincho", "Yu Mincho", serif;
  --kaku: "Zen Kaku Gothic New", "Yu Gothic", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--washi);
  color: var(--sumi);
  font-family: var(--kaku);
  font-weight: 300;
  line-height: 1.9;
  letter-spacing: 0.02em;
  overflow-x: hidden;
}

::selection { background: var(--shu); color: var(--washi); }

a { color: inherit; text-decoration: none; }
a:focus-visible {
  outline: 1px solid var(--shu);
  outline-offset: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.6rem 3rem;
  background: linear-gradient(to bottom, rgba(250,250,247,0.95), rgba(250,250,247,0));
}
.nav__brand {
  font-family: var(--mincho);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.5em;
}
.nav__links {
  display: flex;
  gap: 2.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
}
.nav__links a { position: relative; transition: color .3s; }
.nav__links a::before {
  content: "";
  position: absolute;
  left: -0.9em;
  top: 50%;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--shu);
  transform: translateY(-50%) scale(0);
  transition: transform .3s cubic-bezier(.3,.7,.3,1.4);
}
.nav__links a:hover { color: var(--sumi); }
.nav__links a:hover::before { transform: translateY(-50%) scale(1); }

/* ---------- vertical rails ---------- */
.rail {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--mincho);
  font-size: 0.8rem;
  letter-spacing: 0.55em;
  color: var(--stone);
  z-index: 40;
  user-select: none;
}
.rail--right { right: 1.9rem; }
.rail--left { left: 1.9rem; opacity: 0.55; }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3.2rem;
  padding: 8rem 6rem 4rem;
  text-align: center;
}
.hero__stack { position: relative; }
.hanko {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  background: var(--shu);
  color: var(--washi);
  font-family: var(--mincho);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.15;
  writing-mode: vertical-rl;
  letter-spacing: 0.1em;
  box-shadow: 0 1px 6px rgba(217,58,43,0.3);
  opacity: 0;
  transform: scale(1.6) rotate(-8deg);
  animation: stamp .55s cubic-bezier(.2,.9,.3,1.3) .9s forwards;
}
@keyframes stamp {
  60% { opacity: 1; transform: scale(0.94) rotate(-2.5deg); }
  100% { opacity: 1; transform: scale(1) rotate(-3deg); }
}
.hero__title {
  font-family: var(--mincho);
  font-weight: 400;
  font-size: clamp(3rem, 9vw, 6.4rem);
  letter-spacing: 0.58em;
  text-indent: 0.58em; /* balance the tracking */
  margin-top: 1.6rem;
  line-height: 1.15;
}
.hero__def {
  font-size: 0.85rem;
  color: var(--stone);
  margin-top: 0.8rem;
}
.hero__def em { font-family: var(--mincho); font-style: italic; }

.hero__figure {
  width: min(680px, 82vw);
  margin: 0 auto;
}
.hero__figure img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.94);
  background: #fff;
  border: 1px solid rgba(26,26,24,0.14);
  padding: 12px;
}
.hero__figure figcaption {
  margin-top: 0.9rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--stone);
}
.hero__line {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  font-family: var(--mincho);
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  color: var(--sumi);
}
.hero__line-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--shu);
}

/* ---------- evening ---------- */
.evening {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(5rem, 11vw, 10rem) 2rem;
}
.evening__intro {
  text-align: center;
  font-family: var(--mincho);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  margin-bottom: clamp(3.5rem, 7vw, 6rem);
}
.movements { list-style: none; }
.movement {
  display: grid;
  grid-template-columns: 72px 1fr 48px;
  gap: 2rem;
  align-items: start;
  padding: 2.2rem 0;
  border-top: 1px solid rgba(26,26,24,0.12);
  position: relative;
}
.movement:last-child { border-bottom: 1px solid rgba(26,26,24,0.12); }
.movement::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  height: 1px;
  width: 0;
  background: var(--shu);
  transition: width .7s cubic-bezier(.3,.7,.3,1);
}
.movement:hover::before { width: 72px; }
.movement__jp {
  font-family: var(--mincho);
  font-weight: 500;
  font-size: 1.7rem;
  line-height: 1.2;
  writing-mode: vertical-rl;
  justify-self: center;
}
.movement__body h3 {
  font-family: var(--mincho);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}
.movement__body p {
  font-size: 0.88rem;
  color: #4d4d49;
  max-width: 30rem;
}
.movement__count {
  font-family: var(--mincho);
  font-size: 0.85rem;
  color: var(--stone);
  justify-self: end;
  padding-top: 0.3rem;
}

/* ---------- counter ---------- */
.counter {
  background: var(--hinoki);
  padding: clamp(5rem, 11vw, 9rem) 2rem;
}
.counter__text {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}
.counter__jp {
  font-family: var(--mincho);
  font-size: clamp(5rem, 12vw, 8rem);
  color: rgba(26,26,24,0.07);
  position: absolute;
  top: -0.55em;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  line-height: 1;
}
.counter__text h2 {
  font-family: var(--mincho);
  font-weight: 500;
  font-size: clamp(1.5rem, 3.6vw, 2.2rem);
  letter-spacing: 0.06em;
  margin-bottom: 1.6rem;
  position: relative;
}
.counter__body { font-size: 0.95rem; color: #3c3c38; margin-bottom: 2rem; }
.counter__note {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--stone);
}
.counter__figure {
  max-width: 880px;
  margin: clamp(3rem, 6vw, 4.5rem) auto 0;
}
.counter__figure img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid rgba(26,26,24,0.14);
  padding: 12px;
  filter: saturate(0.94);
}

/* ---------- seat ---------- */
.seat { padding: clamp(5rem, 11vw, 10rem) 2rem; }
.seat__inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.hanko--small {
  width: 42px;
  height: 42px;
  font-size: 1.05rem;
  animation-delay: 0s;
  animation-play-state: paused;
}
.seat__inner.is-visible .hanko--small { animation-play-state: running; }
.seat__inner h2 {
  font-family: var(--mincho);
  font-weight: 500;
  font-size: clamp(1.5rem, 3.6vw, 2.1rem);
  letter-spacing: 0.1em;
  margin: 1.4rem 0 2.6rem;
}
.seat__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem 3rem;
  text-align: left;
  margin-bottom: 2.8rem;
}
.seat__facts div { border-top: 1px solid rgba(26,26,24,0.12); padding-top: 0.8rem; }
.seat__facts dt {
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.2rem;
}
.seat__facts dd { font-family: var(--mincho); font-size: 1rem; }
.seat__link {
  font-family: var(--mincho);
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--shu);
  padding-bottom: 0.2rem;
  transition: color .3s, letter-spacing .4s;
}
.seat__link:hover { color: var(--shu); letter-spacing: 0.12em; }
.seat__fine {
  margin-top: 2.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--stone);
}

/* ---------- foot ---------- */
.foot {
  text-align: center;
  padding: 2.4rem 1.5rem 3rem;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--stone);
  border-top: 1px solid rgba(26,26,24,0.08);
}

/* ---------- portal return ---------- */
.portal-return {
  position: fixed;
  bottom: 1.3rem;
  left: 1.5rem;
  z-index: 60;
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  border: 1px solid rgba(142,142,136,0.35);
  padding: 0.5em 1em;
  background: rgba(250,250,247,0.9);
  transition: color .25s, border-color .25s;
}
.portal-return:hover { color: var(--shu); border-color: var(--shu); }

/* ---------- reveals ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1.1s cubic-bezier(.25,.6,.25,1), transform 1.1s cubic-bezier(.25,.6,.25,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .rail { display: none; }
  .nav { padding: 1.2rem 1.4rem; }
  .hero { padding: 7rem 1.5rem 3.5rem; }
  .movement { grid-template-columns: 48px 1fr 36px; gap: 1.1rem; }
  .movement__jp { font-size: 1.3rem; }
}
@media (max-width: 560px) {
  .nav__links { gap: 1.2rem; font-size: 0.62rem; }
  .hero__line { flex-direction: column; gap: 0.7rem; }
  .seat__facts { grid-template-columns: 1fr; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hanko { opacity: 1; transform: rotate(-3deg); animation: none; }
}
