/* ==========================================================================
   SAM ERP/MES 랜딩 — 디자인 시스템
   운영 앱(sam-react-prod) 토큰 기반: Clean Minimalist, 블루 #3B82F6, Pretendard
   ========================================================================== */

:root {
  /* Surfaces */
  --background: #fafafa;
  --foreground: #1a1a1a;
  --card: #ffffff;
  --muted: #f8fafc;
  --muted-foreground: #6b7280;
  --secondary: #f1f5f9;
  --accent: #f0f9ff;
  --border: #e2e8f0;

  /* Brand */
  --primary: #3b82f6;
  --primary-foreground: #ffffff;
  --primary-strong: #2563eb;
  --primary-soft: #eff6ff;

  /* Point colors */
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --purple: #8b5cf6;

  /* Radius */
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 999px;

  /* Shadows (clean) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);

  /* Layout */
  --container: 1180px;
  --header-h: 68px;
}

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  /* 앵커 스크롤은 JS(easeInOutCubic)로 제어 — 네이티브 smooth는 프레임 제어와 충돌하므로 미사용 */
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo",
    "Noto Sans KR", "Malgun Gothic", sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* 한국어 줄바꿈: 단어(공백) 단위로만 끊기게 (글자 중간에서 잘리는 것 방지) */
  word-break: keep-all;
  overflow-wrap: break-word;
}

img,
svg {
  vertical-align: middle;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul {
  list-style: none;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 88px 0;
}

.section--muted {
  background: var(--muted);
}

.section--accent {
  background: linear-gradient(180deg, var(--primary-soft) 0%, var(--background) 100%);
}

.section-head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--primary-strong);
  background: var(--primary-soft);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.section-desc {
  margin-top: 14px;
  color: var(--muted-foreground);
  font-size: 1.05rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.975rem;
  padding: 13px 24px;
  border-radius: var(--radius);
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s,
    border-color 0.2s;
  white-space: nowrap;
}

.btn--primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow);
}

.btn--primary:hover {
  background: var(--primary-strong);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.btn--ghost {
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary-strong);
}

.btn--lg {
  padding: 16px 30px;
  font-size: 1.05rem;
}

.btn--block {
  width: 100%;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  position: relative;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand img {
  height: 30px;
  width: auto;
}

.brand__badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary-strong);
  background: var(--primary-soft);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s;
  padding: 6px 0;
}

.nav a:hover,
.nav a.is-active {
  color: var(--primary-strong);
}

/* 현재 보고있는 섹션을 알리는 슬라이드 인디케이터 — 헤더 안쪽 바닥에 위치 */
.nav__indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  opacity: 0;
  transform: translateX(0);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease;
  pointer-events: none;
}

.nav__indicator.is-active {
  opacity: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 88px;
  background: var(--background);
  overflow: hidden;
}

/* 키비주얼: 도트 그리드 (상단 우측에서 페이드) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(59, 130, 246, 0.16) 1px, transparent 1.4px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(75% 65% at 72% 8%, #000 0%, transparent 72%);
  mask-image: radial-gradient(75% 65% at 72% 8%, #000 0%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

/* 키비주얼: 소프트 블루 글로우 블롭 */
.hero__kv {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.kv-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
}

.kv-blob--1 {
  width: 460px;
  height: 460px;
  top: -160px;
  right: -120px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.55), transparent 70%);
}

.kv-blob--2 {
  width: 380px;
  height: 380px;
  top: 40px;
  right: 220px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.32), transparent 70%);
}

.kv-blob--3 {
  width: 340px;
  height: 340px;
  bottom: -160px;
  left: -100px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22), transparent 70%);
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero__title {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
}

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

.hero__subtitle {
  margin-top: 20px;
  font-size: 1.15rem;
  color: var(--muted-foreground);
  max-width: 540px;
}

.hero__cta {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__tags {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: var(--radius-full);
}

.tag .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

/* ---------- Hero dashboard mockup ---------- */
.mockup {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.mockup__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--muted);
}

/* 신호등 점 3개에만 적용 (타이틀 span은 제외) */
.mockup__bar > span:not(.mockup__title) {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #d1d5db;
}

