/* ============================================
   COSMODRIVE SUBPAGE
   Matches ICAN Academy main site style
   ============================================ */

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

:root {
  --bg: #faf8f5;
  --bg-card: #ffffff;
  --surface: #f5f0eb;
  --border: #e8e2da;
  --border-hover: #d4ccc2;
  --text: #3d3530;
  --text-muted: #6b6360;
  --text-dim: #a09890;
  --accent: #4a90d4;
  --accent-light: #3a7bbe;
  --radius: 28px;
  --radius-sm: 20px;
  --radius-xs: 12px;
  --spring: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --font: 'Nunito', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  font-size: 1.05rem;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  word-break: keep-all;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ---------- NAV ---------- */
.sub-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 1.25rem;
}

.nav-logo-img {
  width: 28px; height: 28px; object-fit: contain;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color var(--spring);
}

.back-link:hover { color: var(--accent); }

/* ---------- HERO ---------- */
.cd-hero {
  text-align: center;
  padding: 80px 28px 48px;
  background: linear-gradient(180deg, #f0f4fa 0%, var(--bg) 100%);
}

.cd-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #ccfbf1, #a7f3d0);
  color: #0d9488;
  margin-bottom: 20px;
}

.cd-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #1a1a2e, #4a90d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cd-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ---------- SCREENSHOT ---------- */
.cd-screenshot {
  padding: 0 28px 64px;
  max-width: 900px;
  margin: 0 auto;
}

.cd-screenshot-frame {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.06);
}

.cd-browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: #1e1e2e;
}

.cd-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #3a3a4a;
}

.cd-dot:first-child { background: #ff5f57; }
.cd-dot:nth-child(2) { background: #ffbd2e; }
.cd-dot:nth-child(3) { background: #28c840; }

.cd-url {
  margin-left: 12px;
  font-size: 0.75rem;
  color: #888;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.cd-screenshot-frame img {
  width: 100%;
  display: block;
}

/* ---------- SECTIONS ---------- */
.cd-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 28px;
}

.cd-section-alt {
  max-width: 100%;
  background: linear-gradient(180deg, #f0f4fa 0%, var(--bg) 100%);
}

.cd-section-alt > * {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.cd-section h2 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  text-align: center;
}

.cd-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
  line-height: 1.8;
}

/* ---------- FEATURE CARDS ---------- */
.cd-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cd-feature-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--spring);
}

.cd-feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(61, 53, 48, 0.08);
}

.cd-feature-icon {
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 18px;
  margin: 0 auto 16px;
}

.cd-icon-materials {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #2563eb;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.15);
}

.cd-icon-training {
  background: linear-gradient(135deg, #ede7fb, #d8ccf8);
  color: #7c3aed;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.15);
}

.cd-icon-hub {
  background: linear-gradient(135deg, #ccfbf1, #a7f3d0);
  color: #0d9488;
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.15);
}

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

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

/* ---------- FLOW (3-step) ---------- */
.cd-flow {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.cd-flow-step {
  flex: 1;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 28px 20px;
  text-align: center;
}

.cd-flow-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a90d4, #7bb8e8);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}

.cd-flow-step h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.cd-flow-step p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.cd-flow-arrow {
  display: flex;
  align-items: center;
  padding-top: 48px;
  color: var(--text-dim);
  flex-shrink: 0;
}

/* ---------- COMPARE TABLE ---------- */
.cd-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.cd-compare-col {
  border-radius: var(--radius-sm);
  padding: 32px 28px;
}

.cd-compare-col h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
}

.cd-compare-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cd-compare-col li {
  font-size: 0.92rem;
  line-height: 1.6;
  padding-left: 24px;
  position: relative;
}

.cd-compare-col li::before {
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 0.85rem;
}

.cd-compare-old {
  background: #fdf2f2;
  border: 2px solid #fecaca;
}

.cd-compare-old h3 { color: #b91c1c; }

.cd-compare-old li::before {
  content: "\2715";
  color: #dc2626;
}

.cd-compare-new {
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
}

.cd-compare-new h3 { color: #15803d; }

.cd-compare-new li::before {
  content: "\2713";
  color: #16a34a;
}

/* ---------- CTA ---------- */
.cd-cta {
  text-align: center;
  padding: 64px 28px 80px;
}

.cd-cta p {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text-muted);
}

.cd-cta-btn {
  display: inline-block;
  padding: 14px 36px;
  background: linear-gradient(135deg, #4a90d4, #7bb8e8);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 100px;
  transition: all var(--spring);
  box-shadow: 0 4px 20px rgba(74, 144, 212, 0.3);
}

.cd-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(74, 144, 212, 0.4);
}

/* ---------- FOOTER ---------- */
.cd-footer {
  text-align: center;
  padding: 24px 28px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .cd-features {
    grid-template-columns: 1fr;
  }

  .cd-flow {
    flex-direction: column;
    align-items: stretch;
  }

  .cd-flow-arrow {
    justify-content: center;
    padding-top: 0;
    transform: rotate(90deg);
  }

  .cd-compare {
    grid-template-columns: 1fr;
  }

  .cd-hero { padding: 56px 20px 36px; }
  .cd-section { padding: 56px 20px; }
}
