/* ============================================================
   FACTLINE — Index (cover) page styles
   Hero, Stats, Process, CTA
   ============================================================ */

/* =========================================================
   Page wrap
   ========================================================= */
.page-index {
  background: var(--bg-white);
  overflow-x: hidden;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  padding: 96px 0 64px;
  overflow: hidden;
  /* dark backdrop: fallback colour + photo + left-to-right dark scrim for
     headline legibility. Drop the photo at www/images/hero-bg.webp (or .jpg);
     if missing the gradient + fallback still reads as an intentional design. */
  background-color: #0B0816;
  background-image:
    /* 좌측은 거의 검정, 우측으로 갈수록 투명 — 헤드라인·헤더 메뉴 가독성을
       좌측 영역에 몰아주고, 사진은 우측에서 자연스럽게 드러나도록 */
    linear-gradient(100deg,
      rgba(11, 8, 22, 0.96) 0%,
      rgba(11, 8, 22, 0.82) 35%,
      rgba(11, 8, 22, 0.40) 65%,
      rgba(11, 8, 22, 0.08) 100%),
    url('../images/hero-bg.jpg');
  background-size: cover, cover;
  /* 이미지는 오른쪽 정렬 → 사진의 피사체가 우측에 배치 */
  background-position: center, right center;
  background-repeat: no-repeat;
}

/* Soft brand-color glow on the upper-right of the hero — additive against
   the dark image. */
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 900px;
  height: 900px;
  background: radial-gradient(circle,
    rgba(155, 107, 255, 0.35) 0%,
    rgba(124, 58, 237, 0.15) 30%,
    transparent 65%);
  filter: blur(30px);
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Both containers inside .hero need to sit above the background layers. */
.hero > .container {
  position: relative;
  z-index: 1;
}

/* Only the first container (hero-text + hero-art) is a 2-column grid —
   the second container (stats) must stay full-width or the cards get
   squeezed into a 45% column and the numbers clip. */
.hero > .container:first-child {
  display: grid;
  grid-template-columns: 45% 55%;
  gap: 48px;
  align-items: center;
}

.hero-text {
  max-width: 560px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: #E8D5FF;
  text-transform: uppercase;
}

.hero-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: #C9A9FF;
  box-shadow: 0 0 14px rgba(201, 169, 255, 0.6);
}

.hero-headline {
  margin-top: 24px;
  font-weight: 700;
  font-size: 64px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  text-wrap: balance;
  text-shadow: 0 2px 32px rgba(0, 0, 0, 0.25);
}

.hero-headline .accent {
  background: linear-gradient(135deg, #E8D5FF 0%, #C9A9FF 50%, #9B6BFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin-top: 28px;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  max-width: 520px;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

/* Secondary button override only inside the dark hero — keeps the report page
   button styling intact via components.css. */
.hero .btn-secondary {
  background: transparent;
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.5);
}
.hero .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #FFFFFF;
}

.hero-meta {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 24px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.hero-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.35);
}

/* ---------- Hero art / verification stack ---------- */
.hero-art {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 560px;
  padding: 24px 0;
}

/* Background glow (assets/hero-bg-glow.png fallback) */
.hero-art-bg {
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle at 70% 50%,
              rgba(155, 107, 255, 0.25) 0%,
              rgba(232, 213, 255, 0.15) 30%,
              transparent 70%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
}

.verify-stack {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 460px;
  z-index: 1;
}

.verify-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 420px;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(229, 229, 236, 0.6);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  transition:
    transform 600ms cubic-bezier(.2,.8,.2,1),
    opacity 600ms cubic-bezier(.2,.8,.2,1),
    box-shadow 240ms ease;
  transform-origin: top right;
}

/* layer positions — JS will toggle data-pos="front|mid|back" */
.verify-card[data-pos="front"] {
  transform: translate(0, 0) scale(1);
  opacity: 1;
  z-index: 3;
}

.verify-card[data-pos="mid"] {
  transform: translate(20px, 12px) scale(0.96);
  opacity: 0.85;
  z-index: 2;
}

.verify-card[data-pos="back"] {
  transform: translate(40px, 24px) scale(0.92);
  opacity: 0.65;
  z-index: 1;
}

/* Initial state before .is-mounted is added — slid in from the right,
   fully hidden. Higher specificity than data-pos so this wins until
   JS adds .is-mounted. */
.verify-stack:not(.is-mounted) .verify-card[data-pos="front"],
.verify-stack:not(.is-mounted) .verify-card[data-pos="mid"],
.verify-stack:not(.is-mounted) .verify-card[data-pos="back"] {
  opacity: 0;
}

.verify-stack:not(.is-mounted) .verify-card[data-pos="front"] {
  transform: translate(60px, 0) scale(1);
}
.verify-stack:not(.is-mounted) .verify-card[data-pos="mid"] {
  transform: translate(80px, 12px) scale(0.96);
}
.verify-stack:not(.is-mounted) .verify-card[data-pos="back"] {
  transform: translate(100px, 24px) scale(0.92);
}

