/* ═══════════════════════════════════════════════════════════════════════
   LEGAL PAGES AND FORMS
   - privacy.html and terms.html reuse the case study layout (.cs-rc-*);
     the rules here add only what those pages lacked: lists, links, small
     sub-headings and a hero without an image.
   - testimonial.html (and any future form) uses the .form-page and .form
     rules. Behaviour: assets/js/modules/forms.js.
   Type follows the rest of the site: 13px labels, 15px interface text,
   16px body and inputs (16px also stops phones zooming in on focus).
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Legal pages ──────────────────────────────────────────────────── */
.legal-page .cs-rc-hero__title {
  max-width: 16ch;
}

.legal-hero .cs-rc-subhead {
  margin-top: 20px;
}

.legal-other {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.legal-page .legal-sub {
  margin-top: 36px;
  font-size: clamp(1.1rem, 1.4vw, 1.3rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.legal-page .legal-sub + .cs-rc-body-text,
.legal-page .legal-sub + .legal-list {
  margin-top: 10px;
}

.legal-list {
  max-width: 58ch;
  margin: 16px 0 0 0;
  padding: 0;
  list-style: none;
}

.legal-list li {
  position: relative;
  padding: 10px 0 10px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

.legal-list li:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 1.25em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f0ab3c;
}

.legal-list strong,
.legal-page .cs-rc-body-text strong {
  font-weight: 500;
  color: #ffffff;
}

.legal-list + .cs-rc-body-text,
.legal-page .cs-rc-pillars + .cs-rc-body-text {
  margin-top: 24px;
}

.legal-link,
.form a {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.legal-link:hover,
.form a:hover {
  text-decoration-color: #f0ab3c;
}

/* ── Form page ────────────────────────────────────────────────────── */
.form-page {
  position: relative;
  z-index: 2;
  background: #111110;
  padding: calc(var(--nav-height, 64px) + clamp(48px, 9vw, 112px)) var(--container-pad, 1rem) clamp(72px, 10vw, 128px);
}

.form-page__column {
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
}

.form-page__kicker {
  display: block;
  margin-bottom: 16px;
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.6);
}

.form-page__title {
  margin: 0;
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: #ffffff;
  text-wrap: balance;
}

.form-page__intro {
  margin: 20px 0 0 0;
  max-width: 54ch;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  text-wrap: pretty;
}

/* ── The form ─────────────────────────────────────────────────────── */
.form {
  margin-top: clamp(40px, 6vw, 64px);
}

.form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__group {
  margin: 0 0 clamp(36px, 5vw, 52px) 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.form__legend {
  width: 100%;
  margin: 0 0 20px 0;
  padding: 0 0 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.6);
}

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

.form__field {
  margin-bottom: 20px;
  min-width: 0;
}

.form__label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: #ffffff;
}

.form__optional {
  margin-left: 6px;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
}

.form__hint {
  margin: -2px 0 10px 0;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
}

.form__input {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: #161615;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.4;
  color: #ffffff;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form__input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.form__input:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.form__input:focus {
  outline: none;
  border-color: #f0ab3c;
  box-shadow: 0 0 0 3px rgba(240, 171, 60, 0.22);
  background: #1a1a19;
}

.form__input[aria-invalid='true'] {
  border-color: #f87171;
}

.form__textarea {
  min-height: 168px;
  line-height: 1.6;
  resize: vertical;
}

.form__select {
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-opacity='.6' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  cursor: pointer;
}

.form__select option {
  background: #161615;
  color: #ffffff;
}

.form__count {
  margin: 8px 0 0 0;
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-align: right;
}

.form__error {
  margin: 8px 0 0 0;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.4;
  color: #fca5a5;
}

/* Radios and checkboxes: the whole row is the target */
.form__choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.form__choice:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.form__choice:has(input:checked) {
  border-color: rgba(240, 171, 60, 0.6);
  background: rgba(240, 171, 60, 0.06);
  color: #ffffff;
}

.form__choice:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(240, 171, 60, 0.22);
}

.form__choice input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0 0;
  accent-color: #f0ab3c;
  cursor: pointer;
}

.form__choice--check {
  padding: 16px 14px;
}

.form__more {
  margin-top: 16px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

.form__more summary {
  display: inline-block;
  padding: 6px 0;
  color: #ffffff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
  cursor: pointer;
  list-style: none;
}

.form__more summary::-webkit-details-marker {
  display: none;
}

.form__more summary:focus-visible {
  outline: 2px solid #f0ab3c;
  outline-offset: 4px;
  border-radius: 4px;
}

.form__more ul {
  margin: 10px 0 12px 0;
  padding-left: 20px;
}

.form__more li {
  margin-bottom: 6px;
}

.form__more p {
  margin: 0;
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}

.form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid #ffffff;
  border-radius: 9999px;
  corner-shape: round;
  background: #ffffff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: #111110;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.form__submit:hover {
  background: #ededf0;
  transform: translateY(-1px);
}

.form__submit:focus-visible {
  outline: 2px solid #f0ab3c;
  outline-offset: 3px;
}

.form__submit[disabled] {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.form__submit--link {
  margin-top: 28px;
}

.form__status {
  margin: 0;
  flex: 1 1 240px;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
}

.form__status.is-error {
  color: #fca5a5;
}

.form-done:focus {
  outline: none;
}

@media (max-width: 560px) {
  .form__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .form__submit {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .form__input,
  .form__choice,
  .form__submit {
    transition: none;
  }
}
