/* ==========================================================================
   NUVORA V2 — Components «Сигнал» (зі станами)
   Reusable patterns (AGENTS.md §9): cta · section-marker · service-card ·
   process-step · faq-item · form-field · honest-empty
   Винесено з styles.css (фаза 2, рефакторинг без зміни вигляду)
   ========================================================================== */

/* ---------- CTA system (класи frozen у docs/ux/05 — тут лише візуал) ---------- */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 var(--sp-6);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out), border-color 180ms var(--ease-out);
}
/* CTA-C: постійний контактний слот, на mobile видимий поза меню */
.cta-c {
  margin-left: auto;
  background: transparent;
  color: var(--signal);
  border-color: var(--signal);
  min-height: 44px;
  padding: 0 var(--sp-4);
  font-size: .9375rem;
}
.cta-c:hover { background: var(--signal); color: var(--navy); }

/* CTA-P / CTA-F: solid signal (єдина велика signal-заливка системи) */
.cta-p, .cta-f {
  background: var(--signal);
  color: var(--navy);
  border-color: var(--navy);
}
.cta-p:hover, .cta-f:hover { background: var(--signal-hover); }

/* CTA-S: текстовий secondary */
.cta-s {
  min-height: 44px;
  padding: 0;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.cta-s:hover { color: var(--muted); }
.cta-f { width: 100%; }
.cta-f:disabled { opacity: .55; cursor: default; }

/* ---------- Section marker ---------- */
.section-marker {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-meta);
  color: var(--muted);
  margin-bottom: var(--sp-6);
  max-width: none;
}
.marker-bar {
  width: 24px; height: 3px;
  background: var(--signal);
  border: 1px solid var(--navy);
  flex: none;
}

/* ---------- Honest empty (R-10/BAC-08) ---------- */
.honest-empty {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--signal);
  padding: var(--sp-6);
  max-width: 62ch;
}
.honest-empty-note { color: var(--muted); margin-bottom: 0; }
.honest-empty-note a { font-weight: 700; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* ---------- Service card (CP-3) ---------- */
.service-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
}
.service-for { color: var(--muted); font-size: var(--fs-meta); }
.service-price {
  font-size: 1.5rem;
  font-weight: 800;
  font-variation-settings: 'wdth' 120;
  margin: var(--sp-2) 0 var(--sp-4);
}
.service-list { display: grid; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.service-list li {
  position: relative;
  padding-left: var(--sp-6);
  font-size: .9375rem;
}
.service-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 8px; height: 8px;
  background: var(--signal);
  border: 1px solid var(--navy);
}
.service-more { margin-top: auto; }
.service-more summary {
  cursor: pointer;
  font-weight: 700;
  font-size: var(--fs-meta);
  min-height: 44px;
  display: flex;
  align-items: center;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.service-more summary::marker { color: var(--navy); }
.service-more p { font-size: var(--fs-meta); color: var(--muted); margin: var(--sp-2) 0 0; }

/* ---------- Process step (R-4) ---------- */
.process-list li {
  border-top: 2px solid var(--navy);
  padding-top: var(--sp-4);
  max-width: 46ch;
}
.process-list h3 { display: flex; align-items: baseline; gap: var(--sp-3); }
.step-num {
  font-variation-settings: 'wdth' 125;
  font-weight: 800;
  color: var(--navy);
  background: var(--signal);
  border: 1.5px solid var(--navy);
  width: 32px; height: 32px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.step-get { font-size: var(--fs-meta); color: var(--muted); margin-bottom: 0; }

/* ---------- FAQ item (disclosure) ---------- */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--hairline);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding: var(--sp-4) var(--sp-6);
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "";
  width: 10px; height: 10px;
  background: var(--signal);
  border: 1.5px solid var(--navy);
  flex: none;
  transition: transform 180ms var(--ease-out);
}
.faq-item[open] summary::before { transform: rotate(45deg); }
.faq-item p { padding: 0 var(--sp-6) var(--sp-4) calc(var(--sp-6) + 22px); color: var(--ink-2); margin: 0; }

/* ---------- Form field & form states (семантика frozen у 06/CP-5/6) ---------- */
.lead-form {
  background: var(--surface);
  border: 1px solid var(--hairline);
  padding: var(--sp-6);
  display: grid;
  gap: var(--sp-4);
}
.field { display: grid; gap: var(--sp-2); }
.field label { font-weight: 700; font-size: .9375rem; }
.req, .opt { font-weight: 400; color: var(--muted); font-size: var(--fs-meta); }
.field input, .field select, .field textarea {
  font: inherit;
  color: var(--navy);
  background: var(--surface-2);
  border: 1.5px solid var(--navy);
  border-radius: 0;
  min-height: 48px;
  padding: var(--sp-3) var(--sp-4);
  width: 100%;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}
.field-error {
  color: var(--error);
  font-size: var(--fs-meta);
  margin: 0;
  display: flex;
  gap: var(--sp-2);
  align-items: baseline;
}
.field-error::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--error);
  flex: none;
  transform: translateY(-1px);
}
.field.has-error input { border-color: var(--error); }
.field-hint { font-size: .8125rem; color: var(--muted); margin: 0; }
.form-error-summary {
  border: 1.5px solid var(--error);
  padding: var(--sp-4);
}
.form-error-summary p { font-weight: 700; margin-bottom: var(--sp-2); }
.form-error-summary ul { display: grid; gap: var(--sp-1); }
.form-error-summary a { color: var(--error); }
.form-privacy { font-size: .8125rem; color: var(--muted); margin: 0; }
.form-success, .form-failure {
  border: 1.5px solid var(--navy);
  border-left-width: 6px;
  padding: var(--sp-4) var(--sp-6);
}
.form-success { border-left-color: var(--success); }
.form-failure { border-left-color: var(--error); }
.form-success h3, .form-failure h3 { margin-bottom: var(--sp-2); }
.form-success p, .form-failure p { margin: 0; color: var(--ink-2); }
