/* ==========================================================
   田丸家 — 那須湯本 寿司・蕎麦・鰻
   品のある和風ホテル系デザイン／モバイルファースト
   ========================================================== */

:root {
  --ink: #241b12;          /* 焦げ茶（木の基調） */
  --ink-soft: #38291b;
  --paper: #f4efe6;        /* 生成り */
  --paper-deep: #ece5d8;
  --gold: #a8853c;         /* 金茶 */
  --text: #3a352f;
  --text-light: #f0ebe1;
  --font-display: "Shippori Mincho", serif;
  --font-body: "Noto Serif JP", serif;
  --header-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--text);
  background: var(--paper);
  line-height: 2;
  letter-spacing: 0.06em;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ----------------------------------------------------------
   ヘッダー
   ---------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 20px;
  color: var(--text-light);
  background: transparent;
  transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

.site-header.is-scrolled {
  background: rgba(36, 27, 18, 0.92);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
}

.header-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.35em;
}

.header-nav {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  background: rgba(36, 27, 18, 0.97);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.header-nav.is-open { opacity: 1; visibility: visible; }

.header-nav ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
}

.header-nav a {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.25em;
  position: relative;
  padding-bottom: 4px;
}

.header-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s ease;
}

.header-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-tel {
  border: 1px solid var(--gold);
  padding: 0.6em 1.6em;
  color: var(--text-light);
  font-size: 0.9rem;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--text-light);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----------------------------------------------------------
   ヒーロー
   ---------------------------------------------------------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 540px;
  overflow: hidden;
  color: var(--text-light);
}

.hero-bg {
  position: absolute;
  inset: -3%;
  background: var(--ink) url("../assets/img/hero.jpg") center / cover no-repeat;
  animation: heroDrift 32s ease-in-out infinite alternate;
  will-change: transform;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  /* 木の色味を活かす、飴色の薄いかけ紙 */
  background:
    linear-gradient(to bottom, rgba(46, 30, 16, 0.42), rgba(46, 30, 16, 0.16) 42%, rgba(40, 26, 14, 0.5));
}

/* 参考サイトのような、ゆったりとしたパン＆ズーム */
@keyframes heroDrift {
  0%   { transform: scale(1.02) translate(0, 0); }
  50%  { transform: scale(1.08) translate(-1.2%, -0.8%); }
  100% { transform: scale(1.05) translate(1%, 0.6%); }
}

.hero-koi {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  touch-action: pan-y;
}

.hero-inner {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
  /* ヘッダーとSCROLL表示のぶんを避けて、文字かぶりを防ぐ */
  padding: calc(var(--header-h) + 16px) 16px 120px;
  pointer-events: none;
}

/* 武田菱（トレードマーク） */
.hero-kamon svg {
  width: clamp(40px, 6vh, 56px);
  height: auto;
  color: rgba(240, 235, 225, 0.92);
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
  animation: heroFade 2.4s 0.4s ease-out both;
}

.hero-title {
  display: flex;
  flex-direction: row-reverse;
  gap: 1.4rem;
  max-height: 100%;
  font-family: var(--font-display);
  font-weight: 500;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
  animation: heroFade 2.4s ease-out both;
}

/* 縦書きは列折り返しを防ぐため、flexの子それぞれに適用する */
.hero-title-main,
.hero-title-sub {
  writing-mode: vertical-rl;
  white-space: nowrap;
}

/* ビューポートの「高さ」も見て縮小し、縦書きのはみ出しを防ぐ */
.hero-title-main {
  font-size: clamp(2.4rem, min(9vw, 13vh), 5.2rem);
  font-size: clamp(2.4rem, min(9vw, 13svh), 5.2rem);
  letter-spacing: 0.42em;
}

.hero-title-sub {
  font-size: clamp(0.72rem, min(2.4vw, 3.2vh), 1.05rem);
  font-size: clamp(0.72rem, min(2.4vw, 3.2svh), 1.05rem);
  letter-spacing: 0.32em;
  align-self: flex-start;
  padding-top: 0.6em;
  color: rgba(240, 235, 225, 0.85);
}

.hero-copy {
  position: absolute;
  left: 24px;
  bottom: 96px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  color: rgba(240, 235, 225, 0.8);
  animation: heroFade 2.4s 0.8s ease-out both;
}

