/* サイト共通UI: ヘッダー / メニュー / 次回ワークショップ / Q&A */
:root {
  --sh-h: 64px;
  --ui-ink: #1f1f1c;
  --ui-paper: #f2f3ed;
  --ui-muted: #8a8a80;
  --ui-accent: #6b7a4f;
  --ui-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 768px) {
  :root { --sh-h: 56px; }
}

/* 各ページに残っている旧ヘッダー用の余白を、新ヘッダーの高さに統一する */
body.has-site-header { padding-top: var(--sh-h) !important; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--sh-h);
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 clamp(16px, 3vw, 36px);
  background: rgba(250, 250, 247, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 0.4s var(--ui-ease), background 0.4s var(--ui-ease);
  font-family: 'Zen Kaku Gothic New', 'Noto Sans JP', 'Hiragino Sans', sans-serif;
  box-sizing: border-box;
}

.site-header *,
.site-menu * { box-sizing: border-box; }

.site-header.is-scrolled {
  background: rgba(250, 250, 247, 0.94);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
}

.sh-logo { display: inline-flex; align-items: center; height: 100%; margin-right: auto; }
.sh-logo img { height: 30px; width: auto; display: block; }

.sh-nav { display: flex; gap: 26px; }

/* 筆で引いたような下線が、左からすっと伸びる */
.sh-nav a,
.sm-link {
  position: relative;
  color: var(--ui-ink);
  text-decoration: none;
}

.sh-nav a {
  font-size: 13px;
  letter-spacing: 0.12em;
  padding: 6px 0;
}

.sh-nav a::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0;
  height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5.2C20 3.1 41 2.6 62 3.4 82 4.1 101 3.2 118 2.6' fill='none' stroke='%236b7a4f' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left center / 100% 100%;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.5s var(--ui-ease);
}

.sh-nav a:hover::after,
.sh-nav a[aria-current="page"]::after { clip-path: inset(0 0 0 0); }

/* 予約ボタン: 墨が左から染み込むように反転する */
.sh-cta {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border: 1px solid var(--ui-ink);
  color: var(--ui-ink);
  background: transparent;
  text-decoration: none;
  font-family: 'Noto Serif JP', serif;
  font-size: 13px;
  letter-spacing: 0.16em;
  white-space: nowrap;
  isolation: isolate;
  transition: color 0.45s var(--ui-ease);
}

.sh-cta::before,
.ui-ink-btn::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  background: var(--ui-ink);
  border-radius: 0 40% 40% 0 / 0 60% 60% 0;
  transform: translateX(-102%);
  transition: transform 0.55s var(--ui-ease), border-radius 0.55s var(--ui-ease);
}

.sh-cta:hover,
.sh-cta:focus-visible { color: #fff; }

.sh-cta:hover::before,
.sh-cta:focus-visible::before,
.ui-ink-btn:hover::before,
.ui-ink-btn:focus-visible::before {
  transform: translateX(0);
  border-radius: 0;
}

/* メニューボタン: 2本の筆線が × に組み変わる */
.sh-menu-btn {
  display: none;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--ui-ink);
  font: 500 11px/1 'Zen Kaku Gothic New', sans-serif;
  letter-spacing: 0.24em;
  cursor: pointer;
}

.sh-menu-icon { position: relative; width: 26px; height: 14px; }

.sh-menu-icon span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px 1px 2px 1px;
  transition: transform 0.5s var(--ui-ease), top 0.5s var(--ui-ease), width 0.5s var(--ui-ease);
}

.sh-menu-icon span:nth-child(1) { top: 3px; }
.sh-menu-icon span:nth-child(2) { top: 10px; width: 70%; }

.menu-open .sh-menu-icon span:nth-child(1) { top: 6px; transform: rotate(32deg); }
.menu-open .sh-menu-icon span:nth-child(2) { top: 6px; width: 100%; transform: rotate(-32deg); }

.sh-menu-label { min-width: 3.6em; text-align: left; }

@media (max-width: 960px) {
  .site-header { gap: 14px; }
  .sh-nav { display: none; }
  .sh-menu-btn { display: inline-flex; }
}

@media (max-width: 768px) {
  .sh-logo img { height: 24px; }
  .sh-cta { padding: 7px 14px; font-size: 12px; letter-spacing: 0.1em; }
}

/* ---------- メニュー(全画面) ---------- */
.site-menu {
  position: fixed;
  inset: 0;
  z-index: 1090;
  padding: calc(var(--sh-h) + 28px) clamp(20px, 6vw, 64px) 40px;
  overflow-y: auto;
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(107, 122, 79, 0.10), transparent 60%),
    radial-gradient(90% 50% at 0% 100%, rgba(164, 122, 75, 0.08), transparent 60%),
    var(--ui-paper);
  clip-path: circle(0% at calc(100% - 44px) 28px);
  visibility: hidden;
  transition: clip-path 0.7s var(--ui-ease), visibility 0s linear 0.7s;
  font-family: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
}

.menu-open .site-menu {
  clip-path: circle(150% at calc(100% - 44px) 28px);
  visibility: visible;
  transition: clip-path 0.8s var(--ui-ease), visibility 0s;
}

