/* 森野工務店 完成見学会LP 別デザイン案（デモ） */
:root {
  --base: #efebe6;
  --paper: #f8f6f2;
  --sand: #e6dccb;
  --ink: #3b3431;
  --muted: #776e69;
  --brown: #2f2522;
  --indigo: #1f3f8f;
  --indigo-dark: #172f6b;
  --line: #d6cfc6;
  --white: #ffffff;
  --alert: #a63a2b;
  --serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --en: "EB Garamond", "Times New Roman", serif;
  --wrap: 1080px;
  --r: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--base);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 2;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }

/* デモ表示 */
.demo-bar {
  background: var(--brown);
  color: #e7dfd8;
  font-size: 12px;
  line-height: 1.7;
  padding: 8px 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.demo-bar a { color: var(--sand); }

/* ヘッダー */
.header {
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header__logo {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.12em;
  line-height: 1.3;
}
.header__logo small {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ボタン（丸い矢印付き） */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 10px 10px 28px;
  background: var(--indigo);
  color: var(--white);
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}
.pill:hover { background: var(--indigo-dark); }
.pill i {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--white);
  position: relative;
  flex: none;
}
.pill i::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 14px;
  height: 14px;
  background: var(--indigo);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M1 7h11M8 3l4 4-4 4' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M1 7h11M8 3l4 4-4 4' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.2s;
}
.pill:hover i::before { transform: translateX(3px); }
.pill--small { padding: 8px 22px; font-size: 13px; }
.pill--block { width: 100%; }

/* ファーストビュー */
.fv { position: relative; padding-bottom: 40px; overflow: hidden; }
.fv__line {
  position: absolute;
  left: 0;
  top: 40%;
  width: 360px;
  color: #c9bdae;
  z-index: 0;
}
.fv__photo {
  position: relative;
  margin-left: 8vw;
  height: min(62vh, 600px);
  min-height: 400px;
  border-radius: var(--r) 0 0 var(--r);
  overflow: hidden;
  background: var(--sand);
  z-index: 1;
}
.fv__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 45%; }
.fv__body {
  position: relative;
  z-index: 2;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 40px;
}
.fv__title {
  order: 2;
  margin-top: -0.95em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.45;
  letter-spacing: 0.06em;
  text-align: right;
}
.fv__title span {
  display: inline-block;
  background: var(--base);
  padding: 0 0 0 0.3em;
  white-space: nowrap;
}
.fv__title span:first-child { display: table; margin-left: auto; padding-top: 0.15em; }
.fv__info {
  order: 1;
  margin-top: -88px;
  padding: 28px 32px 32px;
  background: var(--paper);
  border-radius: var(--r);
  min-width: 360px;
}
.fv__label { font-size: 13px; font-weight: 700; line-height: 1.6; }
/* 開催日：カレンダー札を線でつなぐ */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.fv__dates {
  margin: 16px 0 14px;
  display: flex;
  align-items: center;
}
.day {
  width: 88px;
  flex: none;
  padding: 8px 0 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: center;
  line-height: 1;
  position: relative;
  overflow: hidden;
}
.day::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 24px;
  background: var(--indigo);
}
.day__m {
  position: relative;
  display: block;
  height: 16px;
  font-family: var(--en);
  font-style: italic;
  font-size: 15px;
  color: var(--white);
  letter-spacing: 0.06em;
}
.day__d {
  display: block;
  margin-top: 12px;
  font-family: var(--en);
  font-size: 44px;
  font-weight: 500;
  color: var(--ink);
}
.day__w {
  display: inline-grid;
  place-items: center;
  margin-top: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--indigo);
  font-size: 12px;
  font-weight: 700;
  color: var(--indigo);
}
.day--sun .day__w { background: var(--indigo); color: var(--white); }
.fv__join {
  flex: 1;
  min-width: 64px;
  position: relative;
  height: 2px;
  margin: 0 -1px;
  background: repeating-linear-gradient(90deg, var(--indigo) 0 6px, transparent 6px 11px);
  transform-origin: left center;
}
.fv__join span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 2px 10px;
  background: var(--paper);
  font-size: 12px;
  font-weight: 700;
  color: var(--indigo);
  white-space: nowrap;
}

