/* =========================================================
   Pomelo Agency · Careers landing pages
   Shared styles for all /careers/[role] pages (EN + AR + KU)
   ========================================================= */

:root {
  --cx-orange: #ff9201;
  --cx-orange-hi: #ffc06a;
  --cx-orange-deep: #c96f00;
  --cx-blue: #00b1e1;
  --cx-blue-hi: #a9ecff;
  --cx-blue-deep: #067a9e;
  --cx-ink: #0d0d0d;
  --cx-ink-2: #1f1f22;
  --cx-ink-3: #4a4a4f;
  --cx-ink-dim: #7a7a80;
  --cx-line: #e8e8ea;
  --cx-line-dark: rgba(255, 255, 255, 0.14);
  --cx-page: #ffffff;
  --cx-panel: #f6f6f4;
  --cx-max: 760px;
}

body.dark-mode {
  --cx-ink: #f2f2f2;
  --cx-ink-2: #e0e0e0;
  --cx-ink-3: #b6b6ba;
  --cx-ink-dim: #7a7a80;
  --cx-line: rgba(255, 255, 255, 0.10);
  --cx-page: #0e0e10;
  --cx-panel: #17171a;
}

/* ---------- Page wrapper ---------- */
.cx-page {
  background: var(--cx-page);
  color: var(--cx-ink);
  font-family: 'Montserrat', -apple-system, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  padding-top: 90px; /* clear the fixed navbar */
}

body.rtl .cx-page {
  font-family: 'Noto Sans Arabic', 'Tajawal', 'Cairo', 'Montserrat', sans-serif;
}

/* ---------- Scroll progress bar (top of page) ---------- */
.cx-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 999;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.04);
}
.cx-scroll-progress > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cx-orange), var(--cx-blue));
  box-shadow: 0 0 12px rgba(255, 146, 1, 0.42);
  transition: width 0.14s linear;
}
body.dark-mode .cx-scroll-progress {
  background: rgba(255, 255, 255, 0.06);
}

/* ---------- Hero ---------- */
.cx-hero {
  padding: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 6vw, 3rem) clamp(3.5rem, 9vw, 6.5rem);
  position: relative;
  overflow: hidden;
  background-size: 200% 200%;
  animation: cxHeroDrift 18s ease-in-out infinite;
}

@keyframes cxHeroDrift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.cx-hero-inner {
  max-width: var(--cx-max);
  margin: 0 auto;
  position: relative;
  z-index: 3;
}

.cx-track-commercial .cx-hero {
  background: linear-gradient(135deg, #ff9201 0%, #f57900 45%, #ffa726 100%);
  color: #fff;
}

.cx-track-creative .cx-hero {
  background: linear-gradient(135deg, #00b1e1 0%, #067a9e 45%, #22c8f0 100%);
  color: #fff;
}

/* Grain texture overlay on hero */
.cx-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 200px;
}

/* Two decorative orbital rings — rotating in opposite directions */
.cx-hero::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.16);
  pointer-events: none;
  z-index: 2;
  animation: cxRingRotate 60s linear infinite;
}

.cx-hero-inner::before {
  content: '';
  position: absolute;
  top: -140px;
  right: -140px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 0;
  animation: cxRingRotate 120s linear infinite reverse;
}

@keyframes cxRingRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cx-track-commercial .cx-hero::after {
  border-color: rgba(0, 177, 225, 0.32);
  box-shadow: 0 0 60px rgba(0, 177, 225, 0.14) inset;
}

.cx-track-creative .cx-hero::after {
  border-color: rgba(255, 146, 1, 0.32);
  box-shadow: 0 0 60px rgba(255, 146, 1, 0.14) inset;
}

.cx-eyebrow {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 1.6rem;
  opacity: 0;
  transform: translateY(20px);
  animation: cxHeroRise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.cx-eyebrow::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.85);
  animation: cxDotPulse 2.2s ease-in-out infinite;
  vertical-align: -1px;
}
@keyframes cxDotPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.35); }
}
@keyframes cxHeroRise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

body.rtl .cx-eyebrow {
  font-family: 'JetBrains Mono', 'Tajawal', monospace;
  letter-spacing: 0.14em;
}

.cx-title {
  font-size: clamp(2.4rem, 6.5vw, 4.4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 1rem;
  text-wrap: balance;
  opacity: 0;
  transform: translateY(28px);
  animation: cxHeroRise 1s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards;
  text-shadow: 0 4px 32px rgba(0, 0, 0, 0.12);
}

.cx-subline {
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 2rem;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(20px);
  animation: cxHeroRise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.55s forwards;
}

.cx-apply-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.95em 1.6em;
  background: #fff;
  color: var(--cx-orange-deep);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease, gap 0.28s ease;
  opacity: 0;
  transform: translateY(16px);
  animation: cxHeroRise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.75s forwards;
  position: relative;
  overflow: hidden;
}

.cx-apply-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 146, 1, 0.14), transparent);
  transform: translateX(-100%);
  transition: transform 0.7s ease;
}

.cx-track-creative .cx-apply-cta::before {
  background: linear-gradient(120deg, transparent, rgba(0, 177, 225, 0.14), transparent);
}

.cx-apply-cta:hover::before {
  transform: translateX(100%);
}

.cx-track-creative .cx-apply-cta {
  color: var(--cx-blue-deep);
}

.cx-apply-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
  gap: 0.85em;
}

/* ---------- Body article ---------- */
.cx-body {
  max-width: var(--cx-max);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 6vw, 3rem);
}

.cx-section + .cx-section {
  margin-top: clamp(2.4rem, 5vw, 3.6rem);
}

/* Scroll-triggered section reveal (progressive enhancement — sections are visible
   by default; JS opts them into the fade-up by adding .cx-observed) */
.cx-section.cx-observed {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
.cx-section.cx-observed.cx-in-view {
  opacity: 1;
  transform: translateY(0);
}

.cx-section-h {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cx-ink-dim);
  margin: 0 0 1.4rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--cx-line);
  position: relative;
}
.cx-section-h::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, currentColor, transparent);
  transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
  border-radius: 1px;
}
body.rtl .cx-section-h::after {
  left: auto;
  right: 0;
  background: linear-gradient(270deg, currentColor, transparent);
}
.cx-in-view .cx-section-h::after {
  width: 72px;
}

.cx-track-commercial .cx-section-h {
  color: var(--cx-orange-deep);
}

.cx-track-creative .cx-section-h {
  color: var(--cx-blue-deep);
}

body.dark-mode.cx-track-commercial .cx-section-h,
body.rtl.dark-mode .cx-track-commercial .cx-section-h {
  color: var(--cx-orange-hi);
}

