/* ================================
   🔤 전역 폰트 선언 (@font-face는 지역 스코프 불가)
   ================================ */
@font-face {
  font-family: 'QurovaDEMO';
  src:
    url('../fonts/QurovaDEMO-SemiBold.woff2') format('woff2'),
    url('../fonts/QurovaDEMO-SemiBold.woff') format('woff'),
    url('../fonts/QurovaDEMO-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* 필요 시 본문에서 Qurova 400 호출될 때 폴백 방지용(같은 파일을 400으로 매핑) */
@font-face {
  font-family: 'QurovaDEMO';
  src:
    url('../fonts/QurovaDEMO-SemiBold.woff2') format('woff2'),
    url('../fonts/QurovaDEMO-SemiBold.woff') format('woff'),
    url('../fonts/QurovaDEMO-SemiBold.otf') format('opentype');
  font-weight: 400;            /* 👈 추가 */
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Siwolguyl';
  src:
    url('../fonts/a시월구일1.woff2') format('woff2'),
    url('../fonts/a시월구일1.woff') format('woff'),
    url('../fonts/a시월구일1.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ParagraphKorean';
  src:
    url('../fonts/a시월구일1.woff2') format('woff2'),
    url('../fonts/a시월구일1.woff') format('woff'),
    url('../fonts/a시월구일1.ttf') format('truetype');
  unicode-range: U+1100-11FF, U+3130-318F, U+AC00-D7AF;
  font-weight: 400;           /* 👈 누락되어 있던 부분 */
  font-style: normal;         /* 👈 누락되어 있던 부분 */
  font-display: swap;
}

/* =========================================
   🎯 section-title 내부에만 적용
   ========================================= */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* 접근성: 모션 줄이기 선호 시 완화 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-snap-type: y proximity; scroll-behavior: auto; }
}


/* 섹션 자체는 풀블리드 + 배경을 담는 기준 박스 */
.container.section-title {
  position: relative;
  overflow: clip;

  /* ✅ 풀블리드 */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  /* ✅ 섹션 자체에 배경 입히기 → 섹션 전체를 100% 덮음 */
  background-image: url('../lyj/background2.jpg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;  /* 섹션의 세로 길이가 얼마나 길어도 꽉 채움 */
}
@supports (width: 100dvw) {
  .container.section-title { width: 100dvw; max-width: 100dvw; } /* 모바일 스크롤바 폭 이슈 방지 */
}

.container.section-title::before {
  content: "";
  position: absolute;
  inset: 0;             /* 섹션 전체 덮음 */
  z-index: 1;           /* 배경 위, 콘텐츠 아래 */
  pointer-events: none;

  /* 위는 흰색, 아래로 갈수록 투명 */
  background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 10%);
}



/* 💬 인트로 문단(가운데 정렬) */
.container.section-title .intro-text {
  text-align: center;
  margin-top: -50px;   /* -80 ~ -140px 사이에서 취향대로 조절 */
  margin-bottom: 13px;
  position: relative;
  z-index: 2;
}

.container.section-title .intro-text p {
  display: inline-block;
  font-family: 'QurovaDEMO', 'ParagraphKorean', serif;
  font-size: 1.1em;
  line-height: 1.8;
  color: #000;
  background: rgba(255, 255, 255, 0.3);
  padding: 35px 45px;
  border-radius: 16px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* ============================= */
/* 섹션 공통 레이아웃 */
.container.section-title .portfolio-section {
  scroll-snap-align: start;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 0;
  width: 100%;           /* <-- 100vw 대신 100% (이중 풀블리드 방지) */
  box-sizing: border-box;
}


/* 텍스트/이미지 레이아웃 */
.container.section-title .portfolio-section .content {
  width: 50%;
  padding: 20px 50px 20px 80px;
  box-sizing: border-box;
  margin-top: 70px;
}
.container.section-title .portfolio-section .image {
  width: 50%;
  padding: 20px;
  box-sizing: border-box;
}
.container.section-title .portfolio-section img {
  width: 70%;
  height: auto;
  display: block;
  margin: 0 auto;
  box-shadow: 7px 7px 8px rgba(0,0,0,0.1);
}

/* 짝수 섹션은 이미지 오른쪽 */
.container.section-title .portfolio-section.even { flex-direction: row-reverse; }
/* 두 번째 섹션은 이미지 왼쪽 */
.container.section-title .portfolio-section.even:nth-of-type(2) { flex-direction: row !important; }

/* 세 번째 섹션 (이미지 2개) */
.container.section-title .portfolio-section .image.multiple {
  display: flex; justify-content: center; align-items: center;
  gap: 5px; width: 50%; box-sizing: border-box;
}
.container.section-title .portfolio-section .image.multiple img {
  width: 52% !important; height: auto; display: block;
  box-shadow: 5px 5px 5px rgba(0,0,0,0.1);
}

/* ============================= */
/* 텍스트 스타일 */
/* ============================= */
.container.section-title .portfolio-section p {
  font-family: 'QurovaDEMO', 'ParagraphKorean', serif; /* Qurova + 한글 대체 */
  font-size: 1.15em;
  line-height: 1.6;
  color: #000;
  background: rgba(255,255,255,0.65);
  padding: 25px 35px;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* 본문 카드 hover */
.container.section-title .portfolio-section .content p {
  position: relative;
  letter-spacing: 0.02em;
  transition: transform .3s ease, box-shadow .3s ease;
  margin-top: 15px;
  background: rgba(255,255,255,0.225);
}
.container.section-title .portfolio-section .content p:hover { transform: translateY(-4px); }

/* 타이틀 */
.container.section-title .portfolio-section h2 {
  font-family: 'QurovaDEMO', 'Minion Variable Concept', serif;
  font-weight: 600;
  font-size: 7em;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #ea002f;
  text-shadow: 2px 2px 8px rgba(255,255,255,0.8);
  margin: 0 0 30px 0;
}

/* QR 이미지 */
.container.section-title .content .qr {
  display:block; width:100px; height:auto;
  margin-top:15px; margin-left:15px;
  opacity:.9; transition: transform .3s ease, opacity .3s ease;
  filter: drop-shadow(1px 1px 2px rgba(0,0,0,.25));
}
.container.section-title .portfolio-section img.qr:hover {
  transform:none !important; filter:none !important; box-shadow:none !important; z-index:auto !important;
}

/* 위치 미세조정 */
.container.section-title .portfolio-section:nth-of-type(1) .image img,
.container.section-title .portfolio-section:nth-of-type(2) .image img,
.container.section-title .portfolio-section:nth-of-type(3) .image.multiple img { transform: translateY(-80px); }
.container.section-title .portfolio-section:nth-of-type(1) .content,
.container.section-title .portfolio-section:nth-of-type(2) .content { transform: translateY(-80px); }
.container.section-title .portfolio-section:nth-of-type(3) .content { transform: translateY(-120px); }

/* 반응형 */
@media (max-width: 768px) {
  .container.section-title .portfolio-section { flex-direction: column; padding: 20px 0; }
  .container.section-title .portfolio-section.even { flex-direction: column-reverse; }
  .container.section-title .portfolio-section .content,
  .container.section-title .portfolio-section .image { width:100%; padding:10px 0; }
  .container.section-title .portfolio-section .image.multiple { flex-direction: column; width:100%; }
  .container.section-title .portfolio-section .image.multiple img { width:80%; }
  .container.section-title .intro-text { margin-top:80px; margin-bottom:0; }
}

/* 제목군: Qurova (굵게) */
.container.section-title h1,
.container.section-title h2,
.container.section-title h3 {
  font-family: 'QurovaDEMO', 'ParagraphKorean', serif;
  font-weight: 600;
}

/* 본문군: ParagraphKorean 우선 */
.container.section-title p,
.container.section-title span,
.container.section-title li,
.container.section-title dt,
.container.section-title dd {
  font-family: 'ParagraphKorean', 'QurovaDEMO', 'Pretendard', sans-serif;
  font-weight: 400;
}

/* 이미지 hover */
.container.section-title .portfolio-section img{
  transition: transform .5s ease, filter .5s ease, box-shadow .5s ease;
  transform-origin: center center; cursor: pointer;
}
.container.section-title .portfolio-section img:hover{
  transform: scale(1.15); filter: brightness(1.1);
  box-shadow: 0 12px 35px rgba(0,0,0,.3); z-index:2;
}
.container.section-title .portfolio-section img:active{
  transform: scale(1.05); filter: brightness(1.0); transition: transform .15s ease;
}


/* 히어로 */
.hero {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* 인트로(섹션 타이틀의 인트로 문단) */
.container.section-title .intro-text {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 30vh;
  display: grid; place-items: center; /* 가운데 배치 유지 */
}

/* 각 포트폴리오 섹션 */
.portfolio-section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100vh;
}

/* 스크롤 스냅 완전 제거 */
body { scroll-snap-type: none; }

/* 기본적으로 안 보였다가 살짝 아래서 위로 페이드 인 */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms ease, transform 600ms ease;
  will-change: opacity, transform;
}

/* 보이기 상태 */
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* 한 섹션 안에서 살짝 시차 주기 (선택) */
.reveal.delay-1 { transition-delay: 80ms; }
.reveal.delay-2 { transition-delay: 160ms; }
.reveal.delay-3 { transition-delay: 240ms; }

/* 접근성: 모션 감소 선호 시 애니메이션 제거 */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;           /* 레이어 최상단 보장 */
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background-color: #ff6699;
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  opacity: 0;              /* 기본 숨김 */
  pointer-events: none;    /* 클릭 막음 */
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.to-top:hover {
  background-color: #ff4477;
}
