.home-page {
  --home-header-offset: var(--header-height);
}

.home-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 1080px;
  overflow: hidden;
  padding-inline: 24px;
  scroll-margin-top: var(--home-header-offset);
}

.home-section__progress {
  position: absolute;
  left: 90px;
  bottom: 54px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 86px;
}

.home-progress__trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.home-progress__trigger::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -11px;
  bottom: -11px;
}

.home-progress__trigger:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}

.home-section--about .home-progress__trigger:focus-visible {
  outline-color: #005db6;
}

.home-progress__bar {
  display: block;
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background-color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

.home-progress__bar.is-active {
  width: 86px;
  background-color: #ffffff;
}

.home-section--about .home-progress__bar {
  background-color: rgba(255, 255, 255, 0.3);
}

.home-section--about .home-progress__bar.is-active {
  background-color: #005db6;
}

/* Hero */
.hero {
  margin-top: calc(var(--home-header-offset) * -1);
  padding: var(--home-header-offset) 0 0;
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 44px;
  max-width: 900px;
  padding: 0 40px;
  text-align: center;
}

.hero__title {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-size: clamp(2.125rem, 4vw + 1rem, 4.25rem);
  font-weight: 700;
  line-height: 1.35;
  color: #ffffff;
  text-wrap: balance;
}

.hero__subtitle {
  margin: 0;
  font-size: clamp(1rem, 1.2vw + 0.75rem, 1.375rem);
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  max-width: 34em;
}

/* About — bg matches Figma #5:570: 2190×1115 at (-574, -17) in 1920×1080 section */
.home-section--about {
  --about-bg-left: -29.895833%;
  --about-bg-top: -1.574074%;
  --about-bg-width: 114.0625%;
  --about-bg-height: 103.240741%;
  --about-bg-position: left top;

  background-color: #afc7d3;
}

.home-section--about .home-section__bg {
  position: absolute;
  left: var(--about-bg-left);
  top: var(--about-bg-top);
  width: var(--about-bg-width);
  height: var(--about-bg-height);
  max-width: none;
  object-fit: cover;
  object-position: var(--about-bg-position);
  pointer-events: none;
}

.home-section--about .home-section__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 80px;
  padding: 180px 0 140px;
}

.home-section__heading-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 46px;
  width: 100%;
  max-width: 920px;
  text-align: center;
}

.home-section__eyebrow {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: #005db6;
}

.home-section__title {
  margin: 0;
  font-size: clamp(1.875rem, 3.2vw + 1rem, 3.625rem);
  font-weight: 700;
  line-height: 1.33;
  color: #111111;
  text-wrap: balance;
}

.home-section__title--light {
  color: #ffffff;
}

.home-section__description {
  margin: 0;
  font-size: clamp(1rem, 0.8vw + 0.85rem, 1.375rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: rgba(62, 62, 62, 0.9);
  max-width: 40em;
}

.home-section__description--light {
  color: rgba(255, 255, 255, 0.9);
}

.home-cta {
  --home-cta-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --home-cta-duration: 750ms;

  display: inline-flex;
  align-items: center;
  gap: 32px;
  padding: 10px 10px 10px 32px;
  border-radius: 100px;
  background-color: #ffffff;
  border: 1px solid transparent;
  box-shadow: 0 0 0 rgba(0, 93, 182, 0);
  transition:
    background-color var(--home-cta-duration) var(--home-cta-ease),
    border-color var(--home-cta-duration) var(--home-cta-ease),
    box-shadow var(--home-cta-duration) var(--home-cta-ease),
    transform var(--home-cta-duration) var(--home-cta-ease);
}

.home-cta:hover,
.home-cta:focus-visible {
  background-color: #f5f9ff;
  box-shadow: 0 10px 28px rgba(0, 93, 182, 0.18);
  transform: translateY(-2px);
  outline: none;
}

.home-cta__label {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: #005db6;
  transition: color var(--home-cta-duration) var(--home-cta-ease);
}

.home-cta__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  transition: transform var(--home-cta-duration) var(--home-cta-ease);
}

.home-cta:hover .home-cta__icon,
.home-cta:focus-visible .home-cta__icon {
  transform: translateX(4px);
}

.home-cta--ghost {
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
  box-shadow: none;
}

