/* CV intake — one page, no framework. Violet palette, IBM Plex Sans Arabic, no name or logo. */

@font-face {
  font-family: 'Plex Arabic';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/plex-arabic-400.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E,
    U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Plex Arabic';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url(/fonts/plex-arabic-700.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E,
    U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Plex Arabic';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/plex-latin-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plex Arabic';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url(/fonts/plex-latin-700.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --v-950: #1C0049;
  --v-900: #27005E;
  --v-800: #310074;
  --v-700: #3E028D;
  --v-600: #4F0BAD;
  --v-500: #5C28BF;
  --v-400: #8D71EE;
  --v-300: #AB9BF7;
  --v-200: #CCC4FE;
  --v-100: #E6E2FF;
  --v-50: #F0EFFF;

  --page: #F0EFFC;
  --card: #FFFFFF;
  --ink: #181928;
  --ink-2: #3A3C56;
  --ink-3: #5C607C;
  --line: #E3E1F3;
  --line-strong: #CFCCE6;
  --danger: #B3302C;
  --danger-bg: #FCEDEC;
  --danger-line: #F3ADAA;
  --success: #156E3C;

  --radius: 20px;
  --radius-md: 12px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: 'Plex Arabic', 'Segoe UI', Tahoma, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── the band: deep violet, ruled like a sheet of paper ───────────────────── */
.band {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% 0%, rgb(92 40 191 / .55), transparent 60%),
    var(--v-700);
  color: #fff;
  padding: calc(env(safe-area-inset-top) + 40px) 20px 92px;
}
.band::before {           /* ruled lines */
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, transparent 0 31px, rgb(255 255 255 / .07) 31px 32px);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
  pointer-events: none;
}
.band::after {            /* the margin line of a notebook page, on the reading side */
  content: "";
  position: absolute; top: 0; bottom: 0;
  inset-inline-start: 22px;
  width: 1px;
  background: rgb(204 196 254 / .22);
  pointer-events: none;
}
.band__inner {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding-inline-start: 18px;
}
.kicker {
  display: inline-block;
  margin: 0 0 14px;
  padding: 3px 12px;
  border: 1px solid rgb(204 196 254 / .45);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--v-100);
}
h1 {
  margin: 0;
  font-size: clamp(28px, 8vw, 40px);
  line-height: 1.25;
  font-weight: 700;
}
.lede {
  margin: 12px 0 0;
  max-width: 34ch;
  color: rgb(240 239 255 / .86);
  font-size: 16px;
}

/* ── the sheet: the form card that overlaps the band ──────────────────────── */
.sheet {
  position: relative;
  max-width: 560px;
  margin: -64px auto 40px;
  margin-inline: max(12px, calc((100% - 560px) / 2));
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgb(24 25 40 / .06), 0 18px 44px rgb(39 0 94 / .14);
  padding: 28px 20px 22px;
}
@media (min-width: 600px) {
  .sheet { padding: 36px 36px 28px; }
}

/* ── the three steps, joined by a thread ──────────────────────────────────── */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 14px;
  padding-bottom: 22px;
}
.step:not(:last-child)::before {   /* the thread down to the next number */
  content: "";
  position: absolute;
  inset-inline-start: 16px;
  top: 38px;
  bottom: 4px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
  transition: background-color .4s var(--ease);
}
.step.is-done:not(:last-child)::before { background: var(--v-200); }

.step__num {
  width: 34px; height: 34px;
  margin-top: 1px;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--line-strong);
  color: var(--ink-3);
  font-weight: 700;
  font-size: 15px;
  background: var(--card);
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.step.is-done .step__num {
  background: var(--v-500);
  border-color: var(--v-500);
  color: #fff;
}

.step__body { min-width: 0; }

.label {
  display: block;
  margin: 2px 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.input {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;            /* 16px: iOS does not zoom the page on focus */
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.input:hover { border-color: var(--v-300); }
.input:focus-visible,
.input:focus {
  border-color: var(--v-500);
  box-shadow: 0 0 0 4px rgb(92 40 191 / .16);
}
.input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: none;
}
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgb(179 48 44 / .14); }
.input:disabled { background: var(--page); color: var(--ink-3); }

