/* ============================================================
   Contact Form — uses design tokens from css/styles.css
   ============================================================ */

.cform {
  max-width: 540px;
  margin: 28px auto 0;
  text-align: left;
}

.cform-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.cfield {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.cfield label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.cfield input,
.cfield textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 13px 15px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.cfield textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.55;
}

.cfield input::placeholder,
.cfield textarea::placeholder {
  color: var(--text-faint);
}

.cfield input:focus,
.cfield textarea:focus {
  border-color: var(--acc-1);
  box-shadow: 0 0 0 3px rgba(var(--acc-1-rgb), .18);
}

.cfield.err input,
.cfield.err textarea {
  border-color: #fb7185;
}

.cmsg {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #fb7185;
  min-height: 16px;
}

/* Honeypot — invisible to humans */
.cform-hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.cform-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 50px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  background: var(--grad);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  transition: transform .2s, box-shadow .2s;
}

.cform-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -16px rgba(var(--acc-1-rgb), .45);
}

.cform-submit:disabled {
  opacity: .75;
  cursor: progress;
}

.cform-spin {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  animation: cform-spin .7s linear infinite;
}

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

.cform-err-line {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #fb7185;
  text-align: center;
  margin: 14px 0 0;
}

.cform-err-line a {
  color: inherit;
  text-decoration: underline;
}

/* Success state */
.cform-success[hidden] { display: none; }

.cform-success {
  max-width: 540px;
  margin: 28px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.cform-check {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: #fff;
  animation: cform-pop .45s cubic-bezier(.22, 1, .36, 1) both;
}

.cform-check svg {
  width: 26px;
  height: 26px;
  stroke-width: 2.5;
}

@keyframes cform-pop {
  0%   { transform: scale(.4); opacity: 0; }
  100% { transform: scale(1);  opacity: 1; }
}

@media (max-width: 560px) {
  .cform-row { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cform-spin,
  .cform-check { animation: none; }
}
