/* ==========================================================================
   V6 Sub Pages
========================================================================== */

.lydian-v6-sub {
  --section-pt-sub: 100px;
  --section-pb-sub: 100px;
  --section-pt-sub-no-title: calc(var(--section-pt-sub) * 2);
  --section-pt: var(--section-pt-sub);
  --section-pb: var(--section-pb-sub);

  /* Sub typography — body (PC 1024+) */
  --sub-body-fs: 16px;
  --sub-body-lh: 28px;
  --sub-body-fw: 400;

  /* Sub typography — heading (PC 1024+) */
  --sub-heading-fs: 18px;
  --sub-heading-lh: 32px;
  --sub-heading-fw: 400;

  /* Sub typography — body (tablet 768–1023) */
  --sub-body-fs-tablet: 15px;
  --sub-body-lh-tablet: 26px;
  --sub-body-fw-tablet: 400;

  /* Sub typography — heading (tablet 768–1023) */
  --sub-heading-fs-tablet: 18px;
  --sub-heading-lh-tablet: 32px;
  --sub-heading-fw-tablet: 400;

  /* Sub typography — body (mobile ≤767) */
  --sub-body-fs-mobile: 15px;
  --sub-body-lh-mobile: 26px;
  --sub-body-fw-mobile: 400;

  /* Sub typography — heading (mobile ≤767) */
  --sub-heading-fs-mobile: 18px;
  --sub-heading-lh-mobile: 32px;
  --sub-heading-fw-mobile: 400;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .lydian-v6-sub {
    --section-pt-sub: clamp(80px, 10.4vw, 100px);
    --section-pb-sub: clamp(80px, 10.9vw, 100px);
    --section-pt-sub-no-title: 100px;
  }
}

@media (max-width: 767px) {
  .lydian-v6-sub {
    --section-pt-sub-no-title: clamp(72px, 9vw, 88px);
  }
}

.lydian-v6-sub-page .inner {
  padding-inline: clamp(16px, 3vw, 48px);
}

/* Sub pages — 콘텐츠 영역(main) 하단 여백 → 푸터와 간격 */
.lydian-v6-sub {
  margin-bottom: var(--section-pt-sub);
}

.lydian-v6-sub > .section:last-child {
  --section-pb: 0;
}

/* Sub content intro without a section title block */
.lydian-v6-sub .section--no-title {
  --section-pt: var(--section-pt-sub-no-title);
}

/* --------------------------------------------------------------------------
   Sub Hero — Figma 1-17 layout, main typography tokens
-------------------------------------------------------------------------- */

.sub-hero {
  --section-pt: 0;
  --section-pb: 0;
  --sub-hero-min-height: clamp(420px, 36vw, 560px);
  --sub-hero-reveal-bg-scale: 1.05;
  --sub-hero-reveal-bg-duration: 1.8s;
  --sub-hero-reveal-text-duration: 1s;
  --sub-hero-reveal-line-duration: 0.9s;
  --sub-hero-reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sub-hero-reveal-y: 24px;
  --sub-hero-delay-title: 350ms;
  --sub-hero-delay-subtitle: 500ms;
  --sub-hero-delay-line: 700ms;
  --sub-hero-delay-desc: 720ms;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: var(--sub-hero-min-height);
  padding-top: clamp(70px, 8vw, 100px);
  overflow: hidden;
}

.sub-hero__bg {
  position: absolute;
  left: 0;
  right: 0;
  top: -10%;
  width: 100%;
  height: 120%;
  background-color: var(--color-brand);
  background-image: var(--sub-hero-bg-image, var(--v6-bg-hero));
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: scroll;
  transform: scale(1);
  transform-origin: center top;
}

.sub-hero__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(75, 32, 79, 0.1);
}

.sub-hero__inner {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  min-height: 0;
  padding-bottom: clamp(40px, 5vw, 80px);
}

.sub-hero__content {
  width: 100%;
}

.sub-hero__main-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: clamp(24px, 3vw, 48px);
  row-gap: 8px;
  width: 100%;
}

.sub-hero__title-group {
  display: contents;
}

.sub-hero__title-ko {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font-weight: var(--fw-accent);
}

.sub-hero__title-en {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  text-transform: uppercase;
}

.sub-hero__line {
  position: relative;
  grid-column: 2;
  grid-row: 2;
  justify-self: stretch;
  align-self: center;
  width: 100%;
  min-width: 0;
  height: 0;
  margin: 0;
}

