/* ============================================
   TESSA Tools: Scorecard Stylesheet
   Dark theme, green + blue accents
   ============================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #000000;
  color: #bdb9a0;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: #a5be9b; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #ffffff; }
ul, ol { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Poppins', sans-serif;
  color: #ffffff;
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: 2.4rem; margin-bottom: 1.25rem; }
h2 { font-size: 1.8rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }

.accent { color: #a5be9b; }
.accent-teal { color: #4ecdc4; }

.label {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #a5be9b;
  margin-bottom: 0.5rem;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn--primary {
  background-color: #3d7769;
  color: #ffffff;
  border-color: #3d7769;
}
.btn--primary:hover {
  background-color: #2c5a4e;
  border-color: #2c5a4e;
  color: #ffffff;
}

.btn--outline {
  background: transparent;
  color: #a5be9b;
  border-color: #a5be9b;
}
.btn--outline:hover {
  background-color: #a5be9b;
  color: #000000;
}

.btn--large {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

.btn--teal {
  background-color: #4ecdc4;
  color: #000000;
  border-color: #4ecdc4;
}
.btn--teal:hover {
  background-color: #3db8b0;
  border-color: #3db8b0;
  color: #000000;
}

.btn--done {
  background-color: rgba(78, 205, 196, 0.15);
  color: #4ecdc4;
  border-color: rgba(78, 205, 196, 0.3);
  cursor: default;
  pointer-events: none;
}

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

/* ===== HEADER / NAV ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(165, 190, 155, 0.1);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
}

.nav__logo img {
  height: 40px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #bdb9a0;
}
.nav__links a:hover { color: #ffffff; }

.nav__cta {
  font-size: 0.85rem !important;
  padding: 0.5rem 1rem !important;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #bdb9a0;
  transition: 0.2s;
}

.nav__dropdown { position: relative; }
.nav__dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #111;
  border: 1px solid rgba(165, 190, 155, 0.15);
  border-radius: 8px;
  padding: 0.5rem 0;
  min-width: 160px;
  z-index: 200;
}
.nav__dropdown:hover .nav__dropdown-menu { display: block; }
.nav__dropdown-menu a {
  display: block;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
}

/* ===== HERO SECTION ===== */
.sc-hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a2f25 50%, #0a0a0a 100%);
}

.sc-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.sc-hero__content {
  max-width: 520px;
}

.sc-hero__hook {
  font-size: 1.1rem;
  color: #e67e22;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.sc-hero__content h1 {
  margin-bottom: 1rem;
}

.sc-hero__sub {
  font-size: 1rem;
  color: #d4d0c0;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.sc-hero__meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.sc-hero__badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  background: rgba(165, 190, 155, 0.12);
  color: #a5be9b;
  border: 1px solid rgba(165, 190, 155, 0.2);
}

.sc-hero__image {
  position: relative;
}

.sc-hero__image img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ===== THREE AREAS ===== */
.sc-areas {
  padding: 4rem 0;
  background: #0a0a0a;
}

.sc-areas__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

.sc-areas__heading {
  margin-bottom: 2.5rem;
  font-size: 1.6rem;
}

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

.sc-area-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(165, 190, 155, 0.15);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.sc-area-card:hover {
  border-color: rgba(165, 190, 155, 0.4);
  transform: translateY(-4px);
}

.sc-area-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(165, 190, 155, 0.1);
  margin-bottom: 1.25rem;
}

.sc-area-card h3 {
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.sc-area-card p {
  font-size: 0.9rem;
  color: #bdb9a0;
  line-height: 1.6;
  margin: 0;
}

.sc-areas__stat {
  font-size: 0.95rem;
  color: #888;
  font-style: italic;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== VISUAL BREAK ===== */
.sc-visual-break {
  position: relative;
  height: 100px;
  overflow: hidden;
  margin-top: -1rem;
}

.sc-visual-break img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: 0.35;
}

.sc-visual-break__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #0a0a0a 0%, transparent 30%, transparent 70%, #0a0a0a 100%);
}

/* ===== QUIZ PAGE ===== */
.quiz-page {
  min-height: 60vh;
  padding: 3rem 0 6rem;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a2f25 50%, #0a0a0a 100%);
}

/* Progress bar */
.quiz-progress {
  margin-bottom: 2rem;
}

.quiz-progress__bar {
  height: 6px;
  background: rgba(165, 190, 155, 0.15);
  border-radius: 3px;
  overflow: hidden;
}

.quiz-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, #3d7769, #4ecdc4);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.quiz-progress__text {
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.5rem;
  text-align: center;
}

