/* こやバン。値の出所は docs/01_設計書_CPO.md §4 */
:root {
  --sumi: #16120f;
  --kinari: #f3eee4;
  --ink: #2a241f;
  --sub: #665c52;
  --sub-dark: #b9ae9f;
  --brass: #b89868;
  --brass-deep: #7a5c32;
  --wood: #7c4f2b;
  --line: rgba(42, 36, 31, 0.18);
  --line-dark: rgba(243, 238, 228, 0.18);
  --mincho: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --gothic: "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;
  --num: "Cormorant Garamond", "Hiragino Mincho ProN", serif;
  --pad: 24px;
  --sec: 96px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--sumi);
  color: var(--ink);
  font: 400 16px/2 var(--gothic);
  letter-spacing: 0.04em;
  line-break: strict;
  overflow-wrap: anywhere;
}
img { display: block; width: 100%; height: auto; }
a { color: inherit; }
ul, ol { list-style: none; }
h1, h2, h3 { font-family: var(--mincho); font-weight: 500; }
p + p { margin-top: 1.6em; }
small { font-size: 13px; }

/* ---------- ボタンと文字リンク ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  width: 100%;
  max-width: 420px;
  padding: 8px 16px;
  background: var(--wood);
  color: #faf7f1;
  border: 1px solid var(--wood);
  border-radius: 2px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
}
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--wood); }
.btn:hover { filter: brightness(1.1); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.to { font-size: 13px; line-height: 1.8; margin-top: 8px; color: var(--sub); }
.textlink {
  display: inline-block;
  padding: 8px 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
  text-decoration-color: var(--brass);
}

/* ---------- 1. hero ---------- */
.hero { position: relative; background: var(--sumi); color: var(--kinari); overflow: hidden; }
.hero-photo { position: relative; height: min(116.3vw, 54svh, 520px); min-height: 360px; overflow: hidden; }
.hero-photo picture, .hero-photo img { display: block; width: 100%; height: 100%; }
.hero-photo img { object-fit: cover; object-position: 50% 78%; animation: zoom 8s ease-out 1 both; }
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(22, 18, 15, 0.62) 0%, rgba(22, 18, 15, 0.34) 30%, rgba(22, 18, 15, 0) 48%),
    linear-gradient(0deg, var(--sumi) 0%, rgba(22, 18, 15, 0) 12%);
}
@keyframes zoom { from { transform: scale(1.05); } to { transform: scale(1); } }
.hero-brand { position: absolute; z-index: 2; left: 20px; top: 20px; text-shadow: 0 0 12px rgba(0, 0, 0, 0.6); }
.kicker { font: 400 13px/1.8 var(--gothic); letter-spacing: 0.02em; }
.hero .yago { margin-top: 12px; font: 600 30px/1.4 var(--mincho); letter-spacing: 0.24em; }
.yago span { display: block; font-weight: 500; font-size: 14px; }
.hero-copy {
  font-family: var(--mincho);
  font-weight: 500;
  position: absolute;
  z-index: 2;
  top: 22px;
  right: 14px;
  writing-mode: vertical-rl;
  font-size: 23px;
  line-height: 1.85;
  letter-spacing: 0.18em;
  text-shadow: 0 0 14px rgba(0, 0, 0, 0.7);
}
.hero-copy span { display: block; }
.hero-copy span + span { padding-top: 1.2em; }
.hero-main { padding: 12px var(--pad) 56px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 16px; }
.facts li { padding: 8px 0; line-height: 1.6; border-bottom: 1px solid var(--line-dark); }
.facts li:nth-child(odd) { padding-right: 8px; border-right: 1px solid var(--line-dark); }
.facts li:nth-child(even) { padding-left: 12px; }
.facts b { display: block; font: 500 15px/1.7 var(--mincho); letter-spacing: 0.02em; }
.facts small { display: block; color: var(--sub-dark); letter-spacing: 0; }
.hero .to { color: var(--sub-dark); }
.hero-text { margin-top: 56px; }

