/* ============================================================
assets/css/base.css — グローバルCSSトークン＆レイアウト基盤
- 方針: スマホファースト、アクセシビリティ配慮、CLS低減
- 変数: 色/タイポ/余白/半径/影 など
- ユーザー要件: 非HTMLファイルは /assets 配下
============================================================ */

/* ===== トークン ===== */
:root {
  /* 色トークン（グレースケール） */
  --c-bg: #ffffff;
  --c-fg: #111827;        /* text default */
  --c-fg-weak: #4b5563;   /* secondary text */
  --c-border: #e5e7eb;    /* borders */
  --c-surface: #f9fafb;   /* section BG */
  --c-overlay: rgba(17,24,39,0.5);

  /* アクセント色（テーマで上書き） */
  --acc: #2f855a;           /* primary */
  --acc-weak: #a7f3d0;      /* tint */
  --acc-contrast: #ffffff;  /* on primary */

  /* タイポグラフィ */
  --ff-sans: "Noto Sans JP", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --ff-serif: "Noto Serif JP", ui-serif, Georgia, Cambria, "Times New Roman", serif;
  --fz-1: clamp(14px, 3.6vw, 16px); /* base */
  --fz-2: clamp(16px, 4vw, 18px);
  --fz-3: clamp(18px, 4.2vw, 20px);
  --fz-4: clamp(22px, 5.5vw, 28px);
  --fz-5: clamp(28px, 7vw, 40px);

  /* 余白・角丸・影 */
  --sp-1: 0.5rem; --sp-2: 0.75rem; --sp-3: 1rem;
  --sp-4: 1.5rem; --sp-5: 2rem; --sp-6: 3rem;
  --radius: 14px; --radius-sm: 10px; --radius-lg: 22px;
  --shadow-1: 0 6px 20px rgba(0,0,0,0.06);
  --shadow-2: 0 10px 30px rgba(0,0,0,0.12);

  /* コンテナ幅（PCは幅制限で読みやすく） */
  --container: min(1100px, 92vw);

  /* 固定ヘッダー高さ（端末に応じてスケール） */
  --header-h: clamp(56px, 10vw, 72px);
}

/* 幅によって余白と最大幅を少し調整 */
@media (min-width: 1200px) {
  :root { --container: min(1160px, 88vw); }
}

/* ===== ベースリセット（軽量） ===== */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ff-sans);
  font-size: var(--fz-1);
  color: var(--c-fg);
  background: var(--c-bg);
  line-height: 1.75;
  /* 固定ヘッダー分だけ押し下げ（CLS防止） */
  padding-top: var(--header-h);
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
picture, img { content-visibility: auto; }
a { color: var(--acc); text-decoration: none; }
a:hover { opacity: .9; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
ul,ol { padding-left: 1.2em; }
h1,h2,h3,h4 { line-height: 1.3; margin: 0 0 .6em; }
p { margin: 0 0 1em; }

/* 動作軽減 */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ===== ヘルパー ===== */
.container { width: var(--container); margin-inline: auto; }
.section { padding: var(--sp-6) 0; background: var(--c-bg); }
.section-title { font-size: var(--fz-4); margin: 0 0 var(--sp-4); letter-spacing: .02em; }
.note { color: var(--c-fg-weak); font-size: .95em; }
.grid { display: grid; gap: var(--sp-4); }

/* ===== ボタン ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.2em; border-radius: var(--radius-sm);
  border: 1px solid var(--c-border); font-weight: 600;
  transition: transform .08s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--acc); color: var(--acc-contrast); border-color: transparent; }
.btn-primary:hover { background: color-mix(in oklab, var(--acc) 92%, black 8%); }
.btn-outline { background: transparent; color: var(--acc); border-color: var(--acc); }
.btn-outline:hover { background: var(--acc-weak); border-color: color-mix(in oklab, var(--acc) 60%, black 10%); }
.btn-line { background: #06C755; color: #fff; border-color: transparent; }
.btn-line:hover { background: #05b64d; }

/* ============================================================
   ヘッダー／ナビ（固定ヘッダー＋モバイルドロワー）
============================================================ */
.site-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1100;
  background: color-mix(in oklab, var(--c-bg) 86%, white 14%);
  border-bottom: 1px solid var(--c-border);
  backdrop-filter: saturate(130%) blur(6px);
}
.header-inner{
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 0;
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand-logo { width: 132px; height: auto; }
.brand-text { font-weight: 800; font-size: var(--fz-2); letter-spacing: .02em; }

.nav-toggle {
  border: 1px solid var(--c-border);
  background: var(--c-bg);
  padding: .6rem .8rem;
  border-radius: 10px;
}

/* モバイルナビ（固定ヘッダー直下にフル高で展開） */
.site-nav{
  position: fixed;
  top: var(--header-h); left: 0; right: 0;
  height: calc(100dvh - var(--header-h));
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  overflow: auto;
  transform: translateY(-110%);
  transition: transform .22s ease;
  z-index: 1090;
}
.site-nav ul{
  list-style: none; margin: 0;
  padding: .6rem var(--sp-3) var(--sp-5);
  display: grid; gap: .6rem;
}
.site-nav a{ padding: .9rem 1rem; border-radius: 10px; display: block; color: var(--c-fg); }
.site-nav a:hover { background: var(--c-surface); text-decoration: none; }
.site-nav a.btn{ padding: .7rem 1rem; }
.site-nav.is-open{ transform: none; }

/* オーバーレイ（背景タップで閉じる） */
.nav-overlay{
  position: fixed; inset: 0;
  background: var(--c-overlay);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
  z-index: 1085;
}
.has-menu-open .nav-overlay{
  opacity: 1; pointer-events: auto;
}

/* PC 横並び */
@media (min-width: 960px){
  .nav-toggle{ display: none; }
  .site-nav{
    position: static; top: auto; height: auto;
    transform: none; overflow: visible; border: 0; z-index: auto;
  }
  .site-nav ul{
    grid-auto-flow: column; align-items: center; padding: 0; gap: 1rem;
  }
}

/* ===== ヒーロー ===== */
.hero { position: relative; display: grid; align-items: center; }
.hero-media img { width: 100%; height: clamp(280px, 52vw, 520px); object-fit: cover; }
.hero-copy {
  position: absolute; inset: auto 0 0 0;
  color: #fff; padding: var(--sp-6) var(--sp-3);
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 80%);
}
.catch { font-size: var(--fz-5); margin: 0 0 var(--sp-2); text-shadow: 0 2px 10px rgba(0,0,0,.25); }
.hero .sub { font-size: var(--fz-2); text-shadow: 0 1px 6px rgba(0,0,0,.25); }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; }

