*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #2a2420;
  --primary-dark: #1a1512;
  --accent: #8b6f5a;
  --accent-dark: #6d5444;
  --accent-light: #e8ddd6;
  --text: #2a2420;
  --text-light: #7a6e68;
  --bg: #ffffff;
  --bg-light: #f4f1ed;
  --bg-warm: #e8e2d9;
  --border: #ddd5cc;
  --radius: 4px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}

/* 文字組み：意味のまとまり単位で改行し、語の途中での改行を防ぐ */
.nw { white-space: nowrap; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  flex-shrink: 0;
  cursor: pointer;
}

.logo__top {
  display: flex;
  align-items: flex-end;
  gap: 11px;
  padding-bottom: 5px;
}

.logo__sym {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo__roof {
  display: block;
  width: 38px;
  height: 9px;
}

.logo__roof line {
  stroke: var(--primary);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.logo__k {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 25px;
  line-height: 1;
  color: var(--primary);
  margin-top: 2px;
}

.logo__wordmark {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 2px;
}

.logo__renove {
  font-family: 'Avenir', 'Avenir Next', 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: .38em;
  padding-left: .38em;
  color: var(--text);
  line-height: 1;
}

.logo__design {
  font-family: 'Avenir', 'Avenir Next', 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: .38em;
  padding-left: .38em;
  color: var(--accent);
  margin-top: 5px;
  line-height: 1;
}

.logo__floor {
  align-self: stretch;
  height: 1.5px;
  background: var(--accent);
  border-radius: 2px;
}

/* フッター（暗背景）用 */
.logo--footer .logo__roof line { stroke: #fff; }
.logo--footer .logo__k { color: #fff; }
.logo--footer .logo__renove { color: #fff; }
.logo--footer .logo__design { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
}

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

.nav__cta {
  background: var(--accent);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 2px;
  transition: background .2s !important;
}

.nav__cta:hover { background: var(--accent-dark) !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: .3s;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  gap: 16px;
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  text-decoration: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('images/09/after/hero_main.jpg');
  background-size: cover;
  background-position: center;
}

.hero__bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(30,22,16,.75) 40%, rgba(30,22,16,.3) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: 80px 24px;
  text-align: center;
}

.hero__sub {
  font-size: 13px;
  background: rgba(255,255,255,.2);
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  letter-spacing: .05em;
}

.hero__title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
}

.hero__desc {
  font-size: 15px;
  opacity: .9;
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: .2s;
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  letter-spacing: .05em;
}

.btn--primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(139,111,90,.3); }

.btn--outline {
  border: 2px solid rgba(255,255,255,.8);
  color: #fff;
  background: transparent;
}

.btn--outline:hover { background: rgba(255,255,255,.15); }

.btn--full { width: 100%; text-align: center; font-size: 16px; padding: 16px; }

/* ===== STATS ===== */
.stats {
  background: var(--bg-warm);
  border-bottom: 1px solid var(--border);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}

.stats__item {
  padding: 28px 16px;
  border-right: 1px solid #d9cfc4;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stats__item:last-child { border-right: none; }

.stats__num {
  display: block;
  font-size: clamp(15px, 2.4vw, 20px);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.4;
  margin-bottom: 8px;
}

.stats__num small { font-size: 18px; }

.stats__num span { display: block; }

.stats__label {
  font-size: 13px;
  color: var(--text-light);
}

/* ===== SECTION COMMON ===== */
.section { padding: 80px 0; }

.section__title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  position: relative;
  padding-bottom: 16px;
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: var(--accent);
  border-radius: 0;
}

.section__sub {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 48px;
  font-size: 14px;
}

/* ===== REASONS ===== */
.reasons { background: var(--bg-light); }


.reasons__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.reason-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: transform .2s;
}

.reason-card:hover { transform: translateY(-4px); }

.reason-card__icon { font-size: 40px; margin-bottom: 16px; }

.reason-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--accent);
  line-height: 1.6;
  min-height: 3.2em;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  align-content: center;
}

.reason-card h3 span { display: inline-block; }

.reason-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.9;
  word-break: auto-phrase;
  text-wrap: pretty;
}

