/* Contact sales page */

.cpage {
  padding: 72px 0 120px;
}

.cpage__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 72px;
  align-items: start;
}

.cpage h1 {
  margin-top: 16px;
  font-size: clamp(36px, 4.6vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.cpage__lede {
  margin-top: 20px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-2);
}

.cpage__steps {
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  border-top: 1px solid var(--line);
}

.cpage__steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-2);
}

.cpage__steps li::before {
  content: counter(step, decimal-leading-zero);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
  color: var(--accent-ink);
}

.cpage__steps strong {
  color: var(--ink);
  font-weight: 600;
}

.cpage__direct {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin: 32px 0 0;
}

.cpage__direct dt {
  font-size: 13px;
  color: var(--muted);
}

.cpage__direct dd {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 500;
}

.cpage__direct a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Form card ---------- */

/* the states below set display, which would otherwise beat [hidden] */
.cform [hidden] {
  display: none !important;
}

.cform {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: 0 1px 2px rgba(12, 12, 13, 0.04), 0 12px 40px rgba(12, 12, 13, 0.06);
}

.cform__title {
  margin-bottom: 24px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.field {
  margin-bottom: 20px;
}

.field__label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.field__opt {
  font-weight: 400;
  color: var(--muted);
}

.field input:not([type="checkbox"]):not([type="file"]),
.field textarea {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field textarea {
  min-height: 132px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.15);
}

.field.has-error input,
.field.has-error textarea {
  border-color: #d92d20;
}

.field__error {
  margin-top: 6px;
  font-size: 13px;
  color: #b42318;
}

.field__error:empty {
  display: none;
}

/* Attachments */
.drop {
  display: grid;
  gap: 4px;
  place-items: center;
  padding: 22px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink-2);
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.drop:hover,
.drop.is-over {
  border-color: var(--accent);
  background: #fff7f0;
}

.drop:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.15);
}

.drop small {
  font-size: 12px;
  color: var(--muted);
}

.drop small:empty {
  display: none;
}

.files {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.files li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-2);
}

.files span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.files button {
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.files button:hover {
  color: #b42318;
}

/* Terms */
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
}

.check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--ink);
}

.check a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cform__alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #fecdca;
  border-radius: var(--radius-sm);
  background: #fef3f2;
  font-size: 14px;
  color: #b42318;
}

/* Submit */
.cform__submit {
  position: relative;
  width: 100%;
  justify-content: center;
}

.cform__submit:disabled {
  cursor: progress;
  opacity: 0.85;
}

.cform__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cform-spin 0.7s linear infinite;
}

.cform__submit.is-busy .cform__submit-text {
  visibility: hidden;
}

.cform__submit.is-busy .cform__spinner {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -9px 0 0 -9px;
}

@keyframes cform-spin {
  to {
    transform: rotate(360deg);
  }
}

.cform__note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.cform__note a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Loading placeholder */
.cform__loading {
  display: grid;
  gap: 18px;
}

.cform__loading span {
  height: 44px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--bg-alt), #efeff1, var(--bg-alt));
  background-size: 200% 100%;
  animation: cform-shimmer 1.4s ease-in-out infinite;
}

.cform__loading span:first-child {
  width: 40%;
  height: 28px;
}

.cform__loading .is-tall {
  height: 132px;
}

@keyframes cform-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

/* Unavailable and done states */
.cform__unavailable h2,
.cform__done h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.cform__unavailable p,
.cform__done p {
  margin-top: 10px;
  font-size: 15px;
  color: var(--ink-2);
}

.cform__unavailable a {
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cform__done {
  padding: 24px 0 8px;
  text-align: center;
  outline: none;
}

.cform__done svg {
  margin: 0 auto 16px;
  color: #16a34a;
}

.cform__done .cform__alert {
  margin: 16px 0 0;
  text-align: left;
}

.cform__done .link {
  display: inline-flex;
  margin-top: 24px;
}

@media (prefers-reduced-motion: reduce) {
  .cform__loading span,
  .cform__spinner {
    animation: none;
  }
}

@media (max-width: 880px) {
  .cpage {
    padding: 40px 0 80px;
  }

  .cpage__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .cform {
    padding: 24px 20px;
  }
}
