/* =========================================================
   町家の宿 鞠屋 — style.css
   ブランドカラー: #69821b ／ 差し色: #8c6450
   ========================================================= */

:root {
  --brand: #69821b;
  --brand-dark: #4f6413;
  --accent: #8c6450;
  --ink: #2b2723;
  --ink-soft: #5d5650;
  --paper: #f7f4ee;
  --paper-2: #efe9df;
  --white: #fff;
  --line: #ddd5c8;
  --header-h: 84px;
  --serif: "Shippori Mincho", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  --sans: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
}
html[lang="zh"] {
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", sans-serif;
}
html[lang="ko"] {
  --serif: "Noto Serif KR", "AppleMyungjo", "Batang", serif;
  --sans: "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
html[lang="en"] {
  --serif: "Shippori Mincho", Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 2;
  letter-spacing: .05em;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; }
p { margin: 0 0 1.2em; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 32px;
  background: rgba(247, 244, 238, .94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.logo img { height: 52px; width: auto; }

.global-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.global-nav a {
  font-family: var(--serif); font-size: 16px; position: relative; padding: 4px 0;
  transition: color .3s;
}
.global-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px;
  background: var(--brand); transition: width .3s;
}
.global-nav a:hover { color: var(--brand); }
.global-nav a:hover::after { width: 100%; }

.header-right { display: flex; align-items: center; gap: 18px; }
.lang-switch { display: flex; font-size: 12px; }
.lang-switch button {
  background: none; border: 0; cursor: pointer; padding: 4px 8px;
  font: inherit; color: var(--ink-soft); letter-spacing: .05em;
  border-right: 1px solid var(--line);
}
.lang-switch button:last-child { border-right: 0; }
.lang-switch button.is-current { color: var(--brand); font-weight: 700; }
.lang-switch button:hover { color: var(--accent); }

.btn-reserve {
  display: inline-block; white-space: nowrap;
  background: var(--brand); color: var(--white);
  font-family: var(--serif); font-size: 14px; font-weight: 700; letter-spacing: .1em;
  padding: 12px 24px; border-radius: 2px;
  transition: background .3s;
}
.btn-reserve:hover { background: var(--accent); }
.btn-reserve-lg { padding: 18px 56px; font-size: 16px; }

.menu-toggle {
  display: none; width: 40px; height: 40px; position: relative;
  background: none; border: 0; cursor: pointer;
}
.menu-toggle span {
  position: absolute; left: 8px; right: 8px; height: 1.5px; background: var(--ink);
  transition: transform .3s, top .3s;
}
.menu-toggle span:nth-child(1) { top: 15px; }
.menu-toggle span:nth-child(2) { top: 24px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 19px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; height: 100vh; min-height: 560px;
  margin-top: var(--header-h); height: calc(100vh - var(--header-h));
  overflow: hidden; color: var(--white);
}
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.06);
  transition: opacity 2s ease, transform 8s linear;
}
.hero-slide.is-active { opacity: 1; transform: scale(1); }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to left, rgba(0,0,0,.55), rgba(0,0,0,0) 50%),
              linear-gradient(to top, rgba(0,0,0,.35), rgba(0,0,0,0) 30%);
}
html[lang="en"] .hero::after,
html[lang="ko"] .hero::after {
  background: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,0) 60%);
}
.hero-copy {
  position: absolute; z-index: 2; top: 50%; right: 9vw; transform: translateY(-50%);
  writing-mode: vertical-rl; text-orientation: upright;
  font-size: clamp(22px, 2.6vw, 36px); font-weight: 400;
  line-height: 2.1; letter-spacing: .28em;
  text-shadow: 0 0 18px rgba(0,0,0,.45);
  white-space: nowrap;
}
/* 英語・韓国語は横組で表示 */
html[lang="en"] .hero-copy,
html[lang="ko"] .hero-copy {
  writing-mode: horizontal-tb; white-space: normal;
  top: auto; bottom: 14vh; left: 40px; right: auto; transform: none;
  max-width: min(620px, 88vw); text-align: left;
  letter-spacing: .06em; line-height: 1.7;
  font-size: clamp(22px, 2.4vw, 34px);
}
html[lang="en"] .hero-copy { letter-spacing: .02em; }
.hero-caption { position: absolute; z-index: 2; left: 40px; bottom: 32px; }
.hero-caption p { margin: 0; font-family: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif; line-height: 1.8; }
.hero-name { font-size: 13px; letter-spacing: .3em; }
/* 撮影クレジット：Machiya Stay Mariya より 2px 小さい明朝体 */
.hero-credit { font-size: 11px; letter-spacing: .2em; opacity: .9; }
.scroll-down {
  position: absolute; z-index: 2; left: 50%; bottom: 0; transform: translateX(-50%);
  font-size: 11px; letter-spacing: .25em; padding-bottom: 70px;
}
.scroll-down::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 1px; height: 60px;
  background: rgba(255,255,255,.8); animation: scrollLine 2.2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- Common section ---------- */
