/* ==========================================================================
   CSS Variables & Theme Setup
   ========================================================================== */
:root {
  /* 라이트 모드 (기본 테마) */
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-subtle: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #e0e7ff;
  --secondary: #0ea5e9;
  
  --border: #e2e8f0;
  --border-focus: #818cf8;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  /* 다크 모드 */
  --bg-primary: #0b0f19;
  --bg-surface: #111827;
  --bg-card: rgba(17, 24, 39, 0.85);
  --bg-subtle: #1f2937;
  
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-light: #6b7280;
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.15);
  --secondary: #38bdf8;
  
  --border: #1f2937;
  --border-focus: #6366f1;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  font-size: 16px;
  color: var(--text-main);
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

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

input, textarea {
  font-family: inherit;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-surface);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.logo-icon {
  font-size: 1.4rem;
  color: var(--primary);
}

.logo .highlight {
  color: var(--primary);
}

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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 8px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
  border-radius: var(--radius-full);
}

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

.theme-toggle, .mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  transition: var(--transition);
  font-size: 1.05rem;
}

.theme-toggle:hover, .mobile-toggle:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}

.mobile-toggle {
  display: none;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 90px 0 80px;
  position: relative;
  background: radial-gradient(circle at 10% 20%, var(--primary-light) 0%, transparent 40%);
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 48px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: var(--bg-subtle);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}

.stat-label {
  font-size: 0.825rem;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 36px;
  background-color: var(--border);
}

/* Hero Preview Card (글래스모피즘) */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transition: var(--transition);
}

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

.card-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot.red { background-color: #ef4444; }
.dot.yellow { background-color: #f59e0b; }
.dot.green { background-color: #10b981; }

.card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 8px;
}

.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.preview-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
}

.preview-item h4 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.preview-item p {
  font-size: 0.825rem;
  color: var(--text-muted);
}

.icon-accent {
  font-size: 1.25rem;
  color: var(--primary);
  margin-top: 2px;
}

/* ==========================================================================
   Section Common Styles
   ========================================================================== */
.section {
  padding: 90px 0;
}

.text-center {
  text-align: center;
}

.section-header {
  margin-bottom: 50px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--primary);
  margin-bottom: 10px;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ==========================================================================
   Features Section
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.feature-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 20px;
}

.bg-indigo { background: rgba(99, 102, 241, 0.12); color: #6366f1; }
.bg-blue { background: rgba(14, 165, 233, 0.12); color: #0ea5e9; }
.bg-purple { background: rgba(168, 85, 247, 0.12); color: #a855f7; }
.bg-emerald { background: rgba(16, 185, 129, 0.12); color: #10b981; }

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

.feature-card p {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   Interactive Demo Section (Todo App)
   ========================================================================== */
.demo-section {
  background-color: var(--bg-subtle);
}

.demo-wrapper {
  max-width: 560px;
  margin: 0 auto;
}

.todo-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-lg);
}

.todo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.todo-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.task-counter {
  font-size: 0.85rem;
  padding: 4px 10px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-weight: 600;
}

.todo-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.todo-input-group input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--bg-primary);
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.todo-input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.todo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.todo-item:hover {
  border-color: var(--border-focus);
}

.todo-content {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex: 1;
}

.todo-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--border-focus);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: transparent;
  transition: var(--transition);
}

.todo-item.completed .todo-checkbox {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.todo-item.completed .todo-text {
  text-decoration: line-through;
  color: var(--text-light);
}

.todo-delete-btn {
  color: var(--text-light);
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.todo-delete-btn:hover {
  color: #ef4444;
  background-color: rgba(239, 68, 68, 0.1);
}

/* ==========================================================================
   FAQ Section (Accordion)
   ========================================================================== */
.faq-container {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  text-align: left;
}

.faq-arrow {
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background-color: var(--bg-primary);
}

.faq-item.active .faq-answer {
  max-height: 200px;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}

.faq-answer p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-answer code {
  background-color: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--primary);
  font-size: 0.9em;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-card {
  max-width: 560px;
  margin: 0 auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-group input, .form-group textarea {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--bg-primary);
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
  font-size: 0.95rem;
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  text-align: center;
}

.footer-tagline {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 8px;
}

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

.footer-links a {
  font-size: 0.95rem;
  color: var(--text-muted);
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  width: 100%;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--text-main);
  color: var(--bg-surface);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 0.925rem;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   Responsive Design (Media Queries)
   ========================================================================== */
@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-title {
    font-size: 2.35rem;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background-color: var(--bg-surface);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-150%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    box-shadow: var(--shadow-lg);
  }

  .hero-section {
    padding: 50px 0 60px;
  }

  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 1.85rem;
  }
}
