/* ============================================================
   Kwelity — Capacity Wheel (static export)
   Self-contained: design tokens inlined below, no external CSS.
   ============================================================ */

:root {
  --k-ink-1000: #0A0612;
  --k-cyan-400: #4DDDFF;
  --font-headline: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, sans-serif;
  --k-gradient: linear-gradient(140deg, #0B1A4D 0%, #6CC8F0 22%, #F265B0 60%, #F3B26A 100%);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #F4EDE0; }

/* ── Root surface ───────────────────────────────────────── */
.cw-root {
  background: #F4EDE0;
  color: var(--k-ink-1000);
  padding: clamp(32px, 6vw, 88px) clamp(18px, 5vw, 40px);
  font-family: var(--font-body);
  overflow: hidden;
}
.cw-inner { max-width: 1180px; margin: 0 auto; }

/* ── Header ─────────────────────────────────────────────── */
.cw-head {
  max-width: 720px; margin: 0 auto clamp(28px, 4vw, 52px);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.cw-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-headline);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: rgba(10,6,18,0.60);
}
.cw-dash { width: 28px; height: 3px; border-radius: 2px; background: var(--k-gradient); }
.cw-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: clamp(32px, 5vw, 62px);
  line-height: 1.04; letter-spacing: -0.01em;
  margin: 0; color: var(--k-ink-1000);
  text-wrap: balance;
}
.cw-title em {
  font-style: italic; font-weight: 400;
  background: var(--k-gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cw-lede {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.4vw, 18px); line-height: 1.6;
  color: rgba(10,6,18,0.66); margin: 0; max-width: 600px;
  text-wrap: pretty;
}

/* ── Grid ───────────────────────────────────────────────── */
.cw-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}
.cw-left { display: flex; flex-direction: column; gap: 28px; min-width: 0; }

/* ── Wheel ──────────────────────────────────────────────── */
.cw-wheelwrap {
  position: relative; width: 100%; max-width: 432px;
  margin: 4px auto 0; aspect-ratio: 1 / 1;
}
.cw-pointer {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  z-index: 6; filter: drop-shadow(0 3px 5px rgba(10,6,18,0.28));
}
.cw-svg {
  width: 100%; height: 100%; display: block;
  filter: drop-shadow(0 22px 44px rgba(10,6,18,0.18));
  overflow: visible;
}
.cw-spin {
  transform-box: view-box;
  transform-origin: 200px 200px;
  transition-property: transform;
  transition-timing-function: cubic-bezier(.16, 1, .3, 1);
  will-change: transform;
}
.cw-wedge { cursor: pointer; outline: none; transition: filter 200ms var(--ease-out); }
.cw-wedge:hover { filter: brightness(1.06); }
.cw-wedge:focus-visible path { stroke: var(--k-ink-1000); stroke-width: 4; }
.cw-wedge.is-sel path { stroke: var(--k-ink-1000); stroke-width: 4.5; }
/* On landing, recede the rest by DARKENING (not fading to the cream bg). */
.cw-spin.has-sel .cw-wedge:not(.is-sel) {
  filter: brightness(0.36) saturate(0.9);
  transition: filter 360ms var(--ease-out);
}
.cw-spin.has-sel .cw-wedge:not(.is-sel) .cw-label { fill: rgba(255,255,255,0.78) !important; }
.cw-label {
  font-family: var(--font-headline);
  font-weight: 700; font-size: 14.5px;
  text-transform: uppercase; letter-spacing: 0.03em;
  pointer-events: none; user-select: none;
}

