/* -------------------------
  mainWrap
-------------------------- */

/* ---- common css ----*/
.mainWrap section { padding: clamp(60px, 10vw, 100px) 0; }

/* ── section head ── */
.sec-head { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; margin-bottom: clamp(32px, 5vw, 64px); }
.sec-head .sec-label { font-size: 1.2rem; letter-spacing: 0.3em; color: var(--color-primary); margin-bottom: 0.8rem; opacity: 0.8; }
.sec-head .sec-title { font-family: 'Hahmlet', 'Pretendard', sans-serif; font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; color: #333; letter-spacing: -0.02em; margin-bottom: 12px; }
.sec-head .sec-decs { font-size: clamp(1rem, 2.5vw, 1.4rem); color: rgba(0, 0, 0, 0.38); line-height: 1.8; }


/* ==== hero section ==== */

@keyframes hero-slideUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes hero-fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes hero-scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}
@keyframes hero-floatUp {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}
@keyframes hero-flowLine1 {
  0%   { stroke-dashoffset: 1800; opacity: 0; }
  6%   { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0.55; }
}
@keyframes hero-flowLine2 {
  0%   { stroke-dashoffset: 1600; opacity: 0; }
  6%   { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0.4; }
}
@keyframes hero-flowLine3 {
  0%   { stroke-dashoffset: 2000; opacity: 0; }
  6%   { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0.3; }
}
@keyframes drop {
  0%   { transform: scaleY(0); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: top; }
  56%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

.hero-sec { position: relative; width: 100%; min-height: 100vh; padding: 0 !important; background: var(--color-bg-point); display: flex; align-items: center; justify-content: center; overflow: hidden; }

.hero-sec .hero-bg-text { position: absolute; font-family: 'Hahmlet', 'Pretendard', sans-serif; font-size: clamp(100px, 22vw, 300px); color: rgba(0, 0, 0, 0.03); letter-spacing: -0.04em; user-select: none; white-space: nowrap; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; z-index: 0; animation: hero-fadeIn 1.4s ease forwards; opacity: 0; }

.hero-sec .hero-lines { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-sec .hero-lines__svg { width: 100%; height: 100%; }
.hero-sec .hl { fill: none; stroke-linecap: round; opacity: 0; }
.hero-sec .hl--1 { stroke: oklch(0.72 0.10 55); stroke-width: 1.4; stroke-dasharray: 1800; animation: hero-flowLine1 3.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; animation-delay: 0.1s; }
.hero-sec .hl--2 { stroke: oklch(0.75 0.08 200); stroke-width: 1.0; stroke-dasharray: 1600; animation: hero-flowLine2 4.0s cubic-bezier(0.4, 0, 0.2, 1) forwards; animation-delay: 0.35s; }
.hero-sec .hl--3 { stroke: oklch(0.78 0.06 55); stroke-width: 1.8; stroke-dasharray: 2000; animation: hero-flowLine3 4.8s cubic-bezier(0.4, 0, 0.2, 1) forwards; animation-delay: 0.6s; }
.hero-sec .hl--4 { stroke: oklch(0.80 0.05 250); stroke-width: 0.8; stroke-dasharray: 1600; animation: hero-flowLine2 5.2s cubic-bezier(0.4, 0, 0.2, 1) forwards; animation-delay: 0.8s; }
.hero-sec .hl--5 { stroke: oklch(0.72 0.09 30); stroke-width: 1.1; stroke-dasharray: 1800; animation: hero-flowLine1 4.2s cubic-bezier(0.4, 0, 0.2, 1) forwards; animation-delay: 1.1s; }

.hero-sec .container { position: relative; z-index: 1; width: 100%; }
.hero-sec .hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; animation: hero-floatUp 6s ease-in-out infinite; animation-delay: 1.5s; }

.hero-sec .hero-label { font-size: clamp(10px, 1vw, 14px); letter-spacing: 0.22em; color: rgba(0, 0, 0, 0.35); text-transform: uppercase; opacity: 0; animation: hero-slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; animation-delay: 0.1s; }

.hero-sec .hero-title { font-family: 'Hahmlet', 'Pretendard', sans-serif; font-size: clamp(40px, 7vw, 88px); color: #1a1714; letter-spacing: -0.03em; line-height: 1.05; margin-top: 16px; opacity: 0; animation: hero-slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; animation-delay: 0.25s; }
.hero-sec .hero-title em { font-style: italic; color: var(--color-primary); }

.hero-sec .hero-desc { font-size: clamp(15px, 1.4vw, 24px); color: rgba(0, 0, 0, 0.38); margin-top: 28px; line-height: 1.85; font-weight: 300; opacity: 0; animation: hero-slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; animation-delay: 0.42s; }
.hero-sec .hero-divider { width: 1px; height: 40px; background: rgba(0, 0, 0, 0.12); margin-top: 40px; opacity: 0; animation: hero-slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; animation-delay: 0.55s; }
.hero-sec .hero-scroll { display: block; font-family: 'Space Mono', monospace; font-size: 10px; letter-spacing: 0.15em; color: rgba(0, 0, 0, 0.22); margin-top: 12px; text-transform: uppercase; opacity: 0; animation: hero-scrollBounce 2s ease-in-out infinite, hero-fadeIn 0.9s ease forwards; animation-delay: 0.65s, 0.65s; }

.scroll-cue { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .5rem; cursor: default; }
.scroll-txt { font-size: 0.65rem; letter-spacing: .25em; text-transform: uppercase; color: #000061; }
.scroll-arrow { width: 1px; height: 48px; background: linear-gradient(to bottom, #B34F2A, transparent); animation: drop 1.6s ease-in-out infinite; }

/* hero 반응형 */
@media (max-width: 768px) {
  .hero-sec .hero-title { font-size: clamp(34px, 9vw, 52px); }
  .hero-sec .hero-desc { font-size: clamp(14px, 4vw, 16px); }
  .hero-sec .hero-label { font-size: clamp(9px, 2.5vw, 12px); }
  .hero-sec .hl--1,
  .hero-sec .hl--3,
  .hero-sec .hl--5 { stroke-width: 1; }
  .hero-sec .hl--4 { display: none; }
}

@media (max-width: 480px) {
  .hero-sec .hero-title { font-size: clamp(30px, 8.5vw, 42px); line-height: 1.1; }
  .hero-sec .hero-desc { font-size: 14px; margin-top: 20px; }
  .hero-sec .hl--2 { display: none; }
}


/* ================================================
   ABOUT SECTION — JOYS Portfolio
   ================================================ */

@keyframes about-cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── 2단 그리드 ── */
.about-sec .about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

/* ── 왼쪽 이미지 영역 ── */
.about-sec .about-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: visible;
}

.about-sec .about-img-inner {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* ── 오른쪽 텍스트 ── */
.about-sec .about-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 코너 장식 */
.about-sec .about-corner { position: absolute; width: 22px; height: 22px; border-color: oklch(0.65 0.12 40); border-style: solid; pointer-events: none; z-index: 2; }
.about-sec .about-corner--tl { top: -8px; left: -8px; border-width: 2px 0 0 2px; }
.about-sec .about-corner--br { bottom: -8px; right: -8px; border-width: 0 2px 2px 0; }

/* ── 코드 에디터 ── */
.about-sec .about-code { width: 100%; height: 100%; background: #0d1117; border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; padding: 20px; font-family: 'Space Mono', monospace; }
.about-sec .about-code__topbar { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.about-sec .about-code__dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.about-sec .about-code__filename { font-size: 10px; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.2); margin-left: 8px; }
.about-sec .about-code__body { flex: 1; overflow-x: auto; }
.about-sec .about-code__line { font-size: clamp(9px, 1.1vw, 13px); line-height: 1.9; white-space: nowrap; }
.about-sec .about-code__ln { color: rgba(255, 255, 255, 0.15); margin-right: 16px; min-width: 18px; display: inline-block; text-align: right; font-size: .85em; user-select: none; }

/* 신택스 컬러 */
.about-sec .about-code__kw  { color: #ff7b72; }
.about-sec .about-code__fn  { color: #d2a8ff; }
.about-sec .about-code__str { color: #a5d6ff; }
.about-sec .about-code__var { color: #ffa657; }
.about-sec .about-code__cm  { color: rgba(255,255,255,.28); font-style: italic; }
.about-sec .about-code__pl  { color: #e6edf3; }
.about-sec .about-code__cursor { display: inline-block; width: 2px; height: 1em; background: oklch(0.72 0.18 145); vertical-align: text-bottom; margin-left: 2px; animation: about-cursor-blink 1.1s step-end infinite; }

/* ── 텍스트 우측 ── */
.about-sec .about-eyebrow { font-size: clamp(16px, 2vw, 20px); color: rgba(0, 0, 0, 0.3); text-transform: uppercase; }
.about-sec .about-eyebrow b { font-weight: 800; }
.about-sec .about-body p { font-size: clamp(15px, 1.8vw, 20px); color: #666; line-height: 1.6; }
.about-sec .about-text .btn-wrap { justify-content: left; }

/* ── about 반응형 ── */
@media (max-width: 768px) {
  .about-sec .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .about-sec .about-img-wrap {
    aspect-ratio: 4 / 3;
    max-width: 480px;
    margin: 0 auto;
  }
  .about-sec .about-code__line {
    font-size: 11px;
  }
  .about-sec .about-body p {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .about-sec .about-code {
    padding: 14px;
  }
  .about-sec .about-code__line {
    font-size: 10px;
  }
  .about-sec .about-code__ln {
    margin-right: 10px;
  }
  .about-sec .about-img-wrap {
    aspect-ratio: 3 / 2;
  }
}


/* ================================================
   WORK SECTION
   ================================================ */

.work-sec .work-list {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 7vw, 80px);
}

.work-sec .work-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}

/* 짝수: 이미지 오른쪽 — order 기반으로 변경 */
.work-sec .work-item--reverse .work-item__img {
  order: 2;
}
.work-sec .work-item--reverse .work-item__txt {
  order: 1;
}

/* ── 이미지 영역 ── */
.work-sec .work-item__img {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 4 / 2;
}
.work-sec .work-item__img-inner {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
}
.work-sec .work-item__img-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (hover: hover) {
  .work-sec .work-item:hover .work-item__img-inner img {
    transform: scale(1.05);
  }
}

/* ── 텍스트 영역 ── */
.work-sec .work-item__txt {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.work-sec .work-item__num { font-family: 'Hahmlet', serif; font-size: 0.8rem; font-style: italic; color: var(--color-primary); opacity: 0.6; letter-spacing: 0.1em; }
.work-sec .work-item__name { font-family: 'Hahmlet', 'Pretendard', sans-serif; font-size: clamp(1.2rem, 2.5vw, 2rem); font-weight: 700; color: #1a1714; letter-spacing: -0.02em; line-height: 1.2; }
.work-sec .work-item__desc { font-size: clamp(0.9rem, 1.5vw, 1rem); color: rgba(0, 0, 0, 0.45); line-height: 1.8; }
.work-sec .work-item__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.work-sec .work-tag { font-size: 0.72rem; padding: 4px 12px; border: 1px solid var(--color-primary); color: var(--color-primary); border-radius: 2px; letter-spacing: 0.04em; }
.work-sec .work-item__link { display: inline-block; font-size: clamp(16px, 2vw, 20px); color: var(--color-primary); text-decoration: none; letter-spacing: 0.06em; width: fit-content; transition: opacity 0.2s; font-weight: 600; }
@media (hover: hover) {
  .work-sec .work-item__link:hover { opacity: 0.6; }
}

/* ── 구분선 ── */
.work-sec .work-item + .work-item {
  padding-top: clamp(40px, 7vw, 80px);
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}

/* ── work 버튼 ── */
.work-sec .btn-wrap { margin-top: clamp(48px, 7vw, 80px); }

/* ── work 반응형 ── */
@media (max-width: 768px) {
  .work-sec .work-item {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  /* 모바일: reverse 아이템도 이미지 항상 위 */
  .work-sec .work-item--reverse .work-item__img {
    order: -1;
  }
  .work-sec .work-item--reverse .work-item__txt {
    order: 0;
  }
  .work-sec .work-item__img {
    aspect-ratio: 16 / 9;
  }
  .work-sec .work-item__name {
    font-size: clamp(1.2rem, 5vw, 1.6rem);
  }
}

@media (max-width: 480px) {
  .work-sec .work-item__txt {
    gap: 12px;
  }
  .work-sec .work-item__desc {
    font-size: 0.9rem;
  }
  .work-sec .btn-wrap {
    margin-top: 40px;
  }
}


/* ================================================
   JOYS TEMPLATE SECTION
   ================================================ */

.joys-sec {
  background: var(--color-bg-point);
  overflow: hidden;
}

.joys-sec .sec-contents {
  position: relative;
}

.joys-sec .joys_Swiper {
  height: 460px;
  padding: 20px 0;
}

.joys-sec .swiper-wrapper {
  display: flex;
  align-items: center;
}

/* ── 슬라이드 공통 ── */
.joys-sec .swiper-slide {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  height: 360px;
  opacity: 0.45;
  transform: scale(0.92);
  transition: opacity 0.4s ease, transform 0.4s ease;
  cursor: default;
}
.joys-sec .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── 활성 슬라이드 ── */
.joys-sec .swiper-slide-active {
  height: 400px !important;
  opacity: 1 !important;
  transform: scale(1) !important;
  box-shadow: 0px 0px 20px rgba(179, 79, 42, 0.4);
}
.joys-sec .swiper-slide-active img {
  transform: scale(1.03);
}

/* ── 오버레이 ── */
.joys-sec .swiper-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 23, 20, 0.7) 0%, rgba(26, 23, 20, 0.2) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 8px;
}
.joys-sec .swiper-slide-active::after {
  opacity: 1;
}

/* ── 슬라이드 정보 텍스트 ── */
.joys-sec .slide-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px 22px; z-index: 2; transform: translateY(8px); opacity: 0; transition: opacity 0.4s ease, transform 0.4s ease; }
.joys-sec .swiper-slide-active .slide-info { opacity: 1; transform: translateY(0); }
.joys-sec .slide-info__num { font-size: 0.7rem; font-style: italic; color: rgba(255, 255, 255, 0.55); letter-spacing: 0.15em; margin-bottom: 4px; display: block; }
.joys-sec .slide-info__name { font-family: 'Hahmlet', 'Pretendard', sans-serif; font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 8px; letter-spacing: -0.01em; }
.joys-sec .slide-info__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.joys-sec .slide-info__tag { font-size: 0.68rem; padding: 3px 10px; background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.25); color: rgba(255, 255, 255, 0.85); border-radius: 2px; letter-spacing: 0.04em; backdrop-filter: blur(4px); }

/* ── 버튼 ── */
.joys-sec .btn-wrap { margin-top: 50px; }
.joys-sec .btn-wrap .link-joys-btn { display: inline-flex; align-items: center; border-radius: 100px; gap: 8px; padding: clamp(12px, 2vw, 16px) clamp(28px, 5vw, 50px); background-color: var(--color-primary); color: #fff; font-size: clamp(1rem, 2.5vw, 1.4rem); font-weight: 500; letter-spacing: 0.14em; transition: background 0.25s, color 0.25s, transform 0.25s, box-shadow 0.25s; }
@media (hover: hover) {
  .joys-sec .btn-wrap .link-joys-btn:hover { background: #7f3d2b; box-shadow: 0 6px 28px rgba(155, 79, 58, 0.45); transform: translateY(-2px); }
}

/* ── joys 반응형 ── */
@media (max-width: 1440px) {
  .joys-sec .swiper-slide-active {
    height: 360px !important;
  }
}
@media (max-width: 1080px) {
  .joys-sec .swiper-slide {
    height: 260px;
  }
  .joys-sec .swiper-slide-active {
    height: 300px !important;
  }
}
@media (max-width: 768px) {
  .joys-sec .joys_Swiper {
    height: 300px;
  }
  .joys-sec .swiper-slide {
    height: 220px;
  }
  .joys-sec .swiper-slide-active {
    height: 260px !important;
  }
}

@media (max-width: 480px) {
  .joys-sec .joys_Swiper {
    height: 240px;
  }
  .joys-sec .swiper-slide {
    height: 180px;
  }
  .joys-sec .swiper-slide-active {
    height: 210px !important;
  }
  .joys-sec .btn-wrap {
    margin-top: 36px;
  }
}


/* ================================================
   CONTACT SECTION
   ================================================ */

.contact-sec { text-align: center; }

/* ── 상단 ── */
.contact-sec .sec-head { align-items: flex-start; margin-bottom: clamp(28px, 5vw, 40px); }
.contact-sec .contact-intro { font-size: clamp(1.1rem, 2.5vw, 1.8rem); color: #333; font-weight: 500; line-height: 1.8; }
.contact-sec .contact-intro span { color: #808080; font-size: 80%; }

/* ── 이메일 글자 영역 ── */
.contact-email {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: clamp(32px, 6vw, 72px);
  overflow: hidden;
  line-height: 1.1;
}

.contact-email__char {
  font-family: 'Hahmlet', 'Pretendard', sans-serif;
  font-size: clamp(2rem, 5.5vw, 6rem);
  font-weight: 700;
  color: #1a1714;
  letter-spacing: -0.02em;
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
}
.contact-email__char--at { color: var(--color-primary); }
.contact-email__char--domain { color: rgba(0, 0, 0, 0.2); }
.contact-email__char.is-visible { transform: translateY(0); opacity: 1; }

/* ── 하단 ── */
.contact-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.4rem, 3vw, 2.5rem);
  max-width: 840px;
  margin: 0 auto;
}

.contact-desc-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-desc {
  font-size: clamp(1rem, 2vw, 1.4rem);
  color: #333;
  line-height: 2;
}

#contactEmail { cursor: pointer; }

/* ── contact 반응형 ── */
@media (max-width: 768px) {
  .contact-sec .sec-head {
    align-items: center;
  }
  .contact-sec .contact-intro {
    text-align: center;
  }
  
  .contact-email__char {
    font-size: clamp(1.6rem, 8vw, 3rem);
  }
  .contact-desc {
    font-size: clamp(0.95rem, 3.5vw, 1.1rem);
    line-height: 1.8;
  }
}

@media (max-width: 480px) {
  .contact-email__char {
    font-size: clamp(1.3rem, 7vw, 2.2rem);
    letter-spacing: -0.03em;
  }
  .contact-bottom {
    gap: 1.2rem;
  }
  .contact-desc {
    font-size: 0.95rem;
  }
}