/* ====================================================================
   CHANGE CLINIC — DEFAULT (서브페이지 공통)
   - 폰트 / 변수 / 리셋 / 레이아웃 / 헤더(GNB) / 섹션 타이틀 / 푸터
   ==================================================================== */

/* 숫자는 Pretendard, 나머지는 Marcellus */
@font-face {
  font-family: 'Marcellus';
  src: local('Pretendard Medium'), local('Pretendard'),
       url('../fonts/pretendard/Pretendard-Medium.woff2') format('woff2');
  unicode-range: U+0030-0039;
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Marcellus';
  src: local('Marcellus'), local('Marcellus-Regular'),
       url('../fonts/Marcellus-Regular.ttf') format('truetype');
  unicode-range: U+0000-002F, U+003A-FFFF;
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --c-ivory: #FFFFFF;
  --c-cream: #F7F3E2;
  --c-linen: #F0EADA;
  --c-sage: #D7D9BF;
  --c-taupe: #776B61;
  --c-olive: #383D2C;
  --c-ink: #211001;

  --f-ko: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --f-en: 'Marcellus', Georgia, serif;

  --wrap-w: 1120px;
  --sh-card: 0 6px 22px rgba(33, 16, 1, 0.08);
  --sh-row: 0 2px 10px rgba(33, 16, 1, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
}

body {
  background-color: #f6f4ef;
  background-image: url('../images/bg-paper.jpg');
  background-size: 960px auto;
  background-position: center top;
  background-repeat: repeat;
  background-attachment: fixed;
  color: var(--c-ink);
  font-family: var(--f-ko);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.75;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
}

button, input, select {
  font-family: inherit;
}

button {
  cursor: pointer;
}

.en {
  font-family: var(--f-en);
}

.ko {
  font-family: var(--f-ko);
}

.wrap {
  max-width: var(--wrap-w);
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: -9999px;
}

/* ====================================================================
   HEADER (GNB)
   ==================================================================== */
.c-nav {
  height: 80px;
  background-color: var(--c-ivory);
  border-bottom: 1px solid rgba(119, 107, 97, 0.18);
  position: sticky;
  top: 0;
  z-index: 100;
}

.c-nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.c-nav__logo {
  font-family: var(--f-en);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--c-ink);
}

.c-nav__menu {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--c-ink);
  white-space: nowrap;
}

.c-nav__menu a {
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.c-nav__menu a.is-active,
.c-nav__menu a:hover {
  font-weight: 700;
  color: var(--c-ink);
  border-bottom-color: var(--c-ink);
}

.c-nav__cta {
  background-color: var(--c-ink);
  color: var(--c-ivory);
  font-size: 16px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 4px;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.c-nav__cta:hover {
  opacity: 0.9;
}

/* ====================================================================
   COMMON SECTION & HEADING
   ==================================================================== */
.sec {
  padding: 104px 0 112px;
}

.sec--cream,
.sec--linen,
.sec--white,
.sec--olive {
  background-color: transparent;
  background-image: none;
  color: var(--c-ink);
}

.sec-head-center {
  text-align: center;
  margin-bottom: 52px;
}

.sec-sub-eyebrow {
  display: block;
  font-family: var(--f-en);
  font-size: 16px;
  font-weight: 600;
  color: var(--c-taupe);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.sec-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--c-ink);
  letter-spacing: -0.02em;
  word-break: keep-all;
}

.sec-desc {
  font-size: 18px;
  font-weight: 500;
  color: var(--c-taupe);
  line-height: 1.8;
  margin-top: 14px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* ====================================================================
   FOOTER
   ==================================================================== */
.c-footer {
  background-color: var(--c-ink);
  color: var(--c-ivory);
  padding: 72px 0 48px;
}

.c-footer__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(240, 234, 218, 0.18);
}

.c-footer__slogan {
  font-family: var(--f-en);
  font-size: 38px;
  font-weight: 500;
  color: var(--c-sage);
  letter-spacing: 0.02em;
}

.c-footer__btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.c-footer__btn-sage {
  background-color: var(--c-sage);
  color: var(--c-ink);
  font-size: 16px;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 4px;
}

.c-footer__btn-outline {
  border: 1px solid rgba(240, 234, 218, 0.42);
  color: var(--c-linen);
  font-size: 16px;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: 4px;
}

.c-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 28px;
  font-size: 16px;
  color: rgba(240, 234, 218, 0.65);
}

