/* ==========================================================================
   Our Works page — redesigned sections (templates in blocks/works/)
   Motion lives in blocks/js/works_page.js; everything renders without it.
   ========================================================================== */

.wk-page {
  --wk-ink: #172125;
  --wk-ink-2: #1d2a2f;
  --wk-ink-3: #22323a;
  --wk-paper: #f7f5f4;
  --wk-muted: rgba(247, 245, 244, 0.66);
  --wk-faint: rgba(247, 245, 244, 0.4);
  --wk-line: rgba(247, 245, 244, 0.1);
  --wk-line-strong: rgba(247, 245, 244, 0.2);
  --wk-coral: #f0493e;
  --wk-ember: #f7722f;
  --wk-btn: linear-gradient(270deg, #ce4961 8.92%, #c94d45 84.76%);
  --wk-text-grad: linear-gradient(92deg, #f7f5f4 12%, #e8ad94 42%, #f7722f 78%);
  --wk-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wk-nav: 6.2rem; /* fixed site navbar; measured by works_page.js */
  --wk-bar: 7.4rem; /* sticky filter bar; measured by works_page.js */
  background: var(--wk-ink);
  color: var(--wk-paper);
  font-family: "Spline Sans", sans-serif;
}

.wk-page .wk-sec,
.wk-page .wk-sec > .w-container {
  position: relative;
  background: var(--wk-ink);
}

/* ---------- shared type ---------- */
.wk-page .wk-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.4rem;
  font-family: "Satoshi-Bold";
  font-size: 1.6rem;
  color: var(--wk-paper);
}
.wk-page .wk-eyebrow__dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--wk-ember);
  box-shadow: 0 0 0 0.4rem rgba(247, 114, 47, 0.18);
}
.wk-page .wk-lead {
  max-width: 60rem;
  margin-top: 2.8rem;
  font-size: 1.8rem;
  line-height: 1.6;
  color: var(--wk-muted);
}
.wk-page .wk-h2,
.wk-page .wk-h2 p {
  max-width: 96rem;
  font-family: "Satoshi-Bold";
  font-size: clamp(3rem, 3.4vw, 5.2rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--wk-paper);
}
.wk-page .wk-h2 p {
  display: inline;
  font-size: inherit !important;
}
.wk-page .wk-h2 b {
  font-weight: inherit;
  background: var(--wk-text-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.wk-page b.wk-plain,
.wk-page b.wk-plain span {
  background: none;
  -webkit-text-fill-color: currentColor;
}

/* split-text masks (built by JS) */
.wk-page .wk-w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.wk-page .wk-w > span {
  display: inline-block;
  will-change: transform;
}

/* site primary button */
.wk-page .wk-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2.4rem;
  height: 5.6rem;
  padding: 0 2.4rem 0 2.8rem;
  overflow: hidden;
  isolation: isolate;
  font-family: "Satoshi-Black";
  font-size: 1.4rem;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: var(--wk-btn);
}
.wk-page .wk-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--wk-paper);
  transform: translateY(101%);
  transition: transform 0.55s var(--wk-ease);
}
.wk-page .wk-btn svg {
  transition: transform 0.55s var(--wk-ease);
}
.wk-page .wk-btn:hover,
.wk-page .wk-btn:focus-visible {
  color: #c94d45;
}
.wk-page .wk-btn:hover::before,
.wk-page .wk-btn:focus-visible::before {
  transform: translateY(0);
}
.wk-page .wk-btn:hover svg {
  transform: translateX(0.6rem);
}
.wk-page :focus-visible {
  outline: 2px solid var(--wk-ember);
  outline-offset: 4px;
}

/* ==========================================================================
   Hero — text only, lots of air
   ========================================================================== */

.wk-hero .wk-hero__main {
  min-height: 88vh;
  min-height: 88svh;
  display: flex;
  align-items: center;
  padding-top: 16rem;
  padding-bottom: 10rem;
}
.wk-hero__copy {
  max-width: 108rem;
}
.wk-hero__title {
  font-family: "Satoshi-Bold";
  font-size: clamp(4.4rem, 6.4vw, 10.4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--wk-paper);
}
.wk-hero .wk-lead {
  max-width: 64rem;
  margin-top: 3.6rem;
  font-size: 2rem;
}
.wk-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4rem;
  margin-top: 5.6rem;
}
.wk-scrollhint {
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
  font-family: "Satoshi-Medium";
  font-size: 1.4rem;
  text-decoration: none;
  color: var(--wk-muted);
}
.wk-scrollhint__line {
  position: relative;
  width: 5.6rem;
  height: 1px;
  overflow: hidden;
  background: var(--wk-line-strong);
}
.wk-scrollhint__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--wk-ember);
  animation: wk-scan 2.4s var(--wk-ease) infinite;
}
@keyframes wk-scan {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}
.wk-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 6.4rem;
  margin: 8rem 0 0;
  padding-top: 3.2rem;
  border-top: 1px solid var(--wk-line);
}
.wk-hero__facts dt {
  font-family: "Satoshi-Bold";
  font-size: 4.2rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--wk-paper);
}
.wk-hero__facts dt.wk-hero__fact-name {
  padding-top: 1rem;
  font-size: 2rem;
  line-height: 1.2;
}
.wk-hero__facts dd {
  margin: 0.8rem 0 0;
  font-family: "Satoshi-Medium";
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wk-faint);
}

