:root {
  --color-base: #efdebc; /* Base */
  --color-accent: #e60012; /* Accent */
  --color-turquoise: #1b5d75; /* ターコイズ */
  --color-retro-green: #4a773c; /* レトログリーン */
  --color-cream: #ffb400; /* クリーム */
  --color-kaki: #aa572a; /* 柿色 */
  --color-black: #000000; /* 黒 */

  --maxw: 1128px; /* PC最大幅 */
  --gutter: 16px; /* ベース余白 */
  --radius: 16px;
}

/* ------------------------------

　　ベース

------------------------------ */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  color: var(--color-black, #000000);
  background: var(--color-base, #efdebc);
  font: 16px/1.75 "Noto Serif JP", serif;
  text-rendering: optimizeLegibility;
  background-image: url(../img/noise-512.webp);
  background-repeat: repeat;
  background-size: 512px 512px;
  background-position: top left;
  font-kerning:auto;
  font-feature-settings: "palt", "kern";
  text-align:justify;
  hyphens:auto;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Zen Antique", serif;
}

ul{
  list-style:none;
}

.fontZen{
  font-family: "Zen Antique", serif;
}

/* ページトップに戻るボタン */
#to-page-top {
	position: fixed;
	right: 20px;
	bottom: 20px;
	width: 40px;
	height: 40px;
	background-color: #fff;
	border-radius: 50%;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.5s ease, visibility 0.5s ease;
	z-index: 100;
}
/* 表示状態 */
#to-page-top.active {
	opacity: 1;
	visibility: visible;
}
/* CSSで作る「fa-chevron-up」風の矢印（V字型） */
#to-page-top::before,
#to-page-top::after {
	content: "";
	position: absolute;
	width: 14px;  /* 線の長さ */
	height: 2px;  /* 線の太さ */
	background-color: #000;
	left: 50%;
	bottom: 50%;
	transform-origin: bottom center;
}
/* 左側の線：45°回転 */
#to-page-top::before {
	transform:translate(-10px) rotate(-45deg);
}
/* 右側の線：-45°回転 */
#to-page-top::after {
	transform:translate(-2px)  rotate(45deg);
}


/* ------------------------------

　　ヘッダー

------------------------------ */
#header {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 10;
  background: transparent;
}

#header img {
  display: block;
  width: clamp(180px, 24vw, 360px);
  height: auto;
}

/* ロゴのフェード */
#header img {
  transition: opacity 300ms ease;
  will-change: opacity;
  opacity: 1;
}
#header img.is-hidden {
  opacity: 0;
}

/* 動きが苦手な方への配慮 */
@media (prefers-reduced-motion: reduce) {
  #header img { transition: none; }
}