.mockup__bar > span:not(.mockup__title):nth-child(1) { background: #f87171; }
.mockup__bar > span:not(.mockup__title):nth-child(2) { background: #fbbf24; }
.mockup__bar > span:not(.mockup__title):nth-child(3) { background: #34d399; }

.mockup__title {
  margin-left: 10px;
  font-size: 0.8rem;
  color: var(--muted-foreground);
  font-weight: 500;
  white-space: nowrap;
}

.mockup__body {
  padding: 18px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.kpi {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--card);
}

.kpi__label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-weight: 500;
}

.kpi__value {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 4px;
}

.kpi__delta {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 2px;
}

.kpi__delta.up { color: var(--green); }
.kpi__delta.down { color: var(--red); }

.mockup__chart {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.mockup__chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.mockup__chart-head h4 {
  font-size: 0.85rem;
  font-weight: 700;
}

.mockup__chart-head span {
  font-size: 0.72rem;
  color: var(--muted-foreground);
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 90px;
}

.bars .bar {
  flex: 1;
  background: linear-gradient(180deg, var(--primary) 0%, #93c5fd 100%);
  border-radius: 6px 6px 0 0;
  min-height: 8px;
}

.bars .bar.alt {
  background: linear-gradient(180deg, var(--green) 0%, #6ee7b7 100%);
}

.status-rows {
  margin-top: 14px;
  display: grid;
  gap: 9px;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
}

.status-row .name {
  width: 78px;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.status-row .track {
  flex: 1;
  height: 7px;
  background: var(--secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.status-row .fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--primary);
}

.status-row .pct {
  width: 38px;
  text-align: right;
  font-weight: 700;
  font-size: 0.74rem;
}

/* ==========================================================================
   Hero — 영상 배경 버전 (v1)
   영상은 뷰포트에 fixed로 깔리고, 이후 섹션들이 스크롤되며 위로 덮음.
   ========================================================================== */
.hero--video {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 80px;
  color: #fff;
  background: transparent; /* 뒤에 fixed 영상이 보이도록 투명 */
}

/* v0의 도트 그리드/블롭은 영상 위에서는 끔 */
.hero--video::before { display: none; }
.hero--video .hero__kv { display: none; }

/* 영상: 뷰포트 전체에 고정, 항상 같은 위치에서 재생 */
.hero__bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -2;
  pointer-events: none;
  /* 영상 미준비 시 폴백 배경 */
  background:
    radial-gradient(60% 60% at 70% 20%, rgba(59, 130, 246, 0.35) 0%, transparent 65%),
    linear-gradient(135deg, #0b1220 0%, #0f1b3a 55%, #1e3a8a 100%);
}

.hero__overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(8, 14, 33, 0.55) 0%, rgba(8, 14, 33, 0.72) 100%);
  pointer-events: none;
}

/* 다른 섹션이 fixed 영상을 가리려면 자체 배경이 있어야 함.
   기본 .section은 투명이었으므로 변수 배경을 명시. */
.section { background: var(--background); }
.section--muted { background: var(--muted); }
.section--accent {
  background: linear-gradient(180deg, var(--primary-soft) 0%, var(--background) 100%);
}

.hero__center {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}

.hero__center .hero__title {
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
}

.hero__center .hero__title .accent {
  color: #93c5fd; /* 영상 위에서 가독성 좋은 라이트 블루 */
}

.hero__center .hero__subtitle {
  color: rgba(255, 255, 255, 0.88);
  max-width: 720px;
  margin: 22px auto 0;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.2);
}

.hero__center .hero__cta {
  justify-content: center;
  margin-top: 36px;
}

.hero__center .hero__tags {
  justify-content: center;
  margin-top: 32px;
}

/* 라이트 액센트 컴포넌트 (영상 배경 위 가독성용) */
.eyebrow--light {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn--ghost-light {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn--ghost-light:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.tag--light {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* 모션 줄임 사용자: 영상은 멈춰 첫 프레임/포스터만 표시 */
@media (prefers-reduced-motion: reduce) {
  .hero__bg-video {
    /* 자바스크립트에서도 pause() 처리됨 */
    animation: none;
  }
}

@media (max-width: 760px) {
  .hero--video { min-height: 88vh; padding: 80px 0 64px; }
  .hero__center .hero__subtitle { font-size: 1rem; }
}

/* ---------- Pain (cards) ---------- */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.pain-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.pain-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.pain-card__icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fef2f2;
  color: var(--red);
  margin-bottom: 16px;
}

.pain-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pain-card p {
  font-size: 0.92rem;
  color: var(--muted-foreground);
}

/* ---------- Pain (timeline / exec) ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tl-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}

.tl-card__time {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--primary-strong);
  margin-bottom: 12px;
}

.tl-card__time .clock {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tl-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.tl-card p {
  font-size: 0.92rem;
  color: var(--muted-foreground);
}

/* ---------- Metrics band ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.metric {
  text-align: center;
  padding: 12px;
}

.metric__value {
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--primary-strong);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.metric__num.is-rolling {
  color: var(--primary);
}

.metric__value .unit {
  font-size: 0.5em;
  margin-left: 2px;
}

.metric__label {
  margin-top: 10px;
  font-weight: 600;
}

.metric__sub {
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--muted-foreground);
}

/* ---------- Modules grid ---------- */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.module-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.module-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: #cbd5e1;
}

.module-card__num {
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--border);
}

.module-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary-strong);
  margin-bottom: 16px;
}

.module-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.module-card p {
  font-size: 0.9rem;
  color: var(--muted-foreground);
}

.modules-grid.compact .module-card {
  padding: 20px 18px;
}

/* ---------- MES highlight ---------- */
.mes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.mes__list {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.mes-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.mes-item__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.mes-item h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.mes-item p {
  font-size: 0.92rem;
  color: var(--muted-foreground);
}

.mes__visual {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px;
}

.flow {
  display: grid;
  gap: 12px;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--muted);
}

.flow-step__no {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.flow-step__txt strong {
  display: block;
  font-size: 0.95rem;
}

.flow-step__txt span {
  font-size: 0.82rem;
  color: var(--muted-foreground);
}

.flow-arrow {
  text-align: center;
  color: var(--border);
  font-size: 1.1rem;
  line-height: 0.5;
}

/* ---------- MES compact (exec) ---------- */
.mes-compact {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.mes-feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.mes-feature:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.mes-feature h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 14px 0 6px;
}

.mes-feature p {
  font-size: 0.9rem;
  color: var(--muted-foreground);
}

/* ---------- Roles ---------- */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.role-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-color, var(--primary));
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
}

