/* =========================================================
   Hidamari Cafe — 「陽だまり」をテーマにした個性的デザイン
   Palette: 生成り / 墨 / 蜂蜜色の陽だまり / 窓辺の緑
   Type: Zen Old Mincho(明朝・主役) + Fraunces(英字) + Zen Kaku Gothic New(ラベル)
   ========================================================= */

:root {
  --kinari:      #ECE4D3;   /* 生成り — 基調の紙 */
  --kinari-lo:   #F4EFE4;   /* すこし明るい面 */
  --sumi:        #241F18;   /* 墨 — 暗い地・文字 */
  --sumi-2:      #352E24;   /* やわらかい墨 */
  --hidamari:    #E3A44A;   /* 蜂蜜色の陽だまり — 差し色 */
  --hidamari-lo: #F0C889;   /* 光の淡いふち */
  --wakaba:      #7E8C63;   /* 窓辺の緑 — 静かな副色 */
  --ink:         #2C261E;   /* 本文（明るい地の上） */
  --ink-soft:    #6b6152;   /* 補助テキスト */
  --line:        #d8cdb7;   /* 罫線 */

  --display: 'Zen Old Mincho', serif;
  --latin:   'Fraunces', 'Zen Old Mincho', serif;
  --sans:    'Zen Kaku Gothic New', sans-serif;

  --edge: clamp(20px, 5vw, 72px);   /* 左右の余白 */
  --maxw: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--kinari);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 400;
  line-height: 2;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

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

/* キーボード操作時のフォーカス表示 */
.nobr { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--hidamari); outline-offset: 3px; border-radius: 2px; }
.hero :focus-visible, .section--dark :focus-visible, .foot :focus-visible { outline-color: var(--hidamari-lo); }

/* ナビでジャンプしたとき、固定ヘッダーとの間に少し余白を残す */
section[id], footer[id] { scroll-margin-top: 24px; }

/* 汎用ラップ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--edge); }

/* 縦書きの見出し（各セクションの脇の仕掛け） */
.vtitle {
  writing-mode: vertical-rl;
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: 0.28em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin: 0;              /* h2 の既定の余白を打ち消す */
  font-size: inherit;     /* サイズは .vtitle .ja 側で決める */
}
.vtitle::before {
  content: "";
  width: 1px;
  height: clamp(48px, 8vw, 96px);
  background: var(--hidamari);
  flex: none;
}
.vtitle .en {
  writing-mode: horizontal-tb;
  text-orientation: mixed;
}
.vtitle .en {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--hidamari);
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.vtitle .ja { font-size: clamp(20px, 2.4vw, 30px); color: var(--ink); }

/* =============== ヘッダー =============== */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 20px var(--edge);
  color: var(--kinari-lo);
  transition: background-color .4s ease, color .4s ease, padding .4s ease, box-shadow .4s ease;
}
.site-head.scrolled {
  background: color-mix(in srgb, var(--kinari) 92%, transparent);
  backdrop-filter: blur(8px);
  color: var(--ink);
  padding-block: 14px;
  box-shadow: 0 1px 0 var(--line);
}
.brand {
  font-family: var(--latin);
  font-size: 22px; font-weight: 500; letter-spacing: .04em;
  font-variation-settings: 'opsz' 40, 'SOFT' 40, 'WONK' 1;
  margin-right: auto;
}
.brand .kanji { font-family: var(--display); font-size: 13px; letter-spacing:.3em; opacity:.75; margin-left:10px; }
.nav-links { display: flex; gap: 26px; }
.nav-links a {
  font-family: var(--sans); font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  position: relative; padding-block: 4px;
}
.nav-links a::after {
  content:""; position:absolute; left:0; right:100%; bottom:0; height:1px;
  background: currentColor; transition: right .3s ease;
}
.nav-links a:hover::after { right: 0; }
.head-cta {
  font-family: var(--sans); font-size: 11px; letter-spacing:.2em; text-transform: uppercase;
  border: 1px solid currentColor; border-radius: 999px; padding: 8px 20px;
  transition: background-color .3s, color .3s;
}
.site-head.scrolled .head-cta:hover { background: var(--sumi); color: var(--kinari); border-color: var(--sumi); }
.head-cta:hover { background: var(--kinari-lo); color: var(--sumi); }
.nav-toggle { display: none; }

