/* ============================================================
   Sulaiman AlRajhi Real Estate — hero, about & lead form
   Primary colour sampled from logo.png (#667882)
   ============================================================ */

:root {
  --primary: #667882;
  --primary-hover: #56676f;
  --primary-border: #4f5f68;
  --primary-soft: rgba(102, 120, 130, 0.18);

  --bg: #F2F1F0;
  --bg-2: #F7F6F8;
  --heading: #2b3033;
  --nav-link: #3a3a3a;
  --body: #6b6f72;
  --line: #d5d9dc;
  --danger: #b3261e;
  --success: #3f7d57;

  --font: 'Quantico', 'Arial Narrow', sans-serif;
  --font-ar: 'Cairo', 'Quantico', 'Arial Narrow', sans-serif;

  --gutter: clamp(20px, 9vw, 118px);
  --stair: min(238px, 28vw);
  --stair-sm: min(160px, 18vw);

  --chamfer-16: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  --chamfer-12: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--bg);
  font-family: var(--font);
  color: var(--body);
  -webkit-font-smoothing: antialiased;
}
html[lang="ar"] body { font-family: var(--font-ar); }
/* Arabic is a connected script — tracking breaks the letterforms */
html[lang="ar"] * { letter-spacing: 0 !important; }

a { color: var(--nav-link); text-decoration: none; transition: color .2s; }
a:hover { color: #000; }

h1, h2, h3 {
  color: var(--heading);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.98;
  font-weight: 700;
  margin: 0;
}
html[lang="ar"] :is(h1, h2) { line-height: 1.22; }
html[lang="ar"] h3 { line-height: 1.4; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* ============================================================
   Buttons
   ============================================================ */
.btn-glow {
  display: inline-block;
  filter: drop-shadow(0 10px 18px rgba(79, 95, 104, 0.35));
  transition: filter .25s;
}
.btn-glow:hover { filter: drop-shadow(0 12px 24px rgba(79, 95, 104, 0.55)); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--primary);
  border: 1px solid var(--primary-border);
  color: #fff;
  font-family: inherit;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 18px 34px;
  font-size: clamp(13px, 2.2vw, 16px);
  line-height: 1.2;
  clip-path: var(--chamfer-16);
  box-shadow: 0 0 0 1px rgba(102, 120, 130, 0.35), 0 10px 30px -12px rgba(79, 95, 104, 0.6);
  cursor: pointer;
  transition: background .2s, box-shadow .2s;
}
.btn:hover {
  color: #fff;
  background: var(--primary-hover);
  box-shadow: 0 0 0 1px rgba(102, 120, 130, 0.55), 0 14px 38px -10px rgba(79, 95, 104, 0.8);
}
.btn__line { width: 22px; height: 1px; background: currentColor; flex: none; }

/* ============================================================
   Section 1 — Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  background: var(--bg);
  overflow: hidden;
}

.hero__video {
  position: absolute;
  top: 0;
  inset-inline-end: -20%;
  width: 99%;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  z-index: 0;
}
/* Mirror the footage in RTL so its dark side stays behind the (now left-aligned) white nav controls */
[dir="rtl"] .hero__video { transform: scaleX(-1); }

.hero__scrim {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 70%;
  background: linear-gradient(90deg, #F2F1F0 0%, #F2F1F0 55%, rgba(242,241,240,0.85) 78%, rgba(242,241,240,0) 100%);
  pointer-events: none;
  z-index: 1;
}
[dir="rtl"] .hero__scrim {
  background: linear-gradient(270deg, #F2F1F0 0%, #F2F1F0 55%, rgba(242,241,240,0.85) 78%, rgba(242,241,240,0) 100%);
}

/* Navbar */
.nav {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(20px, 5vw, 56px);
  padding: clamp(20px, 3vw, 38px) clamp(20px, 4vw, 48px) 0;
}

.nav__brand { display: inline-flex; align-items: center; }
.nav__brand img { display: block; height: clamp(44px, 4.6vw, 60px); width: auto; }

.nav__links {
  display: flex;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  font-weight: 700;
  font-size: clamp(12px, 2.4vw, 15px);
  letter-spacing: 0.06em;
  color: var(--nav-link);
  white-space: nowrap;
  text-transform: uppercase;
}
html[lang="ar"] .nav__links a { font-size: clamp(13px, 2.4vw, 16px); }
.nav__links a:hover { color: #000; }

.nav__actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 14px 26px;
  font-weight: 700;
  font-size: 14px;
  clip-path: var(--chamfer-12);
  transition: background .2s;
}
.nav__contact:hover { color: #fff; background: rgba(255, 255, 255, 0.14); }

.lang-toggle {
  font-family: var(--font-ar);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.55);
  padding: 11px 14px;
  min-width: 52px;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: background .2s;
}
html[lang="ar"] .lang-toggle { font-family: var(--font); letter-spacing: 0.08em; }
.lang-toggle:hover { background: rgba(255, 255, 255, 0.2); }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 0;
  padding: 10px 6px;
  cursor: pointer;
}
.nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  transition: transform .25s, opacity .25s;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
  flex-basis: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 20px;
  background: rgba(242, 241, 240, 0.94);
  backdrop-filter: blur(6px);
  clip-path: var(--chamfer-12);
}
.nav__mobile a {
  color: #1a1c1e;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Headline */
.hero__title {
  position: relative;
  z-index: 2;
  padding-block: min(clamp(40px, 9vw, 120px), 9vh) min(clamp(24px, 4vw, 44px), 5vh);
  padding-inline: var(--gutter) 20px;
  font-size: min(clamp(34px, 7.6vw, 80px), 9.2vh);
  font-weight: 700;
}
.line { display: block; }
.line--indent { margin-inline-start: var(--stair); }
.line--indent-sm { margin-inline-start: var(--stair-sm); }
.line--accent { color: var(--primary); }

.hero__cta {
  position: relative;
  z-index: 2;
  padding-inline-start: calc(var(--gutter) + var(--stair));
  padding-block-end: min(clamp(36px, 6vw, 80px), 7vh);
}

/* ============================================================
   Section 2 — About
   ============================================================ */
.about {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  background: linear-gradient(180deg, #F2F1F0 0%, #F7F6F8 18%, #F7F6F8 100%);
  padding: 0; /* media touches the screen edge */
}

/* The text keeps the page gutter so it lines up with the other sections */
.about__text { flex: 1 1 420px; min-width: 300px; padding-inline-start: var(--gutter); }

.stair-title { font-size: clamp(34px, 6.5vw, 72px); }
.stair-title--md { font-size: clamp(34px, 5.2vw, 64px); }

/* "من نحن" and "انضم كوسيط عقاري" read as one line on every screen size */
.about__text .stair-title .line,
.contact__lead .stair-title .line { display: inline; margin-inline-start: 0; }
html[lang="ar"] .about__text .stair-title { white-space: nowrap; }
/* The registration title sits in a narrow column: size it to fit (container units) */
.contact__lead { container-type: inline-size; }
html[lang="ar"] .contact__lead .stair-title { white-space: nowrap; font-size: min(64px, 11cqi); }

.about__p {
  max-width: 520px;
  margin: 32px 0 0;
  margin-inline-start: var(--stair-sm);
  font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.7;
  color: var(--body);
}
html[lang="ar"] .about__p { line-height: 1.9; }

.about__cta { margin: 36px 0 0; margin-inline-start: var(--stair-sm); }

.about__media {
  flex: 1 1 360px;
  min-width: 280px;
  display: flex;
  justify-content: flex-end;
  position: relative;
}
.about__video {
  display: block;
  width: 100%;
  max-width: 644px;
  height: auto;
  pointer-events: none;
}
.about__tint {
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  width: 100%;
  max-width: 644px;
  height: 100%;
  background: var(--primary);
  mix-blend-mode: hue;
  pointer-events: none;
  z-index: 1;
}

/* ============================================================
   Section 3 — Contact / lead form
   ============================================================ */
.contact {
  background: var(--bg-2);
  padding-block: clamp(60px, 9vw, 130px);
  padding-inline: var(--gutter);
}

/* Intro row above the full-width form: title | checklist | contact details */
.contact__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.contact__intro .need,
.contact__intro .info { margin: 0; max-width: none; }
.contact__p {
  max-width: 440px;
  margin: 28px 0 0;
  margin-inline-start: var(--stair-sm);
  font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.7;
}
html[lang="ar"] .contact__p { line-height: 1.9; }

/* "Have these ready" checklist */
.need {
  max-width: 440px;
  margin: 30px 0 0;
  margin-inline-start: var(--stair-sm);
  padding: 20px 22px;
  background: #fff;
  border: 1px solid #e4e6e8;
  clip-path: var(--chamfer-12);
}
.need__title {
  margin: 0 0 14px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--heading);
}
.need__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.need__list li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  color: var(--heading);
}
.need__list li::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8' fill='none'%3E%3Cpath d='M1 4l2.6 2.6L9 1' stroke='white' stroke-width='1.6'/%3E%3C/svg%3E") center / 10px 8px no-repeat;
  clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 4px, 100% 100%, 4px 100%, 0 calc(100% - 4px));
}