body.dark-mode.cx-track-creative .cx-section-h {
  color: var(--cx-blue-hi);
}

body.rtl .cx-section-h {
  font-family: 'JetBrains Mono', 'Tajawal', monospace;
  letter-spacing: 0.14em;
}

.cx-body p {
  font-size: clamp(1rem, 1.5vw, 1.08rem);
  line-height: 1.72;
  color: var(--cx-ink-2);
  margin: 0 0 1.1rem;
}

.cx-body p:last-child {
  margin-bottom: 0;
}

.cx-body strong {
  font-weight: 700;
  color: var(--cx-ink);
}

/* Why-Pomelo bullets */
.cx-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cx-bullets li {
  position: relative;
  padding-left: 1.6rem;
  margin: 0 0 1rem;
  font-size: clamp(1rem, 1.5vw, 1.08rem);
  line-height: 1.65;
  color: var(--cx-ink-2);
}

body.rtl .cx-bullets li {
  padding-left: 0;
  padding-right: 1.6rem;
}

.cx-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cx-orange);
  transform: rotate(45deg);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

body.rtl .cx-bullets li::before {
  left: auto;
  right: 0;
}

.cx-track-creative .cx-bullets li::before {
  background: var(--cx-blue);
}

/* Bullet marker breathes when its section is in view */
.cx-in-view .cx-bullets li::before {
  animation: cxDiamondBreathe 3.4s ease-in-out infinite;
}

@keyframes cxDiamondBreathe {
  0%, 100% {
    transform: rotate(45deg) scale(1);
    box-shadow: 0 0 0 0 rgba(255, 146, 1, 0);
  }
  50% {
    transform: rotate(45deg) scale(1.18);
    box-shadow: 0 0 0 6px rgba(255, 146, 1, 0.14);
  }
}

.cx-track-creative .cx-in-view .cx-bullets li::before {
  animation-name: cxDiamondBreatheBlue;
}

@keyframes cxDiamondBreatheBlue {
  0%, 100% {
    transform: rotate(45deg) scale(1);
    box-shadow: 0 0 0 0 rgba(0, 177, 225, 0);
  }
  50% {
    transform: rotate(45deg) scale(1.18);
    box-shadow: 0 0 0 6px rgba(0, 177, 225, 0.16);
  }
}

/* Stagger bullet reveal — only fires on sections JS has opted into (cx-observed).
   For sections that never get observed (e.g. JS fails), bullets remain visible. */
.cx-observed.cx-in-view .cx-bullets li {
  animation: cxBulletRise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.cx-observed.cx-in-view .cx-bullets li:nth-child(1) { animation-delay: 0.15s; }
.cx-observed.cx-in-view .cx-bullets li:nth-child(2) { animation-delay: 0.25s; }
.cx-observed.cx-in-view .cx-bullets li:nth-child(3) { animation-delay: 0.35s; }
.cx-observed.cx-in-view .cx-bullets li:nth-child(4) { animation-delay: 0.45s; }
.cx-observed.cx-in-view .cx-bullets li:nth-child(5) { animation-delay: 0.55s; }
.cx-observed.cx-in-view .cx-bullets li:nth-child(6) { animation-delay: 0.65s; }
.cx-observed.cx-in-view .cx-bullets li:nth-child(7) { animation-delay: 0.75s; }

@keyframes cxBulletRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.cx-bullets li strong {
  display: inline;
  font-weight: 700;
  color: var(--cx-ink);
}

/* Closing note in What We Need */
.cx-note {
  font-style: normal;
  font-size: 0.98rem;
  color: var(--cx-ink-3);
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px dashed var(--cx-line);
}

/* AI callout — the "We use AI to remove the boring parts" black box
   appears on Senior Designer + Motion Graphics pages per copy doc */
.cx-callout {
  margin: 1.8rem 0;
  padding: 1.35rem 1.6rem;
  background: #0e0e10;
  color: #f5f5f5;
  border-radius: 6px;
  font-size: clamp(1rem, 1.55vw, 1.12rem);
  font-weight: 500;
  line-height: 1.55;
  text-align: center;
  letter-spacing: 0.005em;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.28);
}

.cx-callout::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.09), transparent);
  animation: cxCalloutShine 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes cxCalloutShine {
  0%, 45% { left: -60%; }
  75%, 100% { left: 130%; }
}

body.dark-mode .cx-callout {
  background: #1c1c20;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---------- Form ---------- */
.cx-form-section {
  scroll-margin-top: 100px;
  background: var(--cx-panel);
  border-radius: 8px;
  padding: clamp(1.6rem, 4vw, 2.4rem);
  margin-top: clamp(2.4rem, 5vw, 3.6rem);
}

.cx-form {
  display: grid;
  gap: 1.2rem;
}

.cx-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cx-field label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--cx-ink);
  letter-spacing: 0.01em;
}

.cx-field .cx-hint {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--cx-ink-dim);
  margin-top: -0.2rem;
}

.cx-field input,
.cx-field textarea {
  width: 100%;
  padding: 0.85em 1em;
  border: 1px solid var(--cx-line);
  border-radius: 6px;
  background: var(--cx-page);
  color: var(--cx-ink);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.25s ease, box-shadow 0.3s ease, transform 0.25s ease, background 0.25s ease;
}

.cx-field textarea {
  min-height: 96px;
  resize: vertical;
}

.cx-field input:hover,
.cx-field textarea:hover {
  border-color: rgba(255, 146, 1, 0.42);
}

.cx-track-creative .cx-field input:hover,
.cx-track-creative .cx-field textarea:hover {
  border-color: rgba(0, 177, 225, 0.42);
}

.cx-field input:focus,
.cx-field textarea:focus {
  outline: none;
  border-color: var(--cx-orange);
  box-shadow: 0 0 0 3px rgba(255, 146, 1, 0.18),
              0 10px 32px -12px rgba(255, 146, 1, 0.28);
  transform: translateY(-1px);
}

.cx-track-creative .cx-field input:focus,
.cx-track-creative .cx-field textarea:focus {
  border-color: var(--cx-blue);
  box-shadow: 0 0 0 3px rgba(0, 177, 225, 0.18),
              0 10px 32px -12px rgba(0, 177, 225, 0.28);
}