.c-footer__brand {
  font-family: var(--f-en);
  font-size: 20px;
  letter-spacing: 0.12em;
  color: var(--c-ivory);
}

.c-footer__info {
  margin-top: 8px;
}

@media (max-width: 1024px) {
  .c-nav__menu {
    display: none;
  }
}

/* ====================================================================
   SUB HEADER (메인 공통 헤더를 서브용으로 : 흰 바탕 · 세로선 없음)
   ==================================================================== */
.sub-body {
  padding-top: 100px;
}

.sub-body .header,
.sub-body .header.scrolled {
  background: var(--c-ivory);
  border-bottom: 1px solid rgba(119, 107, 97, 0.18);
}

.sub-body .header .frame-lines {
  display: none;
}

.sub-body .header .header-wrap .logo .logo-img--default {
  display: none;
}

.sub-body .header .header-wrap .logo .logo-img--scrolled {
  display: block;
}

.sub-body .header .nav .depth-1 > .link {
  color: var(--c-ink);
}

.sub-body .header .nav .depth-1 > .link:hover,
.sub-body .header .nav .depth-1 > .link.on {
  color: var(--c-taupe);
}

/* ====================================================================
   SUB TAB (페이지 내 섹션 탭 : 히어로 아래 고정)
   ==================================================================== */
.sub-tab {
  position: sticky;
  top: 100px;
  z-index: 90;
  background: var(--c-ivory);
  border-bottom: 1px solid rgba(119, 107, 97, 0.2);
  box-shadow: 0 4px 14px rgba(33, 16, 1, 0.05);
  transition: top 0.3s;
}

.sub-tab__inner {
  display: flex;
  justify-content: center;
  max-width: var(--wrap-w);
  margin: 0 auto;
  padding: 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sub-tab__inner::-webkit-scrollbar {
  display: none;
}

.sub-tab a {
  position: relative;
  flex: none;
  padding: 18px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--c-taupe);
  white-space: nowrap;
  transition: color 0.2s;
}

.sub-tab a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 3px;
  background: var(--c-ink);
  transform: scaleX(0);
  transition: transform 0.25s;
}

.sub-tab a:hover,
.sub-tab a.is-active {
  color: var(--c-ink);
}

.sub-tab a.is-active {
  font-weight: 700;
}

.sub-tab a.is-active::after {
  transform: scaleX(1);
}

.sub-body .sec,
.sub-body .pyg-zone-sec,
.sub-body .sec-head-center[id],
.sub-body .principle-split[id] {
  scroll-margin-top: 0;
}

@media (max-width: 1200px) {
  /* 헤더 높이가 60px(+하단 보더 1px)로 줄어드는 구간.
     1024px 에서만 여백을 줄이면 1025~1200px(태블릿)에서 헤더 아래 빈 띠가 남는다. */
  .sub-body {
    padding-top: 61px;
  }
  .sub-tab {
    top: 61px;
  }
  .sub-tab__inner {
    justify-content: flex-start;
  }
}

@media (max-width: 1024px) {
  .sub-tab a {
    padding: 14px 12px;
    font-size: 14px;
  }
}

@media (max-width: 1024px) {
  .sec {
    padding: 72px 0 76px;
  }

  .sec-title {
    font-size: 28px;
  }

  .sec-desc {
    font-size: 16px;
  }
}

