/* ========================================
   珈琲屋ひだまり — tokify型グリッドLP
   縦4 × 横4 / v13
   ======================================== */

:root {
  --bg: #12100e;
  --bg-light: #f7f2ea;
  --bg-warm: #efe6d8;
  --text: #1c1714;
  --text-muted: #7a7068;
  --text-light: #f8f4ee;
  --accent: #9a7348;
  --accent-soft: #c9a97a;
  --line: #06c755;
  --font: "Noto Sans JP", sans-serif;
  --font-serif: "Shippori Mincho B1", serif;
  --vh: 100dvh;
  --cta-h: 52px;
}

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

html,
body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  background: #0a0908;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

/* --- 縦スクロール --- */
.matrix {
  height: var(--vh);
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: none;
}

.row {
  position: relative;
  height: var(--vh);
  min-height: var(--vh);
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.row::-webkit-scrollbar {
  display: none;
}

.row[data-cols]:not([data-cols="1"]) {
  touch-action: pan-x pan-y;
  cursor: grab;
}

.row[data-cols]:not([data-cols="1"]).is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.row[data-cols="1"] {
  overflow-x: hidden;
  touch-action: pan-y;
}

.page {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  overflow: hidden;
  flex-shrink: 0;
}

/* --- 横移動ボタン --- */
.row-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(18, 16, 14, 0.45);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, background 0.25s;
}

.row[data-cols]:not([data-cols="1"]) .row-nav {
  opacity: 0.75;
  pointer-events: auto;
}

.row-nav:hover {
  opacity: 1;
  background: rgba(18, 16, 14, 0.65);
}

.row-nav--prev { left: 12px; }
.row-nav--next { right: 12px; }

.row-nav.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* 開発用グリッド表示（本番は hidden） */
.grid-pos.is-dev-only {
  display: none !important;
}

/* --- ナビドット --- */
.nav-v {
  position: fixed;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
}

.nav-v__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
  transition: all 0.35s ease;
}

.nav-v__dot.is-active {
  height: 20px;
  border-radius: 2px;
  background: var(--accent-soft);
}

.nav-v--dark .nav-v__dot {
  background: rgba(28, 23, 20, 0.18);
}

.nav-v--dark .nav-v__dot.is-active {
  background: var(--accent);
}

.nav-h {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  gap: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.nav-h.is-visible {
  opacity: 1;
}

.nav-h__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  transition: all 0.3s;
}

.nav-h__dot.is-active {
  background: var(--accent-soft);
  transform: scale(1.35);
}

/* --- カバーページ --- */
.page--cover {
  display: flex;
  align-items: flex-end;
  color: var(--text-light);
}

.page__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(18, 16, 14, 0.72) 0%,
    rgba(18, 16, 14, 0.12) 52%,
    rgba(18, 16, 14, 0.08) 100%
  );
}

.page--hero .page__bg {
  filter: brightness(1.08) contrast(1.04) saturate(1.05);
}

.page__overlay--hero {
  background: linear-gradient(
    to top,
    rgba(18, 16, 14, 0.78) 0%,
    rgba(18, 16, 14, 0.2) 45%,
    transparent 72%
  );
}

.page--studio .page__bg {
  filter: brightness(1.1) contrast(1.03);
}

.page__overlay--studio {
  background: linear-gradient(
    to top,
    rgba(18, 16, 14, 0.65) 0%,
    rgba(18, 16, 14, 0.1) 55%,
    transparent 100%
  );
}

.page__content {
  position: relative;
  z-index: 2;
  padding: 0 32px 96px;
  width: 100%;
}

.page__badge {
  display: inline-block;
  font-family: var(--font);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 6px 12px;
  margin-bottom: 14px;
  opacity: 0.9;
}

.page__kicker {
  font-size: 11px;
  letter-spacing: 0.14em;
  opacity: 0.65;
  margin-bottom: 18px;
}

