/* =========================================
   Model House Page Styles
========================================= */

/* スマホ専用改行 */
.sp-br {
  display: none;
}

/* スマホ専用余白 */
.sp-lead-spacer {
  display: none;
}

/* PCのみ折り返し防止 */
.pc-nowrap {
  white-space: nowrap;
}

/* PC専用改行 */
.pc-br {
  display: block;
}

/* --- Common Image Placeholder --- */
.img-placeholder {
  background-color: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border: 1px dashed #999;
}

.img-placeholder .placeholder-text {
  color: #666;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  padding: 20px;
  letter-spacing: 0.1em;
}

/* --- Common Section Elements --- */
.section {
  padding: 120px 0;
}

.mh-section-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.mh-section-header {
  text-align: center;
  margin-bottom: 80px;
}

.mh-section-en {
  display: block;
  font-size: 14px;
  color: var(--color-accent);
  letter-spacing: 0.2em;
  margin-bottom: 0;
  font-weight: 500;
  font-family: 'Shippori Mincho', serif;
}

.mh-section-jp {
  font-size: 40px;
  font-weight: 500;
  color: var(--color-text-primary);
  letter-spacing: 0.05em;
  font-family: 'Shippori Mincho', serif;
  margin: 0;
  line-height: 1.4;
}

/* --- Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-80px);
  transition: opacity 2s cubic-bezier(0.16, 1, 0.3, 1), transform 2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.reveal-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* --- ① Hero Section --- */
.mh-hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  margin-top: 0;
  padding-top: 76px; /* Header offset shifted to padding */
}

.mh-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.mh-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(0, 0, 0, 0.25) 50%,
    rgba(0, 0, 0, 0.0) 100%
  );
  z-index: 2;
}

.mh-hero-content {
  position: relative;
  z-index: 3;
  color: #fff;
  opacity: 0;
  animation: heroTextFadeIn 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.5s;
}

@keyframes heroTextFadeIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.mh-hero-pre {
  font-size: 16px;
  letter-spacing: 0.2em;
  margin-bottom: 24px;
  font-weight: 500;
  font-family: 'Shippori Mincho', serif;
}

.mh-hero-title {
  font-size: 48px;
  font-weight: 500;
  letter-spacing: 0.1em;
  font-family: 'Shippori Mincho', serif;
  line-height: 1.4;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* --- ② Concept Section --- */
.mh-concept {
  background: #fff;
}

.concept-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  align-items: flex-start;
  text-align: left;
}

.concept-left {
  padding-left: 2em;
  padding-top: 1.5em;
}

.concept-right {
  padding-top: 3em;
}

.mh-concept-title {
  font-size: 28px;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: 32px;
  margin-top: 0;
  letter-spacing: 0.1em;
  font-family: 'Shippori Mincho', serif;
  line-height: 1.5;
}

.concept-en {
  display: block;
  font-size: 40px;
  color: var(--color-text-primary);
  letter-spacing: 0.1em;
  margin: 0;
  font-weight: 500;
  font-family: 'Shippori Mincho', serif;
}

.mh-concept-text {
  font-size: 16px;
  line-height: 2.2;
  color: var(--color-text-secondary);
  margin: 0;
}

/* --- ③ Design & Space Section (design-row) --- */
.mh-design-space {
  background-color: #2b2b2b;
  color: #ffffff;
}

.mh-design-space .mh-section-en,
.mh-design-space .mh-section-jp,
.mh-design-space .design-content h3,
.mh-design-space .design-content p,
.mh-design-space .design-label {
  color: #ffffff;
}

.mh-design-space .design-label {
  opacity: 0.7;
}

.design-list {
  display: flex;
  flex-direction: column;
}

.design-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 120px;
}

.design-row:last-child {
  margin-bottom: 0;
}

.design-row.reverse {
  grid-template-columns: 1fr 1.2fr;
}

.design-row.reverse .reveal-left {
  grid-column: 2;
  order: 2;
}

