/* ==========================================================
   窓辺珈琲(架空の店舗・制作サンプル)
   スマホ用を基準に書き、画面が広くなるほど @media で広げています。
   ブレークポイント: 768px(タブレット)/ 1024px(PC)
   ========================================================== */

/* ===== 色・フォント(ここを変えるとサイト全体が変わります) ===== */
:root {
  --bg: #faf7f2;            /* ページ背景(生成り) */
  --bg-alt: #f2ece3;        /* 区切り用の背景(薄いベージュ) */
  --surface: #ffffff;       /* カードの背景 */
  --line: #e3dacc;          /* 細い区切り線 */
  --text: #33291f;          /* 本文(焦げ茶) */
  --text-sub: #6a5d52;      /* 補足の文字 */
  --accent: #9a5a3c;        /* アクセント(くすんだテラコッタ) */
  --accent-dark: #7d472d;   /* ホバー・小さな文字用のアクセント */
  --dark: #33291f;          /* フッターの背景 */
  --ph-bg: #e8dfd1;         /* 画像の読み込み中に見える背景色 */

  --font-sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Yu Gothic", "Meiryo", sans-serif;
  --font-serif: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN",
    "Hiragino Mincho Pro", "Noto Serif JP", "MS PMincho", serif;
}

/* ===== 基本 ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

/* 「動きを減らす」設定の人には、スムーズスクロールを使わない */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  word-break: auto-phrase; /* 対応ブラウザでは、文節のまとまりで折り返す */
}

/* 文のまとまり(この中では折り返さない) */
.nb {
  display: inline-block;
}

h1, h2, h3, p, ul, dl, dd, figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px solid var(--accent-dark);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  text-wrap: balance;
}

/* 文の最後に「。」や1〜2文字だけが残らないようにする */
p,
dd {
  text-wrap: pretty;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* キーボード操作の人向け:Tabキーを押したときだけ現れる「本文へ移動」 */
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 100;
  padding: 8px 16px;
  background-color: var(--surface);
  border: 2px solid var(--accent-dark);
}

.skip-link:focus {
  top: 8px;
}

/* ===== ポートフォリオへ戻るリンク(ページ最上部・控えめな文字リンク) ===== */
.back-bar {
  background-color: var(--bg);
  border-bottom: 1px solid var(--line);
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* スマホで押しやすい高さ */
  color: var(--text-sub);
  font-size: 14px;
  text-decoration: none;
}

.back-link::before {
  content: "←";
  content: "←" / ""; /* 対応ブラウザでは、矢印を読み上げの対象から外す */
  margin-right: 6px;
}

