/* Created by: Eng Ahmed Elbably
   Mobile No. 01275799570 */
/* ==========================================================================
   EON25 Projects page (archive-project.php) and project pages (single-project.php)
   Rebuild of fieldoperations.net/projects and fieldoperations.net/project/high-line:
   values match the originals, each element has one pl- class. EON changes are at
   the end of this file: the EON header (logo + menu) and the EON footer, the
   project header (logo + Close), filters, and card photos that fill their frame.
   Loaded on those two pages only, after style.css.
   ========================================================================== */

/* The original uses Helvetica Now Display Bold and Text Medium (Monotype,
   licensed to Field Operations), registered at weight 400. These faces use a
   locally installed copy if there is one, otherwise the closest system cut. */
:root {
  --pl-default: #0d0d0d;
  --pl-inverse: #fff;
  --pl-secondary: #757575;
  --pl-secondary-inverse: gray;
  --pl-overlay-dark: #0006;
  --pl-overlay-dark-light: #0000001a;
  --pl-overlay-blur: #ffffffb3;
  --pl-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --pl-font-display: var(--font, "Helvetica Neue", Helvetica, Arial, sans-serif);   /* EON: the site font */
  --pl-font-text: var(--font, "Helvetica Neue", Helvetica, Arial, sans-serif);

  --inner-gutter: 12px;
  --outer-gutter: 12px;
  --grid-columns: 6;
  --custom-underline-offset: 1px;
  --custom-underline-height: 1px;

  --pl-spacing-header: 2.3125rem;
  --pl-nav-categories: 3rem;
  --pl-hero-offset: 4rem;
  --pl-spacing-1: 0.125rem;
  --pl-spacing-2: 0.25rem;
  --pl-spacing-3: 0.5rem;
  --pl-spacing-4: 0.75rem;
  --pl-spacing-5: 1rem;
  --pl-spacing-6: 1rem;
  --pl-spacing-8: 1.5rem;
  --pl-spacing-9: 2rem;
  --pl-spacing-11: 2.5rem;
  --pl-spacing-12: 3rem;
  --pl-spacing-14: 5rem;
  --pl-spacing-15: 6rem;
  --pl-spacing-18: 12rem;

  --pl-heading-01-size: 1.875rem;
  --pl-heading-01-tracking: normal;
  --pl-heading-03-size: 1.125rem;
  --pl-heading-03-tracking: 0.01em;
  --pl-body-01-size: 1rem;
}

@media (min-width: 768px) {
  :root {
    --grid-columns: 16;
    --pl-nav-categories: 2.5rem;
    --pl-spacing-11: 3rem;
    --pl-spacing-12: 4rem;
    --pl-spacing-14: 6rem;
    --pl-spacing-15: 8rem;
    --pl-spacing-18: 14rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --inner-gutter: 16px;
    --outer-gutter: 16px;
    --pl-hero-offset: 3.5rem;
    --pl-spacing-6: 1.25rem;
    --pl-spacing-8: 2rem;
    --pl-spacing-9: 2.5rem;
    --pl-spacing-11: 4rem;
    --pl-spacing-12: 5rem;
    --pl-spacing-14: 8rem;
    --pl-spacing-15: 10rem;
    --pl-spacing-18: 16rem;
    --pl-heading-01-size: 2.875rem;
    --pl-heading-01-tracking: -0.005em;
    --pl-heading-03-size: 1.5rem;
    --pl-heading-03-tracking: 0;
    --pl-body-01-size: 1.125rem;
  }
}

@media (min-width: 1599px) {
  :root {
    --pl-heading-01-size: 3.5rem;
    --pl-heading-03-size: 1.75rem;
    --pl-heading-03-tracking: -0.005em;
  }
}

@media (min-width: 2400px) {
  :root {
    --pl-heading-01-size: 4.25rem;
    --pl-heading-03-size: 2rem;
    --pl-body-01-size: 1.375rem;
  }
}

/* ---------- Base ---------- */
*,
::after,
::before {
  box-sizing: border-box;
  border: 0 solid;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  line-height: 1.5;
  font-family: var(--pl-font-text);
  -webkit-tap-highlight-color: transparent;
  background-color: var(--pl-default);
  scroll-padding-top: 1rem;
}