/* =============== ヒーロー =============== */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  overflow: hidden; color: var(--kinari-lo);
}
.hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transform: scale(1.06);
}
/* 墨の下地グラデ（文字の可読性） */
.hero__shade {
  position:absolute; inset:0;
  background:
    linear-gradient(180deg, rgba(20,16,11,.42) 0%, rgba(20,16,11,0) 30%),
    linear-gradient(0deg, rgba(20,16,11,.85) 0%, rgba(20,16,11,.15) 45%, rgba(20,16,11,0) 65%);
}
/* 陽だまり＝ゆっくり呼吸する蜂蜜色の光（署名） */
.hero__sun {
  position: absolute; inset: -20%;
  background: radial-gradient(38% 42% at 62% 40%,
              rgba(240,200,137,.55) 0%,
              rgba(227,164,74,.28) 32%,
              rgba(227,164,74,0) 68%);
  mix-blend-mode: soft-light;
  animation: sun-drift 22s ease-in-out infinite alternate;
  will-change: transform, opacity;
}
@keyframes sun-drift {
  0%   { transform: translate(-3%, 2%)  scale(1);    opacity: .85; }
  100% { transform: translate(4%, -4%)  scale(1.12); opacity: 1; }
}

.hero__inner {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--edge) clamp(48px, 9vh, 120px);
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 32px;
}
.hero__lead {
  max-width: 30ch; font-size: 15px; line-height: 2.3; letter-spacing:.06em;
  color: rgba(244,239,228,.9); margin: 0 0 6px;
}
.hero__lead .en {
  font-family: var(--sans); font-size: 11px; letter-spacing:.34em; text-transform: uppercase;
  color: var(--hidamari-lo); display:block; margin-bottom: 20px;
}
/* 縦書きのキャッチ */
.hero__title {
  writing-mode: vertical-rl;
  font-family: var(--display); font-weight: 500;
  /* 幅だけでなく高さにも連動させる。縦画面が短いノートPCでも文字が溢れない */
  font-size: clamp(2.2rem, min(5.4vw, 10vh), 4.6rem);
  letter-spacing: .14em; line-height: 1.5;
  margin: 0;
  /* 縦書きでは height が「1行の長さ」。auto にすると中身の長さぴったりになる */
  height: auto;
  white-space: nowrap;   /* 改行は <br> の位置だけ。勝手に折り返させない */
  text-shadow: 0 2px 30px rgba(20,16,11,.5);
}
.hero__title em {
  font-style: normal;
  color: var(--hidamari-lo);
}
.hero__scroll {
  position: absolute; left: var(--edge); bottom: 28px; z-index: 2;
  font-family: var(--sans); font-size: 10px; letter-spacing:.3em; text-transform: uppercase;
  color: rgba(244,239,228,.7); display: inline-flex; align-items:center; gap: 10px;
}
.hero__scroll .bar { width: 1px; height: 40px; background: rgba(244,239,228,.5); position: relative; overflow: hidden; }
.hero__scroll .bar::after { content:""; position:absolute; inset:0; background: var(--hidamari-lo); animation: scroll-run 2.4s ease-in-out infinite; }
@keyframes scroll-run { 0%{transform:translateY(-100%)} 60%,100%{transform:translateY(100%)} }

/* =============== セクション土台 =============== */
.section { padding-block: clamp(72px, 12vh, 148px); }
.section--dark { background: var(--sumi); color: var(--kinari-lo); }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }

/* =============== この場所について =============== */
.about .wrap {
  display: grid; grid-template-columns: auto 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center;
}
.about__fig { position: relative; }
/* height:auto を明示しないと、img の height 属性が優先されて aspect-ratio が効かない */
.about__fig img { width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; }
.about__fig .frame { position:absolute; inset: 14px -14px -14px 14px; border:1px solid var(--hidamari); z-index:-1; }
.about__body h3 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.9; letter-spacing:.04em;
  margin: 0 0 22px;
}
.about__body p { font-size: 15px; line-height: 2.5; letter-spacing:.05em; color: var(--ink); margin: 0 0 18px; max-width: 34ch; }
.about__body p.dim { color: var(--ink-soft); font-size: 14px; }
.link-more {
  display: inline-flex; align-items:center; gap: 12px; margin-top: 14px;
  font-family: var(--sans); font-size: 11px; letter-spacing:.24em; text-transform: uppercase; color: var(--ink);
}
.link-more .dash { width: 34px; height:1px; background: var(--ink); transition: width .3s ease, background-color .3s; }
.link-more:hover .dash { width: 54px; background: var(--hidamari); }