/* Custom file input styling — replaces the ugly native button */
.cx-field input[type="file"] {
  padding: 0;
  cursor: pointer;
  background: var(--cx-page);
  border: 1px dashed var(--cx-line);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.cx-field input[type="file"]:hover {
  border-color: var(--cx-orange);
  border-style: dashed;
  background: rgba(255, 146, 1, 0.03);
}

.cx-track-creative .cx-field input[type="file"]:hover {
  border-color: var(--cx-blue);
  background: rgba(0, 177, 225, 0.03);
}

.cx-field input[type="file"]::file-selector-button {
  margin: 0.35em;
  padding: 0.7em 1.2em;
  background: var(--cx-orange);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease;
}

.cx-track-creative .cx-field input[type="file"]::file-selector-button {
  background: var(--cx-blue);
}

.cx-field input[type="file"]::file-selector-button:hover {
  background: var(--cx-orange-deep);
  transform: translateY(-1px);
}

.cx-track-creative .cx-field input[type="file"]::file-selector-button:hover {
  background: var(--cx-blue-deep);
}

.cx-file-info {
  font-size: 0.82rem;
  color: var(--cx-ink-dim);
  padding: 0.4em 0 0;
  animation: cxFadeIn 0.3s ease-out;
}

@keyframes cxFadeIn {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

.cx-file-info.cx-error {
  color: #c02020;
}

.cx-field .cx-hint {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--cx-ink-dim);
  margin-top: -0.2rem;
}

.cx-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  margin-top: 0.6rem;
  padding: 1.1em 2em;
  background: linear-gradient(135deg, #ff9201 0%, #ffa726 50%, #ff9201 100%);
  background-size: 200% 100%;
  background-position: 0% 0%;
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s ease,
              background-position 0.6s ease,
              letter-spacing 0.28s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 18px -6px rgba(255, 146, 1, 0.42);
}

.cx-track-creative .cx-submit {
  background: linear-gradient(135deg, #00b1e1 0%, #22c8f0 50%, #00b1e1 100%);
  background-size: 200% 100%;
  box-shadow: 0 6px 18px -6px rgba(0, 177, 225, 0.42);
}

.cx-submit::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 30%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: translateX(0);
  transition: transform 0.8s ease;
  pointer-events: none;
}

.cx-submit:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px -10px rgba(255, 146, 1, 0.52);
  background-position: 100% 0%;
  letter-spacing: 0.17em;
}

.cx-track-creative .cx-submit:hover:not(:disabled) {
  box-shadow: 0 16px 40px -10px rgba(0, 177, 225, 0.52);
}

.cx-submit:hover:not(:disabled)::after {
  transform: translateX(500%);
}

.cx-submit:active:not(:disabled) {
  transform: translateY(-1px);
}

.cx-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  letter-spacing: 0.14em;
}

.cx-status {
  margin-top: 0.6rem;
  padding: 0.9em 1em;
  border-radius: 6px;
  font-size: 0.94rem;
  font-weight: 500;
  display: none;
}

.cx-status.cx-status--success {
  display: block;
  background: rgba(0, 177, 225, 0.10);
  color: var(--cx-blue-deep);
  border: 1px solid rgba(0, 177, 225, 0.28);
}

body.dark-mode .cx-status.cx-status--success {
  color: var(--cx-blue-hi);
}

.cx-status.cx-status--error {
  display: block;
  background: rgba(192, 32, 32, 0.08);
  color: #c02020;
  border: 1px solid rgba(192, 32, 32, 0.28);
}

/* ---------- Closing block ---------- */
.cx-closing {
  max-width: var(--cx-max);
  margin: clamp(3rem, 6vw, 4.5rem) auto 0;
  padding: 2rem clamp(1.5rem, 6vw, 3rem);
  border-top: 1px solid var(--cx-line);
  text-align: center;
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--cx-ink-3);
  line-height: 2;
}

body.rtl .cx-closing {
  font-family: 'Tajawal', 'Cairo', monospace;
  letter-spacing: 0.02em;
  font-size: 0.86rem;
}

.cx-closing strong {
  color: var(--cx-ink);
  font-weight: 700;
}

.cx-closing p {
  margin: 0.3em 0;
}

/* ---------- Related roles strip ---------- */
.cx-related {
  max-width: var(--cx-max);
  margin: clamp(2rem, 4vw, 3rem) auto 0;
  padding: 0 clamp(1.5rem, 6vw, 3rem);
}

.cx-related-h {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cx-ink-dim);
  margin: 0 0 1rem;
}

body.rtl .cx-related-h {
  font-family: 'JetBrains Mono', 'Tajawal', monospace;
  letter-spacing: 0.14em;
}

.cx-related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.cx-related-list a {
  color: var(--cx-ink-2);
  text-decoration: none;
  font-size: 0.94rem;
  padding: 0.35em 0;
  transition: color 0.15s ease;
  display: inline-flex;
  gap: 0.6em;
  align-items: baseline;
}

.cx-related-list a:hover {
  color: var(--cx-orange);
}

.cx-track-creative .cx-related-list a:hover {
  color: var(--cx-blue);
}

.cx-related-list a::before {
  content: '→';
  color: var(--cx-ink-dim);
}

body.rtl .cx-related-list a::before {
  content: '←';
}

/* ---------- Mobile refinements ---------- */
@media (max-width: 640px) {
  .cx-page { padding-top: 72px; }
  .cx-hero::after { display: none; }
  .cx-title { letter-spacing: -0.005em; }
  .cx-form-section { padding: 1.4rem; }
}

/* Reduced motion — kill all animations, keep interactions crisp */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .cx-eyebrow,
  .cx-title,
  .cx-subline,
  .cx-apply-cta,
  .cx-hub-title,
  .cx-hub-eyebrow,
  .cx-hub-lede,
  .cx-hub-meta,
  .cx-hub-card,
  .cx-section {
    opacity: 1 !important;
    transform: none !important;
  }
  .cx-hero,
  .cx-hero::after,
  .cx-hero-inner::before,
  .cx-callout::after,
  .cx-in-view .cx-bullets li::before {
    animation: none !important;
  }
}

/* =========================================================
   CAREERS HUB — /careers index page
   Grid of role cards, colored by track
   ========================================================= */
.cx-hub-page {
  background: var(--cx-page);
  color: var(--cx-ink);
  font-family: 'Montserrat', -apple-system, 'Segoe UI', sans-serif;
  padding-top: 90px;
}

body.rtl .cx-hub-page {
  font-family: 'Noto Sans Arabic', 'Tajawal', 'Cairo', 'Montserrat', sans-serif;
}

.cx-hub-head {
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(2.4rem, 6vw, 4rem) clamp(1.5rem, 6vw, 3rem) clamp(1.6rem, 4vw, 2.4rem);
  text-align: center;
}

.cx-hub-eyebrow {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cx-orange-deep);
  margin-bottom: 1.4rem;
}

body.rtl .cx-hub-eyebrow {
  font-family: 'JetBrains Mono', 'Tajawal', monospace;
  letter-spacing: 0.14em;
}

.cx-hub-title {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  color: var(--cx-ink);
  text-wrap: balance;
}

