/* 1 to 10 — Trip to Japan · phone-first navigation and layout (load last) */

/* ---------- top bar actions ---------- */
.topbar__actions { display: flex; align-items: center; gap: 8px; flex: none; }
.today-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--shu);
  color: #fff;
  text-decoration: none;
  font: 600 0.74rem/1 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(198, 62, 41, 0.32);
  transition: transform 160ms var(--ease-ui), background-color 160ms var(--ease-ui);
}
.today-btn[hidden] { display: none; }
.today-btn:active { transform: scale(0.96); }
.today-btn__dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); animation: todayPulse 2.4s ease-out infinite; }
@keyframes todayPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6); } 70%, 100% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); } }
.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  color: inherit;
  background: transparent;
  cursor: pointer;
  transition: background-color 160ms var(--ease-ui), transform 160ms var(--ease-ui);
}
.menu-btn:active { transform: scale(0.96); }
.menu-btn svg { width: 24px; height: 24px; }
.topbar.is-solid .menu-btn:hover { background: rgba(28, 42, 78, 0.07); }

/* the menu button breathes on phones: a soft vermilion ring, and the three bars easing in and out */
.menu-btn { position: relative; }
.menu-btn::after { content: ""; position: absolute; inset: 3px; border-radius: 12px; box-shadow: 0 0 0 2px var(--shu); opacity: 0; pointer-events: none; }
@keyframes menuRing { 0% { opacity: 0.6; transform: scale(0.86); } 70%, 100% { opacity: 0; transform: scale(1.3); } }
@keyframes menuBar { 0%, 100% { transform: scaleX(1); } 45% { transform: scaleX(0.64); } }
@media (max-width: 900px) and (prefers-reduced-motion: no-preference) {
  .menu-btn::after { animation: menuRing 2.4s var(--ease-out) infinite; }
  .menu-btn svg path { transform-box: fill-box; transform-origin: center; animation: menuBar 2.4s ease-in-out infinite; }
  .menu-btn svg .b2 { animation-delay: 140ms; }
  .menu-btn svg .b3 { animation-delay: 280ms; }
}

/* ---------- menu sheet ---------- */
.menu {
  border: 0;
  padding: 0 0 max(20px, env(safe-area-inset-bottom));
  margin: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  background: var(--washi);
  color: var(--sumi);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.menu::backdrop { background: rgba(17, 26, 49, 0.4); }
.menu[open] { animation: menuIn 260ms var(--ease-out); }
@keyframes menuIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.menu__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(10px, env(safe-area-inset-top)) var(--gutter) 10px;
  background: rgba(240, 241, 236, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.menu__brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.1rem/1 var(--f-display); color: var(--ai); }
.menu__close { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: rgba(28, 42, 78, 0.07); color: var(--ai); cursor: pointer; }
.menu__close svg { width: 22px; height: 22px; }
.menu__days { display: grid; gap: 6px; padding: 16px var(--gutter) 8px; }
.menu__days a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  min-height: 60px;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow-1);
  text-decoration: none;
}
.menu__days a.is-today { box-shadow: var(--shadow-1), inset 0 0 0 2px var(--shu); }
/* inside the sheet: the days arrive one by one, and today's card keeps a slow pulse */
.menu__days a { position: relative; }
.menu__days a.is-today::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 2px var(--shu); opacity: 0; pointer-events: none; }
@keyframes menuItem { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes todayCard { 0% { opacity: 0.7; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.04, 1.18); } }
@media (prefers-reduced-motion: no-preference) {
  .menu[open] .menu__days a { animation: menuItem 380ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms + 80ms); }
  .menu[open] .menu__days a.is-today::after { animation: todayCard 2.4s var(--ease-out) 700ms infinite; }
}
.menu__days small { display: block; font: 500 0.68rem/1.2 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--nezumi); }
.menu__days strong { display: block; font: 700 1rem/1.3 var(--f-display); color: var(--ai); }
.menu__links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px var(--gutter) 20px; }
.menu__links a {
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(28, 42, 78, 0.06);
  text-decoration: none;
  font: 600 0.95rem/1.2 var(--f-body);
  color: var(--ai);
}

