/* =========================================================
   main.css — 메인 페이지 (풀페이지 스냅 + 6섹션)
   ========================================================= */

/* ---------- FULLPAGE mechanics ----------
   데스크탑: JS 휠 컨트롤러가 한 번에 한 섹션씩 이동(main.js). 모바일: 네이티브 스크롤. */
.fullpage {
  height: 100dvh; overflow-y: scroll; overflow-x: hidden;
  scrollbar-width: none;
}
.fullpage::-webkit-scrollbar { display: none; }
.fp-sec {
  position: relative; min-height: 100dvh;
  display: flex; overflow: hidden;
}
@media (max-width: 768px) {
  .fullpage { height: auto; overflow: visible; scroll-behavior: auto; }
  /* 모바일도 각 섹션 = 한 화면(100dvh) 유지 · 콘텐츠 넘치면 늘어남(클립 X) */
  .fp-sec { min-height: 100dvh; display: flex; overflow: hidden; }
}

/* ---------- reveal 시스템 : 섹션 활성화 시 등장 — 시네마틱 페이드+슬라이드 */
[data-reveal] {
  opacity: 0; transform: translateY(52px);
  transition: opacity 1s var(--e-expo), transform 1.15s var(--e-expo);
  will-change: opacity, transform;
}
.fp-sec.is-active [data-reveal] { opacity: 1; transform: none; }
/* 섹션 콘텐츠 계층별 스태거 (제목 → 본문 → 버튼 순으로 흘러나옴) */
.fp-sec.is-active [data-reveal]:nth-child(2) { transition-delay: .14s; }
.fp-sec.is-active [data-reveal]:nth-child(3) { transition-delay: .28s; }
.fp-sec.is-active [data-reveal]:nth-child(4) { transition-delay: .42s; }

/* 헤딩·리드는 마스크 언마스크(글자가 아래에서 위로 드러남) */
[data-reveal].mask-up {
  clip-path: inset(0 0 100% 0); transform: translateY(0);
  transition: clip-path 1.1s var(--e-expo), opacity .8s var(--e-expo);
}
.fp-sec.is-active [data-reveal].mask-up { clip-path: inset(-12% 0 -12% 0); }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal].mask-up { opacity: 1; transform: none; clip-path: none; transition: none; }
}

/* ---------- 배경 켄번즈 슬로우 줌 (진입 시 사진이 서서히 커짐) ---------- */
.bigsec::before, .quality::before, .esg::before {
  transform: scale(1.05); transform-origin: 50% 50%; will-change: transform;
}
.bigsec.is-active::before, .quality.is-active::before, .esg.is-active::before {
  animation: kenBurns 13s var(--e-out) forwards;
}
@keyframes kenBurns { from { transform: scale(1.05); } to { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) {
  .bigsec.is-active::before, .quality.is-active::before, .esg.is-active::before { animation: none; }
}

/* shared type */
.h2 { font-family: var(--font-head); font-weight: 800; font-size: 40px; line-height: 1.25; color: var(--ink); letter-spacing: -.01em; }
.h2.light { color: var(--white); }
.lead { font-size: 26px; line-height: 1.4; font-weight: 500; color: var(--ink); }
.lead.light { color: var(--white); font-weight: 400; }
.eyebrow { display: inline-block; color: var(--green); font-family: var(--font-head); font-weight: 800; font-size: 20px; letter-spacing: .02em; }
.giant { font-family: var(--font-head); font-weight: 800; color: var(--white); font-size: clamp(64px, 5.6vw, 108px); line-height: 1.08; letter-spacing: -.02em; }

/* =========================================================
   S1 — HERO
   ========================================================= */
.hero { background: #0d1c22; align-items: flex-end; }
.hero-video { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-video video, .hero-video iframe {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 100%; height: 100%; object-fit: cover; border: 0; pointer-events: none;
}
/* YouTube 배경 커버 (16:9를 화면 전체로) + 상/하단 UI(제목·로고) 크롭 */
.hero-video.is-yt iframe {
  width: 100vw; height: 56.25vw; min-height: 100dvh; min-width: 177.78dvh;
  transform: translate(-50%, -50%) scale(1.35);
}
/* 상호작용 차단(호버 컨트롤·일시정지 방지) */
.hero-video.is-yt::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.15) 32%, rgba(0,0,0,.25) 70%, rgba(0,0,0,.6) 100%);
}
.hero-inner { position: relative; z-index: 2; width: 100%; max-width: none; margin: 0; padding: 0 50px 20vh; }
.hero-title {
  color: var(--white); font-family: var(--font-body); font-weight: 700;
  font-size: clamp(28px, 3.9vw, 72px); line-height: 1.25; letter-spacing: -.015em;
  text-shadow: 0 2px 24px rgba(0,0,0,.3);
}
.hero-dash { color: var(--white); font-weight: 700; }
.hero-scroll {
  position: absolute; z-index: 3; left: 50%; bottom: 34px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: rgba(255,255,255,.85); font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
}
.hero-scroll i { width: 1px; height: 46px; background: rgba(255,255,255,.6); position: relative; overflow: hidden; }
.hero-scroll i::after {
  content: ""; position: absolute; top: -50%; left: 0; width: 100%; height: 50%;
  background: var(--green); animation: scrollDot 1.8s var(--e-out) infinite;
}
@keyframes scrollDot { 0% { top: -50%; } 60%, 100% { top: 100%; } }