.section { padding: 140px 6vw; }
.section-head { margin-bottom: 48px; }
.section-head.center { text-align: center; }
.section-en {
  display: block; margin: 0 0 8px;
  font-family: "Shippori Mincho", serif; font-size: 13px; letter-spacing: .3em;
  color: var(--accent); text-transform: uppercase;
}
.section-head h2 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: .15em; line-height: 1.6; }
.lead { margin-top: 28px; color: var(--ink-soft); }

/* ---------- Concept ---------- */
.concept {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 6vw; align-items: center;
  max-width: 1360px; margin: 0 auto;
}
.concept-body p { font-family: var(--serif); font-size: 16px; line-height: 2.4; }
.concept-images { position: relative; padding-bottom: 18%; }
.concept-img-main { width: 88%; margin-left: auto; aspect-ratio: 4/3; object-fit: cover; }
.concept-img-sub {
  position: absolute; left: 0; bottom: 0; width: 46%;
  aspect-ratio: 1/1; object-fit: cover; border: 8px solid var(--paper);
}

/* ---------- Stay ---------- */
.stay { background: var(--white); }
.stay-intro {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 6vw; align-items: center;
  max-width: 1280px; margin: 0 auto 96px;
}
.stay-intro .section-head { margin-bottom: 0; text-align: left; }
.stay-intro .lead { font-family: var(--serif); font-size: 16px; line-height: 2.4; color: var(--ink); text-wrap: pretty; }
.floorplan { margin: 0 auto; width: 80%; }
.floorplan img { width: 100%; height: auto; }
.floorplan a { display: block; transition: opacity .3s; }
.floorplan a:hover { opacity: .85; }
.stay-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
  max-width: 1280px; margin: 0 auto;
}
.stay-item { margin: 0; }
.stay-item > img { aspect-ratio: 4/5; object-fit: cover; width: 100%; transition: transform .8s; }
.stay-item { overflow: hidden; }
.stay-item:hover > img { transform: scale(1.03); }

/* 写真スライド：3枚を同じ大きさで、トップのメインビジュアルのように切り替え（他の写真と同じ 4:5） */
.photo-slider { position: relative; aspect-ratio: 4/5; overflow: hidden; }
.photo-slider img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06);
  transition: opacity 1.6s ease, transform 7s linear;
}
.photo-slider img.is-active { opacity: 1; transform: scale(1); }
.stay-item figcaption { padding-top: 20px; }
.stay-item h3 {
  font-size: 18px; letter-spacing: .12em; margin-bottom: 8px;
  padding-left: 14px; border-left: 2px solid var(--brand); line-height: 1.4;
}
.stay-item p { font-family: var(--serif); font-size: 14px; color: var(--ink-soft); text-wrap: pretty; }

/* ---------- Area ---------- */
.area {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 6vw; align-items: stretch;
  max-width: 1360px; margin: 0 auto;
}
/* 左の写真：右列（本文＋写真）と同じ高さにして下端をそろえる。右側を切り落として消失点を残す */
.area-visual { position: relative; }
.area-visual img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: left center;
}
.area-text { padding-top: 6vw; }
.area-text p { font-family: var(--serif); font-size: 16px; line-height: 2.4; text-wrap: pretty; }
.area-sub { margin-top: 40px; width: 75%; aspect-ratio: 3/2; object-fit: cover; }

/* ---------- Access ---------- */
.access { background: var(--white); }
.access-inner {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start;
  max-width: 1200px; margin: 0 auto;
}
.map { aspect-ratio: 4/3; background: var(--paper-2); }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.3); }
.access-info { margin: 0; display: grid; grid-template-columns: auto 1fr; }
.access-info dt, .access-info dd { padding: 18px 0; border-bottom: 1px solid var(--line); }
.access-info dt { font-family: var(--serif); color: var(--brand); padding-right: 28px; white-space: nowrap; }
.access-info dd { margin: 0; font-size: 14px; }

/* ---------- Contact ---------- */
.contact-boxes {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
  max-width: 820px; margin: 0 auto;
}
.contact-box {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 36px 20px; background: var(--white); border: 1px solid var(--line);
  transition: border-color .3s, color .3s;
}
.contact-box:hover { border-color: var(--brand); color: var(--brand); }
.contact-label { font-size: 13px; color: var(--accent); letter-spacing: .2em; }
.contact-value { font-family: var(--serif); font-size: 22px; letter-spacing: .08em; word-break: break-all; text-align: center; }
.contact-reserve { text-align: center; margin: 56px 0 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brand-dark); color: rgba(255,255,255,.9);
  text-align: center; padding: 72px 6vw 40px; font-size: 13px;
}
.footer-logo { height: 72px; width: auto; margin: 0 auto 28px; }
.site-footer p { margin: 0 0 6px; }
.copyright { margin-top: 32px !important; font-size: 11px; letter-spacing: .2em; opacity: .7; }