.sub-hero__line::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 1px;
  background-color: var(--color-white-20);
  transform: scaleX(0);
  transform-origin: left center;
}

.sub-hero__desc {
  grid-column: 3;
  grid-row: 2;
  justify-self: end;
  align-self: center;
  max-width: min(520px, 36vw);
  margin: 0;
  text-align: right;
}

.sub-hero__desc-inner {
  display: block;
}

.sub-hero:not(.is-loaded) .sub-hero__bg {
  transform: scale(var(--sub-hero-reveal-bg-scale));
}

.sub-hero:not(.is-loaded) .sub-hero__title-en,
.sub-hero:not(.is-loaded) .sub-hero__title-ko,
.sub-hero:not(.is-loaded) .sub-hero__desc-inner {
  opacity: 0;
  transform: translateY(var(--sub-hero-reveal-y));
}

.sub-hero.is-loaded .sub-hero__bg {
  transform: scale(1);
  transition: transform var(--sub-hero-reveal-bg-duration)
    var(--sub-hero-reveal-ease);
}

.sub-hero.is-loaded .sub-hero__title-en {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--sub-hero-reveal-text-duration) var(--sub-hero-reveal-ease),
    transform var(--sub-hero-reveal-text-duration) var(--sub-hero-reveal-ease);
  transition-delay: var(--sub-hero-delay-title);
}

.sub-hero.is-loaded .sub-hero__title-ko {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--sub-hero-reveal-text-duration) var(--sub-hero-reveal-ease),
    transform var(--sub-hero-reveal-text-duration) var(--sub-hero-reveal-ease);
  transition-delay: var(--sub-hero-delay-subtitle);
}

.sub-hero.is-loaded .sub-hero__line::after {
  transform: scaleX(1);
  transition: transform var(--sub-hero-reveal-line-duration)
    var(--sub-hero-reveal-ease);
  transition-delay: var(--sub-hero-delay-line);
}

.sub-hero.is-loaded .sub-hero__desc-inner {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--sub-hero-reveal-text-duration) var(--sub-hero-reveal-ease),
    transform var(--sub-hero-reveal-text-duration) var(--sub-hero-reveal-ease);
  transition-delay: var(--sub-hero-delay-desc);
}

@media (prefers-reduced-motion: reduce) {
  .sub-hero:not(.is-loaded) .sub-hero__bg,
  .sub-hero:not(.is-loaded) .sub-hero__title-en,
  .sub-hero:not(.is-loaded) .sub-hero__title-ko,
  .sub-hero:not(.is-loaded) .sub-hero__line::after,
  .sub-hero:not(.is-loaded) .sub-hero__desc-inner {
    opacity: 1;
    transform: none;
  }

  .sub-hero.is-loaded .sub-hero__bg,
  .sub-hero.is-loaded .sub-hero__title-en,
  .sub-hero.is-loaded .sub-hero__title-ko,
  .sub-hero.is-loaded .sub-hero__line::after,
  .sub-hero.is-loaded .sub-hero__desc-inner {
    transition: none;
  }
}

@media (min-width: 1280px) {
  .sub-hero__title-en {
    white-space: nowrap;
  }

  .sub-hero__desc {
    max-width: none;
    white-space: nowrap;
  }

  .sub-hero__main-row:not(:has(.sub-hero__line)) {
    grid-template-columns: auto 1fr;
  }

  .sub-hero__main-row:not(:has(.sub-hero__line)) .sub-hero__desc {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }
}

@media (max-width: 1279px) {
  .sub-hero__main-row {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    justify-items: start;
    row-gap: clamp(20px, 3vw, 24px);
    column-gap: 0;
  }

  .sub-hero__title-ko,
  .sub-hero__title-en,
  .sub-hero__line,
  .sub-hero__desc {
    grid-column: auto;
    grid-row: auto;
  }

  .sub-hero__title-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-width: 0;
  }

  .sub-hero__main-row:not(:has(.sub-hero__line)) {
    grid-template-columns: 1fr;
  }

  .sub-hero__line {
    justify-self: stretch;
    width: 100%;
    max-width: 100%;
  }

  .sub-hero__desc {
    justify-self: stretch;
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 767px) {
  .sub-hero {
    --sub-hero-min-height: clamp(360px, 92vw, 480px);
  }

  .sub-hero__main-row {
    row-gap: 13px;
  }

  .sub-hero__title-group {
    gap: 5px;
  }

  .sub-hero__title-en.type-display-section {
    font-size: var(--fs-heading-lg);
    line-height: var(--lh-heading-lg);
    letter-spacing: var(--ls-tight);
  }

  .sub-hero__title-ko.type-body-lg {
    font-size: var(--fs-body-lg);
    line-height: var(--lh-body-lg);
    letter-spacing: var(--ls-tight);
  }

  .sub-hero__desc.type-body-md {
    font-size: var(--fs-body-sm);
    line-height: var(--lh-body-sm);
    letter-spacing: var(--ls-tight);
  }

  .sub-hero__inner.inner {
    padding-inline: 20px;
  }
}

