/* =========================================================
   Alleva brand landing — core styles (Zeplin 2026-04-28 적용)
   ========================================================= */

:root {
  /* 컬러 (raw에서 발견된 두 가지 + 글래스만) */
  --color-text:        #070707;
  --color-bg:          #ffffff;
  --color-text-on-img: #ffffff;
  --color-glass:       rgba(255, 255, 255, 0.302);   /* #FFFFFF4D */
  --color-backdrop:    rgba(0, 0, 0, 0.6);

  /* 폰트 (디자이너 확정: 영문 Noto Sans 800, 한글 SUIT) */
  --font-en: "Noto Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-kr: "SUIT", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

  /* 레이아웃 */
  --wrap-min:    1260px;
  --wrap-pad:    60px;
  --content-x:   80px;          /* 좌측 텍스트 박스 시작점 (브랜드 PC raw 기준) */
  --m-pad:       20px;          /* 모바일 좌우 패딩 */

  /* 헤더 */
  --header-h:     112px;
  --header-h-m:   56px;
  --header-px:    60px;
  --header-px-m:  20px;
  --logo-h:       56px;
  --logo-w-m:     68px;
  --logo-h-m:     32px;
  --gnb-gap:      24px;       /* raw 값 — SUIT 정식 로드 후 안정 */

  /* 인터랙션 타이밍 (디자이너 확정값) */
  --ease:        cubic-bezier(.22, .61, .36, 1);
  --t-header:    .3s;
  --t-fade:      .3s;
  --t-reveal:    .6s;
  --reveal-step: .2s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-kr);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.4;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button {
  font: inherit; color: inherit; background: transparent;
  border: 0; padding: 0; cursor: pointer;
}
img, video { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }

/* ---------- Fonts (SUIT 정식 로드 — 2026-04-28) ---------- */
@font-face {
  font-family: "SUIT";
  src: url("../fonts/SUIT-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "SUIT";
  src: url("../fonts/SUIT-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "SUIT";
  src: url("../fonts/SUIT-ExtraBold.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "SUIT";
  src: url("../fonts/SUIT-Heavy.woff2") format("woff2");
  font-weight: 900; font-style: normal; font-display: swap;
}
/* TODO: Noto Sans 800 woff2 추가 시 활성 */

/* =========================================================
   Layout — PC 1260 min-width, Mobile 360 baseline
   ========================================================= */

body { min-width: var(--wrap-min); }

@media (max-width: 767px) {
  body { min-width: 0; }
}

/* =========================================================
   Header
   ========================================================= */

.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  color: var(--color-text-on-img);
  background: transparent;
  transition: background-color var(--t-header) var(--ease),
              color            var(--t-header) var(--ease),
              box-shadow       var(--t-header) var(--ease);
}
/* SPA: 활성 page의 data-header="light"일 때 헤더 흰색 BG + 검정 텍스트 */
.site-header.is-light {
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
}
.site-header__inner {
  height: 100%;
  padding: 0 var(--header-px);
  display: flex; align-items: center;
  flex-wrap: nowrap;
}
.site-header__logo {
  flex: 0 0 auto;
}
.site-header__logo img {
  height: var(--logo-h);
  width: auto;
  object-fit: contain;
  transition: filter var(--t-header) var(--ease);
}
/* SVG 로고가 흰색 고정 → 스크롤 후 흰 BG에선 검정으로 반전 */
.site-header.is-light .site-header__logo img { filter: brightness(0); }

.gnb {
  margin-left: 40px;
  flex: 0 0 auto;
}
.gnb ul { display: flex; gap: var(--gnb-gap); }
.gnb a {
  font-family: var(--font-kr);
  font-size: 19px;
  font-weight: 700;        /* SUIT bold */
  line-height: 24px;
  padding: 16px 0;
  color: inherit;
  white-space: nowrap;
}

.site-header__utils {
  margin-left: auto;
  display: flex;
  gap: 16px;
  align-items: center;
  flex: 0 0 auto;
}
.util {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
}
.util img { width: 20px; height: 20px; object-fit: contain; }
/* PC 헤더 유틸은 아이콘만 표시 (1260 폭 fit + 모던 패턴) — 모바일 사이드메뉴는 .side-menu__utils에서 라벨 그대로 노출 */
.util span { display: none; }

.site-header__menu {
  display: none;
  width: 24px; height: 24px;
}
.site-header__menu img {
  width: 100%; height: 100%;
  filter: brightness(0) invert(1);   /* SVG 검정 → 투명 헤더에선 흰색 */
  transition: filter var(--t-header) var(--ease);
}
.site-header.is-light .site-header__menu img { filter: none; }

/* 우측 유틸 아이콘(인스타·N·shop)도 흰색 고정 → 스크롤 후 반전 */
.util img { transition: filter var(--t-header) var(--ease); }
.site-header.is-light .util img { filter: brightness(0); }

@media (max-width: 767px) {
  .site-header { height: var(--header-h-m); }
  .site-header__inner { padding: 0 var(--header-px-m); }
  .site-header__logo img { width: var(--logo-w-m); height: var(--logo-h-m); }
  .gnb, .site-header__utils { display: none; }
  .site-header__menu { display: inline-flex; margin-left: auto; }
}

/* =========================================================
   Side menu (mobile)
   ========================================================= */

.side-menu {
  position: fixed; inset: 0;
  z-index: 200;
  pointer-events: none;
}
/* 사이드메뉴 — iOS 시트 스타일 부드러운 슬라이드 */
.side-menu__backdrop {
  position: absolute; inset: 0;
  background: var(--color-backdrop);
  opacity: 0;
  transition: opacity .4s cubic-bezier(.32, .72, 0, 1);
  will-change: opacity;
}
.side-menu__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 272px;                   /* raw: 360-88 */
  background: #fff;
  transform: translate3d(100%, 0, 0);
  transition: transform .4s cubic-bezier(.32, .72, 0, 1);
  will-change: transform;
  display: flex; flex-direction: column;
  padding: 76px 20px 233px 23px;  /* raw 그대로 */
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0);
}
.side-menu.is-open { pointer-events: auto; }
.side-menu.is-open .side-menu__backdrop { opacity: 0.4; }
.side-menu.is-open .side-menu__panel {
  transform: translate3d(0, 0, 0);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
  transition: transform .4s cubic-bezier(.32, .72, 0, 1),
              box-shadow .4s ease-out .1s;       /* 패널 도착 후 그림자가 살짝 따라옴 */
}

