/* Hallmark · genre: atmospheric · macrostructure: Split Studio
 * theme: custom (tuned) · vibe: "深夜のバー、ランタン、盤上の嘘"
 * paper oklch(15% 0.012 60) · accent oklch(76% 0.155 68) warm
 * display Zen Old Mincho (roman) · body Zen Kaku Gothic New · outlier JetBrains Mono
 * nav: N5 floating pill · footer: Ft1 mast-headed
 * hero: H2 split diptych (ratio 7/5, right = proof column, divider = negative space)
 * features: F3 tabular spec sheet · F4 step sequence · CTA: C1 outlined chip
 * enrichment: Tier-B hand-built SVG (crescent moon, single two-arc path) + one lamp glow
 * pre-emit critique: P5 H5 E4 S5 R4 V5
 */

@import url("tokens.css");

/* ====================================================================
   Base
   ==================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: clip;
  margin: 0;
  background-color: var(--color-paper);
  background-image: var(--glow-lamp), var(--glow-ember);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.75;
  font-feature-settings: "palt" 1;
  /* 日本語を文節（バンセツ）単位で折り返し、「開いてい／ます」のような
     語中改行や末尾の孤立を防ぐ。未対応ブラウザは normal に自然フォールバック。 */
  word-break: auto-phrase;
  line-break: strict;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0.01em;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  line-break: strict;
  word-break: auto-phrase;
  text-wrap: balance;
}

p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }

a {
  color: inherit;
  text-decoration: none;
}

img, svg, iframe { max-width: 100%; }
img { height: auto; display: block; }

:focus-visible {
  outline: var(--rule-thick) solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

::selection {
  background: var(--color-accent);
  color: var(--color-paper);
}

.skip {
  position: absolute;
  left: var(--space-md);
  top: calc(var(--space-md) * -6);
  z-index: var(--z-top);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-accent);
  color: var(--color-paper);
  border-radius: var(--radius-sm);
  font-weight: 700;
  white-space: nowrap;
}
.skip:focus { top: var(--space-md); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ====================================================================
   Layout primitives
   ==================================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--space-3xl); }
.section--tight { padding-block: var(--space-2xl); }
.section--wide  { padding-block: var(--space-4xl) var(--space-3xl); }

.section + .section { border-top: var(--rule-hair) solid var(--color-rule); }

/* Split Studio — the page's structural signature.
   Text on one half, hard proof on the other; direction alternates. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split--flip > :first-child { order: 2; }

@media (max-width: 60rem) {
  .split { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .split--flip > :first-child { order: 0; }
}

.stack > * + * { margin-top: var(--space-md); }
.stack-lg > * + * { margin-top: var(--space-lg); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.lede {
  font-size: var(--text-md);
  color: var(--color-muted);
  max-width: 42ch;
}

.prose {
  max-width: var(--measure);
  color: var(--color-muted);
}
.prose > * + * { margin-top: var(--space-md); }
.prose strong { color: var(--color-ink); font-weight: 700; }
.prose a {
  color: var(--color-ink);
  border-bottom: var(--rule-hair) solid var(--color-accent);
  padding-bottom: 1px;
  transition: border-bottom-width var(--dur-short) var(--ease-out);
}
.prose a:hover { border-bottom-width: var(--rule-thick); }

/* Section head — S2 hanging. Title floats in negative space, no rule,
   no eyebrow, single column (never tag-left / heading-right). */
.head { margin-bottom: var(--space-xl); }
.head__title {
  font-size: var(--text-2xl);
  font-weight: 700;
}
.head__sub {
  margin-top: var(--space-sm);
  color: var(--color-neutral);
  font-size: var(--text-md);
  max-width: 48ch;
}

/* ====================================================================
   Marks — hand-built SVG (Tier B)
   ==================================================================== */

.mark { width: 1.75em; height: 1.75em; flex: none; color: var(--color-accent); }
.mark--xl { width: min(20rem, 60vw); height: auto; }

/* ====================================================================
   Nav — N5 floating pill
   (content-sized · blur+saturate backdrop · top-centred)
   ==================================================================== */