.design-row.reverse .design-content {
  grid-column: 1;
  order: 1;
}

.design-content {
  padding: 0 20px;
  max-width: 480px;
}

.design-label {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: #999;
  margin-bottom: 16px;
  letter-spacing: 0.1em;
}

.design-content p {
  color: var(--color-text-secondary);
  line-height: 2.0;
  font-size: 16px;
}

/* --- ④ Gallery Section (Parallax Sticky Layout) --- */
.mh-gallery-parallax-container {
  position: relative;
  width: 100%;
}

.parallax-item {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transform-origin: center center;
  will-change: transform;
}

@keyframes scale-parallax-bg {
  from { transform: scale(1); }
  to { transform: scale(1.25); }
}

@keyframes scale-parallax-bg-zoomout {
  from { transform: scale(0.85); }
  to { transform: scale(1.05); }
}

.facade-bg {
  transform: scale(0.85);
}

@supports ((animation-timeline: view()) and (animation-range: entry)) {
  .facade-bg {
    animation-name: scale-parallax-bg-zoomout;
  }
}

@supports ((animation-timeline: view()) and (animation-range: entry)) {
  .parallax-item {
    view-timeline-name: --parallax-item;
    view-timeline-axis: block;
  }
  
  .parallax-bg {
    animation: scale-parallax-bg linear both;
    animation-timeline: --parallax-item;
    animation-range: cover 0% cover 100%;
  }
}

.parallax-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background: linear-gradient(to left, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 50%);
  padding: 0;
}

.parallax-overlay .mh-section-inner {
  position: absolute;
  top: 50%;
  right: 5%;
  transform: translateY(-50%);
  width: auto;
  max-width: 450px;
  height: 75%;
  margin: 0;
  padding: 0;
  writing-mode: vertical-rl;
  text-align: left;
}

.mh-gallery-title {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 0;
  margin-left: 24px;
  display: block;
  letter-spacing: 0.1em;
  font-family: 'Shippori Mincho', serif;
}

.mh-gallery-title span {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.05em;
  display: inline-block;
  margin-top: 12px;
}

/* --- ⑤ Floor Plan Section --- */
.mh-floorplan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.mh-fp-img {
  aspect-ratio: 4 / 3;
}

/* --- ⑥ Quality & Performance Section --- */
.mh-quality-layout {
  display: flex;
  align-items: center;
  gap: 60px;
}

.mh-quality-content-left {
  flex: 1.2;
}

.mh-quality-images-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.staggered-images {
  position: relative;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1 / 0.85;
}

.staggered-img {
  position: absolute;
  border-radius: 0;
  overflow: hidden;
}

.staggered-img.img-1 {
  top: 0;
  left: 0;
  width: 75%;
  z-index: 2;
}

.staggered-img.img-2 {
  bottom: 0;
  right: 0;
  width: 60%;
  z-index: 1;
}

.mh-quality-catch {
  font-size: 40px;
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 24px;
  font-family: 'Shippori Mincho', serif;
  line-height: 56px;
  white-space: nowrap;
}

.mh-quality-text {
  font-size: 16px;
  line-height: 2.2;
}

/* --- ⑦ Outline Section --- */
.mh-outline-table {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-collapse: collapse;
  background: #fff;
}

.mh-outline-table th,
.mh-outline-table td {
  padding: 24px;
  border: 1px solid var(--color-border);
  text-align: left;
  font-size: 15px;
}

.mh-outline-table th {
  width: 30%;
  background: #fdfdfc;
  font-weight: 500;
  color: #333;
}

.mh-outline-table td {
  width: 70%;
  color: #555;
  line-height: 1.8;
}

/* --- ⑧ Reservation Section --- */
.mh-reservation-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.mh-btn-cta {
  background: #fff !important;
  color: #333 !important;
  border: 1px solid #fff !important;
  font-weight: 500;
}

