/*
 * 신한 The ACE Elite 안내 페이지 — 본문(히어로·이용 방법·혜택 및 조건·가맹점 목록). 뷔페·케이크 공용.
 * 사이트별 차이는 수식어 클래스로만 둔다. 공용 레이아웃·팝업 스타일은 style.css.
 *
 * 출처: 피그마 `시안-최종` 뷔페 PC main 128:1123 · MO main 128:893.
 * 값은 tokens.css 변수를 쓴다. 브레이크포인트: 1024px 이하 = MO(태블릿 포함).
 * 헤더가 position:fixed 라 히어로 상단 80px(MO 60px)은 헤더 아래에 깔린다(시안 그대로).
 */

/* ------------------------------------------------------------------ 공통 */
.sh-page strong {
  font-weight: 600;
  color: inherit;
  /* reset.css 가 `body, *` 에 font-size:16px 를 걸어 MO 14px 문단 안 강조가 16px 로 남는다 */
  font-size: inherit;
  line-height: inherit;
}

.sh-section {
  padding: 70px var(--sh-gutter);
  background: var(--sh-color-white);
}

.sh-section__inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: var(--sh-container);
  margin: 0 auto;
}

.sh-section__title {
  font-size: 42px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--sh-color-text);
}

.sh-box {
  display: flex;
  flex-direction: column;
  padding: 30px;
  border-radius: 20px;
  background: var(--sh-color-box);
}

.sh-box__label {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--sh-color-text-muted);
}

/* ------------------------------------------------------------------ 히어로 (128:1125 / MO 128:894) */
.sh-hero {
  position: relative;
  display: flex;
  height: 700px;
  padding: 160px var(--sh-gutter) 20px;
  overflow: hidden;
  background: var(--sh-color-white);
}

.sh-hero__bg,
.sh-hero__bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sh-hero__bg img {
  max-width: none;
  object-fit: cover;
}

.sh-hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 34px;
  width: 100%;
  max-width: var(--sh-container);
  margin: 0 auto;
}

.sh-hero__text {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.sh-hero__eyebrow {
  margin-bottom: -24px; /* 소제목-타이틀 6px (text gap 30px 보정) */
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--sh-color-gold);
}

.sh-hero__title-line {
  display: block;
  font-size: 65px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--sh-color-text);
}

.sh-hero__desc {
  font-size: 18px;
  line-height: 1.6;
  color: var(--sh-color-text-sub);
  opacity: 0.8;
}

.sh-page .sh-hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 30px;
  border-radius: 8px;
  background: var(--sh-color-btn-dark);
  font-size: 16px;
  font-weight: 600;
  color: var(--sh-color-white);
  transition: background-color var(--sh-duration);
}

.sh-page .sh-hero__btn:hover {
  background: var(--sh-color-gold);
}

/* ------------------------------------------------------------------ 서비스 이용 방법 (128:1132) */
.sh-how {
  padding-top: 100px;
}

.sh-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  list-style: none;
}

.sh-step {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 30px 40px;
  border-radius: 20px;
  background: var(--sh-color-box);
}

.sh-step__text {
  display: flex;
  flex: 1;
  gap: 10px;
  align-self: flex-start;
  min-width: 0;
}

.sh-step__num,
.sh-step__title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.4;
}

.sh-step__num {
  flex-shrink: 0;
  color: var(--sh-color-step-num);
}

.sh-step__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.sh-step__title {
  color: var(--sh-color-text);
}

.sh-step__desc {
  font-size: 16px;
  line-height: 1.5;
  color: var(--sh-color-text-sub);
}

.sh-page .sh-step__em {
  color: var(--sh-color-text);
}

.sh-step__icon {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
}

/* ------------------------------------------------------------------ 혜택 및 이용 조건 (128:1170) */
.sh-terms__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.sh-benefit {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 514px;
  padding: 50px 40px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--sh-gradient-benefit);
}

.sh-benefit__label {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--sh-color-label-soft);
}

.sh-benefit__headline {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.5;
  background: var(--sh-gradient-benefit-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sh-benefit__sub {
  font-size: 16px;
  line-height: 1.5;
  color: var(--sh-color-text-sub);
}

.sh-benefit__img {
  position: absolute;
  right: 40px;
  bottom: 40px;
  width: 350px;
  height: 279px;
}

.sh-terms__side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sh-condition {
  gap: 4px;
}

.sh-condition__main {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--sh-color-text);
}

.sh-condition__sub {
  font-size: 16px;
  line-height: 1.5;
  color: var(--sh-color-text-sub);
}

.sh-notice {
  gap: 10px;
}

.sh-notice__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
}

.sh-notice__list li {
  position: relative;
  padding-left: 8px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--sh-color-text-sub);
  word-break: keep-all;
}

.sh-notice__list li::before {
  content: '';
  position: absolute;
  top: 11px;
  left: 0;
  width: 2px;
  height: 2px;
  background: var(--sh-color-step-num);
}

