/* Root `/` — 인트로배경 단일 배경 + 상단 네비 + 하단 진입 카드 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.intro-page {
  margin: 0;
  min-height: 100vh;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: #0b1f44;
  background-color: #f4f7fb;
  background-image: url("/static/images/intro-background.png");
  background-repeat: no-repeat;
  background-position: calc(50% - 1vw) -39vh;
  background-size: 109.73% auto;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ----- 상단 네비게이션 ----- */
.intro-header {
  position: sticky;
  top: 0;
  z-index: 20;
  flex-shrink: 0;
  padding: 0.65rem clamp(1rem, 3vw, 2rem) 0;
}

.intro-header__shell {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  height: clamp(72px, 8vh, 84px);
  padding: 0 clamp(1rem, 2.5vw, 1.75rem);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(11, 31, 68, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.brand-header,
.redribbon-brand-lockup,
.rr-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-header__logo,
.rr-brand-logo,
.redribbon-brand-lockup__symbol {
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-header__text,
.redribbon-brand-lockup__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.12rem;
  min-width: 0;
}

.brand-header__title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.2rem 0.45rem;
  line-height: 1.15;
}

.brand-header__ko {
  font-weight: 800;
  color: #0b1f44;
  letter-spacing: -0.02em;
}

.brand-header__en {
  font-weight: 700;
  color: #5a6b85;
  letter-spacing: 0.05em;
}

.intro-brand-lockup.brand-header {
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.intro-brand-lockup .brand-header__logo,
.intro-brand-lockup .rr-brand-logo {
  width: 2.5rem;
  height: 2.5rem;
  max-width: 2.5rem;
}

.intro-brand-lockup .brand-header__title {
  font-size: 0.95rem;
  line-height: 1.2;
}

.intro-brand-lockup .brand-header__en {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.intro-brand-lockup .brand-header__subtitle {
  font-size: 0.68rem;
  color: #5c6578;
  white-space: nowrap;
}

.intro-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 1.75rem;
}

.intro-nav__link {
  font-size: 0.92rem;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  padding: 0.35rem 0.15rem;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}

.intro-nav__link:hover {
  color: #0b1f44;
  background: rgba(11, 31, 68, 0.05);
}

.intro-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  min-height: 2.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0b1f44;
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(11, 31, 68, 0.14);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(11, 31, 68, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.intro-login:hover {
  border-color: rgba(11, 31, 68, 0.22);
  box-shadow: 0 4px 14px rgba(11, 31, 68, 0.1);
  transform: translateY(-1px);
}

.intro-login__icon {
  flex-shrink: 0;
  opacity: 0.75;
}

/* ----- 메인 · 카드 (배경 비주얼 아래 배치) ----- */
.intro-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(18vh, 26vh, 30vh) clamp(1.25rem, 4vw, 2.5rem) clamp(1.75rem, 4vh, 2.5rem);
  gap: clamp(0.75rem, 2vh, 1.25rem);
}

.intro-hero-copy {
  width: 100%;
  max-width: 38rem;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
  transform: translate(calc(-5 * 1vw), calc(-3 * 1vh));
}

.intro-tagline {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: #1e3358;
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.85);
}

.intro-tagline-sub {
  margin: 0.45rem 0 0;
  font-size: clamp(0.8rem, 1.35vw, 0.9rem);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: #475569;
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.9);
}

.intro-cards-hint {
  margin: 0 auto 0.65rem;
  max-width: 1180px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.4;
  color: #64748b;
  letter-spacing: -0.01em;
}

.intro-cards {
  width: 100%;
}

.intro-cards__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.75rem);
  max-width: 1180px;
  margin: 0 auto;
}

.intro-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 100%;
  padding: clamp(0.95rem, 1.6vw, 1.2rem) clamp(1.1rem, 2vw, 1.35rem);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  box-shadow:
    0 4px 6px rgba(11, 31, 68, 0.04),
    0 14px 40px rgba(11, 31, 68, 0.09);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.intro-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 8px 12px rgba(11, 31, 68, 0.06),
    0 20px 48px rgba(11, 31, 68, 0.12);
}

.intro-card__head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin-bottom: 0.45rem;
}

.intro-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
}