/* ---------- today / up next ---------- */
.day__today {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px 5px 9px;
  border-radius: 999px;
  background: var(--shu);
  color: #fff;
  line-height: 1;
  letter-spacing: 0.12em;
}
.day__kicker .day__today + span::before { content: none; }
.slot--next > h4::after {
  content: "Up next";
  display: inline-block;
  margin-left: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  vertical-align: 3px;
  background: rgba(198, 62, 41, 0.12);
  color: var(--shu-deep);
  font: 600 0.62rem/1.2 var(--f-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- maps + phone links ---------- */
.slot__map {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin: 10px 0 2px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line);
  color: var(--ai);
  text-decoration: none;
  font: 600 0.78rem/1 var(--f-body);
  transition: transform 160ms var(--ease-ui), box-shadow 160ms var(--ease-ui);
}
.slot__map:active { transform: scale(0.96); }
.slot__map svg { width: 18px; height: 18px; color: var(--shu); }
a.tel { white-space: nowrap; text-decoration-style: dotted; }

/* ---------- phones ---------- */
@media (max-width: 900px) {
  .topnav { display: none; }
  .menu-btn { display: grid; }
  .brand span { display: inline; }
  .today-btn { padding: 0 12px; font-size: 0.7rem; }

  /* each item's photos become a swipeable strip */
  .slot__shots,
  .slot__shots--2,
  .slot__shots--3 {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin-right: calc(var(--gutter) * -1);
    padding-right: var(--gutter);
    overscroll-behavior-x: contain;
  }
  .slot__shots::-webkit-scrollbar { display: none; }
  .slot__shots .shot { flex: 0 0 86%; scroll-snap-align: start; }
  .slot__shots--1 .shot { flex-basis: 100%; }
  .slot__shots .shot__open,
  .slot__shots--3 .shot:first-child .shot__open { aspect-ratio: 4 / 3; }
  .slot__shots .shot__zoom { opacity: 1; scale: 1; }

  /* calmer spacing and bigger tap targets on the timeline */
  .day { padding-block: 44px; }
  .day h3 { font-size: 1.85rem; }
  .slot { padding-bottom: 30px; }
  .slot h4 { font-size: 1.2rem; }
  .notes { gap: 10px; }
  .dayrail a { min-height: 40px; }
}

@media (max-width: 640px) {
  .brand span { display: none; }
  .topbar__inner { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .today-btn__dot { animation: none; }
}

/* ---------- hero: floating glass panel ---------- */
.hero__pic { position: absolute; inset: 0; z-index: -2; }
.hero__pic .hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__panel {
  padding: clamp(22px, 3vw, 34px) clamp(22px, 3vw, 36px);
  border-radius: 28px;
  max-width: 660px;
  background: linear-gradient(135deg, rgba(17, 26, 49, 0.42), rgba(17, 26, 49, 0.22));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 24px 60px rgba(8, 12, 26, 0.35);
}
.hero__panel .eyebrow { margin-bottom: 12px; }
.hero__panel .hero__num { font-size: clamp(4.2rem, 11vw, 9rem); }
.hero__panel .hero__title { margin-bottom: 16px; }
.hero__panel .hero__lede { margin: 0; }

@media (max-width: 900px) {
  .hero { min-height: 100svh; }
  .hero__grid { padding-top: calc(var(--topbar-h) + 24px); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .hero .route { display: none; }
  .hero__shade {
    background: linear-gradient(to top, rgba(17, 26, 49, 0.78) 0%, rgba(17, 26, 49, 0.25) 45%, rgba(17, 26, 49, 0) 70%, rgba(17, 26, 49, 0.25) 100%);
  }
  .hero__panel { padding: 20px 20px 18px; border-radius: 24px; }
  .hero__panel .hero__num { font-size: clamp(3.8rem, 19vw, 5rem); }
  .hero__panel .hero__sub { font-size: 1.55rem; margin-top: 8px; }
  .hero__lede { font-size: 0.98rem; line-height: 1.55; }
  .hero__ctas { margin-top: 16px; gap: 8px; }
  .hero__ctas .btn { flex: 1 1 auto; justify-content: center; min-height: 46px; padding: 0 16px; font-size: 0.92rem; }
}

/* ---------- every item opens its photos and details ---------- */
.slot > h4, .jewel-row__text, .counter, .garden { cursor: pointer; }
.slot > h4 { transition: color 160ms var(--ease-ui); }
.slot > h4:hover { color: var(--shu-deep); }
.counter, .garden { transition: transform 200ms var(--ease-ui), box-shadow 200ms var(--ease-ui); }
.counter:hover, .garden:hover { transform: translateY(-2px); }
@media (hover: none) { .counter:hover, .garden:hover { transform: none; } }

/* ---------- "Book today" boxes: one button per place ---------- */
.note__btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 10px; }
.note-book {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 10px 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--shu);
  color: #fff;
  font: 600 0.84rem/1 var(--f-body);
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(198, 62, 41, 0.25);
  transition: transform 160ms var(--ease-ui), background-color 160ms var(--ease-ui);
}
.note-book:hover { background: var(--shu-deep); }
.note-book:active { transform: scale(0.96); }
.note-book svg { width: 16px; height: 16px; }
.note--book p { margin: 0; font-size: 0.9rem; color: #4a4f59; }
.lightbox__plan:focus, .lightbox__plan:focus-visible { outline: none; }

/* ---------- getting there: the address, then one quiet row of actions ---------- */
.addr { display: grid; gap: 10px; margin: 14px 0 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.addr__show {
  display: grid;
  gap: 3px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.addr__label { display: flex; align-items: center; gap: 6px; font: 500 0.64rem/1.2 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--nezumi); }
.addr__label svg { width: 11px; height: 11px; opacity: 0.7; }
.addr__jp { font: 500 0.92rem/1.5 var(--f-body); color: var(--sumi); overflow-wrap: anywhere; }
.addr__en { font-size: 0.8rem; line-height: 1.4; color: var(--nezumi); }
.addr__tell { font-size: 0.82rem; line-height: 1.45; color: var(--ai); }
.addr__show:active .addr__jp { color: var(--ai); }

/* one size and one weight for every small action; colour only where it matters */
.addr__btns, .slot__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.slot__actions { margin: 12px 0 2px; }
.addr__btns > *, .slot__actions > * {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ai);
  box-shadow: inset 0 0 0 1px rgba(28, 42, 78, 0.18);
  font: 600 0.78rem/1 var(--f-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease-ui), background-color 200ms var(--ease-ui), color 200ms var(--ease-ui);
}
.addr__btns > *:active, .slot__actions > *:active { transform: scale(0.96); }
.addr__btns svg, .slot__actions svg { width: 15px; height: 15px; flex: none; }
.addr__btns .book-btn, .slot__actions .book-btn { background: var(--shu); color: #fff; box-shadow: none; }
.addr__btns .call-btn--icon, .slot__actions .call-btn--icon, .addr__map { padding: 0; width: 40px; }
.call-btn--icon svg { color: var(--matsu); }
.addr__map svg, .slot__actions .slot__map svg { color: var(--shu); }
.addr__uber { background: #0b0b0b; color: #fff; box-shadow: none; }
.addr__copy.is-done { background: var(--matsu); color: #fff; box-shadow: none; }
/* small phones: with Book in the row, Copy shrinks to its icon so the row stays on one line */
@media (max-width: 389px) {
  .addr__btns:has(.book-btn) .addr__copy { width: 40px; padding: 0; }
  .addr__btns:has(.book-btn) .addr__copy span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

/* inside the dark detail sheet */
.lightbox__plan .addr { margin: 2px 0; border-top-color: rgba(255, 255, 255, 0.16); }
.lightbox__plan .addr__label, .lightbox__plan .addr__en { color: rgba(255, 255, 255, 0.66); }
.lightbox__plan .addr__jp { color: #fff; }
.lightbox__plan .addr__tell { color: rgba(255, 255, 255, 0.86); }
.lightbox__plan .addr__btns > * { color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28); }
.lightbox__plan .addr__uber { background: #fff; color: #0b0b0b; box-shadow: none; }
/* the driver view, sized for an address rather than a short phrase */
.show--addr .show__jp { font-size: clamp(1.3rem, 5.4vw, 3rem); line-height: 1.5; white-space: pre-line; overflow-wrap: normal; }

/* ---------- city chapters on phones: photo band on top, words on solid navy ---------- */
@media (max-width: 900px) {
  .chapter { min-height: 0; padding-top: 50vw; }
  .chapter > img { height: 78vw; bottom: auto; }
  .chapter::before { background: linear-gradient(to bottom, rgba(17, 26, 49, 0) 0, rgba(17, 26, 49, 0.15) 30vw, rgba(17, 26, 49, 0.82) 58vw, var(--ai-deep) 78vw); }
  .chapter__inner { align-items: flex-end; padding-block: 0 40px; }
  .chapter__inner > div:first-child { padding: 0; border-radius: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
  .chapter h2 { text-shadow: 0 2px 24px rgba(8, 12, 24, 0.55); }
  .chapter .eyebrow { color: rgba(255, 255, 255, 0.86); text-shadow: 0 1px 12px rgba(8, 12, 24, 0.7); }
}

/* phones: the menu and the Today button already reach every day, so the kanji strip under the top bar goes */
@media (max-width: 900px) {
  .dayrail { display: none; }
  html { scroll-padding-top: calc(var(--topbar-h) + 16px); }
}
