/* CLEWS Framework - Main Stylesheet */
/* Matching the Next.js version styling */

:root {
  --primary: #0B5FC7;
  --secondary: #00A651;
  --accent: #FFA500;
  --weave: #FFC72C;
  --sustain: #7B2CBF;
  --foreground: #1a1a2e;
  --bg-start: #f8f9fc;
  --bg-mid: #f0f4ff;
  --bg-end: #f8f9ff;
  --border: #e5e7eb;
  --muted: #6b7280;
  --radius: 1rem;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-mid) 50%, var(--bg-end) 100%);
  color: var(--foreground);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; }

/* Morphism Styles */
.morphism {
  position: relative;
  border-radius: 1rem;
  border: 1px solid rgba(0,0,0,0.05);
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}

.morphism-strong {
  position: relative;
  border-radius: 1.5rem;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 1rem 1.5rem;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav-inner {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo img { height: 2.5rem; width: auto; }
.nav-logo span { font-size: 0.875rem; font-weight: 700; color: #1e293b; }

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border-radius: 0.5rem;
  background: linear-gradient(to right, #0B5FC7, #7B2CBF);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s;
}
.btn-primary:hover {
  box-shadow: 0 10px 15px -3px rgba(11,95,199,0.3);
  transform: scale(1.05);
}

.btn-primary-lg {
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  color: #1e293b;
  font-weight: 700;
  transition: all 0.2s;
}
.btn-outline:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

/* Hero Section */
.hero {
  position: relative;
  padding-top: 8rem;
  padding-bottom: 5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-bg-blob {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: multiply;
  filter: blur(48px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  width: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero-grid { grid-template-columns: 1fr 1fr; }
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  color: #1e293b;
}
@media (min-width: 768px) { .hero h1 { font-size: 3.75rem; } }

.gradient-text {
  background: linear-gradient(to right, #0B5FC7, #00A651, #7B2CBF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p.subtitle {
  font-size: 1.25rem;
  color: #475569;
  margin-bottom: 2.5rem;
  line-height: 1.7;
  font-weight: 500;
}

.hero-buttons { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3rem; }

.hero-note {
  font-size: 0.875rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-note svg { color: #00A651; }

/* Sections */
.section { padding: 5rem 1.5rem; }
.section-alt { background: rgba(255,255,255,0.5); }
.section-cta { background: linear-gradient(to right, rgba(11,95,199,0.05), rgba(123,44,191,0.05), rgba(255,165,0,0.05)); }

.section-inner {
  max-width: 72rem;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1rem;
}
@media (min-width: 768px) { .section-header h2 { font-size: 3rem; } }

.section-header p {
  font-size: 1.25rem;
  color: #475569;
  max-width: 48rem;
  margin: 0 auto;
}

/* Threads Grid */
.threads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
@media (min-width: 768px) { .threads-grid { grid-template-columns: repeat(5, 1fr); } }

.thread-card {
  padding: 1.5rem;
  border-radius: 1rem;
  border: 2px solid;
}
.thread-card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.125rem;
}
.thread-card h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; color: #1e293b; }
.thread-card p { font-size: 0.875rem; color: #475569; line-height: 1.5; }

/* How It Works */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }

.step-card { padding: 2rem; border-radius: 1rem; }
.step-number {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.5rem;
  background: linear-gradient(to right, #0B5FC7, #7B2CBF);
  color: #fff;
  font-weight: 700;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.step-card h3 { font-size: 1.25rem; font-weight: 700; color: #1e293b; margin-bottom: 0.75rem; }
.step-card p { color: #475569; }

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) { .pricing-grid { grid-template-columns: repeat(3, 1fr); } }

.pricing-card {
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s;
  border: 2px solid #f1f5f9;
}
.pricing-card:hover { transform: scale(1.05); border-color: #e2e8f0; }
.pricing-card.featured { border-color: #0B5FC7; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15); transform: scale(1.05); }

.pricing-bar {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #0B5FC7, #00A651, #FFC72C, #FFA500, #7B2CBF);
}
.pricing-body { padding: 2rem; }
.pricing-body h3 { font-size: 1.5rem; font-weight: 700; color: #1e293b; margin-top: 0.5rem; }
.pricing-price { margin: 1.5rem 0; }
.pricing-price span.amount { font-size: 2.5rem; font-weight: 700; color: #1e293b; }
.pricing-price span.period { color: #475569; margin-left: 0.5rem; }
.pricing-desc { color: #475569; margin-bottom: 2rem; font-size: 0.875rem; }

.pricing-btn {
  display: block;
  text-align: center;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: 700;
  transition: all 0.2s;
}
.pricing-btn-primary {
  background: linear-gradient(to right, #0B5FC7, #7B2CBF);
  color: #fff;
}
.pricing-btn-primary:hover { box-shadow: 0 10px 15px -3px rgba(11,95,199,0.3); }
.pricing-btn-outline { border: 2px solid #e2e8f0; color: #1e293b; }
.pricing-btn-outline:hover { background: #f8fafc; }

.pricing-popular { margin-top: 1rem; text-align: center; font-size: 0.75rem; color: #64748b; font-weight: 600; }

/* Info Box */
.info-box {
  background: linear-gradient(to right, rgba(239,246,255,0.5), rgba(245,243,255,0.5));
  border-radius: 1rem;
  border: 1px solid rgba(191,219,254,0.3);
  padding: 2rem 3rem;
  margin-bottom: 4rem;
}
.info-box p { font-size: 1.125rem; color: #475569; line-height: 1.7; }

/* CTA Section */
.cta-section { text-align: center; max-width: 42rem; margin: 0 auto; }
.cta-section h2 { font-size: 2.5rem; font-weight: 700; color: #1e293b; margin-bottom: 1rem; }
.cta-section p { font-size: 1.25rem; color: #475569; margin-bottom: 2rem; }

/* Footer */
.footer {
  border-top: 1px solid #e2e8f0;
  padding: 2rem 1.5rem;
  text-align: center;
  color: #475569;
  font-size: 0.875rem;
}

/* Email Gate Page */
.email-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
}

.email-gate-card {
  max-width: 28rem;
  width: 100%;
  padding: 2rem 3rem;
}

.email-gate-header { text-align: center; margin-bottom: 2rem; }
.email-gate-header img { height: 4rem; width: auto; margin: 0 auto 1.5rem; }
.email-gate-header h1 { font-size: 1.875rem; font-weight: 700; color: #1e293b; margin-bottom: 0.5rem; }
.email-gate-header p { color: #475569; font-weight: 500; }

.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 700; color: #1e293b; margin-bottom: 0.5rem; }
.form-input-wrap { position: relative; }
.form-input-wrap svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: #94a3b8; }
.form-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.8);
  color: #1e293b;
  font-size: 1rem;
  font-weight: 500;
  transition: border-color 0.2s;
}
.form-input::placeholder { color: #94a3b8; }
.form-input:focus { outline: none; border-color: #0B5FC7; }
.form-error { color: #dc2626; font-size: 0.875rem; margin-top: 0.5rem; font-weight: 600; }

.btn-submit {
  width: 100%;
  padding: 0.875rem;
  border-radius: 0.5rem;
  background: linear-gradient(to right, #0B5FC7, #7B2CBF);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s;
}
.btn-submit:hover { box-shadow: 0 10px 15px -3px rgba(11,95,199,0.3); transform: scale(1.05); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #64748b;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e2e8f0;
}

.thread-list { margin-bottom: 1.5rem; }
.thread-list-item { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.thread-dot { width: 0.75rem; height: 0.75rem; border-radius: 50%; flex-shrink: 0; }
.thread-list-item span { font-size: 0.875rem; font-weight: 500; color: #475569; }

.overview-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  text-align: center;
}

.overview-footer { font-size: 0.75rem; color: #475569; text-align: center; font-weight: 500; }

/* Assessment Form */
.assessment-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg-start), var(--bg-mid), var(--bg-end));
  padding: 2rem 1.5rem;
}

.assessment-inner { max-width: 48rem; margin: 0 auto; position: relative; }

.assessment-header { text-align: center; margin-bottom: 3rem; }
.assessment-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.thread-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 1.125rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}
.assessment-header h1 { font-size: 2.5rem; font-weight: 700; color: #1e293b; }
.assessment-header .page-info { color: #475569; font-weight: 500; }

/* Progress Bar */
.progress-wrap { margin-bottom: 2.5rem; }
.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.progress-header span { font-size: 0.875rem; font-weight: 700; color: #475569; }
.progress-header .progress-pct { color: #1e293b; }
.progress-bar { width: 100%; height: 0.75rem; background: rgba(255,255,255,0.5); border-radius: 9999px; overflow: hidden; border: 1px solid #e2e8f0; }
.progress-fill { height: 100%; background: linear-gradient(to right, #0B5FC7, #7B2CBF); transition: width 0.3s; border-radius: 9999px; }

/* Question Cards */
.question-card { padding: 1.5rem; border-radius: 1rem; border: 1px solid #e2e8f0; margin-bottom: 2rem; }
.question-header { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1.5rem; }
.question-number {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: linear-gradient(to right, #0B5FC7, #7B2CBF);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.question-text { font-size: 1.125rem; font-weight: 700; color: #1e293b; }
.question-reverse { font-size: 0.75rem; color: #ea580c; font-weight: 600; margin-top: 0.5rem; }

/* Likert Scale */
.likert-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.5rem; }
.likert-btn {
  padding: 0.75rem 0.5rem;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  border: 2px solid #e2e8f0;
  color: #475569;
  transition: all 0.2s;
  text-align: center;
}
.likert-btn:hover { border-color: #cbd5e1; transform: scale(1.05); }
.likert-btn.selected {
  background: linear-gradient(135deg, #0B5FC7, #7B2CBF);
  color: #fff;
  border-color: transparent;
}

.likert-labels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.5rem; margin-top: 0.75rem; text-align: center; }
.likert-labels span { font-size: 0.75rem; color: #64748b; font-weight: 500; }

/* Assessment Navigation */
.assessment-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; }
.btn-prev, .btn-next {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 700;
  transition: all 0.2s;
}
.btn-prev { border: 2px solid #e2e8f0; color: #1e293b; }
.btn-prev:hover { background: #f8fafc; }
.btn-prev:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-next {
  background: linear-gradient(to right, #0B5FC7, #7B2CBF);
  color: #fff;
}
.btn-next:hover { box-shadow: 0 10px 15px -3px rgba(11,95,199,0.3); transform: scale(1.05); }
.btn-next:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Results Page */
.results-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid #e2e8f0;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem 1.5rem;
}
.results-header-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.results-header img { height: 2rem; width: auto; }
.results-header a { color: #475569; font-weight: 600; font-size: 0.875rem; transition: color 0.2s; }
.results-header a:hover { color: #1e293b; }

.results-content { padding: 4rem 1.5rem; max-width: 72rem; margin: 0 auto; }

.results-summary { padding: 2rem 3rem; border-radius: 1.5rem; margin-bottom: 3rem; border: 2px solid #e2e8f0; }
.results-summary-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; }
@media (min-width: 768px) { .results-summary-grid { grid-template-columns: 1fr 1fr; } }

.results-summary h1 { font-size: 2.5rem; font-weight: 700; color: #1e293b; margin-bottom: 1rem; }
@media (min-width: 768px) { .results-summary h1 { font-size: 3rem; } }
.results-email { font-weight: 600; color: #1e293b; margin-bottom: 0.5rem; }
.results-intro { color: #475569; font-size: 1.125rem; margin-bottom: 2rem; }
.results-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.score-circle {
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe, #e9d5ff, #ffedd5);
  border: 4px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
}
.score-circle-inner { text-align: center; }
.score-circle .score-value {
  font-size: 3.75rem;
  font-weight: 700;
  background: linear-gradient(to right, #0B5FC7, #7B2CBF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.score-circle .score-label { color: #475569; font-weight: 600; margin-top: 0.75rem; }
.score-circle .score-raw { font-size: 0.75rem; color: #64748b; margin-top: 0.25rem; }

/* Thread Results */
.thread-results { margin-bottom: 3rem; }
.thread-results h2 { font-size: 1.875rem; font-weight: 700; color: #1e293b; margin-bottom: 2rem; }
.thread-results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
@media (min-width: 1024px) { .thread-results-grid { grid-template-columns: repeat(5, 1fr); } }

.thread-result-card { padding: 1.5rem; border-radius: 1rem; border: 2px solid #e2e8f0; transition: border-color 0.2s; }
.thread-result-card:hover { border-color: #cbd5e1; }
.thread-result-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}
.thread-result-card h3 { font-size: 1.125rem; font-weight: 700; color: #1e293b; margin-bottom: 0.5rem; }
.thread-progress { width: 100%; height: 0.75rem; background: #f1f5f9; border-radius: 9999px; overflow: hidden; margin-bottom: 1rem; border: 1px solid #e2e8f0; }
.thread-progress-fill { height: 100%; transition: width 0.5s; border-radius: 9999px; }
.thread-score { font-size: 1.5rem; font-weight: 700; color: #1e293b; }
.thread-score-max { font-size: 0.75rem; color: #64748b; }
.thread-activation { padding-top: 1rem; margin-top: 1rem; border-top: 1px solid #e2e8f0; }
.thread-activation-label { font-weight: 700; font-size: 0.875rem; margin-bottom: 0.25rem; }
.thread-activation-desc { font-size: 0.75rem; color: #475569; }

/* Insights */
.insights-card { padding: 2rem; border-radius: 1rem; border: 2px solid #e2e8f0; margin-bottom: 3rem; }
.insights-card h2 { font-size: 1.5rem; font-weight: 700; color: #1e293b; margin-bottom: 1.5rem; }
.insight-item { display: flex; gap: 1rem; margin-bottom: 1rem; }
.insight-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
}
.insight-item p.insight-title { font-weight: 600; color: #1e293b; }
.insight-item p.insight-desc { color: #475569; }

/* Results CTA */
.results-cta { padding: 2rem 3rem; border-radius: 1.5rem; text-align: center; border: 2px solid #e2e8f0; margin-bottom: 3rem; }
.results-cta h2 { font-size: 1.875rem; font-weight: 700; color: #1e293b; margin-bottom: 1rem; }
.results-cta p { color: #475569; font-size: 1.125rem; margin-bottom: 2rem; max-width: 42rem; margin-left: auto; margin-right: auto; }

.results-footer-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-bottom: 2rem; }
.results-footer { text-align: center; color: #64748b; font-size: 0.875rem; border-top: 1px solid #e2e8f0; padding-top: 2rem; }

/* Background blobs */
.bg-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: multiply;
  filter: blur(48px);
}

/* Utility */
.text-center { text-align: center; }
.hidden { display: none; }
