/* ==========================================================================
   Request Access — page-specific styles
   Inherits all variables and base styles from ../style.css
   ========================================================================== */

.page-body {
  background: var(--cream);
}

/* ── Page hero band ── */
.form-page-hero {
  background: var(--navy-deep);
  color: #fff;
  padding: 3rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.form-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(185,138,62,0.07) 0%, transparent 60%);
  pointer-events: none;
}

.form-page-hero .section-label {
  color: var(--gold-light);
  margin-bottom: 0.6rem;
}

.form-page-hero h1 {
  color: #fff;
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  margin-bottom: 0.85rem;
}

.form-page-sub {
  color: rgba(255,255,255,0.72);
  max-width: 34rem;
  margin: 0;
  font-size: 1rem;
}

.back-link {
  display: inline-block;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.75rem;
  transition: color 0.2s ease;
  letter-spacing: 0.01em;
}
.back-link:hover { color: var(--gold-light); }

/* ── Form wrapper ── */
.form-wrap {
  padding: 4rem 0 6rem;
}

.wrap-form {
  max-width: 680px;
}

/* ── Form grid ── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field-group--full {
  grid-column: 1 / -1;
}

/* ── Labels ── */
label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.01em;
}

.req {
  color: var(--gold);
  margin-left: 2px;
}

/* ── Inputs & textarea ── */
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 0.97rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

input::placeholder,
textarea::placeholder {
  color: #aab0ba;
}

input:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(185,138,62,0.12);
}

/* Invalid state — only shown after attempted submit */
.was-validated input:invalid,
.was-validated textarea:invalid {
  border-color: #c0392b;
}

.was-validated input:invalid:focus,
.was-validated textarea:invalid:focus {
  box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}

textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

/* ── Checkbox ── */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1.5px solid var(--line);
  border-radius: 2px;
  background: #fff;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  margin-top: 1px;
  transition: background 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.checkbox-label input[type="checkbox"]:checked {
  background: var(--gold);
  border-color: var(--gold);
}

.checkbox-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.checkbox-label input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ── Field errors ── */
.field-error {
  font-size: 0.8rem;
  color: #c0392b;
  min-height: 1rem;
  display: block;
}

/* ── Submit row ── */
.form-footer {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn-submit {
  min-width: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  position: relative;
}

.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn-submit.is-loading .btn-label { opacity: 0.5; }
.btn-submit.is-loading .btn-spinner { display: block; }

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

.form-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 0;
  max-width: 22rem;
}

/* ── Success state ── */
.form-success {
  text-align: center;
  padding: 3rem 2rem;
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0); }
}

.success-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(185,138,62,0.12);
  color: var(--gold);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.form-success h2 {
  margin-bottom: 0.6rem;
}

.form-success p {
  max-width: 28rem;
  margin: 0 auto 1.75rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field-group--full {
    grid-column: 1;
  }
  .form-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  .btn-submit {
    width: 100%;
  }
}