/* ── Rewa Capital Funding Form — form.css ─────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --rewa-blue:       #0047AB;
  --rewa-blue-dark:  #003080;
  --rewa-blue-light: #ddeaff;
  --rewa-blue-pale:  #f0f4ff;
  --rewa-gold:       #C49A2B;
  --rewa-text:       #1a1a2e;
  --rewa-muted:      #5a6a8a;
  --rewa-border:     #d0daf5;
  --rewa-radius:     10px;
  --rewa-shadow:     0 2px 20px rgba(0, 71, 171, 0.08);
}

/* ── Wrap ───────────────────────────────────────────────────────────────────── */
.rewa-form-wrap {
  font-family: 'DM Sans', sans-serif;
  color: var(--rewa-text);
  max-width: 860px;
  margin: 0 auto;
  padding: 0 0 60px;
}

/* ── Page Header ────────────────────────────────────────────────────────────── */
.rewa-page-header {
  text-align: center;
  padding: 52px 40px 44px;
  background: linear-gradient(135deg, var(--rewa-blue-dark) 0%, var(--rewa-blue) 100%);
  border-radius: 16px;
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}
.rewa-page-header::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.rewa-page-header::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -40px;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.rewa-page-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 600;
  color: #fff;
  margin: 0 0 16px;
  position: relative;
  z-index: 1;
}
.rewa-page-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  max-width: 580px;
  margin: 0 auto 14px;
  line-height: 1.65;
  position: relative;
  z-index: 1;
}
.rewa-page-note {
  display: inline-block;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 16px;
  border-radius: 100px;
  margin: 0;
  position: relative;
  z-index: 1;
  letter-spacing: 0.3px;
}

/* ── Errors ──────────────────────────────────────────────────────────────────── */
.rewa-errors {
  background: #fff5f5;
  border: 1px solid #f7b7b7;
  border-left: 4px solid #d93025;
  border-radius: var(--rewa-radius);
  padding: 18px 22px;
  margin-bottom: 32px;
  font-size: 14px;
  color: #c62828;
}
.rewa-errors ul { margin: 8px 0 0; padding-left: 18px; }
.rewa-errors li { margin-bottom: 4px; }

/* ── Section ─────────────────────────────────────────────────────────────────── */
.rewa-section {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0 24px;
  margin-bottom: 36px;
  background: #fff;
  border: 1px solid var(--rewa-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--rewa-shadow);
  transition: box-shadow 0.2s;
}
.rewa-section:hover {
  box-shadow: 0 4px 32px rgba(0,71,171,0.13);
}
.rewa-section-label {
  background: var(--rewa-blue);
  color: rgba(255,255,255,0.6);
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  writing-mode: vertical-lr;
  text-align: center;
  padding: 20px 0;
  user-select: none;
}
.rewa-section-body {
  padding: 28px 32px 32px;
}
.rewa-section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--rewa-blue-dark);
  margin: 0 0 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rewa-border);
}
.rewa-optional-tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  background: var(--rewa-blue-light);
  color: var(--rewa-blue);
  padding: 3px 10px;
  border-radius: 100px;
  vertical-align: middle;
  margin-left: 8px;
  letter-spacing: 0.5px;
}

/* ── Grid helpers ────────────────────────────────────────────────────────────── */
.rewa-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.rewa-span-2 { grid-column: 1 / -1; }

/* ── Fields ──────────────────────────────────────────────────────────────────── */
.rewa-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.rewa-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--rewa-text);
  letter-spacing: 0.2px;
}
.rewa-field .req { color: var(--rewa-blue); font-weight: 700; }

.rewa-field input[type="text"],
.rewa-field input[type="email"],
.rewa-field input[type="tel"],
.rewa-field input[type="url"],
.rewa-field input[type="number"],
.rewa-field select,
.rewa-field textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--rewa-border);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--rewa-text);
  background: #fafbff;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  box-sizing: border-box;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.rewa-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230047AB' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}
.rewa-field input:focus,
.rewa-field select:focus,
.rewa-field textarea:focus {
  border-color: var(--rewa-blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0,71,171,0.10);
}
.rewa-field textarea { resize: vertical; line-height: 1.6; }
.rewa-field input::placeholder,
.rewa-field textarea::placeholder { color: #a0adc5; }

/* ── Radio group ─────────────────────────────────────────────────────────────── */
.rewa-radio-group {
  display: flex;
  gap: 12px;
}
.rewa-radio { display: flex; align-items: center; cursor: pointer; }
.rewa-radio input { display: none; }
.rewa-radio-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 28px;
  border: 1.5px solid var(--rewa-border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--rewa-muted);
  background: #fafbff;
  transition: all 0.18s;
  cursor: pointer;
  user-select: none;
}
.rewa-radio input:checked + .rewa-radio-btn {
  border-color: var(--rewa-blue);
  background: var(--rewa-blue);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,71,171,0.25);
}