/* =========================================================
   S2 — ABOUT
   ========================================================= */
.about { background: #f7f7f7 url("/wp-content/uploads/2026/01/section02.png") no-repeat center bottom / cover; align-items: center; }
.about-pattern {
  position: absolute; inset: 0; z-index: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(circle, #e2e2e2 1.4px, transparent 1.6px);
  background-size: 26px 26px; -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent);
}
.about-wrap {
  position: relative; z-index: 1; padding: 0 60px;   /* 다른 메인 섹션과 좌우 여백 통일 */
  display: flex; gap: 72px; align-items: center; width: 100%;
}
.about-img { flex-shrink: 0; width: 44%; max-width: 720px; aspect-ratio: 804 / 490; overflow: hidden; border-radius: 4px; }
.about-img { will-change: transform, clip-path; }
.about-img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); will-change: transform; }
.about.is-active .about-img img { animation: kenBurns 13s var(--e-out) forwards; }
/* 진입 모션(디자인 불변): 이미지는 좌→우 마스크 와이프로 드러남 */
.about-img[data-reveal] { transform: none; clip-path: inset(0 100% 0 0);
  transition: opacity .9s var(--e-expo), clip-path 1.2s var(--e-expo); }
.about.is-active .about-img[data-reveal] { clip-path: inset(0 0 0 0); }
.about-content { flex: 1; display: flex; flex-direction: column; gap: 34px; }
.about-head { display: flex; flex-direction: column; gap: 14px; }
.about-desc { display: flex; gap: 40px; align-items: flex-start; }
/* 세로 라인: 위→아래로 그어지는 연출 */
.about-desc .v-line { width: 1px; height: 250px; background: var(--gray-3); flex-shrink: 0;
  transform: scaleY(0); transform-origin: top; transition: transform 1s var(--e-expo) .2s; }
.about.is-active .about-desc .v-line { transform: scaleY(1); }
@media (prefers-reduced-motion: reduce) {
  .about-img[data-reveal] { clip-path: none; }
  .about-desc .v-line { transform: none; }
}
.about-desc .lead { margin-bottom: 34px; }

/* =========================================================
   S3/S4 — BIG SECTIONS (Raw Material / Production Control)
   ========================================================= */