h1,
h2,
h3,
p {
  font-size: inherit;
  font-weight: inherit;
}

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: inherit;
}

img,
svg,
video {
  display: block;
  vertical-align: middle;
}

img,
video {
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background-color: transparent;
  border-radius: 0;
  appearance: button;
}

[hidden]:where(:not([hidden="until-found"])) {
  display: none !important;
}

[inert] {
  pointer-events: none;
  cursor: default;
}

[inert],
[inert] * {
  -webkit-user-select: none;
  user-select: none;
}

.pl-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border-width: 0;
}

/* ---------- Type ---------- */
.pl-heading-01 {
  font-family: var(--pl-font-display);
  font-weight: 500;
  font-size: var(--pl-heading-01-size);
  line-height: 105%;
  letter-spacing: var(--pl-heading-01-tracking);
}

.pl-heading-03 {
  font-family: var(--pl-font-display);
  font-weight: 400;
  font-size: var(--pl-heading-03-size);
  line-height: 110%;
  letter-spacing: var(--pl-heading-03-tracking);
}

.pl-body-01 {
  font-family: var(--pl-font-text);
  font-weight: 400;
  font-size: var(--pl-body-01-size);
  line-height: 115%;
  letter-spacing: -0.015em;
}

.pl-secondary {
  color: var(--pl-secondary);
}

/* Bold words (Short line, Quote, Text 1, Text 2: the Bold button in the "Project page" box, since 1.87.0) */
.pl-page strong {
  font-weight: 700;
}

.pl-secondary-inverse {
  color: var(--pl-secondary-inverse);
}

