/* Windal projects section. Uses Windal theme tokens (assets/src/styles/_variables.scss) and the team card pattern. */
.wp-proj {
  --w-dark: #000;
  --w-white: #fff;
  --w-light: #e4e4e4;
  --w-gray: #707372;
  --w-green: #9be3bf;
  --w-overlay: rgba(255, 255, 255, .5);
  --w-ease: cubic-bezier(.2, .7, .2, 1);
}

/* green band: theme .label-container, top padding under the fixed navbar as on the team page */
.wp-proj .wp-band { padding-top: 6rem; }
.wp-proj .label h1 { font: inherit; margin: 0; color: inherit; text-transform: inherit; letter-spacing: inherit; line-height: inherit; text-align: inherit; }

/* back link: Windal long arrow turned back + uppercase text, no button shape */
.wp-back {
  display: inline-flex; align-items: center; gap: 14px; padding: 8px 0; color: var(--w-dark);
  font-size: 1rem; text-transform: uppercase; text-decoration: none; letter-spacing: .02em;
}
.wp-back::before {
  content: ''; flex: 0 0 41px; height: 24px; background: url(../images/list-icon.svg) center / contain no-repeat;
  transform: scaleX(-1); transition: transform .3s var(--w-ease);
}
.wp-back:hover { color: var(--w-dark); }
.wp-back:hover::before { transform: scaleX(-1) translateX(6px); }

.wp-section { padding-top: 48px; padding-bottom: 64px; }
@media (max-width: 767.98px) { .wp-section { padding-top: 28px; padding-bottom: 40px; } }
.wp-section-title { font-size: 1.9rem; font-weight: 500; text-transform: uppercase; margin: 0 0 16px; }
.wp-section-title--spaced { margin-top: 56px; }
@media (max-width: 767.98px) { .wp-section-title { font-size: 1.4rem; } }

/* ---------- filter bar: underlined fields like the contact form ---------- */
.wp-fbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.wp-fbar__field { position: relative; }
.wp-fbar__toggle {
  width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 12px;
  padding: 10px 0 12px; border: 0; border-bottom: 1px solid var(--w-dark); background: none;
  color: var(--w-dark); font: inherit; text-align: left; cursor: pointer; min-height: 64px;
}
/* one label style for the whole section: small uppercase grey */
.wp-fbar__label, .wp-gallery__tags-label, .wp-seg__label, .wp-facts dt, .wp-card__count, .wp-sol__links-label {
  font-size: .75rem; font-weight: 400; text-transform: uppercase; letter-spacing: .06em; color: var(--w-gray); line-height: 1.3;
}
.wp-fbar__label { grid-column: 1; }
.wp-fbar__value { grid-column: 1; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wp-fbar__chev {
  grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 12px; height: 12px;
  border-right: 1px solid var(--w-dark); border-bottom: 1px solid var(--w-dark);
  transform: translateY(-3px) rotate(45deg); transition: transform .3s var(--w-ease);
}
.wp-fbar__toggle[aria-expanded="true"] .wp-fbar__chev { transform: translateY(3px) rotate(-135deg); }
.wp-fbar__field.has-value .wp-fbar__toggle { border-bottom-width: 2px; padding-bottom: 11px; }

.wp-fbar__panel {
  position: absolute; z-index: 20; top: 100%; left: 0; right: 0; padding: 10px 0;
  background: var(--w-white); box-shadow: 0 18px 40px rgba(0, 0, 0, .12);
  opacity: 0; transform: translateY(-6px); transition: opacity .2s var(--w-ease), transform .2s var(--w-ease);
}
.wp-fbar__panel.is-open { opacity: 1; transform: none; }
.wp-fbar__sheet-head, .wp-fbar__done { display: none; }
/* sheet action: sharp black bar with the Windal arrow, not a pill */
.wp-fbar__done {
  align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 56px; padding: 0 20px;
  border: 0; border-radius: 0; background: var(--w-dark); color: var(--w-white); font: inherit; font-size: .875rem;
  font-weight: 400; text-transform: uppercase; letter-spacing: .06em; text-align: left; cursor: pointer;
}
.wp-fbar__done::after { content: ''; flex: 0 0 30px; height: 18px; background: url(../images/close-icon.svg) center / contain no-repeat; transition: transform .3s var(--w-ease); }
.wp-fbar__done:hover::after { transform: translateX(4px); }

/* round checkbox, same outline as the consent checkbox in the contact form */
.wp-check { display: flex; align-items: center; gap: 14px; margin: 0; padding: 10px 20px; min-height: 48px; cursor: pointer; transition: background-color .15s; }
.wp-check:hover { background: var(--w-light); }
.wp-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wp-check__box {
  position: relative; flex: 0 0 22px; height: 22px; border: 1px solid var(--w-dark); border-radius: 50%;
  transition: background-color .2s var(--w-ease);
}
.wp-check__box::after {
  content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--w-green);
  transform: scale(0); transition: transform .25s var(--w-ease);
}
.wp-check input:checked + .wp-check__box { background: var(--w-dark); }
.wp-check input:checked + .wp-check__box::after { transform: scale(1); }
.wp-check input:focus-visible + .wp-check__box { outline: 2px solid var(--w-dark); outline-offset: 3px; }
.wp-check__text { flex: 1 1 auto; font-size: 1rem; line-height: 1.3; }
.wp-check__count { font-size: .75rem; color: var(--w-gray); min-width: 1.5em; text-align: right; }
.wp-check.is-empty { opacity: .4; }