.role-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.role-card ul {
  display: grid;
  gap: 8px;
}

.role-card li {
  font-size: 0.9rem;
  color: var(--muted-foreground);
  padding-left: 18px;
  position: relative;
}

.role-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-color, var(--primary));
}

/* ---------- Extensions ---------- */
.ext-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.ext-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.ext-card__icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary-strong);
  flex-shrink: 0;
}

.ext-card strong {
  display: block;
  font-size: 0.98rem;
}

.ext-card span {
  font-size: 0.82rem;
  color: var(--muted-foreground);
}

/* ---------- Process ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.proc-step {
  position: relative;
  text-align: center;
  padding: 0 16px;
}

.proc-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 28px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.proc-step__no {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 6px var(--primary-soft);
}

.proc-step h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.proc-step p {
  font-size: 0.88rem;
  color: var(--muted-foreground);
}

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(135deg, #1e3a8a 0%, var(--primary-strong) 55%, #3b82f6 100%);
  border-radius: var(--radius-lg);
  padding: 56px;
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  box-shadow: var(--shadow-xl);
}

.cta__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.cta__desc {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.02rem;
}

.cta__contacts {
  margin-top: 24px;
  display: grid;
  gap: 10px;
  font-size: 0.95rem;
}

.cta__contacts a {
  color: #fff;
  font-weight: 600;
}

.cta-form {
  background: var(--card);
  color: var(--foreground);
  border-radius: var(--radius);
  padding: 28px;
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 11px 14px;
  border: 1px solid #9ca3af;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--foreground);
  width: 100%;
}

.field textarea {
  resize: vertical;
  min-height: 84px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-note {
  font-size: 0.78rem;
  color: var(--muted-foreground);
  text-align: center;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 56px 0 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 14px;
}

.footer-brand img {
  height: 28px;
  filter: brightness(0) invert(1);
}

.footer-desc {
  font-size: 0.9rem;
  color: #94a3b8;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

.footer-col ul {
  display: grid;
  gap: 9px;
}

.footer-col a,
.footer-col li {
  font-size: 0.88rem;
  color: #94a3b8;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 24px;
  font-size: 0.82rem;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Reveal animation ---------- */
/* 애니메이션은 JS(ES모듈)가 도는 환경에서만 적용.
   file:// 처럼 모듈이 차단되면 .js-anim 이 없어 콘텐츠가 그대로 노출된다. */
.js-anim .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-anim .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js-anim .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}