@keyframes heroFade {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.hero-scroll span {
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  color: rgba(240, 235, 225, 0.75);
  margin-bottom: 8px;
}

.hero-scroll::after {
  content: "";
  width: 1px;
  height: 64px;
  background: linear-gradient(to bottom, rgba(240, 235, 225, 0.75), transparent);
  animation: scrollLine 2.4s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ----------------------------------------------------------
   セクション共通
   ---------------------------------------------------------- */
.section { padding: 88px 0; }

.section-inner {
  width: min(92%, 1080px);
  margin: 0 auto;
}

.section-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 3rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-align: center;
  color: var(--ink);
}

.section-title .en {
  font-size: 0.68rem;
  letter-spacing: 0.45em;
  color: var(--gold);
}

.section-title::before {
  content: "";
  width: 30px;
  height: 21px;
  background: url("../assets/img/kamon.svg") center / contain no-repeat;
  margin-bottom: 0.4rem;
}

.section-title::after {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin-top: 1rem;
}

.section-title.light { color: var(--text-light); }

/* ----------------------------------------------------------
   スクロール出現（奥の湯方式）
   グループ(.inview)が見えたら、子(.inview__item)が時間差で
   下からゆっくり立ち上がる。JS無効時は隠さない。
   ---------------------------------------------------------- */
.js .inview .inview__item {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 1s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 1s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.js .inview.-show .inview__item {
  opacity: 1;
  transform: translateY(0);
}

/* 画像は墨色の下地の上にふわっと浮かぶ */
.js .img-fade {
  background-color: var(--ink);
}

.js .img-fade img {
  opacity: 0;
}

.js .inview.-show .img-fade img {
  opacity: 1;
  transition: opacity 0.9s cubic-bezier(0.55, 0.06, 0.46, 1) 0.5s;
}

/* 見出しの一文字ずつのせり上がり（行ごとにマスク） */
.char-reveal .char-line {
  display: block;
  overflow: hidden;
}

.js .char-reveal .char {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, 1.1em, 0);
}

.js .inview.-show .char-reveal .char {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition:
    opacity 1.5s cubic-bezier(0.08, 0.82, 0.17, 1),
    transform 1.5s cubic-bezier(0.08, 0.82, 0.17, 1);
}

/* ----------------------------------------------------------
   交互ブロック（奥の湯方式）
   写真が大きく端まで伸び、文章の塊が写真の裾に寄り添う
   ---------------------------------------------------------- */
.alt-block {
  position: relative;
  padding: 72px 0 0;
}

.alt-block:first-of-type { padding-top: 96px; }

.alt-inner {
  display: flex;
  flex-direction: column;
}

/* モバイル：写真が先、端に寄せて余白を非対称に */
.alt-img {
  order: 1;
  width: 92%;
  margin: 0 auto 40px 0;
}

.alt-block--rev .alt-img {
  margin: 0 0 40px auto;
}

.alt-img img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 46vh;
  object-fit: cover;
}

.alt-contents {
  order: 2;
  width: 84%;
  margin: 0 auto;
}

.alt-header { margin-bottom: 1.6rem; }

/* 小さな題字＋長い罫線 */
.alt-ttl {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-right: 6em;
  margin-bottom: 1.4rem;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--ink);
}

.alt-ttl::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 5em;
  height: 1px;
  background: currentColor;
  opacity: 0.25;
}

/* 詩的な大見出し */
.alt-subttl {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4.6vw, 1.85rem);
  font-weight: 500;
  line-height: 2;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.alt-body {
  font-size: 0.95rem;
  line-height: 2.4;
}

.alt-body p + p { margin-top: 1.2rem; }

.interior-list {
  display: inline-flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.6rem;
  font-size: 0.92rem;
}

.interior-list li {
  border-bottom: 1px solid #d9d0c0;
  padding-bottom: 0.6rem;
  letter-spacing: 0.15em;
}

/* ----------------------------------------------------------
   お品書き（一品カード）
   ---------------------------------------------------------- */
.menu-grid {
  display: grid;
  gap: 2.2rem;
  width: 84%;
  max-width: 1200px;
  margin: 72px auto 0;
}

.menu-card { background: var(--paper); }

.menu-card-img {
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.menu-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease;
}

.menu-card:hover .menu-card-img img { transform: scale(1.05); }

.menu-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  padding: 1.2rem 1.4rem 0;
  color: var(--ink);
}

.menu-card h3 small {
  font-size: 0.75rem;
  color: var(--gold);
  margin-left: 0.4em;
}

.menu-card p {
  padding: 0.5rem 1.4rem 1.6rem;
  font-size: 0.9rem;
}

.menu-note {
  margin-top: 2.4rem;
  text-align: center;
  font-size: 0.8rem;
  color: #837a6d;
}

/* ----------------------------------------------------------
   店舗情報
   ---------------------------------------------------------- */
.info { margin-top: 96px; background: var(--paper-deep); }