/* selected filters and result line */
.wp-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-height: 40px; margin: 20px 0 24px; }
.wp-result { font-size: .75rem; font-weight: 400; text-transform: uppercase; letter-spacing: .06em; margin-right: 8px; }
.wp-active__chips { display: contents; }
.wp-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px 7px 14px; border: 0; border-radius: 0;
  background: var(--w-green); color: var(--w-dark); font: inherit; font-size: .85rem; line-height: 1.3; cursor: pointer;
  transition: background-color .2s, color .2s;
}
.wp-chip::after {
  content: ''; width: 16px; height: 16px;
  background: linear-gradient(45deg, transparent 46%, currentColor 46%, currentColor 54%, transparent 54%),
    linear-gradient(-45deg, transparent 46%, currentColor 46%, currentColor 54%, transparent 54%);
  background-size: 10px 10px; background-position: center; background-repeat: no-repeat;
}
.wp-chip:hover { background: var(--w-dark); color: var(--w-white); }
.wp-active__clear {
  border: 0; background: none; padding: 6px 4px; font: inherit; font-size: .85rem; color: var(--w-dark);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.wp-empty { padding: 32px 0; font-size: 1rem; }

.wp-sentinel { height: 1px; }

@media (max-width: 767.98px) {
  .wp-fbar { grid-template-columns: 1fr; }
  .wp-fbar__toggle { min-height: 60px; }
  /* bottom sheet on phones */
  .wp-fbar__panel {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 1100; max-height: 75vh; overflow-y: auto;
    padding: 0 0 env(safe-area-inset-bottom); box-shadow: 0 -12px 40px rgba(0, 0, 0, .2);
    transform: translateY(100%); transition: transform .3s var(--w-ease), opacity .3s;
  }
  .wp-fbar__panel.is-open { transform: none; }
  .wp-fbar__sheet-head {
    display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1;
    padding: 18px 20px 14px; background: var(--w-white); border-bottom: 1px solid var(--w-light);
    font-size: .875rem; font-weight: 400; text-transform: uppercase; letter-spacing: .06em;
  }
  .wp-fbar__done { display: flex; position: sticky; bottom: 0; margin-top: 8px; }
  .wp-check { min-height: 52px; }
  .wp-scrim { position: fixed; inset: 0; z-index: 1090; background: rgba(0, 0, 0, .4); opacity: 0; transition: opacity .3s; }
  .wp-scrim.is-open { opacity: 1; }
  body.wp-lock { overflow: hidden; }
}

/* ---------- project cards: team card overlay ---------- */
.wp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1200px) { .wp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .wp-grid { grid-template-columns: 1fr; gap: 16px; } }

.wp-card { position: relative; display: block; overflow: hidden; color: var(--w-dark); text-decoration: none; }
.wp-card:hover, .wp-card:focus { color: var(--w-dark); }
.wp-card__media { display: block; position: relative; padding-top: 80%; background: var(--w-light); overflow: hidden; }
.wp-card__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--w-ease), opacity .3s var(--w-ease);
}
.wp-card__media::after {
  content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .3) 0%, rgba(0, 0, 0, 0) 45%);
  opacity: 0; transition: opacity .6s var(--w-ease);
}
.wp-card__media img.is-swapping { opacity: 0; }