/* ------------------------------------------------------------------ 가맹점 안내 (128:1225) */
.sh-partners {
  padding-bottom: 140px;
}

.sh-partners .sh-section__inner {
  gap: 47px;
}

.sh-partners__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sh-partners__intro {
  font-size: 16px;
  line-height: 1.4;
  color: var(--sh-color-text-sub);
  opacity: 0.8;
}

.sh-page .sh-partners__intro strong {
  color: var(--sh-color-text);
}

.sh-partners__board {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.sh-partners__count {
  display: flex;
  align-items: center;
  height: 70px;
  padding: 0 20px;
  background: var(--sh-color-box);
}

.sh-partners__count span,
.sh-partners__count strong {
  font-size: 16px;
  line-height: 1.2;
  color: var(--sh-color-text);
}

/* "전체 9개" — 전체 뒤에만 4px, 숫자와 "개"는 붙여 쓴다 */
.sh-partners__count > span:first-child {
  margin-right: 4px;
}

.sh-partners__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 60px 20px;
  list-style: none;
}

.partner-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  text-align: left;
}

button.partner-card {
  cursor: pointer;
}

.partner-card__thumb {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 413.33 / 280.52;
}

.partner-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

button.partner-card:hover .partner-card__img,
button.partner-card:focus-visible .partner-card__img {
  transform: scale(1.04);
}

.partner-card__name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--sh-color-text);
  word-break: keep-all;
}

button.partner-card:hover .partner-card__name {
  color: var(--sh-color-gold);
}

/* PC 줄바꿈은 시안 그대로, MO 에선 자연 줄바꿈 */
.sh-br-pc {
  display: inline;
}

/* ------------------------------------------------------------------ 호텔케이크 수식어 (.sh-page--bakery)
 * 케이크 시안(PC 128:355 / MO 128:108)이 뷔페와 다른 곳만 덮어쓴다.
 * 히어로 타이틀은 Montserrat Regular(영문, common/reset.css 에 @font-face 선언), 혜택 박스 높이·일러스트 크기가 다르다.
 */
.sh-page--bakery .sh-hero {
  padding-top: 180px;
}

.sh-page--bakery .sh-hero__title--latin {
  font-family: 'Montserrat', var(--sh-font);
  font-size: 70px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -3.5px;
}

