/* BuildBetterOS — main stylesheet */

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

:root {
  --ink: #0a0f1a;
  --paper: #fafaf8;
  --sage: #3d6b5e;
  --sage-light: #e8f0ec;
  --sage-dark: #2a4d42;
  --warm: #c9a96e;
  --warm-light: #f5edd8;
  --muted: #6b7280;
  --border: #e5e5e0;
  --radius: 6px;
  --shadow: 0 2px 12px rgba(10, 15, 26, 0.08);
  --shadow-md: 0 4px 24px rgba(10, 15, 26, 0.12);
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { font-family: 'Space Grotesk', sans-serif; }

a { color: inherit; text-decoration: none; }

/* ===== NAV ===== */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--sage-dark);
  letter-spacing: -0.02em;
}
.logo span { color: var(--warm); }

.nav-tag {
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--sage-light);
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  font-weight: 500;
}

.nav-cta {
  background: var(--sage-dark);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s ease;
  font-family: 'Space Grotesk', sans-serif;
}
.nav-cta:hover { background: var(--sage); }

/* ===== HERO ===== */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text h1 {
  font-size: 3.25rem;
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero-text h1 em {
  font-style: normal;
  color: var(--sage);
}

.hero-text p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 440px;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-primary {
  background: var(--sage-dark);
  color: #fff;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  transition: background 0.2s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  background: var(--sage);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  border: 1.5px solid var(--border);
  transition: border-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
}
.btn-secondary:hover {
  border-color: var(--sage);
  color: var(--sage-dark);
}

/* Hero card visual */
.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.score-preview-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.score-preview-card .score-ring {
  width: 90px;
  height: 90px;
  margin: 0 auto 1.25rem;
  position: relative;
}
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring circle { fill: none; stroke-width: 8; }
.score-ring .track { stroke: var(--sage-light); }
.score-ring .fill { stroke: var(--sage); stroke-linecap: round; stroke-dasharray: 220; stroke-dashoffset: 77; }
.score-ring .label {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
}

.preview-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}
.preview-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  background: var(--paper);
}
.preview-item.ok { color: var(--sage-dark); background: var(--sage-light); }
.preview-item.warn { color: #92400e; background: #fef3c7; }
.preview-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.preview-item.ok .dot { background: var(--sage); }
.preview-item.warn .dot { background: #f59e0b; }

/* ===== FEATURES SECTION ===== */
.features {
  background: var(--ink);
  padding: 5rem 2.5rem;
}
.features-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--warm);
}
.features h2 {
  font-size: 2.25rem;
  letter-spacing: -0.025em;
  margin-bottom: 3rem;
  color: #fff;
  max-width: 480px;
}

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

.feature-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 1.75rem;
  transition: background 0.2s ease;
}
.feature-card:hover { background: rgba(255,255,255,0.07); }

.feature-icon {
  width: 40px;
  height: 40px;
  background: var(--sage-dark);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}
.feature-card p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}

/* ===== CTA SECTION ===== */
.cta-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2.5rem;
  text-align: center;
}
.cta-section h2 {
  font-size: 2.5rem;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}
.cta-section p {
  color: var(--muted);
  max-width: 440px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ===== SCORECARD APP ===== */
.scorecard-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.scorecard-main {
  flex: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  width: 100%;
}

/* Progress bar */
.progress-bar-wrap {
  margin-bottom: 2.5rem;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-family: 'Space Grotesk', sans-serif;
}
.progress-track {
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--sage);
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* Question card */
.question-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.question-number {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--sage);
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 0.75rem;
}

.question-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.625rem;
}

.question-why {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
  line-height: 1.55;
}

.answer-buttons {
  display: flex;
  gap: 0.75rem;
}

