/* ═══════════════════════════════════════════════════
   InstaINR Support — Contact Form
   Visual language matched to the main support page.
   ═══════════════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #060a13;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e4e4e7;
  --text-dim: #8b8b99;
  --accent: #00E676;
  --accent-glow: rgba(0, 230, 118, 0.12);
  --gradient: linear-gradient(135deg, #00E676, #00B0FF);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 10, 19, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}

.nav-brand img { border-radius: 8px; }
.nav-divider { color: var(--border); font-weight: 300; }
.nav-sub { color: var(--text-dim); font-weight: 500; font-size: 0.95rem; }

.nav-cta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.nav-cta:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 230, 118, 0.3);
  color: var(--accent);
}

/* ── Form Page ── */
.form-page {
  flex: 1;
  padding: 72px 0 80px;
}

.form-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.form-heading {
  text-align: center;
  margin-bottom: 34px;
}

.form-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.form-heading h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.form-heading p {
  max-width: 590px;
  margin: 0 auto;
  color: var(--text-dim);
  font-size: 0.98rem;
}

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

.field {
  min-width: 0;
}

.field label {
  display: block;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.field label span { color: var(--accent); }

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.field input,
.field select {
  height: 50px;
  padding: 0 15px;
}

.field textarea {
  min-height: 160px;
  padding: 13px 15px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder { color: #707080; }

.field select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 44px;
  background-image:
    linear-gradient(45deg, transparent 50%, #8b8b99 50%),
    linear-gradient(135deg, #8b8b99 50%, transparent 50%);
  background-position:
    calc(100% - 19px) 21px,
    calc(100% - 14px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field select option {
  background: #0b101c;
  color: #e4e4e7;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  background: var(--bg-card-hover);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(0, 230, 118, 0.5);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.08);
}

.field input:invalid:not(:placeholder-shown),
.field textarea:invalid:not(:placeholder-shown) {
  border-color: rgba(255, 96, 96, 0.42);
}

.submit-btn {
  width: 100%;
  min-height: 52px;
  margin-top: 24px;
  border: 0;
  border-radius: 12px;
  background: var(--gradient);
  color: #031008;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(0, 176, 255, 0.14);
}

.submit-btn:disabled { cursor: not-allowed; opacity: 0.78; }

.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(3, 16, 8, 0.25);
  border-top-color: #031008;
  border-radius: 50%;
  vertical-align: middle;
  animation: spin 0.75s linear infinite;
}

.submit-btn.loading .btn-label { display: none; }
.submit-btn.loading .btn-spinner { display: inline-block; }

.form-note {
  margin-top: 13px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.74rem;
}

.form-error {
  min-height: 21px;
  margin-top: 9px;
  text-align: center;
  color: #ff8d8d;
  font-size: 0.82rem;
}

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

/* ── Success State ── */
.success-state {
  text-align: center;
  padding: 26px 8px 12px;
}

.success-state[hidden] { display: none; }

.success-icon {
  width: 82px;
  height: 82px;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(0, 230, 118, 0.22);
  box-shadow: 0 0 36px rgba(0, 230, 118, 0.09);
}

.success-state h2 {
  color: #fff;
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.success-state p {
  max-width: 500px;
  margin: 0 auto 26px;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.7;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: var(--bg-card);
  color: var(--text);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  transition: all 0.2s;
}

.back-btn:hover {
  border-color: rgba(0, 230, 118, 0.3);
  background: var(--bg-card-hover);
  color: var(--accent);
}

.success-state.show .success-icon {
  animation: success-pop 0.45s ease-out both;
}

/* ── Footer ── */
.support-footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.support-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.support-footer p {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); }

/* ── Animations ── */
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes success-pop {
  0% { transform: scale(0.72); opacity: 0; }
  75% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); }
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .navbar { padding: 12px 0; }
  .nav-brand { gap: 8px; font-size: 1rem; }
  .nav-sub { font-size: 0.88rem; }
  .nav-cta { padding: 7px 15px; font-size: 0.8rem; }
  .form-page { padding: 42px 0 54px; }
  .form-card { padding: 28px 20px; border-radius: 16px; }
  .form-heading { margin-bottom: 28px; }
  .form-heading h1 { font-size: 1.8rem; }
  .form-heading p { font-size: 0.9rem; }
  .support-footer .container { flex-direction: column; gap: 10px; text-align: center; }
  .success-state h2 { font-size: 1.35rem; }
}