.side-menu__head {
  position: absolute;
  top: 8px; right: 20px;
  display: flex; align-items: center; gap: 8px;
}
.side-menu__close { width: 24px; height: 24px; }
.side-menu__close img { width: 100%; height: 100%; }
.side-menu__logo { display: none; }   /* 패널엔 로고 없음 (raw 기준) */

.side-menu__nav { width: 100%; }
.side-menu__nav li { width: 228px; }
.side-menu__nav a {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-kr);
  font-size: 19px;
  font-weight: 500;
  line-height: 3.32;          /* raw — 항목 간격 표현 */
  color: var(--color-text);
}

.side-menu__utils {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 7px;
}
.side-menu__utils a {
  display: inline-flex; gap: 7px; align-items: center;
  font-family: var(--font-kr);
  font-size: 19px;
  font-weight: 500;
  color: var(--color-text);
}
.side-menu__utils img { width: 20px; height: 20px; object-fit: contain; }

/* =========================================================
   SPA pages — 한 번에 한 page만 활성, GNB 클릭으로 전환
   ========================================================= */

.pages {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.page {
  position: absolute; inset: 0;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .4s var(--ease), visibility 0s linear .4s;
}
.page.is-active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: opacity .4s var(--ease), visibility 0s linear 0s;
}

/* 섹션 내부 sub-page 스크롤러 (Brand 8 / 추후 Holistic 8 등) */
.page__scroller {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.page__scroller::-webkit-scrollbar { display: none; }

.sec {
  position: relative;
  height: 100vh;
  scroll-snap-align: start;
  overflow: hidden;
}

/* 배경 이미지/영상 풀스크린 cover */
.sec__bg,
.sec__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}

.sec__inner {
  position: relative; z-index: 1;
  height: 100%;
  padding: 0 var(--content-x);    /* PC: 좌측 80px (브랜드 raw 기준) */
  display: flex; flex-direction: column; justify-content: center;
}
.sec__inner--center {
  align-items: center; text-align: center;
}

@media (max-width: 767px) {
  .sec__inner { padding: 0 var(--m-pad); }
}

/* =========================================================
   Sub-page typography (Zeplin 토큰)
   ========================================================= */

/* 영문 메인 타이틀 — Holistic / Equilibrium / Care PC */
.sp-title-en {
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 67px;
  line-height: 1.13;
  letter-spacing: -2.01px;
  color: var(--color-text-on-img);
}
@media (max-width: 767px) {
  .sp-title-en {
    font-size: 26px;
    line-height: 1.23;
    letter-spacing: normal;
  }
}

/* 한글 메인 타이틀 — Brand PC만 사용 */
.sp-title-kr {
  font-family: var(--font-kr);
  font-weight: 800;
  font-size: 70px;
  line-height: 1.27;
  color: var(--color-text-on-img);
}
@media (max-width: 767px) {
  .sp-title-kr {
    font-size: 26px;
    line-height: 1.35;
  }
}