/* Staggered transition delays on first mount */
.verify-stack.is-mounted .verify-card[data-pos="back"]  { transition-delay: 200ms; }
.verify-stack.is-mounted .verify-card[data-pos="mid"]   { transition-delay: 350ms; }
.verify-stack.is-mounted .verify-card[data-pos="front"] { transition-delay: 500ms; }

/* After first rotation, clear stagger delays so swaps feel snappy */
.verify-stack.is-rotating .verify-card { transition-delay: 0ms !important; }

.verify-card[data-pos="front"]:hover {
  transform: translate(0, -4px) scale(1);
  box-shadow: var(--shadow-lg);
}

/* Card head */
.vc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vc-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--purple-600);
  background: var(--purple-50);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.vc-tag-dot {
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--purple-600);
}

.vc-date {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

/* Title */
.vc-title {
  margin-top: 16px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Verdict box */
.vc-verdict {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--vc-bg, var(--bg-card));
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vc-verdict-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vc-label, var(--text-secondary));
}

.vc-verdict-result {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--vc-accent, var(--text-primary));
  word-break: keep-all;
  white-space: nowrap;
}

/* Verdict color sets */
.verify-card.is-false {
  --vc-bg:     #FEF2F2;
  --vc-accent: #DC2626;
  --vc-label:  #991B1B;
}
.verify-card.is-true {
  --vc-bg:     #F0FDF4;
  --vc-accent: #16A34A;
  --vc-label:  #166534;
}
.verify-card.is-partial {
  --vc-bg:     #FFFBEB;
  --vc-accent: #D97706;
  --vc-label:  #92400E;
}

/* Reasoning line */
.vc-reason {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* Meta */
.vc-meta {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.vc-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vc-meta-item strong {
  font-weight: 600;
  color: var(--text-secondary);
}

/* Stack footnote — sits on the dark hero, so light text */
.verify-foot {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.verify-foot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--status-done);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
  animation: pulse-dot 2.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15); }
  50%      { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.05); }
}

/* =========================================================
   Stats
   ========================================================= */
.stats {
  margin-top: 80px;
  position: relative;
  z-index: 2;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stat-card {
  position: relative;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 40px clamp(20px, 2.4vw, 32px);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: transform 240ms ease, box-shadow 240ms ease;
  min-width: 0;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 700;
  /* scales between 40px (narrow) and 56px (wide) so 5-digit + comma + unit
     no longer overflows the card on viewports 769–1024px */
  font-size: clamp(40px, 4.4vw, 56px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.stat-number [data-countup] {
  display: inline-block;
  /* reserve enough room so during count-up the comma-formatted number
     doesn't push the unit off-card */
  min-width: 0;
}

.stat-unit {
  font-size: clamp(16px, 1.7vw, 22px);
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.stat-label {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.stat-trend {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--status-done);
  font-weight: 600;
}

.stat-trend.is-flat { color: var(--text-tertiary); }

/* =========================================================
   Bento (section 2 — feature grid)
   ========================================================= */
.bento {
  margin-top: 120px;
}

.bento-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 40px;
}

.bento-head-text {
  max-width: 720px;
}

.bento-headline {
  font-weight: 700;
  font-size: 42px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-wrap: balance;
}

.bento-sub {
  margin-top: 14px;
  font-size: 17px;
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 540px;
  text-wrap: pretty;
}

.bento-cta {
  flex-shrink: 0;
}

.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: minmax(260px, auto) minmax(260px, auto);
  gap: 16px;
}

.bento-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: transform 280ms cubic-bezier(.2,.8,.2,1), box-shadow 280ms ease;
}

.bento-card:hover {
  transform: translateY(-4px);
}

.bento-card-body {
  position: relative;
  z-index: 1;
}

.bento-card-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: inherit;
}

.bento-card-desc {
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.65;
  font-weight: 400;
  color: inherit;
  opacity: 0.78;
  text-wrap: pretty;
}

/* ---- Card A — tall light card on the left ---- */
.bento-card-a {
  grid-column: 1;
  grid-row: 1 / 3;
  background: var(--purple-50);
  color: var(--text-primary);
  justify-content: space-between;
}
.bento-card-a .bento-card-desc { opacity: 1; color: var(--text-secondary); }
.bento-card-a:hover { box-shadow: 0 12px 36px rgba(107, 78, 255, 0.18); }

/* ---- Card B — wide dark hero card ---- */
.bento-card-b {
  grid-column: 2 / 4;
  grid-row: 1;
  background:
    radial-gradient(circle at 85% 25%, rgba(155, 107, 255, 0.25) 0%, transparent 55%),
    radial-gradient(circle at 15% 90%, rgba(107, 78, 255, 0.18) 0%, transparent 45%),
    #0F0F14;
  color: #FFFFFF;
}
.bento-card-b::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1.6px);
  background-size: 22px 22px;
  pointer-events: none;
}
.bento-card-b:hover { box-shadow: 0 16px 48px rgba(15, 15, 20, 0.4); }