/* ---------- 目次（hero の下で上に貼りつく） ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 14px;
  background: rgba(22, 18, 15, 0.96);
  color: var(--kinari);
  border-bottom: 1px solid var(--line-dark);
  white-space: nowrap;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.topbar a { text-decoration: none; line-height: 48px; }
.topbar .logo { font: 600 15px/48px var(--mincho); letter-spacing: 0.16em; }

/* ---------- 章の共通 ---------- */
.sec { padding: var(--sec) var(--pad); scroll-margin-top: 48px; }
.light { background: var(--kinari); color: var(--ink); }
.dark { background: var(--sumi); color: var(--kinari); }
.wrap { max-width: 1080px; margin: 0 auto; }
.wrap.narrow { max-width: 640px; }
.head { font-size: 24px; line-height: 1.7; letter-spacing: 0.1em; text-align: center; margin-bottom: 40px; }
.head::before { content: ""; display: block; width: 1px; height: 48px; margin: 0 auto 32px; background: var(--brass-deep); }
.dark .head::before { background: var(--brass); }
/* 章の地の色が続くときは上の余白を詰める */
.light + .light { padding-top: 0; }
.read { max-width: 34em; margin: 48px auto 0; }
.note { font-size: 13px; line-height: 1.8; color: var(--sub); }
.read p + .note, .wrap p + .note { margin-top: 1.6em; }
.dark .note, .dark .to, .dark figcaption { color: var(--sub-dark); }
.center { text-align: center; }
figure figcaption { margin-top: 8px; font-size: 13px; line-height: 1.8; color: var(--sub); }
.sub {
  font-size: 17px;
  line-height: 1.8;
  letter-spacing: 0.16em;
  color: var(--brass-deep);
  margin: 64px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.dark .sub { color: var(--brass); border-color: var(--line-dark); }

/* ---------- 2. inside ---------- */
.row .txt { margin: 32px 0 64px; }
.lead { font: 500 21px/2 var(--mincho); letter-spacing: 0.1em; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 64px; }

/* ---------- 3. story ---------- */
.tate {
  writing-mode: vertical-rl;
  font-size: 24px;
  line-height: 1.7;
  letter-spacing: 0.14em;
  margin: 40px 8px 0 auto;
  height: 15.5em;
}
.sign { font: 500 18px/2 var(--mincho); letter-spacing: 0.2em; text-align: right; }

/* ---------- 4. scenes ---------- */
.wide { margin-bottom: 64px; }
.scene { max-width: 34em; margin: 0 auto 64px; }
.scene h3 { display: flex; align-items: baseline; gap: 16px; font-size: 21px; letter-spacing: 0.16em; margin-bottom: 12px; }
.no { font-size: 15px; color: var(--brass-deep); }
.scene.has-photo figure { margin-bottom: 32px; }
.scene .note { margin-top: 8px; }

/* ---------- 5. equipment ---------- */
.intro { text-align: center; }
.menu > div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.menu dt { font: 500 15px/1.9 var(--mincho); letter-spacing: 0.12em; }
.menu dd { font-size: 15px; line-height: 1.9; letter-spacing: 0.02em; }
.menu dd span { display: inline-block; }
.lines li { padding: 12px 0; font-size: 15px; line-height: 1.9; letter-spacing: 0.02em; border-bottom: 1px solid var(--line); }
.lines small { display: block; color: var(--sub); }
.aroma { margin-top: 64px; }
.fee { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.9; letter-spacing: 0.02em; }
.fee th, .fee td { padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 400; text-align: left; vertical-align: top; }
.fee td { text-align: right; white-space: nowrap; padding-left: 8px; }
.dark .fee th, .dark .fee td { border-color: var(--line-dark); }

/* ---------- 6. price ---------- */
.price-head { font-size: 22px; line-height: 1.3; letter-spacing: 0.08em; text-align: center; margin-bottom: 32px; }
.price-head::before { content: ""; display: block; width: 1px; height: 48px; margin: 0 auto 32px; background: var(--brass); }
.price-head span { display: block; margin-top: 8px; }
.price-head b { font: 500 64px/1.1 var(--num); letter-spacing: 0.02em; margin-right: 8px; font-variant-numeric: lining-nums; }
#price .wrap > p { text-align: left; }
#price .btn { margin: 56px auto 0; }
#price .to, #closing .to { text-align: center; }

/* ---------- 7. flow ---------- */
.steps { counter-reset: step; margin: 48px 0; }
.steps li { counter-increment: step; position: relative; padding: 24px 0 24px 52px; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 4px;
  top: 18px;
  font: 500 34px/1.2 var(--num);
  font-variant-numeric: lining-nums;
  color: var(--brass-deep);
}
.steps h3 { font-size: 18px; line-height: 1.8; letter-spacing: 0.08em; margin-bottom: 8px; }
.steps p { font-size: 15px; line-height: 1.9; }
#flow .btn { margin: 0 auto; }
#flow .btn.ghost { margin-top: 32px; }
blockquote { margin: 24px 0; padding: 16px 20px; border: 1px solid var(--line); font-size: 15px; line-height: 2; }

/* ---------- 8. rules / faq ---------- */
.important { margin-top: 24px; padding: 16px 0; border-top: 1px solid var(--brass-deep); border-bottom: 1px solid var(--brass-deep); font-weight: 500; }
details { border-bottom: 1px solid var(--line); }
summary { position: relative; cursor: pointer; list-style: none; padding: 16px 40px 16px 0; font-size: 15px; line-height: 1.9; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "＋"; position: absolute; right: 4px; top: 16px; color: var(--brass-deep); }
details[open] summary::after { content: "－"; }
details p { padding: 0 0 20px; font-size: 15px; line-height: 1.9; color: var(--ink); }

/* ---------- 10. closing / footer ---------- */
#closing { text-align: center; }
#closing figure { margin-bottom: 48px; }
#closing .head { margin-bottom: 24px; }
#closing .head::before { display: none; }
#closing .btn { margin: 48px auto 0; }
#closing .center { margin-top: 24px; }
.foot { padding: 40px var(--pad) calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-dark); color: var(--sub-dark); text-align: center; font-size: 13px; line-height: 1.8; }
.foot p + p { margin-top: 4px; }
.foot .foot-name { font: 600 17px/2 var(--mincho); letter-spacing: 0.24em; color: var(--kinari); }
.foot a { display: inline-block; padding: 8px 0; text-underline-offset: 5px; }

