/* 喫茶 もりじょび のスタイル */

/* 色の変数 */
:root {
  --color-bg: #f6f1e7;
  --color-text: #3b2a20;
  --color-accent: #8c3b2a;
  --color-accent-dark: #6f2e21;
  --color-sub: #c8a97e;
  --color-white: #fff;
}

/* 全体の設定 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 色と文字 */
body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: "Klee One", sans-serif;
  font-size: 1rem;
  line-height: 1.8;
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.4;
}

a {
  color: var(--color-accent);
}

/* 画像 */
img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ページの幅と余白 */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px;
}

.section {
  padding: 48px 0;
}

.section-title {
  margin: 0 0 24px;
  font-size: 1.5rem;
  text-align: center;
}

.section-text {
  margin: 0;
  text-align: center;
}

.section-link {
  margin: 32px 0 0;
  text-align: center;
}

/* ヘッダー */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-sub);
}

/* スクロールして止まる位置を、ヘッダーの高さの分だけ下げる */
html {
  scroll-padding-top: 100px;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.site-logo {
  display: flex;
  flex-direction: column;
  color: var(--color-text);
  text-decoration: none;
}

.logo-name {
  font-size: 1.5rem;
  font-weight: 600;
}

.logo-sub {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
}

.nav-list {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: inline-block;
  padding: 4px 0;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

/* 今いるページ */
.nav-list a[aria-current="page"] {
  color: var(--color-accent);
  font-weight: 600;
  border-bottom-color: var(--color-accent);
}

/* スマホのメニュー
   スマホでは広い画面用のナビを隠し、menu のボタンで dialog のメニューを開く。
   × のボタンか Esc キーで閉じる。closedby="any" で、外側を押しても閉じる（Safari は未対応） */
.site-nav {
  display: none;
}

.menu-button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  background-color: transparent;
  color: var(--color-text);
  font: inherit;
  cursor: pointer;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 28px;
  border-bottom: 2px solid var(--color-text);
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  transition: width 0.2s ease;
}

.menu-icon::before {
  top: -8px;
}

.menu-icon::after {
  top: 8px;
}

.menu-label {
  margin-top: 4px;
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  line-height: 1;
}

.menu-dialog {
  inset: 0 0 0 auto;
  width: 280px;
  max-width: 80%;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 72px 32px 32px;
  border: none;
  background-color: var(--color-bg);
  color: var(--color-text);
  box-shadow: -4px 0 16px rgb(59 42 32 / 20%);
  transform: translateX(100%);
  transition:
    transform 0.35s ease,
    display 0.35s allow-discrete,
    overlay 0.35s allow-discrete;
}

.menu-dialog[open]::backdrop {
  background-color: rgb(59 42 32 / 40%);
}

.menu-dialog .nav-list {
  flex-direction: column;
  gap: 8px;
}

.menu-dialog a {
  padding: 8px 0;
}

.menu-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  background-color: transparent;
  cursor: pointer;
}

/* 閉じるボタンの × は、ハンバーガーと同じ細さの線を 2 本、斜めに重ねて描く */
.menu-close::before,
.menu-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 10px;
  width: 28px;
  border-bottom: 2px solid var(--color-text);
  transform: rotate(45deg);
}

.menu-close::after {
  transform: rotate(-45deg);
}

/* トップの大きな写真と、上に重ねる文字 */
.hero {
  position: relative;
}

.hero-image {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.hero-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 16px;
  background-image: radial-gradient(
    ellipse at center,
    rgb(246 241 231 / 80%) 0%,
    rgb(246 241 231 / 0%) 70%
  );
  text-align: center;
  text-shadow:
    0 0 8px var(--color-bg),
    0 0 16px var(--color-bg);
  animation: fade-in 1s ease-out both;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  margin: 0;
  font-size: clamp(2.25rem, 7vw, 4rem);
}

.hero-lead {
  margin: 8px 0 0;
  font-size: 1.125rem;
}

