/* Contact page (templates/site/contact.html): one dark section with underlined fields.
   It looks the same in light and dark mode, so the colors here are fixed. */

.ct {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 84px 0 100px;
  background: radial-gradient(1100px 620px at 50% -10%, #232c36 0%, #151b21 55%, #10141a 100%);
  color: #b9c3cd;
}
.ct::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(520px 320px at 88% 12%, rgba(26, 124, 216, 0.22), transparent 70%),
    url("../../assets/circuit.svg") center top / 420px repeat;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
  mask-image: linear-gradient(180deg, #000, transparent 85%);
  opacity: 0.6;
}
.ct a { color: #5aa9f5; text-decoration: none; }
.ct a:hover { color: #8cc4fa; text-decoration: underline; text-underline-offset: 3px; }

.ct-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.ct-head h1 { color: #fff; font-size: clamp(34px, 4.6vw, 52px); font-weight: 700; line-height: 1.1; letter-spacing: -0.022em; }
.ct-head .title-line { margin-bottom: 20px; }
.ct-head p { color: #aeb8c2; font-size: clamp(16.5px, 1.6vw, 19px); }

.ct-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 40px; align-items: start; }

/* ---------- the form ---------- */
.ct-form {
  display: grid;
  gap: 30px;
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ct-row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.ct-field { display: grid; gap: 4px; }
.ct-field label { color: #8f9aa6; font: 500 14px/1.4 var(--font-head); transition: color 0.15s; }
.ct-field:focus-within label { color: #5aa9f5; }
.ct-field input, .ct-field textarea, .ct-select select {
  width: 100%;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 17px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ct-field textarea { min-height: 140px; line-height: 1.6; resize: vertical; }
.ct-field input:focus, .ct-field textarea:focus, .ct-select select:focus { outline: 0; border-bottom-color: #3d94ea; box-shadow: 0 1px 0 #3d94ea; }
.ct-field [aria-invalid="true"] { border-bottom-color: #ff7d78; }
.ct-field [aria-invalid="true"]:focus { box-shadow: 0 1px 0 #ff7d78; }
.ct-select { position: relative; }
.ct-select select { padding-inline-end: 32px; -webkit-appearance: none; appearance: none; cursor: pointer; }
.ct-select option { background: #151b21; color: #fff; }
.ct-select svg { position: absolute; inset-inline-end: 2px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: #8f9aa6; pointer-events: none; }
.ct-err { margin-top: 6px; color: #ff8f8a; font-size: 14px; }
.ct-hint { margin-top: 6px; color: #8f9aa6; font-size: 14px; }
.ct-meta { display: flex; justify-content: space-between; gap: 12px; }
.ct-count { margin-inline-start: auto; margin-top: 6px; color: #6f7a86; font-size: 13px; font-variant-numeric: tabular-nums; }
.ct-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.ct-privacy { color: #aeb8c2; font-size: 14px; }

.ct-notice {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 20px 22px;
  border: 1px solid rgba(240, 181, 82, 0.4);
  border-radius: var(--r-md);
  background: rgba(240, 181, 82, 0.08);
  animation: ct-in 0.3s ease-out;
}
.ct-notice strong { color: #fff; font-family: var(--font-head); font-weight: 600; }
.ct-notice p { color: #c3ccd5; }
.ct-notice .btn { margin-top: 6px; }
@keyframes ct-in { from { opacity: 0; transform: translateY(-6px); } }

/* sending, sent, and the field bots fill in */
.ct-form .btn-ox:disabled { opacity: 0.75; cursor: progress; transform: none; }
.ct-form .btn-ox:disabled svg { animation: ct-fly 0.9s ease-in-out infinite alternate; }
@keyframes ct-fly { to { transform: translate(3px, -3px); } }
.ct-form.is-sent > :not(.ct-sent) { display: none; }
.ct-sent { display: grid; justify-items: center; gap: 12px; padding: 34px 20px; text-align: center; outline: 0; animation: ct-in 0.35s ease-out; }
.ct-sent-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(53, 199, 128, 0.16); color: #4fd696; }
.ct-sent-ic svg { width: 32px; height: 32px; }
.ct-sent h2 { color: #fff; font-family: var(--font-head); font-size: 26px; font-weight: 600; }
.ct-sent p { max-width: 42ch; color: #c3ccd5; font-size: 16px; line-height: 1.6; }
.ct-sent b { color: #fff; font-weight: 600; overflow-wrap: anywhere; }
.ct-sent .btn { margin-top: 8px; }
.ct-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .ct-form .btn-ox:disabled svg { animation: none; } }

/* ---------- the side ---------- */
.ct-side { display: grid; gap: 14px; }
.ct-side-block { display: flex; gap: 18px; padding: 24px; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: var(--r-md); background: rgba(255, 255, 255, 0.025); }
.ct-ic { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 50%; background: rgba(26, 124, 216, 0.16); color: #6fb3f5; }
.ct-ic svg { width: 24px; height: 24px; }
.ct-side h2 { color: #fff; font-size: 16.5px; font-weight: 600; line-height: 1.4; }
.ct-side p { margin-top: 4px; color: #aeb8c2; font-size: 15.5px; line-height: 1.65; }
.ct-side .ct-mail { font: 600 17px/1.5 var(--font-head); overflow-wrap: anywhere; }

@media (max-width: 991px) {
  .ct-layout { grid-template-columns: 1fr; }
}
@media (max-width: 575px) {
  .ct { padding: 56px 0 72px; }
  .ct-head { margin-bottom: 36px; }
  .ct-form { gap: 24px; padding: 26px 20px; }
  .ct-row { grid-template-columns: 1fr; gap: 24px; }
  .ct-actions .btn { width: 100%; }
  .ct-side-block { padding: 20px; }
}