/* ---- Card C — deep brand-violet ---- */
.bento-card-c {
  grid-column: 2;
  grid-row: 2;
  background: linear-gradient(135deg, #3A2470 0%, #1F1240 100%);
  color: #FFFFFF;
}
.bento-card-c:hover { box-shadow: 0 16px 48px rgba(58, 36, 112, 0.45); }

/* ---- Card D — deep slate ---- */
.bento-card-d {
  grid-column: 3;
  grid-row: 2;
  background: linear-gradient(135deg, #1E2342 0%, #0F1226 100%);
  color: #FFFFFF;
}
.bento-card-d:hover { box-shadow: 0 16px 48px rgba(15, 18, 38, 0.5); }

/* =========================================================
   Bento — illustrative mock content
   ========================================================= */
.bento-mock {
  position: relative;
  z-index: 1;
  margin-top: auto;
}

/* A — form preview (light card) */
.bento-mock-form {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 2px 14px rgba(15, 15, 20, 0.06);
  border: 1px solid var(--border-light);
}

.mock-tabs {
  display: flex;
  gap: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
}

.mock-tab {
  position: relative;
  padding-bottom: 10px;
  margin-bottom: -11px;
}

.mock-tab.is-active {
  color: var(--purple-600);
  font-weight: 600;
}

.mock-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 2px 2px 0 0;
}

.mock-chips {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.mock-chip {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-secondary);
}

.mock-chip.is-active {
  background: var(--gradient-accent);
  color: #FFFFFF;
}

.mock-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.mock-line {
  height: 8px;
  background: var(--bg-card);
  border-radius: 4px;
}

.mock-line-short { width: 60%; }

/* B — verdict badges (dark card) */
.bento-mock-verify {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mock-verify {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.mock-verify::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: currentColor;
}

.mock-verify-true {
  background: rgba(34, 197, 94, 0.12);
  color: #4ADE80;
}

.mock-verify-partial {
  background: rgba(217, 119, 6, 0.14);
  color: #FBBF24;
}

.mock-verify-false {
  background: rgba(220, 38, 38, 0.14);
  color: #FCA5A5;
}

/* C — shield motif */
.bento-mock-shield {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  opacity: 0.9;
}

.mock-shield {
  width: 96px;
  height: 96px;
  color: rgba(232, 213, 255, 0.55);
}

/* D — notification rows */
.bento-mock-notify {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mock-notify-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.mock-notify-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: #22C55E;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
  flex-shrink: 0;
}

.mock-notify-dot.is-pending {
  background: #C9A9FF;
  box-shadow: 0 0 8px rgba(201, 169, 255, 0.6);
}

.mock-notify-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.mock-notify-text strong {
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
}

.mock-notify-text span {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
}

/* =========================================================
   Bottom CTA
   ========================================================= */
.cta {
  margin-top: 120px;
}

.cta-box {
  position: relative;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  padding: 80px 48px;
  text-align: center;
  color: #FFFFFF;
  overflow: hidden;
  isolation: isolate;
}

.cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.35) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(255, 255, 255, 0.2) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}

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

.cta-title {
  font-weight: 700;
  font-size: 38px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  text-wrap: balance;
}

.cta-sub {
  margin-top: 14px;
  font-size: 17px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
}

.cta-actions {
  margin-top: 32px;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.cta-trust {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
}

.cta-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .hero > .container:first-child {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero {
    padding-top: 64px;
  }
  .hero-art {
    order: -1;
    min-height: 480px;
  }
  .hero-headline { font-size: 48px; }

  /* Bento — collapse to a single column on tablet */
  .bento-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .bento-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .bento-card-a,
  .bento-card-b,
  .bento-card-c,
  .bento-card-d {
    grid-column: auto;
    grid-row: auto;
  }
  .bento-card-a { min-height: 320px; }
  .bento-card-b { min-height: 280px; }
}

@media (max-width: 768px) {
  .nav-primary { display: none; }
  .nav-toggle { display: inline-flex; }

  .hero-headline { font-size: 40px; }
  .hero-sub { font-size: 16px; }
  .hero { padding: 48px 0 32px; }
  .hero-art { display: none; }

  .stats-grid { grid-template-columns: 1fr; }
  .stat-number { font-size: 44px; }

  .bento { margin-top: 80px; }
  .bento-headline { font-size: 30px; }
  .bento-card { padding: 24px; }
  .bento-card-title { font-size: 19px; }
  .bento-card-a { min-height: 280px; }
  .bento-card-b { min-height: 240px; }

  .cta { margin-top: 80px; }
  .cta-box { padding: 56px 24px; }
  .cta-title { font-size: 28px; }

  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 24px; }
  .site-footer { margin-top: 80px; padding: 48px 0; }

  .modal-card { padding: 32px 24px; }
  .modal-logo { font-size: 28px; }
}