/* center hub = spin button */
.cw-hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 31%; height: 31%; border-radius: 50%;
  background: var(--k-ink-1000);
  border: 3px solid #F7F1E6;
  box-shadow: 0 10px 26px rgba(10,6,18,0.34), inset 0 0 0 1px rgba(255,255,255,0.06);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; cursor: pointer; z-index: 5;
  transition: background 220ms var(--ease-out);
}
.cw-hub::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  padding: 3px; background: var(--k-gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 240ms var(--ease-out);
}
.cw-hub:hover:not(:disabled) { background: #1a1230; }
.cw-hub:hover:not(:disabled)::after { opacity: 1; }
.cw-hub:active:not(:disabled) { transform: translate(-50%, -50%) translateY(1px); }
.cw-hub:disabled { cursor: default; }
.cw-hub-mark {
  width: 36%; height: auto; transform-origin: 46.3% 48.8%;
  transition-property: transform;
  transition-timing-function: cubic-bezier(.16, 1, .3, 1);
  will-change: transform;
}
.cw-hub-label {
  font-family: var(--font-headline); color: #fff;
  font-size: clamp(10px, 2.4vw, 13px); font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; margin-top: 2px;
}

/* ── Number key (the legend) ────────────────────────────── */
.cw-key {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 22px 28px;
  padding-top: 24px; border-top: 1px solid rgba(10,6,18,0.12);
}
.cw-keyhead { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 12px; }
.cw-keydot { width: 13px; height: 13px; border-radius: 50%; margin-top: 4px; flex: 0 0 auto; }
.cw-doing .cw-keydot { background: linear-gradient(135deg, #F3B26A, #FA65BF); }
.cw-thinking .cw-keydot { background: linear-gradient(135deg, #4DDDFF, #1FC0A8); }
.cw-keytitle {
  display: block; font-family: var(--font-headline);
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--k-ink-1000);
}
.cw-keyblurb {
  display: block; font-size: 12.5px; line-height: 1.4;
  color: rgba(10,6,18,0.55); margin-top: 3px;
}
.cw-keylist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cw-keyrow {
  display: flex; align-items: center; gap: 11px; width: 100%;
  background: transparent; border: 0; cursor: pointer;
  padding: 7px 8px; border-radius: 8px; text-align: left;
  transition: background 180ms var(--ease-out);
}
.cw-keyrow:hover:not(:disabled) { background: rgba(10,6,18,0.05); }
.cw-keyrow:focus-visible { outline: 2px solid var(--k-cyan-400); outline-offset: 1px; }
.cw-keyrow.is-sel { background: rgba(10,6,18,0.07); }
.cw-keyrow:disabled { cursor: default; }
.cw-keyswatch {
  flex: 0 0 auto; width: 16px; height: 16px; border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(10,6,18,0.08);
}
.cw-keyname {
  font-family: var(--font-body); font-size: 14px; line-height: 1.25;
  color: rgba(10,6,18,0.82); font-weight: 500;
}
.cw-keyrow.is-sel .cw-keyname { font-weight: 700; color: var(--k-ink-1000); }

/* ── Right stage ────────────────────────────────────────── */
.cw-stage {
  background: #FFFCF7;
  border: 1px solid rgba(10,6,18,0.09);
  box-shadow: 0 18px 48px rgba(10,6,18,0.08);
  padding: clamp(24px, 3vw, 40px);
  min-height: 460px;
  position: relative;
}
.cw-stage::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--k-gradient);
}

/* idle */
.cw-idle { display: flex; flex-direction: column; gap: 22px; height: 100%; }
.cw-idle-eyebrow {
  font-family: var(--font-headline); font-size: 11px; font-weight: 700;
  letter-spacing: 0.26em; text-transform: uppercase; color: rgba(10,6,18,0.50);
}
.cw-steps { list-style: none; margin: 0; padding: 0; counter-reset: cw; display: flex; flex-direction: column; gap: 18px; }
.cw-steps li {
  counter-increment: cw; position: relative; padding-left: 50px;
  font-size: 16px; line-height: 1.5; color: rgba(10,6,18,0.7);
}
.cw-steps li b { color: var(--k-ink-1000); font-weight: 700; }
.cw-steps li::before {
  content: counter(cw); position: absolute; left: 0; top: -2px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid rgba(10,6,18,0.18);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-headline); font-weight: 700; font-size: 14px;
  color: var(--k-ink-1000);
}
.cw-idle-cue {
  margin-top: auto; display: flex; align-items: center; gap: 12px;
  padding-top: 22px; border-top: 1px dashed rgba(10,6,18,0.16);
  font-size: 14.5px; font-style: italic; color: rgba(10,6,18,0.56);
}

/* result */
.cw-result { display: flex; flex-direction: column; gap: 14px; }
.cw-result-tag {
  align-self: flex-start;
  font-family: var(--font-headline); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 6px 13px; border-radius: 999px;
}
.cw-result-tag.cw-doing { background: rgba(250,99,182,0.14); color: #B23A7E; }
.cw-result-tag.cw-thinking { background: rgba(38,181,154,0.16); color: #197F6C; }
.cw-result-eyebrow {
  font-family: var(--font-headline); font-size: 11px; font-weight: 700;
  letter-spacing: 0.24em; text-transform: uppercase; color: rgba(10,6,18,0.48);
  margin-top: 2px;
}
.cw-result-name {
  font-family: "Fraunces", Georgia, serif; font-weight: 500;
  font-size: clamp(28px, 3.4vw, 40px); line-height: 1.06;
  letter-spacing: -0.01em; margin: -2px 0 0; color: var(--k-ink-1000);
  text-wrap: balance;
}
.cw-result-leak { font-size: 15.5px; line-height: 1.55; color: rgba(10,6,18,0.66); margin: 2px 0 4px; }

.cw-fix { display: flex; gap: 0; background: rgba(10,6,18,0.035); }
.cw-fix-bar { flex: 0 0 5px; }
.cw-fix-copy { display: flex; flex-direction: column; gap: 5px; padding: 18px 20px; }
.cw-fix-eyebrow {
  font-family: var(--font-headline); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: rgba(10,6,18,0.52);
}
.cw-fix-title { font-family: "Fraunces", Georgia, serif; font-style: italic; font-weight: 500; font-size: 21px; line-height: 1.15; color: var(--k-ink-1000); }
.cw-fix-line { font-size: 14px; line-height: 1.5; color: rgba(10,6,18,0.62); }

.cw-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; position: relative; }
.cw-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cw-field span {
  font-family: var(--font-headline); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: rgba(10,6,18,0.55);
}
.cw-field input {
  background: #fff; border: 1px solid rgba(10,6,18,0.14); border-radius: 0;
  padding: 13px 15px; font-family: var(--font-body); font-size: 16px;
  color: var(--k-ink-1000); outline: none; min-width: 0;
  transition: border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.cw-field input::placeholder { color: rgba(10,6,18,0.34); }
.cw-field input:focus { border-color: var(--k-ink-1000); box-shadow: 0 0 0 3px rgba(10,6,18,0.06); }
.cw-submit {
  grid-column: 1 / -1;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 22px; border: 0; border-radius: 0; cursor: pointer;
  background: var(--k-ink-1000); color: #fff;
  font-family: var(--font-headline); font-size: 13px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  transition: background 220ms var(--ease-out), transform 220ms var(--ease-out);
}
.cw-submit:hover { background: #1a1230; }
.cw-submit:active { transform: translateY(1px); }
.cw-arrow { width: 16px; height: 16px; }

.cw-fine { font-size: 12px; line-height: 1.5; color: rgba(10,6,18,0.5); margin: 4px 0 0; }

/* confirmation */
.cw-done { display: flex; flex-direction: column; gap: 12px; padding: 8px 0; }
.cw-done-check {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--k-gradient); color: #fff;
}
.cw-done-h { font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 30px; margin: 4px 0 0; color: var(--k-ink-1000); line-height: 1.1; }
.cw-done-p { font-size: 15.5px; line-height: 1.6; color: rgba(10,6,18,0.66); margin: 0; }
.cw-next {
  margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; background: #F4EDE0; text-decoration: none;
  transition: background 200ms var(--ease-out);
}
.cw-next:hover { background: #efe5d3; }
.cw-next-eyebrow { display: block; font-family: var(--font-headline); font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(10,6,18,0.5); }
.cw-next-title { display: block; font-family: "Fraunces", Georgia, serif; font-style: italic; font-size: 19px; color: var(--k-ink-1000); margin-top: 2px; }
.cw-next .cw-arrow { color: var(--k-ink-1000); flex: 0 0 auto; }

.cw-again {
  align-self: flex-start; margin-top: 8px;
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 0; cursor: pointer;
  font-family: var(--font-headline); font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: rgba(10,6,18,0.55);
  padding: 4px 0; transition: color 180ms var(--ease-out);
}
.cw-again .cw-arrow { width: 14px; height: 14px; }
.cw-again:hover:not(:disabled) { color: var(--k-ink-1000); }
.cw-again:disabled { opacity: 0.5; cursor: default; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 920px) {
  .cw-grid { grid-template-columns: 1fr; gap: 32px; }
  .cw-left { max-width: 560px; margin: 0 auto; width: 100%; }
  .cw-stage { min-height: 0; max-width: 560px; margin: 0 auto; width: 100%; }
}
@media (max-width: 560px) {
  .cw-key { grid-template-columns: 1fr; gap: 20px; }
  .cw-form { grid-template-columns: 1fr; }
  .cw-wheelwrap { max-width: 320px; }
  .cw-label { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .cw-spin, .cw-hub-mark { transition-duration: 0ms !important; }
}