/* Fluid container: viewport minus the outer gutter on each side. */
.pl-container {
  width: calc(100% - 2 * var(--outer-gutter));
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Links: underline hovers and focus rings ---------- */
.pl-focus {
  outline-style: solid;
  outline-width: 0;
}

.pl-focus:focus-visible {
  outline: 2px solid var(--pl-default);
  outline-offset: 3px;
}

.pl-focus-inverse:focus-visible {
  outline-color: var(--pl-inverse) !important;
}

/* 1px underline that wipes in from the left on hover. The original declares a
   colour fade for leaving, but its minified CSS renamed the variable, so the
   line disappears instantly; leaving the property unregistered matches that. */
.pl-u,
.pl-u-group {
  --custom-underline-color: transparent;
  --pl-u-pad: max(
    var(--custom-underline-height),
    calc(var(--custom-underline-height) + var(--custom-underline-offset))
  );
  margin-bottom: calc(-1 * var(--pl-u-pad));
  padding-bottom: var(--pl-u-pad);
  background-image: linear-gradient(var(--custom-underline-color), var(--custom-underline-color));
  background-repeat: no-repeat;
  background-position: 0% calc(100% + min(0px, var(--custom-underline-offset)));
  background-size: 0% var(--custom-underline-height);
  transition:
    --custom-underline-color 0.125s ease-in,
    background-size 0s var(--pl-ease-in-out) 0.15s;
}

.pl-u:hover,
.pl-group:hover .pl-u-group {
  --custom-underline-color: currentcolor;
  background-size: 100% var(--custom-underline-height);
  transition:
    --custom-underline-color 50ms ease-in,
    background-size 0.2s var(--pl-ease-in-out);
}

/* The current item: line visible at rest; on hover it redraws from the left. */
.pl-u[data-selected="true"] {
  background-image:
    linear-gradient(currentcolor, currentcolor),
    linear-gradient(var(--custom-underline-color), var(--custom-underline-color));
  background-position:
    100% calc(100% + min(0px, var(--custom-underline-offset))),
    0% calc(100% + min(0px, var(--custom-underline-offset)));
  background-size:
    100% var(--custom-underline-height),
    0% var(--custom-underline-height);
  transition: background-size var(--pl-ease-in-out);
}

.pl-u[data-selected="true"]:hover {
  --custom-underline-color: currentcolor;
  background-image:
    linear-gradient(transparent, transparent),
    linear-gradient(var(--custom-underline-color), var(--custom-underline-color));
  background-size:
    0% var(--custom-underline-height),
    100% var(--custom-underline-height);
  transition:
    --custom-underline-color 0.25s ease-in,
    background-size 0.3s var(--pl-ease-in-out);
}

.pl-link {
  display: inline-flex;
  align-items: center;
  gap: var(--pl-spacing-2);
}

.pl-btn {
  display: flex;
  align-items: center;
  width: fit-content;
  cursor: pointer;
  transition-property: color, background-color, border-color, outline-color, text-decoration-color,
    fill, stroke;
  transition-timing-function: var(--pl-ease-in-out);
  transition-duration: 0.3s;
}

@media (hover: hover) {
  .pl-btn--hover-secondary:hover {
    color: var(--pl-secondary);
  }
}

/* ---------- Page shell ---------- */
.pl-body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: var(--pl-default);
  color: var(--pl-default);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.pl-skip {
  position: absolute;
  top: 62px;
  inset-inline-start: -999px;
  z-index: 99999;
  padding: 8px 12px;
}

.pl-skip:focus-visible {
  inset-inline-start: var(--outer-gutter);
}

.pl-page {
  display: flex;
  flex-grow: 1;
  flex-direction: column;
  background-color: var(--pl-inverse);
}

.pl-transition-page {
  display: flex;
  flex-grow: 1;
  flex-direction: column;
  height: 100%;
}

/* Page transitions: the incoming page fades in over the white page background.
   During open-project the new page is lifted above the site header (z 9999);
   afterwards it is static again, so on a directly loaded project page the
   site header stays on top, as on the original. */
.pl-transition-page.is-entering {
  opacity: 0;
}

.pl-transition-page.is-open-project {
  position: relative;
  z-index: 9999;
  transition: opacity 0.3s ease-out;
}

.pl-transition-page.is-close-project {
  transition: opacity 0.4s ease-out;
}

.pl-transition-page.is-default {
  transition: opacity 0.35s ease-out;
}

.pl-main {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  margin-top: calc(-1 * var(--pl-spacing-header));
}

.pl-main:focus {
  outline: none;
}

/* Fades in once 5% of the element is on screen (inViewport). */
.pl-reveal {
  opacity: 0;
  transition: opacity 0.3s var(--pl-ease-in-out) 0.1s;
}

.pl-reveal[data-in-viewport] {
  opacity: 1;
}

/* ---------- Page hero ---------- */
.pl-hero {
  display: flex;
  margin-top: var(--pl-spacing-18);
  padding-bottom: var(--pl-spacing-11);
}

.pl-hero__text {
  width: 100%;
  color: var(--pl-default);
  text-wrap: balance;
}

@media (min-width: 768px) {
  .pl-hero__text {
    width: calc(13 / 16 * (100% + var(--inner-gutter)) - var(--inner-gutter));
  }
}

/* ---------- Filter area (the bar itself: EON changes, below) ---------- */
.pl-cats {
  position: relative;
}

.pl-cats__watch {
  position: absolute;
  width: 100%;
  height: 1px;
  pointer-events: none;
}

.pl-cats__watch--top {
  top: 0;
}

.pl-cats__watch--bottom {
  bottom: var(--pl-spacing-header);
}

/* ---------- Project listing ---------- */
.pl-listing {
  display: flex;
  flex-direction: column;
  row-gap: var(--pl-spacing-11);
  margin-top: var(--pl-spacing-9);
}

.pl-list {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--inner-gutter);
  row-gap: var(--pl-spacing-11);
}

.pl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.pl-card:has(:focus-visible),
.pl-next:has(.pl-card__link:focus-visible) {
  outline: 2px solid var(--pl-default);
  outline-offset: 3px;
}

.pl-media {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
}

.pl-media__frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Blocks right-click saving and dragging, as on the original. */
[data-media-protected]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.pl-page img,
.pl-page video {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Images fade in once loaded. */
.pl-page img:not([data-no-reveal]) {
  opacity: 0;
  transition: opacity 0.15s cubic-bezier(0.33, 1, 0.68, 1);
}

.pl-page img:not([data-no-reveal])[data-loaded] {
  opacity: 1;
}

.pl-media__img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* EON: any cover photo fills the 3:2 card frame */
}