.intro-card__icon--customer {
  color: #b91c3a;
  background: linear-gradient(145deg, #fff5f6 0%, #ffe8ec 100%);
}

.intro-card__icon--hospital {
  color: #1d4ed8;
  background: linear-gradient(145deg, #f0f7ff 0%, #e0edff 100%);
}

.intro-card__icon--admin {
  color: #6d28d9;
  background: linear-gradient(145deg, #f7f3ff 0%, #ede5ff 100%);
}

.intro-card__title {
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0b1f44;
  line-height: 1.25;
}

.intro-card__desc {
  margin: 0 0 0.85rem;
  flex: 1;
  font-size: 0.84rem;
  line-height: 1.48;
  color: #5c6578;
}

.intro-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 48px;
  padding: 0.55rem 1.1rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 13px;
  box-shadow: 0 6px 20px rgba(11, 31, 68, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.intro-card__btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 10px 28px rgba(11, 31, 68, 0.18);
}

.intro-card__btn:active {
  transform: translateY(0);
}

.intro-card__btn--customer {
  background: linear-gradient(135deg, #d63a52 0%, #b91c3a 55%, #9e1832 100%);
}

.intro-card__btn--hospital {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%);
}

.intro-card__btn--admin {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 55%, #6d28d9 100%);
}

.intro-card__btn-arrow {
  flex-shrink: 0;
  opacity: 0.92;
}

.intro-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: clamp(1.15rem, 2.5vh, 1.65rem) auto 0;
  max-width: 36rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #64748b;
  text-align: center;
}

.intro-trust__icon {
  flex-shrink: 0;
  color: #94a3b8;
}

/* ----- 모바일 전용 히어로 (데스크톱 숨김) ----- */
.intro-hero-mobile {
  display: none;
}

.intro-hero-badge {
  display: inline-block;
  margin: 0 0 0.65rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #c5162e;
  background: rgba(255, 245, 246, 0.95);
  border: 1px solid rgba(197, 22, 46, 0.15);
  border-radius: 999px;
}

.intro-hero-title {
  margin: 0;
  font-size: clamp(1.45rem, 6.2vw, 1.75rem);
  font-weight: 800;
  line-height: 1.32;
  letter-spacing: -0.03em;
  color: #0b1f44;
}

.intro-hero-title__accent {
  color: #b91c3a;
}

.intro-hero-lead {
  margin: 0.65rem 0 0;
  font-size: clamp(0.9rem, 3.8vw, 1rem);
  font-weight: 500;
  line-height: 1.6;
  color: #475569;
}

.intro-hero-lead--short {
  display: none;
}

.intro-hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}

.intro-hero-pill {
  padding: 0.35rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  color: #1e3358;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(11, 31, 68, 0.1);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(11, 31, 68, 0.05);
}

.intro-mvp-note {
  display: none;
}

.intro-card__desc--mobile {
  display: none;
}

.intro-nav__link--desktop {
  /* visible on desktop by default */
}

/* ----- 반응형 ----- */
@media (min-width: 1441px) {
  .intro-page {
    background-size: 109.73% auto;
  }
}

@media (max-width: 1024px) {
  .intro-page {
    background-size: 109.73% auto;
    background-position: calc(50% - 1vw) -27vh;
  }

  .intro-header__shell {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    height: auto;
    min-height: 72px;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .intro-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 0.35rem 1.25rem;
    padding-top: 0.25rem;
  }

  .intro-login {
    justify-self: end;
  }

  .intro-main {
    padding-top: clamp(18vh, 26vh, 32vh);
  }

  .intro-cards__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-card--admin {
    grid-column: 1 / -1;
    max-width: 26rem;
    justify-self: center;
    width: 100%;
  }
}

@media (max-width: 768px) {
  /* ----- 메인 인트로(/) 모바일 전면 개선 ----- */
  .intro-page {
    background-color: #f6f9fc;
    background-image:
      linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.96)),
      url("/static/images/intro-background.png");
    background-repeat: no-repeat;
    background-position: top center;
    background-size: auto 320px;
  }

  /* 헤더: 1줄 compact — 로고 + 서비스 소개만 */
  .intro-page .intro-header {
    padding: 0;
  }

  .intro-page .intro-header__shell {
    width: calc(100% - 28px);
    max-width: none;
    margin: 12px auto 0;
    padding: 10px 14px;
    border-radius: 18px;
    min-height: 0;
    height: auto;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
  }

  .intro-page .intro-brand-lockup {
    flex: 1;
    min-width: 0;
    max-width: none;
  }

  .intro-page .intro-brand-lockup .brand-header__logo,
  .intro-page .intro-brand-lockup .rr-brand-logo {
    width: 40px;
    height: 40px;
    max-width: 40px;
  }

  .intro-page .intro-brand-lockup .brand-header__title {
    font-size: 0.82rem;
    line-height: 1.15;
    gap: 0.12rem 0.3rem;
    flex-wrap: nowrap;
  }

  .intro-page .intro-brand-lockup .brand-header__en {
    font-size: 0.62rem;
    letter-spacing: 0.03em;
  }

  .intro-page .intro-brand-lockup .brand-header__subtitle {
    display: none;
  }

  .intro-page .intro-login {
    display: none;
  }

  .intro-page .intro-nav {
    flex-shrink: 0;
    display: flex;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .intro-page .intro-nav__link--desktop {
    display: none;
  }

  .intro-page .intro-nav__link {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.55rem;
    white-space: nowrap;
    border-radius: 8px;
    background: rgba(11, 31, 68, 0.04);
  }

  /* 메인 레이아웃 */
  .intro-page .intro-main {
    justify-content: flex-start;
    padding: 0.65rem 0.875rem 1.25rem;
    gap: 0.55rem;
  }

  .intro-page .intro-hero-desktop {
    display: none;
  }

  .intro-page .intro-hero-mobile {
    display: block;
  }

  .intro-page .intro-hero-copy {
    transform: none;
    max-width: none;
    margin: 0;
    padding: 1rem 1.05rem;
    text-align: left;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(11, 31, 68, 0.07);
    border-radius: 20px;
    box-shadow: 0 8px 28px rgba(11, 31, 68, 0.06);
  }

  .intro-page .intro-hero-lead--long {
    display: none;
  }

  .intro-page .intro-hero-lead--short {
    display: block;
  }

  .intro-page .intro-hero-pills {
    justify-content: flex-start;
  }

  .intro-page .intro-mvp-note {
    display: block;
    margin: 0;
    padding: 0.85rem 1rem;
    font-size: 0.78rem;
    line-height: 1.55;
    color: #475569;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(11, 31, 68, 0.08);
    border-left: 3px solid #c5162e;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(11, 31, 68, 0.04);
  }

  .intro-page .intro-mvp-note p {
    margin: 0;
  }

  .intro-page .intro-mvp-note p + p {
    margin-top: 0.45rem;
  }

  .intro-page .intro-mvp-note strong {
    color: #0b1f44;
    font-weight: 700;
  }

  .intro-page .intro-mvp-note__tech {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
  }

  .intro-page .intro-cards-hint {
    margin-bottom: 0.35rem;
    font-size: 0.74rem;
    text-align: left;
  }

  .intro-page .intro-cards__grid {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: none;
    width: 100%;
  }

  .intro-page .intro-card {
    width: 100%;
    padding: 22px 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(11, 31, 68, 0.08);
    box-shadow: 0 6px 24px rgba(11, 31, 68, 0.07);
  }

  .intro-page .intro-card--admin {
    grid-column: auto;
    max-width: none;
  }

  .intro-page .intro-card__desc--desktop {
    display: none;
  }

  .intro-page .intro-card__desc--mobile {
    display: block;
  }

  .intro-page .intro-card__desc {
    margin-bottom: 0.85rem;
    font-size: 0.86rem;
    line-height: 1.55;
    color: #5c6578;
  }

  .intro-page .intro-card__title {
    font-size: 1.08rem;
  }

  .intro-page .intro-card__btn {
    min-height: 54px;
    font-size: 0.92rem;
    padding: 0.65rem 1rem;
    border-radius: 14px;
  }

  .intro-page .intro-trust {
    margin-top: 0.65rem;
    font-size: 0.72rem;
    text-align: left;
    justify-content: flex-start;
  }
}

@media (max-width: 400px) {
  .intro-page .intro-hero-pill {
    font-size: 0.68rem;
    padding: 0.3rem 0.55rem;
  }

  .intro-page .intro-nav__link {
    font-size: 0.72rem;
    padding: 0.3rem 0.45rem;
  }
}