/* reset.css 의 `*` 규칙이 span 에 직접 폰트를 지정하므로 상속을 명시한다 */
.sh-page--bakery .sh-hero__title--latin .sh-hero__title-line {
  font-family: inherit;
  letter-spacing: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.sh-page--bakery .sh-benefit {
  min-height: 496px;
}

.sh-page--bakery .sh-benefit__img {
  bottom: 39px;
  width: 380px;
  height: 228px;
  object-fit: contain;
}

/* MO 전용 줄바꿈 (히어로 설명 "고객은" 뒤) */
.sh-br-mo {
  display: none;
}

/* ------------------------------------------------------------------ 첫 진입 인터랙션 (PC·MO 공통)
 * hoteldining.co.kr(combined/style.css)와 같은 효과. 키프레임은 다른 사이트 CSS 와 겹치지 않게 sh- 접두.
 * 배경 <img> 에 건다(<picture> 는 MO 에서 centering transform 을 쓴다). */
@keyframes sh-fade-in {
  from { opacity: 0; }
  to { opacity: var(--sh-fade-to, 1); } /* 설명문처럼 기본 opacity 가 1 미만인 요소는 --sh-fade-to 로 끝값을 지정 */
}

@keyframes sh-scale-fade-in {
  from { opacity: 0; transform: scale(1.25); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes sh-txt-clip {
  from {
    transform: translateY(100%);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
  }
  to {
    transform: translateY(0);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

.sh-hero__bg img {
  animation: sh-scale-fade-in var(--sh-hero-intro) ease-out both;
}

.sh-hero__eyebrow,
.sh-hero__title-line {
  animation: sh-txt-clip var(--sh-hero-intro) ease-out both;
}

.sh-hero__desc {
  --sh-fade-to: 0.8;
}

.sh-hero__desc,
.sh-page .sh-hero__btn {
  animation: sh-fade-in var(--sh-hero-fade) ease-out var(--sh-hero-fade-delay) both;
}

/* ------------------------------------------------------------------ MO (≤1024px, 태블릿 포함) */
@media (max-width: 1024px) {
  /* 섹션 사이 10px 회색 구분선 (128:933 · 128:986) */
  .sh-section {
    padding: 60px var(--sh-gutter);
  }

  .sh-section + .sh-section {
    border-top: 10px solid var(--sh-color-surface-soft);
  }

  .sh-section__inner {
    gap: 16px;
  }

  .sh-section__title {
    font-size: 24px;
  }

  .sh-box {
    padding: 24px;
  }

  .sh-box__label {
    font-size: 16px;
  }

  /* 태블릿 보정에서 옮겨온 선언 — MO 블록이 덮어쓰지 않는 것들 */
  .sh-steps,
  .sh-terms__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sh-br-pc {
    display: none;
  }

  /* 히어로 — 이미지는 크롭하지 않는다. 폭을 600px 로 캡하고 가운데 정렬, 좌우는 배경색으로 채운다.
   * 높이 = min(100vw, 600px) × 1140/750 (375px 에서 정확히 570px) */
  .sh-hero {
    height: calc(min(100vw, var(--sh-hero-mo-max)) * 1140 / 750);
    padding: 100px 0 0;
    background: linear-gradient(to bottom, var(--sh-hero-mo-bg-top), var(--sh-hero-mo-bg-bottom));
  }

  .sh-hero__bg {
    inset: 0 auto 0 50%;
    width: min(100%, var(--sh-hero-mo-max));
    transform: translateX(-50%);
  }

  .sh-hero__inner {
    gap: 16px;
    max-width: var(--sh-hero-mo-max);
    padding: 0 var(--sh-gutter);
  }

  .sh-hero__text {
    gap: 10px;
  }

  .sh-hero__eyebrow {
    margin-bottom: -8px; /* 2px */
    font-size: 14px;
  }

  .sh-hero__title-line {
    font-size: 32px;
  }

  .sh-hero__title-line--pc {
    display: none;
  }

  .sh-hero__desc {
    font-size: 14px;
    line-height: 1.4;
  }

  .sh-page .sh-hero__btn {
    height: auto;
    padding: 10px 18px;
    border-radius: 4px;
    font-size: 14px;
  }

  /* 이용 방법 */
  .sh-how {
    padding-top: 60px;
  }

  .sh-steps {
    gap: 10px;
  }

  .sh-step {
    flex-direction: column;
    gap: 6px;
    padding: 24px;
  }

  .sh-step__text {
    flex-direction: column;
    gap: 6px;
    align-self: stretch;
  }

  .sh-step__num,
  .sh-step__title {
    font-size: 18px;
  }

  .sh-step__body {
    gap: 6px;
  }

  .sh-step__desc {
    font-size: 14px;
    line-height: 1.4;
  }

  .sh-step__icon {
    width: 80px;
    height: 80px;
  }

  /* 혜택 및 조건 */
  .sh-terms__grid,
  .sh-terms__side {
    gap: 10px;
  }

  .sh-benefit {
    min-height: 300px;
    padding: 20px 30px;
  }

  .sh-benefit__label {
    font-size: 16px;
  }

  .sh-benefit__headline {
    font-size: 24px;
  }

  .sh-benefit__sub {
    font-size: 14px;
  }

  .sh-benefit__img {
    right: auto;
    bottom: 20px;
    left: 50%;
    width: 190px;
    height: 151px;
    transform: translateX(-50%);
  }

  .sh-condition {
    gap: 6px;
  }

  .sh-condition__main {
    font-size: 18px;
    line-height: 1.4;
  }

  .sh-condition__sub {
    font-size: 14px;
    line-height: 1.4;
  }

  .sh-notice {
    gap: 6px;
  }

  .sh-notice__list li {
    font-size: 14px;
    line-height: 1.4;
  }

  .sh-notice__list li::before {
    top: 9px;
  }

  /* 호텔케이크 수식어 (MO) */
  .sh-page--bakery .sh-hero {
    padding-top: 100px;
  }

  .sh-page--bakery .sh-hero__title--latin {
    font-size: 32px;
    letter-spacing: -1.6px;
  }

  .sh-br-mo {
    display: inline;
  }

  .sh-page--bakery .sh-benefit {
    min-height: 300px;
  }

  .sh-page--bakery .sh-benefit__img {
    bottom: 20px;
    width: 225px;
    height: 135px;
  }

  /* 가맹점 — 수량 바만 화면 끝까지 붙는다 */
  .sh-partners .sh-section__inner {
    gap: 20px;
  }

  .sh-partners__head {
    gap: 12px;
  }

  .sh-partners__intro {
    font-size: 14px;
  }

  .sh-partners__board {
    gap: 30px;
  }

  .sh-partners__count {
    height: 60px;
    margin: 0 calc(var(--sh-gutter) * -1);
  }

  .sh-partners__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 11px;
  }

  .partner-card {
    gap: 10px;
  }

  .partner-card__thumb {
    border-radius: 8px;
    aspect-ratio: 162 / 110;
  }

  .partner-card__name {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sh-hero__bg img,
  .sh-hero__eyebrow,
  .sh-hero__title-line,
  .sh-hero__desc,
  .sh-page .sh-hero__btn {
    animation: none;
  }

  .partner-card__img {
    transition: none;
  }

  button.partner-card:hover .partner-card__img,
  button.partner-card:focus-visible .partner-card__img {
    transform: none;
  }
}