.page__title {
  font-family: var(--font-serif);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.page__title span {
  display: inline-block;
  margin-top: 0.1em;
}

.page__title--sm {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.page__sub {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.12em;
  opacity: 0.88;
  line-height: 1.8;
}

.page__section-en {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.page__section-en--light {
  color: var(--accent-soft);
}

.nav-h--dark .nav-h__dot {
  background: rgba(28, 23, 20, 0.2);
}

.nav-h--dark .nav-h__dot.is-active {
  background: var(--accent);
}

/* 1-1 移動ヒント（→ ↓） */
.move-hints {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.move-hints.is-visible {
  opacity: 1;
}

.move-hint {
  position: absolute;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  color: rgba(255, 255, 255, 0.55);
}

.move-hint--right {
  top: 50%;
  right: 22px;
  transform: translateY(-50%);
  animation: pulse-h 2.4s ease-in-out infinite;
}

.move-hint--down {
  bottom: 92px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce-down 2.4s ease-in-out infinite;
}

@keyframes pulse-h {
  0%, 100% { transform: translateY(-50%) translateX(0); opacity: 0.45; }
  50% { transform: translateY(-50%) translateX(5px); opacity: 0.9; }
}

@keyframes bounce-down {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.45; }
  50% { transform: translateX(-50%) translateY(6px); opacity: 0.9; }
}

/* スワイプヒント（横ページ用） */
.swipe-hint {
  position: absolute;
  z-index: 2;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.swipe-hint--dark {
  color: rgba(28, 23, 20, 0.35);
}

.swipe-hint--v {
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce-v 2.4s ease-in-out infinite;
}

.swipe-hint--h {
  bottom: 92px;
  right: 24px;
  font-size: 18px;
  letter-spacing: 0;
  text-transform: none;
}

@keyframes bounce-v {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.45; }
  50% { transform: translateX(-50%) translateY(-6px); opacity: 0.85; }
}

.swipe-hint.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* 端手前ナビ（最終行・最終列では隠す） */
.edge-hints {
  position: fixed;
  inset: 0;
  z-index: 18;
  pointer-events: none;
}

.edge-hint {
  position: absolute;
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  color: rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.edge-hint.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.edge-hint--right {
  top: 50%;
  right: 22px;
  transform: translateY(-50%);
  animation: pulse-h 2.4s ease-in-out infinite;
}

.edge-hint--down {
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce-down 2.4s ease-in-out infinite;
}

.edge-hints.is-dark .edge-hint {
  color: rgba(28, 23, 20, 0.4);
  text-shadow: none;
}

/* --- テキストページ --- */
.page--text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 32px 96px;
  background: linear-gradient(165deg, var(--bg-light) 0%, var(--bg-warm) 100%);
  color: var(--text);
}

.page__heading {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: 0.04em;
  margin-bottom: 22px;
}

.page__body {
  font-size: 14px;
  line-height: 2;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.page__deco-line {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin-top: 36px;
}

/* --- 分割ページ --- */
.page--split {
  display: flex;
  flex-direction: column;
  background: var(--bg-light);
}

.page__image-top {
  flex: 1;
  min-height: 0;
  background: #e8e0d4;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.page__image-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.page__text-bottom {
  flex-shrink: 0;
  padding: 28px 32px 96px;
  background: var(--bg-light);
}

.page__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 10px;
}

.page__label--light {
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.22em;
}

.page__heading-sm {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  color: var(--text);
}

.page__body-sm {
  font-size: 13px;
  line-height: 1.95;
  color: var(--text-muted);
}

.page__body-sm--center {
  text-align: center;
}

/* --- メニューカード --- */
.page--menu-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text-light);
}

.page--menu-card > img {
  flex: 1;
  min-height: 0;
  max-height: 56%;
}

.menu-card__body {
  padding: 24px 32px 96px;
  border-top: 1px solid rgba(201, 169, 122, 0.2);
}

.menu-card__body h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.menu-card__body p {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(248, 244, 238, 0.5);
  margin-bottom: 16px;
}

.menu-card__price {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-soft);
  letter-spacing: 0.02em;
}

.menu-card__price small {
  font-size: 0.55em;
  font-weight: 600;
  margin-right: 2px;
  opacity: 0.85;
}

/* --- メニューカテゴリ --- */
.page--menu-cat {
  display: flex;
  flex-direction: column;
  background: var(--bg-light);
  color: var(--text);
}

.menu-cat__visual {
  position: relative;
  flex: 0 0 36%;
  min-height: 200px;
  overflow: hidden;
  background: #e8e0d4;
}

.menu-cat__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menu-cat__visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(18, 16, 14, 0.7) 0%,
    rgba(18, 16, 14, 0.15) 55%,
    transparent 100%
  );
}

