/* ============================================================
   白山台マルタパン デモサイト — C · 暖卓 (Warm board grid)
   確定プロトタイプ v3-dan.jsx を忠実に再現した vanilla CSS
   ============================================================ */

:root {
  --c-cream:  #F5E6D3;
  --c-crust:  #8B5A3C;
  --c-straw:  #D4A574;
  --c-berry:  #C44536;
  --c-paper:  #FAF7F2;
  --c-ink:    #2D2A26;
  --c-ink-60: rgba(45,42,38,.62);
  --c-ink-40: rgba(45,42,38,.42);
  --c-line:   rgba(45,42,38,.14);

  --f-serif: "Noto Serif JP", "游明朝", serif;
  --f-sans:  "Noto Sans JP", "游ゴシック", "Hiragino Kaku Gothic ProN", sans-serif;
  --f-latin: "Cormorant Garamond", "Playfair Display", serif;
  --f-hand:  "Caveat", cursive;

  --maxw: 1120px;
  --pad: 20px;        /* mobile 左右パディング */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--c-paper);
  color: var(--c-ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--c-ink); color: var(--c-paper);
  padding: 10px 16px; border-radius: 0 0 4px 0; font-size: 13px;
}
.skip-link:focus { left: 0; }

/* フォーカスリング（キーボード操作） */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--c-crust);
  outline-offset: 3px;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
  width: 100%;
}

/* 共通: セクションラベル（ドット付き小見出し） */
.label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--c-crust);
}
.label__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c-crust); flex: 0 0 auto; }

/* 共通: 手書き風アクセント */
.hand { font-family: var(--f-hand); font-size: 24px; color: var(--c-crust); line-height: 1; }

/* 共通: セクション見出し */
.section__h {
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.4;
  letter-spacing: .04em;
  margin: 16px 0 32px;
}

.section { padding-top: 56px; padding-bottom: 56px; }
.section--cream { background: var(--c-cream); }

/* アンカー遷移時に sticky ヘッダー分のオフセットを確保 */
.section, #top { scroll-margin-top: 72px; }

.section__head {
  display: flex; flex-direction: column; gap: 12px;
  align-items: flex-start; margin-bottom: 28px;
}

/* ============================================================
   OPEN バー
   ============================================================ */
.openbar { background: var(--c-ink); color: var(--c-paper); }
.openbar__inner {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 14px; padding-bottom: 14px;
  font-size: 11px; letter-spacing: .14em;
}
.openbar__status { display: inline-flex; align-items: center; gap: 10px; letter-spacing: .12em; }
.openbar__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-berry); flex: 0 0 auto; }
.openbar__meta { display: none; gap: 24px; opacity: .85; }
.openbar__meta a { text-decoration: none; }

/* ============================================================
   マストヘッド
   ============================================================ */
.masthead {
  position: sticky; top: 0; z-index: 40;
  background: rgba(245,230,211,.95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-line);
  transition: box-shadow .3s ease;
}
.masthead--scrolled { box-shadow: 0 2px 14px rgba(45,42,38,.08); }
.masthead__inner {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--c-ink); }
.wheat { color: var(--c-crust); flex: 0 0 auto; }
.brand__text { display: flex; flex-direction: column; }
.brand__ja { font-family: var(--f-serif); font-weight: 600; font-size: 16px; letter-spacing: .1em; }
.brand__en { font-family: var(--f-latin); font-style: italic; font-size: 10px; color: var(--c-ink-60); letter-spacing: .18em; text-transform: uppercase; }
.nav { display: none; gap: 26px; font-size: 12px; color: var(--c-ink-60); letter-spacing: .14em; }
.nav a { text-decoration: none; transition: color .25s ease; }
.nav a:hover { color: var(--c-crust); }

/* ============================================================
   Hero
   ============================================================ */