/* 한글 서브카피 — 모든 섹션 공통 */
.sp-sub-kr {
  font-family: var(--font-kr);
  font-weight: 700;          /* SUIT bold */
  font-size: 28px;
  line-height: 1.61;
  color: var(--color-text-on-img);
  margin-top: 26px;
}
@media (max-width: 767px) {
  .sp-sub-kr {
    font-size: 16px;
    line-height: 1.38;
    margin-top: 16px;
  }
}

/* 텍스트 박스 */
.sp-textbox {
  max-width: 776px;
  /* margin-top 287/1080 = 26.6vh — 세로 약 정중앙보다 조금 위 */
}
@media (max-width: 767px) {
  .sp-textbox { max-width: 100%; }
}

/* =========================================================
   Text Reveal (4줄 0.2s 순차)
   ========================================================= */

.reveal__line {
  opacity: 0;
  transform: translate3d(0, 16px, 0);   /* GPU 가속 강제 — 모바일 transition 누락 방지 */
  will-change: opacity, transform;
  transition: opacity var(--t-reveal) var(--ease),
              transform var(--t-reveal) var(--ease);
}
.reveal.is-in .reveal__line { opacity: 1; transform: translate3d(0, 0, 0); }
.reveal.is-in .reveal__line:nth-child(1) { transition-delay: 0s; }
.reveal.is-in .reveal__line:nth-child(2) { transition-delay: var(--reveal-step); }
.reveal.is-in .reveal__line:nth-child(3) { transition-delay: calc(var(--reveal-step) * 2); }
.reveal.is-in .reveal__line:nth-child(4) { transition-delay: calc(var(--reveal-step) * 3); }
.reveal.is-in .reveal__line:nth-child(5) { transition-delay: calc(var(--reveal-step) * 4); }
.reveal.is-in .reveal__line:nth-child(6) { transition-delay: calc(var(--reveal-step) * 5); }

/* =========================================================
   Page number indicator — `01 / 08` 세로 스택
   ========================================================= */

.page-num {
  position: fixed;
  right: 78px;
  top: 50%; transform: translateY(-50%);
  z-index: 50;
  width: 26px;
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: var(--color-text-on-img);
  font-family: var(--font-kr);
  text-align: center;
}
.page-num.is-hidden { display: none; }

.page-num__current {
  font-weight: 900;          /* SUIT Heavy */
  font-size: 20px;
  line-height: 25px;
  margin-bottom: 8px;
}
.page-num__divider {
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 0 8px;
  object-fit: contain;
}
.page-num__total {
  font-weight: 700;          /* SUIT bold */
  font-size: 20px;
  line-height: 25px;
  opacity: 0.5;
}

/* 모바일은 페이지 번호 인디케이터 숨김 (디자이너 요청) */
@media (max-width: 767px) {
  .page-num { display: none !important; }
}

/* =========================================================
   Top button — 60×60 글래스 (raw 확정값) / PC만
   ========================================================= */

/* up_btn.svg는 원형 글래스 배경이 SVG에 포함됨 → 컨테이너는 투명 */
.top-btn {
  position: fixed;
  right: 60px; bottom: 60px;
  width: 60px; height: 60px;
  z-index: 60;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fade) var(--ease);
}
.top-btn.is-visible { opacity: 1; pointer-events: auto; }
.top-btn img { width: 100%; height: 100%; display: block; }

/* 모바일은 Top 버튼 숨김 (디자이너 요청 — 대신 하단 arrow Lottie) */
@media (max-width: 767px) {
  .top-btn { display: none !important; }
}

/* =========================================================
   Scroll arrow (Lottie) — 모바일 전용, 마지막 sub-page 제외
   ========================================================= */

.scroll-arrow {
  display: none;          /* PC: 숨김 */
}

@media (max-width: 767px) {
  .scroll-arrow {
    display: block;
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    z-index: 5;
    pointer-events: none;
  }
}

/* =========================================================
   Brand Manifesto — 8 sub-pages 배경 placeholder
   (실제 이미지 들어오면 .sec__bg <img> 로 교체)
   ========================================================= */