.info-table {
  max-width: 760px;
  margin: 0 auto;
}

.info-table > div {
  display: grid;
  grid-template-columns: 7em 1fr;
  gap: 1rem;
  padding: 1.1rem 0.4rem;
  border-bottom: 1px solid #d9d0c0;
  font-size: 0.95rem;
}

.info-table > div:first-child { border-top: 1px solid #d9d0c0; }

.info-table dt {
  font-family: var(--font-display);
  letter-spacing: 0.2em;
  color: var(--ink);
}

.info-table a { border-bottom: 1px solid var(--gold); }

.info-cta {
  margin-top: 3rem;
  text-align: center;
}

.btn-tel {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.1rem 3.4rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--text-light);
  transition: background-color 0.4s ease, color 0.4s ease;
}

.btn-tel:hover {
  background: transparent;
  color: var(--ink);
}

.btn-tel-label {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
}

.btn-tel-number {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.12em;
}

/* ----------------------------------------------------------
   アクセス
   ---------------------------------------------------------- */
.access { background: var(--paper); }

.access-grid {
  display: grid;
  gap: 2.4rem;
}

.access-map iframe {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  filter: grayscale(0.55) sepia(0.12);
}

.access-address {
  font-family: var(--font-display);
  letter-spacing: 0.15em;
  color: var(--ink);
  margin-bottom: 1.4rem;
}

.access-text ul {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  font-size: 0.92rem;
  margin-bottom: 1.6rem;
}

.access-text strong {
  font-weight: 500;
  color: var(--gold);
  margin-right: 0.6em;
}

.access-note { font-size: 0.88rem; }

/* ----------------------------------------------------------
   フッター
   ---------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--text-light);
  text-align: center;
  padding: 72px 20px 40px;
}

.footer-kamon svg {
  width: 44px;
  height: auto;
  color: var(--gold);
  margin-bottom: 1.2rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
}

.footer-sub {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: rgba(240, 235, 225, 0.65);
  margin-top: 0.8rem;
}

.footer-copy {
  margin-top: 3rem;
  font-size: 0.7rem;
  color: rgba(240, 235, 225, 0.45);
}

/* ----------------------------------------------------------
   タブレット（768px〜）
   ---------------------------------------------------------- */
@media (min-width: 768px) {
  :root { --header-h: 76px; }

  .site-header { padding: 0 36px; }

  .section { padding: 120px 0; }

  .hero-copy { left: 48px; bottom: 120px; font-size: 1.05rem; }

  .menu-grid { grid-template-columns: repeat(2, 1fr); }

  .menu-note { grid-column: 1 / -1; }

  .access-grid {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
  }
}

/* ----------------------------------------------------------
   デスクトップ（1024px〜）
   ---------------------------------------------------------- */
@media (min-width: 1024px) {
  .nav-toggle { display: none; }

  .header-nav {
    position: static;
    z-index: auto;
    flex-direction: row;
    gap: 2.4rem;
    background: none;
    opacity: 1;
    visibility: visible;
  }

  .header-nav ul {
    flex-direction: row;
    gap: 2.2rem;
  }

  .header-nav a { font-size: 0.88rem; }

  .nav-tel { font-size: 0.8rem; padding: 0.5em 1.3em; }

  .menu-grid { grid-template-columns: repeat(4, 1fr); }

  .menu-card p { font-size: 0.85rem; }

  /* 交互ブロック：写真6割・文章4割、文章は写真の裾に沿う */
  .alt-block { padding-top: 110px; }

  .alt-block:first-of-type { padding-top: 150px; }

  .alt-inner {
    flex-direction: row;
    align-items: flex-end;
  }

  .alt-block--rev .alt-inner { flex-direction: row-reverse; }

  .alt-img {
    order: 0;
    width: 60%;
    margin: 0;
  }

  .alt-block--rev .alt-img { margin: 0; }

  .alt-img img { min-height: 68vh; }

  .alt-contents {
    order: 0;
    width: 40%;
    max-width: 520px;
    margin: 0 auto;
    padding: 20px 64px 0;
    transform: translateY(-24px);
  }

  .alt-header { margin-bottom: 2.6rem; }

  .alt-body { font-size: 1rem; }

  .menu-grid {
    width: calc(100% - 240px);
    margin-top: 110px;
  }

  .info { margin-top: 150px; }
}

/* ----------------------------------------------------------
   アニメーション削減設定
   ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero-bg,
  .hero-title,
  .hero-copy,
  .hero-scroll::after { animation: none; }

  .js .inview .inview__item,
  .js .img-fade img,
  .js .char-reveal .char {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
