/* ===========================================================
   CRAFIT HOUSE ミニマム平屋診断会 LP
   ベースデザイン：平屋資料請求LP準拠
   =========================================================== */

:root {
  --color-bg: #f3f2ee;
  --color-bg-alt: #e8e6df;
  --color-ink: #2a2a28;
  --color-ink-soft: #706c63;
  --color-line: #dcdad2;
  --color-navy: #7a7570;
  --color-navy-soft: #454a4d;
  --color-accent: #c82536;
  --color-accent-dark: #a11d2c;
  --color-accent-soft: #ecc3c8;
  --color-cream: #fbf9f5;
  --color-label: #8f8a7c;
  --color-label-light: rgba(255,255,255,.6);

  --font-serif: "Noto Serif JP", serif;
  --font-sans: "Noto Sans JP", sans-serif;

  --container: 1120px;
  --radius-pill: 999px;
  --radius-card: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  padding-top: 71px;
}
@media (min-width: 900px) {
  body { padding-top: 71px; }
}
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 .6em;
}
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
button { cursor: pointer; }
.sp-only { display: none; }
.pc-only { display: inline; }

/* ---------- アニメーション ---------- */
.js-anim .reveal-hero {
  opacity: 0;
  transform: translateY(28px);
  will-change: transform, opacity;
}
.js-anim .reveal-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.js-anim .reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 共通レイアウト ---------- */
.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--color-label);
  font-weight: 700;
  margin: 0 0 .8em;
}
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.section-head h2 { font-size: clamp(24px, 3.4vw, 34px); }
.section-lead { color: var(--color-ink-soft); }
section { padding: 96px 0; }

/* ---------- 仮画像プレースホルダー ---------- */
.hero-ph, .plan-ph, .flow-ph, .slide-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
  color: var(--color-ink-soft);
  background: #e7e0d0;
  border: 1px dashed var(--color-line);
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .35s cubic-bezier(.65,0,.35,1), opacity .3s ease, background .3s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-dark); }
.btn-outline { background: transparent; color: var(--color-ink); border-color: var(--color-ink); }
.btn-outline:hover { background: var(--color-ink); color: #fff; }
.btn-large { padding: 18px 36px; font-size: 16px; }
.btn-small { padding: 10px 20px; font-size: 13px; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(245,242,236,.97);
  border-bottom: 1px solid var(--color-line);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
}
.logo-img {
  height: 96px;
  width: auto;
  display: block;
}
.footer-logo .logo-img { height: 96px; }
.nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  flex: 1;
  justify-content: center;
}
.nav a { color: var(--color-ink-soft); }
.nav a:hover { color: var(--color-ink); }
.header-cta { display: flex; align-items: center; gap: 20px; }
.tel-link { text-align: right; line-height: 1.3; }
.tel-label { display: block; font-size: 10px; color: var(--color-ink-soft); }
.tel-number { display: block; font-size: 16px; font-weight: 700; font-family: var(--font-serif); }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px; height: 32px;
  background: none; border: none;
  padding: 0;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--color-ink); }

/* ---------- ヒーロー ---------- */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1080 / 1920;
  overflow: hidden;
}
.hero-image {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url('../images/hero-mobile-v5.png');
  background-size: cover;
  background-position: center;
}
@media (min-width: 900px) {
  .hero { aspect-ratio: 1440 / 800; }
  .hero-image { background-image: url('../images/hero-desktop-v3.png'); }
}
.hero .hero-ph {
  font-size: 14px;
  background: #d8d1c0;
  border: none;
}
.hero-content {
  position: absolute;
  bottom: 60px;
  left: 0; right: 0;
  text-align: center;
  color: #fff;
  padding: 0 24px;
}
.hero-limit {
  font-size: 13px;
  letter-spacing: .16em;
  margin-bottom: .4em;
  opacity: .9;
}
.hero-sub {
  font-size: clamp(13px, 2vw, 16px);
  margin-bottom: .6em;
  opacity: .85;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  text-shadow: 0 2px 16px rgba(0,0,0,.3);
}
.scroll-indicator {
  position: absolute;
  right: 22px; bottom: 34px;
  z-index: 2;
  writing-mode: vertical-rl;
  font-size: 11px;
  letter-spacing: .3em;
  color: rgba(255,255,255,.85);
  display: flex;
  align-items: center;
  gap: 14px;
}
.scroll-indicator::after {
  content: "";
  width: 1px; height: 52px;
  background: rgba(255,255,255,.6);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(.2); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  100% { transform: scaleY(.2); transform-origin: bottom; }
}

/* ---------- イントロ ---------- */
.intro { text-align: center; background: var(--color-cream); }
.intro-inner { max-width: 680px; text-align: center; }
.intro h2 {
  font-size: clamp(22px, 3.2vw, 34px);
  line-height: 1.7;
  text-align: center;
}
.intro-catch {
  display: block;
  text-align: center;
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 .3em;
  color: var(--color-ink);
}

/* ---------- タイプ選択 ---------- */
.types { background: var(--color-bg-alt); }
.types .section-head { max-width: 800px; }
.types .section-head h2 { white-space: nowrap; font-size: clamp(20px, 2.8vw, 30px); }

