/* ==========================================================================
   めぐりの家 デザインC「水と光」
   夜明け前の深い青緑 → 朝の光へ、下へスクロールするほど明るくなる構成。
   ========================================================================== */

@property --glow-y {
  syntax: '<percentage>';
  inherits: true;
  initial-value: 42%;
}

:root {
  /* 夜（ヒーロー） */
  --color-night-1: #0e2a30;
  --color-night-2: #17444a;
  --color-ivory: #f3efe6;
  --color-gold: #f0c987;
  --color-pale-water: #a8dcd4;
  --color-dawn: #c98d6b;

  /* 昼（本文） */
  --color-day-bg: #f6f5f1;
  --color-white: #ffffff;
  --color-text: #2c3a38;
  --color-accent: #2e6f6a;
  --color-accent-2: #c98d6b;
  --color-border: rgba(46, 111, 106, 0.16);

  /* タイポグラフィ */
  --font-serif: "Yu Mincho", "Hiragino Mincho ProN", serif;
  --font-sans: "Yu Gothic Medium", "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;

  /* 形状 */
  --radius-lg: 28px;
  --radius-md: 16px;
  --shadow-card: 0 16px 40px rgba(20, 50, 48, 0.10);
  --container-max: 1080px;
  --header-h: 76px;

  --glow-y: 42%;
}

/* 一日の光の旅：ゾーンごとの背景・差し色（bodyのdata-daytimeで切り替え） */
body[data-daytime="asa"] {
  --zone-bg: rgba(241, 244, 240, 0.85);
  --zone-bg-white: rgba(251, 253, 250, 0.88);
  --zone-accent: #7d9b8e;
}
body[data-daytime="hiru"] {
  --zone-bg: rgba(247, 245, 238, 0.85);
  --zone-bg-white: rgba(255, 253, 246, 0.88);
  --zone-accent: #b99a4e;
}
body[data-daytime="yuu"] {
  --zone-bg: rgba(247, 238, 227, 0.85);
  --zone-bg-white: rgba(253, 246, 238, 0.88);
  --zone-accent: #c98d6b;
}
body[data-daytime="yoi"] {
  --zone-bg: rgba(240, 233, 233, 0.85);
  --zone-bg-white: rgba(249, 243, 245, 0.88);
  --zone-accent: #96788f;
}

/* ---------- リセット ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.85;
  color: var(--color-text);
  background: var(--color-day-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-accent);
  color: var(--color-ivory);
  padding: 0.75em 1.25em;
  z-index: 200;
}
.skip-link:focus {
  left: 0.5em;
  top: 0.5em;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- ページ全体の光の粒canvas ---------- */
