/*
 * ─────────────────────────────────────────────────────────────────────────────
 *  UPWARD JOBS — SITE REFRESH LAYER  v1.0
 *  Additive design system. Loaded AFTER style.min.css, header.css,
 *  responsive.css and app-inline.css.
 *  Never use !important here except to override legacy specificity as noted.
 * ─────────────────────────────────────────────────────────────────────────────
 */

/* ═══════════════════════════════════════════════════════════════════════════
   §1  DESIGN TOKENS
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  /* ── Brand ─────────────────────────────────────────────────────── */
  --uj-navy:         #061E36;
  --uj-navy-soft:    #0D2D4E;
  --uj-navy-muted:   #3A5068;
  --uj-green:        #8ED21F;
  --uj-green-hover:  #76B817;
  --uj-green-soft:   #F0FAE0;
  --uj-green-mint:   #EAF8F1;
  --uj-white:        #FFFFFF;
  --uj-bg:           #F6F9FC;
  --uj-border:       #DCE7EF;
  --uj-border-soft:  rgba(6, 30, 54, 0.10);

  /* ── Shadows ────────────────────────────────────────────────────── */
  --uj-shadow-sm:    0 4px 14px rgba(6, 30, 54, 0.06);
  --uj-shadow-md:    0 10px 32px rgba(6, 30, 54, 0.09);
  --uj-shadow-lg:    0 20px 56px rgba(6, 30, 54, 0.13);
  --uj-shadow-green: 0 8px 24px rgba(142, 210, 31, 0.28);

  /* ── Radius ─────────────────────────────────────────────────────── */
  --uj-radius-sm:    10px;
  --uj-radius-md:    18px;
  --uj-radius-lg:    24px;
  --uj-radius-pill:  999px;

  /* ── Motion ─────────────────────────────────────────────────────── */
  --motion-fast:   180ms;
  --motion-base:   320ms;
  --motion-slow:   650ms;
  --ease-out:      cubic-bezier(.2, .8, .2, 1);
  --ease-spring:   cubic-bezier(.2, .9, .25, 1.15);

  /* ── Layout ─────────────────────────────────────────────────────── */
  --uj-container:  min(100% - 40px, 1200px);
  --uj-section-y:  clamp(72px, 9vw, 120px);

  /* ── Typography ─────────────────────────────────────────────────── */
  --uj-h1: clamp(32px, 4.5vw, 58px);
  --uj-h2: clamp(28px, 3.8vw, 48px);
  --uj-h3: clamp(18px, 2vw, 24px);
  --uj-body: clamp(15px, 1.4vw, 17px);
  --uj-small: 14px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   §2  ACCESSIBILITY — SKIP LINK
   ═══════════════════════════════════════════════════════════════════════════ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10000;
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: var(--uj-green);
  color: var(--uj-navy) !important;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
  border-radius: 0 0 var(--uj-radius-sm) var(--uj-radius-sm);
  text-decoration: none;
  transition: top 0.2s ease;
  /* No outline needed — visible itself on focus */
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--uj-navy);
  outline-offset: 2px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   §3  SCROLL REVEAL ANIMATION — .uj-reveal system
   (Alongside existing .rv/.rvl/.rvr/.sg/.on system — no conflict)
   ═══════════════════════════════════════════════════════════════════════════ */
.uj-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity  var(--motion-slow) var(--ease-out),
    transform var(--motion-slow) var(--ease-out);
  will-change: opacity, transform;
}

.uj-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.uj-reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity  var(--motion-slow) var(--ease-out),
    transform var(--motion-slow) var(--ease-out);
  will-change: opacity, transform;
}

.uj-reveal-stagger.is-visible > *:nth-child(1)  { opacity: 1; transform: none; transition-delay: 0.04s; }
.uj-reveal-stagger.is-visible > *:nth-child(2)  { opacity: 1; transform: none; transition-delay: 0.10s; }
.uj-reveal-stagger.is-visible > *:nth-child(3)  { opacity: 1; transform: none; transition-delay: 0.17s; }
.uj-reveal-stagger.is-visible > *:nth-child(4)  { opacity: 1; transform: none; transition-delay: 0.24s; }
.uj-reveal-stagger.is-visible > *:nth-child(5)  { opacity: 1; transform: none; transition-delay: 0.31s; }
.uj-reveal-stagger.is-visible > *:nth-child(6)  { opacity: 1; transform: none; transition-delay: 0.38s; }

/* Slide in from left */
.uj-reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition:
    opacity  var(--motion-slow) var(--ease-out),
    transform var(--motion-slow) var(--ease-out);
  will-change: opacity, transform;
}
.uj-reveal-left.is-visible { opacity: 1; transform: translateX(0); }

/* Slide in from right */
.uj-reveal-right {
  opacity: 0;
  transform: translateX(24px);
  transition:
    opacity  var(--motion-slow) var(--ease-out),
    transform var(--motion-slow) var(--ease-out);
  will-change: opacity, transform;
}
.uj-reveal-right.is-visible { opacity: 1; transform: translateX(0); }

/* Photo card image reveal */
.uj-photo-reveal img {
  transform: scale(1.025);
  transition: transform 700ms var(--ease-out);
}
.uj-photo-reveal.is-visible img { transform: scale(1); }


/* ═══════════════════════════════════════════════════════════════════════════
   §4  FLOATING HERO CARD ANIMATION
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes uj-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}
.uj-hero-float {
  animation: uj-float 5.5s ease-in-out infinite;
}


/* ═══════════════════════════════════════════════════════════════════════════
   §5  SHARED LAYOUT UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Container — supplements existing .wrap and .container classes */
.uj-container {
  width: var(--uj-container);
  margin-inline: auto;
}

