/* hair salon つむぎ（制作見本）— DESIGN.md にしたがう */

/* ---------- 色・書体・余白（DESIGN 2〜5） ---------- */
:root {
  --kinari: #F3EEE4;   /* 生成り：土台 */
  --neri: #E8E0D0;     /* 練：料金の面と地図だけ */
  --sumi: #2B2723;     /* 墨：文字 */
  --haicha: #645B51;   /* 灰茶：補足 */
  --ai: #1C2738;       /* 藍：④の場面だけ */
  --ai-light: #2E4566; /* 藍・明るめ：ボタン・リンク・地図の線 */
  --ai-hover: #3A5479; /* 藍・明るめ（さわったとき） */
  --kei: #D8CEBC;      /* 罫：料金表の線だけ */
  --ai-sub: #A9B3C2;   /* 藍の上の補足字 */

  --mincho: "Shippori Mincho", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  --gothic: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", sans-serif;

  --fs-hero: min(clamp(44px, 28.5px + 4.13vw, 92px), 10.5vh);
  --fs-h2: clamp(32px, 22.4px + 2.58vw, 60px);
  --fs-h3: clamp(20px, 18.6px + 0.375vw, 24px);
  --fs-body: clamp(16px, 15.65px + 0.094vw, 17px);
  --fs-note: clamp(12px, 11.65px + 0.094vw, 13px);

  --gap-section: 96px;
  --pad-x: 24px;
  --header-h: 64px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}
@media (min-width: 1024px) {
  :root { --gap-section: 160px; --pad-x: 48px; }
}

/* ---------- 土台 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--kinari);
  color: var(--sumi);
  font-family: var(--gothic);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: .04em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--ai-light); }
button { font: inherit; color: inherit; letter-spacing: inherit; }

:focus-visible { outline: 2px solid var(--ai-light); outline-offset: 3px; }
.hero :focus-visible, .care :focus-visible, .site-header:not(.is-solid) :focus-visible { outline-color: var(--kinari); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 8px; top: -100px; z-index: 100;
  padding: 12px 16px; background: var(--sumi); color: var(--kinari); text-decoration: none;
}
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: calc(1200px + var(--pad-x) * 2); margin: 0 auto; padding: 0 var(--pad-x); }
.section { padding-top: var(--gap-section); }

/* 日本語の改行：文節で折り返し、最後の行に1〜2文字だけ残さない */
p, h1, h2, h3, li, dd, th, figcaption { word-break: auto-phrase; text-wrap: pretty; }

.note { font-size: var(--fs-note); color: var(--haicha); line-height: 1.7; letter-spacing: .03em; }
.phr { display: inline-block; }

.section-title {
  font-family: var(--mincho);
  font-weight: 500;
  font-size: var(--fs-h2);
  line-height: 1.45;
  letter-spacing: .06em;
  font-feature-settings: "palt";
  margin-bottom: 48px;
}
@media (min-width: 1024px) { .section-title { margin-bottom: 80px; } }

