/* CloserApart Platform Styles */
/* Design tokens match landing page */

:root {
  --warm: #F5E6D3;
  --deep: #2D1B14;
  --accent: #D4594E;
  --accent-light: #E8887F;
  --cream: #FBF7F2;
  --muted: #8B7355;
  --soft-pink: #F2D4CF;
  --green: #4A7C59;
  --green-light: #E8F5E9;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--deep);
  background: var(--cream);
  overflow-x: hidden;
}

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(251, 247, 242, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(45, 27, 20, 0.06);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--deep);
  text-decoration: none;
}

.nav-logo span {
  color: var(--accent);
}

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

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

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

.nav-links .btn-small {
  padding: 8px 20px;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s;
}

.nav-links .btn-small:hover {
  background: var(--accent-light);
  color: white;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 36px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  gap: 8px;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: #C04A3F;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--deep);
  color: var(--warm);
}

.btn-secondary:hover {
  background: #3D2B24;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--deep);
  border: 2px solid var(--deep);
}

.btn-outline:hover {
  background: var(--deep);
  color: var(--warm);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  padding: 8px 16px;
}

.btn-ghost:hover {
  background: rgba(212, 89, 78, 0.08);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ============ FORMS ============ */
.form-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 60px;
  background: linear-gradient(160deg, var(--cream) 0%, var(--warm) 40%, var(--soft-pink) 100%);
}

.form-card {
  background: white;
  border-radius: 24px;
  padding: 48px 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 4px 24px rgba(45, 27, 20, 0.08);
}

.form-card h1 {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--deep);
}

.form-card .subtitle {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 32px;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--deep);
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  border: 2px solid rgba(45, 27, 20, 0.12);
  border-radius: 10px;
  background: var(--cream);
  color: var(--deep);
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus {
  border-color: var(--accent);
  background: white;
}

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

.form-error {
  background: #FEF2F2;
  color: var(--accent);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
  border: 1px solid rgba(212, 89, 78, 0.2);
}

.form-error.visible {
  display: block;
}

.form-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.form-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

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

/* ============ COURSE PAGE ============ */
.course-hero {
  padding: 120px 40px 80px;
  background: linear-gradient(160deg, var(--cream) 0%, var(--warm) 40%, var(--soft-pink) 100%);
  position: relative;
}

.course-hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
  opacity: 0.12;
  border-radius: 50%;
}

.course-hero-inner {
  max-width: 700px;
  position: relative;
  z-index: 2;
}

.course-tag {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 20px;
}

.course-hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.05;
  color: var(--deep);
  margin-bottom: 20px;
}

.course-hero .description {
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 560px;
}

/* Progress Bar */
.progress-section {
  padding: 0 40px;
  margin-top: -40px;
  position: relative;
  z-index: 3;
  max-width: 900px;
}

.progress-card {
  background: white;
  border-radius: 16px;
  padding: 24px 32px;
  box-shadow: 0 4px 20px rgba(45, 27, 20, 0.08);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.progress-bar-container {
  flex: 1;
  min-width: 200px;
}

.progress-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--deep);
  margin-bottom: 8px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--warm);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 4px;
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}

/* Lessons List */
.lessons-section {
  padding: 60px 40px 100px;
  max-width: 900px;
}

.lessons-section h2 {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 32px;
  color: var(--deep);
}

.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lesson-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: white;
  border-radius: 16px;
  padding: 24px 28px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.lesson-card:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.lesson-card.locked {
  opacity: 0.6;
  pointer-events: none;
}

.lesson-card.locked:hover {
  border-color: transparent;
  transform: none;
}

.lesson-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 800;
  background: var(--warm);
  color: var(--deep);
}

.lesson-card.completed .lesson-number {
  background: var(--green-light);
  color: var(--green);
}

.lesson-info {
  flex: 1;
}

.lesson-info h3 {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--deep);
}

