/* ==========================================================================
   Tokyo in Miniature — one scroll-scrubbed flight, then the city guide.
   No webfonts, no CDN, no network at runtime.
   ========================================================================== */

:root {
  --ink: #F3F0E9;
  --ink-2: #C9C5D6;
  --ink-dim: #928FA6;
  --bg: #0A0C16;
  --surface: #131628;
  --surface-2: #1B1F36;
  --line: rgba(243, 240, 233, 0.13);
  --line-strong: rgba(243, 240, 233, 0.24);
  --hero-fade: rgba(10, 12, 22, 0.92);
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.8);

  --acc-1: #F5B457;
  --acc-2: #FF7A4D;
  --acc-3: #FF4D6A;
  --acc-4: #FF3FA4;
  --acc-5: #49E0D0;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;

  --gutter: clamp(1.1rem, 5vw, 5rem);

  /* scroll length of the pinned flight: 1.5 viewport-heights per scene */
  --journey-h: 850vh;
}

/* Light scheme: the page chrome turns to warm paper. The hero is a night
   photograph of a city; it stays night, and carries its own scrims. */
@media (prefers-color-scheme: light) {
  :root {
    --ink: #191725;
    --ink-2: #3E3B4E;
    --ink-dim: #6B6779;
    --bg: #F5F0E7;
    --surface: #FFFDF8;
    --surface-2: #EDE6DA;
    --line: rgba(25, 23, 37, 0.14);
    --line-strong: rgba(25, 23, 37, 0.3);
    --hero-fade: rgba(245, 240, 231, 0.94);
    --shadow: 0 18px 34px -24px rgba(40, 32, 20, 0.45);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.55vw + 0.9rem, 1.075rem);
  line-height: 1.62;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 620;
  letter-spacing: -0.021em;
  line-height: 1.1;
  text-wrap: balance;
}

p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--acc, #F5B457);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 40;
  padding: 0.6rem 0.9rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 4px;
  font-size: 0.85rem;
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}
.skip-link:focus { transform: none; }

/* --------------------------------------------------------------------- nav */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  color: var(--ink);
  background: transparent;
  transition: background-color 0.35s ease, backdrop-filter 0.35s ease, border-color 0.35s ease, padding 0.35s ease;
  border-bottom: 1px solid transparent;
}
.nav[data-state="over"] .nav__inner { padding-block: 1.1rem; }
.nav[data-state="solid"] {
  background: var(--hero-fade);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}
.nav[data-state="solid"] .nav__inner { padding-block: 0.7rem; }

.nav__inner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.6rem);
  padding: 0.8rem var(--gutter);
  transition: padding 0.35s ease;
}
.nav__brand {
  font-weight: 660;
  letter-spacing: -0.02em;
  text-decoration: none;
  font-size: 1.02rem;
  white-space: nowrap;
}
.nav__brand span { color: var(--ink-dim); font-weight: 500; }
.nav__links {
  display: flex;
  gap: clamp(0.9rem, 2vw, 1.7rem);
  margin-inline-start: auto;
  font-size: 0.9rem;
}
.nav__links a {
  text-decoration: none;
  color: var(--ink-2);
  padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav__links a:hover { color: var(--ink); border-bottom-color: var(--line-strong); }
.nav__cta {
  font-size: 0.88rem;
  text-decoration: none;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.nav__cta:hover { background: var(--ink); color: var(--bg); border-color: transparent; }

@media (max-width: 620px) {
  .nav__links { display: none; }
  .nav__cta { margin-inline-start: auto; }
}

/* ----------------------------------------------------------------- journey */

.journey {
  position: relative;
  height: var(--journey-h);
  background: #05070E;
}

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #05070E;
  isolation: isolate;
}

.stage__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.7s ease;
  z-index: 2;
}
.stage.is-live .stage__canvas { opacity: 1; }

.posters { position: absolute; inset: 0; z-index: 1; }
.poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 52%;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.poster.is-active { opacity: 1; }

.stage__scrim {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(5, 7, 14, 0.55) 0%, rgba(5, 7, 14, 0) 22%, rgba(5, 7, 14, 0) 62%, rgba(5, 7, 14, 0.6) 100%),
    linear-gradient(to right, rgba(5, 7, 14, 0.42) 0%, rgba(5, 7, 14, 0) 34%, rgba(5, 7, 14, 0) 66%, rgba(5, 7, 14, 0.34) 100%);
}

/* ---- captions ---- */

.captions { position: absolute; inset: 0; z-index: 4; pointer-events: none; }