.cx-hub-title .cx-orange-txt {
  background: linear-gradient(120deg, #ff9201, #f57900, #ffa726, #ff9201);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: cxGradShift 8s ease-in-out infinite;
}
.cx-hub-title .cx-blue-txt {
  background: linear-gradient(120deg, #00b1e1, #067a9e, #22c8f0, #00b1e1);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: cxGradShift 8s ease-in-out infinite 1s;
}

@keyframes cxGradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.cx-hub-title {
  opacity: 0;
  transform: translateY(24px);
  animation: cxHeroRise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
}

.cx-hub-eyebrow {
  opacity: 0;
  transform: translateY(20px);
  animation: cxHeroRise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

.cx-hub-lede {
  opacity: 0;
  transform: translateY(20px);
  animation: cxHeroRise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
}

.cx-hub-meta {
  opacity: 0;
  transform: translateY(20px);
  animation: cxHeroRise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.cx-hub-lede {
  font-size: clamp(1rem, 1.6vw, 1.14rem);
  color: var(--cx-ink-3);
  max-width: 44em;
  margin: 0 auto;
  line-height: 1.65;
}

.cx-hub-meta {
  margin-top: 1.8rem;
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cx-ink-dim);
}

body.rtl .cx-hub-meta {
  font-family: 'JetBrains Mono', 'Tajawal', monospace;
  letter-spacing: 0.1em;
}

.cx-hub-grid {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 6vw, 3rem) clamp(3rem, 6vw, 5rem);
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.cx-hub-card {
  display: flex;
  flex-direction: column;
  padding: 1.8rem 1.8rem 2rem;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
  min-height: 240px;
  opacity: 0;
  transform: translateY(24px);
  animation: cxCardEnter 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  background-size: 200% 200%;
  background-position: 0% 0%;
  will-change: transform;
}

.cx-hub-card:nth-child(1) { animation-delay: 0.05s; }
.cx-hub-card:nth-child(2) { animation-delay: 0.15s; }
.cx-hub-card:nth-child(3) { animation-delay: 0.25s; }
.cx-hub-card:nth-child(4) { animation-delay: 0.35s; }
.cx-hub-card:nth-child(5) { animation-delay: 0.45s; }
.cx-hub-card:nth-child(6) { animation-delay: 0.55s; }
.cx-hub-card:nth-child(7) { animation-delay: 0.65s; }

@keyframes cxCardEnter {
  to { opacity: 1; transform: translateY(0); }
}

.cx-hub-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 32px 60px -20px rgba(0, 0, 0, 0.35);
  background-position: 100% 100%;
}

.cx-hub-card:hover .cx-hub-card-cta {
  gap: 0.9em;
}

.cx-hub-card--commercial {
  background: linear-gradient(135deg, #ff9201 0%, #f57900 45%, #ffa726 100%);
}

.cx-hub-card--creative {
  background: linear-gradient(135deg, #00b1e1 0%, #067a9e 45%, #22c8f0 100%);
}

.cx-hub-card::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.16);
  pointer-events: none;
  transition: transform 0.7s ease, border-color 0.4s ease;
}

body.rtl .cx-hub-card::after {
  right: auto;
  left: -40px;
}

.cx-hub-card:hover::after {
  transform: rotate(90deg) scale(1.15);
  border-color: rgba(255, 255, 255, 0.32);
}

.cx-hub-card--commercial::after { border-color: rgba(0, 177, 225, 0.32); }
.cx-hub-card--creative::after { border-color: rgba(255, 146, 1, 0.32); }

/* Subtle grain on hub cards */
.cx-hub-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 200px;
}

.cx-hub-card-track {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 1.2rem;
  position: relative;
  z-index: 1;
}

body.rtl .cx-hub-card-track {
  font-family: 'JetBrains Mono', 'Tajawal', monospace;
  letter-spacing: 0.12em;
}

.cx-hub-card-title {
  font-size: 1.44rem;
  font-weight: 800;
  line-height: 1.15;
  margin: auto 0 0.8rem;
  color: #fff;
  position: relative;
  z-index: 1;
  text-wrap: balance;
}

.cx-hub-card-meta {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 1.2rem;
  position: relative;
  z-index: 1;
}

.cx-hub-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #fff;
  position: relative;
  z-index: 1;
  transition: gap 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

body.rtl .cx-hub-card-cta {
  font-family: 'JetBrains Mono', 'Tajawal', monospace;
  letter-spacing: 0.1em;
}

@media (max-width: 640px) {
  .cx-hub-page { padding-top: 72px; }
  .cx-hub-card { min-height: 200px; padding: 1.4rem; }
}

/* =========================================================
   CAREERS DECK — /careers slide deck
   9 vertical slides: cover -> commercial -> creative -> closing
   ========================================================= */

.cx-deck-body {
  margin: 0;
  background: #0e0e10;
}

/* Navbar logo colour-sync — the site's coloured Pomelo logo blends into the
   orange (commercial/cover/closing) slide backgrounds, so we invert it to
   pure white while the viewport sits on those slides. Cream (creative)
   slides show the original coloured logo unchanged.
   The .cx-on-dark class is toggled on body by careers.js as you scroll. */
.cx-deck-body .navbar .logo-image-header {
  transition: filter 0.35s ease;
}
body.cx-deck-body.cx-on-dark .navbar .logo-image-header {
  filter: brightness(0) invert(1);
}
/* Any icon buttons in the navbar can benefit from a light tint on dark bg too */
body.cx-deck-body.cx-on-dark .navbar .lang-toggle i,
body.cx-deck-body.cx-on-dark .navbar .dark-mode-toggle {
  color: #fff;
}

/* Text-based language toggles (AR / KU / EN) replacing the ambiguous globe icons.
   Look like small badges — same size + rhythm as the existing icon buttons. */
.lang-toggle--text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 0.25em 0.55em;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: inherit;
  opacity: 0.85;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.lang-toggle--text:hover {
  opacity: 1;
  background: currentColor;
}
.lang-toggle--text:hover {
  color: inherit;
}
/* Invert on hover — swap fg/bg using a wrapper trick */
.lang-toggle--text:hover {
  background: rgba(0, 0, 0, 0.08);
}
body.cx-on-dark .lang-toggle--text:hover {
  background: rgba(255, 255, 255, 0.15);
}

html:has(.cx-deck) {
  scroll-behavior: smooth;
}

.cx-deck {
  display: block;
  font-family: 'Montserrat', -apple-system, 'Segoe UI', sans-serif;
}

body.rtl .cx-deck {
  font-family: 'Noto Sans Arabic', 'Tajawal', 'Cairo', 'Montserrat', sans-serif;
}

.cx-slide {
  position: relative;
  min-height: 100vh;                 /* fallback for older browsers */
  min-height: 100svh;                /* static "small" viewport — does NOT change
                                        with URL bar visibility on iOS Safari, so
                                        no layout shift → no scroll bounce loop. */
  overflow: hidden;
  isolation: isolate;
  padding: 90px clamp(1.4rem, 4vw, 3rem) clamp(1.4rem, 3vw, 2rem);
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 100vw;
}

/* Brand-coloured dividers between same-track slides.
   Orange (cover / commercial / closing) → blue line above.
   Creative (cream) → orange line above. */
.cx-slide:is(.cx-slide--cover, .cx-slide--commercial, .cx-slide--closing)
  + .cx-slide:is(.cx-slide--cover, .cx-slide--commercial, .cx-slide--closing) {
  border-top: 4px solid var(--cx-blue);
}
.cx-slide--creative + .cx-slide--creative {
  border-top: 4px solid var(--cx-blue);
}

.cx-slide-frame {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1.2rem;
  color: #fff;
  text-decoration: none;
}

/* Frame that is itself a link (role slides) */
a.cx-slide-frame {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
a.cx-slide-frame:hover { transform: translateY(-4px); }
a.cx-slide-frame:hover .cx-slide-cta { gap: 0.9em; letter-spacing: 0.18em; }
a.cx-slide-frame:hover .cx-slide-arrow { transform: translateX(6px); }
body.rtl a.cx-slide-frame:hover .cx-slide-arrow { transform: translateX(-6px); }

/* ---------- Backgrounds per track ---------- */
.cx-slide--cover,
.cx-slide--commercial {
  background: linear-gradient(135deg, #ff9201 0%, #f57900 45%, #ffa726 100%);
  background-size: 200% 200%;
  animation: cxDeckDrift 22s ease-in-out infinite;
  color: #fff;
}

.cx-slide--creative {
  background: linear-gradient(135deg, #fff6e8 0%, #ffeed6 50%, #ffe6c4 100%);
  color: var(--cx-ink);
}

/* Frame's color: #fff cascades to brand + counter + url via currentColor —
   override for the cream (creative) slides so those aren't white-on-white. */
.cx-slide--creative .cx-slide-frame { color: var(--cx-ink); }
.cx-slide--creative .cx-slide-brand,
.cx-slide--creative .cx-slide-count,
.cx-slide--creative .cx-slide-mark-url { color: var(--cx-ink); }

.cx-slide--closing {
  background: linear-gradient(135deg, #f57900 0%, #ff9201 50%, #ffb14a 100%);
  background-size: 200% 200%;
  animation: cxDeckDrift 22s ease-in-out infinite;
  color: #fff;
}

@keyframes cxDeckDrift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Decorative orbs — big blurred circles behind content */
.cx-slide::before {
  content: '';
  position: absolute;
  z-index: 1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
  transition: transform 12s cubic-bezier(0.4, 0.0, 0.2, 1);
  animation: cxOrbFloat 16s ease-in-out infinite;
}

.cx-slide--cover::before,
.cx-slide--commercial::before,
.cx-slide--closing::before {
  top: -18vh;
  right: -14vw;
  width: min(72vh, 60vw);
  height: min(72vh, 60vw);
  background: radial-gradient(circle at 30% 30%, rgba(255, 194, 106, 0.72), rgba(255, 146, 1, 0));
}

.cx-slide--creative::before {
  top: -14vh;
  right: -12vw;
  width: min(68vh, 56vw);
  height: min(68vh, 56vw);
  background: radial-gradient(circle at 30% 30%, rgba(255, 233, 200, 0.9), rgba(255, 233, 200, 0));
  opacity: 0.8;
}

body.rtl .cx-slide::before {
  right: auto;
  left: -14vw;
}

.cx-slide::after {
  content: '';
  position: absolute;
  z-index: 1;
  pointer-events: none;
  bottom: -20vh;
  left: -14vw;
  width: min(56vh, 46vw);
  height: min(56vh, 46vw);
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0.42;
  animation: cxOrbFloat 22s ease-in-out infinite reverse;
}

.cx-slide--cover::after,
.cx-slide--commercial::after,
.cx-slide--closing::after {
  background: radial-gradient(circle at 40% 40%, rgba(255, 194, 106, 0.55), rgba(255, 146, 1, 0));
}

.cx-slide--creative::after {
  background: radial-gradient(circle at 40% 40%, rgba(178, 226, 236, 0.6), rgba(178, 226, 236, 0));
  opacity: 0.7;
}

body.rtl .cx-slide::after {
  left: auto;
  right: -14vw;
}

@keyframes cxOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-14px, 22px) scale(1.05); }
}

/* Grain texture */
.cx-slide-frame::before {
  content: '';
  position: absolute;
  inset: -90px -20px -20px -20px;
  z-index: -1;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 220px;
}

/* ---------- Slide top row: brand + counter ---------- */
.cx-slide-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.6rem;
  gap: 1rem;
}

.cx-slide-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: currentColor;
  opacity: 0.9;
}

