/* =========================================================
   ReMedix — Contact form page
   ========================================================= */

.page-contact {
  color: var(--text-light);
  background: linear-gradient(165deg, #26272b 0%, #1e1f22 55%, #17181b 100%);
  min-height: 100vh;
}

/* keep the header light on this dark page */
.page-contact .header .logo { color: var(--cream); }
.page-contact .header .gnav__list a { color: var(--text-light); }
.page-contact .header .menu-toggle { border-color: var(--line-light); }
.page-contact .header .menu-toggle__lines span { background: var(--text-light); }
.page-contact .header.is-scrolled {
  background: rgba(30, 31, 34, 0.62);
  border-bottom: 1px solid var(--line-light);
}

/* ---- Layout ---- */
.contact-main {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(120px, 16vh, 190px) var(--gutter) clamp(70px, 12vh, 120px);
}

.contact-head { margin-bottom: clamp(40px, 6vw, 64px); }
.contact-head__label {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.32em;
  color: var(--gold-soft);
  display: block;
  margin-bottom: 22px;
}
.contact-head__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.1;
  color: var(--cream);
}
.contact-head__lead {
  font-family: var(--mincho);
  font-size: clamp(14px, 1.7vw, 16px);
  line-height: 2;
  color: var(--text-light);
  margin-top: 22px;
  max-width: 60ch;
}

/* ---- Alert ---- */
.form-alert {
  display: none;
  border: 1px solid rgba(191, 120, 100, 0.55);
  background: rgba(120, 60, 48, 0.14);
  color: #e6b8ab;
  font-family: var(--mincho);
  font-size: 14px;
  line-height: 1.9;
  padding: 16px 20px;
  margin-bottom: 34px;
}
.form-alert.is-shown { display: block; }

/* ---- Form ---- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px 28px;
}
.field { display: flex; flex-direction: column; gap: 10px; }
.field--full { grid-column: 1 / -1; }

.field label {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}
.field .req { color: var(--gold); margin-left: 6px; }

.field input,
.field select,
.field textarea {
  font-family: var(--mincho);
  font-size: 15px;
  color: var(--cream);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-light);
  padding: 12px 2px;
  transition: border-color .4s var(--ease);
  width: 100%;
  border-radius: 0;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.9; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(154, 144, 132, 0.6); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--gold);
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%),
                    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 14px) center, calc(100% - 8px) center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 28px;
  cursor: pointer;
}
.field select option { color: #14110e; }
.field input:not(:placeholder-shown):invalid,
.field textarea:not(:placeholder-shown):invalid { border-bottom-color: rgba(191, 120, 100, 0.7); }

/* honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* consent */
.consent {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 6px;
}
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--gold); flex: none; }
.consent label {
  font-family: var(--mincho);
  font-size: 14px;
  color: var(--text-light);
  letter-spacing: 0.02em;
  line-height: 1.8;
}
.consent a { color: var(--gold-soft); text-decoration: underline; text-underline-offset: 3px; }

/* submit */
.form-actions { grid-column: 1 / -1; margin-top: 18px; }
.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100%, 320px);
  padding: 20px 30px;
  border: 1px solid var(--gold);
  background: transparent;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.24em;
  color: var(--cream);
  position: relative;
  overflow: hidden;
  transition: color .45s var(--ease);
}
.submit-btn span, .submit-btn svg { position: relative; z-index: 2; }
.submit-btn svg { width: 16px; color: var(--gold); transition: color .45s, transform .45s var(--ease); }
.submit-btn::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.submit-btn:hover { color: var(--ink); }
.submit-btn:hover svg { color: var(--ink); transform: translateX(4px); }
.submit-btn:hover::before { transform: scaleX(1); }

/* ---- Thanks page ---- */
.thanks-main {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(160px, 24vh, 260px) var(--gutter) 120px;
  text-align: center;
}
.thanks-main .contact-head__title { margin-bottom: 8px; }
.thanks-main p {
  font-family: var(--mincho);
  font-size: 15px;
  line-height: 2.1;
  color: var(--text-light);
  margin: 24px 0 40px;
}
.back-home {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--cream);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 6px;
}
.back-home svg { width: 15px; color: var(--gold); }

@media (max-width: 680px) {
  .form-grid { grid-template-columns: 1fr; gap: 26px; }
}