/* ページの見出しの帯 */
.page-header {
  padding: 56px 0;
  background-image:
    linear-gradient(rgb(246 241 231 / 60%), rgb(246 241 231 / 60%)),
    url("../images/leaf-shadow-soft.jpg");
  background-size: cover;
  background-position: center;
  text-align: center;
  text-shadow:
    0 0 8px var(--color-bg),
    0 0 16px var(--color-bg);
}

.page-title {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3rem);
}

.page-lead {
  margin: 8px 0 0;
}

/* おすすめのカード */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  overflow: hidden;
  background-color: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgb(59 42 32 / 15%);
}

.card-image {
  width: 100%;
}

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.card-text {
  margin: 0;
}

.price {
  margin: 8px 0 0;
  color: var(--color-accent);
  font-weight: 600;
}

/* ボタン */
.button {
  display: inline-block;
  padding: 12px 32px;
  border: none;
  border-radius: 999px;
  background-color: var(--color-accent);
  color: var(--color-white);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.2s,
    transform 0.2s;
}

.button:hover {
  background-color: var(--color-accent-dark);
  transform: translateY(-2px);
}

/* お知らせ */
.news-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-sub);
}

.news-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-sub);
}

.news-date {
  display: block;
  color: var(--color-accent);
  font-size: 0.875rem;
}

/* メニューの表 */
.menu-table {
  width: 100%;
  margin-bottom: 40px;
  border-collapse: collapse;
  background-color: var(--color-white);
  table-layout: fixed;
}

.menu-table caption {
  margin-bottom: 8px;
  font-size: 1.25rem;
  font-weight: 600;
  text-align: left;
}

.menu-table th,
.menu-table td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--color-sub);
  text-align: left;
  vertical-align: top;
}

.menu-table thead th {
  border-right: 1px solid var(--color-text);
  border-left: 1px solid var(--color-text);
  background-color: var(--color-text);
  color: var(--color-bg);
}

/* おすすめの札は、丸いはんこのように二重の線で囲み、少し傾ける。
   内側の幅を 2 文字分にして、「おす」「すめ」の 2 行に折り返す */
.recommend-badge {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 4em;
  height: 4em;
  margin-top: 6px;
  padding: 0 0.8em;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 2px var(--color-white),
    inset 0 0 0 3px var(--color-accent);
  color: var(--color-accent);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transform: rotate(-12deg);
}

.menu-table .menu-name {
  width: 32%;
}

.menu-table .menu-price {
  width: 5.5em;
  text-align: right;
  white-space: nowrap;
}

.menu-note {
  margin: 0;
  font-size: 0.875rem;
}

/* お店について */
.concept {
  display: grid;
  gap: 24px;
}

.concept-figure,
.gallery figure {
  margin: 0;
}

.concept-figure img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.concept-figure figcaption,
.gallery figcaption {
  margin-top: 8px;
  font-size: 0.875rem;
}

.concept-text p {
  margin: 0 0 16px;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

/* アクセス */
.access {
  display: grid;
  gap: 32px;
}

.access-address {
  margin-bottom: 32px;
  font-style: normal;
}

.hours {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  margin: 0;
}

.hours dt {
  font-weight: 600;
}

.hours dd {
  margin: 0;
}

.map iframe {
  display: block;
  width: 100%;
  height: 320px;
  border: 0;
}

.map-note {
  margin: 8px 0 0;
  font-size: 0.875rem;
}

/* 予約フォーム */
.notice {
  margin: 0 0 32px;
  padding: 16px;
  border-left: 4px solid var(--color-accent);
  background-color: var(--color-white);
}

.reserve-form {
  display: grid;
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-row label,
.form-group legend {
  font-weight: 600;
}

.required {
  margin-left: 4px;
  color: var(--color-accent);
  font-size: 0.875rem;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-text);
  border-radius: 4px;
  background-color: var(--color-white);
  color: inherit;
  font: inherit;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--color-text);
  border-radius: 4px;
}

