/* =================================================================
   Contact page — extends ../styles.css (shares tokens, nav, footer)
   Dark / violet (#a78bfa) · Geist + JetBrains Mono
   ================================================================= */

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ----------------------------- Header ----------------------------- */
.cp-hero { padding-block: 60px 20px; }
.backlink {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 1.2px; color: var(--muted);
  transition: color .2s ease, gap .2s ease;
}
.backlink:hover { color: var(--accent); gap: 11px; }
.cp-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 30px;
  font-size: 12px; letter-spacing: 1.68px; color: var(--muted);
}
.cp-hero__title {
  margin-top: 18px; font-weight: 600;
  font-size: clamp(48px, 9vw, 104px); line-height: 0.95; letter-spacing: -0.04em; color: var(--text);
}
.cp-hero__lead { margin-top: 24px; max-width: 600px; font-size: 18px; line-height: 1.6; color: var(--muted); }

/* ----------------------------- Layout ----------------------------- */
.cp-body { padding-block: 44px 110px; }
#form { scroll-margin-top: 84px; }
.cp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; align-items: start; }
.cform-wrap { min-width: 0; }

/* ----------------------------- Form card ----------------------------- */
.cform {
  background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 16px;
  padding: 32px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
}
.cform__title { font-weight: 600; font-size: 22px; letter-spacing: -0.3px; color: var(--text); }
.cform__intro { margin-top: 6px; margin-bottom: 26px; font-size: 14px; color: var(--muted); }

.cform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 9px; margin-bottom: 18px; }
.field--fieldset { border: 0; padding: 0; margin-inline: 0; min-width: 0; }
.field__label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.32px;
  color: var(--muted); text-transform: uppercase; padding: 0;
}
.field__label .req { color: var(--accent); }

.input, .textarea, .select {
  width: 100%; background: var(--surface); border: 1px solid var(--border-2); border-radius: 10px;
  padding: 13px 14px; color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.4;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-tint); background: #0d0d0d;
}
.input:user-invalid, .textarea:user-invalid {
  border-color: rgba(239, 68, 68, 0.5); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}
.textarea { resize: vertical; min-height: 150px; }

.select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%238a8a8a' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.select:has(option[value=""]:checked) { color: var(--faint); }
.select option { color: var(--text); background: var(--surface); }

/* Project-type radio chips */
.chipset { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.chip-radio { position: relative; display: inline-flex; }
.chip-radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip-radio span {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 999px;
  padding: 9px 14px; font-size: 13px; color: var(--muted);
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.chip-radio span::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--border-2); transition: background .18s ease; flex: none;
}
.chip-radio:hover span { color: var(--text); border-color: var(--faint); }
.chip-radio input:checked + span { background: var(--accent-tint); border-color: var(--accent-border); color: var(--text); }
.chip-radio input:checked + span::before { background: var(--accent); }
.chip-radio input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-tint); }

/* Submit row */
.cform__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 22px; flex-wrap: wrap;
}
.cform__note { font-size: 12px; line-height: 1.5; color: var(--faint); max-width: 300px; }
.btn-send {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding-inline: 24px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font); font-weight: 600; font-size: 15px;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.btn-send:hover { transform: translateY(-1px); box-shadow: 0 12px 34px rgba(167, 139, 250, 0.32); }
.btn-send:active { transform: translateY(0); }
.btn-send:disabled { opacity: 0.6; cursor: progress; transform: none; box-shadow: none; }
.btn-send__arrow { font-weight: 700; font-size: 16px; }

/* Status line */
.cform__status { margin-top: 18px; font-size: 14px; line-height: 1.5; display: none; }
.cform__status.is-visible { display: block; }
.cform__status--info { color: var(--accent); }
.cform__status--error { color: #f87171; }

/* Success state */
.cform-success { text-align: center; padding-block: 52px; }
.cform-success__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 999px; margin-bottom: 22px;
  background: var(--accent-tint); border: 1px solid var(--accent-border);
  color: var(--accent); font-size: 26px; font-weight: 700;
}
.cform-success__title { font-weight: 600; font-size: 30px; letter-spacing: -0.6px; color: var(--text); }
.cform-success__text { margin: 14px auto 0; max-width: 420px; font-size: 16px; line-height: 1.6; color: var(--muted); }
.cform-success__actions { margin-top: 28px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  height: 42px; padding-inline: 18px; border: 1px solid var(--border-2); border-radius: 999px;
  background: var(--surface); color: var(--text);
  font-family: var(--font); font-weight: 500; font-size: 14px;
  transition: border-color .2s ease, background .2s ease;
}
.btn-ghost:hover { border-color: var(--accent-border); background: var(--accent-soft); }

/* ----------------------------- Aside (direct details) ----------------------------- */
.cp-aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 88px; }
.cp-card { background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 16px; overflow: hidden; }
.cp-card__head {
  padding: 18px 20px; font-size: 11px; letter-spacing: 1.54px; color: var(--muted);
  border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, 0.02);
}
.cp-row {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px;
  border-bottom: 1px solid var(--border); transition: background .2s ease;
}
.cp-row:last-child { border-bottom: 0; }
.cp-row:hover { background: #161616; }
.cp-row__main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 auto; }
.cp-row__k { font-size: 10px; letter-spacing: 1.4px; color: var(--muted); }
.cp-row__v { font-size: 14px; font-weight: 500; color: var(--text); word-break: break-word; }
.cp-row__arrow { flex: none; color: var(--muted); transition: color .2s ease, transform .2s ease; }
.cp-row:hover .cp-row__arrow { color: var(--accent); transform: translate(2px, -2px); }

.cp-meta { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 4px 20px; }
.cp-meta__row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 15px; border-bottom: 1px solid var(--border);
}
.cp-meta__row:last-child { border-bottom: 0; }
.cp-meta__k { font-size: 10px; letter-spacing: 1.4px; color: var(--muted); flex: none; }
.cp-meta__v { font-size: 14px; color: var(--text); text-align: right; display: inline-flex; align-items: center; gap: 8px; }
.cp-meta__v .dot { width: 7px; height: 7px; }

/* ----------------------------- Responsive ----------------------------- */
@media (max-width: 980px) {
  .cp-grid { grid-template-columns: 1fr; gap: 20px; }
  .cp-aside { position: static; }
  .cp-body { padding-block: 32px 80px; }
}

@media (max-width: 720px) {
  .cp-hero { padding-block: 40px 12px; }
  .cform { padding: 22px; }
  .cform__row { grid-template-columns: 1fr; gap: 0; }
  .cform__foot { flex-direction: column-reverse; align-items: stretch; }
  .btn-send { width: 100%; }
  .cform__note { max-width: none; text-align: center; }
}
