/* ── ENTRANCE ANIMATIONS ── */
@media (prefers-reduced-motion: no-preference) {
  .contact-hero {
    opacity: 0;
    animation: fadeIn 1.2s cubic-bezier(0.4, 0, 0.6, 1) 0s forwards;
  }
  .tab-switcher {
    opacity: 0;
    animation: fadeIn 1.2s cubic-bezier(0.4, 0, 0.6, 1) 0.15s forwards;
  }
  .tab-panel {
    opacity: 0;
    animation: fadeIn 1.2s cubic-bezier(0.4, 0, 0.6, 1) 0.3s forwards;
  }
}

/* ── CONTACT HERO ── */
.contact-hero {
  text-align: center;
  padding: 4rem 0 3rem;
  max-width: 40rem;
  margin: 0 auto;
}

.contact-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 1rem;
}

.contact-hero p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── TAB SWITCHER ── */
.tab-switcher {
  display: flex;
  gap: 0.375rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  padding: 0.375rem;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
  margin: 0 auto 3rem;
}

.tab-btn {
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  padding: 0.625rem 1.5rem;
  border-radius: calc(var(--radius-xl) - 3px);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.tab-btn:hover { color: var(--text); }

.tab-btn.active {
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: #000;
}

@media (max-width: 480px) {
  .tab-switcher { width: 100%; }
  .tab-btn { flex: 1; font-size: 0.875rem; padding: 0.625rem 0.75rem; }
}

/* ── CONTENT WRAPPER ── */
.contact-content {
  max-width: 44rem;
  margin: 0 auto;
  padding-bottom: 6rem;
}

.tab-panel.hidden { display: none; }

/* ── SECTION LABELS ── */
.form-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(167, 139, 250, 0.15);
}

.form-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 2rem 0;
}

/* ── FIELDSET NORMALISATION ── */
fieldset.form-group {
  border: none;
  padding: 0;
  margin: 0 0 1.25rem;
  min-width: 0;
}

fieldset.form-group > legend {
  float: left;
  width: 100%;
  padding: 0;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

fieldset.form-group > legend + * { clear: left; }

/* ── FORM GROUPS ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 1.25rem;
}

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

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

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.form-label .req {
  color: var(--accent);
  margin-left: 0.2rem;
}

.form-label .opt {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-tertiary);
  margin-left: 0.375rem;
}

/* ── INPUTS ── */
.form-input,
.form-textarea,
.form-select {
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-caption);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.12);
}

.form-input.is-error,
.form-textarea.is-error,
.form-select.is-error {
  border-color: #f87171;
  box-shadow: none;
}

.form-textarea {
  resize: vertical;
  min-height: 8rem;
  line-height: 1.6;
}

/* custom dropdown arrow */
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a78bfa' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-select option { background: #111122; color: var(--text); }

/* ── ERROR MESSAGES ── */
.form-error {
  font-size: 0.8125rem;
  color: #f87171;
  display: none;
}

.form-error.visible { display: block; }

/* ── RADIO / CHECKBOX GROUPS ── */
.form-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 0.25rem;
}

.form-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.form-option input[type="radio"],
.form-option input[type="checkbox"] {
  accent-color: var(--accent);
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  flex-shrink: 0;
}

.form-option-label {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.form-option:has(input:checked) .form-option-label { color: var(--text); }

/* ── SUBMIT BUTTON ── */
.form-submit {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #000;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  border: none;
  border-radius: var(--radius-xl);
  padding: 0.875rem 2.5rem;
  cursor: pointer;
  margin-top: 1rem;
  transition: opacity 0.2s, transform 0.15s;
}

.form-submit:hover { opacity: 0.88; transform: translateY(-1px); }
.form-submit:active { transform: translateY(0); }

.form-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ── SUBMIT-LEVEL MESSAGES ── */
.form-submit-error {
  display: none;
  font-size: 0.875rem;
  color: #f87171;
  margin-top: 0.875rem;
}

.form-submit-error.visible { display: block; }

.form-cooldown {
  display: none;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: rgba(167, 139, 250, 0.07);
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  margin-top: 1rem;
}

.form-cooldown.visible { display: block; }

/* ── SUCCESS STATE ── */
.form-success {
  display: none;
  text-align: center;
  padding: 4rem 2rem;
}

.form-success.visible { display: block; }

.success-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  margin-bottom: 1.25rem;
}

.success-check svg { width: 1.5rem; height: 1.5rem; }

.form-success h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.form-success p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}