/* =============== お品書き（Menu） =============== */
.menu .wrap { display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 5vw, 72px); }
.menu__list { display: flex; flex-direction: column; }
.menu__row {
  display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 24px;
  padding: 22px 0; border-bottom: 1px solid var(--line); position: relative;
}
.menu__thumb { width: 84px; height: 84px; overflow: hidden; border-radius: 2px; }
.menu__thumb img { width:100%; height:100%; object-fit: cover; transition: transform .6s ease; }
.menu__row:hover .menu__thumb img { transform: scale(1.08); }
.menu__name { display: flex; flex-direction: column; gap: 4px; }
.menu__name b { font-family: var(--display); font-weight: 500; font-size: 18px; letter-spacing:.06em; }
.menu__name small { font-family: var(--sans); font-size: 12px; letter-spacing:.04em; color: var(--ink-soft); font-weight: 400; }
.menu__price { font-family: var(--latin); font-size: 22px; font-weight: 500; letter-spacing:.02em; font-variation-settings:'opsz' 40; }
.menu__price .yen { font-size: 13px; color: var(--ink-soft); margin-right: 2px; }
.menu__group {
  margin: 34px 0 2px; font-family: var(--sans); font-size: 12px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--hidamari);
}
.menu__group:first-child { margin-top: 0; }
.menu__row--text { grid-template-columns: 1fr auto; gap: 24px; }
.menu__note { margin-top: 28px; font-size: 13px; letter-spacing:.06em; color: var(--ink-soft); }

/* =============== ひだまり日記（Gallery / IG） =============== */
.diary__head { text-align: center; margin-bottom: clamp(36px, 6vh, 64px); }
.diary__head .en { display:block; font-family: var(--sans); font-size: 11px; letter-spacing:.34em; text-transform: uppercase; color: var(--hidamari); margin-bottom: 14px; }
.diary__head h2 { font-family: var(--display); font-weight: 500; font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing:.14em; margin: 0; }
.diary__head p { font-family: var(--sans); font-size: 12px; letter-spacing:.2em; color: rgba(236,228,211,.7); margin: 10px 0 0; }
/* Instagram埋め込み（SnapWidget） */
.ig-embeds {
  display: flex;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
}
.ig-embeds .snapwidget-widget {
  width: 100%;
  max-width: 765px;
  aspect-ratio: 765 / 510;
  height: auto;
  border: none;
  overflow: hidden;
  border-radius: 6px;
}

.diary__more { text-align: center; margin-top: 44px; }
.diary__more a {
  display: inline-flex; align-items:center; gap: 12px;
  font-family: var(--sans); font-size: 11px; letter-spacing:.24em; text-transform: uppercase;
  border-bottom: 1px solid var(--hidamari); padding-bottom: 8px; color: var(--kinari-lo);
  transition: color .3s;
}
.diary__more a:hover { color: var(--hidamari-lo); }

/* =============== よくあるご質問（FAQ） =============== */
.faq .wrap { display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 5vw, 72px); }
.faq__list { max-width: 760px; }
.faq__item { border-top: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 1px solid var(--line); }
.faq__q {
  cursor: pointer;
  list-style: none;              /* ブラウザ既定の三角マークを消す */
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  padding: 24px 4px; text-align: left; font-family: var(--display); color: var(--ink);
  font-size: 16px; letter-spacing:.05em;
}
.faq__q::-webkit-details-marker { display: none; }   /* Safari 用 */
.faq__q .q { font-family: var(--latin); font-size: 15px; color: var(--hidamari); font-weight: 500; }
.faq__q .sign { position: relative; width: 14px; height: 14px; flex: none; }
.faq__q .sign::before, .faq__q .sign::after { content:""; position:absolute; background: var(--wakaba); transition: transform .3s ease, opacity .3s ease; }
.faq__q .sign::before { top:50%; left:0; right:0; height:1px; transform: translateY(-50%); }
.faq__q .sign::after  { left:50%; top:0; bottom:0; width:1px; transform: translateX(-50%); }
.faq__item[open] .faq__q .sign::after { transform: translateX(-50%) scaleY(0); opacity: 0; }
.faq__item[open] .faq__a { animation: faq-open .35s ease both; }
@keyframes faq-open { from { opacity: 0; transform: translateY(-6px); } }
.faq__a p {
  margin: 0; padding: 0 4px 26px 44px; font-size: 14px; line-height: 2.3; letter-spacing:.04em; color: var(--ink-soft);
}

