/* ==========================================================================
   Praedyn — Intake form styles (extends styles.css)
   ========================================================================== */

.intake-body { background: var(--bg); }

.intake-main {
  padding-top: 100px;
  padding-bottom: 80px;
  min-height: 100vh;
}

.intake-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 768px) {
  .intake-shell { padding: 0 20px; }
  .intake-main { padding-top: 90px; }
}

/* ----- HEADER ----- */

.intake-header {
  max-width: 800px;
  margin: 0 auto 56px;
  text-align: center;
}

.intake-header .eyebrow {
  justify-content: center;
}

.intake-title {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-top: 20px;
  color: var(--text);
}

.intake-sub {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: 18px;
}

.intake-notice {
  margin-top: 32px;
  padding: 16px 22px;
  background: rgba(139, 26, 26, 0.04);
  border-left: 3px solid var(--crimson);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  text-align: left;
}

.intake-notice strong { color: var(--crimson); font-weight: 600; }

/* ----- LAYOUT GRID ----- */

.intake-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 56px;
  align-items: start;
}

@media (max-width: 960px) {
  .intake-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ----- STEPPER ----- */

.stepper {
  position: sticky;
  top: 100px;
  padding: 0;
}

@media (max-width: 960px) {
  .stepper { position: static; }
}

.stepper-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid var(--border);
}

.stepper-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0 12px 20px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  transition: all var(--transition);
  cursor: default;
}

.stepper-item.is-active {
  border-left-color: var(--crimson);
}

.stepper-item.is-done .stepper-num {
  background: var(--navy);
  color: var(--text-light);
  border-color: var(--navy);
}

.stepper-item.is-active .stepper-num {
  background: var(--crimson);
  color: var(--text-light);
  border-color: var(--crimson);
}

.stepper-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--transition);
}

.stepper-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.stepper-item.is-active .stepper-label {
  color: var(--text);
}

.stepper-item.is-done .stepper-label {
  color: var(--text);
}

/* ----- ESTIMATE PANEL ----- */

.estimate-panel {
  margin-top: 40px;
  padding: 24px 22px;
  background: var(--navy);
  color: var(--text-light);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.estimate-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: var(--crimson);
}

.estimate-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-light-muted);
  margin-bottom: 12px;
}

.estimate-amount {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text-light);
  margin-bottom: 8px;
}

.estimate-range {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-light-muted);
  margin-bottom: 16px;
}

.estimate-factors {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-light-muted);
}

.estimate-factors li {
  padding-left: 12px;
  position: relative;
}

.estimate-factors li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--crimson);
  font-weight: 700;
}

.estimate-disclaimer {
  font-size: 11px;
  line-height: 1.55;
  color: var(--text-light-muted);
  font-style: italic;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 960px) {
  .estimate-panel { margin-top: 24px; }
}

/* ----- FORM SHELL ----- */

.form { margin: 0; }

.step {
  display: none;
  animation: stepIn 360ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.step.is-active { display: block; }

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

.step-head { margin-bottom: 36px; }

.step-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 12px;
}

.step-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.15;
}

.step-sub {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 600px;
}

/* ----- FIELDS ----- */

.field { margin-bottom: 24px; }

.field label,
.field > label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.req {
  color: var(--crimson);
  font-weight: 600;
}

.hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text);
  transition: border-color var(--transition), background var(--transition);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy);
  background: #FFFFFF;
}

.field textarea {
  resize: vertical;
  font-family: var(--font-sans);
  line-height: 1.5;
}

.grid {
  display: grid;
  gap: 20px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ----- SEGMENTED CONTROL (radio button group) ----- */

.seg {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 2px;
  overflow: hidden;
}

.seg input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seg label {
  margin: 0;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-muted);
  cursor: pointer;
  border-right: 1px solid var(--border);
  transition: all var(--transition);
  user-select: none;
}

.seg label:last-of-type { border-right: none; }

.seg label:hover { background: var(--bg-alt); color: var(--text); }

