@charset "utf-8";

/* =========================================================
   全ページ共通の見た目
   色・文字・ヘッダー・フッター・ボタン・QRコードの窓
   （方針は docs/redesign/DESIGN_MEMO.md）
   ========================================================= */

:root {
  /* 色 */
  --paper: #fffdf9; /* 紙（基本の背景）。アプリ画面の画像の背景と同じ色 */
  /* 色の使い分け（オーナー指示 2026-11-14）
     ・広い面（背景・線）は、カフェ色（ベージュ〜ラテ。色相 33〜38）
     ・オレンジ（色相 27）は、うすめずに小さなところだけ。うすいオレンジを広い面に使うとピンクに見える */
  --kraft: #f8f0e3; /* 区切りの背景（カフェのクリーム） */
  --ink: #624913; /* 見出しの文字（hokumaの茶色） */
  --ink-body: #6a5539; /* 本文の文字（緑みの少ない、やわらかい茶色） */
  --ink-soft: #8a7448; /* 補足の文字 */
  --line: #e2c39e; /* 線・あしらい（カフェのベージュ） */
  --line-soft: #efe2cd;
  --latte: #f8f0e3; /* いちばん下の締めの背景 */
  --latte-deep: #f3e6d2; /* フッターの背景（ラテ） */
  --accent: #f4a261; /* 小さなオレンジ（見出しの下の線・番号など） */
  /* オレンジは家庭のあたたかみの色。ボタンは公開中のサイトと同じオレンジ（オーナー指示）。
     多すぎると明るすぎるので、ボタン以外は小さなところにだけ使う */
  --yaki: #f4a261; /* ボタン */
  --yaki-hover: #ec914a;
  --yaki-dark: #c8692f; /* オレンジ系の文字（ハンコ・ラベルなど。白地で読める濃さ） */

  /* 文字 */
  --font-maru: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans",
    "Yu Gothic", sans-serif;
  /* 見出しの書体。全部いつもの丸ゴシックにそろえる（明朝は使わない：オーナー指示 2026-11-14） */
  --font-head: var(--font-maru);

  /* 角の丸み（四角い部品は角を丸くする：オーナー指示 2026-11-14） */
  --radius: 20px; /* カード・枠 */
  --radius-s: 10px; /* 小さな画像など */

  /* 幅 */
  --gutter: 24px; /* 画面の左右の余白 */
  --max: 1040px; /* 中身のいちばん広い幅 */
  --header-h: 60px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  /* メニューや「戻る」で移るときは、スクロールせずにぱっと移る（オーナー指示 2026-11-14） */
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink-body);
  font-family: var(--font-maru);
  font-weight: 500;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

/* 見出しと強調だけ、hokumaの茶色 */
h1,
h2,
h3,
strong,
.site-logo a {
  color: var(--ink);
}

/* 中身の少ないページでも、フッターが画面のいちばん下に来るようにする */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

main {
  flex: 1 0 auto;
}