/* ------------------------------

　　フッター

------------------------------ */
footer {
  background: var(--color-turquoise, #1b5d75);
  background-image: url(../img/noise-512.webp);
  background-repeat: repeat;
  background-size: 512px 512px;
  background-position: top left;
  color: var(--color-base, #efdebc);
}
footer .container {
  max-width: var(--maxw, 1128px);
  width: 90%;
  margin: 0 auto;
  padding: 32px 0 16px;
}

footer .container p a{
  display:flex;
  align-items:center;
  justify-content:flex-start;
}
footer .container p img{
  width:auto;
  height:24px;
  display:inline-block;
  background-color:#fff;
  border-radius:50%;
}
footer .container p span{
  display:inline-block;
  height:30px;
  padding-left:4px;
}

footer .container section{
  font-size:12px;
  font-weight:400;
  margin-top:16px;
}
footer .container section h4{
  font-family:"Noto Serif JP", serif;
}
footer .container section ul{
  list-style: disc;
  margin: 0;
  padding-left: 1em;
}

footer .container section ul li{
  display: list-item;
  padding-inline-start: 4px;
}

footer .container section ul li::marker {
  color: currentColor;
  font-size: 1em;
  transform: scale(1.4);
}

footer .container .copyRight{
  text-align:center;
  margin:16px 0 0 0;
}

/* ------------------------------

　　ヒーロー

------------------------------ */
.hero{
  position: relative;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  overflow: clip;
}

.hero-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.heroText {
  position: absolute;
  z-index: 2;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: clamp(16px, 2vw, 24px);
  line-height:1.5;
  color: var(--color-black, #000000);
  padding: 1rem 1.25rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: transparent;
  text-shadow:
    0 0 16px  rgba(239, 222, 188, 1),
    0 0 20px rgba(239, 222, 188, 0.9),
    0 0 32px rgba(239, 222, 188, 0.8),
    0 0 48px rgba(239, 222, 188, 0.7),
    0 0 64px rgba(239, 222, 188, 0.6);
}

.heroText h2 {
  font-feature-settings: "pkna"; /* プロポーショナルかな：カギカッコの詰め */
}
.brkt-open,
.brkt-close { display: inline-block; }
.brkt-open  { margin-inline-start: -0.4em; }
.brkt-close { margin-inline-end:   -0.4em; }
.brkt-open, .brkt-close { letter-spacing: -0.02em; }


/* ------------------------------

　　メイン

------------------------------ */

main {
  max-width: var(--maxw, 1128px);
  width: 90%;
  margin: 80px auto 0 auto;
  padding-bottom:480px;
  position: relative;
  --yatai-h: clamp(360px, 45vw, 720px);
  padding-bottom: var(--yatai-h);
}
main::after{
  content:"";
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:0;
  width:100vw;                 /* 画面幅に合わせて可変 */
  height:var(--yatai-h);       /* main の padding-bottom と同じにしてピッタリ */
  background: url(../img/bgyatai.png) no-repeat center bottom / cover; /* 左右はトリミング */
  opacity:.25;                 /* 薄さ（0.15〜0.4くらいで好み調整） */
  pointer-events:none;
}

main h3 {
  color: var(--color-kaki, #aa572a);
  border-top: 1px solid var(--color-kaki, #aa572a);
  border-bottom: 1px solid var(--color-kaki, #aa572a);
  padding: 0.8em 0;
  margin: 32px 0 16px;
  font-size:clamp(16px, 1.7vw, 24px);
}

main .lead{
  font-size:clamp(16px, 1.7vw, 24px);
}

main p{
  font-size:clamp(14px, 1.5vw, 18px);
  line-height:2;
  margin: 0 0 1.5em;
}
main #poem-kaizan pre{
  font-size:clamp(12px, 1.5vw, 18px);
  font-family: "Zen Antique", serif;
}

main figure.figureS{
  max-width:240px;
}
main figure.figureM{
  max-width:480px;
}

@media(min-width:768px){
  main article .contentsWrapGrid{
    display:grid;
    grid-template-columns:1fr 1fr;
    column-gap:24px;
    justify-items: center;
    align-items: start;
    grid-auto-rows: auto;
  }
  main article .contentsWrapGrid > p {
    grid-column: 1;
  }
  main article .contentsWrapGrid > figure:last-child {
    grid-column: 2;
    grid-row: 1 / span 999;
    align-self: start;
  }
  main .imgBox .imgBoxContents{
    display:grid;
    grid-template-columns:1fr 1fr;
    column-gap:24px;
    place-items: center;
  }
}

main figcaption{
  text-align:center;
  font-size:clamp(12px, 1.2vw, 14px);
}

main .imgBox{
  margin-top:80px;
}
main .imgBox figure{
  margin-top:24px;
}

/* ------------------------------

　　フォーム

------------------------------ */

button[data-modal-open="contact"],
button[data-modal-open="privacy"] {
  background: none;
  border: none;
  color: var(--color-base, #efdebc);
  font: inherit;
  cursor: pointer;
  padding: 0;
}

/* オーバーレイ */
.mf-overlay{
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, visibility .25s ease;
}
.mf-overlay[aria-hidden="false"]{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ダイアログ本体 */
.mf-dialog{
  position: relative;
  margin: 6vh auto;
  width: clamp(320px, 92vw, 720px);
  max-height: min(88vh, 900px);
  overflow: auto;

  background: #fff;
  color: #111;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,.25);
  padding: 28px 28px 24px;

  /* 文字組み（両端揃えの解除・読みやすさ） */
  text-align: left;
  line-height: 1.6;
  letter-spacing: normal;
}

/* ヘッダー */
.mf-header h2{
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
}
.mf-desc{
  margin: 0 0 12px;
  color: #555;
  font-size: 13px;
}

/* 閉じるボタン */
.mf-close{
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #333;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.mf-close:hover{ background: rgba(0,0,0,.06); }

/* 入力ブロック */
.mf-field{ margin: 16px 0; }
.mf-field label{
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: #222;
}

/* 入力要素 */
.mf-field input,
.mf-field textarea{
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  color: #111;

  background: #fff;
  border: 1px solid #d6d6d6;
  border-radius: 8px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.03);
  outline: none;
}
.mf-field textarea{
  resize: vertical;
  min-height: 140px;
}

/* フォーカス可視化（企業サイト向け控えめリング） */
.mf-field input:focus,
.mf-field textarea:focus{
  border-color: var(--color-turquoise, #1b5d75);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-turquoise, #1b5d75) 20%, transparent);
}

/* 必須マーク */
.mf-required{
  color: var(--color-accent, #e60012);
  font-size: 12px;
  margin-left: .4em;
  font-weight: 600;
}

/* プライバシーチェック */
.mf-privacy{ margin: 20px 0; font-size: 13px; }
.mf-checkbox{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.mf-checkbox input{ width: 16px; height: 16px; }

/* エラーメッセージ */
.mf-errors{
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--color-accent, #e60012) 55%, #fff);
  background: color-mix(in srgb, var(--color-accent, #e60012) 6%, #fff);
  color: var(--color-accent, #e60012);
  border-radius: 8px;
  font-size: 13px;
}

/* 確認ビューの表示 */
.mf-review{
  display: grid;
  grid-template-columns: 10em 1fr;
  gap: 10px 16px;
  margin-top: 8px;
  padding-top: 4px;
  border-top: 1px solid #eee;
}
.mf-review dt{ color: #555; font-size: 13px; }
.mf-review dd{ margin: 0; word-break: break-word; }

/* ボタン */
.mf-actions{
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.mf-btn{
  appearance: none;
  border: 1px solid #cfcfcf;
  background: #f7f7f7;
  color: #222;
  padding: .65em 1.25em;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .02s ease;
}
.mf-btn:hover{ background: #efefef; }
.mf-btn:active{ transform: translateY(1px); }

.mf-btn--primary{
  background: var(--color-turquoise, #1b5d75);
  border-color: var(--color-turquoise, #1b5d75);
  color: #fff;
}
.mf-btn--primary:hover{
  background: color-mix(in srgb, var(--color-turquoise, #1b5d75) 90%, #fff);
  border-color: color-mix(in srgb, var(--color-turquoise, #1b5d75) 90%, #fff);
}

/* フォーカスリング（アクセシビリティ） */
.mf-btn:focus-visible,
.mf-close:focus-visible{
  outline: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-turquoise, #1b5d75) 25%, #0000);
}

/* アニメーションを減らす環境 */
@media (prefers-reduced-motion: reduce){
  .mf-overlay{ transition: none; }
}

/* 狭い画面向け微調整 */
@media (max-width: 480px){
  .mf-dialog{ padding: 22px 18px 18px; }
  .mf-header h2{ font-size: 18px; }
  .mf-review{ grid-template-columns: 8.5em 1fr; }
}

.recaptcha-notice {
  font-size: 12px;
  color: #666;
  margin-top: 12px;
  line-height: 1.4;
  text-align: left;
}
.recaptcha-notice a {
  color: inherit;
  text-decoration: underline;
}

.grecaptcha-badge { visibility: hidden; }



/* ------------------------------

　　プライバシー

------------------------------ */
.mf-overlay[data-modal="privacy"] .mf-dialog {
  max-width: 800px;         /* 読みやすい横幅 */
  font-size: 14px;          /* 小さめの文字 */
  line-height: 1.9;         /* 行間を広めに */
  text-align: justify;      /* 両端揃え */
}

.mf-overlay[data-modal="privacy"] h2,
.mf-overlay[data-modal="privacy"] h3 {
  margin-top: 1.8em;
  margin-bottom: 0.8em;
  font-weight: bold;
}

.mf-overlay[data-modal="privacy"] p,
.mf-overlay[data-modal="privacy"] ul,
.mf-overlay[data-modal="privacy"] li {
  margin-bottom: 1em;
}

.mf-overlay[data-modal="privacy"] ul {
  padding-left: 1.5em;   /* 箇条書きは少し字下げ */
}

.mf-overlay[data-modal="privacy"] li {
  list-style: disc;
}
