/* Starfield background (matches other marketing pages) */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(153,138,194,0.5) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 35% 8%, rgba(253,187,37,0.45) 0%, transparent 100%),
    radial-gradient(1px 1px at 68% 22%, rgba(153,138,194,0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 82% 5%, rgba(253,187,37,0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 14%, rgba(153,138,194,0.25) 0%, transparent 100%),
    radial-gradient(1px 1px at 91% 31%, rgba(153,138,194,0.25) 0%, transparent 100%);
  pointer-events: none; z-index: 0;
}

/* Nav back link */
.nav-back {
  font-size: 13px; font-weight: 500;
  color: var(--text3); text-decoration: none;
  display: flex; align-items: center; gap: 6px;
  transition: color 0.2s;
}
.nav-back:hover { color: var(--lavender); }

/* Page layout */
.contact-main {
  position: relative; z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 80px 40px 120px;
}

.contact-main h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 600; line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text); margin-bottom: 16px;
}

.contact-lead {
  font-size: 16px; color: var(--text2);
  line-height: 1.75; margin-bottom: 56px;
}

/* Form */
.contact-form {
  display: flex; flex-direction: column; gap: 24px;
}

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

.form-field {
  display: flex; flex-direction: column; gap: 8px;
}

.form-field label {
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text3);
}

.form-field input,
.form-field textarea,
.form-field select {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  color: var(--text);
  font-family: 'Gabarito', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  -webkit-appearance: none;
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%236d7f99' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.form-field select option { background: #141928; }

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text3);
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: rgba(120,74,157,0.6);
  box-shadow: 0 0 0 3px rgba(120,74,157,0.14);
}

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

/* Submit button */
.btn-contact {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--violet);
  color: #fff;
  font-family: 'Gabarito', sans-serif;
  font-size: 15px; font-weight: 500;
  padding: 12px 28px;
  border: none; border-radius: 6px;
  cursor: pointer;
  transition: background 0.18s, transform 0.1s;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.btn-contact:hover {
  background: var(--violet-hover);
  transform: translateY(-1px);
}
.btn-contact:active { transform: none; }
.btn-contact:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
}

/* Success state */
.contact-success {
  display: none;
  background: var(--bg2);
  border: 1px solid rgba(21,128,61,0.35);
  border-radius: 10px;
  padding: 36px 40px;
  text-align: center;
}
.contact-success.visible { display: block; }
.contact-form.hidden { display: none; }

.success-icon {
  width: 48px; height: 48px;
  background: rgba(21,128,61,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}

.contact-success h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 22px; font-weight: 600;
  color: var(--text); margin-bottom: 10px;
}

.contact-success p {
  font-size: 15px; color: var(--text2); line-height: 1.7;
  margin: 0;
}

/* Light mode adjustments */
[data-theme="light"] .form-field input,
[data-theme="light"] .form-field textarea,
[data-theme="light"] .form-field select {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}
[data-theme="light"] .form-field input:focus,
[data-theme="light"] .form-field textarea:focus,
[data-theme="light"] .form-field select:focus {
  border-color: rgba(107,58,154,0.5);
  box-shadow: 0 0 0 3px rgba(107,58,154,0.1);
}
[data-theme="light"] .contact-success {
  background: var(--bg2);
  border-color: rgba(22,101,52,0.3);
}
[data-theme="light"] .success-icon { background: rgba(22,101,52,0.12); }

@media (max-width: 640px) {
  .contact-main { padding: 56px 20px 80px; }
  .form-row { grid-template-columns: 1fr; }
  .btn-contact { width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
  .contact-main { padding: 40px 16px 64px; }
  .contact-success { padding: 28px 24px; }
}

/* ── HIGH CONTRAST: contact submit button ── */
html[data-contrast="high"] .btn-contact { background: #000 !important; color: #fff !important; border: 2px solid #fff !important; }
html[data-contrast="high"] .btn-contact:hover { background: #111 !important; }
html[data-theme="light"][data-contrast="high"] .btn-contact { background: #fff !important; color: #000 !important; border: 2px solid #000 !important; }
html[data-theme="light"][data-contrast="high"] .btn-contact:hover { background: #eee !important; }
