/* ============================================================================
   craft/nav-menu.css · the menu button and its panel (craft/nav-menu.js)

   The button shows only below 1160px, where the bar hides links to fit. The
   panel drops from the bar's lower edge and fills the screen under it: the
   links stacked large, numbered in mono, the booking link last as the lime
   block, 目次 (contents) as furniture behind them.
   ========================================================================== */

.navmenu-btn { display: none; }

@media (max-width: 1159px) {
  .navmenu-btn {
    display: inline-flex; align-items: center; gap: .65rem; flex-shrink: 0;
    min-height: 44px; min-width: 44px; padding: 0 .2rem 0 .6rem; margin-left: -.5rem;
    background: none; border: 0; color: #F4F4F0; cursor: pointer;
    font-family: var(--font-mono, ui-monospace, Menlo, monospace); font-size: .7rem;
    letter-spacing: .16em; text-transform: uppercase;
    -webkit-tap-highlight-color: transparent;
  }
  .navmenu-btn:hover { color: var(--lime, #E3F850); }
  .navmenu-btn:focus-visible { outline: 1px solid var(--lime, #E3F850); outline-offset: 2px; }
  .navmenu-btn__bars { position: relative; display: block; width: 22px; height: 14px; }
  .navmenu-btn__bars i {
    position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
    transition: transform .22s ease, opacity .15s ease, top .22s ease;
  }
  .navmenu-btn__bars i:nth-child(1) { top: 0; }
  .navmenu-btn__bars i:nth-child(2) { top: 6px; right: 6px; }
  .navmenu-btn__bars i:nth-child(3) { top: 12px; }
  .navmenu-btn[aria-expanded="true"] { color: var(--lime, #E3F850); }
  .navmenu-btn[aria-expanded="true"] .navmenu-btn__bars i:nth-child(1) { top: 6px; transform: rotate(45deg); }
  .navmenu-btn[aria-expanded="true"] .navmenu-btn__bars i:nth-child(2) { opacity: 0; }
  .navmenu-btn[aria-expanded="true"] .navmenu-btn__bars i:nth-child(3) { top: 6px; transform: rotate(-45deg); }

  /* the bar keeps its logo, its visible links and the button on one row */
  .nav .wrap { gap: 1rem; }
  .nav .navlinks { margin-left: auto; }
}

/* narrow phones: the logo gives up a little width so the booking link stays
   on two lines at most, and the button keeps its bars and drops its word */
@media (max-width: 420px) {
  .nav .logo img { height: 21px; }
  .nav .wrap { gap: .75rem; }
  .nav .navlinks a.navcta { font-size: .64rem; letter-spacing: .12em; line-height: 1.5; }
  .navmenu-btn { padding-left: .4rem; }
  .navmenu-btn__label {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
}

/* the panel */
.nav.navmenu-open { z-index: 1000; }
.navmenu-panel {
  position: absolute; top: 100%; left: 0; right: 0;
  height: calc(100vh - 56px); height: calc(100dvh - 56px);
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  background: var(--ink, #18171C);
  border-top: 1px solid rgba(227, 248, 80, .35);
  padding: 1.25rem clamp(1.25rem, 5vw, 3rem) 2.5rem;
  animation: navmenu-in .24s ease-out;
}
.navmenu-panel[hidden] { display: none; }
@keyframes navmenu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .navmenu-panel { animation: none; } }

.navmenu-list { list-style: none; margin: 0; padding: 0; position: relative; z-index: 1; max-width: 34rem; }
.navmenu-list li { border-bottom: 1px solid rgba(244, 244, 240, .09); }
.navmenu-list li:last-child { border-bottom: 0; padding-top: 1.5rem; }
.navmenu-list a {
  display: flex; align-items: baseline; gap: 1rem; min-height: 56px; padding: .85rem 0;
  color: #F4F4F0; text-decoration: none;
  font-family: var(--font-display, var(--font-body, system-ui, sans-serif)); font-weight: 700;
  font-size: clamp(1.45rem, 6.2vw, 2rem); line-height: 1.1; letter-spacing: -.01em; text-transform: uppercase; text-wrap: balance;
}
.navmenu-list a[data-n]::before {
  content: attr(data-n); flex-shrink: 0; width: 1.8rem;
  font-family: var(--font-mono, ui-monospace, Menlo, monospace); font-weight: 400;
  font-size: .68rem; letter-spacing: .16em; color: var(--ash, #8A8A93);
}
.navmenu-list a:hover, .navmenu-list a:focus-visible { color: var(--lime, #E3F850); }
.navmenu-list a:focus-visible { outline: 1px solid var(--lime, #E3F850); outline-offset: 4px; }
.navmenu-list a[aria-current="page"] { color: var(--lime, #E3F850); }
.navmenu-list a[aria-current="page"]::after {
  content: "You are here"; margin-left: auto; align-self: center;
  font-family: var(--font-mono, ui-monospace, Menlo, monospace); font-weight: 400;
  font-size: .6rem; letter-spacing: .16em; color: var(--ash, #8A8A93);
}
.navmenu-list a.navmenu-talk { color: var(--mint, #8DEA9A); }

.navmenu-list a.navmenu-cta {
  justify-content: center; align-items: center; min-height: 58px; padding: 1rem;
  background: var(--lime, #E3F850); color: var(--ink, #18171C);
  font-family: var(--font-mono, ui-monospace, Menlo, monospace); font-weight: 500;
  font-size: .78rem; letter-spacing: .2em;
}
.navmenu-list a.navmenu-cta:hover, .navmenu-list a.navmenu-cta:focus-visible { color: var(--ink, #18171C); background: #F4F4F0; }

.navmenu-kanji {
  position: absolute; right: -.08em; bottom: .2em; z-index: 0; pointer-events: none;
  font-size: clamp(7rem, 38vw, 14rem); line-height: 1; font-weight: 700;
  color: rgba(244, 244, 240, .035); writing-mode: vertical-rl;
}

/* the page behind the open panel stays put */
html.navmenu-lock, html.navmenu-lock body { overflow: hidden; }