/* bar + arrow share one row, so the arrow always matches the bar height */
.wp-card__foot { position: absolute; left: 10px; right: 15px; bottom: 15px; z-index: 1; display: flex; align-items: stretch; gap: 12px; }
.wp-card__bar {
  flex: 1 1 auto; min-width: 0; min-height: 64px; display: flex; align-items: flex-start; padding-right: 16px;
  background: var(--w-overlay); -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
}
.wp-card__logo { flex: 0 0 auto; height: 52px; display: flex; align-items: flex-end; padding-left: 19px; margin-right: 10px; }
.wp-card__logo img { height: 100%; width: auto; margin-bottom: 5px; display: block; }
.wp-card__text { flex: 1 1 auto; min-width: 0; padding: 16px 0 12px; }
/* always two title lines, so every bar has the same height */
.wp-card__title { display: flex; align-items: flex-end; min-height: 2.4em; margin: 0; font-size: 1rem; font-weight: 700; text-transform: uppercase; line-height: 1.2; overflow-wrap: anywhere; }
.wp-card__meta { display: block; margin: 3px 0 0; font-size: .75rem; line-height: 1.25; }

/* black arrow square, same as the Windal slider arrows */
.wp-card__go {
  flex: 0 0 64px; min-height: 64px;
  background: rgba(0, 0, 0, .7) url(../images/close-icon.svg) center / 30px auto no-repeat;
  opacity: 0; transform: translateX(16px); transition: opacity .35s var(--w-ease), transform .35s var(--w-ease), background-color .2s;
}
.wp-card__count {
  position: absolute; top: 15px; right: 15px; z-index: 1; padding: 5px 10px;
  background: var(--w-overlay); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--w-dark);
  opacity: 0; transition: opacity .35s var(--w-ease);
}

@media (hover: hover) {
  .wp-card:hover .wp-card__media img { transform: scale(1.06); }
  .wp-card:hover .wp-card__media::after { opacity: 1; }
  .wp-card:hover .wp-card__go, .wp-card:focus-visible .wp-card__go { opacity: 1; transform: none; }
  .wp-card:hover .wp-card__count { opacity: 1; }
  .wp-card:hover .wp-card__go { background-color: rgba(0, 0, 0, .9); }
}
@media (hover: none) {
  .wp-card__go { opacity: 1; transform: none; }
}
@media (max-width: 575.98px) {
  .wp-card__foot { left: 10px; right: 10px; bottom: 10px; gap: 8px; }
  .wp-card__bar { min-height: 56px; padding-right: 12px; }
  .wp-card__logo { height: 44px; padding-left: 12px; margin-right: 8px; }
  .wp-card__text { padding: 13px 0 10px; }
  .wp-card__go { flex-basis: 48px; min-height: 56px; background-size: 24px auto; }
}

/* cards below the fold rise in when scrolled to */
.wp-card.is-pre { opacity: 0; transform: translateY(32px); }
.wp-card.is-rise { transition: opacity .8s var(--w-ease), transform .8s var(--w-ease); }