.caption {
  position: absolute;
  width: min(30rem, 82vw);
  color: #F7F5F0;
  opacity: 0;
  will-change: opacity, transform;
  transform: translate3d(0, var(--rise, 14px), 0);
}
.caption > * { position: relative; z-index: 1; }
.caption::before {
  content: "";
  position: absolute;
  inset: -2.4rem -3rem -2.2rem -2.6rem;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(78% 82% at 26% 46%, rgba(3, 5, 12, 0.72), rgba(3, 5, 12, 0.34) 58%, rgba(3, 5, 12, 0) 100%);
}
.caption--left { left: var(--gutter); bottom: 24vh; }
.caption--right { right: var(--gutter); top: 22vh; }
.caption--right::before { background: radial-gradient(78% 82% at 74% 46%, rgba(3, 5, 12, 0.72), rgba(3, 5, 12, 0.34) 58%, rgba(3, 5, 12, 0) 100%); }
.caption--last {
  left: 50%;
  bottom: 12vh;
  transform: translate3d(-50%, var(--rise, 14px), 0);
  width: min(40rem, 88vw);
  text-align: center;
}
.caption--last::before { background: radial-gradient(70% 76% at 50% 50%, rgba(3, 5, 12, 0.74), rgba(3, 5, 12, 0.3) 62%, rgba(3, 5, 12, 0) 100%); inset: -2.6rem -4rem; }
.caption--last .caption__eyebrow { justify-content: center; }
.caption--last .caption__panel { pointer-events: auto; }

.caption__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--acc, #F5B457);
  margin-bottom: 0.85rem;
  text-shadow: 0 1px 12px rgba(3, 5, 12, 0.8);
}
.caption__rule {
  width: 1.6rem;
  height: 1px;
  background: var(--acc, #F5B457);
  flex: none;
}
.caption__title {
  font-size: clamp(1.6rem, 3.1vw, 2.7rem);
  margin-bottom: 0.8rem;
  text-shadow: 0 2px 22px rgba(3, 5, 12, 0.72);
}
.caption__body {
  font-size: clamp(0.94rem, 0.7vw + 0.82rem, 1.06rem);
  color: #E4E1EC;
  max-width: 30rem;
  text-shadow: 0 1px 16px rgba(3, 5, 12, 0.7);
}
.caption__actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  justify-content: center;
}

