:root {
  --gold: #F8B504;
  --gold-deep: #e0a200;
  --bg-0: #0c0c0e;     /* page */
  --bg-1: #161619;     /* card */
  --field: #202024;
  --field-border: #34343b;
  --line: #232327;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --error: #ff8787;
  --radius: 16px;
  --shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--bg-0);
  font-family: "Tajawal", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  /* Warm gold glow at the top, fading into near-black — echoes the banner. */
  background:
    radial-gradient(130% 55% at 50% 0%, rgba(248, 181, 4, 0.10) 0%, rgba(248, 181, 4, 0) 55%),
    var(--bg-0);
}

.card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;          /* clips the full-bleed hero to the rounded corners */
  margin-top: 8px;
}

/* Brand hero banner — edge to edge at the top of the card */
.hero {
  display: block;
  width: 100%;
  height: auto;
  background: #000;          /* matches banner bg before it loads */
}

.card-body { padding: 22px 20px 26px; }

.intro {
  text-align: center;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.7;
  margin: 4px 0 20px;
}
.intro strong { color: var(--gold); font-weight: 800; }

/* Form */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }

label, .label { font-size: 14px; font-weight: 700; color: var(--text); }
.req { color: var(--gold); }
.hint { font-size: 12px; color: var(--muted); }

input[type="text"],
input[type="tel"],
input[type="number"],
select {
  width: 100%;
  font-family: inherit;
  font-size: 16px; /* 16px avoids iOS zoom-on-focus */
  color: var(--text);
  background: var(--field);
  border: 1.5px solid var(--field-border);
  border-radius: 11px;
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: #6f6f78; }
input:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(248, 181, 4, 0.16);
}
select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: left 16px center, left 11px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
select option { color: #111; }      /* native dropdown list stays readable */
select:invalid { color: #6f6f78; }  /* placeholder option looks muted */

/* Date of birth — three matching dropdowns */
.dob { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dob select { padding-inline: 12px; text-align: center; text-align-last: center; }

/* Segmented yes/no toggle (radios) — selected pill fills gold */
.radios { display: flex; gap: 10px; }
.radio {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid var(--field-border);
  background: var(--field);
  border-radius: 11px;
  padding: 14px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio:has(input:checked) {
  border-color: var(--gold);
  background: var(--gold);
  color: #161619;
}

/* Multi-select cards (checkboxes) — custom gold check box */
.checkgroup { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.check-card {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--field-border);
  background: var(--field);
  border-radius: 11px;
  padding: 13px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.check-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.check-card__box {
  width: 22px; height: 22px; flex-shrink: 0;
  border: 1.5px solid var(--field-border);
  background: var(--bg-1);
  border-radius: 7px;
  display: grid; place-items: center;
  transition: background 0.15s, border-color 0.15s;
}
.check-card__box::after {
  content: '✓';
  font-size: 14px; font-weight: 800; line-height: 1; color: #161619;
  opacity: 0; transform: scale(0.4);
  transition: opacity 0.15s, transform 0.15s;
}
.check-card__text { flex: 1; }
.check-card:has(input:checked) { border-color: var(--gold); background: rgba(248, 181, 4, 0.12); }
.check-card:has(input:checked) .check-card__box { background: var(--gold); border-color: var(--gold); }
.check-card:has(input:checked) .check-card__box::after { opacity: 1; transform: scale(1); }

/* Button */
.btn {
  position: relative;
  width: 100%;
  border: none;
  border-radius: 12px;
  background: var(--gold);
  color: #161619;
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  padding: 15px;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s, transform 0.05s;
}
.btn:hover { background: var(--gold-deep); }
.btn:active { transform: scale(0.99); }
.btn:disabled { opacity: 0.7; cursor: default; }
.btn--ghost {
  background: transparent;
  border: 1.5px solid var(--field-border);
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.btn--ghost:hover { background: var(--field); }

.btn__spinner {
  display: none;
  position: absolute;
  inset-inline-start: 18px; top: 50%;
  width: 18px; height: 18px;
  margin-top: -9px;
  border: 2.5px solid rgba(0,0,0,0.3);
  border-top-color: #161619;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn.loading .btn__spinner { display: block; }
.btn.loading .btn__label { opacity: 0.55; }
@keyframes spin { to { transform: rotate(360deg); } }

.privacy { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.6; margin: 2px 0 0; }
.error { color: var(--error); font-size: 14px; font-weight: 600; background: rgba(255, 107, 107, 0.12); border-radius: 8px; padding: 10px 12px; margin: 0; }

/* Success */
.success { text-align: center; padding: 18px 6px; }
.success__icon { font-size: 52px; }
.success h2 { margin: 10px 0 8px; font-size: 22px; color: var(--text); }
.success p { color: var(--muted); line-height: 1.7; margin: 0 0 20px; }

/* Honeypot — visually hidden without expanding layout bounds */
.hp { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.hidden { display: none !important; }

.page-footer { margin: 20px 0 8px; opacity: 0.85; }
.page-footer img { height: 26px; width: auto; display: block; }