/* 開くときの動き：札が順に浮かび、線が伸びてつながる */
@media (prefers-reduced-motion: no-preference) {
  .day { animation: day-in 0.7s cubic-bezier(.2,.8,.2,1) both; }
  .day:first-of-type { animation-delay: 0.5s; }
  .day--sun { animation-delay: 1.3s; }
  .day::before { animation: day-tab 0.5s ease-out both; animation-delay: inherit; }
  .fv__join { animation: join-draw 0.7s ease-in-out 0.9s both; }
  .fv__join span { animation: fade-in 0.4s ease-out 1.5s both; }
  .day--sun .day__w { animation: stamp 0.45s cubic-bezier(.3,1.6,.5,1) 1.9s both; }
}
@keyframes day-in {
  from { opacity: 0; transform: translateY(18px) rotate(-3deg); }
  to { opacity: 1; transform: none; }
}
@keyframes day-tab {
  from { transform: scaleY(0); transform-origin: top; }
  to { transform: scaleY(1); transform-origin: top; }
}
@keyframes join-draw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes stamp {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.fv__meta { font-size: 13px; color: var(--muted); }
.fv__info .pill { margin-top: 20px; }

/* セクション共通 */
.section {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 112px 24px 0;
}
.head { margin-bottom: 48px; }
.head--center { text-align: center; }
.en {
  font-family: var(--en);
  font-style: italic;
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--indigo);
  line-height: 1.4;
}
.title {
  margin-top: 6px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.6;
  letter-spacing: 0.08em;
}
.lead { margin-top: 16px; color: var(--muted); max-width: 36em; }
.head--center .lead { margin-left: auto; margin-right: auto; }
.note { font-size: 12px; color: var(--muted); }
.note--center { text-align: center; margin-top: 12px; }

/* メッセージ */
.message { max-width: 720px; text-align: center; }
.message__text {
  margin-top: 40px;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 2.4;
}
.message__text p + p { margin-top: 1.4em; }

/* 住まい手の声 */
.voice__card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--paper);
  border-radius: var(--r);
  overflow: hidden;
}
.voice__photo img { width: 100%; height: 100%; object-fit: cover; min-height: 360px; }
.voice__body { padding: 48px 48px 40px; }
.voice__quote {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.8;
  margin-bottom: 20px;
}
.voice__name { margin-top: 20px; font-weight: 700; font-size: 14px; }
.voice__body .note { margin-top: 4px; }

/* 間取り */
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.plan-card {
  margin: 0;
  padding: 32px 32px 24px;
  background: var(--paper);
  border-radius: var(--r);
}
.plan-card figcaption {
  margin-top: 16px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}
.plan-card figcaption .en { display: block; font-size: 18px; font-weight: 400; }
.plan { width: 100%; height: auto; display: block; }
.plan__floor { fill: var(--sand); }
.plan__walls rect, .plan__walls path { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: butt; }
.plan__labels text { font-family: var(--sans); font-size: 14px; fill: var(--ink); text-anchor: middle; letter-spacing: 0.05em; }
.plan--before .plan__walls rect, .plan--before .plan__walls path { stroke: #a39a92; }
.plan--before .plan__labels text { fill: var(--muted); }
.spec {
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.spec div { border-top: 1px solid var(--line); padding-top: 12px; }
.spec dt { font-size: 12px; color: var(--muted); }
.spec dd { margin: 2px 0 0; font-weight: 700; line-height: 1.7; }

/* 見どころ */
.point-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
.point-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r);
}
.point-item h3 {
  margin-top: 20px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.06em;
  line-height: 1.6;
}
.point-item p { margin-top: 10px; font-size: 14px; }