.pl-media__img--cover,
.pl-media__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pl-media__video {
  display: block;
  transition-property: all;
  transition-timing-function: var(--pl-ease-in-out);
  transition-duration: 0.15s;
}

/* Cover videos on the Projects page cards (since 1.91.0): the cover photo, with
   the video fading in over it while the mouse rests on the card (pl-core.js
   hoverVideo). Without a cover photo the video's first picture shows. */
.pl-hover .pl-hover__video {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s var(--pl-ease-in-out);
}

.pl-hover.is-playing .pl-hover__video,
.pl-hover--nophoto .pl-hover__video {
  opacity: 1;
}

/* Next project (project pages): hovering it zooms its media to 1.03. The Projects
   page cards have no zoom since 1.91.2 (no pl-zoom class there). */
.pl-zoom {
  transition: transform 0.5s cubic-bezier(0.28, 1, 0.5, 1);
}

.pl-group:hover .pl-zoom {
  transform: scale(1.03);
}

.pl-card__info {
  display: flex;
  flex-direction: column;
  gap: var(--inner-gutter);
  width: 100%;
  margin-top: var(--pl-spacing-3);
}

.pl-card__head {
  display: flex;
  column-gap: var(--inner-gutter);
}

.pl-card__titles {
  flex-grow: 1;
}

.pl-card__link {
  --custom-underline-offset: -3px;
}

/* The title link covers the whole card. */
.pl-card__link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.pl-card__link:focus {
  outline: none;
}

/* Cards without a description let the title block grow instead. */
.pl-card__head--grow {
  flex-grow: 1;
}

@media (min-width: 768px) {
  .pl-card__info {
    flex-direction: row;
  }

  .pl-card__head:not(.pl-card__head--grow),
  .pl-card__desc {
    width: calc(8 / 16 * (100% + var(--inner-gutter)) - var(--inner-gutter));
  }
}

@media (min-width: 1024px) {
  .pl-card--half {
    width: calc(8 / 16 * (100% + var(--inner-gutter)) - var(--inner-gutter));
  }
}

/* Play / pause button on videos. */
.pl-video-toggle {
  position: absolute;
  bottom: var(--inner-gutter);
  inset-inline-end: var(--inner-gutter);
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  cursor: pointer;
  background-color: var(--pl-overlay-dark-light);
  color: var(--pl-inverse);
  -webkit-backdrop-filter: blur(60px);
  backdrop-filter: blur(60px);
  outline-style: solid;
  outline-width: 0;
  transition-property: color, background-color, border-color, outline-color;
  transition-timing-function: var(--pl-ease-in-out);
  transition-duration: 0.3s;
}

.pl-video-toggle svg {
  width: 24px;
  height: 24px;
}

.pl-video-toggle:focus-visible {
  outline: 2px solid var(--pl-inverse) !important;
  outline-offset: 3px;
}

@media (hover: hover) {
  .pl-video-toggle:hover {
    background-color: var(--pl-overlay-dark);
    color: var(--pl-inverse);
  }
}

/* ---------- Project page ---------- */
.pl-phero__stage {
  position: relative;
  display: flex;
  align-items: flex-end;   /* EON: the project name sits at the bottom of the photo / video */
  height: calc(100svh - var(--pl-hero-offset));
}

/* a soft shade at the bottom of the photo, so the white name stays readable on light photos */
.pl-phero__stage::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  height: 40%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));
  pointer-events: none;
}

/* the project name and, under it, the city and country (since 1.84.0) */
.pl-phero__text {
  position: relative;
  z-index: 10;
  padding-inline: var(--inner-gutter);
  padding-bottom: clamp(1.25rem, 3vw, 2.5rem);
  color: var(--pl-inverse);
}

.pl-phero__place {
  margin-top: var(--pl-spacing-4);
}

.pl-phero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* Under the hero (since 1.84.0): the project details (.pl-facts), then the short line (.pl-intro), both in
   the left half on computers, then the content. Whichever comes first starts a gutter under the hero. */
