@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@400;600&display=swap");

:root {
  font-family: "Noto Sans Arabic", Arial, sans-serif;
  color: #07142f;
  background: #f6f8f3;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 85% 4%, rgba(141, 198, 58, 0.14), transparent 30rem),
    #f6f8f3;
}

button, input, textarea { font: inherit; }

.page-shell {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: 32px 0 20px;
}

.form-card {
  padding: clamp(24px, 6vw, 46px);
  background: #fff;
  border: 1px solid #e6eadf;
  border-radius: 22px;
  box-shadow: 0 18px 55px rgba(7, 20, 47, 0.08);
}

.form-header { text-align: center; margin-bottom: 28px; }

.brand { display: inline-flex; margin-bottom: 18px; }
.brand img { display: block; width: 142px; height: 72px; object-fit: contain; }

.eyebrow {
  margin: 0 0 7px;
  color: #679b1d;
  font-size: 14px;
  font-weight: 600;
}

h1 { margin: 0; font-size: clamp(27px, 6vw, 36px); line-height: 1.35; font-weight: 600; }
.intro { max-width: 530px; margin: 12px auto 0; color: #526079; font-size: 16px; line-height: 1.8; }

form { display: grid; gap: 18px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 8px; }

label { color: #17233c; font-size: 15px; font-weight: 600; }
label > span[aria-hidden="true"] { color: #8dc63a; }
.optional { color: #7a8497; font-size: 12px; font-weight: 400; }

input, textarea {
  width: 100%;
  border: 1px solid #d8ddd1;
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: #07142f;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input { height: 48px; padding: 0 13px; }
textarea { min-height: 92px; padding: 11px 13px; resize: vertical; }
input:focus, textarea:focus { border-color: #8dc63a; box-shadow: 0 0 0 3px rgba(141, 198, 58, 0.16); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #c83c3c; }

.error { min-height: 16px; color: #b42318; font-size: 12px; line-height: 1.4; }
.honeypot { position: absolute; right: -10000px; width: 1px; height: 1px; overflow: hidden; }

.consent { display: flex; align-items: flex-start; gap: 10px; color: #526079; font-size: 13px; line-height: 1.7; font-weight: 400; }
.consent input { flex: 0 0 auto; width: 18px; height: 18px; margin: 4px 0 0; accent-color: #8dc63a; }
.consent a, footer a { color: #456f0b; text-underline-offset: 3px; }
.consent-error { margin-top: -13px; }

.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  border: 0;
  border-radius: 10px;
  background: #8dc63a;
  color: #102108;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

.submit-button:hover { background: #80b833; }
.submit-button:active { transform: translateY(1px); }
.submit-button:disabled { cursor: wait; opacity: 0.72; }
.spinner { display: none; width: 19px; height: 19px; border: 2px solid rgba(16, 33, 8, 0.28); border-top-color: #102108; border-radius: 50%; animation: spin 800ms linear infinite; }
.submit-button.is-loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-message { display: none; padding: 13px 15px; border-radius: 10px; font-size: 14px; line-height: 1.7; }
.form-message.success { display: block; background: #eef7df; color: #355807; }
.form-message.failure { display: block; background: #fff0ef; color: #9b241c; }

footer { padding: 18px 0 0; text-align: center; color: #7a8497; font-size: 12px; }
footer p { margin: 7px 0 0; }

@media (max-width: 600px) {
  .page-shell { width: min(100% - 24px, 760px); padding-top: 12px; }
  .form-card { padding: 22px 18px 24px; border-radius: 16px; }
  .brand { margin-bottom: 12px; }
  .brand img { width: 126px; height: 64px; }
  .form-header { margin-bottom: 23px; }
  .intro { font-size: 15px; }
  .field-grid { grid-template-columns: 1fr; gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