.cx-slide-brand-sep {
  opacity: 0.55;
  font-weight: 400;
}

body.rtl .cx-slide-brand {
  font-family: 'JetBrains Mono', 'Tajawal', monospace;
  letter-spacing: 0.12em;
}

.cx-slide-mark {
  width: 22px;
  height: 22px;
  display: inline-block;
  object-fit: contain;
  vertical-align: middle;
  transition: filter 0.35s ease;
}

/* Creative slides (cream bg) → logo shows its original colors */
.cx-slide--creative .cx-slide-mark {
  filter: none;
}

/* Orange slides (cover/commercial/closing) → invert to pure white */
.cx-slide--cover .cx-slide-mark,
.cx-slide--commercial .cx-slide-mark,
.cx-slide--closing .cx-slide-mark {
  filter: brightness(0) invert(1);
}

.cx-slide-count {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: currentColor;
  opacity: 0.85;
}

body.rtl .cx-slide-count {
  font-family: 'JetBrains Mono', 'Tajawal', monospace;
  letter-spacing: 0.12em;
}

body.rtl .cx-slide-count {
  font-family: 'JetBrains Mono', 'Tajawal', monospace;
  letter-spacing: 0.12em;
}

/* ---------- Slide body ---------- */
.cx-slide-body {
  align-self: center;
  max-width: 900px;
  display: grid;
  gap: clamp(0.9rem, 2vw, 1.4rem);
  padding: clamp(0.5rem, 2vw, 1.5rem) 0;
}

