/* ==========================================================================
   INTAKE FORM
   Extends the base form components in components.css with the controls the
   contact form never needed: radio groups, checkbox groups, and selects.
   Everything here reuses the existing design tokens so the questionnaire
   reads as part of the same system, not a bolted-on widget.
   ========================================================================== */

.intake {
  padding-block: var(--space-3xl);
  background: var(--color-bg-alt);
}

.intake__layout {
  display: grid;
  gap: var(--space-2xl);
  align-items: start;
}

.intake__form-wrap {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .intake__form-wrap {
    padding: var(--space-xl);
  }
}

@media (min-width: 1000px) {
  .intake__layout {
    grid-template-columns: 7fr 4fr;
  }
}

/* --------------------------------------------------------------------------
   Sidebar — what to expect, kept factual and free of any accept/decline framing
   -------------------------------------------------------------------------- */

.intake__aside {
  background: var(--navy-900);
  color: var(--blue-300);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.intake__aside h2 {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
}

.intake__aside p {
  color: var(--blue-300);
  font-size: 0.9375rem;
  margin-bottom: var(--space-md);
}

.intake__aside a {
  color: var(--gold-400);
  font-weight: 600;
}

.intake__aside-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.intake__aside-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.9375rem;
  color: var(--blue-300);
}

.intake__aside-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--gold-400);
}

/* --------------------------------------------------------------------------
   Fieldset grouping
   -------------------------------------------------------------------------- */

.form-group {
  border: 0;
  padding: 0;
  margin: 0 0 var(--space-lg);
}

.form-group__legend {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy-800);
  margin-bottom: var(--space-2xs);
  padding: 0;
}

.form-section {
  border: 0;
  padding: 0;
  margin: 0 0 var(--space-xl);
}

.form-section__legend {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy-900);
  padding: 0 0 var(--space-sm);
  margin-bottom: var(--space-md);
  border-bottom: 2px solid var(--gold-500);
  width: 100%;
}

.form-hint {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

.form-required {
  color: #B3413A;
  font-weight: 700;
}

.form-optional {
  font-weight: 400;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Radio / checkbox choice rows
   -------------------------------------------------------------------------- */

.choice-list {
  display: grid;
  gap: var(--space-2xs);
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .choice-list--two-up {
    grid-template-columns: 1fr 1fr;
  }
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--navy-800);
  transition: border-color var(--duration-fast) var(--ease-out),
              background-color var(--duration-fast) var(--ease-out);
}

.choice:hover {
  border-color: var(--blue-500);
  background: var(--color-bg-alt);
}

/* :has() lets the whole row respond to its own control being selected.
   Where it isn't supported the control itself still shows state clearly,
   so this degrades without loss of function. */
.choice:has(input:checked) {
  border-color: var(--navy-700);
  background: rgba(111, 168, 216, 0.10);
}

.choice:focus-within {
  outline: 3px solid var(--navy-800);
  outline-offset: 2px;
}

.choice input[type="radio"],
.choice input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.15rem 0 0;
  border: 1px solid var(--silver-400);
  background: var(--white);
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}

.choice input[type="radio"] {
  border-radius: 50%;
}

.choice input[type="checkbox"] {
  border-radius: 4px;
}

.choice input[type="radio"]::before,
.choice input[type="checkbox"]::before {
  content: '';
  background: var(--white);
  transform: scale(0);
  transition: transform var(--duration-fast) var(--ease-out);
}

.choice input[type="radio"]::before {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}

.choice input[type="checkbox"]::before {
  width: 0.7rem;
  height: 0.7rem;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.choice input[type="radio"]:checked,
.choice input[type="checkbox"]:checked {
  background: var(--navy-900);
  border-color: var(--navy-900);
}

.choice input[type="radio"]:checked::before,
.choice input[type="checkbox"]:checked::before {
  transform: scale(1);
}

/* The row already draws a focus ring via :focus-within, so suppress the
   default ring on the control itself to avoid a doubled outline. */
.choice input[type="radio"]:focus-visible,
.choice input[type="checkbox"]:focus-visible {
  outline: none;
}

/* --------------------------------------------------------------------------
   Select
   -------------------------------------------------------------------------- */

.form-row select {
  appearance: none;
  -webkit-appearance: none;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2310263F' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px 8px;
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.form-row select:hover {
  border-color: var(--silver-600);
}

.form-row select:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(111, 168, 216, 0.35);
}

/* --------------------------------------------------------------------------
   Conditional "other" field
   Hidden by JS on load, so it stays visible and usable if JS never runs.
   -------------------------------------------------------------------------- */

.choice-other {
  margin-top: var(--space-2xs);
  padding-left: 0.9rem;
}

.choice-other[hidden] {
  display: none;
}

.choice-other input {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 0.9375rem;
}

.choice-other input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(111, 168, 216, 0.35);
}

/* --------------------------------------------------------------------------
   Submit + status
   -------------------------------------------------------------------------- */

.intake-form__footer {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-lg);
}

.intake-form__footer .btn {
  width: 100%;
}

@media (min-width: 560px) {
  .intake-form__footer .btn {
    width: auto;
    min-width: 260px;
  }
}

.intake-form__note {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: var(--space-md);
  max-width: 52ch;
}

/* --------------------------------------------------------------------------
   Thank-you panel (replaces the form after a successful send)
   -------------------------------------------------------------------------- */

.intake-thanks {
  text-align: center;
  padding-block: var(--space-lg);
}

.intake-thanks__mark {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-md);
  border-radius: 50%;
  background: var(--navy-900);
  display: grid;
  place-content: center;
  color: var(--gold-400);
  font-size: 1.5rem;
  line-height: 1;
}

.intake-thanks h2 {
  margin-bottom: var(--space-sm);
}

.intake-thanks p {
  color: var(--color-text-muted);
  max-width: 46ch;
  margin: 0 auto var(--space-md);
}

.intake-thanks a {
  color: var(--navy-700);
  font-weight: 600;
  text-decoration: underline;
}