.home-cta--ghost:hover,
.home-cta--ghost:focus-visible {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.home-cta--ghost .home-cta__label {
  color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
  .home-cta,
  .home-cta__icon {
    transition: none;
  }

  .home-cta:hover,
  .home-cta:focus-visible,
  .home-cta:hover .home-cta__icon,
  .home-cta:focus-visible .home-cta__icon {
    transform: none;
  }
}


/* Business grid */
.home-section--business {
  align-items: flex-start;
  padding-top: 60px;
  /* Preserve clearance if content grows beyond the original design minimum. */
  padding-bottom: 60px;
  background-color: #12193e;
}

.home-section--business .home-section__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.home-section--business .home-section__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.1;
  pointer-events: none;
}

.home-section--business .home-section__bg-video {
  z-index: 1;
}

.home-section--business .home-section__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 74px;
  width: 100%;
  max-width: 1400px;
}

.home-section--business .home-section__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 46px;
  width: 100%;
  text-align: center;
}

.home-section--business .home-section__eyebrow {
  color: #ffffff;
}

.home-section--business .home-section__title {
  font-size: clamp(1.75rem, 2.8vw + 1rem, 3.375rem);
  line-height: 1.33;
}

.home-section--business .home-section__description {
  text-align: center;
}

.business-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.business-grid__row {
  display: flex;
  gap: 20px;
  width: 100%;
}

.business-card {
  --business-card-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --business-card-duration: 750ms;

  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  min-height: 148px;
  padding: 36px 30px;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(11px);
  overflow: hidden;
  transition:
    background-color var(--business-card-duration) var(--business-card-ease),
    backdrop-filter var(--business-card-duration) var(--business-card-ease);
}

@media (hover: hover) {
  .business-card:hover,
  .business-card:focus-visible {
    background-color: #005db6;
    backdrop-filter: none;
    outline: none;
  }

  .business-card:hover .business-card__action,
  .business-card:focus-visible .business-card__action {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

.business-card:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 2px;
}

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

.business-card__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.33;
  color: #ffffff;
}

.business-card__subtitle {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.33;
  color: rgba(255, 255, 255, 0.8);
}

.business-card__action {
  position: absolute;
  top: 50%;
  right: 30px;
  width: 40px;
  height: 40px;
  opacity: 0;
  transform: translateY(-50%) scale(0.92);
  transition:
    opacity var(--business-card-duration) var(--business-card-ease),
    transform var(--business-card-duration) var(--business-card-ease);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .business-card,
  .business-card__action {
    transition: none;
  }

  .home-section--business .home-section__bg-video {
    display: none;
  }
}

/* R&D closing section */
.home-section--rnd {
  flex-direction: column;
  gap: 60px;
  padding-top: 60px;
  background-color: #000000;
}

.home-section--rnd .home-section__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  pointer-events: none;
}

.home-section--rnd .home-section__bg-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
}

.home-section--rnd .home-section__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 80px;
  width: 100%;
  max-width: 920px;
}

.hero__title-break,
.home-section__title-break {
  display: inline;
}

/* --- Desktop zoom lock ---
   Browser zoom-out keeps the 1080px sections at their CSS size, so on screen
   the sections and their cover backgrounds shrink. home.js sets
   --home-zoom-lock on <html> to 1 / zoom (only for a detected desktop
   zoom-out). The section minimum height is multiplied by it (see the
   min-width: 1200px block too), so each section keeps its 100% on-screen
   height, and its image/video (sized to the section) keeps its 100% size.
   Foreground content keeps following the browser zoom.
   Without the variable (no JS, other browsers, mobile, 100%, zoom-in) the
   factor is 1 and every rule below computes exactly the original value. */
@media (min-width: 1024px) {
  .home-section {
    min-height: calc(1080px * var(--home-zoom-lock, 1));
  }

  /* Zoomed-out content is shorter than its locked section; centre it like
     the other sections instead of leaving the space only below it. */
  :root[data-home-zoom-lock] .home-section--business {
    align-items: center;
  }

  /* A window that is 1024-1439px wide at 100% can exceed 1440 CSS px when
     zoomed out. Keep that window's original About art direction. */
  :root[data-home-zoom-lock="compact"] .home-section--about {
    --about-bg-left: -26%;
    --about-bg-width: 112%;
    --about-bg-position: 4% top;
  }
}