.sm-inner { max-width: 560px; margin: 0 auto; }

.sm-list { list-style: none; margin: 0; padding: 0; }

.sm-list li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ui-ease), transform 0.6s var(--ui-ease);
}

.menu-open .sm-list li {
  opacity: 1;
  transform: none;
  transition-delay: calc(0.18s + var(--i) * 0.06s);
}

.sm-link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  font-family: 'Noto Serif JP', serif;
  font-size: 22px;
  letter-spacing: 0.08em;
}

.sm-link small {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--ui-muted);
  margin-left: auto;
}

.sm-num {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ui-accent);
  font-family: 'Zen Kaku Gothic New', sans-serif;
}

.sm-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 26px;
  font-size: 12px;
  color: var(--ui-muted);
  opacity: 0;
  transition: opacity 0.5s var(--ui-ease);
}

.menu-open .sm-sub { opacity: 1; transition-delay: 0.6s; }
.sm-sub a { color: var(--ui-ink); text-decoration: none; letter-spacing: 0.1em; }

.sm-next { margin-top: 28px; opacity: 0; transition: opacity 0.5s var(--ui-ease); }
.menu-open .sm-next { opacity: 1; transition-delay: 0.5s; }

body.menu-locked { overflow: hidden; }

/* ---------- 次回ワークショップ カード ---------- */
.nw-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--ui-ink);
  text-align: left;
  font-family: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
}

.nw-thumb {
  width: 96px;
  aspect-ratio: 20 / 17;
  overflow: hidden;
  background: #e2ded5;
}

.nw-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--ui-ease); }
.nw-card:hover .nw-thumb img { transform: scale(1.06); }

.nw-kicker { font-size: 10px; letter-spacing: 0.28em; color: var(--ui-accent); margin: 0; }
.nw-date { font-family: 'Noto Serif JP', serif; font-size: 15px; letter-spacing: 0.06em; margin: 4px 0 0; }
.nw-title { font-family: 'Noto Serif JP', serif; font-size: 17px; letter-spacing: 0.06em; margin: 2px 0 0; font-weight: 500; }
.nw-meta { font-size: 11px; color: var(--ui-muted); margin: 2px 0 0; }

.nw-actions { grid-column: 1 / -1; display: flex; gap: 8px; }

.nw-actions a {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-decoration: none;
  font-family: 'Noto Serif JP', serif;
}

.ui-ink-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--ui-ink);
  border: 1px solid var(--ui-ink);
  transition: color 0.45s var(--ui-ease);
}

.ui-ink-btn:hover,
.ui-ink-btn:focus-visible { color: #fff; }

.ui-ink-btn.is-solid { background: var(--ui-ink); color: #fff; }
.ui-ink-btn.is-solid::before { background: var(--ui-accent); }

.nw-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ui-ink);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

/* ---------- Q&A (details/summary) ---------- */
.qa-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }

.qa-chips a {
  padding: 7px 14px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 999px;
  color: var(--ui-ink);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.08em;
  background: #fff;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.qa-chips a:hover { background: var(--ui-ink); color: #fff; border-color: var(--ui-ink); }

details.qa-acc { border-bottom: 1px solid rgba(0, 0, 0, 0.1); }

details.qa-acc > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr 22px;
  gap: 16px;
  align-items: center;
  padding: 18px 2px;
  font-weight: 500;
  line-height: 1.6;
}

details.qa-acc > summary::-webkit-details-marker { display: none; }

/* 開閉アイコン: 筆の十字が回転して一本線になる */
.qa-icon { position: relative; width: 18px; height: 18px; justify-self: end; }

.qa-icon::before,
.qa-icon::after {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 100%;
  height: 2px;
  border-radius: 2px 1px 2px 1px;
  background: var(--ui-ink);
  transition: transform 0.45s var(--ui-ease);
}

.qa-icon::after { transform: rotate(90deg); }
/* 開くと縦線が寝て「−」になり、アイコン全体が半回転する */
.qa-icon { transition: transform 0.45s var(--ui-ease); }
details.qa-acc[open] .qa-icon { transform: rotate(180deg); }
details.qa-acc[open] .qa-icon::after { transform: rotate(0deg); }

details.qa-acc > summary:hover .qa-q-text { color: var(--ui-accent); }
.qa-q-text { transition: color 0.3s; }

.qa-a-body { padding: 0 2px 22px; color: #444; line-height: 1.9; }

/* ---------- 動きを減らす設定への配慮 ---------- */
@media (prefers-reduced-motion: reduce) {
  .site-header, .site-menu, .sm-list li, .sm-sub, .sm-next,
  .sh-nav a::after, .sh-cta::before, .ui-ink-btn::before,
  .sh-menu-icon span, .qa-icon::before, .qa-icon::after, .nw-thumb img {
    transition: none !important;
  }
  .site-menu { clip-path: none; }
}

.qa-a-body { overflow: hidden; }

/* トップのヒーロー: 次回ワークショップを直接見せる */
.hero-next { display: flex; flex-direction: column; align-items: center; }
.hero-next .nw-card { width: min(440px, 92vw); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); }
.hero-next .nw-more { color: var(--ui-ink); }

