/* ==========================================================================
   beauty 公式サイト スタイルシート
   参考: https://www.diodio.jp/ の雰囲気(写真を大きく見せる/余白/スクロール誘導)を
   踏まえつつ、beautyブランドとして独自のカラー・タイポグラフィで設計している
   ========================================================================== */

/* ---- カラー・タイポグラフィのトークン定義 ---- */
:root {
  /* ベースカラー(ライト): 温かみのあるアイボリー系 */
  --bg: #faf6f2;
  --bg-elevated: #ffffff;
  --bg-soft: #f1e8e0;
  --fg: #2b241f;
  --fg-muted: #7d7167;
  --border: rgba(43, 36, 31, 0.12);

  /* アクセントカラー: カラメル/カッパー系(ヘアカラーを連想させる色) */
  --accent: #b8794f;
  --accent-strong: #96603a;
  --accent-soft: rgba(184, 121, 79, 0.14);
  --accent-contrast: #fffaf5;

  /* タイポグラフィ */
  --font-display: "Hiragino Mincho ProN", "Yu Mincho", "Georgia", serif;
  --font-body: "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", -apple-system,
    BlinkMacSystemFont, sans-serif;

  /* レイアウト */
  --content-width: 1080px;
  --radius-md: 6px;
  --radius-lg: 16px;
}

/* ダークモード: OSの設定に追従 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17130f;
    --bg-elevated: #201a14;
    --bg-soft: #241d16;
    --fg: #f2e9e0;
    --fg-muted: #a89c8d;
    --border: rgba(242, 233, 224, 0.14);
    --accent: #d99a63;
    --accent-strong: #e8b483;
    --accent-soft: rgba(217, 154, 99, 0.18);
    --accent-contrast: #201a14;
  }
}

/* サイト内テーマ切り替えがある場合は、こちらが media query より優先される */
:root[data-theme="dark"] {
  --bg: #17130f;
  --bg-elevated: #201a14;
  --bg-soft: #241d16;
  --fg: #f2e9e0;
  --fg-muted: #a89c8d;
  --border: rgba(242, 233, 224, 0.14);
  --accent: #d99a63;
  --accent-strong: #e8b483;
  --accent-soft: rgba(217, 154, 99, 0.18);
  --accent-contrast: #201a14;
}

:root[data-theme="light"] {
  --bg: #faf6f2;
  --bg-elevated: #ffffff;
  --bg-soft: #f1e8e0;
  --fg: #2b241f;
  --fg-muted: #7d7167;
  --border: rgba(43, 36, 31, 0.12);
  --accent: #b8794f;
  --accent-strong: #96603a;
  --accent-soft: rgba(184, 121, 79, 0.14);
  --accent-contrast: #fffaf5;
}

/* ---- リセット ---- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  /* ページ表示時にふわっと浮かび上がるフェードイン */
  animation: page-fade-in 0.5s ease both;
}

/* ナビ等のリンクをクリックした瞬間、次のページへ遷移する前にふわっと消す(script.js の setupPageTransitions と対) */
body.is-leaving {
  animation: page-fade-out 0.22s ease forwards;
}

@keyframes page-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes page-fade-out {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

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

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

a {
  color: inherit;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- 共通レイアウト ---- */
.section {
  padding: 5.5rem 1.5rem;
}

.section-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1.4rem;
  text-wrap: balance;
}

.section-lead {
  max-width: 40em;
  color: var(--fg-muted);
  font-size: 1.05rem;
  margin-bottom: 2.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2.4rem;
  border-radius: 8px;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  border: 1px solid transparent;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease, color 0.4s ease;
}

.button-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.button-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

/* ---- ヘッダー / ナビゲーション ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  row-gap: 0.4rem;
}

.logo {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 2rem;
  font-size: 0.92rem;
}

.primary-nav a {
  text-decoration: none;
  color: var(--fg);
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.primary-nav a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* 現在表示中のページのナビリンクを常時ハイライトする */
.primary-nav a.is-active {
  color: var(--accent);
  border-color: var(--accent);
}

.header-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.6rem;
}