.seg input[type="radio"]:checked + label {
  background: var(--navy);
  color: var(--text-light);
}

/* ----- CARD-STYLE RADIOS (CMMC level, engagement type) ----- */

.cards-radio {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 640px) { .cards-radio { grid-template-columns: 1fr; } }

.cards-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.card-radio {
  display: block;
  padding: 18px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--transition);
  margin: 0;
  font-weight: 400;
  position: relative;
}

.card-radio:hover {
  border-color: var(--navy);
  background: #FCFCFB;
}

.cards-radio input[type="radio"]:checked + .card-radio {
  border-color: var(--crimson);
  background: rgba(139, 26, 26, 0.03);
}

.cards-radio input[type="radio"]:checked + .card-radio::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--crimson);
}

.card-radio-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}

.card-radio-body {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ----- CHECKBOX GRID ----- */

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
}

@media (max-width: 640px) { .check-grid { grid-template-columns: 1fr; } }

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 !important;
  padding: 8px 0;
  cursor: pointer;
  font-weight: 400 !important;
  font-size: 13px !important;
}

.check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--crimson);
  cursor: pointer;
}

.check span {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

/* ----- STEP NAV BUTTONS ----- */

.step-nav {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.step-nav-spacer { flex: 1; }

@media (max-width: 640px) {
  .step-nav { flex-direction: column-reverse; align-items: stretch; }
  .step-nav-spacer { display: none; }
  .step-nav .btn { justify-content: center; }
}

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

#btn-save { font-size: 13px; padding: 12px 18px; }

/* ----- VALIDATION ----- */

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: var(--crimson);
  background: rgba(139, 26, 26, 0.03);
}

.field-error {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--crimson);
  font-weight: 500;
}

/* ==========================================================================
   SUCCESS PAGE
   ========================================================================== */

.success { padding: 24px 0; max-width: 900px; margin: 0 auto; }

.success-hero {
  text-align: center;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.success-hero .eyebrow { justify-content: center; }

.success-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-top: 20px;
  color: var(--text);
}

.success-sub {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: 18px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.receipt {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.mono { font-family: var(--font-mono); color: var(--crimson); font-weight: 500; }

.success-section-title {
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.success-estimate { margin-bottom: 48px; }

.estimate-figure {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.estimate-amount-large {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--navy);
}

.estimate-range-large {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 500;
}

.estimate-breakdown {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
}

.estimate-breakdown li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  font-size: 14px;
}

.estimate-breakdown .factor-label { color: var(--text); }
.estimate-breakdown .factor-value {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.estimate-caveat {
  margin-top: 28px;
  padding: 18px 22px;
  background: var(--bg-alt);
  border-left: 3px solid var(--crimson);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
}

.estimate-caveat strong { color: var(--text); font-weight: 600; }

.success-summary { margin-bottom: 48px; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 32px;
}

@media (max-width: 640px) { .summary-grid { grid-template-columns: 1fr; } }

.summary-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}

.summary-key {
  display: block;
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.summary-val {
  display: block;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  word-wrap: break-word;
}

.success-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 24px;
}

@media (max-width: 640px) {
  .success-actions { flex-direction: column; }
  .success-actions .btn { justify-content: center; }
}

/* ----- PRINT STYLES ----- */

@media print {
  body { background: #FFFFFF; }
  .nav, .footer, .stepper, .step-nav, .intake-notice, .success-actions { display: none !important; }
  .intake-main { padding-top: 0; padding-bottom: 0; }
  .intake-layout { display: block; }
  .step:not(.is-active) { display: none; }
  .success {
    page-break-before: avoid;
    margin: 0;
    max-width: 100%;
  }
  .estimate-panel {
    background: #FFFFFF !important;
    color: #000 !important;
    border: 1px solid #000;
  }
  .estimate-amount-large { color: #000 !important; }
  a { color: inherit; text-decoration: none; }
  .success-hero, .success-estimate, .success-summary {
    page-break-inside: avoid;
  }
}
