/* =====================================================
   sub1.css — 병원소개 > 만수무강 소개 (about.html) 페이지 전용
   - 로드 순서: common.css → sub_common.css → sub1.css. 헤더 / 푸터 / 퀵메뉴는 common.css,
     서브 비주얼(히어로) · 브레드크럼 · 공통 섹션 제목(.sub-section-heading)은 sub_common.css 를 사용합니다.
   - 반응형 기준: 1000px (common.css 와 동일한 모바일 구간), 580px (작은 모바일)
   - 모바일 콘텐츠 좌우 여백은 24px / 24px (580px 이하 20px / 20px). 퀵메뉴(fixed overlay) 폭만큼의 보정 없음.
   ===================================================== */
.page-about {
  --about-ink: #2b2a26;
  --about-text: #5d5a52;
  --about-gold: #b8935a; /* 밝은 배경 위 영문 라벨 */
  --story-gold: #D6B992; /* 사진 위 번호 / 제목 */ 
  --about-pad-x: 24px;
  --sub-heading-accent: var(--about-gold); /* sub_common.css 의 공통 제목 색 */
  --sub-heading-desc: var(--about-text);
}

/* =====================================================
   줄별 채움 텍스트 (about.js createFill 가 만드는 구조)
   - 기본 HTML/CSS 에서는 이 클래스가 없고 원문이 선명하게 표시됩니다 (JS 성공 시에만 생성).
   - 연한 글자 농도: --fill-base (.about-story 0.3 / .about-intro 0.28). 선명한 글자는 항상 opacity 1.
   - 줄 박스(.about-fill__row)는 글자 폭에 맞춰 가운데 정렬 → 채움이 실제 글자 왼쪽 끝에서 시작.
     base / ink 는 같은 줄 박스 안에서 글꼴·굵기·자간·행간을 상속하고 nowrap 이라 위치·줄바꿈이 항상 같습니다.
   ===================================================== */
.about-fill__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.about-fill__visual {
  display: block;
}
.about-fill__row {
  position: relative;
  display: block;
  width: fit-content;
  margin-inline: auto;
  white-space: nowrap;
}
.about-fill__base {
  display: block;
  opacity: var(--fill-base, 0.3);
}
.about-fill__ink {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 100%;
  clip-path: inset(0 100% 0 0); /* 가로 노출량 0% (실제 값은 about.js 가 스크롤에 따라 갱신) */
}

.about-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* A. 상단 서브 비주얼 / 브레드크럼 → sub_common.css (.sub-hero*) */

/* =====================================================
   B. 병원 소개 인트로
   ===================================================== */
.about-intro {
  --fill-base: 0.28; /* 인트로 본문의 연한 글자 농도 */
  --about-intro-safe: clamp(40px, 6svh, 60px); /* pin 화면의 위·아래 안전 여백 */
  --about-intro-pin-top: 0px; /* 헤더가 fixed/sticky 일 때만 about.js 가 높이를 넣음 (지금은 absolute 라 0) */
  /* 위·아래·좌우 padding 은 안쪽 .about-intro__viewport 로 옮겼습니다 (섹션 자체에는 padding 없음) */
  background: #f2eee8;
  color: var(--about-ink);
  text-align: center;
  /* overflow 를 주면 ScrollTrigger pin(position:fixed)이 이 섹션에 묶입니다. 가로 넘침은 body 의 overflow-x 가 막습니다. */
  overflow: visible;
}
/* 화면 표시 래퍼. 기본(JS 없음 / 일반 흐름 / reduced-motion)은 기존 섹션 padding 그대로 */
.about-intro__viewport {
  padding: clamp(84px, 9vw, 160px) var(--about-pad-x) clamp(96px, 10vw, 180px);
}
/* pin 모드(about.js 가 pin 시작 전에 부여): 헤더 높이를 뺀 한 화면 높이 + 그룹 가로·세로 중앙 정렬.
   pin 대상 자체에는 transform 을 주지 않고, 고정 전후에 같은 배치를 사용합니다. */
.about-intro.is-pin .about-intro__viewport {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100svh - var(--about-intro-pin-top));
  padding: var(--about-intro-safe) var(--about-pad-x);
}
.about-intro__inner {
  width: 100%; /* flex 중앙 정렬에서도 일반 흐름과 같은 너비(최대 980px) */
  max-width: 980px;
  margin-inline: auto;
}
/* 영문 라벨 / 제목은 sub_common.css 의 .sub-section-heading--intro 를 사용 */
/* 본문(설명)은 줄별 채움 애니메이션(about.js) 때문에 줄바꿈 / 폭 제한 없이 기존 크기 · 행간을 유지 */
.about-intro .sub-section-heading__description {
  max-width: none;
}
.about-intro .sub-section-heading__description p {
  font-size: clamp(14px, 1.05vw, 18px);
  line-height: 1.95;
}