/* ---------- Version hub (root index) ---------- */
.hub {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 60px 0;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(59, 130, 246, 0.1) 0%, transparent 70%),
    var(--background);
}

.hub__head {
  text-align: center;
  margin-bottom: 48px;
}

.hub__head h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hub__head p {
  margin-top: 14px;
  color: var(--muted-foreground);
  font-size: 1.05rem;
}

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

.hub-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.hub-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
  border-color: var(--primary);
}

.hub-card__tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-strong);
  background: var(--primary-soft);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.hub-card h2 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.hub-card p {
  font-size: 0.92rem;
  color: var(--muted-foreground);
  margin-bottom: 18px;
}

.hub-card__link {
  font-weight: 700;
  color: var(--primary-strong);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .mes { grid-template-columns: 1fr; gap: 36px; }
  .cta { grid-template-columns: 1fr; padding: 40px; }
  .modules-grid,
  .pain-grid,
  .ext-grid,
  .roles-grid,
  .mes-compact { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .section { padding: 64px 0; }
  .nav { display: none; }
  .header-actions .btn { padding: 10px 16px; font-size: 0.9rem; }
  .metrics { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .timeline { grid-template-columns: 1fr; }
  .process { grid-template-columns: repeat(2, 1fr); gap: 36px 0; }
  .proc-step:not(:last-child)::after { display: none; }
  .hub__grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .modules-grid,
  .pain-grid,
  .ext-grid,
  .roles-grid,
  .mes-compact { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .cta { padding: 28px; }
  .cta-form { padding: 20px; }
}

/* ==========================================================================
   v5 추가 컴포넌트 — 카드 그리드 / FAQ / 도입절차 테이블 / 체험 밴드 / 진단 폼
   ========================================================================== */

/* 좁은 컨테이너 (FAQ 등 가독성용) */
.container--narrow { max-width: 860px; }

/* ---------- 공용 카드 그리드 ---------- */
.cards-grid {
  display: grid;
  gap: 20px;
}
.cards-grid--3 { grid-template-columns: repeat(3, 1fr); }
.cards-grid--4 { grid-template-columns: repeat(4, 1fr); }

.feat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.feat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(59, 130, 246, 0.4);
}
.feat-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  margin-bottom: 18px;
}
.feat-card__icon svg { width: 26px; height: 26px; }
.feat-card__title {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.feat-card__desc {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted-foreground);
}
/* muted 배경 섹션에서는 카드를 흰색으로 대비 */
.section--muted .feat-card { background: #fff; }

/* ---------- FAQ 아코디언 ---------- */
.faq {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-item.is-open {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: var(--shadow);
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.04rem;
  font-weight: 600;
  color: var(--foreground);
  text-align: left;
  letter-spacing: -0.01em;
}
.faq-q__icon {
  position: relative;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}
.faq-q__icon::before,
.faq-q__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.faq-q__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item.is-open .faq-q__icon::after { opacity: 0; transform: translate(-50%, -50%) rotate(0); }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-a > p {
  overflow: hidden;
  margin: 0;
  padding: 0 22px;
  font-size: 0.96rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}
.faq-item.is-open .faq-a > p { padding: 0 22px 22px; }

/* ---------- 도입 절차 테이블 ---------- */
.proc-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.proc-table__head,
.proc-row {
  display: grid;
  grid-template-columns: 160px 220px 1fr;
  align-items: center;
  gap: 20px;
  padding: 16px 24px;
}
.proc-table__head {
  background: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted-foreground);
}
.proc-row { border-top: 1px solid var(--border); }
.proc-row:hover { background: var(--primary-soft); }
.proc-row__step {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
}
.proc-row__no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}
.proc-row__detail { font-weight: 600; font-size: 0.95rem; }
.proc-row__desc { font-size: 0.93rem; color: var(--muted-foreground); }

/* ---------- 기존 ERP 비교 테이블 ---------- */
.cmp-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.cmp-table__head,
.cmp-row {
  display: grid;
  grid-template-columns: 160px 1fr 1fr;
  align-items: center;
  gap: 20px;
  padding: 16px 24px;
}
.cmp-table__head {
  background: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--foreground);
}
.cmp-row { border-top: 1px solid var(--border); }
.cmp-row:hover { background: var(--primary-soft); }
.cmp-cell--label { font-weight: 700; font-size: 0.95rem; }
.cmp-cell--legacy { color: var(--muted-foreground); font-size: 0.95rem; }
.cmp-cell--ours {
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--primary-strong);
}
.cmp-table__head .cmp-cell--ours { color: var(--primary-strong); }

