/* ==========================================================================
   Front Page — MediHive
   ========================================================================== */

@font-face {
  font-family: 'Gmarket Sans';
  src: url('../fonts/GmarketSansTTFBold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-primary: #014fdc;
  --color-accent: #fed32e;
  --color-text: #111;
  --color-text-muted: #666;
  --color-text-soft: #444;
  --container: 1320px;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 0 40px;
  overflow: hidden;
  color: var(--color-text);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: url('../images/hero-bg.png') center / cover no-repeat;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
}

.hero__title {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 26px;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.hero__desc {
  margin: 0;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.65;
  color: #333;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 48px;
  z-index: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-primary);
  text-decoration: none;
}

/* Problems */

.problems {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 80px 0 120px;
  background: #fff;
}

.problems__grid-bg {
  position: absolute;
  inset: 0;
  background: url('../images/grid-bg.png') center bottom / cover no-repeat;
  opacity: 0.35;
  pointer-events: none;
}

.problems__cards {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.problems__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px;
}

.problem-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 352px;
  padding: 40px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 8px 8px 15px rgb(0 0 0 / 6%);
}

.problem-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.problem-card__phase {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: var(--color-accent);
  border-radius: 100px;
  font-size: 16px;
  font-weight: 700;
  color: #000;
  white-space: nowrap;
}

.problem-card__icon {
  display: block;
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.problem-card__title {
  margin: 0 0 12px;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.problem-card__desc {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.problems__marquee {
  overflow: hidden;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  pointer-events: none;
  user-select: none;
}

.problems__marquee-track {
  display: flex;
  width: max-content;
  animation: problems-marquee 40s linear infinite;
}

.problems__marquee-text {
  flex-shrink: 0;
  padding-right: 0.5em;
  font-family: 'Gmarket Sans', sans-serif;
  font-size: clamp(48px, 6.25vw, 80px);
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  color: transparent;
  background: url('../images/problems-marquee-gradient.png') center / cover no-repeat;
  background-clip: text;
  -webkit-background-clip: text;
}

@keyframes problems-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .problems__marquee-track {
    animation: none;
  }
}

/* Solution */

.solution {
  position: relative;
  overflow: hidden;
  padding: 100px 0 160px;
  background: linear-gradient(180deg, #fff 0%, #c1dcf6 100%);
}

.solution__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  max-width: 760px;
  margin: 0 auto 100px;
  text-align: center;
}

.solution__title {
  margin: 0;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.solution__title-accent {
  color: var(--color-primary);
}

.compare {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto 100px;
  border-radius: 16px;
  aspect-ratio: 1280 / 620;
  user-select: none;
  touch-action: none;
}

.compare__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare__before {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  overflow: hidden;
}

.compare__image--before {
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: left center;
}

.compare__badge {
  position: absolute;
  top: 30px;
  z-index: 2;
  padding: 8px 14px;
  background: var(--color-accent);
  border-radius: 30px;
  font-size: 20px;
  font-weight: 700;
  text-transform: capitalize;
  color: #000;
}

.compare__badge--before {
  left: 24px;
}

.compare__badge--after {
  right: 24px;
}

.compare__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: ew-resize;
}

.compare__handle img {
  display: block;
  width: 100%;
  height: 100%;
}

.benefits {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.benefits__track {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.benefits__pagination {
  display: none;
}

.benefit-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 550px);
  gap: 32px;
  align-items: stretch;
  padding: 50px;
  background: #fff;
  border-radius: 20px;
}

.benefit-card__brand {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 170px;
}

.benefit-card__label {
  font-size: 24px;
  font-weight: 700;
}

.benefit-card__title {
  margin: 0 0 28px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.benefit-card__desc {
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
  color: var(--color-text-soft);
}

.benefit-card__media {
  overflow: hidden;
  border-radius: 16px;
}

.benefit-card__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.solution__marquee {
  overflow: hidden;
  margin-top: 120px;
  pointer-events: none;
  user-select: none;
}

.solution__marquee-track {
  display: flex;
  width: max-content;
  animation: solution-marquee 40s linear infinite;
}

.solution__marquee-text {
  flex-shrink: 0;
  padding-right: 0.5em;
  font-family: 'Gmarket Sans', sans-serif;
  font-size: clamp(64px, 9.375vw, 120px);
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  color: #fff;
  opacity: 0.8;
}

@keyframes solution-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .solution__marquee-track {
    animation: none;
  }
}

/* Workflow */

.workflow {
  padding: 100px 0 120px;
  background: #fff;
}

.workflow__steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 25px;
}

.workflow__connector {
  display: flex;
  align-items: center;
  padding-top: 155px;
}

.workflow__step {
  display: flex;
  position: relative;
  flex: 0 0 360px;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.workflow__media {
  width: 360px;
  height: 360px;
  overflow: hidden;
  border-radius: 50%;
}

.workflow__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.workflow__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  bottom: 0;
  min-width: 196px;
  padding: 14px 20px;
  background: var(--color-accent);
  border-radius: 50px;
  font-size: 20px;
  font-weight: 700;
  color: #000;
}

/* CTA */

.cta {
  position: relative;
  color: #fff;
}

.cta__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgb(0 0 0 / 40%), rgb(0 0 0 / 40%)),
    url('../images/main/Frame_1707483927.webp') center / cover no-repeat;
}