.type-tabs {
  display: flex;
  gap: 0;
  justify-content: center;
  margin-bottom: 48px;
}
.type-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  padding: 32px 32px 28px;
  flex: 1;
  border: 1px solid var(--color-line);
  border-right: none;
  background: var(--color-cream);
  color: var(--color-ink);
  font-family: var(--font-sans);
  transition: background .25s ease, color .25s ease;
  text-align: left;
  position: relative;
}
.type-tab:last-child { border-right: 1px solid var(--color-line); }
.type-tab:hover { background: #f5f3ef; }
.type-tab.active {
  background: #7a7570;
  color: #fff;
  border-color: #7a7570;
  z-index: 1;
}
.type-tab.active + .type-tab { border-left-color: #7a7570; }
.tab-num-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.tab-num {
  font-family: "Noto Serif JP", serif;
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.02em;
}
.tab-unit {
  font-family: "Noto Serif JP", serif;
  font-size: clamp(14px, 1.5vw, 20px);
  font-weight: 400;
}
.tab-label {
  font-size: clamp(12px, 1.2vw, 16px);
  letter-spacing: .1em;
}

/* 間取りパネル */
.plan-display { min-height: 360px; }
.plan-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  animation: fadeIn .4s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.plan-image-wrap {
  aspect-ratio: 4/3;
  border-radius: var(--radius-card);
  overflow: hidden;
}
.plan-ph {
  height: 100%;
  border-radius: var(--radius-card);
}
.plan-tsubo-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  background: var(--color-navy);
  color: #fff;
  padding: 8px 20px 8px 16px;
  border-radius: 999px;
  margin-bottom: 16px;
  letter-spacing: .04em;
}
.badge-num {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
}
.badge-unit {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 400;
}
.plan-title {
  font-size: clamp(20px, 2.8vw, 28px);
  margin-bottom: .8em;
}
.plan-text { color: var(--color-ink-soft); font-size: 15px; margin: 0; }

/* ---------- 診断会の流れ ---------- */
.flow { background: var(--color-bg); }
.flow-steps {
  display: flex;
  flex-direction: column;
  gap: 88px;
}
.flow-step {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas: "img heading" "img body";
  gap: 8px 56px;
  align-items: start;
}
.flow-step--reverse {
  grid-template-areas: "heading img" "body img";
}
.flow-text-top { grid-area: heading; display: flex; align-items: center; gap: 20px; }
.flow-image-wrap {
  grid-area: img;
  aspect-ratio: 4/3;
  border-radius: var(--radius-card);
  overflow: hidden;
}
.flow-ph { height: 100%; }
.flow-body { grid-area: body; color: var(--color-ink-soft); font-size: 15px; margin: 0; }
.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--color-ink);
  color: var(--color-ink);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: .05em;
  flex-shrink: 0;
}
.flow-text-top h3 { font-size: clamp(20px, 2.8vw, 26px); margin: 0; }

/* ---------- スライドショー ---------- */
.about { background: var(--color-navy); color: #fff; }
.about-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.about-head .eyebrow { color: rgba(255,255,255,.5); }
.about-head h2 {
  font-size: clamp(22px, 3.2vw, 34px);
  color: #fff;
}
.slideshow-wrap { position: relative; max-width: 860px; margin: 0 auto; }
.slideshow {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius-card);
  overflow: hidden;
}
.slide {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0;
  transition: opacity .8s ease;
}
.slide.active { opacity: 1; }
.slide-ph { font-size: 14px; background: #3d4547; border-color: rgba(255,255,255,.15); color: rgba(255,255,255,.6); }
.slideshow-dots {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.3);
  padding: 0;
  transition: background .3s ease, transform .3s ease;
}
.dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* ---------- CTA ---------- */
.final-cta { background: var(--color-cream); text-align: center; }
.final-cta h2 { font-size: clamp(24px, 3.6vw, 36px); }
.final-cta .section-lead { margin-bottom: 32px; }
.cta-limit-badge {
  display: inline-block;
  padding: 8px 24px;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-pill);
  font-size: 14px;
  color: var(--color-accent);
  margin-bottom: 32px;
  letter-spacing: .06em;
}
.cta-limit-badge strong { font-size: 18px; }
.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- フッター ---------- */
.site-footer {
  background: var(--color-cream);
  border-top: 1px solid var(--color-line);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-logo-ph {
  font-size: 14px;
  letter-spacing: .1em;
}
.footer-bottom { margin: 0; font-size: 12px; color: var(--color-ink-soft); }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 960px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .tel-link { display: none; }
  section { padding: 64px 0; }
  .sp-only { display: inline; }
  .pc-only { display: none; }
  .about-head h2 { font-size: clamp(18px, 4.5vw, 26px); }

  .plan-panel { grid-template-columns: 1fr; gap: 28px; }
  .flow-step { grid-template-columns: 1fr; gap: 28px; }
  .flow-step--reverse .flow-image-wrap { order: 0; }
  .flow-steps { gap: 64px; }
}

@media (max-width: 600px) {
  .header-inner { padding: 14px 16px; }
  .header-cta .btn-small { padding: 9px 16px; font-size: 12px; }
  .type-tabs { gap: 8px; flex-wrap: nowrap; align-items: stretch; }
  .type-tab { flex: 1; min-width: 0; padding: 20px 10px; font-size: 13px; }
  .tab-tsubo { font-size: 13px; }
  .tab-label { font-size: 11px; }
  .tab-desc { font-size: 12px; line-height: 1.5; }
  .cta-buttons { flex-direction: column; }
  .cta-buttons .btn { justify-content: center; }
}

/* モバイルナビ */
@media (max-width: 960px) {
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-line);
    padding: 8px 24px 24px;
    gap: 4px;
  }
  .nav.open a {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-line);
    color: var(--color-ink);
  }
}