.lesson-info p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.lesson-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.lesson-duration {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.lesson-status {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(45, 27, 20, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: transparent;
}

.lesson-card.completed .lesson-status {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.lock-icon {
  font-size: 16px;
  color: var(--muted);
}

/* ============ LESSON PAGE ============ */
.lesson-hero {
  padding: 120px 40px 60px;
  background: linear-gradient(160deg, var(--cream) 0%, var(--warm) 50%);
}

.lesson-hero-inner {
  max-width: 700px;
}

.lesson-breadcrumb {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

.lesson-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.lesson-breadcrumb a:hover {
  text-decoration: underline;
}

.lesson-hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--deep);
  margin-bottom: 16px;
}

.lesson-hero .lesson-desc {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.lesson-body {
  padding: 60px 40px 100px;
  max-width: 760px;
}

/* Lesson Content Styles */
.lesson-content h2 {
  font-family: 'Syne', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--deep);
  margin-top: 48px;
  margin-bottom: 16px;
}

.lesson-content p {
  font-size: 17px;
  line-height: 1.8;
  color: #4A3828;
  margin-bottom: 16px;
}

.lesson-content ul, .lesson-content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.lesson-content li {
  font-size: 17px;
  line-height: 1.8;
  color: #4A3828;
  margin-bottom: 8px;
}

.lesson-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 20px 24px;
  margin: 24px 0;
  background: rgba(212, 89, 78, 0.04);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.lesson-content strong {
  color: var(--deep);
  font-weight: 700;
}

.lesson-content em {
  font-style: italic;
}

.lesson-intro {
  margin-bottom: 32px;
}

.lesson-intro p:first-child {
  font-size: 19px;
  line-height: 1.7;
}

/* Framework Boxes */
.framework-box {
  background: white;
  border-radius: 16px;
  padding: 32px;
  margin: 32px 0;
  border: 1px solid rgba(45, 27, 20, 0.08);
}

.framework-level {
  padding: 20px 0;
  border-bottom: 1px solid rgba(45, 27, 20, 0.06);
}

.framework-level:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.framework-level:first-child {
  padding-top: 0;
}

.framework-level h3 {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.framework-level p {
  font-size: 16px;
  line-height: 1.7;
  color: #4A3828;
  margin-bottom: 8px;
}

.framework-level ul {
  padding-left: 20px;
}

.framework-level li {
  font-size: 16px;
  line-height: 1.7;
  color: #4A3828;
  margin-bottom: 4px;
}

.framework-level .example {
  background: var(--cream);
  padding: 12px 16px;
  border-radius: 8px;
  font-style: italic;
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 8px;
}

.framework-level .note {
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}

/* Action Box */
.action-box {
  background: linear-gradient(135deg, var(--warm) 0%, var(--soft-pink) 100%);
  border-radius: 16px;
  padding: 32px;
  margin-top: 48px;
}

.action-box h3 {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--deep);
  margin-bottom: 12px;
}

.action-box p {
  font-size: 16px;
  line-height: 1.7;
  color: #4A3828;
}

.action-box ol {
  padding-left: 20px;
  margin: 12px 0;
}

.action-box li {
  font-size: 16px;
  line-height: 1.7;
  color: #4A3828;
  margin-bottom: 4px;
}

/* Lesson Navigation */
.lesson-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 40px;
  max-width: 760px;
  gap: 16px;
  flex-wrap: wrap;
}

.lesson-complete-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.lesson-complete-btn:hover {
  background: #3A6C49;
  transform: translateY(-1px);
}

.lesson-complete-btn.completed {
  background: var(--green-light);
  color: var(--green);
  cursor: default;
}

.lesson-next-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.lesson-next-link:hover {
  text-decoration: underline;
}

/* ============ CHECKOUT ============ */
.checkout-page {
  min-height: 100vh;
  padding: 120px 40px 80px;
  background: linear-gradient(160deg, var(--cream) 0%, var(--warm) 40%, var(--soft-pink) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkout-card {
  background: white;
  border-radius: 24px;
  padding: 48px 40px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(45, 27, 20, 0.1);
}

.checkout-card h1 {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.checkout-card .subtitle {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 32px;
}

.checkout-details {
  background: var(--cream);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
}

.checkout-course-title {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.checkout-features {
  list-style: none;
  padding: 0;
}

.checkout-features li {
  font-size: 14px;
  color: var(--muted);
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkout-features li::before {
  content: '\\2713';
  color: var(--green);
  font-weight: 700;
}

.checkout-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 24px;
}

.checkout-price .amount {
  font-family: 'Syne', sans-serif;
  font-size: 48px;
  font-weight: 800;
  color: var(--deep);
}

.checkout-price .period {
  font-size: 16px;
  color: var(--muted);
}

.checkout-guarantee {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-top: 16px;
}

/* Payment confirmation banner */
.payment-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 16px;
  padding: 20px 28px;
  box-shadow: 0 8px 32px rgba(45, 27, 20, 0.15);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 200;
  max-width: 500px;
  width: calc(100% - 48px);
  border: 2px solid var(--accent);
}

.payment-banner p {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: var(--deep);
}

.payment-banner .btn {
  padding: 10px 20px;
  font-size: 14px;
  white-space: nowrap;
}

/* ============ DASHBOARD ============ */
.dashboard-page {
  padding: 100px 40px 80px;
  max-width: 900px;
}

.dashboard-page h1 {
  font-family: 'Syne', sans-serif;
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 32px;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.stat-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

.stat-card .stat-value {
  font-family: 'Syne', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
}

.stat-card .stat-name {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

/* ============ FOOTER ============ */
.app-footer {
  padding: 40px;
  background: var(--deep);
  text-align: center;
}

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

.app-footer .brand {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  color: var(--warm);
}

/* ============ MOBILE ============ */
@media (max-width: 768px) {
  .nav {
    padding: 12px 20px;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a:not(.btn-small) {
    display: none;
  }

  .course-hero {
    padding: 100px 24px 60px;
  }

  .progress-section {
    padding: 0 24px;
  }

  .progress-card {
    padding: 20px 24px;
  }

  .lessons-section {
    padding: 40px 24px 80px;
  }

  .lesson-card {
    padding: 20px;
    flex-wrap: wrap;
  }

  .lesson-meta {
    width: 100%;
    justify-content: space-between;
    margin-top: 8px;
    padding-left: 68px;
  }

  .lesson-hero {
    padding: 100px 24px 40px;
  }

  .lesson-body {
    padding: 40px 24px 80px;
  }

  .lesson-nav {
    padding: 24px;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .checkout-page {
    padding: 100px 24px 60px;
  }

  .checkout-card {
    padding: 36px 28px;
  }

  .dashboard-page {
    padding: 100px 24px 60px;
  }

  .form-page {
    padding: 100px 20px 40px;
  }

  .form-card {
    padding: 36px 28px;
  }
}

@media (max-width: 480px) {
  .lesson-card {
    gap: 14px;
  }

  .lesson-number {
    width: 40px;
    height: 40px;
    font-size: 15px;
    border-radius: 10px;
  }

  .lesson-info h3 {
    font-size: 16px;
  }

  .lesson-meta {
    padding-left: 54px;
  }
}