.page-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* header/main/footerはcanvasより手前に描画する */
main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: var(--color-white);
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
html.js .site-header {
  background: transparent;
  color: var(--color-ivory);
  border-bottom-color: transparent;
}
html.js .site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  color: var(--color-text);
  border-bottom-color: var(--color-border);
  backdrop-filter: blur(6px);
}
.site-header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-logo {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.site-logo a { text-decoration: none; }
.site-nav {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.site-nav ul {
  display: flex;
  gap: 1.4rem;
  white-space: nowrap;
}
.site-nav a {
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  padding: 0.4rem 0.1rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, opacity 0.25s ease;
}
.site-nav a:hover { border-bottom-color: currentColor; }

/* ---------- ヒーロー ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% var(--glow-y), rgba(240, 201, 135, 0.16), rgba(240, 201, 135, 0) 46%),
              linear-gradient(180deg, var(--color-night-1) 0%, var(--color-night-2) 100%);
}
html.js .hero {
  animation: hero-breathe 8s ease-in-out infinite;
}
@keyframes hero-breathe {
  0%, 100% { --glow-y: 36%; }
  50% { --glow-y: 54%; }
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 44rem;
  padding: 0 1.5rem;
  text-align: center;
  color: var(--color-ivory);
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 8vw, 4.4rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-shadow: 0 0 28px rgba(240, 201, 135, 0.35), 0 0 3px rgba(243, 239, 230, 0.4);
}

/* 「いのちは、」「めぐる。」の途中で改行しない */
.hero-title span {
  display: inline-block;
}
.hero-sub {
  margin-top: 1.6rem;
  font-size: 1.02rem;
  line-height: 2;
  color: rgba(243, 239, 230, 0.92);
}
.hero-actions {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.btn {
  display: inline-block;
  padding: 0.85em 1.9em;
  border-radius: 999px;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.15s ease;
}
.btn-ghost {
  color: var(--color-ivory);
  border-color: rgba(243, 239, 230, 0.55);
  background: rgba(243, 239, 230, 0.02);
}
.btn-ghost:hover {
  background: rgba(240, 201, 135, 0.16);
  border-color: rgba(240, 201, 135, 0.7);
  box-shadow: 0 0 24px rgba(240, 201, 135, 0.18);
}
.btn-solid {
  background: var(--color-accent);
  color: var(--color-ivory);
  border-color: var(--color-accent);
}
.btn-solid:hover {
  background: #24544f;
}
.btn:active { transform: translateY(1px); }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 2.4rem;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-cue span {
  display: block;
  width: 1px;
  height: 46px;
  background: rgba(243, 239, 230, 0.55);
}
html.js .scroll-cue span {
  animation: cue-stretch 2.4s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cue-stretch {
  0%, 100% { transform: scaleY(0.55); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 0.9; }
}

/* 夜明けの帯 */
.dawn-band {
  height: 180px;
  background: linear-gradient(180deg, var(--color-night-2) 0%, var(--color-dawn) 52%, var(--color-day-bg) 100%);
}

/* 夕暮れ→宵へ、空が暮れていく帯（dawn-bandと対になる） */
.dusk-band {
  height: 170px;
  background: linear-gradient(180deg, #f6e1c4 0%, #d09577 34%, #8f7590 68%, #5a5874 100%);
}

/* ---------- セクション共通 ---------- */
.section {
  position: relative;
  z-index: 1;
  padding: 5.5rem 0;
  scroll-margin-top: var(--header-h);
}
/* 白セクションもわずかに透かして、時間の色と光の粒がうっすら通るようにする */
.section-white {
  background: var(--zone-bg-white, var(--color-white));
  transition: background-color 1.2s ease;
}
.section-light {
  background: var(--zone-bg, var(--color-day-bg));
  transition: background-color 1.2s ease;
}

/* 一日の色はセクションごとに固定ではっきり見せる（JSが無くても物語が伝わる）
   半透明にして光の粒が背景に透けるようにする */
#about   { background: rgba(233, 242, 235, 0.86); } /* 朝: ひんやりした若草色 */
#why     { background: rgba(245, 250, 246, 0.9); }  /* 朝: 明るい白緑 */
#menu    { background: rgba(249, 239, 214, 0.86); } /* 昼: 金色の光 */
#profile { background: rgba(255, 250, 236, 0.9); }  /* 昼: あたたかい白 */
#faq     { background: rgba(246, 224, 195, 0.9); }  /* 夕暮れ: 茜色 */

#about .daytime-label, #why .daytime-label { color: #64917e; }
#menu .daytime-label, #profile .daytime-label { color: #a98a35; }
#faq .daytime-label { color: #b76f42; }
#menu .ripple-deco, #profile .ripple-deco { stroke: #b99a4e; }
#faq .ripple-deco { stroke: #c98d6b; }

/* 宵のセクション（お問い合わせ）: 夕方の空の青紫。文字は象牙色 */
.section-dusk {
  background: linear-gradient(180deg, #5a5874 0%, #4c4d68 55%, #414459 100%);
  color: var(--color-ivory);
}
.section-dusk .section-label { color: rgba(243, 239, 230, 0.65); }
.section-dusk .daytime-label { color: #e9c98e; }
.section-dusk .ripple-deco { stroke: rgba(243, 239, 230, 0.35); }
.section-dusk .lead { color: rgba(243, 239, 230, 0.94); }
.section-dusk .form-row input,
.section-dusk .form-row select,
.section-dusk .form-row textarea {
  border-color: rgba(243, 239, 230, 0.25);
  color: var(--color-text); /* 白い欄の中の文字は濃色のまま */
}
.section-dusk .form-row input:focus,
.section-dusk .form-row select:focus,
.section-dusk .form-row textarea:focus { outline-color: #e9c98e; }
.section-dusk .form-status {
  color: #ffe3b0;
  background: rgba(243, 239, 230, 0.1);
}

.section-head {
  position: relative;
  margin-bottom: 2.6rem;
}
.section-label {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-2);
  margin-bottom: 0.5rem;
}
.daytime-label {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--zone-accent, var(--color-accent-2));
  margin-bottom: 0.6rem;
  transition: color 1.2s ease;
}
.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* 波紋演出：セクション見出しが初めて画面に入ったときに一度だけ広がる */
.section-head::before,
.section-head::after {
  content: "";
  position: absolute;
  left: 10%;
  top: 0.2em;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 1px solid var(--zone-accent, var(--color-accent));
  opacity: 0;
  transform: scale(0.3);
  pointer-events: none;
}
html.js .section-head.ripple-play::before {
  animation: heading-ripple 1.4s ease-out both;
}
html.js .section-head.ripple-play::after {
  animation: heading-ripple 1.5s ease-out 0.15s both;
}
@keyframes heading-ripple {
  0% { opacity: 0.3; transform: scale(0.3); }
  100% { opacity: 0; transform: scale(1.7); }
}
.ripple-deco {
  position: absolute;
  right: -0.5rem;
  top: -1.2rem;
  width: 108px;
  height: 108px;
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1;
  opacity: 0.12;
  z-index: -1;
}

.lead {
  max-width: 42rem;
  font-size: 1.02rem;
  line-height: 2;
  margin-bottom: 2.4rem;
}
.note {
  margin-top: 2rem;
  font-size: 0.88rem;
  line-height: 1.9;
  color: #5b6664;
  background: rgba(46, 111, 106, 0.06);
  border-left: 3px solid var(--color-accent);
  padding: 0.9rem 1.2rem;
  border-radius: 4px;
}

/* ---------- カード ---------- */
.card-grid {
  display: grid;
  gap: 1.6rem;
}
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  position: relative;
  overflow: hidden;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 2rem 1.8rem;
}
.section-light .card { background: var(--color-white); }
.card h3 {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 0.9rem;
}
.card p { font-size: 0.95rem; line-height: 1.9; color: #4a5654; }
.card::after {
  content: "";
  position: absolute;
  right: 1.4rem;
  bottom: 1.4rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--color-accent-2);
  opacity: 0;
  transform: scale(0.4);
  transition: transform 0.6s ease, opacity 0.6s ease;
  pointer-events: none;
}
.card:hover::after {
  opacity: 0.5;
  transform: scale(2.6);
}

.menu-card { text-align: left; }
.menu-price {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--color-accent);
  margin: 0.3rem 0 0.1rem;
}
.menu-price span { font-size: 1rem; margin-left: 0.15em; }
.menu-time {
  font-size: 0.85rem;
  color: var(--color-accent-2);
  margin-bottom: 0.8rem;
}

/* ---------- なぜセクション（番号バッジ） ---------- */
.why-list {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  max-width: 42rem;
}
.why-list li {
  display: flex;
  gap: 1.4rem;
  align-items: flex-start;
}
.badge-circle {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--color-accent);
}
.why-body h3 {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 500;
  margin-bottom: 0.6rem;
}
.why-body p { font-size: 0.95rem; line-height: 1.9; color: #4a5654; }

/* ---------- プロフィール ---------- */
.profile-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 2.6rem 2rem;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.4rem;
  align-items: start;
}
.profile-silhouette {
  width: 100%;
  max-width: 200px;
}
.profile-ring { fill: none; stroke: var(--color-accent-2); stroke-width: 1; opacity: 0.35; }
.profile-head { fill: var(--color-accent); opacity: 0.85; }
.profile-body { fill: var(--color-accent); opacity: 0.85; }
.profile-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}
.profile-role {
  font-size: 0.88rem;
  color: var(--color-accent-2);
  margin-bottom: 1.2rem;
}
.profile-history { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.4rem; }
.profile-history li {
  position: relative;
  padding-left: 1.2rem;
  font-size: 0.93rem;
  line-height: 1.8;
}
.profile-history li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent-2);
}
.profile-message {
  font-size: 0.97rem;
  line-height: 2;
  color: #4a5654;
}

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 44rem;
}
.faq-item {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.4rem;
  box-shadow: var(--shadow-card);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 0.98rem;
  padding: 0.3rem 1.6rem 0.3rem 0;
  position: relative;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0.2rem;
  top: 0.15rem;
  font-size: 1.2rem;
  color: var(--color-accent);
  transition: transform 0.25s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  margin-top: 0.8rem;
  font-size: 0.93rem;
  line-height: 1.9;
  color: #4a5654;
}