/* =====================================================
   C. 01~05 진료 철학 사진 패널
   기본(= JS 없음 / 모바일 / 낮은 화면 / reduced-motion): 패널 5개를 일반 세로 흐름으로 모두 표시.
   .is-pinned (about.js 가 PC 에서 GSAP 준비 후 추가): viewport 를 화면에 머물게 하고 패널을 겹침.
   사진 / 딤드 / 곡선은 모두 .about-story__frame 한 요소 안에서 clip → 곡선 밖은 아이보리 배경만 보임
   ===================================================== */
.about-story {
  --story-radius: clamp(64px, 26.5vw, 510px); /* 좌측 상단 / 우측 하단 곡선 (PC 원본 510px, 패널 크기에 비례해 축소) */
  --story-dim: rgba(14, 20, 26, 0.5);
  --fill-base: 0.3; /* 사진 위 흰색 본문의 연한 글자 농도 (권장 0.25 ~ 0.35) */
  position: relative;
  background: #f2eee8;
  color: #fff;
}
.about-story__panel {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: clamp(560px, 52.1vw, 1000px); /* PC 원본 1920×1000 */
  padding: 120px var(--about-pad-x);
  text-align: center;
}
.about-story__frame {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: var(--story-radius) 0 var(--story-radius) 0;
  background: #1f2a30;
}
.about-story__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--story-pos, 50% 50%);
}
.about-story__dim {
  position: absolute;
  inset: 0;
  background: var(--story-dim); /* 고정 딤드 */
}
.about-story__content {
  position: relative;
  z-index: 1;
  width: min(100%, 920px);
}
.about-story__num {
  margin: 0 0 0.30em;
  font-family: "Manrope", "Noto Sans KR", sans-serif;
  font-size: clamp(56px, 6vw, 140px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--story-gold);
}
.about-story__title {
  margin: 0 0 clamp(22px, 3vw, 70px);
  font-size: clamp(22px, 2.1vw, 50px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0em;
  color: var(--story-gold);
  word-break: keep-all;
}
.about-story__q {
  margin: 0 0 1.5em;
  font-size: clamp(17px, 1.35vw, 26px);
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0em;
  word-break: keep-all;
  color: #fff;
}
.about-story__desc {
  margin: 0;
  font-size: clamp(14px, 1.05vw, 18px);
  line-height: 1.85;
  font-weight:500;
  color: #fff;
  word-break: keep-all;
}
.about-story__line {
  display: block;
  text-wrap: balance;
}

/* PC 스크롤 스토리 (about.js 가 .is-pinned 를 붙인 경우에만) */
.about-story.is-pinned .about-story__viewport {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.about-story.is-pinned .about-story__panel {
  position: absolute;
  inset: 0;
  min-height: 0;
  padding-block: 0;
}

/* =====================================================
   D. Our Promise
   ===================================================== */
.about-promise {
  padding: clamp(84px, 8vw, 140px) 0 clamp(100px, 10vw, 180px);
  background: #f2eee8;
  color: var(--about-ink);
}
.about-promise__head {
  margin-bottom: clamp(36px, 4vw, 68px);
  text-align: center;
}
.about-promise__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  width: calc(100% - 48px);
  max-width: 1644px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.about-promise__card {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  aspect-ratio: 528 / 623; /* PC 원본 528×623 */
  min-height: 340px;
  padding: 40px 28px;
  overflow: hidden;
  border-radius: 0 0 clamp(48px, 5.21vw, 100px) 0; /* PC 100px */
  background: #1f2a30;
  color: #fff;
  text-align: center;
}
.about-promise__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--promise-pos, 50% 50%);
}
.about-promise__dim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(14, 20, 26, 0.32); /* 사진 위 딤드 (새 사진에 이미 어두운 톤이 있어 이전보다 낮춤) */
}
.about-promise__name {
  margin: 0 0 clamp(14px, 1.7vw, 44px);
  font-size: clamp(21px, 1.8vw, 40px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.35;
  word-break: keep-all;
}
.about-promise__desc {
  margin: 0;
  font-size: clamp(14px, 1vw, 20px);
  line-height: 1.8;
  color: rgba(255, 255, 255, 1);
  word-break: keep-all;
}

/* =====================================================
   반응형
   ===================================================== */
@media (max-width: 1000px) {
  .about-promise__list {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .about-promise__card {
    aspect-ratio: auto;
    min-height: 320px;
  }
}
@media (max-width: 900px) {
  .about-br {
    display: none;
  }
  .about-story {
    --story-radius: clamp(48px, 16vw, 110px); /* 모바일은 곡선을 줄여 글자가 잘리지 않게 */
  }
  .about-story__panel {
    min-height: clamp(520px, 118vw, 720px);
    padding: 96px calc(var(--about-pad-x) + 8px); /* 큰 곡선 안쪽으로 본문이 들어오도록 좌우 여백 추가 */
  }
}
@media (max-width: 580px) {
  .page-about {
    --about-pad-x: 20px;
  }
  .about-promise__list {
    width: calc(100% - 40px);
  }
}