/* ==========================================================================
   Portfolio — one case study per screen
   ========================================================================== */

.wk-portfolio .wk-portfolio__main {
  padding-top: 12rem;
  padding-bottom: 14rem;
}
/* the site sets overflow-x: hidden on containers at small widths, which disables sticky */
.wk-page .wk-portfolio > .w-container {
  overflow-x: clip;
}
.wk-head {
  margin-bottom: 6.4rem;
}

/* sticky filter bar, kept quiet */
.wk-filterbar {
  position: sticky;
  top: var(--wk-bar-top, var(--wk-nav)); /* follows the navbar as it hides and returns */
  transition: top 0.2s ease; /* same timing as .navigation-wrapper's slide */
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem 3.2rem;
  margin: 0 -5.4rem;
  padding: 1.6rem 5.4rem;
  background: rgba(23, 33, 37, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--wk-line);
  border-bottom: 1px solid var(--wk-line);
}
.wk-filters {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.wk-filter {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.6rem;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: "Satoshi-Bold";
  font-size: 1.5rem;
  color: var(--wk-faint);
  transition: color 0.3s;
}
.wk-filter:hover,
.wk-filter.is-active {
  color: var(--wk-paper);
}
.wk-filter__count {
  font-family: "Satoshi-Medium";
  font-size: 1.2rem;
  color: var(--wk-faint);
}
/* underline that slides to the active filter (positioned by JS) */
.wk-filters__pill {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 0;
  height: 2px;
  width: 0;
  background: var(--wk-ember);
  transition: transform 0.5s var(--wk-ease), width 0.5s var(--wk-ease);
}
.wk-filters:not(.is-ready) .wk-filter.is-active {
  box-shadow: inset 0 -2px 0 var(--wk-ember);
}
.wk-filterbar__status {
  font-family: "Satoshi-Medium";
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
  color: var(--wk-faint);
}
.wk-filterbar__status b {
  color: var(--wk-paper);
}

/* chapters */
.wk-grid {
  display: block;
}
.wk-card {
  --accent: #2a3438;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 8rem;
  /* one case study fills the space below navbar + filter bar */
  min-height: calc(100vh - var(--wk-nav) - var(--wk-bar));
  min-height: calc(100svh - var(--wk-nav) - var(--wk-bar));
  padding: 8rem 0;
  border-bottom: 1px solid var(--wk-line);
}
.wk-card[hidden] {
  display: none;
}
.wk-card:focus-within .wk-card__title {
  text-decoration: underline;
  text-decoration-color: var(--wk-ember);
  text-underline-offset: 0.3em;
}

.wk-card__body {
  max-width: 56rem; /* not positioned: the title link's overlay must reach the whole chapter */
}
.wk-card__kicker {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin-bottom: 3.2rem;
  font-family: "Satoshi-Medium";
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wk-faint);
}
.wk-card__index {
  font-family: "Satoshi-Bold";
  color: var(--wk-ember);
}
.wk-card__tag::before {
  content: "";
  display: inline-block;
  width: 2.4rem;
  height: 1px;
  margin-right: 1.6rem;
  vertical-align: middle;
  background: var(--wk-line-strong);
}
.wk-card__title {
  margin-bottom: 2.4rem;
  font-family: "Satoshi-Bold";
  font-size: clamp(3rem, 3vw, 4.6rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--wk-paper);
}
.wk-card__link {
  color: inherit;
  text-decoration: none;
}
/* the title link covers the whole chapter, picture included */
.wk-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  cursor: pointer;
}
.wk-card__text {
  font-size: 1.8rem;
  line-height: 1.65;
  color: var(--wk-muted);
}
.wk-card__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3.2rem;
  margin: 4.8rem 0 0;
}
.wk-card__stats > div {
  padding-top: 2rem;
  border-top: 1px solid var(--wk-line);
}
.wk-card__stats dt {
  margin-bottom: 0.8rem;
  font-family: "Satoshi-Bold";
  font-size: 4.8rem;
  line-height: 1;
  color: var(--wk-paper);
  font-variant-numeric: tabular-nums;
  overflow-wrap: break-word;
}
/* word stats ("Seamless", "Explainable") read as a label, not a number */
.wk-page .wk-card__stats dt.is-word {
  font-size: 2.6rem;
  line-height: 1.4;
}
.wk-card__stats dd {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.45;
  color: var(--wk-muted);
}
.wk-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
  margin-top: 4.8rem;
  font-family: "Satoshi-Bold";
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wk-ember);
}
.wk-card__cta svg {
  transition: transform 0.45s var(--wk-ease);
}
.wk-card:hover .wk-card__cta svg {
  transform: translateX(0.8rem);
}

/* the picture: quiet frame, tinted in the case study's colour while loading */
.wk-card__media {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent) 35%, var(--wk-ink));
}
.wk-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--wk-ease);
}
.wk-card:hover .wk-card__img {
  transform: scale(1.03);
}