.form-group legend {
  padding: 0 4px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-actions {
  margin: 0;
  text-align: center;
}

/* フッター */
.site-footer {
  margin-top: auto;
  padding: 32px 0;
  background-color: var(--color-text);
  color: var(--color-bg);
  font-size: 0.875rem;
}

.site-footer p,
.footer-address {
  margin: 0 0 8px;
}

.footer-name {
  font-size: 1.25rem;
  font-weight: 600;
}

.footer-address {
  font-style: normal;
}

/* 擬似クラスと擬似要素
   キーボードで操作したときの枠（:focus-visible）は、:hover より前に書く */
a:focus-visible,
.button:focus-visible,
.menu-button:focus-visible,
.menu-close:focus-visible,
.form-row input:focus-visible,
.form-row select:focus-visible,
.form-row textarea:focus-visible,
.choice input:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.nav-list a:hover {
  border-bottom-color: var(--color-sub);
}

.section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  margin: 12px auto 0;
  background-color: var(--color-accent);
}

.menu-table tbody tr:nth-child(even) {
  background-color: #fbf8f2;
}

/* レスポンシブ */
@media (width >= 768px) {
  .site-nav {
    display: block;
  }

  .menu-button {
    display: none;
  }

  .hero-image {
    height: 520px;
  }

  .card-list {
    flex-direction: row;
  }

  .card {
    flex: 1;
  }

  .concept {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
  }

  .concept-figure img {
    height: 340px;
  }

  .concept-text .section-title {
    text-align: left;
  }

  .concept-text .section-title::after {
    margin-left: 0;
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .access {
    grid-template-columns: 1fr 1fr;
  }

  .access-info .section-title {
    text-align: left;
  }

  .access-info .section-title::after {
    margin-left: 0;
  }

  .map iframe {
    height: 400px;
  }

  .recommend-badge {
    display: inline-flex;
    margin-top: 0;
    margin-left: 12px;
    vertical-align: middle;
  }
}

/* スマホのメニューの開閉の動き
   @starting-style で「開き始めの状態」を決めると、dialog が開くときにも動きを付けられる。
   display と overlay に allow-discrete を付けると、閉じるときも動き終わってから消える */
.menu-dialog[open] {
  transform: translateX(0);
}

@starting-style {
  .menu-dialog[open] {
    transform: translateX(100%);
  }
}

.menu-dialog::backdrop {
  background-color: rgb(59 42 32 / 0%);
  transition:
    background-color 0.35s ease,
    display 0.35s allow-discrete,
    overlay 0.35s allow-discrete;
}

@starting-style {
  .menu-dialog[open]::backdrop {
    background-color: rgb(59 42 32 / 0%);
  }
}

/* メニューの項目を、上から順に少しずつ遅らせて表示する */
.menu-dialog[open] .nav-list li {
  animation: menu-item-in 0.4s ease both;
}

.menu-dialog[open] .nav-list li:nth-child(1) {
  animation-delay: 0.1s;
}

.menu-dialog[open] .nav-list li:nth-child(2) {
  animation-delay: 0.15s;
}

.menu-dialog[open] .nav-list li:nth-child(3) {
  animation-delay: 0.2s;
}

.menu-dialog[open] .nav-list li:nth-child(4) {
  animation-delay: 0.25s;
}

.menu-dialog[open] .nav-list li:nth-child(5) {
  animation-delay: 0.3s;
}

/* ハンバーガーのボタンにカーソルを乗せると、線の長さが変わる */
.menu-button:hover .menu-icon::before {
  width: 20px;
}

.menu-button:hover .menu-icon::after {
  width: 14px;
}

@keyframes menu-item-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }

  .menu-dialog,
  .menu-dialog::backdrop,
  .menu-icon::before,
  .menu-icon::after {
    transition: none;
  }

  .menu-dialog[open] .nav-list li {
    animation: none;
  }

  .button:hover {
    transform: none;
  }

  .hero-text {
    animation: none;
  }
}