/* Section spacing — supplements existing .sec */
.uj-section {
  padding-block: var(--uj-section-y);
  position: relative;
}

/* Section heading group */
.uj-section-head {
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: clamp(36px, 5vw, 64px);
  text-align: center;
}

/* Eyebrow badge — supplements existing .eb */
.uj-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 16px;
  background: var(--uj-green-mint);
  border: 1px solid var(--uj-border-soft);
  border-radius: var(--uj-radius-pill);
  color: var(--uj-navy);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: 'Inter', Arial, sans-serif;
}

.uj-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--uj-green);
  animation: uj-blink 2s infinite;
}

@keyframes uj-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   §6  SHARED BUTTON SYSTEM (supplements existing .btn-* classes)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Green CTA (already covered by .btn-w / .btn-g — this is alias) */
.uj-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--uj-green);
  color: var(--uj-navy);
  border: none;
  border-radius: var(--uj-radius-pill);
  font-family: 'Inter', Arial, sans-serif;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--uj-shadow-green);
  transition: background var(--motion-base) var(--ease-out),
              transform var(--motion-base) var(--ease-out),
              box-shadow var(--motion-base) var(--ease-out);
}
.uj-btn-primary:hover {
  background: var(--uj-green-hover);
  color: var(--uj-navy);
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(142, 210, 31, 0.38);
}

/* Ghost on dark */
.uj-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  border: 1.5px solid rgba(255, 255, 255, 0.36);
  border-radius: var(--uj-radius-pill);
  font-family: 'Inter', Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: all var(--motion-base) var(--ease-out);
}
.uj-btn-ghost:hover {
  background: var(--uj-green);
  color: var(--uj-navy);
  border-color: var(--uj-green);
  transform: translateY(-2px);
}

/* Navy outline on light bg */
.uj-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: transparent;
  color: var(--uj-navy);
  border: 1.5px solid var(--uj-border);
  border-radius: var(--uj-radius-pill);
  font-family: 'Inter', Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--motion-base) var(--ease-out);
}
.uj-btn-outline:hover {
  border-color: var(--uj-green);
  color: var(--uj-green-hover);
  transform: translateY(-2px);
}


/* ═══════════════════════════════════════════════════════════════════════════
   §7  SHARED CARD COMPONENT
   ═══════════════════════════════════════════════════════════════════════════ */
.uj-card {
  background: #ffffff;
  border: 1px solid var(--uj-border);
  border-radius: var(--uj-radius-lg);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--uj-shadow-md);
  transition: transform var(--motion-base) var(--ease-out),
              box-shadow var(--motion-base) var(--ease-out),
              border-color var(--motion-base) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.uj-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--uj-shadow-lg);
  border-color: rgba(142, 210, 31, 0.30);
}

/* Icon container */
.uj-card-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--uj-green-mint);
  border: 1px solid var(--uj-border-soft);
  color: var(--uj-navy);
  font-size: 20px;
  margin-bottom: 16px;
}

/* Photo card */
.uj-photo-card {
  border-radius: var(--uj-radius-lg);
  overflow: hidden;
  position: relative;
  margin: 0;
}
.uj-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* ═══════════════════════════════════════════════════════════════════════════
   §8  SPLIT SECTION (image + copy)
   ═══════════════════════════════════════════════════════════════════════════ */
.uj-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.uj-split--reverse {
  direction: rtl;
}
.uj-split--reverse > * {
  direction: ltr;
}

@media (max-width: 900px) {
  .uj-split,
  .uj-split--reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }
  .uj-split--reverse > * {
    direction: ltr;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   §9  CTA PANEL (shared — used on multiple pages)
   ═══════════════════════════════════════════════════════════════════════════ */
.uj-cta-panel {
  background: linear-gradient(135deg, var(--uj-navy) 0%, var(--uj-navy-soft) 100%);
  border-radius: var(--uj-radius-lg);
  padding: clamp(48px, 6vw, 80px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.uj-cta-panel::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(142, 210, 31, 0.12), transparent 60%);
  pointer-events: none;
}
.uj-cta-panel h2,
.uj-cta-panel h3 {
  color: #ffffff;
  margin-bottom: 16px;
}
.uj-cta-panel p {
  color: rgba(255, 255, 255, 0.75);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: 32px;
}
.uj-cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}


/* ═══════════════════════════════════════════════════════════════════════════
   §10  FOCUS STYLES — Improve accessibility across whole site
   (supplements existing *:focus rule in style.min.css)
   ═══════════════════════════════════════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--uj-green);
  outline-offset: 3px;
}

/* Remove outline on mouse click — only show on keyboard nav */
:focus:not(:focus-visible) {
  outline: none;
}

/* Ensure header nav links are focusable */
.nav-link:focus-visible,
.header-btn:focus-visible,
.mobile-nav-link:focus-visible {
  outline: 2px solid var(--uj-green);
  outline-offset: 3px;
  border-radius: 4px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   §11  FOOTER SHARED HOVER (moved from footer inline <style>)
   ═══════════════════════════════════════════════════════════════════════════ */
.site-footer a:hover {
  color: #8ED21F !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   §12  REDUCED MOTION — Global override
   Must be LAST so it overrides all animation rules above
   ═══════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration:       0.01ms !important;
    animation-iteration-count: 1     !important;
    transition-duration:      0.01ms !important;
    scroll-behavior:          auto   !important;
  }

  /* Reveal elements should just appear immediately */
  .uj-reveal,
  .uj-reveal-left,
  .uj-reveal-right,
  .uj-reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Existing system classes */
  .rv, .rvl, .rvr, .sg > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .uj-hero-float {
    animation: none !important;
  }

  .uj-eyebrow-dot,
  .eb-dot,
  .hero-badge-dot {
    animation: none !important;
  }
}