/* 写真の枠（比を先に決めて、読みこみで画面がずれないようにする） */
.photo { position: relative; overflow: hidden; background: var(--neri); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.ratio-4x5 { aspect-ratio: 4 / 5; }
.ratio-3x4 { aspect-ratio: 3 / 4; }
.ratio-1x1 { aspect-ratio: 1 / 1; }
.ratio-5x4 { aspect-ratio: 5 / 4; }
.is-pending { display: grid; place-items: center; }
.pending-label { font-size: var(--fs-note); color: var(--haicha); }

/* ---------- 上の帯 ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: calc(var(--header-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) calc(var(--pad-x) - 12px) 0;
  color: var(--kinari);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.site-header.is-solid { background: rgba(243, 238, 228, .96); color: var(--sumi); }
.brand {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-family: var(--mincho); font-weight: 500; font-size: 16px; letter-spacing: .08em;
  color: inherit; text-decoration: none;
}
.header-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle, .header-reserve {
  min-height: 44px; min-width: 44px; padding: 0 12px;
  background: none; border: 0; cursor: pointer;
  font-size: 14px; letter-spacing: .12em;
}
.header-reserve { display: none; }
@media (min-width: 768px) {
  .header-reserve {
    display: inline-flex; align-items: center;
    border: 1px solid currentColor; border-radius: 2px; padding: 0 20px;
    transition: background-color .2s, color .2s, border-color .2s;
  }
  .site-header.is-solid .header-reserve { background: var(--ai-light); border-color: var(--ai-light); color: var(--kinari); }
  .site-header.is-solid .header-reserve:hover { background: var(--ai-hover); border-color: var(--ai-hover); }
}

/* ご案内（ページ内の行き先） */
.site-nav {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column; justify-content: center;
  padding: 96px var(--pad-x) 48px;
  background: var(--kinari); color: var(--sumi);
}
.site-nav[hidden] { display: none; }
.nav-list { display: grid; gap: 8px; max-width: 560px; margin: 0 auto; width: 100%; }
.nav-list a {
  display: block; padding: 10px 0;
  font-family: var(--mincho); font-weight: 500; font-size: clamp(24px, 20px + 1vw, 32px);
  letter-spacing: .06em; color: var(--sumi); text-decoration: none;
}
.nav-list a:hover { color: var(--ai-light); }
.nav-close {
  position: absolute; top: calc(10px + env(safe-area-inset-top)); right: calc(var(--pad-x) - 12px);
  min-height: 44px; min-width: 44px; padding: 0 12px;
  background: none; border: 0; cursor: pointer; font-size: 14px; letter-spacing: .12em;
}
body.nav-open { overflow: hidden; }

/* ---------- ① 最初の画面 ---------- */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 560px;
  overflow: hidden; background: var(--ai); color: var(--kinari);
}
.hero-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 60%;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 28%, rgba(0,0,0,0) 62%, rgba(0,0,0,.35) 100%);
}
.hero-copy {
  position: absolute; z-index: 1;
  top: calc(env(safe-area-inset-top) + var(--header-h) + 5svh); left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: row-reverse; align-items: flex-end; gap: .9em;
}
.hero-title {
  writing-mode: vertical-rl;
  font-family: var(--mincho); font-weight: 600; font-size: var(--fs-hero);
  line-height: 1.5; letter-spacing: .1em;
  text-shadow: 0 0 24px rgba(28, 39, 56, .35);
}
.hero-title .col { display: block; }
.hero-sub {
  writing-mode: vertical-rl;
  font-size: 13px; letter-spacing: .3em; line-height: 1;
  opacity: .9;
}
.hero-note { position: absolute; z-index: 1; right: var(--pad-x); bottom: calc(16px + env(safe-area-inset-bottom)); color: var(--kinari); opacity: .85; }

@media (min-width: 768px) {
  .hero-photo img { object-position: 50% 50%; }
  .hero-copy { top: 50%; left: 47%; transform: translate(-50%, -50%); }
}

