/*!
 * Client Brief System — Shared stylesheet
 * -----------------------------------------------------------------------
 * NOT one of the 5 named modules in the architecture doc — added because
 * the UX requirements (progress indicator, large touch targets, clear
 * selected states, mobile-first layout) cannot be met with JS alone
 * without either inline styles scattered across three pages or a shared
 * stylesheet. A shared stylesheet is the smaller, more maintainable
 * option, and it's the one used here. Documented per the instruction to
 * flag any deviation from the five-module list.
 *
 * Every value below is a REUSE of an existing Abhigyan design token —
 * nothing here introduces a new colour or font. Confirmed against the
 * live site's :root custom properties (see CLIENT_BRIEF_SYSTEM_AUDIT.md,
 * Section B): --ink, --ink-deep, --chalk, --chalk-dim, --amber,
 * --amber-deep, --line-soft, Space Grotesk / Inter / IBM Plex Mono, and
 * the [data-theme="light"] override mechanism.
 *
 * This file assumes those custom properties are already defined on the
 * page (they are, on every existing Abhigyan page) — it does not redefine
 * them, only consumes them.
 * -----------------------------------------------------------------------
 */

.cb-form-wrap {
  max-width: 720px;
  margin: 0 auto;
  font-family: 'Inter', sans-serif;
  color: var(--chalk);
}

.cb-progress {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--chalk-dim);
  margin-bottom: 8px;
}

.cb-progress-bar {
  height: 3px;
  background: var(--line-soft, rgba(255,255,255,0.12));
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 32px;
}
.cb-progress-bar-fill {
  height: 100%;
  background: var(--amber);
  transition: width 0.3s ease;
}

.cb-step {
  animation: cb-step-in 0.25s ease;
}
@keyframes cb-step-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.cb-step-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: clamp(20px, 3vw, 28px);
  margin-bottom: 6px;
  color: var(--chalk);
}

.cb-step-subtitle {
  font-size: 14px;
  color: var(--chalk-dim);
  margin-bottom: 28px;
  line-height: 1.5;
}

.cb-field {
  margin-bottom: 22px;
}

.cb-field-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--chalk);
}

.cb-field-helper {
  font-size: 13px;
  color: var(--chalk-dim);
  margin-bottom: 10px;
  line-height: 1.5;
}

.cb-input,
.cb-select,
.cb-textarea {
  width: 100%;
  min-height: 48px; /* large touch target, per UX requirement */
  padding: 12px 14px;
  border: 1px solid var(--line-soft, rgba(255,255,255,0.16));
  border-radius: 8px;
  background: transparent;
  color: var(--chalk);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  transition: border-color 0.2s ease;
}
.cb-textarea { min-height: 110px; resize: vertical; }
.cb-input:focus,
.cb-select:focus,
.cb-textarea:focus {
  outline: none;
  border-color: var(--amber);
}

/* Choice groups (radio / checkbox), rendered as large tap targets rather
   than tiny native controls — matches the "strategic brief, not generic
   contact form" requirement. */
.cb-choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cb-choice {
  position: relative;
}
.cb-choice input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  margin: 0;
}
.cb-choice-label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line-soft, rgba(255,255,255,0.16));
  border-radius: 24px;
  font-size: 14px;
  color: var(--chalk);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.cb-choice input:checked + .cb-choice-label {
  border-color: var(--amber);
  background: var(--amber);
  color: var(--ink-deep);
  font-weight: 600;
}
.cb-choice input:focus-visible + .cb-choice-label {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.cb-field-error {
  color: #E5484D;
  font-size: 13px;
  margin-top: 6px;
  min-height: 18px;
}

.cb-error-summary {
  background: rgba(229, 72, 77, 0.08);
  border: 1px solid rgba(229, 72, 77, 0.3);
  color: #E5484D;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
}

.cb-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
}

.cb-btn {
  min-height: 48px;
  padding: 0 24px;
  border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.cb-btn:active { transform: translateY(1px); }
.cb-btn:disabled { opacity: 0.5; cursor: default; }

.cb-btn-primary {
  background: var(--amber);
  color: var(--ink-deep); /* never light text on amber — matches brand CTA rule */
}
.cb-btn-secondary {
  background: transparent;
  border-color: var(--line-soft, rgba(255,255,255,0.24));
  color: var(--chalk);
}

/* ---- Success state ---- */
.cb-success {
  text-align: left;
  padding: 8px 0;
}
.cb-success-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 4vw, 34px);
  color: var(--amber);
  margin-bottom: 10px;
}
.cb-success-lede {
  font-size: 16px;
  color: var(--chalk);
  margin-bottom: 28px;
  line-height: 1.6;
}
.cb-success-steps {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cb-success-steps li {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
}
.cb-success-step-num {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--amber-deep);
  font-size: 13px;
  grid-row: 1 / span 2;
}
.cb-success-step-label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--chalk);
}
.cb-success-step-body {
  grid-column: 2;
  font-size: 14px;
  color: var(--chalk-dim);
  line-height: 1.5;
}
.cb-success-cta {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  background: var(--amber);
  color: var(--ink-deep);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
}

@media (max-width: 640px) {
  .cb-nav { flex-direction: column-reverse; }
  .cb-btn { width: 100%; }
}