.nav {
  position: fixed;
  inset-block-start: var(--space-md);
  inset-inline: 0;
  z-index: var(--z-nav);
  display: flex;
  justify-content: center;
  padding-inline: var(--gutter);
  pointer-events: none;
}

.nav__pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  max-width: 100%;
  padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-md);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-pill);
  background: var(--scrim-nav);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 44px;
  white-space: nowrap;
}
.nav__wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--text-md);
  letter-spacing: 0.14em;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}
.nav__menu a {
  position: relative;
  display: block;
  font-size: var(--text-sm);
  color: var(--color-muted);
  white-space: nowrap;
  padding-block: var(--space-2xs);
  transition: color var(--dur-short) var(--ease-out);
}
.nav__menu a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: -2px;
  height: var(--rule-hair);
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-short) var(--ease-out);
}
.nav__menu a:hover { color: var(--color-ink); }
.nav__menu a:hover::after { transform: scaleX(1); }
.nav__menu a[aria-current="page"] {
  color: var(--color-ink);
}
.nav__menu a[aria-current="page"]::after { transform: scaleX(1); }

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: var(--space-xs) var(--space-md);
  border: var(--rule-hair) solid var(--color-accent);
  border-radius: var(--radius-pill);
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-height: 44px;
  transition: background-color var(--dur-short) var(--ease-out),
              color var(--dur-short) var(--ease-out);
}
.nav__cta:hover {
  background: var(--color-accent);
  color: var(--color-paper);
}

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--space-sm);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

@media (max-width: 62rem) {
  /* backdrop-filter makes an element the containing block for its
     position:fixed descendants — with it on, the full-screen menu sheet
     gets trapped inside the pill's own box. Drop the blur at this width
     and carry legibility with a near-opaque scrim instead. */
  .nav__pill {
    width: 100%;
    justify-content: space-between;
    gap: var(--space-sm);
    background: var(--scrim-nav-solid);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .nav__toggle { display: inline-flex; }
  .nav__cta { display: none; }

  /* Brand and toggle stay above the sheet so 閉じる is always reachable. */
  .nav__brand,
  .nav__toggle { position: relative; z-index: var(--z-top); }

  .nav__menu {
    position: fixed;
    inset: 0;
    z-index: var(--z-overlay);
    flex-direction: column;
    justify-content: center;
    gap: var(--space-lg);
    padding: var(--space-3xl) var(--gutter);
    overflow-y: auto;
    /* Opaque, one elevation step up from the page — dark-mode elevation
       is carried by lightness, not shadow. */
    background: var(--color-paper-2);
    visibility: hidden;
    opacity: 0;
    transition: opacity var(--dur-short) var(--ease-out),
                visibility 0s linear var(--dur-short);
  }
  .nav__menu[data-open="true"] {
    visibility: visible;
    opacity: 1;
    transition: opacity var(--dur-short) var(--ease-out);
  }
  .nav__menu a {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    color: var(--color-ink);
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .nav__menu .nav__menu-cta {
    font-family: var(--font-mono);
    font-size: var(--text-lg);
    color: var(--color-accent);
    font-variant-numeric: tabular-nums;
  }
}

@media (min-width: 62.0625rem) {
  .nav__menu .nav__menu-cta { display: none; }
}

/* ====================================================================
   Hero — H2 split diptych (7/5, proof column right, divider = space)
   ==================================================================== */

.hero {
  position: relative;
  padding-block: clamp(7rem, 14vw, 11rem) var(--space-3xl);
}

.hero__display {
  font-size: var(--text-display);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: 0.005em;
}

/* The single most distinctive fact about this shop is the clock.
   Give it typographic weight rather than burying it in a details list. */
.hero__hours {
  margin-top: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-xs) var(--space-md);
}
.hero__hours-num {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--color-accent);
  white-space: nowrap;
}
.hero__hours-label {
  font-size: var(--text-sm);
  color: var(--color-neutral);
}

.hero__lede {
  margin-top: var(--space-md);
  font-size: var(--text-md);
  color: var(--color-muted);
  max-width: 34ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

/* Proof column — the facts a Maps visitor came for. */
.proof {
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-md);
  background: var(--color-paper-2);
  padding: var(--space-lg);
}

