/* ============================================
   main.css — Placeholder Content + Utilities
   ============================================ */

/* ── Hero placeholder (shown when content is empty) ── */
.hero-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height));
  padding: var(--space-8) var(--space-6);
  text-align: center;
  gap: var(--space-6);
}

.hero-char {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-full);
  /* Dig의 시그니체어 터쿼이즈 배경색으로 통일 */
  background-color: var(--color-primary);
  box-shadow:
    0 0 0 4px rgba(45, 223, 200, 0.25),
    0 16px 48px rgba(45, 223, 200, 0.35);
  animation: heroFloat 4s ease-in-out infinite;
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%       { transform: translateY(-12px) rotate(2deg); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: var(--color-primary);
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-4);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--color-dark);
  letter-spacing: 0.04em;
  box-shadow: 0 2px 12px rgba(45, 223, 200, 0.40);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 5vw, 2rem);
  font-weight: var(--weight-extrabold);
  color: var(--color-text-primary);
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.hero-title em {
  font-style: normal;
  /* Dig 민트 그라데이션 */
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, var(--color-primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 320px;
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
  max-width: 300px;
}

/* ── Pill Buttons ── */
.btn {
  height: 52px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition:
    transform var(--duration-fast) var(--ease-spring),
    box-shadow var(--duration-base) var(--ease-smooth),
    filter var(--duration-fast) var(--ease-smooth);
  position: relative;
  overflow: hidden;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.97); }

.btn--primary {
  background: var(--color-primary);
  color: var(--color-dark);
  box-shadow: var(--shadow-btn);
  font-weight: var(--weight-bold);
}
.btn--primary:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 8px 28px rgba(45, 223, 200, 0.55);
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: var(--color-text-primary);
  border: 1.5px solid var(--color-border-gray);
  box-shadow: none;
}
.btn--outline:hover {
  background: var(--color-surface);
  border-color: var(--color-primary);
  color: var(--color-primary-deeper);
}

/* ── Stats row ── */
.hero-stats {
  display: flex;
  gap: var(--space-6);
  padding: var(--space-5) var(--space-6);
  /* Dig 민트 극연하게 tint된 서피스 */
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 340px;
}
.hero-stat {
  flex: 1;
  text-align: center;
}
.hero-stat__num {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-extrabold);
  color: var(--color-primary-deeper);
  letter-spacing: -0.02em;
  line-height: 1;
}
.hero-stat__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ── Home Test News Cards ── */
.home-tests {
  padding: var(--space-6) var(--space-5) var(--space-8);
}

.home-tests__header {
  margin-bottom: var(--space-5);
}

.home-tests__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  background: rgba(45, 223, 200, 0.16);
  color: var(--color-primary-deeper);
  font-size: 11px;
  font-weight: 800;
}

.home-tests__title {
  margin-top: var(--space-3);
  color: var(--color-text-primary);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: 0;
}

.home-tests__desc {
  margin-top: var(--space-2);
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.65;
  word-break: keep-all;
}

.home-card-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.home-test-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
  text-decoration: none;
}

.home-test-card[href] {
  transition:
    border-color var(--duration-fast) var(--ease-smooth),
    box-shadow var(--duration-base) var(--ease-smooth),
    transform var(--duration-base) var(--ease-spring);
}

.home-test-card[href]:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.home-test-card--disabled {
  cursor: not-allowed;
  opacity: 0.82;
}

.home-test-card__media {
  position: relative;
  aspect-ratio: 960 / 481;
  background: var(--color-surface);
  overflow: hidden;
}

.home-test-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-test-card__status {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-text-primary);
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(13, 43, 39, 0.12);
}

.home-test-card__body {
  padding: var(--space-5);
}

.home-test-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}

.home-test-card__chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  background: rgba(45, 223, 200, 0.15);
  color: var(--color-primary-deeper);
  font-size: 11px;
  font-weight: 900;
}

.home-test-card__time {
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 700;
}

.home-test-card__title {
  color: var(--color-text-primary);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0;
}

.home-test-card__copy {
  margin-top: var(--space-2);
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.65;
  word-break: keep-all;
}

.home-test-card__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-4);
  color: var(--color-primary-deeper);
  font-size: 13px;
  font-weight: 900;
}

.home-test-card__action svg {
  width: 15px;
  height: 15px;
}

.home-test-card--disabled .home-test-card__chip {
  background: rgba(122, 173, 168, 0.14);
  color: var(--color-text-muted);
}

.home-test-card--disabled .home-test-card__action {
  color: var(--color-text-muted);
}