.pl-intro {
  display: grid;
  gap: var(--inner-gutter);
  margin-top: var(--inner-gutter);
  margin-bottom: var(--pl-spacing-12);
}

.pl-facts + .pl-intro {
  margin-top: 0;
}

.pl-phero + div > .pl-blocks:first-child,
.pl-phero + div > .pl-next:first-child {
  margin-top: var(--inner-gutter);
}

@media (min-width: 1024px) {
  .pl-intro {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Project content blocks (full project pages) ---------- */
.pl-block-media {
  margin-bottom: var(--inner-gutter);
}

.pl-block-media .pl-media,
.pl-block-pair .pl-media {
  aspect-ratio: auto;
}

.pl-block-media .pl-media__frame,
.pl-block-pair .pl-media__frame {
  height: auto;
}

.pl-block-pair__grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  column-gap: var(--inner-gutter);
  row-gap: 0;
}

.pl-block-pair__col {
  grid-column: span var(--grid-columns) / span var(--grid-columns);
}

.pl-block-pair .pl-media {
  margin-bottom: var(--inner-gutter);
}

.pl-block-text,
.pl-block-quote {
  margin-top: var(--pl-spacing-11);
  margin-bottom: var(--pl-spacing-12);
}

/* Statement paragraphs: heading-03 type, 8 columns with one column of air on the right. */
.pl-block-text__body {
  width: 100%;
  max-width: 900px;
}

.pl-block-text__body p + p {
  margin-top: var(--pl-spacing-6);
}

.pl-block-quote__body {
  display: flex;
  flex-direction: column;
  row-gap: var(--pl-spacing-4);
  width: 100%;
  margin-left: auto;
}

.pl-block-quote__mark {
  position: absolute;
  transform: translateX(-100%);
}

/* Facts: Year / Location / Scope of Work / Size / Client / Awards, then the credits note; right under the
   hero since 1.84.0 (until then at the end of the page), in the left half on computers. */
.pl-facts {
  display: flex;
  flex-direction: column;
  row-gap: var(--pl-spacing-8);
  margin-top: var(--inner-gutter);
  margin-bottom: var(--pl-spacing-11);
}

.pl-facts__note {
  width: 100%;
  max-width: 900px;
}

.pl-facts__note p {
  padding-right: var(--inner-gutter);
}

.pl-facts__list {
  width: 100%;
}

.pl-facts__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--inner-gutter);
  padding-block: var(--pl-spacing-3);
  border-top: 1px solid #cfcfcf;
  /* column context for the label/value widths (6 on phones, 8 inside w-cols-8) */
  --pl-row-cols: 6;
}

.pl-facts__label {
  width: calc(2 / var(--pl-row-cols) * (100% + var(--inner-gutter)) - var(--inner-gutter));
}

.pl-facts__value {
  max-width: 900px;
  width: calc(4 / var(--pl-row-cols) * (100% + var(--inner-gutter)) - var(--inner-gutter));
}

.pl-facts__item {
  margin-top: var(--pl-spacing-3);
  padding-top: var(--pl-spacing-3);
  border-top: 1px solid #cfcfcf;
}

.pl-facts__item:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

@media (min-width: 768px) {
  .pl-block-pair__col {
    grid-column: span 8 / span 8;
  }

  .pl-block-text__body,
  .pl-facts__note {
    /* w-cols-8 + pr-cols-1 */
    width: calc(8 / 16 * (100% + var(--inner-gutter)) - var(--inner-gutter));
    padding-right: calc(1 / 16 * (100% + var(--inner-gutter)));
  }

  .pl-block-text__body--right {
    margin-left: auto;
  }

  .pl-block-quote__body,
  .pl-facts__list {
    width: calc(8 / 16 * (100% + var(--inner-gutter)) - var(--inner-gutter));
  }

  .pl-facts__row {
    --pl-row-cols: 8;
  }

  .pl-facts__value {
    width: calc(6 / 8 * (100% + var(--inner-gutter)) - var(--inner-gutter));
    padding-right: calc(1 / 8 * (100% + var(--inner-gutter)));
  }
}

/* Width comes from .pl-container (the original's .container[class] beats w-full). */
.pl-next {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;   /* the last part of a project page: the footer spacing is .pl-spacer */
}