/* ---------- ② つむぎの考え ---------- */
.concept-text .line { font-size: clamp(17px, 15.6px + .38vw, 21px); line-height: 2.1; }
.concept-name { margin-top: 48px; max-width: 32em; }
@media (min-width: 1024px) {
  .concept-inner { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
  .concept-inner .section-title { grid-column: 2 / 7; }
  .concept-text, .concept-name { grid-column: 7 / 13; }
}

/* ---------- ③ スタイル写真 ---------- */
.style + .style { margin-top: 96px; }
.style-cap { margin-top: 24px; max-width: 32em; }
.style-cap > p + p { margin-top: 12px; }
.style-name {
  font-family: var(--mincho); font-weight: 500; font-size: var(--fs-h3);
  line-height: 1.5; letter-spacing: .06em; margin-bottom: 12px;
}
.style--b .photo { width: 72%; margin-left: auto; }
.style--b .style-cap { margin-left: auto; width: 72%; }
.style--c .photo { width: 86%; }
.style--c .photo img { object-position: 50% 28%; }

@media (min-width: 1024px) {
  .style { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
  .style + .style { margin-top: 160px; }
  .style .style-cap { margin: 0; width: auto; }
  .style--a .photo { grid-column: 1 / 8; grid-row: 1; }
  .style--a .style-cap { grid-column: 9 / 13; grid-row: 1; align-self: end; }
  .style--b .photo { grid-column: 7 / 12; grid-row: 1; width: auto; margin: 0; }
  .style--b .style-cap { grid-column: 2 / 6; grid-row: 1; align-self: center; }
  .style--c .photo { grid-column: 2 / 9; grid-row: 1; width: auto; }
  .style--c .style-cap { grid-column: 10 / 13; grid-row: 1; align-self: end; }
}

/* ---------- ④ 濃い色の場面（藍） ---------- */
.care {
  margin-top: var(--gap-section);
  padding: var(--gap-section) 0;
  background: var(--ai); color: var(--kinari);
}
.care .photo { background: rgba(243, 238, 228, .06); }
.care .pending-label, .care .note { color: var(--ai-sub); }
.care-photo figcaption { margin-top: 8px; }
.care-text { margin-top: 48px; }
.care-title {
  font-family: var(--mincho); font-weight: 500; font-size: var(--fs-h2);
  line-height: 1.5; letter-spacing: .06em; font-feature-settings: "palt";
  text-align: center; margin-bottom: 40px;
}
.care-text p:not(.care-title) + p { margin-top: 16px; }
.care-text > p { max-width: 32em; margin-left: auto; margin-right: auto; }
@media (min-width: 1024px) {
  .care-inner { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: center; }
  .care-photo { grid-column: 1 / 6; }
  .care-text { grid-column: 7 / 13; margin-top: 0; }
}

/* ---------- ⑤ スタッフ ---------- */
.staff-list { display: grid; gap: 64px; }
.member { display: grid; grid-template-columns: 44% 1fr; column-gap: 20px; align-items: end; }
.member--b { grid-template-columns: 1fr 44%; }
.member--b .photo { grid-column: 2; grid-row: 1; }
.member--b .member-text { grid-column: 1; grid-row: 1; }
.member-role { font-size: var(--fs-note); color: var(--haicha); letter-spacing: .1em; }
.member-name {
  font-family: var(--mincho); font-weight: 500; font-size: var(--fs-h3);
  line-height: 1.5; letter-spacing: .1em; margin: 4px 0 12px;
}
.member-text > p:last-child { font-size: 15px; line-height: 1.85; }
.staff-note { margin-top: 48px; }
@media (min-width: 768px) {
  .member-text > p:last-child { font-size: var(--fs-body); }
}
@media (min-width: 1024px) {
  .staff-list { grid-template-columns: repeat(12, 1fr); column-gap: 24px; gap: 0 24px; align-items: start; }
  .member, .member--b { display: block; }
  .member .member-text { margin-top: 24px; }
  .member--a { grid-column: 1 / 5; }
  .member--b { grid-column: 6 / 9; margin-top: 200px; }
  .member--c { grid-column: 10 / 13; margin-top: 80px; }
}

/* ---------- ⑥ 料金 ---------- */
.price-panel { background: var(--neri); padding: 32px 24px; }
.price-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.price-table tr { border-bottom: 1px solid var(--kei); }
.price-table th, .price-table td { padding: 20px 0; vertical-align: top; }
.price-table th { text-align: left; font-weight: 500; }
.price-table td {
  text-align: right; white-space: nowrap; padding-left: 16px;
  font-weight: 500; font-size: clamp(16px, 15.3px + .19vw, 18px); font-variant-numeric: tabular-nums;
}
.price-desc { display: block; font-weight: 400; font-size: var(--fs-note); color: var(--haicha); line-height: 1.7; margin-top: 2px; }
@media (min-width: 768px) { .price-panel { padding: 56px 64px; } }
@media (min-width: 1024px) {
  .price-inner { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
  .price-inner .section-title { grid-column: 1 / 5; }
  .price-panel { grid-column: 5 / 13; }
}

/* ---------- ⑦ 場所と予約 ---------- */
.map svg { width: 100%; }
.map-ground { fill: var(--neri); }
.map-river { fill: none; stroke: var(--kinari); stroke-width: 38; stroke-linecap: round; }
.map-river-line { fill: none; stroke: var(--ai-light); stroke-width: 1; stroke-dasharray: 2 8; opacity: .5; }
.map-roads { fill: none; stroke: var(--ai-light); stroke-linecap: round; }
.map-pin { fill: var(--ai-light); }
.map-pin-ring { fill: none; stroke: var(--ai-light); stroke-width: 1; }
.map-label { font-family: var(--gothic); font-size: 15px; fill: var(--haicha); letter-spacing: .08em; }
.map-label--shop { font-family: var(--mincho); font-size: 20px; font-weight: 600; fill: var(--sumi); }
.map figcaption { margin-top: 8px; }
/* スマホでは地図が縮むので、地図の中の文字を大きくして 12px 以上に保つ */
@media (max-width: 767px) {
  .map-label { font-size: 24px; }
  .map-label--shop { font-size: 32px; }
}

.access-info { margin-top: 48px; }
.info-list { display: grid; gap: 16px; margin-bottom: 40px; }
.info-list div { display: grid; grid-template-columns: 6em 1fr; column-gap: 16px; }
.info-list dt { font-size: 14px; color: var(--haicha); }

.btn-reserve {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; min-height: 56px; padding: 0 32px;
  background: var(--ai-light); color: var(--kinari);
  border: 0; border-radius: 2px; cursor: pointer;
  font-weight: 500; font-size: 16px; letter-spacing: .16em;
  transition: background-color .2s var(--ease);
}
.btn-reserve:hover { background: var(--ai-hover); }
@media (min-width: 768px) { .access-info .btn-reserve { width: auto; min-width: 280px; } }
@media (min-width: 1024px) {
  .access-inner { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
  .access-inner .section-title { grid-column: 1 / 13; }
  .map { grid-column: 1 / 8; }
  .access-info { grid-column: 9 / 13; margin-top: 0; align-self: center; }
}

/* ---------- 一番下 ---------- */
.site-footer { margin-top: var(--gap-section); padding: 64px 0 48px; border-top: 1px solid rgba(43, 39, 35, .12); }
.footer-brand { font-family: var(--mincho); font-weight: 500; font-size: 20px; letter-spacing: .08em; margin-bottom: 24px; }
.footer-notes { display: grid; gap: 4px; font-size: var(--fs-note); color: var(--haicha); line-height: 1.7; }
.footer-credit { margin-top: 32px; font-size: var(--fs-note); color: var(--haicha); }

/* ---------- スマホ：画面の下の予約ボタン ---------- */
.reserve-bar {
  position: fixed; inset: auto 0 0; z-index: 40;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  background: rgba(243, 238, 228, .96);
  transform: translateY(105%);
  transition: transform .3s var(--ease);
}
.reserve-bar.is-shown { transform: none; }
@media (max-width: 767px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (min-width: 768px) { .reserve-bar { display: none; } }

/* 予約ボタンを押したときの知らせ */
.toast {
  position: fixed; z-index: 70; left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  width: max-content; max-width: calc(100% - 32px);
  padding: 14px 20px; border-radius: 2px;
  background: var(--sumi); color: var(--kinari);
  font-size: 14px; line-height: 1.6; text-align: center;
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); transition-duration: .25s; }
@media (min-width: 768px) { .toast { bottom: 40px; } }

/* ---------- 動き（DESIGN 6）：JS が動くときだけ、最初に隠す ---------- */
.js .hero-photo img { opacity: 0; transition: opacity 1.2s var(--ease); }
.js .hero-title .col,
.js .hero-sub { opacity: 0; transform: translateY(-.35em); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .hero.is-ready .hero-photo img { opacity: 1; }
.js .hero.is-ready .hero-title .col,
.js .hero.is-ready .hero-sub { opacity: 1; transform: none; }
.js .hero.is-ready .hero-title .col:nth-child(1) { transition-delay: .9s; }
.js .hero.is-ready .hero-title .col:nth-child(2) { transition-delay: 1.35s; }
.js .hero.is-ready .hero-title .col:nth-child(3) { transition-delay: 1.8s; }
.js .hero.is-ready .hero-sub { transition-delay: 2.4s; }
.js .hero.is-ready .hero-sub { opacity: .9; }

.js [data-reveal=""] { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js [data-reveal=""].is-in { opacity: 1; transform: none; }

.js [data-reveal="lines"] .line { opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i, 0) * .12s); }
.js [data-reveal="lines"].is-in .line { opacity: 1; transform: none; }

.js [data-reveal="photo"] { opacity: 0; transition: opacity .9s var(--ease); }
.js [data-reveal="photo"] > * { transform: scale(1.04); transition: transform .9s var(--ease); }
.js [data-reveal="photo"].is-in { opacity: 1; }
.js [data-reveal="photo"].is-in > * { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation: none !important; }
  .js .hero-photo img, .js .hero-title .col, .js .hero-sub,
  .js [data-reveal], .js [data-reveal] .line, .js [data-reveal] > * { opacity: 1 !important; transform: none !important; }
}
