/* ============================================================
   Assessment CTAs: the card that closes an article, the section on
   the transformation page, and the floating prompt.

   Self-contained on purpose. The homepage does not load blog.css, so
   every colour lives on the components below instead of relying on
   the site's :root token block. See docs/assess-cta.md.
   ============================================================ */

.assess-cta,
.assess-float,
.assess-btn-outline {
  --ac-surface: #ffffff;
  --ac-ink: #1d1d1d;
  --ac-ink-muted: #3b4c5b;
  --ac-primary: #4d53c4;
  --ac-primary-hover: #343af0;
  --ac-pearl: #f9f9f9;
  --ac-border: rgba(29, 29, 29, 0.12);
  --ac-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---------- 1. the outline button, for a hero that already has a
   primary one. Its padding is one pixel short of .btn-primary's, so the
   border does not make it the taller of the two. ---------- */

.assess-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 10px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid var(--ac-primary);
  border-radius: 45px;
  padding: 15px 31px;
  background: transparent;
  color: var(--ac-primary);
  text-decoration: none;
  transition: all 200ms var(--ac-ease);
}

.assess-btn-outline:hover {
  background: var(--ac-primary);
  color: var(--ac-pearl);
}

/* ---------- 2. the card ---------- */

/* Margins mirror .cta-band in blog.css so the two line up when they
   follow each other at the end of an article. */
.assess-cta {
  margin: 48px 5vw 0;
  margin-left: auto;
  margin-right: auto;
  max-width: 1240px;
  box-sizing: border-box;
  padding: 36px clamp(22px, 5vw, 48px);
  background: var(--ac-surface);
  border: 1px solid var(--ac-border);
  border-radius: 28px;
  box-shadow: 1px 1px 9px rgba(44, 62, 80, 0.08);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

.assess-cta .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ac-primary);
  margin: 0 0 10px;
}

.assess-cta h2,
.assess-cta h3 {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.4px;
  color: var(--ac-ink);
  margin: 0 0 12px;
}

.assess-cta p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ac-ink-muted);
  margin: 0 0 22px;
  max-width: 52ch;
}

.assess-cta .assess-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: 45px;
  padding: 15px 32px;
  text-decoration: none;
  background: var(--ac-primary);
  color: var(--ac-pearl);
  transition: all 200ms var(--ac-ease);
}

.assess-cta .assess-btn:hover {
  background: var(--ac-primary-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 20px 50px -20px rgba(29, 29, 29, 0.45);
}

.assess-cta .friction {
  margin-top: 14px;
  font-size: 14px;
  color: #6a7684;
}

/* The four-step scale, so the reader sees what the result looks like
   before clicking. The labels carry information the copy does not, so
   they stay readable to a screen reader; only the bars are decoration. */
.assess-cta-scale {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.assess-cta-scale .s {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ac-ink-muted);
}

/* Each bar is longer and stronger than the one above it, so the four
   levels read as a ladder rather than a legend. */
.assess-cta-scale .s i {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--ac-primary);
}

.assess-cta-scale .s1 i { width: 25%; opacity: 0.32; }
.assess-cta-scale .s2 i { width: 50%; opacity: 0.52; }
.assess-cta-scale .s3 i { width: 75%; opacity: 0.74; }
.assess-cta-scale .s4 i { width: 100%; opacity: 1; }
.assess-cta-scale .s4 { color: var(--ac-ink); font-weight: 600; }

@media (max-width: 860px) {
  .assess-cta { grid-template-columns: 1fr; gap: 26px; }
  .assess-cta-scale { order: -1; }
}

/* ---------- 3. the floating prompt ---------- */

.assess-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  width: 330px;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  padding: 20px 22px 22px;
  background: var(--ac-surface);
  border: 1px solid var(--ac-border);
  border-radius: 20px;
  box-shadow: 0 18px 44px -18px rgba(29, 29, 29, 0.45);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 320ms var(--ac-ease), transform 320ms var(--ac-ease);
}

.assess-float[hidden] { display: none; }
.assess-float.is-in { opacity: 1; transform: translateY(0); }

.assess-float .t {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ac-ink);
  margin: 0 28px 6px 0;
}

.assess-float .d {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ac-ink-muted);
  margin: 0 0 16px;
}

.assess-float .assess-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  border-radius: 45px;
  padding: 12px 24px;
  text-decoration: none;
  background: var(--ac-primary);
  color: var(--ac-pearl);
  transition: background 200ms var(--ac-ease);
}

.assess-float .assess-btn:hover { background: var(--ac-primary-hover); color: #fff; }

.assess-float .x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6a7684;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms var(--ac-ease), color 160ms var(--ac-ease);
}

.assess-float .x:hover { background: rgba(29, 29, 29, 0.06); color: var(--ac-ink); }
.assess-float .x:focus-visible { outline: 2px solid var(--ac-primary); outline-offset: 2px; }

@media (max-width: 560px) {
  .assess-float {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
    padding: 16px 18px 18px;
  }
  .assess-float .d { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .assess-float { transition: none; transform: none; }
  .assess-cta .assess-btn:hover { transform: none; }
}