/* Pills + tags */
.cx-slide-pill {
  justify-self: start;                 /* grid contexts */
  align-self: flex-start;              /* flex contexts — prevents stretch-to-full-width */
  display: inline-block;
  width: auto;
  padding: 0.55em 1.2em;
  border-radius: 999px;
  background: var(--cx-blue);
  color: #fff;
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  box-shadow: 0 6px 18px -6px rgba(0, 177, 225, 0.45);
}

body.rtl .cx-slide-pill {
  font-family: 'JetBrains Mono', 'Tajawal', monospace;
  letter-spacing: 0.1em;
}

/* Track tag — the big prominent pill from the mockups.
   - Commercial slides (orange bg): white pill, orange text
   - Creative slides (cream bg):    blue pill, white text */
.cx-slide-track-tag {
  justify-self: start;
  display: block;
  padding: 1.1em 1.8em;
  border-radius: 999px;
  background: #fff;
  color: var(--cx-orange);
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: clamp(0.72rem, 1.35vw, 0.88rem);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  min-width: min(620px, 100%);
  width: 100%;
  max-width: 620px;
  box-sizing: border-box;
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.18);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s ease;
  position: static;
  margin: 0;
}

/* Kill the old hairline underline pseudo */
.cx-slide-track-tag::after {
  content: none;
}

body.rtl .cx-slide-track-tag {
  font-family: 'JetBrains Mono', 'Tajawal', monospace;
  letter-spacing: 0.12em;
}

.cx-slide--creative .cx-slide-track-tag {
  background: var(--cx-blue);
  color: #fff;
  box-shadow: 0 10px 30px -14px rgba(0, 177, 225, 0.42);
}

a.cx-slide-frame:hover .cx-slide-track-tag {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px -16px rgba(0, 0, 0, 0.28);
}
body.rtl a.cx-slide-frame:hover .cx-slide-track-tag {
  transform: translateY(-3px);
}

.cx-slide-tag {
  justify-self: start;
  display: block;
  padding: 0.9em 1.6em;
  border-radius: 999px;
  background: #fff;
  color: var(--cx-orange);
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  min-width: min(360px, 80%);
  box-shadow: 0 8px 22px -12px rgba(0, 0, 0, 0.22);
}

body.rtl .cx-slide-tag {
  font-family: 'JetBrains Mono', 'Tajawal', monospace;
  letter-spacing: 0.08em;
}

.cx-slide--creative .cx-slide-tag {
  background: rgba(0, 177, 225, 0.14);
  color: var(--cx-blue-deep);
  box-shadow: none;
}

.cx-slide-sep {
  opacity: 0.55;
  margin: 0 0.4em;
  font-weight: 400;
}

/* Title */
.cx-slide-title {
  font-size: clamp(3.4rem, 9vw, 6.8rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.015em;
  text-transform: uppercase;                /* matches mockup posters */
  margin: 0;
  color: currentColor;
  text-wrap: balance;
  text-shadow: 0 4px 32px rgba(0, 0, 0, 0.08);
}


.cx-slide--creative .cx-slide-title {
  text-shadow: none;
  color: #0d0d0d;
}

.cx-slide-title--cover {
  font-size: clamp(3.6rem, 10vw, 7.6rem);
}

body.rtl .cx-slide-title {
  letter-spacing: 0;
  line-height: 1.05;
}

/* Lede */
.cx-slide-lede {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.4;
  color: currentColor;
  opacity: 0.94;
  max-width: 28em;
  margin: 0;
  font-weight: 500;
}

.cx-slide--creative .cx-slide-lede {
  color: #1f1f22;
  opacity: 1;
}

.cx-slide-lede--cover {
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.15;
}

/* Cover meta line */
.cx-slide-meta--cover {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: currentColor;
  opacity: 0.9;
  margin: 0.4rem 0 0;
}

body.rtl .cx-slide-meta--cover {
  font-family: 'JetBrains Mono', 'Tajawal', monospace;
  letter-spacing: 0.1em;
}

/* Cover track chooser pills */
.cx-slide-tracks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0.4rem;
}

.cx-slide-track-pill {
  display: inline-block;
  padding: 1em 1.8em;
  border-radius: 999px;
  background: #fff;
  color: var(--cx-blue);
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s ease,
              background 0.35s ease,
              color 0.35s ease;
  box-shadow: 0 10px 28px -14px rgba(0, 0, 0, 0.22);
  min-width: 220px;
  text-align: center;
}

body.rtl .cx-slide-track-pill {
  font-family: 'JetBrains Mono', 'Tajawal', monospace;
  letter-spacing: 0.1em;
}

.cx-slide-track-pill--commercial {
  color: var(--cx-orange);
}

.cx-slide-track-pill--creative {
  color: var(--cx-blue);
}

.cx-slide-track-pill:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.3);
}

.cx-slide-track-pill--commercial:hover {
  background: var(--cx-orange);
  color: #fff;
}

.cx-slide-track-pill--creative:hover {
  background: var(--cx-blue);
  color: #fff;
}

/* ---------- Slide bottom row: CTA + URL ---------- */
.cx-slide-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.cx-slide--creative .cx-slide-bottom {
  border-top-color: rgba(255, 146, 1, 0.28);
}

.cx-slide-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: currentColor;
  text-decoration: none;
  transition: gap 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              letter-spacing 0.35s ease;
}

.cx-slide--creative .cx-slide-cta {
  color: var(--cx-blue-deep);
}

body.rtl .cx-slide-cta {
  font-family: 'Noto Sans Arabic', 'Tajawal', 'Cairo', 'Montserrat', sans-serif;
  letter-spacing: 0.06em;
}

/* Arrow — single SVG-masked glyph. Shaft + chevron drawn as one path so
   they always align perfectly, at any size/color. Uses currentColor via
   `background`, so it inherits the CTA's text color automatically. */
.cx-slide-arrow {
  display: inline-block;
  width: 30px;
  height: 12px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 12' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M0 6 H26 M20 1 L26 6 L20 11'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 12' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M0 6 H26 M20 1 L26 6 L20 11'/%3E%3C/svg%3E") no-repeat center / contain;
  vertical-align: middle;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Kill the old ::after chevron (no longer needed — the SVG has the head baked in) */
.cx-slide-arrow::after { content: none; }

body.rtl .cx-slide-arrow {
  transform: scaleX(-1);
}

.cx-slide-arrow--up {
  transform: rotate(-90deg);
}
body.rtl .cx-slide-arrow--up {
  transform: rotate(-90deg) scaleY(-1);
}

.cx-slide-cta--scroll .cx-slide-arrow {
  animation: cxArrowPulse 2.4s ease-in-out infinite;
}

@keyframes cxArrowPulse {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(8px); }
}

body.rtl .cx-slide-cta--scroll .cx-slide-arrow {
  animation-name: cxArrowPulseRtl;
}

