/* Projects — Project 1: about.css + morph below / Project 2: Figma 137:899 */

:root {
  --project-frame-w: 1920;
  --project-frame-h: 1080;
  --project-morph-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Project 1 → 2 BG morph (Project 1 구조 유지) ── */
.project-bg-morph {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.project-bg-morph__clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 0;
}

.project-bg-morph__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  transform: scale(1.06);
  transform-origin: center bottom;
  pointer-events: none;
}

#projects.is-ready .project-bg-morph__img {
  transform: scale(1);
}

.project-bg-morph__overlay {
  position: absolute;
  inset: 0;
  background: #000c1b;
  opacity: 0.45;
  pointer-events: none;
}

#projects.is-stage-2 .project-bg-morph__overlay {
  opacity: 0;
  transition: opacity 0.7s var(--project-morph-ease);
}

/* ── Project 2 — Figma 137:899 ── */
.about-section .project-stage-2 {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  pointer-events: none;
  overflow: visible;
}

.about-section.is-stage-2 .project-stage-2 {
  display: block;
}

.about-section.is-stage-2 .about-intro-1 {
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.project-stage-2__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #fff url("../images/project-bg 2.jpg") center / cover no-repeat;
  opacity: 0;
  transition: opacity 0.7s var(--project-morph-ease);
}

#projects.is-stage-2 .project-stage-2__bg {
  opacity: 1;
}

.project-stage-2__bg-pattern {
  position: absolute;
  inset: 0;
  transform: rotate(180deg);
  background: url("../images/about-panel-bg.png") bottom center / cover no-repeat;
  opacity: 0.35;
}

.project-stage-2__layout {
  position: absolute;
  z-index: 4;
  left: calc(180 / var(--project-frame-w) * 100%);
  width: calc(1560 / var(--project-frame-w) * 100%);
  max-width: calc(100% - (360 / var(--project-frame-w) * 100%));
  top: calc(180 / var(--project-frame-h) * 100%);
  pointer-events: none;
}

#projects.is-stage-2 .project-stage-2__layout {
  pointer-events: auto;
}

.project-stage-2__head {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

#projects.is-stage-2 .project-stage-2__head {
  pointer-events: auto;
}

.project-stage-2__label {
  margin: 0 0 15px;
  font-size: 20px;
  font-weight: 600;
  line-height: 30px;
  letter-spacing: -0.5px;
  color: #111;
}

.project-stage-2__label-muted {
  font-weight: 500;
  color: rgba(17, 17, 17, 0.5);
}

.project-stage-2__copy {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(24px, 10.26vw, 197px);
}

.project-stage-2__title {
  flex: 0 1 543px;
  margin: 0;
  font-size: clamp(32px, 2.6vw, 50px);
  font-weight: 700;
  line-height: 64px;
  letter-spacing: -1.25px;
  color: #252a5e;
}

.project-stage-2__title p {
  margin: 0;
}

.project-stage-2__body {
  flex: 0 1 820px;
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 32px;
  letter-spacing: -0.45px;
  color: #111;
}

.project-stage-2__body p {
  margin: 0;
}

.project-stage-2__panel-wrap {
  position: relative;
  margin-top: 60px;
  width: 100%;
}

/* Figma 264:7 쌍령공원 BG panel */
.project-stage-2__bg-panel {
  position: relative;
  width: 100%;
  height: clamp(220px, 46.3vw, 500px);
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
}

.project-stage-2__bg-panel-img {
  position: absolute;
  width: 128.33%;
  height: 240.67%;
  left: -14.17%;
  top: -86.56%;
  max-width: none;
  object-fit: cover;
  pointer-events: none;
  transform: scale(1.1);
  transform-origin: center center;
  will-change: transform;
}

#projects.is-stage-2 .project-stage-2__bg-panel-img {
  animation: project-stage-2-panel-zoom 5s cubic-bezier(0.22, 1, 0.36, 1) 0.54s forwards;
}

@keyframes project-stage-2-panel-zoom {
  from {
    transform: scale(1.1);
  }

  to {
    transform: scale(1);
  }
}

#projects.is-stage-2 .project-bg-morph {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.7s var(--project-morph-ease), visibility 0s linear 0.7s;
}

.project-stage-2__label,
.project-stage-2__title,
.project-stage-2__body,
.project-stage-2__bg-panel,
.project-stage-2__home-btn {
  opacity: 0;
  visibility: hidden;
}

.project-stage-2__home-btn {
  position: absolute;
  top: 30px;
  right: 30px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 334px;
  max-width: calc(100% - 40px);
  height: 90px;
  padding: 0 50px;
  border-radius: 999px;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  pointer-events: auto;
  color: #0044ef;
  transition: background-color 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.project-stage-2__home-btn:hover {
  background-color: rgba(244, 247, 255, 0.9);
}

.project-stage-2__home-btn-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-stage-2__home-btn-en {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.4px;
  color: rgba(0, 68, 239, 0.5);
  text-transform: capitalize;
  white-space: nowrap;
}

.project-stage-2__home-btn-ko {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.425px;
  color: #0044ef;
  white-space: nowrap;
}

.project-stage-2__home-btn-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  display: block;
}

@media (min-width: 768px) {
  .project-stage-2__home-btn-inner {
    gap: 12px;
  }

  .project-stage-2__home-btn-en {
    font-size: 16px;
  }

  .project-stage-2__home-btn-ko {
    font-size: 17px;
  }
}


@media (max-width: 1024px) {
  .project-stage-2__layout {
    left: 24px;
    width: calc(100% - 48px);
    max-width: none;
    top: 100px;
    padding-bottom: 80px;
  }

  .project-stage-2__copy {
    flex-direction: column;
    gap: 20px;
  }

  .project-stage-2__title,
  .project-stage-2__body {
    flex: 1 1 auto;
    max-width: 100%;
  }

  .project-stage-2__home-btn {
    position: relative;
    top: auto;
    right: auto;
    margin: 16px auto 0;
    width: min(334px, 100%);
    padding: 0 32px;
  }

  .about-section.is-stage-2 .project-stage-2 {
    overflow-y: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-bg-morph__overlay,
  .project-stage-2__bg {
    transition: none !important;
  }

  .project-stage-2__label,
  .project-stage-2__title,
  .project-stage-2__body,
  .project-stage-2__bg-panel,
  .project-stage-2__home-btn {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  .project-stage-2__bg-panel-img {
    animation: none !important;
    transform: none !important;
  }
}