.answer-btn {
  flex: 1;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 2px solid var(--border);
  background: var(--paper);
  color: var(--ink);
}
.answer-btn:hover { border-color: var(--sage); background: var(--sage-light); }
.answer-btn.selected-yes {
  background: var(--sage-dark);
  border-color: var(--sage-dark);
  color: #fff;
}
.answer-btn.selected-no {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

/* Navigation buttons */
.question-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.btn-nav {
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--muted);
  transition: all 0.15s ease;
}
.btn-nav:hover { border-color: var(--ink); color: var(--ink); }
.btn-nav:disabled { opacity: 0.3; cursor: default; pointer-events: none; }

.btn-next {
  background: var(--sage-dark);
  border-color: var(--sage-dark);
  color: #fff;
  padding: 0.625rem 1.75rem;
}
.btn-next:hover { background: var(--sage); border-color: var(--sage); }
.btn-next:disabled { opacity: 0.3; cursor: default; pointer-events: none; }

/* ===== RESULTS PAGE ===== */
.results-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 auto 1rem;
  border: 3px solid;
}
.grade-A { background: var(--sage-light); color: var(--sage-dark); border-color: var(--sage); }
.grade-B { background: #dbeafe; color: #1e40af; border-color: #3b82f6; }
.grade-C { background: #fef3c7; color: #92400e; border-color: #f59e0b; }
.grade-D { background: #fee2e2; color: #991b1b; border-color: #ef4444; }
.grade-F { background: #fce7f3; color: #9d174d; border-color: #ec4899; }

.score-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.score-label {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.results-summary {
  font-size: 1rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
}

/* Doc status list */
.doc-status-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 2rem;
}

.doc-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  background: #fff;
  border: 1.5px solid var(--border);
}
.doc-item.have {
  border-color: rgba(61, 107, 94, 0.3);
  background: var(--sage-light);
}
.doc-item.missing {
  border-color: rgba(245, 158, 11, 0.4);
  background: #fffbeb;
}
.doc-item.critical {
  border-color: rgba(239, 68, 68, 0.4);
  background: #fef2f2;
}

.doc-status-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 0.875rem;
}

.doc-item-body {}
.doc-item-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.doc-item-why { font-size: 0.8rem; color: var(--muted); }

.section-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.875rem;
}

/* Email capture */
.email-capture {
  background: var(--ink);
  border-radius: 12px;
  padding: 2rem;
  color: #fff;
  text-align: center;
  margin-top: 2rem;
}
.email-capture h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.email-capture p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1.5rem;
}
.email-form {
  display: flex;
  gap: 0.75rem;
  max-width: 400px;
  margin: 0 auto;
}
.email-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1.5px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.email-input::placeholder { color: rgba(255,255,255,0.4); }
.email-input:focus { border-color: var(--warm); }

.btn-email {
  padding: 0.75rem 1.5rem;
  background: var(--warm);
  color: var(--ink);
  border: none;
  border-radius: var(--radius);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-email:hover { background: #d4b07a; }

.email-success {
  display: none;
  font-size: 0.9rem;
  color: var(--sage-light);
  padding: 0.75rem;
}

/* Priority badge */
.priority-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.5rem;
}
.priority-critical { background: #fee2e2; color: #991b1b; }
.priority-high { background: #fef3c7; color: #92400e; }

/* Restart button */
.btn-restart {
  display: block;
  text-align: center;
  margin: 1.5rem auto 0;
  padding: 0.625rem 1.25rem;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-restart:hover { border-color: var(--ink); color: var(--ink); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  nav { padding: 1.25rem 1.25rem; }
  .hero {
    grid-template-columns: 1fr;
    padding: 3rem 1.25rem 2rem;
    gap: 2.5rem;
  }
  .hero-text h1 { font-size: 2.25rem; }
  .hero-visual { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .features { padding: 3rem 1.25rem; }
  .cta-section { padding: 3rem 1.25rem; }
  .cta-section h2 { font-size: 1.75rem; }
  footer { flex-direction: column; gap: 0.5rem; text-align: center; }
  .scorecard-main { padding: 2rem 1.25rem; }
  .email-form { flex-direction: column; }
}
