* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-family-base);
}

body,
button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 0 0 clamp(4px, 1vw, 12px);
  background:
    linear-gradient(180deg, rgba(244, 247, 249, 0.92), rgba(255, 255, 255, 0.98) 84%, rgba(250, 248, 243, 0.72)),
    var(--color-background-soft);
}

.hero__inner {
  position: relative;
  display: grid;
  width: 100%;
  margin: 0 auto;
}

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

.hero__banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #eef2f5;
}

.hero__banner::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(45, 56, 68, 0.08));
  content: "";
}

.hero__slides {
  position: relative;
  display: grid;
  width: 100%;
  /* 완성형 hero 이미지는 crop하면 안 되므로 max-height로 자르지 않는다.
     hero 높이를 더 줄이려면 CSS가 아니라 더 와이드한 원본 비율로 제작해야 한다. */
  aspect-ratio: 1920 / 720;
  isolation: isolate;
}

.hero__picture {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
  transition:
    opacity 900ms ease,
    visibility 0s linear 900ms;
}

.hero__picture.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
  transition-delay: 0s;
}

.hero__picture.is-error {
  opacity: 0;
  visibility: hidden;
}

.hero__banner-image {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
}

.hero__slider-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(200, 164, 93, 0.24);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.66);
  color: #8f6c2f;
  box-shadow: 0 14px 34px rgba(34, 34, 34, 0.12);
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
}

.hero__slider-arrow:hover {
  border-color: rgba(200, 164, 93, 0.42);
  background: rgba(255, 255, 255, 0.88);
  transform: translateY(-50%) scale(1.02);
}

.hero__slider-arrow:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.hero__slider-arrow span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family-en);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-1px);
}

.hero__slider-arrow--prev {
  left: clamp(12px, 1.8vw, 28px);
}

.hero__slider-arrow--next {
  right: clamp(160px, 12vw, 188px);
}

.hero__slider-dots {
  position: absolute;
  right: 0;
  bottom: clamp(14px, 2vw, 24px);
  left: 0;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}

.hero__slider-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 5px rgba(42, 36, 28, 0.18);
  cursor: pointer;
  pointer-events: auto;
}

.hero__slider-dot.is-active {
  width: 22px;
  background: var(--color-gold);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 1100px) {
  .hero__slider-arrow--next {
    right: clamp(18px, 2.4vw, 32px);
  }
}

@media (max-width: 900px) {
  .home-page {
    background: #f8f1e7;
    color-scheme: light;
  }

  .home-page .fionique-main,
  .home-page main {
    background: #f8f1e7;
  }

  .hero {
    padding-bottom: var(--spacing-5);
    background: #f8f1e7;
  }

  .hero__inner {
    width: 100%;
    background: #f8f1e7;
  }

  .hero__banner,
  .hero__slides {
    background: #f8f1e7;
  }

  .hero__slides {
    min-height: clamp(240px, 40vw, 360px);
    aspect-ratio: auto;
  }

  .hero__picture,
  .hero__banner-image {
    width: 100%;
    height: auto;
  }

  .hero__banner-image {
    object-fit: contain;
    object-position: center center;
  }

  .hero__slider-arrow {
    top: 50%;
    width: 44px;
    height: 44px;
  }

  .hero__slider-arrow span {
    font-size: 28px;
  }

  .hero__slider-arrow--prev {
    left: var(--spacing-4);
  }

  .hero__slider-arrow--next {
    right: var(--spacing-4);
  }
}

@media (max-width: 640px) {
  .hero {
    padding-bottom: var(--spacing-4);
  }

  .hero__slider-arrow {
    top: 50%;
    width: 38px;
    height: 38px;
  }

  .hero__slider-arrow span {
    font-size: 24px;
  }
}

/* 메인 hero 시각 기준 통일 */
.hero {
  background:
    linear-gradient(180deg, rgba(251, 250, 247, 0.92), rgba(255, 255, 255, 0.98) 84%, rgba(247, 241, 230, 0.74)),
    var(--color-bg);
}

.hero__banner {
  background: var(--color-ivory);
}

.hero__slider-arrow {
  border-color: var(--color-border-soft);
  background: rgba(255, 255, 255, 0.78);
  color: var(--color-gold-dark);
  box-shadow: var(--shadow-card);
}

@media (max-width: 767px) {
  .home-page main {
    display: flex;
    flex-direction: column;
  }

  .home-page .hero {
    order: 1;
  }

  .home-page .program--home {
    order: 2;
  }

  .home-page .home-care-video-band {
    order: 3;
  }

  .home-page .review-preview {
    order: 4;
  }

  .home-page .home-blog-review {
    order: 5;
  }

  .home-page .event-preview--home {
    order: 6;
  }

  .home-page .location {
    order: 7;
  }

  .home-page .home-homecare {
    order: 8;
  }

  .hero {
    padding-bottom: 0;
  }

  .hero__banner {
    touch-action: pan-y;
  }

  .hero__slides {
    min-height: 0;
    aspect-ratio: 1122 / 1402;
  }

  .hero__banner-image {
    aspect-ratio: 1122 / 1402;
    object-fit: cover;
  }

  .hero__slider-dots {
    display: flex;
  }

  .hero__slider-arrow {
    width: 34px;
    height: 34px;
  }
}