.proof__row + .proof__row {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: var(--rule-hair) solid var(--color-rule);
}

.proof__key {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-neutral);
}

.proof__val {
  margin-top: var(--space-2xs);
  font-size: var(--text-md);
  color: var(--color-ink);
  font-variant-numeric: tabular-nums;
}
.proof__val a {
  border-bottom: var(--rule-hair) solid var(--color-rule-strong);
  transition: border-color var(--dur-short) var(--ease-out);
}
.proof__val a:hover { border-color: var(--color-accent); }

.proof__note {
  margin-top: var(--space-2xs);
  font-size: var(--text-sm);
  color: var(--color-neutral);
}

/* ====================================================================
   Buttons — C1 outlined chip (rectangular-soft, spacious, arrow)
   ==================================================================== */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 48px;
  padding: var(--space-sm) var(--space-lg);
  border: var(--rule-hair) solid var(--color-rule-strong);
  border-radius: var(--radius-sm);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  transition: border-color var(--dur-short) var(--ease-out),
              color var(--dur-short) var(--ease-out),
              transform var(--dur-instant) var(--ease-out);
}
.chip:hover { border-color: var(--color-accent); color: var(--color-accent); }
.chip:active { transform: translateY(1px); }
.chip[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

.chip--primary {
  border-color: var(--color-accent);
  color: var(--color-accent);
  font-weight: 700;
}
.chip--primary:hover {
  background: var(--color-accent);
  color: var(--color-paper);
}

.chip__arrow { transition: transform var(--dur-short) var(--ease-out); }
.chip:hover .chip__arrow { transform: translateX(3px); }

/* C3 typographic link */
.tlink {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  color: var(--color-accent);
  font-weight: 500;
  white-space: nowrap;
  border-bottom: var(--rule-hair) solid var(--color-accent);
  padding-bottom: 2px;
  transition: border-bottom-width var(--dur-short) var(--ease-out);
}
.tlink:hover { border-bottom-width: var(--rule-thick); }

/* ====================================================================
   F3 — tabular spec sheet (料金 / システム)
   ==================================================================== */

.spec {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.spec caption {
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  padding-bottom: var(--space-md);
}
.spec th, .spec td {
  text-align: left;
  padding: var(--space-md) var(--space-sm);
  border-bottom: var(--rule-hair) solid var(--color-rule);
  vertical-align: top;
}
.spec thead th {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-neutral);
  border-bottom-color: var(--color-rule-strong);
}
.spec tbody th {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--color-ink);
}
.spec td:last-child {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--color-ink);
  white-space: nowrap;
}
.spec__note {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-sm);
  color: var(--color-neutral);
  white-space: normal;
}

.table-scroll { overflow-x: auto; }

/* ====================================================================
   F4 — step sequence (来店の流れ)
   ==================================================================== */

.steps {
  display: grid;
  gap: var(--space-lg);
  counter-reset: step;
}
@media (min-width: 48rem) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xl); }
}

.step {
  position: relative;
  padding-left: var(--space-xl);
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.15em;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;
}
.step__title {
  font-size: var(--text-lg);
  font-weight: 700;
}
.step__body {
  margin-top: var(--space-xs);
  color: var(--color-muted);
}

/* ====================================================================
   Cards & lists
   ==================================================================== */

.cards {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.card {
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-md);
  background: var(--color-paper-2);
  padding: var(--space-lg);
  transition: border-color var(--dur-short) var(--ease-out);
}
.card:hover { border-color: var(--color-rule-strong); }
.card__title {
  font-size: var(--text-lg);
  font-weight: 700;
}
.card__body {
  margin-top: var(--space-xs);
  color: var(--color-muted);
  font-size: var(--text-base);
}
.card .proof__key { margin-bottom: var(--space-xs); }

/* Marked list */
.ticks > li {
  position: relative;
  padding-left: var(--space-lg);
  color: var(--color-muted);
}
.ticks > li + li { margin-top: var(--space-sm); }
.ticks > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 8px; height: 8px;
  background: var(--color-accent);
  border-radius: var(--radius-xs);
}

/* ====================================================================
   FAQ — details/summary
   ==================================================================== */