/* Contact details */
.info {
  list-style: none;
  max-width: 440px;
  margin: 30px 0 0;
  margin-inline-start: var(--stair-sm);
  padding: 0;
  display: grid;
  gap: 18px;
  scroll-margin-top: 40px;
}
.info li { display: flex; align-items: flex-start; gap: 14px; }
.info__icon {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: #fff;
  border: 1px solid #d5d9dc;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.info__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--heading);
}
.info__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a8e91;
}
.info a { color: var(--heading); font-weight: 700; font-size: 16px; }
.info a:hover { color: var(--primary); }

/* Hero eyebrow (brand line above the headline) */
.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(14px, 2.4vh, 26px);
  font-size: clamp(12px, 1.2vw, 15px);
  line-height: 1.4;
  letter-spacing: 0.24em;
  color: var(--primary);
}
html[lang="ar"] .hero__eyebrow { font-size: clamp(14px, 1.4vw, 18px); }
.hero__eyebrow::before { content: ""; width: 38px; height: 1px; background: currentColor; flex: none; }

/* About lead line */
.about__lead {
  max-width: 540px;
  margin: 32px 0 0;
  margin-inline-start: var(--stair-sm);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
  text-transform: none;
  letter-spacing: 0;
  color: var(--heading);
}
html[lang="ar"] .about__lead { line-height: 1.75; }
.about__lead + .about__p { margin-top: 16px; }