/* --- Responsive (Home) --- */

@media (max-width: 1439px) {
  .home-section__progress {
    left: 48px;
  }

  .home-section--about {
    --about-bg-left: -26%;
    --about-bg-width: 112%;
    --about-bg-position: 4% top;
  }

  .home-section--about .home-section__inner {
    gap: 64px;
    padding: 140px 0 120px;
  }

  .home-section__heading-group {
    gap: 36px;
  }

  .home-section--business .home-section__inner {
    gap: 56px;
  }
}

@media (max-width: 1023px) {
  .home-section {
    min-height: auto;
    padding: 88px 20px;
  }

  .hero {
    min-height: max(560px, calc(100svh - var(--home-header-offset)));
    padding-bottom: 64px;
  }

  .home-section__progress {
    left: 20px;
    bottom: 28px;
    gap: 14px;
    width: 64px;
  }

  .home-progress__bar {
    width: 32px;
  }

  .home-progress__bar.is-active {
    width: 64px;
  }

  .home-section--about {
    --about-bg-left: -20%;
    --about-bg-top: -2%;
    --about-bg-width: 108%;
    --about-bg-height: 106%;
    --about-bg-position: 10% 38%;
  }

  .home-section--about .home-section__inner {
    padding: 0;
    gap: 48px;
  }

  .home-section--business {
    align-items: stretch;
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .home-section--business .home-section__inner {
    gap: 40px;
  }

  .home-section--business .home-section__header {
    gap: 32px;
  }

  .home-section--rnd {
    padding-top: 56px;
    padding-bottom: 56px;
    gap: 40px;
  }

  .home-section--rnd .home-section__inner {
    gap: 48px;
  }

  .business-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .business-grid__row {
    display: contents;
  }

  .business-card {
    min-height: 120px;
    padding: 28px 24px;
    padding-right: 56px;
  }

  .business-card__title {
    font-size: 20px;
  }
}

@media (max-width: 767px) {
  .home-section {
    padding: 72px 16px;
  }

  .home-section--about {
    --about-bg-left: -14%;
    --about-bg-top: -1%;
    --about-bg-width: 102%;
    --about-bg-height: 112%;
    --about-bg-position: 6% 42%;
  }

  .hero {
    min-height: max(520px, calc(100svh - var(--home-header-offset)));
  }

  .hero__content {
    gap: 28px;
    padding: 0;
  }

  .hero__title-break,
  .home-section__title-break {
    display: none;
  }

  .home-section__heading-group {
    gap: 24px;
  }

  .home-section__eyebrow {
    font-size: 18px;
  }

  .home-section__progress {
    display: none;
  }

  .business-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .business-card {
    min-height: 108px;
    padding: 24px 20px;
    padding-right: 52px;
  }

  .business-card__title {
    font-size: 18px;
  }

  .business-card__subtitle {
    font-size: 14px;
  }

  .business-card__action {
    right: 20px;
    width: 36px;
    height: 36px;
  }

  .home-cta {
    gap: 20px;
    min-height: 48px;
    padding: 8px 8px 8px 24px;
  }

  .home-cta__icon {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 429px) {
  .home-section {
    padding: 64px 16px;
  }

  .home-section--about {
    --about-bg-left: -10%;
    --about-bg-width: 100%;
    --about-bg-height: 115%;
    --about-bg-position: 4% 46%;
  }

  .hero__subtitle {
    font-size: 1rem;
  }
}

@media (min-width: 1200px) {
  .home-section {
    /* 1080px design height; locked to its 100% screen size on zoom-out. */
    min-height: calc(1080px * var(--home-zoom-lock, 1));
    padding-inline: 0;
  }

  .hero {
    padding-inline: 24px;
  }
}


/* 메인 비주얼 영상 추가 */
.hero__media-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

.hero__media-video.is-playing {
    opacity: 1;
}

/* 기존 어두운 오버레이와 텍스트 유지 */
.hero__overlay {
    z-index: 2;
    pointer-events: none;
}

.hero__content {
    z-index: 3;
}

@media (prefers-reduced-motion: reduce) {
    .hero__media-video {
        display: none;
    }
}


/* PC 메인 섹션 화면 높이 자동 적용 */
@media (min-width: 1024px) {
    .home-section {
        min-height: 100vh;
        min-height: 100dvh;
    }
}