/* =============== フッター / ご案内 =============== */
.foot { background: var(--sumi); color: var(--kinari-lo); padding-top: clamp(64px, 10vh, 120px); }
.foot__grid {
  max-width: var(--maxw); margin: 0 auto; padding-inline: var(--edge);
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start;
}
.foot__brand { font-family: var(--latin); font-size: 30px; font-weight: 500; letter-spacing:.04em; font-variation-settings:'opsz' 60,'SOFT' 40; }
.foot__brand .kanji { display:block; font-family: var(--display); font-size: 13px; letter-spacing:.3em; opacity:.7; margin-top: 10px; }
.foot__brand .tag { display:block; font-family: var(--display); font-size: 14px; letter-spacing:.1em; color: rgba(236,228,211,.68); margin-top: 22px; max-width: 26ch; line-height: 2.1; }
.foot h2 { font-family: var(--sans); font-size: 11px; letter-spacing:.24em; text-transform: uppercase; color: var(--hidamari); margin: 0 0 18px; font-weight: 500; }
.foot__info p, .foot__nav a { font-size: 14px; line-height: 2.2; letter-spacing:.05em; color: rgba(236,228,211,.85); margin: 0; }
.foot__info .sub { color: rgba(236,228,211,.55); font-size: 12px; }
.foot__nav { display: grid; gap: 8px; }
.foot__nav a { font-family: var(--sans); font-size: 12px; letter-spacing:.16em; text-transform: uppercase; width: max-content; transition: color .3s; }
.foot__nav a:hover { color: var(--hidamari-lo); }
.foot__social { display: flex; gap: 18px; margin-top: 22px; }
.foot__social a { color: rgba(236,228,211,.8); transition: color .3s, transform .3s; }
.foot__social a:hover { color: var(--hidamari-lo); transform: translateY(-2px); }
.foot__map {
  margin-top: 18px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(236,228,211,.14);
}
.foot__map iframe {
  display: block;
  width: 100%;
  height: 340px;
  border: 0;
  filter: grayscale(.2) contrast(.95);
}
.foot__copy {
  margin-top: clamp(48px, 8vh, 88px); border-top: 1px solid rgba(236,228,211,.14);
  padding: 20px var(--edge); text-align: center;
  font-family: var(--sans); font-size: 11px; letter-spacing:.14em; color: rgba(236,228,211,.5);
}

/* =============== レスポンシブ =============== */
@media (max-width: 900px) {
  .about .wrap { grid-template-columns: 1fr; }
  .about__fig { max-width: 420px; }
  .menu .wrap, .faq .wrap { grid-template-columns: 1fr; }
  .vtitle { writing-mode: horizontal-tb; flex-direction: row; }
  .vtitle::before { width: clamp(40px,10vw,72px); height: 1px; }
  .vtitle .en { writing-mode: horizontal-tb; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__map iframe { height: 220px; }
}
@media (max-width: 640px) {
  .nav-links, .head-cta { display: none; }
  .nav-toggle { display: inline-flex; margin-left: auto; background:none; border:1px solid currentColor; border-radius:8px; color: inherit; padding:8px 10px; cursor:pointer; }
  .site-head.open { background: var(--sumi); color: var(--kinari-lo); }
  .site-head.open .nav-links { display: flex; flex-direction: column; gap: 20px; position: absolute; top: 100%; left:0; right:0; background: var(--sumi); padding: 24px var(--edge) 30px; }
  .site-head.open .head-cta { display: inline-flex; width: max-content; }
  .hero__inner { grid-template-columns: 1fr; gap: 20px; }
  .hero__lead { order: 2; }
  .menu__row { grid-template-columns: 60px 1fr auto; gap: 14px; }
  .menu__row--text { grid-template-columns: 1fr auto; }
  .menu__thumb { width: 60px; height: 60px; }
  .foot__grid { grid-template-columns: 1fr; }
}

/* モーションを控える設定を尊重 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__sun { animation: none; }
  .hero__scroll .bar::after { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__img { transform: none; }
  .faq__item[open] .faq__a { animation: none; }
}