.bigsec { align-items: flex-end; color: var(--white); }
.bigsec::before {
  content: ""; position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center;
}
.bigsec--raw::before { background-image: url("/wp-content/uploads/2026/01/main_section3-scaled.jpg"); }
.bigsec--prod::before {
  background-image: linear-gradient(rgba(0,0,0,.32), rgba(0,0,0,.32)), url("/wp-content/uploads/2026/01/main_section04-scaled.png");
}
/* 거대문자와 하단 콘텐츠가 같은 좌우 경계(60px)를 써서 좌/우 정렬을 맞춘다 */
.bigsec-words {
  position: absolute; z-index: 1; top: 50%; left: 0; right: 0; transform: translateY(-50%);
  width: 100%; padding: 0 60px;
  display: flex; justify-content: space-between; align-items: center; pointer-events: none;
}
.bigsec-words span {
  font-family: var(--font-head); font-weight: 800; font-size: clamp(90px, 8.5vw, 160px); line-height: 1;
  letter-spacing: -.025em; color: #fff;
}
.bigsec .w-left, .bigsec .w-right { clip-path: inset(110% 0 -12% 0); }
.bigsec.is-active .w-left  { animation: wordUnmask 1.25s var(--e-expo) .05s both; }
.bigsec.is-active .w-right { animation: wordUnmask 1.25s var(--e-expo) .22s both; }
@keyframes wordUnmask {
  from { clip-path: inset(110% 0 -12% 0); transform: translateY(26px); }
  to   { clip-path: inset(-12% 0 -12% 0); transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bigsec .w-left, .bigsec .w-right { clip-path: none; animation: none; }
}
.bigsec-foot {
  position: relative; z-index: 2; padding: 0 60px 150px; width: 100%;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 40px;
}
.bigsec-txt { display: flex; flex-direction: column; gap: 18px; }
.bigsec-txt .h2 { font-family: var(--font-body); font-weight: 700; font-size: 36px; }

/* =========================================================
   S5 — PRODUCT QUALITY
   ========================================================= */
.quality { align-items: center; color: var(--white); }
.quality::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(rgba(0,0,0,.68), rgba(0,0,0,.68)), url("/wp-content/uploads/2026/01/main_section5_bg-scaled.jpg") center/cover;
}
.quality-wrap { position: relative; z-index: 1; padding: 90px 60px; display: flex; gap: 70px; align-items: flex-start; width: 100%; }
.quality-title { flex-shrink: 0; width: 440px; padding-top: 6px; }
/* 타이틀은 다른 섹션 giant와 동일 크기(기본 .giant clamp 64~108px) 사용 */
.quality-cards { display: flex; gap: 20px; flex: 1; align-items: stretch; }
.p-card { flex: 1; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 50px rgba(0,0,0,.28); }
.p-card-img { height: 300px; overflow: hidden; background: #fff; flex-shrink: 0; }
.p-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--e-out); }
.p-card:first-child .p-card-img img { object-fit: cover; }
.p-card:hover .p-card-img img { transform: scale(1.05); }
/* 초록 패널이 카드 하단까지 채워 흰 여백 제거 (짧은 카드도 stretch됨) */
.p-card-info { flex: 1; background: var(--green); padding: 34px 36px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.p-card-txt h3 { color: #fff; font-size: 28px; font-weight: 600; line-height: 1.3; margin-bottom: 12px; }
.p-card-txt p { color: rgba(255,255,255,.95); font-size: 16px; line-height: 1.5; }

/* =========================================================
   S6 — ESG
   ========================================================= */
.esg { align-items: center; color: var(--white); }
.esg::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.35) 55%, rgba(0,0,0,.15) 100%), url("/wp-content/uploads/2026/01/esg-scaled.jpg") center/cover;
}
.esg-wrap { position: relative; z-index: 1; padding: 90px 60px; width: 100%; display: flex; flex-direction: column; }
.esg-head { display: flex; flex-direction: column; gap: 20px; }
.esg-head .giant { font-size: 130px; }
.esg-lead { font-size: 36px; font-weight: 700; line-height: 1.35; color: var(--white); }
.esg-list { margin-top: 56px; }
.esg-item {
  color: var(--white);
  display: flex; align-items: center; gap: 30px; padding: 32px 6px;
  border-bottom: 1px solid rgba(255,255,255,.55);
  transition: padding-left .35s var(--e-out), background-color .35s var(--e-out);
}
.esg-item:first-child { border-top: 1px solid rgba(255,255,255,.55); }
.esg-cat { width: 360px; flex-shrink: 0; font-family: var(--font-head); font-weight: 800; font-size: 36px; color: var(--white); }
.esg-detail { flex: 1; font-size: 26px; font-weight: 700; color: rgba(255,255,255,.95); }
.esg-arrow { width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,.7); display: grid; place-items: center; flex-shrink: 0; transition: background-color .3s var(--e-out), border-color .3s var(--e-out), transform .3s var(--e-out); }
.esg-arrow svg { width: 18px; }
.esg-arrow svg path { stroke: #fff; }
.esg-item:hover { background: rgba(255,255,255,.06); padding-left: 22px; }
.esg-item:hover .esg-arrow { background: var(--green); border-color: var(--green); transform: translate(3px, -3px); }

/* =========================================================
   SECTION NAV DOTS
   ========================================================= */
.fp-dots {
  position: fixed; right: 34px; top: 50%; transform: translateY(-50%); z-index: 90;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
/* 비활성=원, 활성=세로 pill로 부드럽게 모핑 (찌부 방지: flex none + 고정비율) */
.fp-dots button {
  flex: none; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 20px;
  background: rgba(255,255,255,.45); cursor: pointer;
  transition: height .4s var(--e-out), background-color .3s var(--e-out), width .4s var(--e-out);
}
.fp-dots button:hover { background: rgba(255,255,255,.8); }
.fp-dots button.is-on { height: 26px; background: var(--green); }
.fp-dots.on-light button { background: rgba(0,0,0,.2); }
.fp-dots.on-light button:hover { background: rgba(0,0,0,.4); }
.fp-dots.on-light button.is-on { background: var(--green); }

/* =========================================================
   반응형
   ========================================================= */
@media (max-width: 1600px) {
  .esg-head .giant { font-size: clamp(70px, 7vw, 120px); }
}
@media (max-width: 1400px) {
  .h2 { font-size: 34px; }
  .lead { font-size: 21px; }
  .about-wrap, .quality-wrap { gap: 56px; }
  .esg-cat { width: 260px; font-size: 30px; }
}
@media (max-width: 1024px) {
  .quality-wrap { flex-direction: column; align-items: flex-start; }
  .quality-title { width: 100%; }
  .bigsec-words { display: none; }
  .fp-dots { display: none; }
}

/* ---------- MOBILE: 풀페이지 해제 → 일반 스크롤 ---------- */
@media (max-width: 768px) {
  .fullpage { height: auto; overflow: visible; scroll-snap-type: none; }
  /* 각 섹션 = 한 화면(100dvh), 콘텐츠 넘치면 늘어남(클립 X) */
  .fp-sec { min-height: 100dvh; scroll-snap-align: none; display: flex; overflow: hidden; }
  /* 히어로 텍스트: 하단, 가장자리서 살짝 위 */
  .hero-inner { padding: 0 var(--gutter) 13vh; }
  .hero-title { font-size: 28px; line-height: 1.35; }
  .hero-scroll { display: none; }

  /* more 원형 버튼 모바일 축소(110/150px는 과대) */
  .btn-more { width: 88px; height: 88px; }
  .btn-more .txt { font-size: 15px; }
  .btn-more svg { width: 12px; }
  .btn-more.is-lg { width: 104px; height: 104px; }
  .btn-more.is-lg .txt { font-size: 16px; }
  .btn-more.is-lg svg { width: 15px; }

  /* about: 한 화면에 이미지+텍스트가 들어오도록 중앙 정렬 + 이미지 축소 */
  .about { align-items: stretch; }
  .about-wrap { flex-direction: column; justify-content: center; padding: 84px var(--gutter) 56px; gap: 22px; }
  .about-img { width: 100%; max-width: none; height: 30vh; aspect-ratio: auto; }
  .about-content { gap: 20px; }
  .about-desc { gap: 16px; }
  .about-desc .v-line { height: 92px; }
  .about-desc .lead { margin-bottom: 20px; }
  .h2 { font-size: 24px; }
  .lead { font-size: 16px; }

  /* bigsec: 풀스크린 배경 + 중앙 정렬 텍스트 + 스크림(빈 하늘 대신 의도적 구성) */
  .bigsec { align-items: center; }
  .bigsec::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0,0,0,.28) 0%, rgba(0,0,0,.34) 55%, rgba(0,0,0,.5) 100%); }
  .bigsec-foot { flex-direction: column; align-items: flex-start; gap: 20px; padding: 0 var(--gutter); }

  /* quality: 컴팩트 카드로 2장이 한 화면에 근접 */
  .quality { align-items: stretch; }
  .quality-wrap { flex-direction: column; justify-content: center; padding: 78px var(--gutter) 52px; gap: 22px; }
  .giant { font-size: 46px; }
  .quality-cards { flex-direction: column; gap: 16px; }
  .p-card-img { height: 150px; }
  .p-card-info { flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 22px; }
  .p-card-txt h3 { font-size: 20px; margin-bottom: 6px; }
  .p-card-txt p { font-size: 14px; }

  /* esg: 풀스크린 중앙 */
  .esg { align-items: stretch; }

  .esg-wrap { justify-content: center; padding: 78px var(--gutter); }
  .esg-head .giant { font-size: 60px; }
  .esg-lead { font-size: 19px; }
  .esg-list { margin-top: 28px; }
  .esg-item { flex-wrap: wrap; gap: 8px; padding: 20px 4px; }
  .esg-cat { width: 100%; font-size: 20px; }
  .esg-detail { font-size: 15px; width: 100%; }
  .esg-item:hover { padding-left: 6px; }

  /* 모바일에서는 등장 애니메이션을 스크롤 진입 기준(IO)으로 */
  [data-reveal] { transition-duration: .7s; }
}