.back-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ===== サンプル表記(ページ最上部) ===== */
.sample-note {
  padding: 8px 16px;
  background-color: #efe4d6;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

/* ===== ヘッダー ===== */
.site-header {
  background-color: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* スマホで押しやすい高さ */
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
}

.global-nav ul {
  display: flex;
  gap: 4px;
}

.global-nav a {
  display: block;
  padding: 10px 6px;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.global-nav a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.header-tel {
  display: none; /* PC幅でだけ表示 */
}

/* ===== ボタン ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 1.5px solid var(--accent);
  border-radius: 4px;
  background-color: var(--accent);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.btn:hover {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn--outline {
  background-color: transparent;
  border-color: var(--accent-dark);
  color: var(--accent-dark);
}

.btn--outline:hover {
  background-color: var(--accent-dark);
  color: #ffffff;
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ===== 見出しまわり ===== */
.eyebrow {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.6;
}

.section {
  padding: 56px 0;
}

.section--alt {
  background-color: var(--bg-alt);
}

.section-head {
  margin-bottom: 32px;
  text-align: center;
}

.section-head h2 {
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.5;
  letter-spacing: 0.06em;
}

.section-head h2::after {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  margin: 16px auto 0;
  background-color: var(--accent);
}

.block-title {
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: 0.06em;
}

/* ===== 写真 =====
   元の画像は 3:2(1200×800)。HTML の width / height でその比率を先に確保するので、
   読み込み中に画面がずれない。CSS では横幅だけ指定し、高さは比率どおりに自動で決まる。 */
.photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background-color: var(--ph-bg); /* 読み込み中に見える色 */
  object-fit: cover;              /* 枠の比率が変わる場合も、歪ませずに切り取る */
}

/* ===== ヒーロー ===== */
.hero {
  padding: 24px 0 48px;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero__image {
  order: -1; /* スマホでは写真を先に見せる */
}

.hero h1 {
  margin-top: 4px;
  font-size: 28px;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.hero h1 span {
  display: inline-block; /* 「、」や「。」だけが次の行に落ちないようにする */
}

.hero__lead {
  margin-top: 16px;
  text-wrap: balance;
}

.hero__meta {
  margin-top: 8px;
  color: var(--text-sub);
  font-size: 14px;
}

.hero .btn-group {
  flex-direction: row;  /* 2つのボタンを横に並べる(幅が足りない画面では自動で縦に折り返す) */
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.hero .btn {
  flex: 1 1 auto;
  padding-right: 16px;
  padding-left: 16px;
}

/* ===== お店について ===== */
.concept {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.concept__text p + p {
  margin-top: 16px;
}

/* ===== こだわり ===== */
.points {
  display: grid;
  gap: 16px;
}

.point {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background-color: var(--surface);
}

.point__num {
  color: var(--accent-dark);
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1;
}

.point h3 {
  margin-top: 12px;
  font-size: 18px;
  line-height: 1.5;
}

.point p:last-child {
  margin-top: 8px;
  font-size: 15px;
}

/* ===== メニュー ===== */
.menu {
  display: grid;
  gap: 40px;
}

.menu-list > div {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.menu-list dt {
  font-weight: 600;
}

.menu-desc {
  grid-column: 1;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.6;
}

.menu-price {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.menu-note {
  margin-top: 24px;
  color: var(--text-sub);
  font-size: 14px;
  text-align: center;
}

/* ===== 店内の様子 ===== */
.gallery {
  display: grid;
  gap: 20px;
}

.gallery figcaption {
  margin-top: 8px;
  color: var(--text-sub);
  font-size: 14px;
}

/* ===== 店舗情報・アクセス ===== */
.info-grid {
  display: grid;
  gap: 40px;
}

.info-list > div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.info-list dt {
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 700;
}

.info-list dd {
  margin-top: 2px;
}

.info-block .photo {
  margin-top: 24px;
}

/* ===== お問い合わせ ===== */
.contact {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background-color: var(--surface);
  text-align: center;
}

.contact p + p {
  margin-top: 8px;
}

.contact__tel {
  display: inline-block;
  margin-top: 20px;
  padding: 4px 8px;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.3;
  text-decoration: none;
}

.contact .contact__note {
  margin-top: 8px;
  color: var(--text-sub);
  font-size: 14px;
}

.contact .btn-group {
  margin-top: 24px;
}

/* ===== フッター ===== */
.site-footer {
  padding: 40px 0 calc(40px + 72px + env(safe-area-inset-bottom)); /* 下の固定バーに隠れない余白 */
  background-color: var(--dark);
  color: #f2ece3;
  text-align: center;
}

.site-footer__name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.site-footer__note {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
}

.site-footer__copy {
  margin-top: 16px;
  font-size: 13px;
}

/* <small> タグは自動で文字が小さくなるので、13px のままにする */
.site-footer__copy small {
  font-size: inherit;
}

/* ===== 画面下の固定バー(スマホ・タブレット) ===== */
.quick-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: flex;
  gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background-color: var(--surface);
}

.quick-bar .btn {
  flex: 1;
  padding: 8px 12px;
}

/* ==========================================================
   とても狭いスマホ(360px以下):ヘッダーが収まるように、文字と余白を少し詰める
   ========================================================== */
@media (max-width: 360px) {
  .site-header__inner {
    gap: 8px;
  }

  .logo {
    font-size: 18px;
  }

  .global-nav ul {
    gap: 0;
  }

  .global-nav a {
    padding: 10px 4px;
    font-size: 13px;
  }
}

/* ==========================================================
   タブレット(768px以上)
   ========================================================== */
@media (min-width: 768px) {
  .container {
    padding: 0 32px;
  }

  .section {
    padding: 80px 0;
  }

  .section-head {
    margin-bottom: 48px;
  }

  .section-head h2 {
    font-size: 28px;
  }

  .hero {
    padding: 40px 0 72px;
  }

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

  .hero__image {
    order: 0;
  }

  .hero h1 {
    font-size: 30px;
  }

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

  .points {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .menu {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }

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

  .info-list > div {
    display: grid;
    grid-template-columns: 7em 1fr;
    gap: 16px;
  }

  .info-list dd {
    margin-top: 0;
  }

  /* 1カラムで横に広がるので、外観写真は少し横長にして高さを抑える。
     上側に寄せて切り取り、軒の看板「窓辺珈琲」が切れないようにする */
  .info-block .photo {
    aspect-ratio: 16 / 9;
    object-position: 50% 30%;
  }

  .contact {
    padding: 48px 40px;
  }

  .contact .btn-group {
    flex-direction: row;
    justify-content: center;
  }
}

/* ==========================================================
   PC(1024px以上)
   ========================================================== */
@media (min-width: 1024px) {
  .section {
    padding: 96px 0;
  }

  .site-header__inner {
    min-height: 72px;
  }

  .global-nav a {
    padding: 10px 12px;
    font-size: 15px;
  }

  .header-tel {
    display: block;
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-decoration: none;
  }

  .hero {
    padding: 56px 0 88px;
  }

  .hero__inner {
    grid-template-columns: 1fr 1.1fr;
    gap: 64px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero__lead {
    font-size: 17px;
  }

  .hero .btn-group {
    flex-direction: row;
  }

  .concept {
    gap: 64px;
  }

  .info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }

  /* 2カラムでは幅が狭いので、元の比率(3:2)のまま切り取らずに表示する */
  .info-block .photo {
    aspect-ratio: 3 / 2;
    object-position: 50% 50%;
  }

  .site-footer {
    padding: 48px 0;
  }

  /* PCでは固定バーを出さない(ヘッダーに電話番号があるため) */
  .quick-bar {
    display: none;
  }
}