/* ===== WORKS ===== */
.works { background: #fff; }

.works__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.work-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow .2s, transform .2s;
}

.work-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.1); transform: translateY(-4px); }

.work-card__img {
  height: 180px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 12px;
}

.work-card__img--kitchen { background: linear-gradient(135deg, #6b4226, #a0522d); }
.work-card__img--bath    { background: linear-gradient(135deg, #1a5276, #2980b9); }
.work-card__img--toilet  { background: linear-gradient(135deg, #1a6b4a, #27ae60); }
.work-card__img--exterior { background: linear-gradient(135deg, #4a235a, #8e44ad); }
.work-card__img--interior { background: linear-gradient(135deg, #784212, #e67e22); }
.work-card__img--small   { background: linear-gradient(135deg, #1a3a5a, #2471a3); }

.work-card__badge {
  background: rgba(255,255,255,.9);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.work-card__body { padding: 20px; }

.work-card__body h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.work-card__body p  { font-size: 13px; color: var(--text-light); line-height: 1.7; }

.work-card__price {
  margin-top: 12px !important;
  font-size: 12px !important;
  color: var(--primary) !important;
  font-weight: 500;
}

/* ===== WORKS NEW ===== */
.works__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-top: 48px;
}

.work-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
  transition: box-shadow .2s, transform .2s;
  content-visibility: auto;
  contain-intrinsic-size: auto 480px;
}

.work-item:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
  transform: translateY(-4px);
}

.work-item--wide {
  grid-column: span 2;
}

/* ===== 施工例（After単独）===== */
.work-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.work-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== BEFORE/AFTER SLIDER ===== */
.ba-slider {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: ew-resize;
  user-select: none;
  touch-action: pan-y;
  transform: translateZ(0);
}

.ba-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.ba-img--after {
  clip-path: inset(0 0 0 50%);
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.ba-handle::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: #fff;
  box-shadow: 0 0 6px rgba(0,0,0,.3);
}

.ba-handle__btn {
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  font-size: 11px;
  color: var(--accent);
  z-index: 1;
  position: relative;
}

.ba-handle__btn--pc { display: none; }
.ba-handle__btn--sp { display: flex; }

.ba-label {
  position: absolute;
  top: 12px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: .06em;
  z-index: 2;
  pointer-events: none;
  transition: opacity .15s ease;
}

.ba-label--before {
  left: 12px;
  background: rgba(0,0,0,.6);
  color: #fff;
}

.ba-label--after {
  right: 12px;
  background: var(--accent);
  color: #fff;
}

.work-item__body {
  padding: 24px;
  text-align: center;
}

.work-item__cat {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .04em;
  margin-bottom: 12px;
}

.work-item__body h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.work-item__body p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.85;
  margin-bottom: 16px;
}

.work-item__meta {
  display: flex;
  gap: 16px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
  border-top: 1px solid var(--border);
  margin-top: 14px;
  padding-top: 14px;
}

.work-item__meta li {
  font-size: 12px;
  color: var(--text-light);
  padding-left: 10px;
  position: relative;
}

.work-item__meta li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
}

.works__more {
  text-align: center;
  margin-top: 56px;
}

.btn--dark {
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--primary);
}

.btn--dark:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .works__list { grid-template-columns: 1fr; }
  .work-item--wide { grid-column: span 1; }
}

/* ===== WORKS CAROUSEL ===== */
.works__extra {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.works-carousel__strip {
  position: relative;
  overflow: hidden;
}

.works-carousel__track {
  display: flex;
  gap: 16px;
  will-change: transform;
  transition: transform .38s cubic-bezier(.25,.46,.45,.94);
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}

.works-carousel__track.is-dragging {
  transition: none;
  cursor: grabbing;
}

.works-carousel__item {
  flex: 0 0 420px;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.works-carousel__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  transition: transform .4s ease;
}

.works-carousel__item:hover img { transform: scale(1.04); }

.works-carousel__btn {
  position: absolute;
  top: 12px;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,.14);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, box-shadow .2s;
}

.works-carousel__btn:hover {
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}

.works-carousel__btn--prev { left: 12px; }
.works-carousel__btn--next { right: 12px; }

@media (max-width: 768px) {
  .works-carousel__item { flex: 0 0 72vw; }
  /* スマホでもナビボタンを表示（ドラッグに頼らず操作できるように）。中央に配置して押しやすく */
  .works-carousel__btn {
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    font-size: 15px;
  }
  .works-carousel__btn:hover { transform: translateY(-50%); }
  .works-carousel__btn--prev { left: 6px; }
  .works-carousel__btn--next { right: 6px; }
}

/* ===== SERVICES ===== */
.services { background: var(--bg-light); }

.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.service-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.service-item span { font-size: 28px; }

.services__note {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-light);
}

/* ===== ABOUT ===== */
.about { background: var(--bg-warm); }

.about__inner {
  max-width: 720px;
  margin: 0 auto;
}

.about__text p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.9;
  word-break: auto-phrase;
  text-wrap: pretty;
  text-align: center;
}

.about__table {
  width: 100%;
  margin-top: 24px;
  border-collapse: collapse;
  font-size: 14px;
}

.about__table th, .about__table td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.about__table th {
  width: 170px;
  color: var(--text-light);
  font-weight: 500;
  padding-right: 28px;
}

/* ===== FLOW ===== */
.flow { background: #fff; }

.flow__steps {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 48px;
}

.flow__step {
  flex: 1;
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
}

.flow__num {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  opacity: .5;
  line-height: 1;
  margin-bottom: 12px;
}

.flow__step h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.flow__step p  {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.8;
  word-break: auto-phrase;
  text-wrap: pretty;
}

.flow__arrow {
  font-size: 20px;
  color: var(--primary);
  opacity: .4;
  padding-top: 50px;
  flex-shrink: 0;
}

/* ===== CONTACT ===== */
.contact {
  background: var(--primary);
  background-image: url('images/03/after/2A69513A-6EEA-4323-BF3D-17EF35C8DA85_0.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
}
.contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(30,20,14,.82);
}

.contact .section__title::after { background: var(--accent); }
.contact > .container { position: relative; z-index: 1; }

.contact__form {
  max-width: 680px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius);
  padding: 40px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form__group { margin-bottom: 20px; }
.form__group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}

.required {
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 6px;
}

.form__group input,
.form__group select,
.form__group textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color .2s;
  background: #fff;
}

.form__group input:focus,
.form__group select:focus,
.form__group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,107,58,.1);
}

.form__msg {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  text-align: center;
}

.form__msg--success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.form__msg--error {
  background: #fdecea;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

/* ===== FOOTER ===== */
.footer {
  background: #1a1a1a;
  padding: 40px 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer__nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer__nav a {
  text-decoration: none;
  color: rgba(255,255,255,.6);
  font-size: 13px;
  transition: color .2s;
}

.footer__nav a:hover { color: #fff; }

.footer__copy {
  font-size: 12px;
  color: rgba(255,255,255,.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav { display: none; }
  .hamburger { display: flex; }

  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stats__item { padding: 22px 12px; }
  .stats__item:nth-child(2) { border-right: none; }
  /* 上段2セルに下線を引き、2×2の格子（4分割）を明確にする */
  .stats__item:nth-child(1),
  .stats__item:nth-child(2) { border-bottom: 1px solid #d9cfc4; }
  /* 数字部分の高さを揃えてラベル位置を統一（1行でも2行分確保） */
  .stats__num { min-height: 2.5em; display: flex; flex-direction: column; justify-content: center; }

  .reasons__grid,
  .works__grid { grid-template-columns: 1fr; }

  .services__grid { grid-template-columns: repeat(2, 1fr); }

  .flow__steps {
    flex-direction: column;
    gap: 0;
  }

  .flow__arrow {
    width: 100%;
    padding: 4px 0;
    text-align: center;
    transform: rotate(90deg);
  }
  .flow__step { width: 100%; }

  .contact__form { padding: 24px 20px; }
  .form__row { grid-template-columns: 1fr; }

  .hero__actions { flex-direction: column; }
  .btn { text-align: center; }

  .hero__bg { background-position: 65% center; }
}