/* --------------------------------------------------------------------------
   Policy — Figma 1-45 content panel, main typography tokens
-------------------------------------------------------------------------- */

.policy {
  --policy-body-fs: var(--sub-body-fs);
  --policy-body-lh: var(--sub-body-lh);
  --policy-body-fw: var(--sub-body-fw);
  --policy-heading-fs: var(--sub-heading-fs);
  --policy-heading-lh: var(--sub-heading-lh);
  --policy-heading-fw: var(--sub-heading-fw);
}

.policy__inner {
  width: 100%;
}

.policy__tit {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 3.1vw, 60px);
  margin-bottom: clamp(40px, 3.1vw, 55px);
}

.policy__tit-en {
  margin: 0;
  text-transform: uppercase;
}

.policy__tit-line {
  display: block;
  width: 100%;
  height: 0;
  border-top: 1px solid #e1dad1;
}

.policy__panel {
  width: 100%;
  padding: clamp(32px, 2.08vw, 40px);
  border-radius: 20px;
  background: rgba(75, 32, 79, 0.06);
}

.policy__intro {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.policy__intro .policy__text + .policy__text {
  margin-top: 0;
}

.policy__articles {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 2.08vw, 32px);
  margin-top: clamp(24px, 2.08vw, 32px);
}

.policy__block {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.policy__heading {
  margin: 0;
  font-size: var(--policy-heading-fs);
  line-height: var(--policy-heading-lh);
  font-weight: var(--policy-heading-fw);
  letter-spacing: var(--ls-tight);
}

.policy__text {
  margin: 0;
  font-size: var(--policy-body-fs);
  line-height: var(--policy-body-lh);
  font-weight: var(--policy-body-fw);
  letter-spacing: var(--ls-tight);
}

.policy__block .policy__heading + .policy__text,
.policy__block .policy__text + .policy__text {
  margin-top: 0;
}

@media (max-width: 1023px) {
  .policy {
    --policy-body-fs: var(--sub-body-fs-tablet);
    --policy-body-lh: var(--sub-body-lh-tablet);
    --policy-body-fw: var(--sub-body-fw-tablet);
    --policy-heading-fs: var(--sub-heading-fs-tablet);
    --policy-heading-lh: var(--sub-heading-lh-tablet);
    --policy-heading-fw: var(--sub-heading-fw-tablet);
  }

  .policy__panel {
    padding: clamp(24px, 3.9vw, 32px);
    border-radius: 16px;
  }

  .policy__articles {
    gap: clamp(20px, 3.12vw, 28px);
    margin-top: clamp(20px, 3.12vw, 28px);
  }
}

@media (max-width: 767px) {
  .policy__tit {
    gap: clamp(24px, 6.15vw, 40px);
    margin-bottom: clamp(28px, 7.18vw, 40px);
  }

  .policy__tit-en.type-display-section {
    font-size: var(--fs-heading-lg);
    line-height: var(--lh-heading-lg);
    letter-spacing: var(--ls-tight);
  }

  .policy__panel {
    padding: clamp(20px, 5.13vw, 28px);
    border-radius: 12px;
  }

  .policy__articles {
    gap: clamp(18px, 4.62vw, 24px);
    margin-top: clamp(18px, 4.62vw, 24px);
  }

  .policy .policy__inner.inner {
    padding-inline: 20px;
  }

  .policy {
    --policy-body-fs: var(--sub-body-fs-mobile);
    --policy-body-lh: var(--sub-body-lh-mobile);
    --policy-body-fw: var(--sub-body-fw-mobile);
    --policy-heading-fs: var(--sub-heading-fs-mobile);
    --policy-heading-lh: var(--sub-heading-lh-mobile);
    --policy-heading-fw: var(--sub-heading-fw-mobile);
  }
}