/* ---------- 하위 페이지 인트로 밴드 ---------- */
.page-hero {
  position: relative;
  padding: 76px 0 60px;
  background: linear-gradient(180deg, var(--primary-soft) 0%, var(--background) 100%);
  border-bottom: 1px solid var(--border);
  text-align: center;
  overflow: hidden;
}
.page-hero__inner { max-width: 780px; margin: 0 auto; }
.page-hero__title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.22;
  margin-top: 4px;
}
.page-hero__desc {
  margin-top: 18px;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}
.page-hero__tags {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.page-lead {
  max-width: 720px;
  margin: -28px auto 36px;
  text-align: center;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

/* ---------- 데이터 테이블 (가격/파트너십) ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  min-width: 560px;
}
.data-table th,
.data-table td {
  padding: 15px 20px;
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.5;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.data-table thead th {
  background: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--foreground);
  white-space: nowrap;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--primary-soft); }
.data-table .num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.data-table__row-head { font-weight: 700; white-space: nowrap; }

/* ---------- 안내문 카드 ---------- */
.notice-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 14px;
}
.notice-card p {
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--muted-foreground);
}

/* ---------- 체험 강조 밴드 ---------- */
.try-band {
  text-align: center;
  border-radius: var(--radius-lg);
  padding: 64px 40px;
  background: linear-gradient(135deg, #1e3a8a 0%, var(--primary-strong) 55%, #3b82f6 100%);
  color: #fff;
  box-shadow: var(--shadow-xl);
}
.try-band__eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 14px;
}
.try-band__title {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.try-band__desc {
  max-width: 680px;
  margin: 0 auto 32px;
  font-size: 1.02rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}
.btn--white {
  background: #fff;
  color: var(--primary-strong);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
}
.btn--white:hover { transform: translateY(-2px); background: #f8fafc; }

/* ---------- 무료 진단 폼 (2열) ---------- */
.cta-form {
  grid-template-columns: 1fr 1fr;
  column-gap: 16px;
  row-gap: 14px;
}
.cta-form .field--full,
.cta-form > button,
.cta-form .form-note { grid-column: 1 / -1; }
.field .req { color: var(--red); }

/* ---------- 반응형 ---------- */
@media (max-width: 1024px) {
  .cards-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .cards-grid--3 { grid-template-columns: 1fr; }
  .cards-grid--4 { grid-template-columns: 1fr; }
  .proc-table__head { display: none; }
  .proc-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 18px 20px;
  }
  .proc-row__detail { font-weight: 700; }
  .cta-form { grid-template-columns: 1fr; }
  .try-band { padding: 48px 24px; }

  .cmp-table__head { display: none; }
  .cmp-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 18px 20px;
  }
  .cmp-cell--legacy::before,
  .cmp-cell--ours::before {
    content: attr(data-th) " · ";
    font-weight: 700;
    color: var(--muted-foreground);
  }
  .cmp-cell--ours::before { color: var(--primary); }

  .page-hero { padding: 56px 0 44px; }
  .page-lead { margin: -16px auto 28px; }
  .notice-card { padding: 22px 22px; }
}

/* ---------- 히어로 "SAM으로 전환하세요" 라인 ---------- */
.hero__switch {
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 18px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
.hero--video .hero__tags { margin-bottom: 32px; }

/* ---------- 카드 섹션 마무리 문장 ---------- */
.section-note {
  margin-top: 28px;
  text-align: center;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--muted-foreground);
}

/* ---------- 체험 "준비 중" 다이얼로그 ---------- */
.pending-dialog {
  position: fixed;
  inset: 0;
  margin: auto; /* 전역 margin 리셋 대응 — 뷰포트 정중앙 */
  height: fit-content;
  border: 0;
  border-radius: var(--radius-lg);
  padding: 36px 32px 28px;
  max-width: 420px;
  width: calc(100% - 48px);
  text-align: center;
  box-shadow: var(--shadow-xl);
  color: var(--foreground);
}
.pending-dialog::backdrop {
  background: rgba(8, 14, 28, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.pending-dialog__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-strong);
  margin-bottom: 16px;
}
.pending-dialog__icon svg { width: 26px; height: 26px; }
.pending-dialog__title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.pending-dialog__desc {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted-foreground);
  margin-bottom: 24px;
}
.pending-dialog__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
