/* ==========================================================================
   Our Work page (/work). Scoped to #work-page.
   The project cards are the home page ones: css/projects-showcase.css and
   js/projects-showcase.js (the grid here has data-max="all", so every published
   case study shows). human.css forces paragraph colours in light sections with
   !important, so text on the dark blocks repeats its colour with !important here.
   ========================================================================== */

#work-page {
  display: block;
  background: #F5F8FD;
  font-family: var(--font-sans);
  color: #0B2239;
}

#work-page .wk-inner {
  max-width: 1440px;
}

#work-page .wk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--sec-btn-h);
  padding: 0 26px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

#work-page .wk-btn svg {
  width: 18px;
  height: 18px;
}

#work-page .wk-btn--primary {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  box-shadow: 0 14px 28px -14px rgba(37, 99, 235, 0.85);
}

#work-page .wk-btn--ghost {
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.04);
  color: #FFFFFF;
}

#work-page .wk-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

#work-page .wk-btn:focus-visible,
#work-page a:focus-visible {
  outline: 3px solid #60A5FA;
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- Top band */
#work-page .wk-top {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 480px;
  padding: 56px 0 124px;
  background: #071A38;
  color: #FFFFFF;
}

.wk-top-photo {
  position: absolute;
  z-index: -2;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  /* fade the photo's left edge into the navy so no seam shows where it starts */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
}

.wk-top-shade {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, #071A38 0%, #071A38 37%, rgba(7, 26, 56, 0.8) 50%, rgba(7, 26, 56, 0.2) 74%, rgba(7, 26, 56, 0.1) 100%),
    linear-gradient(0deg, rgba(7, 26, 56, 0.75) 0%, rgba(7, 26, 56, 0) 42%),
    linear-gradient(rgba(29, 78, 216, 0.12), rgba(29, 78, 216, 0.12));
}

#work-page .wk-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

#work-page .wk-crumbs li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #CBD5E1;
}

#work-page .wk-crumbs li + li::before {
  content: "›";
  color: #94A3B8;
}

#work-page .wk-crumbs a {
  color: #E2E8F0;
  text-decoration: none;
}

#work-page .wk-crumbs a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

#work-page .wk-top h1 {
  margin: 24px 0 0;
  font-family: var(--font-display);
  font-size: clamp(36px, calc(2.4vw + 18px), 58px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #FFFFFF;
}

#work-page .wk-top h1 span {
  display: block;
  color: #38BDF8;
}

#work-page .wk-top p.wk-lead {
  max-width: 560px;
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: #E2E8F0 !important;
}

.wk-top .wk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

/* ---------------------------------------------------------------- Numbers strip */
#work-page .wk-strip {
  position: relative;
  z-index: 2;
  margin-top: -64px;
}

.wk-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 24px 8px;
  border: 1px solid #E3EBF6;
  border-radius: 22px;
  background: #FFFFFF;
  box-shadow: 0 26px 50px -32px rgba(11, 34, 57, 0.5);
  list-style: none;
}

#work-page .wk-stats li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 4px 20px;
}

#work-page .wk-stats li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: #E2E8F0;
}

.wk-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #E8F1FD;
  color: #2563EB;
}

.wk-icon svg {
  width: 26px;
  height: 26px;
}

#work-page .wk-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  color: #071827;
}

#work-page .wk-stat-label {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  color: #475569;
}

/* ---------------------------------------------------------------- Projects (cards: projects-showcase.css) */
#work-page .pdl-section {
  margin-top: 8px;
  background: transparent;
}

/* ---------------------------------------------------------------- Closing band */
#work-page .wk-cta-wrap {
  padding: 0 0 var(--sec-pad);
}

.wk-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  padding: 36px 44px;
  border-radius: 26px;
  background:
    radial-gradient(60% 120% at 100% 100%, rgba(56, 189, 248, 0.22), rgba(56, 189, 248, 0) 70%),
    linear-gradient(120deg, #0B1F4D 0%, #12307A 60%, #1E40AF 100%);
  box-shadow: 0 30px 60px -36px rgba(7, 24, 39, 0.8);
}

#work-page .wk-cta h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, calc(1vw + 16px), 34px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.wk-cta-rule {
  width: 1px;
  height: 64px;
  background: rgba(255, 255, 255, 0.3);
}

#work-page .wk-cta p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #E2E8F0 !important;
}

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 1199px) {
  .wk-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 22px;
  }

  #work-page .wk-stats li {
    justify-content: flex-start;
  }

  #work-page .wk-stats li:nth-child(3)::before {
    display: none;
  }

  .wk-cta {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .wk-cta-rule {
    display: none;
  }

  .wk-cta p {
    grid-column: 1;
  }

  .wk-cta .wk-btn {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 959px) {
  .wk-top-photo {
    width: 100%;
    opacity: 0.4;
  }

  .wk-top-shade {
    background: linear-gradient(90deg, rgba(7, 26, 56, 0.95) 0%, rgba(7, 26, 56, 0.75) 100%);
  }
}

@media (max-width: 640px) {
  #work-page .wk-top {
    min-height: 0;
    padding: 40px 0 104px;
  }

  #work-page .wk-top p.wk-lead {
    font-size: 16.5px;
  }

  .wk-top .wk-actions .wk-btn {
    width: 100%;
  }

  .wk-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px 4px;
    row-gap: 0;
  }

  #work-page .wk-stats li {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
  }

  #work-page .wk-stats li:nth-child(n + 3) {
    border-top: 1px solid #E2E8F0;
  }

  .wk-icon {
    width: 44px;
    height: 44px;
  }

  #work-page .wk-stats strong {
    font-size: 24px;
  }

  #work-page .wk-stat-label {
    font-size: 14px;
  }

  .wk-cta {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 28px 22px;
  }

  .wk-cta .wk-btn {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  #work-page .wk-btn--primary:hover {
    transform: translateY(-2px);
  }
}
