html {
  overflow-x: clip;
  overflow-y: auto;
  width: 100%;
}

body {
  overflow-x: clip;
  position: relative;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
}

main {
  overflow-x: clip;
  width: 100%;
  position: relative;
}

/* CTA button — continuous left → right primary fill */
.btn-cta {
  --cta-fill: #628AD1;
  --cta-icon-ms: 0.08s;
  --cta-text-ms: 0.14s;
  display: inline-flex;
  width: fit-content;
  align-items: stretch;
  gap: 4px;
  overflow: hidden;
}

.btn-cta > span {
  position: relative;
  z-index: 0;
  overflow: hidden;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.btn-cta > span::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--cta-fill);
  transform: scaleX(0);
  transform-origin: left center;
}

/* leave: text clears first, then icon — continuous R → L */
.btn-cta > span:first-child::before {
  transition: transform var(--cta-icon-ms) linear var(--cta-text-ms);
}

.btn-cta > span:last-child::before {
  transition: transform var(--cta-text-ms) linear 0s;
}

/* enter: icon fills first, then text — continuous L → R */
.btn-cta:hover > span:first-child::before {
  transform: scaleX(1);
  transition: transform var(--cta-icon-ms) linear 0s;
}

.btn-cta:hover > span:last-child::before {
  transform: scaleX(1);
  transition: transform var(--cta-text-ms) linear var(--cta-icon-ms);
}

.btn-cta:hover > span {
  color: #ffffff;
  border-color: var(--cta-fill);
  background-color: transparent;
}

.btn-cta .btn-cta-icon {
  transition: filter 0.2s ease;
  transition-delay: 0s;
}

.btn-cta:hover .btn-cta-icon {
  filter: brightness(0) invert(1);
  transition-delay: 0s;
}

/* Arrow link — white top line fills L → R on hover */
.link-arrow-line {
  position: relative;
}

.link-arrow-line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  background-color: #ffffff;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

a.link-arrow-line:hover::before,
a:hover > .link-arrow-line::before,
a:hover .link-arrow-line::before,
.group:hover > .link-arrow-line::before,
.group:hover .link-arrow-line::before {
  transform: scaleX(1);
}

/* Reason slider — title과 동일한 왼쪽 시작점 */
.reason-slider-track {
  --reason-pad: 1rem;
  display: flex;
  gap: 1rem;
  width: max-content;
  padding-left: var(--reason-pad);
  padding-right: var(--reason-pad);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.reason-slider-track.is-dragging {
  cursor: grabbing;
  transition: none;
  touch-action: none;
}

.reason-slider-track img,
.reason-slider-track a {
  -webkit-user-drag: none;
  user-select: none;
}

.reason-slide {
  scroll-snap-align: start;
}

@media (min-width: 1024px) {
  .reason-slider-track {
    --reason-pad: max(0px, calc((100vw - 1600px) / 2));
    padding-right: 0;
  }
}

/* Hero — gradient overlay drift */
.hero-gradient-overlay {
  background: linear-gradient(
    165deg,
    #34599c 0%,
    #4a72b8 28%,
    #8a8a9a 55%,
    #b5aa9f 78%,
    #34599c 100%
  );
  background-size: 220% 220%;
  animation: hero-gradient-flow 14s ease-in-out infinite;
}

@keyframes hero-gradient-flow {
  0%,
  100% {
    background-position: 0% 20%;
    opacity: 0.92;
  }
  50% {
    background-position: 100% 80%;
    opacity: 1;
  }
}

/* Hero — bright line sweep L → R */
.hero-line-track {
  overflow: hidden;
}

.hero-line-sweep {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 36%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 25%,
    rgba(255, 255, 255, 1) 50%,
    rgba(255, 255, 255, 0.35) 75%,
    transparent 100%
  );
  animation: hero-line-sweep 2.8s linear infinite;
}

@keyframes hero-line-sweep {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(380%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-gradient-overlay,
  .hero-line-sweep {
    animation: none;
  }

  .hero-gradient-overlay {
    background: linear-gradient(to bottom, #34599c, #b5aa9f);
    background-size: auto;
    opacity: 1;
  }

  .hero-line-sweep {
    display: none;
  }
}

