/* Casematch project page. Builds on site.css tokens; self-contained page hero. */

/* ---------- Hero ---------- */
.cm-hero { padding-block: clamp(40px, 7vw, 96px) clamp(8px, 2vw, 24px); }
.cm-eyebrow {
  display: flex; width: fit-content; align-items: center; min-height: 32px; padding: 0 14px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent-text);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
}
.cm-hero h1 {
  margin-top: 22px; font-family: var(--font-head); font-weight: 700; line-height: 0.98;
  letter-spacing: -0.045em; font-size: clamp(3rem, 10vw, 6.5rem);
}
.cm-lede { margin-top: 22px; max-width: 34ch; color: var(--muted); font-size: clamp(1.125rem, 2.2vw, 1.375rem); }
.cm-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 480px) { .cm-actions .btn { width: 100%; } }
.cm-back {
  display: flex; width: fit-content; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 14px;
  color: var(--muted); font-weight: 500; text-decoration: none; border-radius: 999px;
}
.cm-back:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.cm-back-icon { width: 18px; height: 18px; transform: rotate(180deg); }
.cm-back .cm-back-icon { transition: transform 0.5s var(--ease); }
.cm-back:hover .cm-back-icon { transform: rotate(180deg) translateX(3px); }
.cm-actions .btn-ghost:hover .cm-back-icon { transform: rotate(180deg); }

/* ---------- Why ---------- */
.cm-why { padding-block: clamp(48px, 7vw, 88px) 0; }
.cm-why-grid { display: grid; gap: 24px; }
.cm-why-text { display: grid; gap: 16px; max-width: 62ch; color: var(--muted); font-size: 1.125rem; }
@media (min-width: 900px) { .cm-why-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr); gap: 72px; } }

/* ---------- Walkthrough shell (double bezel) ---------- */
.cm-shell {
  padding: 8px; border-radius: 36px; background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow-hover), inset 0 1px 0 var(--hi);
}
.cm-core {
  border-radius: 28px; padding: clamp(18px, 3vw, 32px); display: grid; gap: 22px;
  background: radial-gradient(70% 60% at 100% 0%, var(--tint-a), transparent 65%), var(--card-solid);
  box-shadow: inset 0 1px 0 var(--hi);
}
.cm-preview-label {
  display: inline-flex; align-items: center; gap: 10px; justify-self: start;
  padding: 8px 16px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text);
  font-size: 0.875rem; font-weight: 600; line-height: 1.3;
}
.cm-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: currentColor; }
.cm-nojs { color: var(--muted); font-size: 0.9375rem; }
.cm-shell.is-live .cm-nojs { display: none; }

/* Stepper */
.cm-stepbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.cm-stepbar[hidden], .cm-nav[hidden], .cm-panel[hidden] { display: none; }
.cm-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.cm-step {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px 0 8px;
  border-radius: 999px; cursor: pointer; background: var(--chip); color: var(--ink);
  border: 1px solid var(--line); font-weight: 600; font-size: 0.9375rem;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), transform 0.4s var(--ease);
}
.cm-step:hover { background: var(--accent-soft); }
.cm-step:active { transform: scale(0.97); }
.cm-step-num {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card-solid); color: var(--muted); font-size: 0.875rem;
}
.cm-step[aria-current="step"] { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent); }
.cm-step[aria-current="step"] .cm-step-num { background: var(--accent); color: var(--accent-ink); }
.cm-live { font-weight: 600; color: var(--muted); font-size: 0.9375rem; }