/* ---------- 常に出る予約 ---------- */
.bar {
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  background: var(--sumi);
  color: var(--kinari);
  border-top: 1px solid var(--line-dark);
  transition: transform 0.35s ease, visibility 0.35s;
}
.bar p { flex: 0 0 auto; font-size: 13px; line-height: 1.5; letter-spacing: 0; }
.bar p b { font: 500 22px/1.3 var(--num); font-variant-numeric: lining-nums; }
.bar p small { display: block; color: var(--sub-dark); }
.bar .btn { flex: 1 1 auto; padding: 4px 8px; font-size: 15px; letter-spacing: 0.02em; }
.bar .btn small { display: block; font-weight: 400; line-height: 1.4; }
.bar.off { transform: translateY(100%); visibility: hidden; }
.side { display: none; }

/* ---------- 現れ方 ---------- */
.reveal { transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.pre { opacity: 0; transform: translateY(12px); }

/* ---------- 中くらいの画面 ---------- */
@media (min-width: 600px) and (max-width: 959px) {
  .row figure, .story-top figure, .scene.tall figure { max-width: 560px; margin-left: auto; margin-right: auto; }
  .row .txt, .scene.has-photo > div { max-width: 34em; margin-left: auto; margin-right: auto; }
  .hero-main { max-width: 520px; margin: 0 auto; }
  .hero-photo { height: min(62svh, 640px); }
  .bar { justify-content: center; }
  .bar .btn { flex: 0 1 360px; }
}

/* ---------- PC ---------- */
@media (min-width: 960px) {
  :root { --sec: 160px; --pad: 72px; }
  body { font-size: 17px; }

  .hero { display: grid; grid-template-columns: 58% 42%; grid-template-rows: 100%; height: 100vh; height: 100svh; min-height: 680px; }
  .hero-photo { grid-column: 1; grid-row: 1; height: 100%; min-height: 0; }
  .hero-photo img { object-position: 12% 75%; }
  .hero-photo::after {
    background:
      linear-gradient(180deg, rgba(22, 18, 15, 0.6) 0%, rgba(22, 18, 15, 0.3) 24%, rgba(22, 18, 15, 0) 42%),
      linear-gradient(270deg, var(--sumi) 0%, rgba(22, 18, 15, 0) 8%);
  }
  .hero-brand { left: 40px; top: 40px; }
  .hero .yago { font-size: 44px; }
  .yago span { font-size: 17px; }
  .hero-main { grid-column: 2; grid-row: 1; align-self: center; width: 100%; max-width: 480px; padding: 32px 120px 32px 32px; }
  .hero-copy { grid-column: 2; grid-row: 1; top: 50%; right: 64px; transform: translateY(-50%); font-size: clamp(28px, 2.6vw, 38px); line-height: 1.9; text-shadow: none; }
  .facts { grid-template-columns: 1fr; }
  .facts li:nth-child(n) { padding: 8px 0; border-right: 0; }
  .hero-text { margin-top: 24px; font-size: 15px; }
  .hero-text p + p { margin-top: 0.8em; }

  .topbar { justify-content: center; gap: 48px; font-size: 14px; height: 56px; }
  .topbar a { line-height: 56px; }
  .topbar .logo { margin-right: 40px; font-size: 17px; line-height: 56px; }
  .sec { scroll-margin-top: 56px; }

  .head { font-size: 34px; margin-bottom: 72px; }
  .row { display: grid; grid-template-columns: 7fr 4fr; gap: 72px; align-items: center; margin-bottom: 96px; }
  .row.rev { grid-template-columns: 4fr 7fr; }
  .row.rev figure { order: 2; }
  .row .txt { margin: 0; }
  .lead { font-size: 26px; }
  .pair { gap: 16px; margin-bottom: 96px; }

  .story-top { display: grid; grid-template-columns: 1fr 140px; gap: 48px; align-items: start; }
  .tate { margin: 0 auto; font-size: 34px; }

  .wide { margin-bottom: 96px; }
  .scene { margin-bottom: 96px; }
  .scene.has-photo { max-width: none; display: grid; grid-template-columns: 7fr 4fr; gap: 72px; align-items: center; }
  .scene.has-photo figure { margin: 0; }
  .scene.has-photo.tall { grid-template-columns: 4fr 5fr; max-width: 920px; }

  .price-head { font-size: 28px; }
  .price-head b { font-size: 88px; }

  .bar { display: none; }
  .side {
    position: fixed;
    z-index: 30;
    right: 0;
    top: 50%;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 48px;
    padding: 18px 0;
    transform: translateY(-50%);
    background: var(--wood);
    color: #faf7f1;
    text-decoration: none;
    writing-mode: vertical-rl;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.14em;
    border-radius: 2px 0 0 2px;
    flex-direction: column;
    transition: opacity 0.35s, visibility 0.35s;
  }
  .side small { display: none; }
  .side.off { opacity: 0; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-photo img { animation: none; }
  .reveal, .reveal.pre { opacity: 1; transform: none; transition: none; }
  .bar, .side { transition: none; }
}