/* ---------- お問い合わせ ---------- */
.contact-form {
  max-width: 36rem;
}
.form-row { margin-bottom: 1.4rem; }
.form-row label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.req {
  margin-left: 0.5em;
  font-size: 0.72rem;
  color: #fff;
  background: var(--color-accent-2);
  padding: 0.15em 0.6em;
  border-radius: 999px;
  vertical-align: middle;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.75em 0.9em;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-white);
  font-size: 1rem;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}
.form-row textarea { resize: vertical; }
.form-status {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--color-accent);
  background: rgba(46, 111, 106, 0.08);
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
}

/* ---------- フッター ---------- */
.site-footer {
  position: relative;
  /* 宵の青紫から夜の深い青緑へ、上端でなめらかにつなぐ */
  background: linear-gradient(180deg, #414459 0%, #22374a 14%, var(--color-night-1) 34%);
  color: var(--color-ivory);
  padding: 4rem 0 2.6rem;
  overflow: hidden;
}
.footer-ripple {
  position: absolute;
  right: -20px;
  top: -20px;
  width: 140px;
  height: 140px;
  fill: none;
  stroke: var(--color-pale-water);
  stroke-width: 1;
  opacity: 0.18;
}
.footer-inner { position: relative; z-index: 1; }
.footer-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}
.footer-address {
  font-size: 0.9rem;
  color: rgba(243, 239, 230, 0.85);
  margin-bottom: 1.4rem;
}
.footer-return {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  color: var(--color-ivory);
  opacity: 0.85;
  letter-spacing: 0.03em;
  margin-bottom: 1.6rem;
}
.footer-disclaimer {
  font-size: 0.85rem;
  line-height: 1.9;
  color: rgba(243, 239, 230, 0.85);
  max-width: 42rem;
  margin-bottom: 1.6rem;
}
.footer-copyright {
  font-size: 0.8rem;
  color: rgba(243, 239, 230, 0.6);
}

/* ---------- スクロール出現（JS有効時のみ） ---------- */
.reveal { opacity: 1; transform: none; }
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 900px) {
  .card-grid-3 { grid-template-columns: 1fr; }
  .card-grid-2 { grid-template-columns: 1fr; }
  .profile-card { grid-template-columns: 1fr; }
  .profile-silhouette { max-width: 140px; margin: 0 auto; }
}
@media (max-width: 600px) {
  :root { --header-h: 60px; }
  .section { padding: 3.6rem 0; }
  .site-header-inner { padding: 0.7rem 1rem; }
  .site-nav ul { gap: 1rem; }
  .why-list li { gap: 1rem; }
  .badge-circle { width: 38px; height: 38px; font-size: 0.95rem; }
}

/* ---------- prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .hero { animation: none; }
  html.js .scroll-cue span { animation: none; }
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .card::after { transition: none; }
  .section-head::before,
  .section-head::after { animation: none !important; opacity: 0 !important; }
  .section-light { transition: none; }
  .section-white { transition: none; }
  .daytime-label { transition: none; }
}