.qa { border-top: var(--rule-hair) solid var(--color-rule); }
.qa__item { border-bottom: var(--rule-hair) solid var(--color-rule); }
.qa__q {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  list-style: none;
  min-height: 44px;
  transition: color var(--dur-short) var(--ease-out);
}
.qa__q::-webkit-details-marker { display: none; }
.qa__q:hover { color: var(--color-accent); }
.qa__sign {
  flex: none;
  font-family: var(--font-mono);
  font-size: var(--text-md);
  color: var(--color-accent);
}
.qa__item[open] .qa__sign { transform: rotate(45deg); }
.qa__a {
  padding-bottom: var(--space-lg);
  color: var(--color-muted);
  max-width: var(--measure);
}
.qa__a > * + * { margin-top: var(--space-sm); }

/* ====================================================================
   要確認 marker — a deliberate hole, not a fabricated value
   ==================================================================== */

.tbc {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.1em 0.6em;
  border: var(--rule-hair) dashed var(--color-accent);
  border-radius: var(--radius-xs);
  color: var(--color-accent);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
}

/* ====================================================================
   Map
   ==================================================================== */

.map {
  position: relative;
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--color-paper-2);
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ====================================================================
   Breadcrumbs
   ==================================================================== */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--color-neutral);
  padding-block: var(--space-md) 0;
}
.crumbs a { white-space: nowrap; }
.crumbs a:hover { color: var(--color-accent); }
.crumbs__sep { color: var(--color-rule-strong); }

/* Page header for sub-pages */
.pagehead { padding-block: clamp(6.5rem, 12vw, 9rem) var(--space-xl); }
.pagehead__title {
  font-size: var(--text-display-s);
  font-weight: 900;
}
.pagehead__lede {
  margin-top: var(--space-md);
  font-size: var(--text-md);
  color: var(--color-muted);
  max-width: 46ch;
}

/* ====================================================================
   Closing CTA strip
   ==================================================================== */

.close-strip {
  border-top: var(--rule-hair) solid var(--color-rule);
  padding-block: var(--space-3xl);
  text-align: left;
}
.close-strip__line {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  max-width: 22ch;
}
.close-strip__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

/* ====================================================================
   Footer — Ft1 mast-headed (wordmark 2xl · tagline roman · links inline)
   ==================================================================== */

.foot {
  border-top: var(--rule-thick) solid var(--color-rule-strong);
  padding-block: var(--space-2xl) var(--space-xl);
  background: var(--color-paper-2);
}

.foot__mast {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.foot__wordmark {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 900;
  letter-spacing: 0.16em;
}
.foot__tagline {
  margin-top: var(--space-xs);
  color: var(--color-neutral);
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
}

.foot__grid {
  display: grid;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 48rem) {
  .foot__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
}

.foot__nap {
  font-style: normal;
  color: var(--color-muted);
  line-height: 1.9;
}
.foot__nap a {
  border-bottom: var(--rule-hair) solid var(--color-rule-strong);
  white-space: nowrap;
  transition: border-color var(--dur-short) var(--ease-out);
}
.foot__nap a:hover { border-color: var(--color-accent); }
.foot__nap .foot__name { color: var(--color-ink); font-weight: 700; }

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-lg);
  align-content: start;
}
.foot__links a {
  color: var(--color-muted);
  font-size: var(--text-sm);
  white-space: nowrap;
  border-bottom: var(--rule-hair) solid transparent;
  transition: border-color var(--dur-short) var(--ease-out),
              color var(--dur-short) var(--ease-out);
}
.foot__links a:hover {
  color: var(--color-ink);
  border-bottom-color: var(--color-accent);
}

.foot__legal {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: var(--rule-hair) solid var(--color-rule);
  color: var(--color-neutral);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
}

/* ====================================================================
   Motion — one orchestrated entrance, then the page just is
   ==================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .enter {
    opacity: 0;
    transform: translateY(10px);
    animation: enter var(--dur-long) var(--ease-out) forwards;
  }
  .enter--2 { animation-delay: 80ms; }
  .enter--3 { animation-delay: 160ms; }
}

@keyframes enter {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 150ms !important;
  }
  .enter { opacity: 1; transform: none; }
}