/* ── the file: a sheet with a folded corner ───────────────────────────────── */
.drop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 16px;
  border: 1.5px dashed var(--v-300);
  border-radius: var(--radius-md);
  background: var(--v-50);
  cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.drop:hover { border-color: var(--v-500); background: #EBE8FF; }
.drop:focus-within {
  border-color: var(--v-500);
  border-style: solid;
  box-shadow: 0 0 0 4px rgb(92 40 191 / .16);
}
.drop.is-over { border-style: solid; border-color: var(--v-500); background: var(--v-100); }
.drop.has-file { border-style: solid; border-color: var(--v-200); background: #fff; }
.drop[aria-invalid="true"], .drop.is-invalid { border-color: var(--danger); background: var(--danger-bg); }

.drop__input {             /* visually hidden, still focusable and announced */
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  overflow: hidden;
  clip-path: inset(50%);
}

.drop__paper {
  flex: none;
  position: relative;
  width: 46px; height: 56px;
  display: grid; place-items: center;
  color: var(--v-500);
  background: #fff;
  border: 1.5px solid var(--v-200);
  border-radius: 6px;
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 0 100%);
}
.drop__paper::after {      /* the fold */
  content: "";
  position: absolute; top: 0; inset-inline-end: 0;
  width: 13px; height: 13px;
  background: linear-gradient(225deg, transparent 50%, var(--v-200) 50%);
}
[dir="rtl"] .drop__paper { clip-path: polygon(13px 0, 100% 0, 100% 100%, 0 100%, 0 13px); }
[dir="rtl"] .drop__paper::after { background: linear-gradient(135deg, transparent 50%, var(--v-200) 50%); }
.drop.has-file .drop__paper { color: #fff; background: var(--v-500); border-color: var(--v-500); }

.drop__text { min-width: 0; flex: 1; display: grid; gap: 2px; }
.drop__title {
  font-weight: 700;
  color: var(--v-700);
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.drop.has-file .drop__title { color: var(--ink); }
.drop__meta { font-size: 14px; color: var(--ink-3); }
.drop__change {
  flex: none;
  align-self: center;
  min-height: 44px;
  display: grid; place-items: center;
  padding: 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--v-500);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hint { margin: 8px 0 0; font-size: 14px; color: var(--ink-3); line-height: 1.6; }

.error {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--danger);
  line-height: 1.6;
}
.error::before { content: "● "; font-size: 10px; vertical-align: 2px; }

.alert {
  margin: 0 0 22px;
  padding: 12px 14px;
  border: 1px solid var(--danger-line);
  border-radius: var(--radius-md);
  background: var(--danger-bg);
  color: var(--danger);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.6;
}

/* the honeypot: off screen, never seen */
.trap { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ── the button, which fills as the file goes up ──────────────────────────── */
.submit {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  min-height: 54px;
  margin-top: 4px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--v-500);
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgb(92 40 191 / .3);
  transition: background-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.submit:hover { background: var(--v-600); }
.submit:active { transform: translateY(1px); }
.submit:focus-visible { outline: 3px solid var(--v-300); outline-offset: 3px; }
.submit[aria-busy="true"] { cursor: progress; background: var(--v-800); box-shadow: none; }
.submit__fill {
  position: absolute; inset: 0;
  inset-inline-end: auto;
  width: 0%;
  background: var(--v-500);
  transition: width .25s linear;
}
.submit__label { position: relative; }

.note {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--ink-3);
  text-align: center;
  line-height: 1.7;
}

/* ── done ─────────────────────────────────────────────────────────────────── */
.done {
  text-align: center;
  padding: 18px 4px 8px;
  outline: none;
}
.done__seal {
  width: 72px; height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  background: var(--v-500);
  box-shadow: 0 0 0 10px var(--v-50), 0 10px 26px rgb(92 40 191 / .35);
}
.done h2 { margin: 0; font-size: 24px; line-height: 1.4; }
.done p { margin: 8px auto 22px; max-width: 32ch; color: var(--ink-2); }
.ghost {
  min-height: 48px;
  padding: 0 22px;
  border: 1.5px solid var(--v-200);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--v-700);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.ghost:hover { border-color: var(--v-500); background: var(--v-50); }
.ghost:focus-visible { outline: 3px solid var(--v-300); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

[hidden] { display: none !important; }

/* ── one entrance, staggered; none for those who ask for less motion ──────── */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .7s var(--ease) both; }
  .band .rise:nth-child(1) { animation-delay: .05s; }
  .band .rise:nth-child(2) { animation-delay: .12s; }
  .band .rise:nth-child(3) { animation-delay: .19s; }
  .sheet.rise { animation-delay: .26s; }
  .done:not([hidden]) .done__seal { animation: seal .6s var(--ease) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes seal { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