/* SNS・ECサイトへのアイコンリンク */
.social-links {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--fg-muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.social-links a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.social-links svg {
  width: 17px;
  height: 17px;
}

/* ---- ヒーロー ---- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* 下部は、注記と SCROLL 表示が重ならないよう広めに確保する */
  padding: 6rem 1.5rem 7.5rem;
  overflow: hidden;
  /* ヒーローは常に写真+暗めのオーバーレイの上に文字を乗せるため、
     ライト/ダークどちらのテーマでも読みやすい明るい文字色に固定する */
  --fg: #fdf6ef;
  --fg-muted: rgba(253, 246, 239, 0.8);
}

/* 背景写真のスライドショー: 撮影後は各 hero-slide の src を実写真に差し替える */
.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
}

/* 写真の上でもキャッチコピーが読みやすいよう重ねる暗めのグラデーション */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(15, 11, 8, 0.55) 0%,
    rgba(15, 11, 8, 0.35) 45%,
    rgba(15, 11, 8, 0.6) 100%
  );
}

.hero-content {
  max-width: 640px;
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1.4rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 7vw, 3.4rem);
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-wrap: balance;
  margin-bottom: 1.6rem;
}

.hero-lead {
  color: var(--fg-muted);
  font-size: clamp(1rem, 3.8vw, 1.05rem);
  line-height: 1.9;
  margin-bottom: 2.4rem;
}

/* ヒーロー内の制作サンプル注記(ボタンの下に控えめに表示) */
.hero-note {
  margin-top: 1.6rem;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--fg-muted);
  opacity: 0.85;
}

.scroll-cue {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
  text-decoration: none;
}

.scroll-line {
  width: 1px;
  height: 34px;
  background: var(--fg-muted);
  animation: scroll-cue-move 1.8s ease-in-out infinite;
}

@keyframes scroll-cue-move {
  0%, 100% { transform: scaleY(0.6); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---- サービスカード ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.6rem;
}

.service-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
}

.service-media {
  width: 100%;
  height: 140px;
  border-radius: var(--radius-md);
  margin-bottom: 1.2rem;
  object-fit: cover;
  background: var(--bg-soft);
}

/* 見出しと料金を横並びにする(入りきらない場合は見出しを折り返さず料金を次の行に送る) */
.service-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.75rem;
  margin-bottom: 0.6rem;
}

.service-card-header h3 {
  flex-shrink: 0;
  margin-bottom: 0;
}

.service-price {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.service-card p {
  color: var(--fg-muted);
  font-size: 0.95rem;
}

/* ---- プロフィール ---- */
.profile-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3rem;
  align-items: start;
}

.profile-media {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  object-fit: cover;
  background: var(--bg-soft);
}

.profile-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.profile-bio {
  color: var(--fg-muted);
  margin-bottom: 2rem;
  max-width: 46em;
}

.profile-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem 2rem;
}

.profile-facts dt {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.profile-facts dd {
  font-size: 0.95rem;
}

/* ---- お客様の声 ---- */
.voice-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  margin: 0;
}

.voice-stars {
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
}

.voice-text {
  margin-bottom: 1.2rem;
}

.voice-card footer {
  color: var(--fg-muted);
  font-size: 0.85rem;
}

/* ---- FAQ アコーディオン ---- */
.accordion {
  border-top: 1px solid var(--border);
}

.accordion-item {
  border-bottom: 1px solid var(--border);
}

.accordion-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.4rem 0.2rem;
  font-size: 1.02rem;
  color: var(--fg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.accordion-trigger::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--accent);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.accordion-trigger[aria-expanded="true"]::after {
  transform: rotate(45deg);
}

.accordion-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
}

.accordion-panel p {
  color: var(--fg-muted);
  padding: 0 0.2rem 1.4rem;
  max-width: 42em;
}