.hero { background: var(--c-cream); padding: 28px 0; }
.hero__frame { position: relative; }
.hero__img {
  width: 100%; height: 420px; object-fit: cover;
  border-radius: 6px; background: #DCC59E;
}
.hero__card {
  position: relative;
  margin: -56px 16px 0;
  background: var(--c-paper);
  padding: 24px;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(45,42,38,.18);
}
.hero__title {
  font-family: var(--f-serif); font-weight: 500;
  font-size: 30px; line-height: 1.3; letter-spacing: .02em;
  margin: 14px 0 0;
}
.hero__sub { margin: 16px 0 0; color: var(--c-ink-60); font-size: 13px; line-height: 1.9; }
.hero__cta { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block; text-decoration: none;
  padding: 12px 18px; font-size: 13px; letter-spacing: .14em;
  border-radius: 2px; cursor: pointer; transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn--primary { background: var(--c-crust); color: var(--c-paper); border: 1px solid var(--c-crust); box-shadow: 0 2px 0 rgba(45,42,38,0); }
.btn--primary:hover { background: #74492f; box-shadow: 0 8px 22px rgba(139,90,60,.28); }
.btn--ghost { background: transparent; color: var(--c-ink); border: 1px solid var(--c-ink-40); }
.btn--ghost:hover { border-color: var(--c-ink); background: rgba(45,42,38,.04); }

.hero__pills { display: none; }

/* スクロールキュー（デスクトップのみ・GSAP で控えめにバウンス） */
.hero__scroll { display: none; }

/* ============================================================
   About
   ============================================================ */
.about__grid { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: start; }
.about__text { font-size: 15px; line-height: 2.1; }
.about__text p { margin: 0 0 1.2em; }
.about__sign { margin-top: 24px; display: flex; align-items: center; gap: 14px; }
.about__sign-name { font-family: var(--f-hand); font-size: 30px; color: var(--c-crust); }
.about__sign-role { font-size: 11px; color: var(--c-ink-40); letter-spacing: .14em; text-transform: uppercase; }

.about__images { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.about__images img { width: 100%; height: 150px; object-fit: cover; border-radius: 4px; background: #E7D6BC; }
.about__quote {
  height: 150px; background: var(--c-cream); border-radius: 4px;
  padding: 18px; display: flex; flex-direction: column; justify-content: space-between;
}
.about__quote-q { margin: 0; font-family: var(--f-latin); font-style: italic; font-size: 20px; color: var(--c-crust); line-height: 1.3; }
.about__quote-l { font-size: 10px; letter-spacing: .16em; color: var(--c-ink-60); text-transform: uppercase; }

/* ============================================================
   Signature
   ============================================================ */
.sig__grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.sig__item {
  background: var(--c-paper); border: 1px solid var(--c-line);
  border-radius: 6px; overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .35s ease;
}
.sig__item img { width: 100%; height: 200px; object-fit: cover; background: #EADCC0; will-change: transform; }
.sig__item:hover { box-shadow: 0 16px 44px rgba(45,42,38,.13); }
.sig__body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.sig__row { display: flex; justify-content: space-between; align-items: baseline; }
.sig__no { font-family: var(--f-latin); font-style: italic; color: var(--c-crust); font-size: 13px; letter-spacing: .2em; }
.sig__price { font-family: var(--f-latin); font-size: 18px; color: var(--c-ink); }
.sig__name { font-family: var(--f-serif); font-weight: 500; font-size: 18px; margin: 8px 0 10px; letter-spacing: .04em; }
.sig__season { font-size: 10px; color: var(--c-berry); border: 1px solid var(--c-berry); border-radius: 999px; padding: 1px 8px; vertical-align: middle; letter-spacing: .1em; }
.sig__copy { margin: 0; color: var(--c-ink-60); font-size: 13px; line-height: 1.85; }

/* ============================================================
   Lineup
   ============================================================ */
.link-underline {
  color: var(--c-crust); font-family: var(--f-latin); font-style: italic; font-size: 15px;
  text-decoration: none; border-bottom: 1px solid var(--c-crust); padding-bottom: 4px;
}
.lineup__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cat {
  background: var(--c-cream); border-radius: 4px; padding: 20px;
  min-height: 200px; display: flex; flex-direction: column; align-items: center; text-align: center;
}
.cat__icon {
  width: 84px; height: 84px; border-radius: 50%; overflow: hidden;
  background: #E7D6BC; display: block;
  box-shadow: 0 6px 18px rgba(45,42,38,.12);
}
.cat__icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat__no { font-family: var(--f-latin); font-style: italic; color: var(--c-crust); font-size: 12px; letter-spacing: .2em; margin-top: 16px; }
.cat__name { font-family: var(--f-serif); font-weight: 500; font-size: 17px; margin: 6px 0 12px; }
.cat__items { margin: 0; padding: 0; list-style: none; color: var(--c-ink-60); font-size: 12.5px; line-height: 1.95; }

/* ============================================================
   Voice
   ============================================================ */
.voice__grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.voice__card { margin: 0; background: var(--c-paper); padding: 24px; border-radius: 4px; display: flex; flex-direction: column; }
.voice__stars { color: var(--c-berry); font-size: 14px; letter-spacing: 2px; }
.voice__q { margin: 16px 0 0; font-family: var(--f-serif); font-size: 15px; line-height: 1.95; color: var(--c-ink); flex: 1; }
.voice__src { margin-top: 18px; font-size: 11px; color: var(--c-ink-40); letter-spacing: .14em; text-transform: uppercase; }

.voice__ratings {
  margin-top: 32px; background: var(--c-paper); padding: 20px 24px; border-radius: 4px;
  display: flex; flex-direction: column; gap: 16px; align-items: flex-start;
}
.voice__thanks { margin: 0; font-family: var(--f-serif); font-size: 15px; }
.voice__rates { display: flex; gap: 24px; flex-wrap: wrap; }
.rate { display: flex; align-items: baseline; gap: 10px; }
.rate__src { font-size: 11px; color: var(--c-ink-60); letter-spacing: .14em; text-transform: uppercase; }
.rate__v { font-family: var(--f-latin); font-size: 26px; color: var(--c-crust); }
.rate__n { font-size: 11px; color: var(--c-ink-40); }
.voice__note { margin: 16px 0 0; font-size: 10px; color: var(--c-ink-40); }

/* ============================================================
   Information
   ============================================================ */
.info__grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.info__panel { background: var(--c-cream); padding: 24px; border-radius: 4px; }
.info__table { border-collapse: collapse; width: 100%; font-size: 14px; }
.info__table th, .info__table td { padding: 14px 0; text-align: left; vertical-align: top; }
.info__table tr { border-bottom: 1px solid var(--c-line); }
.info__table th { width: 74px; color: var(--c-ink-60); font-size: 12px; letter-spacing: .14em; font-weight: 400; }
.info__table td { line-height: 1.7; }
.info__table a { color: var(--c-crust); }
.info__small { font-size: 11px; color: var(--c-ink-40); }
.info__btn { margin-top: 20px; width: 100%; text-align: center; }
.info__map { display: flex; flex-direction: column; gap: 8px; }
.info__map iframe {
  width: 100%; height: 320px; border: 1px solid var(--c-line); border-radius: 4px; display: block;
}
.info__access { margin: 0; font-size: 11px; color: var(--c-ink-60); }

/* ============================================================
   Footer
   ============================================================ */
.footer { background: var(--c-ink); color: var(--c-paper); padding: 40px 0; }
.footer__grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.footer__brand-row { display: flex; align-items: center; gap: 12px; }
.footer__name { font-family: var(--f-serif); font-size: 19px; letter-spacing: .1em; }
.footer__addr { margin: 14px 0 0; font-size: 12px; opacity: .7; line-height: 1.9; }
.footer__label { font-size: 11px; color: var(--c-straw); letter-spacing: .18em; text-transform: uppercase; margin: 0 0 12px; font-weight: 400; }
.footer__col p { margin: 0; font-size: 13px; line-height: 2; opacity: .85; }
.footer__col a { text-decoration: none; }
.footer__bottom {
  margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(250,247,242,.12);
  display: flex; flex-direction: column; gap: 12px;
  font-size: 11px; letter-spacing: .12em; opacity: .6;
}

/* ============================================================
   GSAP 入場アニメーション初期状態（JS 有効時のみ・FOUC 回避）
   <head> インラインで html.js を付与 → 初回ペイントから非表示。
   prefers-reduced-motion または JS 無効では即時表示。
   ============================================================ */
.js .hero__card,
.js .hero__card .label, .js .hero__title, .js .hero__sub, .js .hero__cta,
.js .hero__pills li,
.js .about .label, .js .about .section__h,
.js .about__text, .js .about__images,
.js .signature .label, .js .signature .section__h, .js .signature .hand,
.js .sig__item,
.js .lineup .label, .js .lineup .section__h, .js .lineup .link-underline,
.js .cat,
.js .voice .label, .js .voice .section__h,
.js .voice__card, .js .voice__ratings, .js .voice__note,
.js .info .label, .js .info .section__h,
.js .info__panel, .js .info__map {
  opacity: 0;
  transform: translateY(24px);
}
/* レイアウト transform を持つ要素は opacity のみで隠す */
.js .hero__scroll { opacity: 0; }

/* ============================================================
   Tablet  (>= 768px)
   ============================================================ */
@media (min-width: 768px) {
  :root { --pad: 40px; }
  body { font-size: 16px; }
  .openbar__meta { display: flex; }
  .section__h { font-size: 38px; }
  .section { padding-top: 88px; padding-bottom: 88px; }
  .section__head { flex-direction: row; justify-content: space-between; align-items: baseline; }

  .hero { padding: 36px 0; }
  .hero__img { height: 520px; }
  .hero__card { position: absolute; left: 40px; bottom: 40px; margin: 0; max-width: 560px; padding: 32px 40px; }
  .hero__title { font-size: 44px; }
  .hero__sub { font-size: 14px; }

  .about__grid { grid-template-columns: 1.2fr 1fr; gap: 48px; }
  .about__text { font-size: 16px; }
  .about__images img, .about__quote { height: 210px; }

  .sig__grid { grid-template-columns: 1fr 1fr; gap: 20px; }

  .lineup__grid { grid-template-columns: repeat(3, 1fr); }

  .voice__grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .voice__ratings { flex-direction: row; justify-content: space-between; align-items: center; padding: 24px 40px; }

  .info__grid { grid-template-columns: 1fr 1.4fr; gap: 48px; }
  .info__map iframe { height: 440px; }

  .footer { padding: 56px 0; }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
  .footer__bottom { flex-direction: row; justify-content: space-between; }
}

/* ============================================================
   Desktop (>= 1024px)
   ============================================================ */
@media (min-width: 1024px) {
  :root { --pad: 64px; }
  .nav { display: flex; }
  .brand__ja { font-size: 19px; }
  .brand__en { font-size: 12px; }

  .section__h { font-size: 46px; }

  .hero__img { height: 620px; }
  .hero__card { max-width: 640px; }
  .hero__title { font-size: 54px; }
  .hero__pills {
    display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
    position: absolute; right: 40px; top: 40px; margin: 0; padding: 0; list-style: none;
  }
  .hero__pills li {
    background: rgba(45,42,38,.78); color: var(--c-paper);
    padding: 8px 14px; border-radius: 999px; font-size: 11px; letter-spacing: .14em;
    backdrop-filter: blur(8px);
  }
  .hero__scroll {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
    color: var(--c-paper); text-decoration: none; z-index: 3;
    filter: drop-shadow(0 2px 6px rgba(45,42,38,.4));
  }
  .hero__scroll-line { width: 1px; height: 34px; background: rgba(250,247,242,.6); }

  /* Signature 3+2 ボードグリッド（6カラム） */
  .sig__grid { grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(380px, auto); }
  .sig__item { grid-column: span 2; }
  .sig__item:nth-child(1) { grid-column: 1 / span 2; }
  .sig__item:nth-child(2) { grid-column: 3 / span 2; }
  .sig__item:nth-child(3) { grid-column: 5 / span 2; }
  .sig__item--wide:nth-child(4) { grid-column: 1 / span 3; }
  .sig__item--wide:nth-child(5) { grid-column: 4 / span 3; }
  .sig__item img { height: 230px; }
  .sig__item--wide img { height: 260px; }

  .lineup__grid { grid-template-columns: repeat(5, 1fr); gap: 20px; }
  .cat { min-height: 260px; padding: 24px; }
  .cat__icon { width: 100px; height: 100px; font-size: 20px; }

  .about__images img, .about__quote { height: 250px; }
  .about__quote-q { font-size: 26px; }
}

/* ============================================================
   モーション抑制（アクセシビリティ）
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .hero__card, .js .hero__card .label, .js .hero__title, .js .hero__sub, .js .hero__cta,
  .js .hero__pills li, .js .hero__scroll,
  .js .label, .js .section__h, .js .hand,
  .js .about__text, .js .about__images,
  .js .sig__item, .js .cat, .js .link-underline,
  .js .voice__card, .js .voice__ratings, .js .voice__note,
  .js .info__panel, .js .info__map {
    opacity: 1 !important; transform: none !important;
  }
  /* スクロールキューは中央寄せ transform を保持 */
  .js .hero__scroll { transform: translateX(-50%) !important; }
}