@media (max-width: 640px) {
  .c-nav {
    height: 64px;
  }

  .c-nav__logo {
    font-size: 18px;
  }

  .c-nav__cta {
    font-size: 14px;
    padding: 8px 14px;
  }

  .sec {
    padding: 52px 0 56px;
  }

  .sec-title {
    font-size: 24px;
  }

  .sec-desc {
    font-size: 15px;
  }

  .c-footer__slogan {
    font-size: 28px;
  }
}

/* 반응형 보정 : 서브 푸터 모바일 */
@media (max-width: 768px) {
  .c-footer {
    padding: 48px 0 110px;
  }
  .c-footer__top {
    gap: 20px;
    padding-bottom: 28px;
  }
  .c-footer__slogan {
    font-size: 26px;
  }
  .c-footer__btns {
    width: 100%;
    gap: 8px;
  }
  .c-footer__btn-sage,
  .c-footer__btn-outline {
    flex: 1 1 calc(50% - 4px);
    padding: 12px 8px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    white-space: nowrap;
  }
  .c-footer__btns .c-footer__btn-outline:last-child {
    flex-basis: 100%;
  }
  .c-footer__bottom {
    gap: 14px;
    padding-top: 24px;
    font-size: 13px;
    line-height: 1.7;
    word-break: keep-all;
  }
  .c-footer__brand {
    font-size: 18px;
  }
  .c-footer__info {
    font-weight: 400;
  }
}

/* 메인 푸터 모바일 : 우측 하단 플로팅 버튼에 가리지 않게 */
@media (max-width: 768px) {
  .main-footer {
    padding-bottom: 100px;
  }
  .main-footer__copy {
    font-size: 12px;
    line-height: 1.6;
    padding-right: 56px;
    box-sizing: border-box;
  }
}

/* 서브 헤더: 메뉴에 마우스를 올리면 내려오는 메뉴 패널과 같은 배경색으로 (위 .sub-body .header 흰 배경보다 우선) */
@media (min-width: 1201px) {
  .sub-body .header:hover,
  .sub-body .header:focus-within,
  .sub-body .header.scrolled:hover,
  .sub-body .header.scrolled:focus-within {
    background: #f7f3e2;
    border-bottom-color: #b1b48d;
  }
}

/* 서브페이지: 푸터 양쪽 세로 보더선(frame-lines) 없음 — 푸터 종류(main/sub)와 상관없이 */
.sub-body .main-footer .frame-lines,
.sub-body .c-footer .frame-lines {
  display: none;
}

/* 서브페이지: 푸터의 "A Chance to Change. / 상담 예약 · 전화 · 맨 위로" 블록 없음 */
.sub-body .main-footer__cta,
.sub-body .c-footer__top {
  display: none;
}

/* 서브페이지 메인 푸터: 메인페이지와 똑같이 보이게.
   서브는 body 가 16px/1.75, 메인은 15px/1.5 라서 푸터가 그대로 상속받아 더 커진다.
   푸터 안에서만 메인 쪽 값으로 되돌린다. */
.sub-body .main-footer {
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
}

/* 좌우 여백도 메인페이지와 똑같이.
   (같은 규칙이 main.css 에 있지만 서브 레이아웃은 main.css 를 불러오지 않는다) */
@media (max-width: 768px) {
  .sub-body .main-footer .container {
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
  }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .sub-body .main-footer .container {
    padding-left: 48px;
    padding-right: 48px;
    box-sizing: border-box;
  }
}
@media (min-width: 1025px) and (max-width: 1820px) {
  .sub-body .main-footer .container {
    padding-left: 56px;
    padding-right: 56px;
    box-sizing: border-box;
  }
}

/* 줄바꿈 방지(하이픈·번호가 중간에서 끊기지 않게) */
.nw {
  white-space: nowrap;
}
.main-footer__copy,
.c-footer__bottom > p {
  text-wrap: balance;
}