/* Panels */
.cm-panel { display: grid; gap: 18px; align-content: start; min-height: 300px; }
.cm-panel-title { font-size: clamp(1.375rem, 2.6vw, 1.75rem); outline-offset: 6px; }
.cm-panel-sub { color: var(--muted); margin-top: -10px; }
.cm-fields { display: grid; gap: 20px; }
.cm-field { display: grid; gap: 10px; }
.cm-field-label { color: var(--faint); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.cm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cm-chip {
  min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  background: var(--chip); color: var(--ink); border: 1px solid var(--line); font-weight: 500; font-size: 0.9375rem;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.cm-chip:hover { background: var(--accent-soft); }
.cm-chip:active { transform: scale(0.97); }
.cm-chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }

/* Static definition lists (no-JS candidate card and role card) */
.cm-static { display: grid; gap: 0; border-radius: var(--r-inner); border: 1px solid var(--line); background: var(--chip); overflow: hidden; }
.cm-static > div { display: grid; gap: 2px; padding: 14px 18px; }
.cm-static > div + div { border-top: 1px solid var(--line); }
.cm-static dt { color: var(--faint); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.cm-static dd { margin: 0; font-weight: 600; }
@media (min-width: 640px) {
  .cm-static > div { grid-template-columns: 200px 1fr; align-items: baseline; gap: 16px; }
}

/* Role card */
.cm-role { display: grid; gap: 16px; }
.cm-role-title { font-family: var(--font-head); font-weight: 600; font-size: 1.375rem; letter-spacing: -0.02em; }
.cm-role-org { color: var(--muted); }

/* Match */
.cm-score { display: flex; align-items: center; gap: 22px; }
.cm-ring { width: 112px; height: 112px; flex: none; }
.cm-ring-track { fill: none; stroke: var(--chip); stroke-width: 10; }
.cm-ring-arc { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 0.8s var(--ease); }
.cm-score-num { font-family: var(--font-head); font-weight: 700; font-size: clamp(2rem, 6vw, 2.75rem); letter-spacing: -0.035em; line-height: 1; }
.cm-score-count { margin-top: 8px; color: var(--muted); }
.cm-checks { display: grid; gap: 8px; }
.cm-check {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 14px; align-items: center;
  padding: 12px 16px 12px 12px; border-radius: var(--r-inner); background: var(--chip); border: 1px solid var(--line);
}
.cm-glyph {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 1rem; background: var(--card-solid); color: var(--muted);
}
.cm-met .cm-glyph { background: #0e7a3d; color: #fff; }
.cm-notMet .cm-glyph { background: #b3261e; color: #fff; }
.cm-unknown .cm-glyph { background: var(--card-solid); color: var(--muted); border: 1px solid var(--line); }
@media (prefers-color-scheme: dark) {
  .cm-met .cm-glyph { background: #5fd28b; color: #06180d; }
  .cm-notMet .cm-glyph { background: #ff9a92; color: #2a0805; }
}
.cm-check-name { font-weight: 600; }
.cm-check-detail { color: var(--muted); font-size: 0.875rem; overflow-wrap: anywhere; }
.cm-status { font-size: 0.8125rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.cm-rule { color: var(--ink); max-width: 64ch; }
.cm-rule-soft { color: var(--muted); font-size: 0.9375rem; }
@media (max-width: 480px) {
  .cm-check { grid-template-columns: 36px 1fr; }
  .cm-status { grid-column: 2; }
}

/* Prev / next */
.cm-nav { display: flex; justify-content: space-between; gap: 12px; }
.cm-navbtn {
  min-height: 48px; min-width: 96px; padding: 0 24px; border-radius: 999px; cursor: pointer;
  background: var(--chip); color: var(--ink); border: 1px solid var(--line); font-weight: 600; font-size: 0.9375rem;
  transition: transform 0.4s var(--ease), background-color 0.4s var(--ease), opacity 0.4s var(--ease);
}
.cm-navbtn:hover:not(:disabled) { background: var(--accent-soft); }
.cm-navbtn:active:not(:disabled) { transform: scale(0.97); }
.cm-navbtn:disabled { opacity: 0.45; cursor: not-allowed; }
.cm-navbtn-main { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.cm-navbtn-main:hover:not(:disabled) { background: var(--accent); opacity: 0.9; }

/* Pipeline strip */
.cm-pipeline { margin-top: clamp(32px, 5vw, 56px); display: grid; gap: 16px; }
.cm-pipeline-title { font-size: 1.125rem; color: var(--muted); font-weight: 600; }
.cm-stages { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cm-stages li {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 18px 8px 10px;
  border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px 0 var(--hi); font-family: var(--font-head); font-weight: 600;
}
.cm-stage-num {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent-text); font-size: 0.875rem;
}
@media (min-width: 760px) { .cm-stages { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

@media (prefers-reduced-motion: reduce) {
  .cm-ring-arc { transition: none; }
}