/* show more */
.wk-more {
  display: flex;
  justify-content: center;
  margin-top: 8rem;
}
.wk-more[hidden] {
  display: none;
}
.wk-more__btn {
  display: inline-flex;
  align-items: center;
  gap: 2rem;
  height: 5.6rem;
  padding: 0 2.8rem;
  cursor: pointer;
  font-family: "Satoshi-Black";
  font-size: 1.4rem;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
  color: var(--wk-paper);
  background: transparent;
  border: 1px solid var(--wk-line-strong);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.wk-more__btn:hover {
  background: var(--wk-paper);
  border-color: var(--wk-paper);
  color: var(--wk-ink);
}
.wk-more__btn svg {
  transition: transform 0.45s var(--wk-ease);
}
.wk-more__btn.is-less svg {
  transform: rotate(180deg);
}

/* ==========================================================================
   Testimonial
   ========================================================================== */

.wk-quote .wk-quote__main {
  padding-top: 12rem;
  padding-bottom: 14rem;
  border-top: 1px solid var(--wk-line);
}
.wk-quote__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 8rem;
  align-items: center;
  margin: 0;
}
.wk-quote__portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.wk-quote__portrait::after {
  content: "";
  position: absolute;
  inset: auto -1px -1px auto;
  width: 40%;
  height: 40%;
  border-right: 3px solid var(--wk-ember);
  border-bottom: 3px solid var(--wk-ember);
  pointer-events: none;
}
.wk-quote__img {
  position: absolute;
  top: -8%;
  left: 0;
  width: 100%;
  height: 116%;
  object-fit: cover;
  will-change: transform;
}
.wk-quote__mark {
  width: 6.4rem;
  margin-bottom: 3.2rem;
}
.wk-quote__text {
  margin: 0;
  font-family: "Satoshi-Medium";
  font-size: clamp(2.6rem, 2.6vw, 4rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--wk-paper);
}
.wk-quote__text .wk-sw {
  opacity: 0.2;
}
.wk-quote__who {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 4rem;
  padding-left: 2rem;
  border-left: 3px solid var(--wk-ember);
}
.wk-quote__who b {
  font-family: "Satoshi-Bold";
  font-size: 2rem;
  color: var(--wk-paper);
}
.wk-quote__who span {
  font-size: 1.5rem;
  color: var(--wk-muted);
}

/* ==========================================================================
   Pre-animation states (only while JS motion is active)
   ========================================================================== */

.wk-anim .wk-page [data-wk-fade] {
  opacity: 0;
}
.wk-anim .wk-page [data-wk-split] {
  visibility: hidden;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media only screen and (max-width: 1200px) {
  .wk-card {
    gap: 5.6rem;
  }
}

@media only screen and (max-width: 992px) {
  .wk-filterbar {
    margin-left: -3.6rem;
    margin-right: -3.6rem;
    padding-left: 3.6rem;
    padding-right: 3.6rem;
  }
  /* stacked: picture first, then the story; no forced full-screen height */
  .wk-card {
    grid-template-columns: 1fr;
    gap: 4rem;
    min-height: 0;
    padding: 6.4rem 0;
  }
  .wk-card__media {
    order: -1;
  }
  .wk-card__body {
    max-width: 64rem;
  }
  .wk-quote__inner {
    grid-template-columns: 1fr;
    gap: 4.8rem;
  }
  .wk-quote__portrait {
    max-width: 36rem;
  }
}

@media only screen and (max-width: 768px) {
  .wk-hero .wk-hero__main {
    min-height: 0;
    padding-top: 12rem;
    padding-bottom: 8rem;
  }
  .wk-hero .wk-lead {
    font-size: 1.7rem;
  }
  .wk-hero__actions {
    gap: 2.4rem;
  }
  .wk-hero__facts {
    gap: 2.4rem 3.2rem;
    margin-top: 5.6rem;
  }
  .wk-portfolio .wk-portfolio__main,
  .wk-quote .wk-quote__main {
    padding-top: 9rem;
    padding-bottom: 9rem;
  }
  .wk-filterbar {
    flex-wrap: nowrap;
    gap: 1.6rem;
    margin-left: 0;
    margin-right: 0;
    padding: 1rem 0;
  }
  .wk-filters {
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .wk-filterbar__status {
    flex: none;
    font-size: 1.3rem;
  }
  .wk-filters::-webkit-scrollbar {
    display: none;
  }
  .wk-filter {
    flex: none;
    padding: 1rem 1.2rem;
    font-size: 1.4rem;
  }
  .wk-card {
    gap: 3.2rem;
    padding: 4.8rem 0;
  }
  .wk-card__kicker {
    margin-bottom: 2rem;
  }
  .wk-card__title {
    font-size: 2.6rem;
  }
  .wk-card__text {
    font-size: 1.6rem;
  }
  .wk-card__stats {
    gap: 2rem;
    margin-top: 3.2rem;
  }
  .wk-card__stats dt {
    font-size: 3.6rem;
  }
  .wk-card__cta {
    margin-top: 3.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wk-page *,
  .wk-page *::before,
  .wk-page *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