.sec--brand[data-subpage="1"] { background: linear-gradient(135deg, #2d4a3e 0%, #1a2820 100%); }
.sec--brand[data-subpage="2"] { background: linear-gradient(135deg, #3e2d4a 0%, #28201a 100%); }
.sec--brand[data-subpage="3"] { background: linear-gradient(135deg, #4a3e2d 0%, #28201a 100%); }
.sec--brand[data-subpage="4"] { background: linear-gradient(135deg, #2d3e4a 0%, #1a2028 100%); }
.sec--brand[data-subpage="5"] { background: linear-gradient(135deg, #4a2d3e 0%, #281a20 100%); }
.sec--brand[data-subpage="6"] { background: linear-gradient(135deg, #3e4a2d 0%, #20281a 100%); }
.sec--brand[data-subpage="7"] { background: linear-gradient(135deg, #2d4a4a 0%, #1a2828 100%); }
.sec--brand[data-subpage="8"] { background: linear-gradient(135deg, #4a4a2d 0%, #28281a 100%); }

/* Hero / Library placeholder */
.sec--hero        { background: #1a1a1a; }
.sec--library     { background: #1a1a1a; }

/* Holistic 8 sub-pages — green tones */
.sec--holistic[data-subpage="1"] { background: linear-gradient(135deg, #1f3a2e 0%, #0f1f1a 100%); }
.sec--holistic[data-subpage="2"] { background: linear-gradient(135deg, #2a4536 0%, #15281f 100%); }
.sec--holistic[data-subpage="3"] { background: linear-gradient(135deg, #1a3528 0%, #0a1a13 100%); }
.sec--holistic[data-subpage="4"] { background: linear-gradient(135deg, #2e4a3a 0%, #182820 100%); }
.sec--holistic[data-subpage="5"] { background: linear-gradient(135deg, #234034 0%, #11221c 100%); }
.sec--holistic[data-subpage="6"] { background: linear-gradient(135deg, #1f3a30 0%, #0f1f19 100%); }
.sec--holistic[data-subpage="7"] { background: linear-gradient(135deg, #28453a 0%, #14241e 100%); }
.sec--holistic[data-subpage="8"] { background: linear-gradient(135deg, #1a3025 0%, #0a1810 100%); }

/* Equilibrium 9 sub-pages — olive/yellow tones */
.sec--equilibrium[data-subpage="1"] { background: linear-gradient(135deg, #2e3a1f 0%, #1a1f0f 100%); }
.sec--equilibrium[data-subpage="2"] { background: linear-gradient(135deg, #3a4528 0%, #20281a 100%); }
.sec--equilibrium[data-subpage="3"] { background: linear-gradient(135deg, #353a1a 0%, #1f200a 100%); }
.sec--equilibrium[data-subpage="4"] { background: linear-gradient(135deg, #3e452e 0%, #232818 100%); }
.sec--equilibrium[data-subpage="5"] { background: linear-gradient(135deg, #303823 0%, #181c11 100%); }
.sec--equilibrium[data-subpage="6"] { background: linear-gradient(135deg, #283520 0%, #14200f 100%); }
.sec--equilibrium[data-subpage="7"] { background: linear-gradient(135deg, #3a4528 0%, #1f2814 100%); }
.sec--equilibrium[data-subpage="8"] { background: linear-gradient(135deg, #34381f 0%, #1c200f 100%); }
.sec--equilibrium[data-subpage="9"] { background: linear-gradient(135deg, #2a3018 0%, #14180a 100%); }

/* Care 10 sub-pages — blue tones */
.sec--care[data-subpage="1"]  { background: linear-gradient(135deg, #1f2e3a 0%, #0f1a1f 100%); }
.sec--care[data-subpage="2"]  { background: linear-gradient(135deg, #2a3a45 0%, #15202a 100%); }
.sec--care[data-subpage="3"]  { background: linear-gradient(135deg, #1a2a35 0%, #0a131a 100%); }
.sec--care[data-subpage="4"]  { background: linear-gradient(135deg, #2e3e4a 0%, #182028 100%); }
.sec--care[data-subpage="5"]  { background: linear-gradient(135deg, #233440 0%, #111c22 100%); }
.sec--care[data-subpage="6"]  { background: linear-gradient(135deg, #1f303a 0%, #0f191f 100%); }
.sec--care[data-subpage="7"]  { background: linear-gradient(135deg, #283a45 0%, #14202a 100%); }
.sec--care[data-subpage="8"]  { background: linear-gradient(135deg, #1a2530 0%, #0a1018 100%); }
.sec--care[data-subpage="9"]  { background: linear-gradient(135deg, #2e3e48 0%, #182028 100%); }
.sec--care[data-subpage="10"] { background: linear-gradient(135deg, #243038 0%, #12181c 100%); }

/* =========================================================
   Calculator section
   ========================================================= */

.sec--calc {
  background: #f6f6f6;
}
.calc-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* B형 embed 미준비 → placeholder */
.calc-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px;
  color: var(--color-text);
}
.calc-placeholder__title {
  font-family: var(--font-kr);
  font-weight: 700;
  font-size: 28px;
}
.calc-placeholder__desc {
  font-family: var(--font-kr);
  font-weight: 500;
  font-size: 18px;
  color: #666;
}