/* ============================================================
   Stats
   ============================================================ */
.stats {
  background: var(--bg-2);
  padding-block: clamp(30px, 5vw, 60px) clamp(50px, 8vw, 110px);
  padding-inline: var(--gutter);
  scroll-margin-top: 20px;
}
.stats__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #dfe2e4;
}
.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: clamp(24px, 3vw, 40px) clamp(14px, 2vw, 30px) 0;
}
.stat + .stat { border-inline-start: 1px solid #dfe2e4; }
.stat::before {
  content: "";
  position: absolute;
  top: -2px;
  inset-inline-start: 0;
  width: 44px;
  height: 3px;
  background: var(--primary);
}
.stat__num {
  display: inline-flex;
  align-items: flex-start;
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(44px, 6vw, 84px);
  line-height: 1;
  color: var(--heading);
  font-variant-numeric: tabular-nums;
}
.stat__unit { color: var(--primary); font-size: 0.55em; margin-top: 0.1em; }
.stat__label {
  font-weight: 700;
  font-size: clamp(13px, 1.3vw, 16px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--body);
}

/* ============================================================
   Form sections, progress, files
   ============================================================ */
.form-section { border: 0; margin: 0; padding: 26px 0 0; min-width: 0; }
.form-section + .form-section { margin-top: 30px; border-top: 1px solid #eceef0; }
.form-section__title {
  float: inline-start;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  margin: 0 0 22px;
  font-weight: 700;
  font-size: clamp(15px, 1.5vw, 18px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--heading);
}
.form-section__title + * { clear: both; }
.form-section__num {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font-family: var(--font);
  font-size: 13px;
  color: #fff;
  background: var(--primary);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.form-section__title .opt { font-size: 13px; }

.form-progress {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 4px;
  padding: 12px 0;
  background: #fff;
}
.form-progress__track { flex: 1; height: 4px; background: #eceef0; overflow: hidden; }
.form-progress__bar { width: 0; height: 100%; background: var(--primary); transition: width .35s ease; }
.form-progress__label {
  min-width: 96px;
  text-align: end;
  font-weight: 700;
  font-size: 13px;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.field > .field__label {
  display: block;
  margin: 0 0 9px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--heading);
}
html[lang="ar"] .field > .field__label { font-size: 14px; }
.field__hint--top { margin: -4px 0 12px; }

.decl { display: grid; gap: 16px; }

/* Date & number inputs */
.input[type="date"] { cursor: text; }
[dir="rtl"] .input[type="date"] { text-align: right; }
.input[type="date"]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
.input[type="number"]::-webkit-inner-spin-button,
.input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.input[type="number"] { -moz-appearance: textfield; }

/* Inputs with a leading glyph (LinkedIn / Instagram) */
.input-icon { position: relative; }
.input-icon__glyph {
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: 1px;
  width: 46px;
  display: grid;
  place-items: center;
  font-family: var(--font);
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
  border-right: 1px solid var(--line);
  pointer-events: none;
}
.input-icon .input { padding-left: 60px; }
[dir="rtl"] .input-icon .input { text-align: left; }

/* Drop zones */
.drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 124px;
  padding: 18px 14px;
  text-align: center;
  background: #fafafa;
  border: 1px dashed #b3b9bd;
  cursor: pointer;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.drop:hover, .drop.is-drag { border-color: var(--primary); background: #f2f4f5; }
.drop.is-drag { border-style: solid; box-shadow: 0 0 0 3px var(--primary-soft); }
.drop:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.drop__input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.drop__icon { color: var(--primary); line-height: 0; }
.drop__text { font-size: 14px; color: var(--heading); }
.drop__text strong { color: var(--primary); }
.drop__hint { font-size: 12px; color: #8a8e91; }
.drop.has-file { min-height: 0; padding: 12px 14px; flex-direction: row; gap: 10px; }
.drop.has-file .drop__hint { display: none; }
.field.is-invalid .drop { border-color: var(--danger); background: #fffafa; }

.file-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e4e6e8;
}
.field.is-invalid .file-chip { border-color: var(--danger); }
.file-chip__thumb { flex: none; width: 40px; height: 40px; object-fit: cover; background: #eceef0; }
.file-chip__ext {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-family: var(--font);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  color: #fff;
  background: var(--primary);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.file-chip__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.file-chip__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  unicode-bidi: plaintext;
  text-align: start;
  font-size: 13px;
  font-weight: 700;
  color: var(--heading);
}
.file-chip__size { font-size: 12px; color: #8a8e91; }
.file-chip__remove {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #6b6f72;
  background: #fafafa;
  border: 1px solid #e4e6e8;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.file-chip__remove:hover { color: var(--danger); border-color: var(--danger); }

@media (max-width: 700px) {
  .stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat:nth-child(n + 3) { margin-top: 26px; border-top: 1px solid #dfe2e4; }
  .need, .info, .contact__p { margin-inline-start: 0; }
}

/* Card */
.form-shell {
  margin-top: clamp(40px, 5vw, 70px);
  filter: drop-shadow(0 30px 40px rgba(43, 48, 51, 0.08));
}
.form-card {
  position: relative;
  background: #fff;
  padding: clamp(24px, 3.6vw, 48px);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
}
.form-card::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 88px;
  height: 3px;
  background: var(--primary);
}

.form-card__head { margin-bottom: 26px; }
.form-card__head h3 { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.1; }
.form-card__head p { margin: 10px 0 0; font-size: 13px; color: var(--body); }

.form-alert {
  margin: 0 0 22px;
  padding: 12px 16px;
  border-inline-start: 3px solid var(--danger);
  background: #fdf1f0;
  color: #8c1d18;
  font-size: 14px;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px 22px;
}
.field--full { grid-column: 1 / -1; }

fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }

.field > label:not(.drop):not(.check),
.field > legend {
  display: block;
  padding: 0;
  margin: 0 0 9px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--heading);
}
html[lang="ar"] .field > label:not(.drop):not(.check),
html[lang="ar"] .field > legend { font-size: 14px; }
.req { color: var(--danger); }
.opt { color: #9a9ea1; font-weight: 400; text-transform: none; letter-spacing: 0; }

.input {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font: inherit;
  font-size: 15px;
  color: var(--heading);
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder { color: #a6aaad; }
.input:hover { border-color: #b9bfc3; }
.input:focus {
  outline: none;
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
[dir="rtl"] .input[dir="ltr"] { text-align: right; }

select.input {
  cursor: pointer;
  padding-inline-end: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%23667882' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
[dir="rtl"] select.input { background-position: left 16px center; }
select.input:invalid, select.input.is-placeholder { color: #a6aaad; }
select.input option { color: var(--heading); }

.input--area {
  height: auto;
  min-height: 124px;
  padding: 14px 16px;
  line-height: 1.6;
  resize: vertical;
}

.field__hint { margin: 7px 0 0; font-size: 12px; color: #8a8e91; }
.field__error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 7px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--danger);
}
.field__error::before {
  content: "!";
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font);
}
.field.is-invalid .field__hint { display: none; }

.field.is-invalid .input { border-color: var(--danger); background: #fffafa; }
.field.is-invalid .input:focus { box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.15); }
.field.is-valid .input { border-color: #9fbfab; }

.field__meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.field__meta .field__error { flex: 1; }
.counter { margin: 7px 0 0; margin-inline-start: auto; font-size: 12px; color: #9a9ea1; font-family: var(--font); }
.counter.is-near { color: #b26b00; }

/* Radio chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--heading);
  background: #fafafa;
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover span { border-color: #b9bfc3; }
.chip input:checked + span { background: var(--primary); border-color: var(--primary-border); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.field.is-invalid .chip span { border-color: var(--danger); }

/* Consent checkbox */
.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.65;
  color: #55595c;
}
.check input {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  display: grid;
  place-content: center;
  background: #fff;
  border: 1px solid #b9bfc3;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.check input::after {
  content: "";
  width: 10px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}
.check input:checked { background: var(--primary); border-color: var(--primary-border); }
.check input:checked::after { opacity: 1; }
.field.is-invalid .check input { border-color: var(--danger); }

/* Honeypot */
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Actions */
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid #eceef0;
}
.form-secure { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: #8a8e91; }

.btn--submit { border: 1px solid var(--primary-border); }
.btn--submit:disabled { cursor: progress; opacity: .85; }
.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.btn--submit.is-loading .spinner { display: inline-block; }
.btn--submit.is-loading .btn__line { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Success */
.form-success { text-align: center; padding: clamp(30px, 6vw, 70px) 10px; }
.form-success__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
  clip-path: var(--chamfer-16);
}
.form-success h3 { font-size: clamp(24px, 3vw, 34px); outline: none; }
.form-success p { max-width: 420px; margin: 14px auto 0; line-height: 1.7; }
.link-btn {
  margin-top: 26px;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 2px 0;
  cursor: pointer;
}
.link-btn:hover { color: var(--primary-hover); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .contact__intro { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact__lead { grid-column: 1 / -1; }
}

@media (min-width: 701px) {
  .nav__mobile { display: none !important; }
}

@media (max-width: 700px) {
  :root { --stair: 16vw; } /* keeps the longest staircase word inside narrow screens */
  .hero { min-height: 0; } /* height follows its content instead of filling the screen */
  .nav__brand img { height: clamp(35px, 4.6vw, 60px); }
  .hero__video { inset-inline-end: auto; inset-inline-start: -12%; width: 119%; }
  .hero__scrim { display: none; }

  .nav__links, .nav__contact { display: none; }
  .nav__burger { display: flex; }
  /* Keep the white controls legible even before the hero video has loaded */
  .nav__burger, .lang-toggle {
    background: rgba(43, 48, 51, 0.42);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }
  .nav__burger {
    padding: 12px 10px;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  }

  .hero__title {
    margin-top: 250px;
    padding: 0 20px 28px 20px;
    font-size: clamp(34px, 10vw, 56px);
  }
  .hero__cta { padding-inline-start: 20px; }

  /* Staircase headlines read as one line on phones */
  .hero__title .line,
  .stair-title .line { display: inline; margin-inline-start: 0; }
  html[lang="ar"] .hero__title { font-size: min(6vw, 40px); white-space: nowrap; }
  html[lang="ar"] .hero__eyebrow { white-space: normal; }
  .stair-title,
  .stair-title--md { font-size: clamp(30px, 9vw, 44px); line-height: 1.25; }
  html[lang="ar"] .stair-title { white-space: nowrap; }

  /* About: text gets its own gutter, the video spans the full width below it */
  .about { padding: 56px 0 0; gap: 28px; }
  .about__text { flex-basis: 100%; min-width: 0; padding-inline: 20px; }
  .about__lead,
  .about__p,
  .about__cta { margin-inline-start: 0; max-width: none; }
  .about__lead { margin-top: 18px; font-size: 19px; }
  .about__p { margin-top: 12px; font-size: 15px; }
  .about__cta { margin-top: 26px; }
  .about__media { flex-basis: 100%; min-width: 0; }
  .about__video,
  .about__tint { max-width: none; }

  /* Registration intro */
  .contact { padding-block: 56px; padding-inline: 20px; }
  .contact__intro { gap: 24px; }
  .contact__p { max-width: none; margin-top: 14px; font-size: 15px; }

  .form-grid { grid-template-columns: 1fr; }
  .contact__intro { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .form-actions .btn-glow, .form-actions .btn { width: 100%; justify-content: center; }
  .form-secure { justify-content: center; }
}

@media (max-width: 420px) {
  .about__text { min-width: 0; }
  .about__media { min-width: 0; }
}

/* ============================================================
   Searchable select (combobox) — nationality, city
   ============================================================ */
.combo { position: relative; }
.combo__native {
  position: absolute !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  pointer-events: none;
}
.combo__button {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: start;
  cursor: pointer;
  padding-inline-end: 44px;
}
.combo__button,
.field.is-invalid .combo__button {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%23667882' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
[dir="rtl"] .combo__button,
[dir="rtl"] .field.is-invalid .combo__button { background-position: left 16px center; }
.combo__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo__button.is-placeholder .combo__value { color: #a6aaad; }
.combo.is-open .combo__button {
  border-color: var(--primary);
  background-color: #fff;
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.combo__panel {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline: 0;
  z-index: 30;
  padding: 8px;
  background: #fff;
  border: 1px solid #e4e6e8;
  box-shadow: 0 18px 40px -16px rgba(43, 48, 51, 0.35);
}
.combo__search-wrap { position: relative; margin-bottom: 6px; }
.combo__search-wrap svg {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  inset-inline-start: 12px;
  color: #8a8e91;
  pointer-events: none;
}
.combo__search {
  width: 100%;
  height: 42px;
  padding-inline: 38px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fafafa;
  font: inherit;
  font-size: 14px;
  color: var(--heading);
  -webkit-appearance: none;
  appearance: none;
}
.combo__search:focus { outline: none; border-color: var(--primary); background: #fff; }
.combo__search::-webkit-search-cancel-button { cursor: pointer; }

.combo__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 248px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.combo__list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--heading);
  cursor: pointer;
}
.combo__list li.is-active { background: #eef1f3; }
.combo__list li[aria-selected="true"] { font-weight: 700; }
.combo__list li[aria-selected="true"]::after {
  content: "";
  flex: none;
  width: 10px;
  height: 5px;
  border-left: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg) translateY(-2px);
}
.combo__empty { margin: 0; padding: 14px 12px; text-align: center; font-size: 13px; color: #8a8e91; }

.form-success__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}
.form-success__actions .link-btn { margin-top: 0; }

/* ============================================================
   Track-your-application page
   ============================================================ */
.track-page { min-height: 100vh; background: linear-gradient(180deg, #F2F1F0 0%, #F7F6F8 40%, #F7F6F8 100%); }

.track-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  padding: clamp(20px, 3vw, 34px) var(--gutter) 0;
}
.track-head__brand img { display: block; height: clamp(44px, 4.6vw, 60px); width: auto; }
.track-head__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; }
.track-head__link {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nav-link);
}
.lang-switch {
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  padding: 11px 14px;
  min-width: 52px;
  text-align: center;
  color: var(--heading);
  background: #fff;
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.lang-switch:hover { border-color: var(--primary); color: var(--heading); }

.track {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(50px, 8vw, 110px);
}
.track {
  grid-template-areas: "intro card" "help card";
  grid-template-rows: auto 1fr;
  --stair-sm: min(90px, 7vw);
}
.track__intro { grid-area: intro; min-width: 0; }
.track > .form-shell { grid-area: card; }
.track__intro .contact__p { max-width: 460px; }
.track .stair-title--md { font-size: clamp(30px, 3.4vw, 50px); overflow-wrap: anywhere; }
.track__help { grid-area: help; margin: 0; max-width: 440px; }
.info__heading { font-weight: 700; color: var(--heading); font-size: 15px; }

.track-form__row { display: flex; gap: 12px; align-items: stretch; }
.track-form__row .input { flex: 1; min-width: 0; }
.track-form__row .btn-glow { display: flex; }
.track-form__row .btn { height: 52px; padding-block: 0; }

.track-results { margin-top: 28px; padding-top: 24px; border-top: 1px solid #eceef0; display: flex; flex-direction: column; gap: 18px; }
.track-results__meta { margin: 0; font-size: 13px; color: var(--body); }
.track-results__meta span { color: #8a8e91; }

.track-empty { text-align: center; padding: 18px 10px 6px; }
.track-empty__icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  display: grid; place-items: center;
  color: var(--primary);
  background: #eef1f3;
  border-radius: 50%;
}
.track-empty h2 { font-size: 20px; line-height: 1.4; text-transform: none; }
.track-empty p { margin: 8px auto 0; max-width: 440px; line-height: 1.8; color: var(--body); }

.tcard { border: 1px solid #e4e6e8; background: #fff; padding: clamp(18px, 2.4vw, 26px); }
.tcard__top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; }
.tcard__ref { display: block; font-family: var(--font); font-weight: 700; font-size: 19px; letter-spacing: 0.05em; color: var(--heading); }
.tcard__name { display: block; margin-top: 2px; font-size: 14px; color: var(--body); }
.tcard__msg { margin: 16px 0 22px; line-height: 1.85; color: var(--heading); }

.tstatus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  color: var(--heading);
  white-space: nowrap;
}
.tstatus--new { background: #eef1f3; }
.tstatus--new svg { color: var(--primary); }
.tstatus--reviewing { background: #fff5dd; }
.tstatus--reviewing svg { color: #b47a00; }
.tstatus--approved { background: #e8f6e8; }
.tstatus--approved svg { color: #0ca30c; }
.tstatus--rejected { background: #fdeceb; }
.tstatus--rejected svg { color: #d03b3b; }

/* Progress timeline */
.tsteps { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tsteps__item { position: relative; padding-top: 30px; padding-inline-end: 12px; }
.tsteps__item::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  z-index: 1;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #d5d9dc;
}
.tsteps__item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 9px;
  inset-inline: 22px 2px;
  height: 2px;
  background: #e4e6e8;
}
.tsteps__item.is-done::before {
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8' fill='none'%3E%3Cpath d='M1 4l2.6 2.6L9 1' stroke='white' stroke-width='1.6'/%3E%3C/svg%3E") center / 10px 8px no-repeat;
  border-color: var(--primary);
}
.tsteps__item.is-done:not(:last-child)::after { background: var(--primary); }
.tsteps__item.is-current::before { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); background: #fff; }
.tsteps__item.is-current::before { background: radial-gradient(circle, var(--primary) 0 4px, #fff 5px); }
.tsteps__item.is-rejected::before {
  background: #d03b3b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8' fill='none'%3E%3Cpath d='M1 1l6 6M7 1 1 7' stroke='white' stroke-width='1.6'/%3E%3C/svg%3E") center / 8px 8px no-repeat;
  border-color: #d03b3b;
}
.tsteps__label { display: block; font-weight: 700; font-size: 13px; color: var(--heading); line-height: 1.5; }
.tsteps__item.is-todo .tsteps__label { color: #9a9ea1; font-weight: 600; }
.tsteps__date { display: block; margin-top: 2px; font-size: 12px; color: #8a8e91; }

.tcard__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: 0; padding-top: 18px; border-top: 1px solid #eceef0; }
.tcard__grid dt { font-size: 12px; color: #8a8e91; }
.tcard__grid dd { margin: 2px 0 0; font-weight: 700; color: var(--heading); font-size: 14px; }
[dir="rtl"] .tcard__grid dd[dir="ltr"] { text-align: right; }

@media (max-width: 900px) {
  .track {
    grid-template-columns: 1fr;
    grid-template-areas: "intro" "card" "help";
    grid-template-rows: auto;
  }
}
@media (max-width: 560px) {
  .track-form__row { flex-direction: column; }
  .track-form__row .input { flex: none; }
  .track-form__row .btn { width: 100%; justify-content: center; }
  .tsteps { grid-template-columns: 1fr; gap: 14px; }
  .tsteps__item { padding-top: 0; padding-inline-start: 32px; min-height: 22px; }
  .tsteps__item:not(:last-child)::after { top: 22px; bottom: -14px; inset-inline: 9px auto; width: 2px; height: auto; }
  .tcard__grid { grid-template-columns: 1fr; }
  .track-head__link { display: none; }
}

/* Reference number on the success screen */
.form-success__ref {
  display: inline-block;
  margin: 18px auto 0;
  padding: 8px 18px;
  border: 1px dashed var(--line);
  background: var(--bg-2);
  font-weight: 700;
  color: var(--heading);
}