/* Quiz steps */
.quiz-step {
  text-align: center;
  padding: 2rem 0;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #a5be9b;
  background: rgba(61, 119, 105, 0.15);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
}

.quiz-question {
  font-size: 1.4rem;
  line-height: 1.4;
  max-width: 600px;
  margin: 0 auto 2rem;
  color: #ffffff;
}

.quiz-options {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.quiz-option {
  cursor: pointer;
}

.quiz-option input { display: none; }

.quiz-option__box {
  display: block;
  min-width: 140px;
  padding: 1rem 2.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(165, 190, 155, 0.2);
  border-radius: 12px;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.2s ease;
  text-align: center;
}

.quiz-option__box:hover {
  border-color: #a5be9b;
  background: rgba(165, 190, 155, 0.08);
}

.quiz-option input:checked + .quiz-option__box {
  border-color: #3d7769;
  background: rgba(61, 119, 105, 0.2);
  color: #a5be9b;
}

/* Quiz nav */
.quiz-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.quiz-error {
  text-align: center;
  color: #c0392b;
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* ===== RESULTS PAGE ===== */
.results-page {
  padding: 3rem 0 4rem;
  background: linear-gradient(180deg, #0a0a0a 0%, #0d1f17 30%, #0a0a0a 100%);
  min-height: 100vh;
}

/* Loading */
.results-loading {
  text-align: center;
  padding: 6rem 0;
}

.results-loading__spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(165, 190, 155, 0.2);
  border-top-color: #a5be9b;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

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

/* Results hero */
.results-hero {
  text-align: center;
  padding: 2rem 0 3rem;
}

.score-gauge {
  position: relative;
  max-width: 220px;
  margin: 1.5rem auto;
}

.score-gauge__svg { width: 100%; height: auto; }

.score-gauge__value {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.score-gauge__number {
  font-size: 2.8rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.score-gauge__max {
  font-size: 1.2rem;
  color: #888;
}

/* Tier badge */
.tier-badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border: 2px solid;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1rem;
  margin: 1rem 0 0.75rem;
}

.tier-description {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Sub-score breakdown */
.results-breakdown {
  padding: 2.5rem 0;
  text-align: center;
}

.subscore-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.subscore-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(165, 190, 155, 0.1);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  text-align: left;
}

.subscore-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.subscore-card__score {
  font-weight: 700;
  font-size: 1.1rem;
  color: #ffffff;
}

.subscore-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.subscore-bar__fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1.2s ease-out;
  background-color: #3d7769;
}

.subscore-card__detail {
  font-size: 0.85rem;
  color: #888;
  margin: 0;
}

/* Insights */
.results-insights {
  padding: 2.5rem 0;
  text-align: center;
}

.insights-list {
  margin-top: 1.5rem;
  text-align: left;
}

.insight-card {
  background: rgba(192, 57, 43, 0.08);
  border-left: 4px solid #c0392b;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.insight-card--good {
  background: rgba(61, 119, 105, 0.08);
  border-left-color: #3d7769;
}

.insight-card--more {
  background: rgba(78, 205, 196, 0.06);
  border-left-color: #4ecdc4;
}

.insight-card--more p {
  color: #d4d0c0;
  margin: 0;
}

.insight-card__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.insight-card__icon { font-size: 1.1rem; }

.insight-card__category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #a5be9b;
}

.insight-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

/* Results CTA */
.results-cta {
  padding: 2rem 0;
}

.results-cta__card {
  background: rgba(255, 255, 255, 0.03);
  border-top: 4px solid #3d7769;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}

.results-cta__card p {
  max-width: 500px;
  margin: 0.75rem auto 1.5rem;
}

/* Results nudge (bridge between results and Step 2) */
.results-nudge {
  text-align: center;
  padding: 1rem 0 0.5rem;
}

.results-nudge__text {
  font-size: 1.05rem;
  color: #d4d0c0;
  max-width: 550px;
  margin: 0 auto;
}

/* ===== CAPTURE SECTION ===== */
.results-capture {
  padding: 3rem 0;
}

.capture-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(165, 190, 155, 0.12);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  overflow: hidden;
}

.capture-card__header {
  text-align: center;
  margin-bottom: 2rem;
}

.capture-card__header p {
  max-width: 500px;
  margin: 0.5rem auto 0;
  color: #d4d0c0;
}

.capture-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
}

.capture-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.capture-field--full {
  grid-column: 1 / -1;
}

.capture-field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #d4d0c0;
  margin-bottom: 0.3rem;
}