body.is-nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--yaki);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 固定ヘッダーで見出しが隠れないように */
section[id] {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

/* 途中で切りたくない語のかたまり */
.nb {
  display: inline-block;
}

/* ---------- ヘッダー ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--paper);
  border-bottom: 1px solid var(--line-soft);
}

header .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: calc(var(--max) + var(--gutter) * 2);
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-logo a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  white-space: nowrap;
}

/* ロゴの丸いマーク */
.site-logo a::before {
  content: "";
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  background: #fffcf5 url("../img/parts/logo-mark.webp") center / 108% no-repeat;
}

/* メニューを開くボタン（二本線） */
.site-header-navbtn {
  position: relative;
  z-index: 2;
  display: block;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.site-header-navbtn span {
  display: none;
}

.site-header-navbtn::before,
.site-header-navbtn::after {
  content: "";
  position: absolute;
  left: 9px;
  width: 26px;
  height: 1.5px;
  border-radius: 1px;
  background-color: var(--ink);
  transition: transform 0.3s ease;
}

.site-header-navbtn::before {
  top: 17px;
}

.site-header-navbtn::after {
  top: 26px;
}

body.is-nav-open .site-header-navbtn::before {
  transform: translateY(4.5px) rotate(38deg);
}

body.is-nav-open .site-header-navbtn::after {
  transform: translateY(-4.5px) rotate(-38deg);
}

/* メニュー（スマホ：画面いっぱいに開く） */
.site-header-nav ul {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 88px 36px 64px;
  background-color: var(--paper);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

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

/* 開いたメニューの右下に「ぽわぽわ」を1枚 */
.site-header-nav ul::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -60px;
  z-index: -1;
  width: 280px;
  height: 280px;
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%22-20 -20 240 230%22%3E%3Cdefs%3E%3CradialGradient id=%22g%22 cx=%220.36%22 cy=%220.3%22 r=%220.8%22%3E%3Cstop offset=%220%22 stop-color=%22%23fcf6ee%22/%3E%3Cstop offset=%221%22 stop-color=%22%23f4e6d3%22/%3E%3C/radialGradient%3E%3Cfilter id=%22s%22 x=%22-30%25%22 y=%22-30%25%22 width=%22160%25%22 height=%22170%25%22%3E%3CfeDropShadow dx=%220%22 dy=%226%22 stdDeviation=%227%22 flood-color=%22%23b48c5a%22 flood-opacity=%220.1%22/%3E%3C/filter%3E%3C/defs%3E%3Cpath fill=%22url(%23g)%22 filter=%22url(%23s)%22 d=%22M70 10C120 4 176 36 182 88C188 138 150 174 98 176C50 178 10 146 8 100C6 56 30 14 70 10Z%22/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}

.site-header-nav li {
  border-bottom: 1px dashed var(--line);
}

.site-header-nav li a {
  display: block;
  padding: 18px 4px;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: 0.06em;
  text-decoration: none;
}

@media (min-width: 900px) {
  :root {
    --gutter: 40px;
    --header-h: 68px;
  }

  .site-header-navbtn {
    display: none;
  }

  .site-header-nav ul {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 30px;
    padding: 0;
    background: none;
    opacity: 1;
    visibility: visible;
  }

  .site-header-nav ul::after {
    content: none;
  }

  .site-header-nav li {
    border-bottom: 0;
  }

  .site-header-nav li a {
    padding: 6px 0;
    font-weight: 500;
    font-size: 0.88rem;
    letter-spacing: 0.06em;
    background: linear-gradient(var(--yaki), var(--yaki)) left bottom / 0 1px
      no-repeat;
    transition: background-size 0.3s ease;
  }

  .site-header-nav li a:hover {
    background-size: 100% 1px;
  }
}

/* ---------- 大きな見出し（h2）：下に短い丸い線 ---------- */
.section-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.42rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
  font-feature-settings: "palt";
}

/* 見出しの頭に、うすい杏色のぽわぽわを敷く（下の短い線は「AIっぽい」のでやめた：オーナー指示 2026-11-14） */
.section-title {
  position: relative;
  z-index: 0;
  width: fit-content;
  padding-left: 1.55em;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 1.15em;
  height: 1em;
  transform: translateY(-50%) rotate(-8deg);
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%22-20 -20 240 230%22%3E%3Cpath fill=%22%23fbdcbd%22 d=%22M40 30C80 4 150 6 180 46C206 82 196 140 150 162C104 184 44 172 18 130C-2 98 8 52 40 30Z%22/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- 「〜はこちら」のリンク ---------- */
.more-link a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 4px 2px 6px;
  border-bottom: 1px solid var(--ink);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.more-link a::after {
  content: "";
  width: 22px;
  height: 7px;
  border-bottom: 1.5px solid var(--ink);
  border-right: 1.5px solid var(--ink);
  transform: skewX(40deg);
  transform-origin: bottom right;
  transition: translate 0.25s ease;
}

.more-link a:hover::after {
  translate: 5px 0;
}

/* ---------- NEWSの種類ラベル（トップ・NEWS一覧で共通） ---------- */
.news-category {
  padding: 1px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.news-category--media {
  color: var(--yaki-dark);
}

.news-category--update,
.news-category--other {
  color: var(--ink-soft);
}

/* ---------- ブログ一覧（トップ・ブログ一覧で共通） ---------- */
.blog-list {
  border-top: 1px dashed var(--line);
}

.blog-list li {
  border-bottom: 1px dashed var(--line);
}

.blog-list a {
  display: block;
  padding: 18px 0;
  text-decoration: none;
}

.blog-list-meta {
  margin-bottom: 4px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.blog-list-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.7;
  letter-spacing: 0.03em;
  word-break: auto-phrase; /* 語の途中で改行しない（対応しているブラウザだけ） */
}

.blog-list a:hover .blog-list-title {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- ダウンロードボタン ---------- */
.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 32px;
  border: 0;
  border-radius: 999px;
  background-color: var(--yaki);
  color: var(--paper);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 14px -6px rgba(220, 130, 60, 0.5);
  transition: background-color 0.2s ease;
}

.download-btn:hover {
  background-color: var(--yaki-hover);
}

/* 下に固定のダウンロードボタン */
.fixed-download-button {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 900;
  transform: translateX(-50%);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.fixed-download-button.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 14px);
}

/* ---------- フッター ---------- */
/* フッターの上の境目は、まっすぐではなく、ゆるやかな波（オーナー指示 2026-11-14） */
.footer-links,
main + footer {
  position: relative;
}

.footer-links::before,
main + footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -25px;
  height: 26px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath fill='%23f3e6d2' d='M0,30 C180,8 420,2 720,16 C1000,30 1240,34 1440,10 L1440,40 L0,40 Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  padding: 36px var(--gutter) 6px;
  background-color: var(--latte-deep);
}

.footer-link {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  opacity: 0.9;
}

.footer-link:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

footer {
  /* 下の余白は、固定ボタンが重ならないための分 */
  padding: 32px var(--gutter) calc(96px + env(safe-area-inset-bottom));
  background-color: var(--latte-deep);
  text-align: center;
}

/* 上にリンクの列があるときは、間をつめる */
.footer-links + footer {
  padding-top: 10px;
}

footer small {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

/* ---------- PCでダウンロードボタンを押したときのQRコードの窓 ---------- */
.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.qr-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.qr-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(47, 35, 10, 0.72);
}

.qr-modal__content {
  position: relative;
  width: 90%;
  max-width: 340px;
  padding: 40px 28px 32px;
  border-radius: var(--radius);
  background: var(--paper);
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.qr-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.qr-modal__close:hover {
  background: var(--kraft);
}

.qr-modal h2 {
  margin: 0 0 20px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.7;
  letter-spacing: 0.06em;
}

.qr-code-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 190px;
  padding: 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line-soft);
}

.qr-code-container canvas,
.qr-code-container img {
  width: 160px;
  height: 160px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