/* ---- お問い合わせ ---- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
}

.contact-list li {
  display: flex;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.contact-list li span:first-child {
  width: 4.5em;
  flex-shrink: 0;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.contact-list a {
  text-decoration: none;
}

.contact-list a:hover {
  color: var(--accent);
}

/* 地図の埋め込み(Googleマップ、APIキー不要のoutput=embed形式) */
.map-embed {
  margin-top: 1.6rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  /* 地図読み込み前もレイアウトが崩れないよう高さを確保しておく */
  background: var(--bg-soft);
}

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

.contact-form {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-row label {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.required {
  font-size: 0.72rem;
  color: var(--accent-strong);
  border: 1px solid var(--accent-soft);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

.form-row input,
.form-row textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  resize: vertical;
}

.form-status {
  font-size: 0.9rem;
  color: var(--accent-strong);
  min-height: 1.2em;
}

/* ---- フッター ---- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem;
}

.footer-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--fg);
}

/* フッターの会社情報(会社名 + 所在地) */
.footer-company {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-company-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.footer-company-name {
  /* 他のフッター文字と同じサイズのまま、太さだけ少し強めて目立たせすぎない程度にする */
  font-weight: 600;
  color: var(--fg);
}

.footer-copyright {
  font-size: 0.8rem;
}

/* 制作サンプルであることの注記(全ページ共通でフッターに表示) */
.footer-note {
  max-width: 46em;
  margin: 0.4rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  line-height: 1.8;
  opacity: 0.85;
}

/* 本文中に添える控えめな注記(写真がイメージである旨など) */
.note {
  display: block;
  margin-top: 0.7rem;
  font-size: 0.85rem;
  color: var(--fg-muted);
  opacity: 0.9;
}

/* ---- チャットウィジェット ---- */
.chat-widget {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 100;
}

.chat-toggle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 1.4rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, background 0.2s ease;
}

.chat-toggle:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
}

.chat-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: 320px;
  max-width: calc(100vw - 2.8rem);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* hidden属性がある間は非表示にする(.chat-panelのdisplay:flexより詳細度を上げて上書きする) */
.chat-panel[hidden] {
  display: none;
}

.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.95rem;
}

.chat-panel-header button {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.2rem;
  line-height: 1;
}

.chat-log {
  padding: 1rem 1.1rem;
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  font-size: 0.9rem;
}

.chat-bubble {
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  max-width: 90%;
  line-height: 1.6;
}

.chat-bubble.bot {
  background: var(--bg-soft);
  align-self: flex-start;
}

.chat-bubble.user {
  background: var(--accent-soft);
  align-self: flex-end;
}

.chat-bubble a {
  color: var(--accent-strong);
  font-weight: 600;
}

.chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1.1rem 0.8rem;
}

.chat-quick-replies button {
  font-size: 0.78rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
}

.chat-quick-replies button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chat-input-row {
  display: flex;
  border-top: 1px solid var(--border);
}

.chat-input-row input {
  flex: 1;
  border: none;
  padding: 0.8rem 1.1rem;
  font-size: 0.9rem;
  background: var(--bg-elevated);
  color: var(--fg);
}

.chat-input-row button {
  border: none;
  background: none;
  color: var(--accent);
  font-weight: 600;
  padding: 0 1.1rem;
}

/* ==========================================================================
   レスポンシブ対応(スマホでも見やすいように調整)
   ========================================================================== */
@media (max-width: 860px) {
  /* ハンバーガーに隠さず、ヘッダー内でリンクを折り返して常時表示する */
  .header-inner {
    justify-content: center;
    text-align: center;
  }

  .header-right {
    width: 100%;
    flex-direction: column;
    gap: 0.6rem;
  }

  .primary-nav {
    width: 100%;
    justify-content: center;
    gap: 0.5rem 1.2rem;
    font-size: 0.88rem;
  }

  .social-links {
    justify-content: center;
  }

  .profile-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .profile-media {
    max-width: 260px;
  }
}

@media (max-width: 560px) {
  .section {
    padding: 3.5rem 1.2rem;
  }

  .hero {
    min-height: 88vh;
    padding-top: 5rem;
    /* 注記が2行になっても下部のSCROLL表示と重ならないよう余白を確保する */
    padding-bottom: 8rem;
  }

  .profile-facts {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    width: calc(100vw - 2rem);
  }
}
