/* Al Rayes Mustafa careers page.
   Colours from the restaurant's tile sign: navy sea, white calligraphy, a brass frame.
   Shape rule: buttons and position chips are pills, cards 18px, inputs 10px. */

@font-face {
  font-family: "Readex Pro";
  src: url("/fonts/readex-pro-arabic.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-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: "Readex Pro";
  src: url("/fonts/readex-pro-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Aref Ruqaa";
  src: url("/fonts/aref-ruqaa-arabic.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-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: "Aref Ruqaa";
  src: url("/fonts/aref-ruqaa-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  --sea: #0f2c66;
  --sea-deep: #0a1f4a;
  --brass: #c9a24a;
  --bg: #f3f6fa;
  --surface: #ffffff;
  --line: #d3dceb;
  --ink: #12213f;
  --muted: #4d5b78;
  --accent: #1d4fb3;
  --accent-ink: #ffffff;
  --ok: #17663a;
  --error: #b42318;
  --shadow: 0 20px 48px rgb(15 44 102 / 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --sea: #0c2352;
    --sea-deep: #081a3f;
    --bg: #0b1730;
    --surface: #12224a;
    --line: #2a3d6b;
    --ink: #eef2fa;
    --muted: #aab6d1;
    --accent: #8fb4ff;
    --accent-ink: #0b1730;
    --ok: #7fd6a2;
    --error: #ff9b91;
    --shadow: 0 20px 48px rgb(0 0 0 / 0.35);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Readex Pro", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
}

.wrap {
  width: min(100% - 32px, 1080px);
  margin-inline: auto;
}

h1,
h2 {
  margin: 0;
  line-height: 1.25;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.5rem, 5vw, 2rem);
}

/* Section titles open with a small sea glyph in the accent */
.heading-sea {
  display: flex;
  align-items: center;
  gap: 10px;
}
.heading-sea__icon {
  width: 1.05em;
  height: 1.05em;
  flex: none;
  fill: var(--accent);
}

.section__lede {
  margin: 8px 0 0;
  max-width: 60ch;
  color: var(--muted);
}

.skip {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  z-index: 10;
}
.skip:focus {
  top: 16px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.hero :focus-visible,
.footer :focus-visible {
  outline-color: var(--brass);
}

/* Hero: a band of sea, ending in a wave */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--sea) 0%, var(--sea-deep) 100%);
  color: #f4f7fd;
  padding-block: 40px 88px;
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 32px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2rem, 8vw, 3.25rem);
  font-weight: 700;
}
.hero__lede {
  margin: 14px 0 28px;
  max-width: 34ch;
  color: #cfdaf2;
  font-size: 1.0625rem;
}
.hero__wave {
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  width: 100%;
  height: 56px;
  fill: var(--bg);
}
.hero__wave--back {
  height: 72px;
  fill: #ffffff;
  opacity: 0.08;
}

/* Fish: one Phosphor glyph (#fish), a faint school in the sea and a brass one on the sign */
.sprite {
  position: absolute;
}
.school {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.swimmer {
  position: absolute;
  left: 0;
  fill: #ffffff;
  opacity: 0.2;
  /* where each fish rests when motion is off */
  transform: translateX(var(--rest));
}
.swimmer--1 {
  top: 16%;
  width: 34px;
  height: 34px;
  --rest: 12vw;
}
.swimmer--2 {
  top: 54%;
  width: 22px;
  height: 22px;
  --rest: 58vw;
}
.swimmer--3 {
  top: 76%;
  width: 28px;
  height: 28px;
  --rest: 30vw;
}
.swimmer--4 {
  top: 34%;
  width: 18px;
  height: 18px;
  --rest: 80vw;
}
.swimmer--5 {
  top: 63%;
  width: 40px;
  height: 40px;
  opacity: 0.13;
  --rest: 86vw;
}
.swimmer--6 {
  top: 8%;
  width: 20px;
  height: 20px;
  --rest: 44vw;
}
/* two on the sea floor (footer), kept to the band's edges so they never swim behind the text */
.swimmer--7 {
  top: 22%;
  width: 24px;
  height: 24px;
  --rest: 20vw;
}
.swimmer--8 {
  top: 84%;
  width: 30px;
  height: 30px;
  --rest: 70vw;
}

/* Bubbles: plain rings drifting up from the sea floor */
.bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.bubbles span {
  position: absolute;
  bottom: 18%;
  width: var(--size);
  height: var(--size);
  border: 1.5px solid rgb(255 255 255 / 0.28);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgb(255 255 255 / 0.22), transparent 60%);
  left: var(--x);
  opacity: 0;
}
.bubbles span:nth-child(1) { --x: 8%; --size: 10px; --time: 9s; --delay: -2s; }
.bubbles span:nth-child(2) { --x: 18%; --size: 6px; --time: 7s; --delay: -5s; }
.bubbles span:nth-child(3) { --x: 34%; --size: 12px; --time: 11s; --delay: -8s; }
.bubbles span:nth-child(4) { --x: 52%; --size: 7px; --time: 8s; --delay: -1s; }
.bubbles span:nth-child(5) { --x: 66%; --size: 9px; --time: 10s; --delay: -6s; }
.bubbles span:nth-child(6) { --x: 80%; --size: 5px; --time: 7.5s; --delay: -3s; }
.bubbles span:nth-child(7) { --x: 92%; --size: 11px; --time: 12s; --delay: -9s; }
@media (prefers-reduced-motion: no-preference) {
  /* Right to left across the sea, with a slow rise and fall; negative delays
     put the school mid-swim on load instead of all entering at once. */
  .swimmer {
    animation: swim var(--time) linear infinite;
    animation-delay: var(--delay);
  }
  .swimmer--1 {
    --time: 34s;
    --delay: -9s;
  }
  .swimmer--2 {
    --time: 26s;
    --delay: -19s;
  }
  .swimmer--3 {
    --time: 42s;
    --delay: -30s;
  }
  .swimmer--4 {
    --time: 22s;
    --delay: -4s;
  }
  .swimmer--5 {
    --time: 52s;
    --delay: -12s;
  }
  .swimmer--6 {
    --time: 30s;
    --delay: -24s;
  }
  .swimmer--7 {
    --time: 38s;
    --delay: -14s;
  }
  .swimmer--8 {
    --time: 46s;
    --delay: -33s;
  }
  .bubbles span {
    animation: rise-bubble var(--time) ease-in infinite;
    animation-delay: var(--delay);
  }
  @keyframes rise-bubble {
    0% {
      opacity: 0;
      transform: translate(0, 0);
    }
    15% {
      opacity: 1;
    }
    50% {
      transform: translate(8px, -45vh);
    }
    85% {
      opacity: 0.8;
    }
    100% {
      opacity: 0;
      transform: translate(-6px, -90vh);
    }
  }
  /* the swell behind the front wave breathes slowly */
  .hero__wave--back {
    animation: swell 7s ease-in-out infinite alternate;
  }
  @keyframes swell {
    to {
      transform: translateY(8px) scaleX(1.04);
    }
  }
  @keyframes swim {
    from {
      transform: translate(105vw, 0);
    }
    25% {
      transform: translate(76vw, -10px);
    }
    50% {
      transform: translate(47vw, 0);
    }
    75% {
      transform: translate(18vw, 10px);
    }
    to {
      transform: translate(-12vw, 0);
    }
  }
}

/* The name as the tile sign: navy plate, double brass frame */
.emblem {
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 2px;
  width: min(100%, 300px);
  padding: 28px 24px 22px;
  border: 2px solid var(--brass);
  border-radius: 28px;
  outline: 1px solid rgb(201 162 74 / 0.55);
  outline-offset: 6px;
  background: radial-gradient(circle at 50% 30%, #1d3f8a, #102b66 70%);
  box-shadow: 0 24px 50px rgb(0 0 0 / 0.3);
  order: -1;
}
.emblem__fish {
  width: 30px;
  height: 30px;
  fill: var(--brass);
  margin-bottom: 4px;
}
.emblem__name {
  font-family: "Aref Ruqaa", serif;
  font-size: clamp(2.25rem, 10vw, 3rem);
  line-height: 1.3;
  color: #ffffff;
}
.emblem__sub {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--brass);
  direction: ltr;
}

@media (min-width: 820px) {
  .hero {
    padding-block: 64px 112px;
  }
  .hero__inner {
    grid-template-columns: 1.3fr 1fr;
    gap: 48px;
  }
  .emblem {
    order: 0;
    width: 320px;
    padding: 40px 28px 30px;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 30px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease-out, background-color 160ms ease-out;
}
.btn:active {
  transform: scale(0.97);
}
.btn--light {
  background: #ffffff;
  color: var(--sea);
}
.btn--light:hover {
  background: #e4ecfb;
}
.btn--solid {
  width: 100%;
  background: var(--accent);
  color: var(--accent-ink);
}
.btn--solid:hover {
  filter: brightness(1.08);
}
.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* Open positions: chips that start an application */
.positions {
  padding-block: 32px 24px;
}
/* Phones: pills as wide as their words, wrapping like a sentence (no lone cell at the end).
   Wider screens: an even 3 by 3 grid for the 9 positions. */
.positions__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.positions__grid > li {
  flex: 1 1 auto;
}
@media (min-width: 820px) {
  .positions__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}
.position {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  height: 100%;
  padding: 10px 20px;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: border-color 160ms ease-out, transform 160ms ease-out;
}
.position:hover {
  border-color: var(--accent);
}
.position:active {
  transform: scale(0.97);
}

/* Application form */
.apply {
  padding-block: 24px 56px;
  scroll-margin-top: 16px;
}
.apply__card {
  padding: 28px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
@media (min-width: 820px) {
  .apply__card {
    padding: 44px 48px;
  }
}
.apply__card h2:focus {
  outline: none;
}

.notice {
  margin: 20px 0 0;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid currentColor;
  font-weight: 600;
}
.notice--ok {
  color: var(--ok);
}
.notice--error {
  color: var(--error);
}

.form {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}
@media (min-width: 820px) {
  .form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 24px;
  }
  .field--wide {
    grid-column: 1 / -1;
  }
}

.field {
  display: grid;
  gap: 8px;
  align-content: start;
}
.field label {
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  /* 16px keeps iOS from zooming into the field */
  font: inherit;
  font-size: 1rem;
}
.field textarea {
  resize: vertical;
}
.field input[type="file"] {
  padding: 10px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}
.field [aria-invalid="true"] {
  border-color: var(--error);
}
.field__help {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}
.field__error {
  margin: 0;
  color: var(--error);
  font-size: 0.875rem;
  font-weight: 600;
}

.trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* Footer: the sea floor, a navy band with a wave edge, an anchor and two fish */
.footer {
  position: relative;
  margin-top: 64px;
  overflow: hidden;
  background: var(--sea-deep);
  color: #cfdaf2;
  text-align: center;
  font-size: 0.9375rem;
}
.footer__wave {
  position: absolute;
  inset-inline: 0;
  top: -1px;
  width: 100%;
  height: 44px;
  fill: var(--bg);
}
.footer__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  justify-items: center;
  padding-block: 64px 40px;
}
.footer__anchor {
  width: 34px;
  height: 34px;
  fill: var(--brass);
  margin-bottom: 4px;
}
.footer__name {
  margin: 0;
  font-weight: 600;
  color: #ffffff;
}
.footer__address {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: inherit;
}
.icon {
  width: 1.2em;
  height: 1.2em;
  fill: currentColor;
  flex: none;
}

/* A short entrance for the hero, so the first screen settles in instead of popping */
@media (prefers-reduced-motion: no-preference) {
  .hero__copy,
  .emblem {
    animation: rise 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .emblem {
    animation-delay: 90ms;
  }
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn,
  .position {
    transition: none;
  }
}