/* ===== セクション: About ===== */
.about { background: var(--c-surface); }
.feature-points {
  display: grid; gap: .5rem; padding-left: 0; list-style: none; margin: var(--sp-3) 0 0;
}
.feature-points li { display: flex; align-items: center; gap: .6rem; }
.feature-points .icon { font-size: 1.25rem; }

/* ===== セクション: Menu ===== */
.menu-group {
  margin-top: var(--sp-4);
  background:#fff; border:1px solid var(--c-border);
  border-radius: var(--radius); padding: var(--sp-3);
  box-shadow: var(--shadow-1);
}
.menu-group-title { font-size: var(--fz-3); margin-bottom: .4rem; }
.menu-list { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .9rem; }
.menu-item{
  border-bottom: 1px dashed var(--c-border);
  padding: .9rem 1rem;           /* ← 左右ガター */
}
.menu-item:last-child{
  border-bottom: none;
  padding-bottom: .9rem;         /* 行の下の呼吸感を揃える */
}

.mi-main { display: flex; justify-content: space-between; gap: .8rem; align-items: baseline; }
.mi-name { font-weight: 700; }
.mi-price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mi-desc { color: var(--c-fg-weak); margin-top: .25rem; }

/* ===== セクション: Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}
.gallery-item { margin: 0; background:#fff; border: 1px solid var(--c-border); border-radius: var(--radius); overflow: clip; box-shadow: var(--shadow-1); }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-item figcaption { padding: .5rem .6rem; font-size: .95em; color: var(--c-fg-weak); }

/* ===== セクション: Hours ===== */
.hours-table {
  width: 100%; border-collapse: collapse; background:#fff;
  border:1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1);
}
.hours-table th, .hours-table td { padding: .8rem .9rem; border-bottom: 1px solid var(--c-border); }
.hours-table tr:last-child th, .hours-table tr:last-child td { border-bottom: none; }
.hours-table th { text-align: left; width: 36%; background: var(--c-surface); }
.hours .note { color: var(--c-fg-weak); margin-top: .6rem; }

/* ===== セクション: Access ===== */
.access-grid { display: grid; gap: var(--sp-3); }
.access-info {
  background:#fff; border:1px solid var(--c-border); border-radius: var(--radius);
  padding: var(--sp-3); box-shadow: var(--shadow-1);
}
.access-info .addr { font-weight: 700; }
.access-info .contacts { list-style: none; padding: 0; margin: .6rem 0; display: grid; gap: .5rem; }
.access-info .contacts a {
  display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .7rem;
  border-radius: 10px; background: var(--c-surface); color: var(--c-fg); text-decoration: none;
}
.access-info .contacts a:hover { background: var(--acc-weak); }
.access-info .parking { color: var(--c-fg-weak); }

