/* Contact form panel (contact-form.html). Uses the v2 design system tokens; scoped to .rtg-contact so the
   legacy page around it is untouched. */

@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-var-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

.rtg-contact {
  --night-1: #0b111d;
  --night-2: #111a2b;
  --night-3: #18233a;
  --line: rgb(214 228 255 / 0.14);
  --line-strong: rgb(214 228 255 / 0.28);
  --ink: #eef0f4;
  --ink-2: #b4bccb;
  --ink-3: #8f99ad;
  --amber: #f6a71c;
  --amber-hi: #ffbd45;
  --on-amber: #1d1405;
  --ok: #5fd39a;
  --err: #ff6b81;
  --focus: #ffbd45;

  font-family: "Figtree", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--night-2), var(--night-1));
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 30px 60px -30px rgb(7 10 18 / 0.55);
  padding: clamp(24px, 4vw, 40px);
  color-scheme: dark;
}

.rtg-contact-title {
  margin: 0 0 6px;
  font-family: inherit;
  font-size: clamp(1.35rem, 0.8vw + 1rem, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.rtg-contact-note {
  margin: 0 0 24px;
  font-size: 0.9rem;
  color: var(--ink-3);
}

.rtg-contact form {
  display: grid;
  gap: 18px;
  margin: 0;
}

.rtg-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.rtg-field label {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-2);
  text-transform: none;
  letter-spacing: 0;
}

.rtg-req {
  color: var(--amber);
}

.rtg-field input,
.rtg-field select,
.rtg-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  font: 400 1rem/1.4 "Figtree", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--night-1);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
}

.rtg-field select {
  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' fill='none' stroke='%23b4bccb' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.rtg-field select option {
  color: #111a2b;
  background: #fff;
}

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

.rtg-field input:hover,
.rtg-field select:hover,
.rtg-field textarea:hover {
  border-color: rgb(214 228 255 / 0.45);
}

.rtg-field input:focus-visible,
.rtg-field select:focus-visible,
.rtg-field textarea:focus-visible {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgb(255 189 69 / 0.28);
}

.rtg-field [aria-invalid="true"] {
  border-color: var(--err);
}

.rtg-field [aria-invalid="true"]:focus-visible {
  box-shadow: 0 0 0 3px rgb(255 107 129 / 0.3);
}

.rtg-error {
  margin: 0;
  font-size: 0.86rem;
  color: var(--err);
}

/* visually hidden, still in the form for bots; kept out of reach for keyboard and assistive tech */
.rtg-hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.rtg-turnstile:empty {
  display: none;
}

.rtg-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  justify-self: start;
  min-height: 48px;
  padding: 0 28px;
  font: 700 1rem/1 "Figtree", "Helvetica Neue", Arial, sans-serif;
  color: var(--on-amber);
  background: var(--amber);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.rtg-submit:hover {
  background: var(--amber-hi);
}

.rtg-submit:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.rtg-submit:disabled {
  cursor: progress;
  opacity: 0.75;
}

.rtg-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgb(29 20 5 / 0.3);
  border-top-color: var(--on-amber);
  border-radius: 50%;
}

.rtg-submit[aria-busy="true"] .rtg-spinner {
  display: inline-block;
  animation: rtg-spin 0.8s linear infinite;
}

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

.rtg-status {
  margin: 0;
  padding: 12px 14px;
  font-size: 0.95rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--night-3);
}

.rtg-status[data-kind="ok"] {
  color: var(--ok);
  border-color: rgb(95 211 154 / 0.4);
}

.rtg-status[data-kind="error"] {
  color: var(--err);
  border-color: rgb(255 107 129 / 0.4);
}

@media (max-width: 575px) {
  .rtg-submit {
    justify-self: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rtg-field input,
  .rtg-field select,
  .rtg-field textarea,
  .rtg-submit {
    transition: none;
  }
  .rtg-submit[aria-busy="true"] .rtg-spinner {
    animation-duration: 2.4s;
  }
}