.required { color: #c0392b; }
.optional { color: #888; font-weight: 400; font-size: 0.8rem; }

.capture-field input,
.capture-field select,
.capture-field textarea {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(165, 190, 155, 0.2);
  border-radius: 8px;
  color: #ffffff;
  transition: border-color 0.2s;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.capture-field input:focus,
.capture-field select:focus,
.capture-field textarea:focus {
  outline: none;
  border-color: #a5be9b;
}

.capture-field input::placeholder,
.capture-field textarea::placeholder {
  color: #666;
}

.capture-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.capture-field select option {
  background: #111;
  color: #bdb9a0;
}

.capture-field textarea {
  resize: vertical;
  min-height: 80px;
}

/* Step divider */
.step-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.step-divider__line {
  flex: 1;
  height: 1px;
  background: rgba(78, 205, 196, 0.2);
}

.step-divider__badge {
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #4ecdc4;
  background: rgba(78, 205, 196, 0.08);
  padding: 0.3rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(78, 205, 196, 0.2);
  white-space: nowrap;
}

/* Qualifying section (Step 3) */
.results-qualify {
  padding: 3rem 0;
  max-width: 100%;
  box-sizing: border-box;
}

.results-qualify .capture-card {
  max-width: 100%;
  box-sizing: border-box;
}

.results-qualify .capture-grid {
  max-width: 100%;
}


/* Success inner */
.capture-success__inner {
  padding: 1rem 0;
}

/* Consent checkbox */
.capture-consent {
  margin-top: 1.5rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.8rem;
  color: #888;
  line-height: 1.5;
}

.checkbox-label input { display: none; }

.checkbox-mark {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(165, 190, 155, 0.3);
  border-radius: 4px;
  position: relative;
  transition: all 0.2s;
  margin-top: 2px;
}

.checkbox-label input:checked + .checkbox-mark {
  background: #3d7769;
  border-color: #3d7769;
}

.checkbox-label input:checked + .checkbox-mark::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-text a { color: #a5be9b; text-decoration: underline; }

/* Error + submit */
.capture-error {
  text-align: center;
  color: #c0392b;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.capture-submit {
  text-align: center;
  margin-top: 1.5rem;
}

/* Success */
.capture-success {
  text-align: center;
  padding: 2rem 0;
}

.capture-success__icon {
  width: 60px;
  height: 60px;
  background: rgba(61, 119, 105, 0.2);
  border: 2px solid #3d7769;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: #3d7769;
}

.capture-success h3 { margin-bottom: 0.5rem; }

.capture-success__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* Share */
.results-share {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid rgba(165, 190, 155, 0.08);
}

.results-share p { font-size: 0.9rem; }

.results-share__url {
  font-weight: 600;
  color: #a5be9b;
  font-size: 1rem;
  margin-top: 0;
}

/* ===== FOOTER ===== */
.footer {
  background: #0a0a0a;
  padding: 2rem 0;
  border-top: 1px solid rgba(165, 190, 155, 0.08);
}

.footer .container {
  max-width: 1200px;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer__left h4 {
  color: #ffffff;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.footer__tagline {
  font-size: 0.9rem;
  color: #bdb9a0;
  margin: 0;
}

.footer__legal {
  font-size: 0.85rem;
  color: #bdb9a0;
  margin: 0;
  line-height: 1.6;
  text-align: center;
}

.footer__legal a { color: #a5be9b; }

.footer__social {
  display: flex;
  gap: 0.75rem;
}

.footer__social-icon img {
  width: 28px;
  height: 28px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer__social-icon:hover img { opacity: 1; }

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }

  .nav__toggle { display: flex; }

  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #111;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(165, 190, 155, 0.1);
  }

  .nav__links--open { display: flex; }

  .nav__dropdown-menu {
    position: static;
    border: none;
    background: transparent;
    padding-left: 1rem;
  }

  /* Hero mobile */
  .sc-hero { padding: 3rem 0 2.5rem; }

  .sc-hero__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .sc-hero__image {
    order: -1;
  }

  .sc-hero__content {
    text-align: center;
    max-width: 100%;
  }

  .sc-hero__meta {
    justify-content: center;
  }

  .sc-hero__content .btn {
    width: 100%;
  }

  /* Areas mobile */
  .sc-areas__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .sc-area-card {
    padding: 1.5rem 1.25rem;
  }

  /* Visual break mobile */
  .sc-visual-break {
    height: 70px;
  }

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

  .quiz-question {
    font-size: 1.15rem;
  }

  .quiz-option__box {
    min-width: 110px;
    padding: 0.8rem 2rem;
  }

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

  .capture-card {
    padding: 1.5rem 1rem;
  }

  .step-divider {
    gap: 0.5rem;
  }

  .step-divider__badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
  }
}