.access-map iframe {
  width: 100%; min-height: 300px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow-1);
}

/* ===== セクション: Reserve（フォーム） ===== */
.contact-flex { display: grid; gap: var(--sp-3); }
.contact-ways { display: flex; gap: .6rem; flex-wrap: wrap; }
.contact-form {
  background:#fff; border:1px solid var(--c-border); border-radius: var(--radius);
  padding: var(--sp-3); box-shadow: var(--shadow-1);
}
.field { display: grid; gap: .4rem; margin-bottom: .9rem; }
label { font-weight: 700; }
input[type="text"],
input[type="tel"],
input[type="date"],
textarea {
  width: 100%;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: .7rem .8rem;
  font: inherit;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 120px; }
input:focus, textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in oklab, var(--acc) 20%, white 80%); outline: none; }

/* ===== フッター ===== */
.site-footer {
  background: #0b1220; color: #dbe1ea;
  padding-block: 1.75rem;
  margin-top: var(--sp-4);
}
.footer-inner { display: grid; gap: .6rem; align-items: center; }
.footer-nav { display: flex; gap: .8rem; flex-wrap: wrap; }
.footer-nav a { color: #dbe1ea; opacity: .9; }
.footer-nav a:hover { opacity: 1; text-decoration: underline; }
.brand-small { margin: 0; }

/* ===== 下部固定CTA（スマホ優先） ===== */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 2px;
  background: #0b1220; /* セーフティ境界 */
  transform: translateY(100%);
  transition: transform .2s ease;
}
.sticky-cta[aria-hidden="false"] { transform: translateY(0); }
.sticky-cta .cta {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .9rem .4rem; font-weight: 800; color:#fff; text-decoration: none;
}
.sticky-cta .cta.tel { background: #0ea5e9; }
.sticky-cta .cta.line { background: #06C755; }
.sticky-cta .cta.contact { background: var(--acc); }

/* ===== 状態 ===== */
body.is-loading { visibility: hidden; }
body:not(.is-loading) { opacity: 1; }

/* ============================================================
   レスポンシブ（段階的拡張）
============================================================ */

/* ≧ 600px: 写真グリッド強化、余白調整 */
@media (min-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: .8rem; }
}

/* ≧ 768px: セクション呼吸、カード感を強める */
@media (min-width: 768px) {
  .section { padding: calc(var(--sp-6) + .5rem) 0; }
  .menu-group { padding: var(--sp-4); }
  .gallery-item img { aspect-ratio: 3 / 2; }
}

/* ≧ 960px: PCレイアウト（読みやすい最大幅＆2カラム配置） */
@media (min-width: 960px) {
  /* PCでは画面端まで広げない → container制御 */
  .container { width: var(--container); }

  /* ヒーローはテキストを画像上に重ねつつ読みやすく */
  .hero-media img { height: clamp(420px, 46vw, 560px); }

  /* ← PCでもスマホと同じ左右ガター（左に空間を確保） */
  .hero-copy {
    padding: var(--sp-6) var(--sp-3); /* 上下: sp-6 / 左右: sp-3 */
    text-align: left;                 /* 必要なら左寄せ */
  }

  /* Accessは情報＋地図の2カラム */
  .access-grid {
    grid-template-columns: 420px 1fr;
    align-items: start;
    gap: var(--sp-4);
  }
  .access-map iframe { min-height: 420px; }

  /* Reserveは左右2カラム */
  .contact-flex {
    grid-template-columns: 280px 1fr;
    align-items: start;
  }

  /* PCでは下部固定CTAを隠す（ヘッダと競合しがち） */
  .sticky-cta { display: none; }
}

/* ≧ 1200px: 文字の暴走を抑えつつ上品に */
@media (min-width: 1200px) {
  .catch { letter-spacing: .01em; }
  .section-title { letter-spacing: .01em; }
}

/* スマホではギャラリーを1列に */
@media (max-width: 599px) {
  .gallery-grid {
    grid-template-columns: 1fr !important; /* 1列固定 */
    gap: 1rem; /* 間隔を少し広げると見やすい */
  }
  .gallery-item img {
    aspect-ratio: 16 / 9; /* 横長で見せる場合に調整 */
  }
}

/* ============================================================
  追加のユーティリティ
============================================================ */
.card {
  background:#fff; border:1px solid var(--c-border);
  border-radius: var(--radius); box-shadow: var(--shadow-1);
}
.hr { border: 0; border-top: 1px solid var(--c-border); margin: 1.4rem 0; }
.visually-hidden {
  position: absolute !important; clip: rect(1px,1px,1px,1px);
  width: 1px; height: 1px; overflow: hidden; white-space: nowrap;
}

/* ============================================================
  PCで“画面幅いっぱいで大きすぎて見えにくい”を避ける要点
  1) .container で最大幅制限（--container）
  2) clamp()でベース文字サイズ暴走を防止（--fz-1〜5）
  3) ヘッダーはsticky＋ブラー、本文はカード化で視線をガイド
  4) Heroテキストはグラデーション幕で可読性UP
============================================================ */

/* ===== デモ専用メッセージ ===== */
.demo-note {
  text-align: center;
  font-size: 0.95rem;
  color: #666;
  margin: 1.2rem auto;
  padding: .6rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
  max-width: 480px;
  line-height: 1.6;
}

/* ==== Sticky CTA表示時にフッターや#privacyが隠れないための下余白確保 ==== */
/* 固定バーの高さ（必要なら数値だけ調整） */
:root { --sticky-cta-h: 64px; }

/* iPhoneの安全域も考慮して最小高さを明示（既存.sticky-ctaに重ねるだけ） */
.sticky-cta {
  min-height: var(--sticky-cta-h);
  padding-bottom: env(safe-area-inset-bottom);
}

/* Sticky CTAが表示されている間だけ、ページ下に余白を作る */
body:has(.sticky-cta[aria-hidden="false"]) {
  padding-bottom: calc(var(--sticky-cta-h) + env(safe-area-inset-bottom));
}

/* フッターまわりにも余白（リンクが確実に見えるように） */
.site-footer:has(+ .sticky-cta[aria-hidden="false"]) {
  padding-bottom: calc(var(--sticky-cta-h) + 12px);
}

/* #privacy に内部リンクで飛んだときヘッダーやCTAで隠れない */
#privacy { scroll-margin-bottom: calc(var(--sticky-cta-h) + 8px); }


/* ==== Hero専用レスポンシブ調整 ==== */

/* スマホ（〜767px）：文字を小さめ＋ボタン縦並びに */
@media (max-width: 767px) {
  .hero-media img {
    /* テキストがかぶらないように少し高さを増やす */
    height: clamp(320px, 72vw, 380px);
  }

  .hero-copy {
    padding: var(--sp-4) var(--sp-3) var(--sp-5);
  }

  /* キャッチコピーを一段階小さくして行数を減らす */
  .catch {
    font-size: clamp(22px, 6vw, 26px);
    line-height: 1.3;
  }

  /* サブコピーも少し小さめに */
  .hero .sub {
    font-size: var(--fz-1);
  }

  /* ボタンは縦並び＆幅いっぱい */
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    gap: .7rem;
  }
  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }
}