/* ── File upload ─────────────────────────────────────────────────────────────── */
.rewa-file-wrap {
  position: relative;
  border: 2px dashed var(--rewa-border);
  border-radius: 10px;
  background: var(--rewa-blue-pale);
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}
.rewa-file-wrap:hover, .rewa-file-wrap.drag-over {
  border-color: var(--rewa-blue);
  background: var(--rewa-blue-light);
}
.rewa-file-wrap input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.rewa-file-ui {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
}
.rewa-file-icon { font-size: 28px; line-height: 1; }
.rewa-file-text { display: flex; flex-direction: column; gap: 4px; }
.rewa-file-text strong { font-size: 14px; font-weight: 600; color: var(--rewa-blue); }
.rewa-file-text span { font-size: 12px; color: var(--rewa-muted); }
.rewa-file-selected {
  font-size: 13px;
  color: var(--rewa-blue);
  font-weight: 600;
  padding: 0 24px 14px;
  display: none;
}

/* ── Checkboxes ──────────────────────────────────────────────────────────────── */
.rewa-section-check { background: var(--rewa-blue-pale); border-color: var(--rewa-blue); }
.rewa-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  margin-bottom: 18px;
}
.rewa-checkbox-label:last-child { margin-bottom: 0; }
.rewa-checkbox-label input { display: none; }
.rewa-check-custom {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border: 2px solid var(--rewa-border);
  border-radius: 5px;
  background: #fff;
  margin-top: 1px;
  transition: all 0.18s;
  position: relative;
}
.rewa-checkbox-label input:checked ~ .rewa-check-custom,
.rewa-checkbox-label input:checked + .rewa-check-custom {
  background: var(--rewa-blue);
  border-color: var(--rewa-blue);
}
.rewa-checkbox-label input:checked + .rewa-check-custom::after {
  content: '';
  display: block;
  position: absolute;
  top: 3px; left: 6px;
  width: 5px; height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
/* Handle the case where check-text comes after check-custom */
.rewa-checkbox-label input:checked ~ .rewa-check-custom::after {
  content: '';
  display: block;
  position: absolute;
  top: 3px; left: 6px;
  width: 5px; height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
.rewa-check-text {
  font-size: 14px;
  color: var(--rewa-text);
  line-height: 1.55;
  font-weight: 500;
}

/* ── Submit ──────────────────────────────────────────────────────────────────── */
.rewa-submit-row {
  text-align: center;
  padding-top: 12px;
}
.rewa-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--rewa-blue);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  padding: 18px 52px;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 6px 24px rgba(0,71,171,0.30);
  letter-spacing: 0.2px;
}
.rewa-submit-btn:hover {
  background: var(--rewa-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(0,71,171,0.38);
}
.rewa-submit-btn:active { transform: translateY(0); }
.rewa-btn-arrow {
  font-size: 20px;
  transition: transform 0.2s;
}
.rewa-submit-btn:hover .rewa-btn-arrow { transform: translateX(4px); }
.rewa-submit-note {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--rewa-muted);
}

/* ── Success banner ──────────────────────────────────────────────────────────── */
.rewa-success-banner {
  text-align: center;
  padding: 72px 40px;
  background: linear-gradient(135deg, var(--rewa-blue-dark), var(--rewa-blue));
  border-radius: 16px;
  color: #fff;
}
.rewa-success-icon {
  width: 72px; height: 72px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  font-size: 36px;
  line-height: 72px;
  margin: 0 auto 24px;
}
.rewa-success-banner h2 {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  margin: 0 0 16px;
  font-weight: 600;
}
.rewa-success-banner p {
  font-size: 16px;
  color: rgba(255,255,255,0.82);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
  .rewa-section { grid-template-columns: 1fr; }
  .rewa-section-label { writing-mode: horizontal-tb; padding: 12px 24px; font-size: 11px; }
  .rewa-section-body { padding: 20px 20px 24px; }
  .rewa-grid-2 { grid-template-columns: 1fr; }
  .rewa-span-2 { grid-column: 1; }
  .rewa-submit-btn { width: 100%; justify-content: center; padding: 18px 32px; }
  .rewa-page-header { padding: 36px 24px 32px; border-radius: 12px; }
}