.cta__grid {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}

.cta__divider {
  flex-shrink: 0;
  width: 1px;
  height: 320px;
  background: #cecece;
}

.cta-card {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  min-height: 420px;
  text-align: center;
}

.cta-card__eyebrow {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cta-card__title {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: normal;
  letter-spacing: -0.02em;
}

.cta-card__button {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 15px 24px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
}

.cta-card__button--dark {
  background: #000;
}

.cta-card__button--light {
  background: rgb(0 0 0 / 40%);
}

.cta-card__head {
  display: contents;
}

/* Footer */

body.is-front-page .site-footer {
  padding: 71px 20px;
  text-align: center;
  background: #fff;
  border-top: 0;
}

body.is-front-page .site-footer__copyright {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
}

/* Responsive — Tablet (768–1199px): PC·모바일 중간 폰트) */

@media (min-width: 768px) and (max-width: 1199px) {
  .hero__title {
    font-size: 33px;
  }

  .hero__desc {
    font-size: 18px;
  }

  .problems {
    padding: 70px 0 100px;
  }

  .problems__cards {
    gap: 40px;
  }

  .problem-card {
    padding: 32px;
    min-height: 300px;
  }

  .problem-card__phase {
    font-size: 15px;
  }

  .problem-card__icon {
    width: 65px;
    height: 65px;
  }

  .problem-card__title {
    font-size: 24px;
  }

  .problem-card__desc {
    font-size: 17px;
  }

  .problems__marquee-text {
    font-size: 64px;
  }

  .solution {
    padding: 80px 0 120px;
  }

  .solution__intro {
    gap: 32px;
    margin-bottom: 70px;
  }

  .solution__title {
    font-size: 26px;
  }

  .compare__badge {
    font-size: 17px;
  }

  .benefit-card {
    padding: 40px;
  }

  .benefit-card__brand {
    margin-bottom: 80px;
  }

  .benefit-card__label {
    font-size: 20px;
  }

  .benefit-card__title {
    font-size: 26px;
    margin-bottom: 20px;
  }

  .benefit-card__desc {
    font-size: 16px;
  }

  .solution__marquee {
    margin-top: 80px;
  }

  .solution__marquee-text {
    font-size: 90px;
  }

  .workflow {
    padding: 80px 0 100px;
  }

  .workflow__step,
  .workflow__media {
    flex: 0 0 300px;
    width: 300px;
    height: 300px;
  }

  .workflow__label {
    font-size: 19px;
    padding: 13px 18px;
  }

  .cta-card__eyebrow {
    font-size: 17px;
  }

  .cta-card__title {
    font-size: 36px;
  }

  .cta-card {
    min-height: 340px;
  }

  body.is-front-page .site-footer {
    padding: 50px 20px;
  }

  body.is-front-page .site-footer__copyright {
    font-size: 14px;
  }
}

/* Responsive — Layout (≤1199px) */

@media (max-width: 1199px) {
  .problems__row,
  .benefit-card {
    grid-template-columns: 1fr;
  }

  .benefit-card__brand {
    margin-bottom: 32px;
  }

  .workflow__steps {
    flex-direction: column;
    align-items: center;
  }

  .workflow__connector {
    padding-top: 0;
    transform: rotate(90deg);
  }
}

@media (max-width: 900px) {
  .problems__row {
    grid-template-columns: 1fr;
  }

  .cta__grid {
    flex-direction: column;
  }

  .cta__divider {
    display: none;
  }

  .cta-card {
    min-height: auto;
  }

}

/* Responsive — Mobile (≤767px, Figma mobile_360) */

@media (max-width: 767px) {
	.hero {
		min-height: unset;
		aspect-ratio: 360 / 640;
		width: 100%;
		padding: 120px 20px 40px;
		justify-content: flex-start;
		box-sizing: border-box;
	}

	.hero__bg {
		background: url('../images/main/mo-main.webp') bottom center / cover no-repeat;
	}

  .hero__content {
    max-width: 320px;
  }

  .hero__title {
    gap: 0;
    margin-bottom: 18px;
    font-size: 22px;
    line-height: 1.4;
    letter-spacing: -0.02em;
  }

  .hero__desc {
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: -0.02em;
  }

  .hero__scroll {
    display: none;
  }

  .problems {
    padding: 60px 0 80px;
  }

  .problems__cards {
    gap: 12px;
  }

  .problems__row {
    gap: 12px;
  }

  .problem-card {
    min-height: 262px;
    padding: 24px;
    box-shadow: 8px 8px 30px rgb(0 0 0 / 6%);
  }

  .problem-card__phase {
    padding: 8px 16px;
    font-size: 14px;
  }

  .problem-card__icon {
    width: 60px;
    height: 60px;
  }

  .problem-card__body {
    margin-top: auto;
    padding-top: 16px;
  }

  .problem-card__title {
    margin-bottom: 15px;
    font-size: 24px;
  }

  .problem-card__desc {
    font-size: 16px;
    line-height: 1.5;
  }

  .problems__marquee-text {
    font-size: 60px;
  }

  .solution {
    padding: 80px 0 100px;
  }

  .solution__intro {
    gap: 24px;
    max-width: 320px;
    margin-bottom: 48px;
  }

  .solution__quote {
    width: 16px;
    height: 17px;
  }

  .solution__title {
    font-size: 22px;
    line-height: 1.55;
  }

  .compare {
    max-width: 320px;
    margin-bottom: 48px;
    border-radius: 10px;
    aspect-ratio: auto;
    height: 420px;
  }

  .compare.is-vertical .compare__before {
    width: 100%;
    height: 50%;
  }

  .compare.is-vertical .compare__image--before {
    width: 100%;
    height: 420px;
    object-position: top center;
  }

  .compare.is-vertical .compare__handle {
    width: 42px;
    height: 42px;
    transform: translate(-50%, -50%) rotate(90deg);
    cursor: ns-resize;
  }

  .compare.is-vertical .compare__handle img {
    width: 42px;
    height: 42px;
  }

  .compare__badge {
    top: 16px;
    padding: 6px 12px;
    font-size: 14px;
  }

  .compare__badge--before {
    left: 12px;
  }

  .compare__badge--after {
    top: calc(50% + 16px);
    bottom: auto;
    right: auto;
    left: 12px;
  }

  .benefits {
    gap: 16px;
    margin: 0 -20px;
  }

  .benefits__track {
    flex-direction: row;
    gap: 12px;
    padding: 0 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .benefits__track::-webkit-scrollbar {
    display: none;
  }

  .benefit-card {
    display: flex;
    flex: 0 0 280px;
    flex-direction: column;
    gap: 24px;
    padding: 24px 20px;
    border-radius: 12px;
    box-shadow: 10px 6px 10px rgb(0 0 0 / 2%);
    scroll-snap-align: center;
  }

  .benefit-card__brand {
    margin-bottom: 0;
  }

  .benefit-card__brand img {
    width: 24px;
    height: 24px;
  }

  .benefit-card__label {
    font-size: 16px;
  }

  .benefit-card__content {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  .benefit-card__title {
    margin-bottom: 12px;
    font-size: 22px;
  }

  .benefit-card__desc {
    font-size: 15px;
    line-height: 1.67;
  }

  .benefit-card__media {
    border-radius: 12px;
  }

  .benefit-card__image {
    min-height: 170px;
    height: 170px;
  }

  .benefits__pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
  }

  .benefits__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d9d9d9;
    transition: background 0.2s;
  }

  .benefits__dot.is-active {
    background: var(--color-primary);
  }

  .solution__marquee {
    margin-top: 60px;
  }

  .solution__marquee-text {
    font-size: 70px;
  }

  .workflow {
    padding: 60px 0 80px;
  }

  .workflow__steps {
    gap: 0;
  }

  .workflow__step {
    flex: none;
    width: 300px;
  }

  .workflow__media {
    width: 300px;
    height: 300px;
  }

  .workflow__connector {
    padding: 20px 0;
    transform: none;
  }

  .workflow__connector img {
    width: 44px;
    height: 44px;
    transform: rotate(90deg);
  }

  .workflow__label {
    min-width: 196px;
    padding: 13px 16px;
    font-size: 18px;
  }

  .cta__grid {
    padding: 0;
  }

  .cta__bg {
    display: none;
  }

  .cta-card {
    position: relative;
    width: 100%;
    min-height: 260px;
    gap: 24px;
    padding: 40px 20px;
    overflow: hidden;
  }

  .cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
      linear-gradient(rgb(0 0 0 / 40%), rgb(0 0 0 / 40%)),
      url('../images/main/Frame_1707483927.webp') center / cover no-repeat;
  }

  .cta-card--medicare::before {
    background:
      linear-gradient(rgb(0 0 0 / 40%), rgb(0 0 0 / 40%)),
      url('../images/main/Rectangle3469456.webp') center / cover no-repeat;
  }

  .cta-card--medidoc::before {
    background:
      linear-gradient(rgb(0 0 0 / 40%), rgb(0 0 0 / 40%)),
      url('../images/main/Rectangle3469457.webp') center / cover no-repeat;
  }

  .cta-card > * {
    position: relative;
    z-index: 1;
  }

  .cta-card__head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .cta-card__eyebrow {
    font-size: 17px;
  }

  .cta-card__title {
    font-size: 32px;
  }

  .cta-card__button {
    padding: 14px 24px;
  }

  body.is-front-page .site-footer {
    padding: 22px 20px;
  }

  body.is-front-page .site-footer__copyright {
    font-size: 14px;
    line-height: 1.43;
  }
}