/* スタッフ */
.staff-list { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.ph {
  aspect-ratio: 4 / 3;
  border-radius: var(--r);
  background:
    radial-gradient(circle at 50% 38%, #d7cbb8 0 14%, transparent 14.5%),
    radial-gradient(ellipse at 50% 100%, #d7cbb8 0 34%, transparent 34.5%),
    var(--sand);
  display: grid;
  place-items: end start;
  padding: 12px 16px;
  font-size: 12px;
  color: var(--muted);
}
img.ph { width: 100%; height: auto; object-fit: cover; padding: 0; display: block; background: var(--sand); }
.staff-item__role { margin-top: 20px; font-size: 13px; color: var(--indigo); font-weight: 700; }
.staff-item__name { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: 0.12em; }
.staff-item > p:last-child { margin-top: 10px; font-size: 14px; }

/* 開催概要 */
.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td {
  text-align: left;
  vertical-align: top;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.info-table tr:first-child th, .info-table tr:first-child td { border-top: 1px solid var(--line); }
.info-table th { width: 9em; font-family: var(--serif); font-weight: 600; }
.info__note { margin-top: 24px; font-size: 14px; }

/* FAQ */
.faq-list details {
  background: var(--paper);
  border-radius: 14px;
  margin-bottom: 12px;
}
.faq-list summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 64px 20px 28px;
  font-weight: 700;
  position: relative;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  background:
    linear-gradient(var(--indigo), var(--indigo)) center / 12px 1.6px no-repeat,
    linear-gradient(var(--indigo), var(--indigo)) center / 1.6px 12px no-repeat;
  transition: transform 0.2s;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding: 0 28px 22px; color: var(--muted); }

/* 予約 */
.reserve { padding-bottom: 120px; }
.reserve__box {
  background: var(--paper);
  border-radius: calc(var(--r) * 1.5);
  padding: 72px 24px;
}
.form { max-width: 600px; margin: 0 auto; }
.form__row { margin: 0 0 24px; padding: 0; border: none; }
.form label, .form legend { display: block; font-weight: 700; margin-bottom: 8px; padding: 0; }
.req {
  font-size: 11px;
  color: var(--white);
  background: var(--indigo);
  padding: 1px 8px;
  margin-left: 8px;
  border-radius: 999px;
  vertical-align: 1px;
}
.form input[type="text"], .form input[type="email"], .form select, .form textarea {
  width: 100%;
  font: inherit;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(31, 63, 143, 0.15);
}
.slots { display: grid; grid-template-columns: 7.5em repeat(4, 1fr); gap: 8px; align-items: center; }
.slots__day { font-size: 13px; }
.slots label { margin: 0; font-weight: 500; }
.slots input { position: absolute; opacity: 0; }
.slots span {
  display: block;
  text-align: center;
  padding: 8px 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.slots input:checked + span { background: var(--indigo); border-color: var(--indigo); color: var(--white); }
.slots input:focus-visible + span { outline: 2px solid var(--indigo); outline-offset: 2px; }
.form__error { color: var(--alert); font-weight: 700; margin-bottom: 16px; }
.form .pill--block { margin-top: 8px; padding-top: 12px; padding-bottom: 12px; }
.form__done { max-width: 600px; margin: 0 auto; text-align: center; }
.form__done h3 { font-family: var(--serif); font-size: 22px; }
.form__done p { margin-top: 8px; color: var(--muted); }

/* スマホ固定ボタン */
.sp-cta { display: none; }

/* フッター */
.footer {
  background: var(--brown);
  color: #cfc4bb;
  text-align: center;
  padding: 56px 24px;
  font-size: 13px;
}
.footer__logo { font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--white); letter-spacing: 0.14em; margin-bottom: 8px; }
.footer__credit { margin-top: 16px; font-size: 12px; }
.footer__credit a { color: var(--sand); }

/* レスポンシブ */
@media (max-width: 900px) {
  .fv__body { grid-template-columns: 1fr; gap: 0; }
  .fv__title { order: 1; }
  .fv__info { order: 2; min-width: 0; margin-top: 24px; }
  .voice__card { grid-template-columns: 1fr; }
  .voice__photo img { min-height: 0; aspect-ratio: 16 / 9; }
  .point-list { grid-template-columns: 1fr 1fr; }
  .spec { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 14px; }
  .demo-bar { padding: 8px 16px; }
  .header { padding: 14px 16px; }
  .fv__line { display: none; }
  .fv__photo { margin-left: 16px; height: 62vh; min-height: 0; }
  .fv__body { padding: 0 16px; }
  .fv__title { margin-top: -44px; font-size: 27px; }
  .fv__info { padding: 24px 20px; }
  .fv__info .pill { width: 100%; }
  .section { padding: 80px 16px 0; }
  .head { margin-bottom: 32px; }
  .title { font-size: 22px; letter-spacing: 0.06em; }
  .message { text-align: left; }
  .message__text { font-size: 15px; line-height: 2.2; }
  .voice__body { padding: 28px 22px; }
  .voice__quote { font-size: 18px; }
  .plan-grid, .point-list, .staff-list { grid-template-columns: 1fr; gap: 24px; }
  .plan-card { padding: 20px 16px 16px; }
  .info-table th, .info-table td { display: block; width: auto; }
  .info-table th { padding-bottom: 0; border-bottom: none; }
  .info-table tr:first-child td { border-top: none; }
  .info-table td { padding-top: 4px; }
  .reserve { padding-bottom: 96px; }
  .reserve__box { padding: 48px 18px; margin: 0 -4px; }
  .slots { grid-template-columns: repeat(4, 1fr); }
  .slots__day { grid-column: 1 / -1; margin-top: 4px; }
  .sp-cta {
    display: block;
    position: fixed;
    left: 12px; right: 12px; bottom: 12px;
    z-index: 10;
    padding: 14px;
    text-align: center;
    background: var(--indigo);
    color: var(--white);
    font-weight: 700;
    text-decoration: none;
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(31, 63, 143, 0.3);
    transform: translateY(160%);
    transition: transform 0.3s;
  }
  .sp-cta.is-visible { transform: none; }
  .footer { padding-bottom: 96px; }
}

/* ===== スクロール演出（ブロックごと） ===== */
.js-reveal [data-r] {
  transition:
    opacity 0.8s ease,
    transform 0.9s cubic-bezier(.2,.7,.2,1),
    clip-path 1.1s cubic-bezier(.7,0,.2,1);
  transition-delay: calc(var(--i, 0) * 140ms + var(--d, 0ms));
}
/* 下から浮かぶ */
.js-reveal [data-r="up"]:not(.is-in) { opacity: 0; transform: translateY(24px); }
/* 英字の小見出しは横から */
.js-reveal [data-r="slide"]:not(.is-in) { opacity: 0; transform: translateX(-20px); }
.js-reveal .head .title[data-r], .js-reveal .message > .title[data-r] { --d: 120ms; }
.js-reveal .head .lead[data-r] { --d: 240ms; }
/* 写真は下から幕が上がるように現れ、少し引いて止まる */
.js-reveal [data-r="unveil"] { clip-path: inset(0 0 0 0); }
.js-reveal [data-r="unveil"]:not(.is-in) { clip-path: inset(100% 0 0 0); }
.js-reveal img[data-r="unveil"] {
  transition:
    clip-path 1.1s cubic-bezier(.7,0,.2,1),
    transform 1.6s cubic-bezier(.2,.7,.2,1);
  transition-delay: calc(var(--i, 0) * 140ms);
}
.js-reveal .voice__photo[data-r="unveil"] img {
  transition: transform 1.6s cubic-bezier(.2,.7,.2,1);
}
.js-reveal img[data-r="unveil"]:not(.is-in),
.js-reveal .voice__photo[data-r="unveil"]:not(.is-in) img { transform: scale(1.08); }
.js-reveal .point-item h3[data-r] { --d: 300ms; }
.js-reveal .point-item p[data-r] { --d: 420ms; }
.js-reveal .staff-item h3[data-r], .js-reveal .staff-item > p[data-r] { --d: 250ms; }
/* 予約エリアはふわっと広がる */
.js-reveal [data-r="rise"]:not(.is-in) { opacity: 0; transform: scale(0.96); }

/* 間取り図：カードが出たあと、壁の線が描かれ、部屋名が浮かぶ */
.plan__walls rect, .plan__walls path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.js-reveal .plan-card .plan__walls > * {
  transition: stroke-dashoffset 1.6s cubic-bezier(.5,0,.2,1);
  transition-delay: calc(var(--i, 0) * 300ms + 300ms);
}
.js-reveal .plan-card:not(.is-in) .plan__walls > * { stroke-dashoffset: 1; }
.js-reveal .plan-card .plan__labels,
.js-reveal .plan-card .plan__floor {
  transition: opacity 0.6s ease;
  transition-delay: calc(var(--i, 0) * 300ms + 1500ms);
}
.js-reveal .plan-card:not(.is-in) .plan__labels,
.js-reveal .plan-card:not(.is-in) .plan__floor { opacity: 0; }