@keyframes cxArrowPulseRtl {
  0%, 100% { transform: scaleX(-1) translateX(0); }
  50% { transform: scaleX(-1) translateX(8px); }
}

.cx-slide-mark-url {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: currentColor;
  opacity: 0.7;
}

body.rtl .cx-slide-mark-url {
  font-family: 'JetBrains Mono', 'Tajawal', monospace;
  letter-spacing: 0.1em;
}

/* ---------- Entrance animations ---------- */
.cx-slide-body > * {
  opacity: 0;
  transform: translateY(28px);
}

.cx-slide[data-slide]:target .cx-slide-body > *,
.cx-slide-in .cx-slide-body > *,
.cx-slide.cx-slide-visible .cx-slide-body > * {
  animation: cxSlideRise 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.cx-slide.cx-slide-visible .cx-slide-body > *:nth-child(1) { animation-delay: 0.10s; }
.cx-slide.cx-slide-visible .cx-slide-body > *:nth-child(2) { animation-delay: 0.20s; }
.cx-slide.cx-slide-visible .cx-slide-body > *:nth-child(3) { animation-delay: 0.32s; }
.cx-slide.cx-slide-visible .cx-slide-body > *:nth-child(4) { animation-delay: 0.44s; }
.cx-slide.cx-slide-visible .cx-slide-body > *:nth-child(5) { animation-delay: 0.56s; }
.cx-slide.cx-slide-visible .cx-slide-body > *:nth-child(6) { animation-delay: 0.68s; }

.cx-slide-top,
.cx-slide-bottom {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease 0.3s, transform 0.7s ease 0.3s;
}

.cx-slide.cx-slide-visible .cx-slide-top,
.cx-slide.cx-slide-visible .cx-slide-bottom {
  opacity: 1;
  transform: translateY(0);
}

/* First slide should be visible immediately on load */
.cx-slide:first-of-type .cx-slide-body > * {
  animation: cxSlideRise 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.cx-slide:first-of-type .cx-slide-body > *:nth-child(1) { animation-delay: 0.15s; }
.cx-slide:first-of-type .cx-slide-body > *:nth-child(2) { animation-delay: 0.28s; }
.cx-slide:first-of-type .cx-slide-body > *:nth-child(3) { animation-delay: 0.42s; }
.cx-slide:first-of-type .cx-slide-body > *:nth-child(4) { animation-delay: 0.56s; }
.cx-slide:first-of-type .cx-slide-body > *:nth-child(5) { animation-delay: 0.70s; }
.cx-slide:first-of-type .cx-slide-top,
.cx-slide:first-of-type .cx-slide-bottom {
  opacity: 1;
  transform: translateY(0);
}

@keyframes cxSlideRise {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Deep-link anchor scroll offset (fixed navbar) ----------
   Without this, jumping to a slide via anchor puts the slide's top edge
   under the fixed navbar, so users see nothing change. */
.cx-slide[id] {
  scroll-margin-top: 90px;
}
@media (max-width: 720px) {
  .cx-slide[id] {
    scroll-margin-top: 76px;
  }
}

/* Defensive: keep all title/body text inside the slide, even if a word is very long */
.cx-slide-title,
.cx-slide-lede,
.cx-slide-track-tag,
.cx-slide-tag,
.cx-slide-cta {
  overflow-wrap: break-word;
  word-wrap: break-word;
  max-width: 100%;
}

/* ---------- Tablet (≤ 900px) ---------- */
@media (max-width: 900px) {
  .cx-slide {
    padding: 82px clamp(1.2rem, 4vw, 2rem) clamp(1.2rem, 3vw, 1.8rem);
  }
  .cx-slide-frame { gap: 1.1rem; }
  .cx-slide-title { font-size: clamp(3rem, 11vw, 5.4rem); }
  .cx-slide-title--cover { font-size: clamp(3.4rem, 13vw, 6rem); }
  .cx-slide-lede--cover { font-size: clamp(1.25rem, 3.4vw, 1.7rem); }
}

/* ---------- Mobile (≤ 720px) ---------- */
@media (max-width: 720px) {
  /* Cards fill the viewport like the mockup posters — full portrait height,
     content distributed with real breathing room, not clustered. */
  .cx-slide {
    /* Inherit base 100vh/100svh/100dvh — no min-height override here */
    padding: 76px 1.3rem 1.8rem;
  }
  .cx-slide-frame {
    /* Restore the 1fr middle row so the body can stretch to fill the frame */
    grid-template-rows: auto 1fr auto;
    gap: 1.1rem;
  }
  .cx-slide-body {
    /* Vertically centered in the middle 1fr row, with a 2.5rem gap between items. */
    align-self: center;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 0.4rem 0;
  }
  .cx-slide-top {
    padding-top: 0.4rem;
    gap: 0.6rem;
  }
  .cx-slide-brand {
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    gap: 0.45em;
  }
  body.rtl .cx-slide-brand { letter-spacing: 0.08em; }
  .cx-slide-mark { width: 18px; height: 18px; }
  .cx-slide-count { font-size: 0.7rem; letter-spacing: 0.2em; }

  /* Title dominates the frame but stays inside the viewport.
     Longest uppercase word (PROPOSALS, BUDGETING, GENERATIVE) ≈ 9-10 chars,
     so cap the vw so those single lines can't overflow the phone width. */
  .cx-slide-title {
    font-size: clamp(2.8rem, 13vw, 5rem);
    line-height: 0.92;
    letter-spacing: -0.018em;
  }
  .cx-slide-title--cover {
    font-size: clamp(3rem, 14.5vw, 5.4rem);
    line-height: 0.9;
  }
  .cx-slide-lede {
    font-size: clamp(0.98rem, 3.8vw, 1.15rem);
    line-height: 1.42;
    max-width: 100%;
  }
  .cx-slide-lede--cover {
    font-size: clamp(1.15rem, 4.2vw, 1.5rem);
    line-height: 1.2;
  }

  .cx-slide-pill {
    font-size: 0.66rem;
    letter-spacing: 0.18em;
    padding: 0.5em 1em;
  }

  .cx-slide-track-tag {
    min-width: 100%;
    width: 100%;
    max-width: 100%;
    padding: 0.95em 1.4em;
    font-size: 0.72rem;
    letter-spacing: 0.24em;
    text-align: center;
    box-sizing: border-box;
  }
  body.rtl .cx-slide-track-tag { letter-spacing: 0.1em; }

  .cx-slide-tag {
    min-width: 100%;
    width: 100%;
    padding: 0.78em 1.1em;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-align: center;
    box-sizing: border-box;
  }
  body.rtl .cx-slide-tag { letter-spacing: 0.06em; }

  .cx-slide-tracks {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .cx-slide-track-pill {
    min-width: auto;
    width: 100%;
    padding: 0.9em 1.4em;
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    box-sizing: border-box;
  }
  body.rtl .cx-slide-track-pill { letter-spacing: 0.08em; }

  .cx-slide-meta--cover {
    font-size: 0.74rem;
    letter-spacing: 0.22em;
  }
  body.rtl .cx-slide-meta--cover { letter-spacing: 0.08em; }

  .cx-slide-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    padding-top: 0.85rem;
  }
  body.rtl .cx-slide-bottom { align-items: flex-end; }

  .cx-slide-cta {
    font-size: clamp(0.85rem, 3.4vw, 1rem);
    letter-spacing: 0.1em;
    gap: 0.6em;
  }
  body.rtl .cx-slide-cta { letter-spacing: 0.02em; }

  .cx-slide-arrow { width: 24px; height: 10px; }

  .cx-slide-mark-url { font-size: 0.62rem; letter-spacing: 0.2em; }
  body.rtl .cx-slide-mark-url { letter-spacing: 0.06em; }

  /* Orbs enlarged for a stronger poster anchor — they sit as a design element
     behind the title, not decorative fluff on the edge */
  .cx-slide--cover::before,
  .cx-slide--commercial::before,
  .cx-slide--closing::before {
    top: -8vh;
    right: -22vw;
    width: min(78vh, 94vw);
    height: min(78vh, 94vw);
    opacity: 0.58;
  }
  .cx-slide--creative::before {
    top: -6vh;
    right: -20vw;
    width: min(74vh, 88vw);
    height: min(74vh, 88vw);
    opacity: 0.88;
  }
  body.rtl .cx-slide::before {
    right: auto;
    left: -22vw;
  }
  .cx-slide::after {
    bottom: -16vh;
    left: -22vw;
    width: min(52vh, 68vw);
    height: min(52vh, 68vw);
    opacity: 0.42;
  }
  body.rtl .cx-slide::after {
    left: auto;
    right: -22vw;
  }
}

/* ---------- Small mobile (≤ 480px) ---------- */
@media (max-width: 480px) {
  .cx-slide {
    padding: 72px 1.1rem 1.05rem;
  }
  .cx-slide-frame { gap: 0.8rem; }
  /* gap intentionally inherits from ≤720px rule (8rem) */

  .cx-slide-title {
    font-size: clamp(2.3rem, 11.5vw, 4rem);
    line-height: 0.94;
    letter-spacing: -0.015em;
  }
  .cx-slide-title--cover {
    font-size: clamp(2.5rem, 13vw, 4.2rem);
    line-height: 0.92;
  }
  body.rtl .cx-slide-title { letter-spacing: 0; }

  .cx-slide-lede--cover {
    font-size: clamp(1.05rem, 4.4vw, 1.35rem);
  }

  .cx-slide-track-tag { font-size: 0.66rem; padding: 0.85em 1.2em; letter-spacing: 0.2em; }
  .cx-slide-tag { font-size: 0.65rem; padding: 0.72em 1rem; }
  .cx-slide-track-pill { font-size: 0.66rem; padding: 0.85em 1.2em; }

  .cx-slide-cta { font-size: clamp(0.8rem, 3.6vw, 0.95rem); }
}

/* ---------- Very small mobile (≤ 360px) ---------- */
@media (max-width: 360px) {
  .cx-slide { padding: 68px 0.95rem 0.9rem; }
  .cx-slide-frame { gap: 0.7rem; }
  /* gap intentionally inherits from ≤720px rule (8rem) */

  .cx-slide-title { font-size: clamp(2rem, 11vw, 3rem); line-height: 0.96; }
  .cx-slide-title--cover { font-size: clamp(2.2rem, 12vw, 3.2rem); line-height: 0.94; }

  .cx-slide-brand {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
  }
  .cx-slide-brand-sep,
  .cx-slide-brand span:not(.cx-slide-brand-sep) { display: none; }
  /* Keep the diamond mark visible even when the wordmark is hidden */
  .cx-slide-count { font-size: 0.64rem; }

  .cx-slide-lede { font-size: 0.94rem; }
  .cx-slide-lede--cover { font-size: 1.02rem; }

  .cx-slide-track-tag,
  .cx-slide-tag {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
  }
}

/* ---------- Landscape phones — squeeze vertically to keep everything on-screen ---------- */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .cx-slide {
    padding: 62px 1.2rem 0.9rem;
    min-height: 100svh;
  }
  .cx-slide-frame { gap: 0.6rem; }
  .cx-slide-body { padding: 0.2rem 0; }  /* gap inherits 8rem */
  .cx-slide-title { font-size: clamp(1.8rem, 7vw, 2.8rem); line-height: 1; }
  .cx-slide-title--cover { font-size: clamp(2rem, 8vw, 3rem); }
  .cx-slide-lede { font-size: 0.9rem; line-height: 1.3; }
  .cx-slide-lede--cover { font-size: 1rem; }
  .cx-slide-track-tag { padding: 0.55em 1rem; font-size: 0.6rem; letter-spacing: 0.18em; }
  .cx-slide-tag { padding: 0.5em 1rem; font-size: 0.65rem; }
  .cx-slide-pill { padding: 0.4em 0.9em; font-size: 0.62rem; }
  .cx-slide-tracks { flex-direction: row; gap: 0.6rem; }
  .cx-slide-track-pill { padding: 0.65em 1.1em; font-size: 0.64rem; width: auto; }
  .cx-slide-bottom { flex-direction: row; padding-top: 0.55rem; }
}

/* ---------- Touch-only tweaks: neutralise :hover jumps ---------- */
@media (hover: none) {
  a.cx-slide-frame:hover { transform: none; }
  a.cx-slide-frame:hover .cx-slide-cta { gap: 0.7em; letter-spacing: 0.14em; }
  a.cx-slide-frame:hover .cx-slide-arrow { transform: none; }
  body.rtl a.cx-slide-frame:hover .cx-slide-arrow { transform: scaleX(-1); }
  a.cx-slide-frame:hover .cx-slide-track-tag {
    transform: none;
    box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.2);
  }
  /* Active press feedback replaces hover */
  a.cx-slide-frame:active { transform: translateY(-1px); }
  .cx-slide-track-pill:active { transform: translateY(-1px); }
}


/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  .cx-slide::before,
  .cx-slide::after,
  .cx-slide-cta--scroll .cx-slide-arrow {
    animation: none !important;
  }
  .cx-slide-body > *,
  .cx-slide-top,
  .cx-slide-bottom {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  html:has(.cx-deck) {
    scroll-snap-type: none;
    scroll-behavior: auto;
  }
}