/* ── Utility classes ── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Scroll-lock (applied to body when sidebar open) ── */
body.no-scroll {
  overflow: hidden;
}

/* ── Fade-in animation ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-in-up {
  animation: fadeInUp var(--duration-slow) var(--ease-out) both;
}
.fade-in-up:nth-child(2) { animation-delay: 80ms; }
.fade-in-up:nth-child(3) { animation-delay: 160ms; }
.fade-in-up:nth-child(4) { animation-delay: 240ms; }
.fade-in-up:nth-child(5) { animation-delay: 320ms; }
.fade-in-up:nth-child(6) { animation-delay: 400ms; }

/* ── Site Footer ── */
.site-footer {
  width: 100%;
  margin: 0;
  padding: 28px 20px calc(34px + env(safe-area-inset-bottom));
  background: #ffffff;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  text-align: center;
}

.site-footer__inner {
  width: min(760px, 100%);
  margin: 0 auto;
}

.site-footer__brand {
  display: block;
  color: var(--color-text-primary);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
}

.site-footer__desc {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.7;
  word-break: keep-all;
}

.site-footer__info {
  display: flex;
  justify-content: center;
  gap: 6px 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  color: var(--color-text-secondary);
  font-size: 11px;
  line-height: 1.7;
  word-break: keep-all;
}

.site-footer__info span {
  display: inline-flex;
}

.site-footer__contact {
  margin-top: 10px;
  color: var(--color-text-secondary);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.7;
  word-break: keep-all;
}

.site-footer__contact a {
  color: var(--color-primary-deeper);
  text-decoration: none;
}

.site-footer__contact a:hover {
  text-decoration: underline;
}

.site-footer__notice {
  margin-top: 10px;
  color: var(--color-text-muted);
  font-size: 10px;
  line-height: 1.7;
  word-break: keep-all;
}

.site-footer__links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 11px;
  font-weight: 700;
}

.site-footer__link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text-secondary);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
}

.site-footer__link:hover,
.site-footer__link:focus-visible {
  color: var(--color-primary-deeper);
  text-decoration: underline;
}

.site-footer__link:focus-visible {
  outline: 2px solid rgba(45, 223, 200, 0.58);
  outline-offset: 4px;
}

.site-footer__copyright {
  margin-top: 16px;
  font-size: 10px;
  color: rgba(122, 173, 168, 0.78);
}

body.legal-modal-open {
  overflow: hidden;
}

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  padding: 20px;
}

.legal-modal.is-active {
  display: block;
}

.legal-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 43, 39, 0.44);
  backdrop-filter: blur(5px);
}

.legal-modal__dialog {
  position: relative;
  top: 50%;
  width: min(720px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  margin: 0 auto;
  transform: translateY(-50%);
  overflow: hidden;
  border: 1px solid rgba(45, 223, 200, 0.28);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(13, 43, 39, 0.24);
}

.legal-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--color-border);
}

.legal-modal__eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--color-primary-deeper);
  font-size: 11px;
  font-weight: 900;
}

.legal-modal__title {
  color: var(--color-text-primary);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.28;
}

.legal-modal__date {
  margin-top: 6px;
  color: var(--color-text-muted);
  font-size: 11px;
}

.legal-modal__close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.legal-modal__close:hover,
.legal-modal__close:focus-visible {
  border-color: var(--color-primary);
  background: rgba(45, 223, 200, 0.16);
}

.legal-modal__body {
  max-height: min(560px, calc(100vh - 168px));
  overflow-y: auto;
  padding: 20px 22px 24px;
}

.legal-modal__section + .legal-modal__section {
  margin-top: 18px;
}

.legal-modal__section h3 {
  color: var(--color-text-primary);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.45;
}

.legal-modal__section p,
.legal-modal__section li {
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 1.8;
  word-break: keep-all;
}

.legal-modal__section p {
  margin-top: 7px;
}

.legal-modal__section ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.legal-modal__contact {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: rgba(45, 223, 200, 0.12);
  color: var(--color-primary-deeper);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.7;
}

.legal-modal__contact a {
  color: inherit;
}

@media (max-width: 480px) {
  .legal-modal {
    padding: 12px;
  }

  .legal-modal__dialog {
    max-height: calc(100vh - 24px);
    border-radius: var(--radius-lg);
  }

  .legal-modal__header {
    padding: 18px 18px 14px;
  }

  .legal-modal__body {
    max-height: calc(100vh - 148px);
    padding: 18px;
  }
}