.mh-btn-cta:hover {
  background: transparent !important;
  color: #fff !important;
}

/* ============================================
   Responsive: Mobile (768px and below)
============================================ */
@media (max-width: 768px) {
  .section { padding: 80px 0; }
  .mh-section-header { margin-bottom: 40px; }
  .mh-section-jp { font-size: 24px; }
  .mh-hero-title {
    font-size: 28px;
    line-height: 1.8;
  }
  
  .concept-container {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }

  .concept-left {
    padding-left: 0;
  }

  .sp-tight-text {
    letter-spacing: -0.08em !important;
    white-space: nowrap;
  }

  .sp-lead-spacer {
    display: block;
    height: 20px;
  }

  .concept-en {
    font-size: 16px;
    text-align: center;
  }

  .concept-right {
    padding-top: 0 !important;
  }

  .mh-concept-title {
    font-size: clamp(16px, 5.2vw, 24px) !important;
    margin-bottom: 24px;
    margin-top: 0;
    white-space: nowrap;
  }

  .mh-concept-text {
    text-align: left !important;
  }
  
  .design-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 0px !important;
    margin-bottom: 100px;
  }
  
  .design-row .reveal-left {
    order: 1 !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 300px !important;
  }

  .design-row .design-content {
    order: 2 !important;
    padding: 24px 0 0 0 !important;
  }
  
  .parallax-item {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: #000;
  }

  .parallax-bg {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    object-fit: cover !important;
    transform: none !important;
  }

  .parallax-overlay {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: auto;
    background: #000;
    padding: 0 0 48px 0;
  }

  .parallax-overlay .mh-section-inner {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    height: auto;
    max-width: var(--container-max);
    width: auto;
    margin: 0 auto;
    padding-right: var(--container-padding);
    padding-left: var(--container-padding);
    display: block;
    writing-mode: horizontal-tb;
    text-align: left;
  }

  .mh-gallery-title {
    font-size: 22px;
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 16px;
    margin-left: 0;
  }

  .mh-gallery-title span {
    display: inline;
    margin-top: 0;
  }

  .mh-quality-layout {
    flex-direction: column;
    gap: 40px;
  }
  
  .mh-quality-images-right {
    width: 100%;
    display: block;
  }

  .staggered-images {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1 / 0.85;
    margin: 0 auto;
  }

  .staggered-img {
    position: absolute !important;
  }

  .staggered-img.img-1 {
    top: 0 !important;
    left: 0 !important;
    width: 75% !important;
    z-index: 2;
  }

  .staggered-img.img-2 {
    bottom: 0 !important;
    right: 0 !important;
    width: 60% !important;
    z-index: 1;
  }

  .mh-floorplan-grid {
    grid-template-columns: 1fr;
  }
  
  .mh-outline-table th,
  .mh-outline-table td {
    display: block;
    width: 100%;
  }
  
  .mh-outline-table th {
    border-bottom: none;
    padding-bottom: 8px;
  }
  
  .mh-outline-table td {
    border-top: none;
    padding-top: 0;
    margin-bottom: 16px;
  }

  .mh-quality-catch {
    font-size: 24px;
    white-space: normal;
    line-height: 1.4;
  }

  body,
  .mh-concept-text,
  .design-content p,
  .mh-quality-text,
  .mh-reserve-info p {
    font-size: 14px !important;
  }

  .mh-reservation-content h2 {
    font-size: 24px !important;
  }

  .design-content h3 {
    font-size: 20px !important;
    margin-bottom: 21px !important;
  }

  .mh-btn-cta {
    max-width: none !important;
    white-space: nowrap;
    font-size: 13px !important;
    padding: 16px 20px !important;
    gap: 12px !important;
  }

  .mh-btn-cta span:first-child {
    white-space: nowrap;
  }

  .sp-br {
    display: block;
  }

  .pc-br {
    display: none;
  }

  .pc-nowrap {
    white-space: normal;
  }
}
