@font-face {
  font-family: "Tajawal";
  src: url("fonts/Tajawal-ExtraLight.ttf") format("truetype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Tajawal";
  src: url("fonts/Tajawal-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Tajawal";
  src: url("fonts/Tajawal-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fff8f0;
  --ink: #9f694f;
  --ink-deep: #8a5640;
  --brown: #9a6248;
  --brown-deep: #84543c;
  --line: #e4d5c8;
  --gold: #c4a27a;
  --card: #fffdfb;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: "Tajawal", sans-serif;
  font-weight: 200;
  font-size: 18px;
  line-height: 1.45;
}

body.modal-open { overflow: hidden; }

.sheet {
  width: min(640px, calc(100% - 36px));
  margin: 0 auto;
  padding: 36px 0 32px;
}

.brand { text-align: center; }

.brand img {
  width: min(508px, 82%);
  height: auto;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 22px auto 34px;
  width: min(168px, 36%);
}

.ornament span {
  flex: 1;
  height: 1px;
  background: #b88868;
}

.ornament i {
  width: 8px;
  height: 8px;
  background: #b88868;
  transform: rotate(45deg);
}

.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  margin: 0 0 36px;
  font-size: 18px;
}

.intro p { margin: 0; }
.intro .light { font-weight: 200; }
.intro .strong {
  margin-top: 14px;
  font-weight: 700;
  color: var(--ink-deep);
}

.intro-en { text-align: left; }
.intro-ar { text-align: right; }

.form-note {
  text-align: center;
  color: var(--brown);
  margin: 0 0 18px;
  font-size: 15px;
}

.reg { width: 100%; }

.field {
  display: grid;
  grid-template-columns: minmax(108px, 1fr) minmax(120px, 1.15fr) minmax(108px, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 52px;
  border-bottom: 1px solid #d9c7b6;
  margin: 0;
  cursor: text;
}

.side {
  font-weight: 700;
  font-size: 17px;
  color: var(--ink-deep);
  line-height: 1;
  padding-bottom: 1px;
}

.field .side:first-child { text-align: left; }
.field .side:last-child { text-align: right; }

.mid {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
}

.field input,
.field select {
  width: 100%;
  height: 24px;
  border: 0;
  background: transparent;
  color: var(--ink-deep);
  font-family: inherit;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  padding: 0;
  margin: 0;
  border-radius: 0;
  appearance: none;
}

.field select { text-align-last: center; }

.field select:invalid { color: transparent; }

.chevron {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 6px;
  transform: translate(-50%, -50%);
  fill: var(--ink-deep);
  pointer-events: none;
}

.field select:valid + .chevron { display: none; }

.field select option { color: var(--ink-deep); }

.field input:focus,
.field select:focus { outline: none; }

.submit {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  margin: 36px auto 18px;
  border: 0;
  cursor: pointer;
  background: var(--brown);
  color: #fffaf6;
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 0 42px;
  border-radius: 999px;
  min-width: 210px;
}

.btn-text {
  display: block;
  line-height: 1;
  transform: translateY(1px);
}

.submit:hover { background: var(--brown-deep); }

.privacy-line {
  text-align: center;
  font-size: 13.5px;
  font-weight: 200;
  line-height: 1.55;
  margin: 0;
  color: var(--ink);
}

.privacy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 34px;
  margin: 14px auto 0;
  padding: 0 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-deep);
  font-family: inherit;
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1;
  cursor: pointer;
}

.privacy-btn svg {
  display: block;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.privacy-btn:hover { background: rgba(159, 105, 79, 0.06); }

.thanks {
  text-align: center;
  margin: 6px auto 0;
}

.thanks .light {
  font-weight: 200;
  font-size: 18px;
  line-height: 1.65;
}

.thanks .en.light { margin-top: 22px; }

.thanks-qr {
  display: block;
  width: 180px;
  height: 180px;
  margin: 28px auto 0;
  background: #fff;
}

.pdf-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  height: 42px;
  margin: 16px auto 0;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--brown);
  color: #fffaf6;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.pdf-link:hover { background: var(--brown-deep); }

.thanks .await {
  margin-top: 34px;
  font-weight: 700;
  font-size: 22px;
  color: var(--ink-deep);
  line-height: 1.4;
}

.thanks .await.en {
  margin-top: 4px;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid #e0d0c2;
  font-size: 14.5px;
  font-weight: 200;
  line-height: 1.55;
  text-align: center;
}

.contact p {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}

.contact a {
  margin-top: 8px;
  color: var(--ink-deep);
  font-weight: 700;
  text-decoration: none;
}

.partners {
  margin-top: 56px;
  text-align: center;
}

.partners img {
  width: min(296px, 48%);
  height: auto;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(255, 248, 240, 0.45);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 20;
}

.modal[hidden] { display: none; }

.modal-card {
  width: min(480px, 100%);
  background: var(--card);
  border-radius: 28px;
  box-shadow: 0 16px 50px rgba(120, 80, 50, 0.14);
  padding: 36px 32px 28px;
  text-align: center;
}

.modal-card .ar,
.modal-card .en {
  margin: 0;
  font-weight: 200;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
}

.modal-card .ar { margin-bottom: 18px; }
.modal-card .submit { margin-top: 26px; }

@media (max-width: 700px) {
  html, body { font-size: 16px; }
  .sheet { width: min(100% - 28px, 640px); }
  .intro, .contact { grid-template-columns: 1fr; gap: 16px; }
  .intro-en, .intro-ar, .contact .en, .contact .ar { text-align: center; }
  .intro-ar { order: -1; }
  .intro .strong { margin-top: 8px; }
  .field { min-height: 48px; }
  .side { font-size: 15px; }
  .partners img { width: min(250px, 62%); }
}