.pl-next .pl-media {
  position: relative;
}

/* "Next project": a large button in the middle of the next project's photo (since 1.84.0; it was a small
   label at the top left). It opens the next project, as the photo and the name under it do. */
.pl-next__stage {
  position: relative;
}

.pl-next__btn {
  position: absolute;
  z-index: 100;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.5em 1.05em 0.55em;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  font-family: var(--pl-font-display);
  font-weight: 500;
  font-size: clamp(1.375rem, 2.6vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: #fff;
  background-color: rgba(35, 31, 32, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  text-decoration: none;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}

.pl-next__btn:hover {
  color: var(--ink, #231f20);
  background-color: #fff;
  border-color: #fff;
}

.pl-next__btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.pl-next__arrow {
  width: 0.85em;
  height: 0.85em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s;
}

.pl-next__btn:hover .pl-next__arrow {
  transform: translateX(0.2em);
}

@media (prefers-reduced-motion: reduce) {
  .pl-next__btn, .pl-next__arrow { transition: none; }
}

.pl-next__info {
  width: 100%;
  gap: var(--inner-gutter);
  margin-top: var(--pl-spacing-3);
}

/* ---------- Footer ---------- */
.pl-spacer {
  padding-top: var(--end-gap, 60px);   /* the same space above the footer on every page */
}

@media (prefers-reduced-motion: reduce) {
  *,
  ::before,
  ::after {
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 1ms !important;
  }
}

/* ==========================================================================
   EON changes
   ========================================================================== */

/* style.css makes html/body full height; here the window scrolls, as in the reference */
html.pl-html, html.pl-html body { height: auto; }
html.pl-html body { min-height: 100svh; }

/* Leaving for a project page: the page fades out first (0.35 s, as the reference) */
.pl-transition-page.is-leaving {
  opacity: 0;
  transition: opacity 0.35s ease-out;
}

/* The EON header (template-parts/site-header.php) sits on a bar that takes the
   colour of what is behind it: white on the page, dark over the footer. It hides
   while the category bar is stuck, as in the reference. The masks and the theme
   are added by projects-page.js. */
.pl-html .site-header { padding-bottom: calc(var(--pad) * 0.55); }
.pl-html .site-header > .site-logo,
.pl-html .site-header > .main-nav { position: relative; z-index: 1; }
.pl-html:not(.menu-open) .site-header[data-theme="light"] { color: var(--ink); }
.pl-html:not(.menu-open) .site-header[data-theme="dark"],
.pl-html:not(.menu-open) .site-header[data-theme="transparent"] { color: var(--text); }
.pl-header__masks { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.pl-header__mask {
  position: absolute;
  inset: 0;
  pointer-events: none;
  clip-path: inset(100% 0 100% 0);
}
.pl-header__mask--light { background-color: #fff; }
.pl-header__mask--dark { background-color: var(--ink); }
.pl-header__mask--transparent { background-color: transparent; }
.pl-html:not(.menu-open) .site-header[data-theme="light"] .pl-header__mask--light,
.pl-html:not(.menu-open) .site-header[data-theme="dark"] .pl-header__mask--dark,
.pl-html:not(.menu-open) .site-header[data-theme="transparent"] .pl-header__mask--transparent { clip-path: inset(0 0 0 0); }
/* the header fades out as the filter row reaches it, and back in (projects-page.js) */
.pl-html .site-header { transition: color 0.45s, opacity 0.3s var(--pl-ease-in-out), visibility 0.3s; }
.pl-html .site-header[data-hidden] { opacity: 0; visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .pl-html .site-header { transition: none; } }

/* The EON header is fixed above the page, so the page does not slide up under it */
.pl-main { margin-top: 0; }

/* Phone menu open: the frosted menu and the header sit above the page */
html.pl-html.menu-open .mobile-menu { z-index: 1000; }
html.pl-html.menu-open .site-header { z-index: 1001; }

.pl-card[hidden] { display: none !important; }
.pl-empty { margin-top: var(--pl-spacing-5); }

/* Filter options are buttons: they change the list, they don't lead anywhere */
button.pl-link { cursor: pointer; text-align: left; }

/* ---------- Project pages ---------- */

/* Opened from the Projects page or "Next project": the EON logo + Close replace
   the menu (as the reference's project header), and the page fades in (0.3 s). */
html:not(.is-opened) .pl-project-header { display: none; }
html.is-opened #siteHeader,
html.is-opened #mobileMenu { display: none; }
/* EON: Close on the right, on the logo's centre line (phones too, where the menu button's spacing is not wanted) */
.pl-project-header .main-nav {
  display: block;
  width: auto;
  margin-left: auto;
  margin-right: 0;
  margin-top: calc(var(--logo-sq) * .243 - var(--nav-cap) / 2 - 4px);   /* the middle of the square logo's E */
  text-align: right;
}
.pl-close { display: inline-block; padding: 4px 0; color: inherit; text-decoration: none; }
.pl-close svg.word { display: block; height: var(--nav-cap); width: auto; fill: currentColor; }
.pl-project-header a:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; }
html.is-opened [data-pl-page] { animation: pl-fade-in 0.3s ease-out both; }
@keyframes pl-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Back from a project with Close: the list fades in where it was left (0.4 s) */
html.is-closing [data-pl-page] { opacity: 0; }

/* Quote: the closing mark belongs to the text; the opening one hangs outside */
.pl-block-quote blockquote { position: relative; }

@media (prefers-reduced-motion: reduce) {
  html.is-opened [data-pl-page] { animation: none; }
}

/* Videos in the content: a light ground while they load */
.pl-blocks [data-pl-video] { background-color: #f0f0f0; }

/* ---------- Filter (Projects page) ----------
   Since 1.94.0 the lists are open, like fieldoperations.net/projects (drop-down lists
   before): "Filter", then a column per list (Services, Typology, Region): its name,
   then every choice under it in grey; the chosen one (and the one under the mouse) in
   full colour, the chosen one underlined. Each list keeps its own choice and the
   choices combine; choosing it again clears it.
   768 px and up: one row lined up under the header menu ("Filter" under the logo), at
   the top of the page (it does not follow the page down; the header stays).
   Phones: a "Filter" bar with the current choice that sticks to the top (the header
   hides meanwhile); tapping it opens the lists, one under the other, with "Show N
   projects" to close. */
.pl-filter {
  --pl-dd-text: var(--pl-default);       /* list names and the chosen choice */
  position: relative;
}

.pl-filter__bar {
  position: relative;
  z-index: 1;
  background-color: var(--pl-inverse);
}

.pl-filter__overlay { display: none; }
.pl-empty .pl-link { display: inline; }

/* "Filter" and its "Clear" (shown once something is chosen) */
.pl-filter__label {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: var(--pl-spacing-5);
  margin: 0;
}
.pl-filter__name { color: var(--pl-default); font-weight: 500; }
.pl-filter__clear { font-weight: 500; transition: color 0.15s; }
.pl-filter__clear:hover { color: var(--pl-default); }

/* A list: its name, then its choices, all in view */
.pl-dd { position: relative; min-width: 0; }
.pl-dd__name {
  margin: 0 0 var(--pl-spacing-4);
  color: var(--pl-dd-text);
  font-weight: 500;
}
.pl-dd__list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  row-gap: var(--pl-spacing-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.pl-dd__item {
  color: var(--pl-secondary);
  font-weight: 500;
  text-align: left;
  transition: color 0.15s;
}
.pl-dd__item:hover,
.pl-dd__item[data-selected="true"] { color: var(--pl-dd-text); }

/* A locked column (since 1.90.0): while a separate list such as Stage Zero is picked,
   the other columns (Typology, Region) are dimmed and cannot be used. */
.pl-dd[data-locked] { opacity: 0.35; transition: opacity 0.2s; }
.pl-dd[data-locked] .pl-dd__list { pointer-events: none; }

@media (min-width: 768px) {
  .pl-filter__toggle,
  .pl-filter__done { display: none; }

  /* One row: "Filter" under the logo (a quarter), then the lists in equal columns */
  .pl-filter__bar.pl-container { width: auto; margin: 0; padding-inline: var(--pad, 2.5rem); }
  .pl-filter__panel {
    display: grid;
    grid-template-columns: var(--pl-grid, 25% repeat(3, minmax(0, 1fr)));
    align-items: start;
    column-gap: 0;
    padding-block: var(--pl-spacing-4) var(--pl-spacing-8);
  }
  .pl-filter__group { min-width: 0; }
  .pl-filter__group--all { padding-right: var(--pl-spacing-8); }
  .pl-dd { padding-right: var(--pl-spacing-8); }
}

@media (max-width: 767.98px) {
  .pl-filter {
    position: sticky;
    top: 0;
    z-index: 999;
  }

  .pl-filter__toggle {
    display: flex;
    align-items: center;
    gap: var(--inner-gutter);
    width: 100%;
    height: var(--pl-nav-categories);
    cursor: pointer;
    text-align: left;
  }

  /* "Filter" in 2 of 6 columns, the current choice after it, a + / − on the right */
  .pl-filter__toggle > .pl-filter__name {
    flex: none;
    width: calc(2 / 6 * (100% + var(--inner-gutter)) - var(--inner-gutter));
  }

  .pl-filter__summary { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .pl-filter__sign { position: relative; flex: none; width: 11px; height: 11px; }
  .pl-filter__sign::before,
  .pl-filter__sign::after {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 11px;
    height: 1px;
    background: currentColor;
    transition: transform 0.3s var(--pl-ease-in-out);
  }
  .pl-filter__sign::after { transform: rotate(90deg); }
  .pl-filter[data-open] .pl-filter__sign::after { transform: rotate(0deg); }

  /* The lists fold open under the bar (0fr → 1fr, 300 ms) */
  .pl-filter__drop {
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows 0.3s var(--pl-ease-in-out), visibility 0s linear 0.3s;
  }

  .pl-filter[data-open] .pl-filter__drop {
    grid-template-rows: 1fr;
    visibility: visible;
    transition: grid-template-rows 0.3s var(--pl-ease-in-out);
  }

  /* the lists one under the other, each with its name and every choice */
  .pl-filter__panel {
    display: flex;
    flex-direction: column;
    gap: var(--pl-spacing-9);
    min-height: 0;
    max-height: calc(100vh - var(--pl-nav-categories));
    overflow: hidden auto;
  }

  .pl-filter[data-open] .pl-filter__panel { padding: var(--pl-spacing-5) 0 var(--pl-spacing-8); }

  .pl-filter__group--all { display: none; }   /* "Filter" is the bar itself on phones */

  .pl-filter__done { align-self: flex-start; }

  /* The projects dim under the open filter; tapping them closes it */
  .pl-filter[data-open] .pl-filter__overlay {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.85);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pl-filter__drop { transition: none !important; }
}

/* ---------- Layout: Dark (Projects → Projects Page → Layout; html.eon-dark, inc/layout.php) ----------
   The EON ink with white text, as the Practice and People pages (the filter's list names and
   chosen choices white, the other choices grey). White (the default above) is dark text on white. */
html.eon-dark.pl-html { background-color: var(--ink); }
html.eon-dark .pl-body,
html.eon-dark .pl-page { background-color: var(--ink); color: #fff; }
html.eon-dark .pl-page { --pl-secondary: rgba(255, 255, 255, 0.6); }
html.eon-dark .pl-hero__text { color: #fff; }
html.eon-dark .pl-filter { --pl-dd-text: #fff; }
html.eon-dark .pl-filter__bar { background-color: var(--ink); }
html.eon-dark .pl-filter__name,
html.eon-dark .pl-filter__clear:hover { color: #fff; }
html.eon-dark .pl-focus:focus-visible,
html.eon-dark .pl-card:has(:focus-visible),
html.eon-dark .pl-next:has(.pl-card__link:focus-visible) { outline-color: #fff; }
html.eon-dark .pl-blocks [data-pl-video] { background-color: #2E292A; }   /* videos loading */
@media (max-width: 767.98px) {
  html.eon-dark .pl-filter[data-open] .pl-filter__overlay { background-color: rgba(35, 31, 32, 0.85); }
}