@media (max-width: 768px) {
  .hero-next .nw-card { grid-template-columns: 76px 1fr; gap: 12px; padding: 12px; }
  .hero-next .nw-thumb { width: 76px; }
  .nw-title { font-size: 15px; }
}

/* Q&A ページ */
.qa-acc-list { padding: 4px 30px 10px; background: #fff; }
.qa-mark {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-right: 12px;
  border-radius: 50%;
  border: 1px solid var(--ui-ink);
  font: 400 12px/1 'Noto Serif JP', serif;
  flex: none;
}
.qa-mark.is-a { background: var(--ui-ink); color: #fff; border-color: var(--ui-ink); }
.qa-q-text { display: flex; align-items: center; font-family: 'Noto Serif JP', serif; font-size: 16px; letter-spacing: 0.04em; }
.qa-a-body { display: flex; align-items: flex-start; font-size: 15px; }
.qa-a-body .qa-mark { margin-top: 2px; }
details.qa-acc:last-child { border-bottom: 0; }
.qa-category-container { scroll-margin-top: calc(var(--sh-h) + 16px); }
h2.qa-category { margin: 0; }

@media (max-width: 768px) {
  .qa-acc-list { padding: 0 16px 6px; }
  .qa-q-text { font-size: 15px; }
  .qa-a-body { font-size: 14px; }
}

/* スマホのヒーローは縦横比を固定せず、ロゴ・コピー・次回カードがすべて収まる高さにする */
@media (max-width: 768px) {
  header:has(.hero-next) {
    aspect-ratio: auto !important;
    min-height: 0 !important;
    padding-top: 150px !important;
    padding-bottom: 20px !important;
  }
  .hero-next { margin: 18px 0 0 !important; }
  .hero-next .nw-meta { display: none; }
}
@media (max-width: 768px) {
  header:has(.hero-next) .header-slide { background-size: cover !important; }
}
.site-menu:focus { outline: none; }
.sm-link:focus-visible, .sh-cta:focus-visible, .sh-menu-btn:focus-visible, .sh-nav a:focus-visible,
details.qa-acc > summary:focus-visible, .ui-ink-btn:focus-visible {
  outline: 2px solid var(--ui-accent);
  outline-offset: 3px;
}

/* ---------- 見出し: 筆で一本引いたような線が、現れるときに伸びる ---------- */
.brush-title {
  width: fit-content;
  max-width: 100%;
  padding-bottom: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6.4C26 3.6 58 3 86 4.1 112 5.1 138 3.9 158 3' fill='none' stroke='%236b7a4f' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left bottom / 0% 8px;
  transition: background-size 1.1s var(--ui-ease) 0.2s;
}

.brush-title.is-in { background-size: 100% 8px; }

/* ---------- カード: 絵が少し寄って、額縁の細線が浮かぶ ---------- */
@media (hover: hover) {
  .product-card:not(.event-ended) .product-image { transition: transform 1.2s var(--ui-ease); }
  .product-card:not(.event-ended):hover .product-image { transform: scale(1.07); }

  .product-card:not(.event-ended) .product-image-container::after {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 0.5s var(--ui-ease), transform 0.7s var(--ui-ease);
    pointer-events: none;
  }

  .product-card:not(.event-ended):hover .product-image-container::after {
    opacity: 1;
    transform: scale(1);
  }

  .instructor-card { transition: transform 0.5s var(--ui-ease), box-shadow 0.5s var(--ui-ease); }
  .instructor-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08); }
  .instructor-card img { transition: transform 1.2s var(--ui-ease); }
  .instructor-card:hover img { transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  .brush-title { background-size: 100% 8px; transition: none; }
  .product-card .product-image,
  .product-image-container::after,
  .instructor-card, .instructor-card img { transition: none !important; transform: none !important; }
}

/* ---------- アートティーAI（arttea のロゴ画像 + 虹色の「AI」） ----------
   メニューとフッターのリンクで、サービス名を文字ではなくロゴで見せる。大きさは周りの文字（font-size）に合わせる */
.brand-ai-logo { display: inline-flex; align-items: baseline; gap: 0.2em; white-space: nowrap; line-height: 1; vertical-align: baseline; }
.brand-ai-logo .bai-mark { display: block; flex: none; height: 1.08em; }
/* ロゴ画像は文字の下に余白があるので、文字の底の線が AI の底の線にそろうよう、画像を少し下げる */
.brand-ai-logo .bai-mark img { display: block; position: relative; top: 5.75%; width: auto; height: 100%; max-width: none; }
.brand-ai-logo .bai { display: inline-block; font: 800 1.03em/1 'Avenir Next', 'Helvetica Neue', Arial, 'Hiragino Sans', sans-serif; letter-spacing: 0.02em; color: #6a5be6; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .brand-ai-logo .bai { background: linear-gradient(100deg, #19b4e6 0%, #6a5be6 30%, #e2459f 58%, #f59e1b 80%, #19c29a 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
}
@media (forced-colors: active) {
  .brand-ai-logo .bai { background: none; -webkit-text-fill-color: currentColor; color: CanvasText; }
}
