
:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Georgia', serif;
  --letter-spacing-tight: -0.02em;
  --line-height-tight: 1.1;
}

body {
  font-family: var(--font-main);
  letter-spacing: var(--letter-spacing-tight);
}

h1, h2, h3 {
  font-family: var(--font-main);
  font-weight: 800;
  line-height: var(--line-height-tight);
  letter-spacing: -0.04em;
}

.hero-headline em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}

.premium-card {
  border-radius: 0; /* Sharp corners for a more architectural feel */
  border: 1px solid var(--border);
  background: #000;
}

.btn-primary {
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

:root {
  --bg-deep: #050508;
  --bg-card: #0a0a0f;
  --bg-elevated: #11111a;
  --accent: #6C63FF;
  --accent-glow: rgba(108, 99, 255, 0.4);
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(255, 255, 255, 0.15);
  --radius-lg: 12px;
  --radius-xl: 20px;
  --font-main: 'Manrope', sans-serif;
  --font-serif: 'Fraunces', serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.premium-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.premium-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.premium-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: var(--transition);
}

.premium-card:hover::after {
  opacity: 1;
}

.btn-premium {
  background: var(--accent);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-premium:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.metric-text {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================
   ClearNextAI — Design System
   Business Clarity Platform for UK Freelancers
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --bg-deep:      #0d0d1a;
  --bg-card:      #1a1a2e;
  --bg-elevated:  #22223a;
  --accent:       #6C63FF;
  --accent-glow:  rgba(108,99,255,0.15);
  --accent-hover: #7b73ff;
  --success:      #00C896;
  --warning:      #FFB347;
  --danger:       #FF4D4D;
  --text-primary: #FFFFFF;
  --text-muted:   #8888aa;
  --border:       rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --radius-xl:    20px;
  --shadow-card:  0 4px 24px rgba(0,0,0,0.3);
  --shadow-glow:  0 0 30px rgba(108,99,255,0.2);
  --transition:   200ms ease;
}

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

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

body {
  font-family: 'Manrope', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.125rem; }

p { color: var(--text-muted); line-height: 1.7; }

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

code, .mono {
  font-family: 'IBM Plex Mono', monospace;
}

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

/* --- Utility Classes --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.hidden { display: none !important; }

/* --- Card Component --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
  backdrop-filter: blur(10px);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card);
}

.card-elevated {
  background: var(--bg-elevated);
}

/* Pillar-specific card borders */
.card-capture { border-left: 3px solid var(--accent); }
.card-convert { border-left: 3px solid var(--warning); }
.card-grow    { border-left: 3px solid var(--success); }

/* --- Button Component --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-glow);
  color: #fff;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  padding: 0.5rem 0;
}
.btn-ghost:hover {
  color: var(--accent-hover);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-block {
  width: 100%;
}

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

/* --- Badge Component --- */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-accent {
  background: var(--accent-glow);
  color: var(--accent);
}

.badge-success {
  background: rgba(0,200,150,0.15);
  color: var(--success);
}

.badge-warning {
  background: rgba(255,179,71,0.15);
  color: var(--warning);
}

.badge-danger {
  background: rgba(255,77,77,0.15);
  color: var(--danger);
}

.badge-pro {
  background: linear-gradient(135deg, var(--accent), #9b59b6);
  color: #fff;
}

.badge-business {
  background: linear-gradient(135deg, var(--success), #2ecc71);
  color: #fff;
}

.badge-free {
  background: var(--bg-elevated);
  color: var(--text-muted);
}

/* --- Input Component --- */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.input, .textarea, select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: 'Manrope', sans-serif;
  font-size: 0.95rem;
  transition: border-color var(--transition);
  outline: none;
  width: 100%;
}

.input:focus, .textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

/* --- Modal Component --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow-card);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

/* --- Spinner Component --- */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

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

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

/* --- Toast / Alert Component --- */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 300ms ease;
}

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

.toast-success {
  background: var(--success);
  color: #fff;
}

.toast-error {
  background: var(--danger);
  color: #fff;
}

.toast-info {
  background: var(--accent);
  color: #fff;
}

/* --- Navbar Component --- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(13,13,26,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.navbar-brand span {
  color: var(--accent);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

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

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* --- Sidebar Component (Dashboard) --- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  transition: transform 300ms ease;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}

.sidebar-section {
  padding: 0.5rem 1.5rem;
  margin-top: 0.5rem;
}

.sidebar-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
}

.sidebar-link:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: var(--accent-glow);
  color: var(--accent);
}

.sidebar-link .badge {
  margin-left: auto;
  font-size: 0.6rem;
}

.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}

.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 2rem;
  min-height: 100vh;
}

/* --- Stepper Component --- */
.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding: 1rem 0;
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.stepper-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.stepper-step.active .stepper-dot {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.stepper-step.completed .stepper-dot {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

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

.stepper-line {
  width: 40px;
  height: 2px;
  background: var(--border);
  flex-shrink: 0;
}

/* --- Pricing Table --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all var(--transition);
  position: relative;
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  transform: scale(1.03);
}

.pricing-card.featured::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 0.25rem 1rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.pricing-price {
  font-family: 'Fraunces', serif;
  font-size: 3rem;
  font-weight: 900;
  margin: 1rem 0 0.5rem;
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin: 1.5rem 0;
}

.pricing-features li {
  padding: 0.5rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pricing-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
}

/* --- FAQ Accordion --- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: none;
  color: var(--text-primary);
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition);
}

.faq-question:hover {
  background: var(--bg-elevated);
}

.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--accent);
  transition: transform var(--transition);
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease;
}

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Social Proof Widget --- */
.social-proof-widget {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  z-index: 50;
  box-shadow: var(--shadow-card);
}

.social-proof-widget .stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.social-proof-widget .stat:last-child {
  margin-bottom: 0;
}

.social-proof-widget .stat-num {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  color: var(--accent);
}

/* --- Soft Paywall Banner --- */
.paywall-banner {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0;
}

.paywall-banner p {
  color: var(--text-primary);
  font-size: 0.95rem;
}

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

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .pricing-card.featured {
    transform: none;
  }

  .navbar-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 2rem;
    gap: 1rem;
  }

  .navbar-links.open {
    display: flex;
  }

  .navbar-toggle {
    display: block;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .stepper {
    flex-wrap: wrap;
    justify-content: center;
  }

  .stepper-line {
    display: none;
  }

  .paywall-banner {
    flex-direction: column;
    text-align: center;
  }

  .section {
    padding: 3rem 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .modal {
    padding: 1.5rem;
  }
}
