/* ========================================
   AutoBot - 제품형 SaaS 디자인 시스템
   ======================================== */

:root {
  /* 다크 테마 컬러 */
  --bg0: #070A12;
  --bg1: #0B1021;
  --bg2: #0E1630;
  --card: #0E1630cc;
  --card-solid: #0E1630;
  --stroke: #ffffff12;
  --stroke-light: #ffffff1a;
  --text: #e9edff;
  --muted: #9ca8c9;
  --brand: #7c5cff;
  --brand2: #22d3ee;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* 그림자 */
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-md: 0 12px 40px rgba(0,0,0,0.4);
  --shadow-lg: 0 24px 80px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 60px rgba(124, 92, 255, 0.3);

  /* 둥글기 */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;

  /* 레이아웃 */
  --container: 1140px;
  --container-sm: 480px;

  /* 폰트 */
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Pretendard', 'Noto Sans KR', sans-serif;
}

/* ========================================
   기본 리셋 & 베이스
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg0);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ========================================
   배경 효과
   ======================================== */
.bg-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.glow-1 {
  width: 600px;
  height: 600px;
  left: -200px;
  top: 100px;
  background: radial-gradient(circle, var(--brand) 0%, transparent 70%);
}

.glow-2 {
  width: 500px;
  height: 500px;
  right: -150px;
  top: -100px;
  background: radial-gradient(circle, var(--brand2) 0%, transparent 70%);
}

.glow-3 {
  width: 400px;
  height: 400px;
  left: 50%;
  bottom: 10%;
  background: radial-gradient(circle, var(--brand) 0%, transparent 70%);
  opacity: 0.3;
}

.noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.03;
  mix-blend-mode: overlay;
}

/* ========================================
   컨테이너
   ======================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container-sm {
  max-width: var(--container-sm);
}

/* ========================================
   네비게이션
   ======================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(7, 10, 18, 0.8);
  border-bottom: 1px solid var(--stroke);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand-logo {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  font-size: 18px;
  box-shadow: var(--shadow-sm);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

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

.nav-link {
  color: var(--muted);
  font-weight: 600;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--text);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
}

/* ========================================
   버튼
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: 15px;
  border: 1px solid var(--stroke-light);
  background: var(--card);
  color: var(--text);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: var(--stroke-light);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  border: none;
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-primary:hover {
  box-shadow: var(--shadow-lg), 0 0 80px rgba(124, 92, 255, 0.4);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--stroke-light);
}

.btn-secondary:hover {
  background: var(--card);
}

.btn-ghost {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--stroke);
}

.btn-danger {
  background: var(--danger);
  border: none;
}

.btn-success {
  background: var(--success);
  border: none;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: var(--r-sm);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

/* ========================================
   히어로 섹션
   ======================================== */
.hero {
  padding: 80px 0 60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--stroke-light);
  background: var(--card);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 24px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
}

.hero-title {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.trust-badges {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.trust-item {
  padding: 14px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--stroke);
  background: var(--card);
  min-width: 160px;
}

.trust-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.trust-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* 히어로 패널 (미리보기) */
.hero-panel {
  position: relative;
}

.panel {
  background: linear-gradient(180deg, var(--card) 0%, rgba(14, 22, 48, 0.6) 100%);
  border: 1px solid var(--stroke-light);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--stroke);
  background: rgba(0,0,0,0.2);
}

.panel-tab {
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--stroke);
  background: var(--bg2);
}

.panel-tab.active {
  background: var(--card);
  border-color: var(--brand);
}

.panel-tab.ghost {
  opacity: 0.6;
}

.panel-status {
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.panel-body {
  padding: 20px;
}

.form-row {
  margin-bottom: 16px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--stroke);
  background: var(--bg0);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.2);
}

.form-input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.fake-input {
  padding: 12px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--stroke);
  background: var(--bg0);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.fake-textarea {
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--stroke);
  background: var(--bg0);
  color: var(--muted);
  font-size: 14px;
  min-height: 80px;
}

.panel-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.panel-hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.8;
}

/* ========================================
   섹션 공통
   ======================================== */
.section {
  padding: 80px 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(14, 22, 48, 0.3) 0%, transparent 100%);
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-title {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
}

/* ========================================
   기능 카드
   ======================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 960px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.feature-card {
  padding: 24px;
  border-radius: var(--r-lg);
  border: 1px solid var(--stroke);
  background: var(--card);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--stroke-light);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  border: 1px solid var(--stroke);
  background: var(--bg2);
  font-size: 20px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* ========================================
   워크플로우 스텝
   ======================================== */
.steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step {
  display: flex;
  gap: 20px;
  padding: 24px;
  border-radius: var(--r-lg);
  border: 1px solid var(--stroke);
  background: var(--card);
  transition: border-color 0.2s;
}

.step:hover {
  border-color: var(--stroke-light);
}

.step-number {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  font-size: 18px;
  font-weight: 800;
  flex-shrink: 0;
}

.step-content h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-content p {
  font-size: 14px;
  color: var(--muted);
}

/* ========================================
   가격표
   ======================================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 860px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
}

.price-card {
  padding: 28px;
  border-radius: var(--r-xl);
  border: 1px solid var(--stroke);
  background: var(--card);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.price-card.featured {
  border-color: var(--brand);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
}

.price-card.featured::before {
  content: '인기';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 16px;
  border-radius: 100px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  font-size: 12px;
  font-weight: 700;
}

.plan-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.plan-price {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.plan-price span {
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
}

.plan-features {
  margin-bottom: 24px;
}

.plan-features li {
  padding: 10px 0;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--stroke);
}

.plan-features li:last-child {
  border-bottom: none;
}

/* ========================================
   푸터
   ======================================== */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--stroke);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copy {
  font-size: 14px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text);
}

/* ========================================
   인증 박스 (로그인/회원가입)
   ======================================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-box {
  width: 100%;
  max-width: 420px;
  padding: 40px;
  border-radius: var(--r-xl);
  border: 1px solid var(--stroke);
  background: var(--card);
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--muted);
}

.form-group {
  margin-bottom: 20px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--stroke);
  color: var(--muted);
}

.auth-footer a {
  color: var(--brand);
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ========================================
   마이페이지
   ======================================== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--stroke);
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 800;
}

.info-section {
  margin-bottom: 32px;
}

.info-section h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--stroke);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  color: var(--muted);
  font-weight: 600;
}

.info-value {
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
}

.badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* ========================================
   알림 메시지
   ======================================== */
.alert {
  padding: 16px 20px;
  border-radius: var(--r-md);
  margin-bottom: 20px;
  font-weight: 600;
}

.alert-info {
  background: rgba(124, 92, 255, 0.1);
  border: 1px solid rgba(124, 92, 255, 0.3);
  color: #a78bfa;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* ========================================
   유틸리티
   ======================================== */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* 로딩 상태 */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--stroke);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 하이라이트 */
.highlight {
  color: var(--success);
  font-weight: 700;
}

.highlight-warning {
  color: var(--warning);
}

.highlight-danger {
  color: var(--danger);
}