/* タブレット（768〜959px）：PCより少しだけ控えめに */
@media (min-width: 768px) and (max-width: 959px) {
  .hero-media img {
    /* PCより少し高めにして余裕を持たせる */
    height: clamp(360px, 60vw, 460px);
  }

  .hero-copy {
    padding: var(--sp-5) var(--sp-4);
  }

  /* キャッチコピーを一段階だけ縮小 */
  .catch {
    font-size: clamp(24px, 5.5vw, 32px);
    line-height: 1.3;
  }

  .hero .sub {
    font-size: var(--fz-2);
  }

  /* ボタンは横並びのまま、少しだけ余裕を出す */
  .hero-cta {
    gap: 0.9rem;
  }
}

/* ======================================
   右端・下から1/3 に固定されるミニCTA
====================================== */
.floating-cta-mini {
  position: fixed;

  /* ← 安定した “下から1/3” の位置 */
  top: calc(100vh * 0.67);

  right: 0.5rem;
  z-index: 60;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0.9rem 1.1rem;
  background: #0ea5e9;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;

  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,.18);

  /* 少し透明に → 邪魔にならない */
  opacity: 0.92;
  backdrop-filter: blur(4px);

  /* ← transform は不要なので削除 */
}

/* ホバー（PCのみ） */
@media (hover: hover) {
  .floating-cta-mini:hover {
    opacity: 1;
    background: var(--acc-press, #1d4f3a);

    /* transform がないと scale だけに修正 */
    transform: scale(1.05);
  }
}

/* PC幅では少し大きめ */
@media (min-width: 960px) {
  .floating-cta-mini {
    padding: 1rem 1.3rem;
    font-size: 1rem;
    right: 2rem;
  }
}