[data-accent="1"] { --acc: var(--acc-1); }
[data-accent="2"] { --acc: var(--acc-2); }
[data-accent="3"] { --acc: var(--acc-3); }
[data-accent="4"] { --acc: var(--acc-4); }
[data-accent="5"] { --acc: var(--acc-5); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.25rem;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 580;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.16s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn--primary { background: var(--acc, #F5B457); color: #14101A; }
.btn--primary:hover { transform: translateY(-1px); }
.btn--ghost { border-color: rgba(247, 245, 240, 0.5); color: #F7F5F0; }
.btn--ghost:hover { background: rgba(247, 245, 240, 0.14); }

/* ---- hud + hint ---- */

.hud {
  position: absolute;
  left: var(--gutter);
  bottom: 2.1rem;
  z-index: 5;
  width: min(23rem, 46vw);
  color: #F7F5F0;
  pointer-events: none;
}
.hud__rail {
  position: relative;
  height: 2px;
  background: rgba(247, 245, 240, 0.24);
  overflow: hidden;
}
.hud__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--acc, #F5B457);
  transition: background-color 0.4s ease;
}
.hud__ticks {
  display: flex;
  justify-content: space-between;
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
}
.hud__ticks li {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(247, 245, 240, 0.32);
  transition: background-color 0.3s ease, transform 0.3s ease;
}
.hud__ticks li.is-on { background: var(--acc, #F5B457); transform: scale(1.5); }
.hud__label {
  margin-top: 0.6rem;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 245, 240, 0.78);
}
.hud__name { color: var(--acc, #F5B457); margin-left: 0.4rem; }

.hint {
  position: absolute;
  left: 50%;
  bottom: 2.2rem;
  transform: translateX(-50%);
  z-index: 5;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(247, 245, 240, 0.82);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.stage[data-p="moving"] .hint { opacity: 0; }
.hint__arrow {
  width: 1px;
  height: 2.2rem;
  background: linear-gradient(to bottom, rgba(247, 245, 240, 0.75), rgba(247, 245, 240, 0));
  animation: hint-drift 2.6s ease-in-out infinite;
}
@keyframes hint-drift {
  0%, 100% { transform: translateY(-6px); opacity: 0.55; }
  50% { transform: translateY(6px); opacity: 1; }
}

@media (max-width: 760px) {
  .caption--left, .caption--right {
    left: var(--gutter);
    right: var(--gutter);
    width: auto;
    top: auto;
    bottom: 17vh;
  }
  .caption--last { bottom: 9vh; }
  .hud { width: min(16rem, 52vw); bottom: 1.3rem; }
  .hint { bottom: 5.6rem; }
  .caption__title { font-size: clamp(1.5rem, 7vw, 2rem); }
}

/* ------------------------------------------------------- reduced motion */

html[data-motion="reduced"] .journey { height: auto; }
html[data-motion="reduced"] .stage { display: none; }
html[data-motion="reduced"] .stack { display: block; }

.stack { display: none; background: var(--bg); }

.scene-static { padding: clamp(1.6rem, 5vw, 4rem) var(--gutter); border-bottom: 1px solid var(--line); }
.scene-static__inner { display: grid; gap: clamp(1rem, 3vw, 2.2rem); max-width: 1180px; margin-inline: auto; }
.scene-static__media img { border-radius: 10px; border: 1px solid var(--line); }
.scene-static h2 { font-size: clamp(1.4rem, 4vw, 2.1rem); margin-bottom: 0.7rem; }
.scene-static p { color: var(--ink-2); max-width: 46ch; }
.scene-static .caption__eyebrow { color: var(--acc); text-shadow: none; }
.scene-static .caption__actions { justify-content: flex-start; margin-top: 1.4rem; }
.scene-static .btn--ghost { border-color: var(--line-strong); color: var(--ink); }
.scene-static .btn--ghost:hover { background: var(--surface-2); }
@media (min-width: 880px) {
  .scene-static__inner { grid-template-columns: 1.15fr 1fr; align-items: center; }
  .scene-static:nth-child(even) .scene-static__media { order: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .journey { height: auto; }
  .stage { display: none; }
  .stack { display: block; }
  .hint__arrow { animation: none; }
}

/* ---------------------------------------------------------- page content */

.band {
  padding: clamp(3.4rem, 9vh, 7rem) var(--gutter);
  border-top: 1px solid var(--line);
}
.band__head { max-width: 1180px; margin: 0 auto clamp(1.8rem, 4vw, 3rem); }
.band__kicker {
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 0.7rem;
}
.band__title { font-size: clamp(1.5rem, 3.4vw, 2.4rem); max-width: 22ch; margin-bottom: 0.9rem; }
.band__lede { color: var(--ink-2); max-width: 56ch; }
.band--food { background: var(--surface); }

.grid {
  display: grid;
  gap: clamp(1.1rem, 2.4vw, 1.9rem);
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1180px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.grid.is-in .card { opacity: 1; transform: none; }
.band--food .card { background: var(--bg); }

.card__media { position: relative; aspect-ratio: 720 / 520; background: var(--surface-2); overflow: hidden; }
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.card:hover .card__media img { transform: scale(1.035); }
.card__text { padding: 1.05rem 1.15rem 1.25rem; }
.card__text h3 { font-size: 1.06rem; margin-bottom: 0.4rem; }
.card__text p { color: var(--ink-2); font-size: 0.94rem; }

@media (prefers-reduced-motion: reduce) {
  .card { opacity: 1; transform: none; transition: none; }
  .hint__arrow { animation: none; }
  .stage__canvas { transition: none; }
}

/* ------------------------------------------------------------------ foot */

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: clamp(2.6rem, 7vh, 5rem) var(--gutter) clamp(2rem, 5vh, 3rem);
}
.footer__inner {
  display: grid;
  gap: clamp(1.4rem, 4vw, 3rem);
  max-width: 1180px;
  margin-inline: auto;
}
@media (min-width: 820px) {
  .footer__inner { grid-template-columns: 1.6fr 1fr; }
  .footer__meta { grid-column: 1 / -1; }
}
.footer__name { font-weight: 660; letter-spacing: -0.02em; font-size: 1.1rem; margin-bottom: 0.7rem; }
.footer__name span { color: var(--ink-dim); font-weight: 500; }
.footer__note { color: var(--ink-2); max-width: 52ch; font-size: 0.95rem; }
.footer__nav { display: flex; flex-direction: column; gap: 0.55rem; font-size: 0.95rem; }
.footer__nav a { color: var(--ink-2); text-decoration: none; width: fit-content; }
.footer__nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.footer__meta {
  color: var(--ink-dim);
  font-size: 0.84rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