/* ---------- project page ---------- */
/* image + product row fit on a laptop screen under the header */
.wp-gallery__stage { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: max(320px, calc(100vh - 330px)); background: var(--w-light); overflow: hidden; touch-action: pan-y; }
@media (max-width: 767.98px) { .wp-gallery__stage { aspect-ratio: 4 / 3; } }
.wp-gallery__slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .5s var(--w-ease); }
.wp-gallery__slide.is-active { opacity: 1; z-index: 1; }
.wp-gallery__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wp-gallery__arrow {
  position: absolute; top: 50%; z-index: 2; width: 60px; height: 99px; margin-top: -49.5px; border: 0; padding: 0;
  background: rgba(0, 0, 0, .7) url(../images/carousel-arrow.svg) center / 22px auto no-repeat; cursor: pointer;
  transition: background-color .2s;
}
.wp-gallery__arrow:hover { background-color: rgba(0, 0, 0, .9); }
.wp-gallery__arrow--prev { left: 0; transform: scaleX(-1); }
.wp-gallery__arrow--next { right: 0; }
@media (max-width: 767.98px) {
  .wp-gallery__arrow { width: 44px; height: 64px; margin-top: -32px; background-size: 16px auto; background-color: rgba(0, 0, 0, .45); }
}
.wp-gallery__meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px 24px; margin-top: 16px; }
.wp-gallery__count { flex: 0 0 auto; font-size: 1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wp-gallery__tags { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.wp-gallery__tags.is-empty { visibility: hidden; }
.wp-gallery__tags-list { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.wp-gallery__thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; padding-bottom: 4px; }
.wp-gallery__thumb {
  flex: 0 0 auto; width: 96px; height: 72px; padding: 0; border: 0; background: var(--w-light); cursor: pointer;
  position: relative; scroll-snap-align: start; opacity: .55; transition: opacity .25s;
}
.wp-gallery__thumb::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--w-dark); transform: scaleX(0); transition: transform .3s var(--w-ease); }
.wp-gallery__thumb:hover, .wp-gallery__thumb.is-active { opacity: 1; }
.wp-gallery__thumb.is-active::after { transform: none; }
.wp-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* segmented choice for the photos of one product */
.wp-seg { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; margin-top: 14px; }
.wp-seg__label { margin-right: -6px; }
.wp-seg__item {
  border: 0; border-bottom: 1px solid transparent; background: none; padding: 6px 0; font: inherit; font-size: 1rem;
  color: var(--w-gray); cursor: pointer; transition: color .2s, border-color .2s;
}
.wp-seg__item:hover { color: var(--w-dark); }
.wp-seg__item.is-active { color: var(--w-dark); border-bottom-color: var(--w-dark); }

/* product link: bold text on a Windal green underline */
.wp-tag {
  display: inline-block; padding: 1px 0 2px; color: var(--w-dark); font-size: 1rem; font-weight: 400; line-height: 1.3;
  text-decoration: none; border-bottom: 2px solid var(--w-green); transition: border-color .2s;
}
.wp-tag:hover { color: var(--w-dark); border-bottom-color: var(--w-dark); }

/* project facts: light strip, labels like the filter fields */
.wp-facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); gap: 16px 32px; margin: 40px 0 0; padding: 22px 28px 24px; background: var(--w-light); }
.wp-facts dt { margin-bottom: 6px; }
.wp-facts dd { margin: 0; font-size: 1rem; display: flex; flex-wrap: wrap; gap: 6px 22px; }
@media (max-width: 767.98px) {
  .wp-facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 28px; padding: 18px 20px 20px; }
  .wp-facts__item--wide { grid-column: 1 / -1; }
}

/* project description from the editor */
.wp-desc { max-width: 820px; margin: 40px 0 0; font-size: 1.05rem; line-height: 1.6; }
.wp-desc > :last-child { margin-bottom: 0; }
.wp-desc h2, .wp-desc h3 { font-size: 1.4rem; font-weight: 400; text-transform: uppercase; margin: 1.6em 0 .6em; }
.wp-desc a { color: var(--w-dark); text-decoration: none; border-bottom: 2px solid var(--w-green); }
.wp-desc img { max-width: 100%; height: auto; }
@media (max-width: 767.98px) { .wp-desc { margin-top: 28px; font-size: 1rem; } }

/* solutions: home page system content, one column per solution */
.wp-solutions { padding-bottom: 64px; }
.wp-sols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; margin-top: 24px; }
.wp-sol__media { margin-bottom: 20px; aspect-ratio: 4 / 3; background: var(--w-light); overflow: hidden; }
.wp-sol__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wp-sol ul.arrow-list li { font-size: 1.1rem; }
.wp-sol__text { margin: 16px 0 0; }
@media (max-width: 991.98px) { .wp-sols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) {
  .wp-solutions { padding-bottom: 40px; }
  .wp-sols { grid-template-columns: 1fr; gap: 36px; }
  .wp-sol ul.arrow-list li { font-size: 1rem; }
}
.wp-sol__more, .wp-sol__links { margin-top: 18px; }
.wp-sol__links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; }

/* ---------- product view ---------- */
.wp-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.wp-strip__item { display: block; padding-top: 100%; position: relative; background: var(--w-light); overflow: hidden; }
.wp-strip__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--w-ease); }
.wp-strip__item:hover img { transform: scale(1.06); }
@media (max-width: 575.98px) { .wp-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; } }

@media (prefers-reduced-motion: reduce) {
  .wp-proj *, .wp-proj *::before, .wp-proj *::after { transition: none !important; animation: none !important; }
}