.menu-cat__visual .page__label {
  position: absolute;
  top: 24px;
  left: 32px;
  margin-bottom: 0;
}

.menu-cat__title {
  position: absolute;
  bottom: 22px;
  left: 32px;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-light);
}

.menu-cat__list {
  list-style: none;
  flex: 1;
  padding: 8px 32px 96px;
  overflow-y: auto;
}

.menu-cat__item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(28, 23, 20, 0.08);
}

.menu-cat__info {
  flex: 1;
  min-width: 0;
}

.menu-cat__name {
  display: block;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.menu-cat__desc {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  line-height: 1.5;
}

.menu-cat__price {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
  padding-top: 2px;
}

/* --- アクセス --- */
.page--access {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 32px 96px;
  background: var(--bg-light);
  color: var(--text);
}

.access {
  margin-top: 24px;
}

.access__row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(28, 23, 20, 0.08);
  font-size: 14px;
}

.access__row dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.access__row dd {
  color: var(--text-muted);
  line-height: 1.75;
}

/* --- 地図 --- */
.page--map {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 32px 96px;
  background: linear-gradient(165deg, var(--bg-warm) 0%, var(--bg-light) 100%);
  color: var(--text);
}

.map-placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 240px;
  margin: 24px 0 16px;
  background:
    linear-gradient(135deg, rgba(154, 115, 72, 0.06) 0%, rgba(154, 115, 72, 0.02) 100%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 24px,
      rgba(28, 23, 20, 0.03) 24px,
      rgba(28, 23, 20, 0.03) 25px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 24px,
      rgba(28, 23, 20, 0.03) 24px,
      rgba(28, 23, 20, 0.03) 25px
    );
  border: 1px solid rgba(28, 23, 20, 0.08);
  border-radius: 2px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.map-placeholder__pin {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(154, 115, 72, 0.15);
}

.page--map-compact {
  justify-content: flex-start;
  padding-top: 52px;
}

.map-placeholder--compact {
  height: 180px;
  margin: 20px 0 12px;
}

/* 準備中プレースホルダ */
.page--placeholder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 56px 32px 96px;
  background: linear-gradient(165deg, #ebe4d8 0%, var(--bg-warm) 100%);
  color: var(--text-muted);
}

.page--placeholder .page__heading-sm {
  color: var(--text);
  margin-bottom: 10px;
}

.page--placeholder--dark {
  background:
    radial-gradient(ellipse 100% 60% at 50% 100%, rgba(154, 115, 72, 0.08) 0%, transparent 55%),
    var(--bg);
  color: rgba(248, 244, 238, 0.45);
}

.page--placeholder--dark .page__heading-sm {
  color: var(--text-light);
}

/* --- CTA --- */
.page--cta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 56px 32px 96px;
  background:
    radial-gradient(ellipse 120% 80% at 50% 100%, rgba(154, 115, 72, 0.12) 0%, transparent 55%),
    var(--bg);
  color: var(--text-light);
}

.page--cta .page__heading {
  color: var(--text-light);
  margin-bottom: 18px;
}

.page--cta .page__body {
  color: rgba(248, 244, 238, 0.58);
  margin-bottom: 32px;
  max-width: 280px;
}

.btn-line {
  display: block;
  width: 100%;
  max-width: 300px;
  padding: 17px 24px;
  background: var(--line);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 999px;
  margin-bottom: 14px;
  box-shadow: 0 8px 28px rgba(6, 199, 85, 0.22);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  z-index: 110;
  touch-action: manipulation;
}

.btn-line:active {
  transform: scale(0.98);
}

.btn-tel {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: rgba(248, 244, 238, 0.5);
  padding: 10px;
  border-bottom: 1px solid rgba(248, 244, 238, 0.15);
}

/* 固定CTA */
.fixed-cta {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 56px);
  max-width: 300px;
  height: var(--cta-h);
  background: var(--line);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
  transition: opacity 0.3s, transform 0.2s;
  touch-action: manipulation;
}

.fixed-cta:active {
  transform: translateX(-50%) scale(0.98);
}

.fixed-cta.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* PC */
@media (min-width: 481px) {
  body {
    display: flex;
    justify-content: center;
    background: #0a0908;
  }

  .matrix,
  .nav-v,
  .nav-h,
  .fixed-cta {
    max-width: 430px;
  }

  .nav-v {
    right: calc(50% - 215px + 12px);
  }
}
