/* ============================================================================
   desktop (2단계) — 992px↑ scroll-snap 풀페이지 뼈대 (fullPage.js 미사용)
   섹션 5개 × 100vh, 패딩 0 (기준서 A-2). 모션은 4단계에서 추가.
   ============================================================================ */

/* 991px 미만에서는 데스크톱 랩 숨김.
   ⚠ 의도적 차이(자가점검표 #1): 원본은 #wrap 전환이 992px여서 정확히 991px 폭에
   빈 밴드가 생기지만(UA 리로드 구조의 부산물), 단일 반응형에선 991px↑로 흡수. */
#wrap { display: none; }

@media (min-width: 991px) {

  /* ---------- 스냅 스크롤 (fullPage 대체: 기준서 0장 재현 판단) ----------
     원본 fullPage.js처럼 문서 스크롤 대신 컨테이너가 섹션을 스냅한다.
     (루트 스크롤+fixed 조합은 스냅 검증·합성이 불안정해 내부 스크롤러 채택) */
  html, body { height: 100%; overflow: hidden; }

  #wrap { display: block; width: 100%; margin: 0 auto; }

  .fp {
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    /* scroll-behavior:smooth는 휠 입력과 스냅 정착 애니메이션을 충돌시켜 제거 —
       프로그램 이동(도트·버튼)은 JS에서 behavior:'smooth'로 명시 */
  }
  .section {
    position: relative;
    width: 100%;
    height: 100vh;               /* 실측 900px = 100vh */
    padding: 0;                  /* 수직 리듬은 패딩이 아니라 화면 단위 섹션 */
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;    /* fullPage처럼 한 번에 한 섹션 */
  }

  /* 데스크톱 푸터: 원본처럼 문서 흐름엔 존재하되 body가 스크롤되지 않아 시각적으로 미노출.
     (도달 불가 상태 자체가 원본 fullPage와 동일 — 현장정보는 5번 섹션이 담당) */

  /* 모바일 본문 숨김 */
  .home-mo { display: none; }

  /* ---------- 우측 도트 내비 (기준서 15: 4px→hover 10px→active 12px) ---------- */
  .dot-nav {
    position: fixed;
    right: 17px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 30px;
    z-index: 10;
  }
  .dot-nav a { position: relative; display: flex; align-items: center; justify-content: flex-end; height: 20px; }
  .dot-nav a i {
    display: block;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--color-main2);  /* 원본 실측: body #fp-nav ul li a span { background:var(--color-main2) } + opacity .8 */
    opacity: .8;
  }
  .dot-nav a:hover i { width: 10px; height: 10px; }
  .dot-nav a.is-active i { width: 12px; height: 12px; }
  .dot-nav a em {
    position: absolute;
    right: 22px;
    font-style: normal;
    font-size: 18px;
    font-weight: var(--fw-head);
    color: var(--color-main1);
    text-shadow: 1px 1px 2px rgba(0,0,0,.3);
    white-space: nowrap;
    display: none;
  }
  .dot-nav a:hover em { display: block; }   /* 실측: 활성 도트도 라벨은 hover에서만 노출 */

  /* ==================================================================
     1. 메인
     ================================================================== */
  .sec-main { background: var(--color-main1); }
  .sec-main .media-bg, .sec-main .media-bg img, .sec-main .media-bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .sec-main .main-copy {
    position: absolute;
    left: 50%; top: 24%;
    transform: translateX(-50%);
    width: 65%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-40);
    text-align: center;
    z-index: 1;
  }
  /* 메인 카피 = 글자 PNG (오산 원본도 main-tit-wrap PNG 스택 — 폭 52% 상당) */
  .sec-main .main-title { width: 100%; }
  .sec-main .main-title img { display: block; width: 80%; height: auto; margin: 0 auto; }
  .sec-main .main-wordmark { font-size: 1.5rem; text-shadow: var(--shadow-soft); }

  /* ==================================================================
     2. 입지(프리미엄) — 슬라이드 4장, 현재 장만 표시 (전환 모션은 4단계)
     ================================================================== */
  /* 원본 구조: 슬라이드 흰 배경 + 좌 이미지 카드 + 우 텍스트 + 라인 + 다이아 페이지네이션.
     (배경 이미지 오버레이는 원본에 없어 제거 — premium_bg_01은 미사용 보류 에셋으로 되돌림) */
  .sec-location { background: #fff; }
  .loc-slides { position: relative; width: 100%; height: 100%; }
  /* 프리미엄 장식 영상(deco 3종 — 공홈 DOM 짝: EDU·FAST·SPACE 슬라이드) */
  .loc-deco {
    position: absolute;
    right: 9%; bottom: 12%;
    width: 200px;
    border-radius: var(--radius-btn);
    box-shadow: var(--shadow-card);
    opacity: .92;
    z-index: 3;
  }
  .loc-slide {
    position: absolute; inset: 0;
    display: none;
    align-items: center;
    justify-content: space-around;
    padding: var(--sp-80) var(--sp-150);
  }
  .loc-slide.is-current { display: flex; }

  .loc-image { position: relative; width: 35%; aspect-ratio: 1 / 1; z-index: 3; }
  .loc-image img { width: 100%; height: 100%; object-fit: cover; }

  .loc-text { position: relative; width: 40%; text-align: center; z-index: 3; } /* 라인(z2)이 텍스트 위를 지나지 않게 */
  .loc-title { font-size: 2.2rem; font-weight: var(--fw-head); padding-bottom: 50px; }
  .loc-desc { font-size: var(--fs-20); line-height: 1.75; }

  /* 원본 구조: 라인은 각 슬라이드 '내부'(슬라이드마다 1벌) — 사진(z3)이 덮고, 슬라이드와 함께 페이드 */
  .loc-lines { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
  .loc-lines .line-h { position: absolute; left: 0; top: 70%; width: 100%; height: 1px; background: #a1a1a2; display: block; }
  .loc-lines .line-v { position: absolute; left: 28%; top: 0; height: 100%; width: 1px; background: #a1a1a2; display: block; }

  .loc-pg {
    position: absolute;
    left: 45%; top: 40%;
    display: flex;
    flex-direction: column;
    gap: var(--sp-40);
    z-index: 4;
  }
  .loc-pg button {
    width: 12px; height: 12px;
    background: var(--color-main1);
    transform: rotate(45deg);      /* 다이아 모양 페이지네이션 (원본: 12px·main1·rotate45) */
    opacity: .2;                   /* swiper 기본 bullet 불투명도 실측 */
    padding: 0;
  }
  .loc-pg button.is-active { opacity: 1; }

  /* ==================================================================
     3. 커뮤니티
     ================================================================== */
  .sec-community { background: var(--color-main1); }
  .comm-bg { position: absolute; inset: 0; }
  .comm-bg img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    filter: brightness(.5);
    display: none;
  }
  .comm-bg img.is-current { display: block; }

  .comm-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    z-index: 2;
  }
  .comm-tit { text-align: center; pointer-events: none; }
  .comm-display {
    font-family: var(--font-display-en);   /* 대표 선택: Playfair Display 800 (후보3) */
    font-size: 111px;                       /* 실측 (tokens.json 크기 스케일) */
    font-weight: 800;
    letter-spacing: 5px;
    color: transparent;
    -webkit-text-stroke: 0.4px #fff;
    white-space: nowrap;
  }
  .comm-tit p {
    color: var(--color-text-invert);
    font-size: var(--fs-24);
    font-weight: var(--fw-light);
    line-height: 1.6;
    margin: 35px 0 45px;
  }
  .comm-tit p span { opacity: .5; }
  .comm-tit p b { font-weight: var(--fw-head); }

  /* 원 썸네일: 오산 실측값 그대로(112/160·gap30·보더 2/3px #fff).
     ⚠ 7개라 991~1011px 창에서 좌우 소폭 크롭(원본 페이지는 min-width 1400이라 이 폭 자체가 없음) */
  .comm-thumbs { display: flex; align-items: center; justify-content: center; gap: 30px; }
  .comm-thumbs button {
    width: 112px; height: 112px;
    border-radius: var(--radius-circle);
    border: 2px solid #fff;
    overflow: hidden;
    padding: 0;
    flex: none;
  }
  .comm-thumbs button img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
  .comm-thumbs button:hover img { filter: grayscale(0); }
  .comm-thumbs button.is-current { width: 160px; height: 160px; border-width: 3px; box-shadow: var(--shadow-deep); }
  .comm-thumbs button.is-current img { filter: grayscale(0); }

  /* 원본 실측(active): 캡션은 활성 썸네일 하단에서 ~10px 아래 (mt 50→0 애니의 최종값) */
  .comm-caption { width: 465px; text-align: center; margin-top: 10px; }
  .comm-caption h3 { font-size: 2.5rem; font-weight: var(--fw-emph); color: var(--color-text-invert); line-height: 1; }

  /* ==================================================================
     4. 세대안내(유닛)
     ================================================================== */
  .sec-unit { background: url(../img/unit_bg_02.jpg) center / cover no-repeat; }
  .unit-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 85%;
    height: calc(100vh - 8vw);
    margin: 4vw auto 0;
    overflow: hidden;
  }
  .unit-divider { position: absolute; left: 43%; top: 0; width: 1px; height: 100vh; background: rgba(0,0,0,.12); }

  .unit-left { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 5%; width: 42%; height: 75%; }
  .plan-img { position: relative; flex: 1 1 auto; height: 58%; display: flex; align-items: center; justify-content: center; }
  .plan-img img { max-width: 90%; max-height: 100%; object-fit: contain; }
  .plan-rail {
    position: absolute; left: -12%; top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    font-size: 0.6rem;
    font-weight: var(--fw-light);
    letter-spacing: 3px;
    color: rgba(0,0,0,.15);
    white-space: nowrap;
  }
  .plan-info { padding-top: var(--sp-20); }
  .u-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: var(--fw-light);
    color: var(--color-main2);            /* 라이트 배경 위 가독 — 라이트 스카이는 대비 부족 */
    border: 1px solid var(--color-main2);
    padding: var(--sp-4) var(--sp-12);
    margin-bottom: 18px;
  }
  .u-kicker {
    display: flex; align-items: center; gap: var(--sp-10);
    font-size: var(--fs-14);
    font-weight: var(--fw-emph);
    letter-spacing: 3px;
    color: var(--color-main1);
    margin-bottom: var(--sp-8);
  }
  .u-kicker::before { content: ''; width: 25px; height: 1.5px; background: var(--color-main1); }
  .u-type {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.5rem);   /* 유동 3종 중 하나(기준서 B-7) */
    line-height: 1;
    color: var(--color-main1);             /* 공홈 방식: 강조는 딥네이비 */
    padding: var(--sp-20) 0;
  }
  .u-type em { font-style: italic; color: var(--color-main3); }
  .u-desc { font-size: var(--fs-17); font-weight: var(--fw-light); opacity: .8; letter-spacing: .06em; line-height: 2; }

  .unit-right { flex: 1; height: 88%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; } /* 6탭 확장으로 탭줄이 플로팅 버튼과 겹쳐 높이 축소(100→88%) */
  .u-header { padding: 0 30px 24px; border-bottom: 1px solid rgba(0,0,0,.1); }
  .u-title {
    font-family: var(--font-serif);
    font-size: 0.8rem;
    font-weight: var(--fw-light);
    letter-spacing: .26em;
    text-transform: uppercase;
    color: rgba(0,0,0,.35);
    margin-bottom: var(--sp-8);
  }
  .u-heading {
    font-family: var(--font-serif);
    font-size: clamp(1.3rem, 2.2vw, 2rem); /* 유동 3종 중 하나: h2.r-heading 상당 */
    font-weight: var(--fw-btn);
    color: var(--color-main1);
    line-height: 1.5;
  }
  .u-heading em { font-style: italic; color: var(--color-main3); }
  .u-iso { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 3% 4%; }
  .u-iso img { width: 100%; height: 100%; object-fit: cover; }

  .u-tabs { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid rgba(0,0,0,.1); } /* 6타입 확장(대표 승인) */
  .u-tabs button { position: relative; padding: var(--sp-16) 0; text-align: center; border-right: 1px solid rgba(0,0,0,.08); }
  .u-tabs button:last-child { border-right: 0; }
  .u-tabs button::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--color-main3); }
  .u-tabs button:hover, .u-tabs button.is-current { background: rgba(0,0,0,.02); }
  .u-tabs button:hover::before, .u-tabs button.is-current::before { height: 2px; }
  .tab-label { font-size: var(--fs-16); font-weight: var(--fw-emph); letter-spacing: .04em; color: rgba(0,0,0,.3); } /* 6탭 폭 대응 축소 */
  .u-tabs button.is-current .tab-label { color: var(--color-main1); }
  .u-tabs button:hover .tab-label { color: var(--color-main1); }

  /* ==================================================================
     5. 방문예약(현장정보)
     ================================================================== */
  .sec-visit { background: var(--color-main1); }
  .visit-bg, .visit-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .visit-bg .visit-dim { position: absolute; inset: 0; background: var(--color-overlay-60); display: block; }

  .visit-container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3rem;
    width: 80%;
    max-width: 1680px;
    height: 100%;
    margin: 0 auto;
    z-index: 1;
  }
  .visit-logo { font-size: 1.4rem; }
  .visit-wrap { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-80); }

  .visit-info { width: 45%; display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-16); } /* 정보 블록 증가(선착순 체제) 수용 */
  .info-block { width: 100%; }
  .info-block h4 { color: var(--color-text-invert); font-size: var(--fs-17); font-weight: var(--fw-btn); margin-bottom: var(--sp-8); }
  .info-line { display: block; width: 100%; height: 1px; background: rgba(255,255,255,.4); margin-bottom: var(--sp-10); transform-origin: left; }
  .info-block p { color: var(--color-gray-2); font-size: var(--fs-14); line-height: 1.6; }
  .info-row { display: flex; gap: var(--sp-40); width: 100%; }
  .info-row .info-block { flex: 1; }
  .info-notice p { color: var(--color-gray-1); font-size: 0.8rem; line-height: 1.6; }
  .info-copyright { color: var(--color-gray-1); font-size: var(--fs-14); }

  .visit-cards { width: 50%; display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-20); } /* 실측 2×272 gap20 */
  .visit-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 2.5rem 0;
    border: 2px solid rgba(255,255,255,.5);
    color: var(--color-text-invert);
    text-align: center;
  }
  .visit-card .card-desc { font-size: var(--fs-20); letter-spacing: var(--ls-title); }
  .visit-card .card-tit { font-size: var(--fs-25); font-weight: var(--fw-head); letter-spacing: var(--ls-title); }
  .visit-card.is-cta { cursor: pointer; }
  .visit-card:hover .card-desc, .visit-card:hover .card-tit { color: var(--color-main3); } /* 다크 배경 위 가시 색 */
}