/* ---------- 平面図の拡大表示（クリックで表示／もう一度クリックで閉じる） ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(20, 18, 16, .82);
  cursor: zoom-out; opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: min(1200px, 100%); max-height: 100%; width: auto; height: auto;
  background: var(--white); padding: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.35);
}
.js-lightbox { cursor: zoom-in; }
body.is-locked { overflow: hidden; }

/* ---------- Fade-in ---------- */
.js-fade { opacity: 0; transform: translateY(24px); transition: opacity 1.2s ease, transform 1.2s ease; }
.js-fade.is-visible { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1180px) {
  .global-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: var(--paper); border-top: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .4s ease;
  }
  .global-nav.is-open { max-height: 100vh; box-shadow: 0 10px 20px rgba(0,0,0,.08); }
  .global-nav ul { flex-direction: column; gap: 0; padding: 12px 0 20px; }
  .global-nav a { display: block; padding: 14px 32px; font-size: 18px; }
  .global-nav a::after { display: none; }
  .menu-toggle { display: block; }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .site-header { padding: 0 16px; gap: 10px; }
  .logo img { height: 38px; }
  .header-right { gap: 8px; }
  .header-right > .lang-switch { display: none; }
  .btn-reserve { padding: 9px 14px; font-size: 12px; letter-spacing: .05em; }
  .btn-reserve-lg { padding: 16px 36px; font-size: 15px; }
  .global-nav .lang-switch-mobile { display: flex; }

  .hero { min-height: 480px; }
  .hero-copy { right: 7vw; font-size: 22px; letter-spacing: .2em; }
  /* 英語は指定の改行位置を保てるよう少し小さく */
  html[lang="en"] .hero-copy { font-size: 18px; }
  html[lang="en"] .hero-copy, html[lang="ko"] .hero-copy { left: 16px; }
  .hero-caption { left: 16px; bottom: 20px; }
  .hero-name { font-size: 11px; }
  .hero-credit { font-size: 9px; }

  .section { padding: 88px 16px; }
  .concept, .area { grid-template-columns: 1fr; gap: 48px; }
  .area-text { padding-top: 0; }
  .area-visual img { position: static; height: auto; aspect-ratio: 4/3; }
  .stay-intro { grid-template-columns: 1fr; gap: 40px; margin-bottom: 64px; }
  .stay-grid { grid-template-columns: 1fr; gap: 48px; }
  .stay-item > img, .photo-slider { aspect-ratio: 4/3; }
  .concept-body p br, .area-text p br { display: none; }


  .access-inner { grid-template-columns: 1fr; gap: 32px; }
  .contact-boxes { grid-template-columns: 1fr; }
  .contact-value { font-size: 19px; }
}

/* モバイル用言語切替（メニュー内） */
.lang-switch-mobile { display: none; justify-content: center; padding: 8px 0 4px; font-size: 14px; }
@media (max-width: 860px) { .lang-switch-mobile { display: flex; } }

/* ---------- スマートフォン：縦書きキャッチコピーを画面の高さいっぱいに ----------
   長い方の行（15文字）が「1文字 = 文字サイズ × (1 + 字間)」で並ぶので、
   写真の枠の高さから上下の余白を引き、その文字数分で割って文字サイズを決める。
   svh = ブラウザのツールバーを除いた、実際に見えている画面の高さ */
@media (max-width: 860px) and (orientation: portrait) {
  .hero { height: calc(100vh - var(--header-h)); height: calc(100svh - var(--header-h)); }
  /* 3枚目の街並み：縦画面では中央より右寄りを見せる */
  .hero-slide--street { background-position: 72% center; }
  html[lang="ja"] .hero-copy,
  html[lang="zh"] .hero-copy {
    right: 6vw; letter-spacing: .2em; line-height: 2.1;
    /* 上は24px、下は左下の表記と「Scroll」に重ならないよう96px空ける */
    top: 24px; transform: none;
    /* 15文字 × 1.2 = 18。横幅が足りない端末では 11vw まで */
    font-size: min(calc((100svh - var(--header-h) - 120px) / 18), 11vw);
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  /* 横置き：写真の枠を画面の高さに収める（はみ出していたのを解消） */
  .hero { min-height: 0; height: calc(100vh - var(--header-h)); height: calc(100svh - var(--header-h)); }
  html[lang="ja"] .hero-copy,
  html[lang="zh"] .hero-copy {
    right: 6vw; letter-spacing: .12em; line-height: 2;
    /* 15文字 × 1.12 = 16.8。上下12pxずつ余白 */
    font-size: calc((100svh - var(--header-h) - 24px) / 16.8);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-fade { transition: none; }
  /* スライドは切り替えるが、拡大の動きはなくし、ふわっと入れ替えるだけにする */
  .hero-slide, .photo-slider img { transform: none; transition: opacity 1.5s ease; }
  .hero-slide.is-active, .photo-slider img.is-active { transform: none; }
  .scroll-down::after { animation: none; }
}
