/* file: public/assets/css/work-page.css */

[data-work-root] {
  --work-scroll: 0;
  isolation: isolate;
  z-index: 0;
}

/* Navy base — matches animated canvas fallback (work-poly-bg.js BASE) */
body[data-page='work'] {
  background-color: #040814;
}

.work-page__bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

body[data-page='work'] .grain-overlay {
  opacity: 0.04;
}

/* Content starts lower under fixed header */
.work-page__shell {
  position: relative;
  z-index: 1;
  padding-top: clamp(6.75rem, 20vh, 10.5rem);
}

@media (min-width: 768px) {
  .work-page__shell {
    padding-top: clamp(7.5rem, 22vh, 11.5rem);
  }
}

/* Fixed scroll hints — below site header (z-index 108) */
.work-page__arrows {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 100;
}

.work-page__arrow {
  pointer-events: auto;
  position: absolute;
  top: 50%;
  margin-top: 1.25rem;
  display: flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    color 0.25s ease,
    opacity 0.35s ease;
}

.work-page__arrow:hover,
.work-page__arrow:focus-visible {
  color: rgba(255, 255, 255, 0.78);
  outline: none;
}

.work-page__arrow:disabled {
  cursor: default;
  opacity: 0.22;
  color: rgba(255, 255, 255, 0.28);
}

.work-page__arrow--up {
  left: max(0.75rem, env(safe-area-inset-left, 0px));
}

.work-page__arrow--down {
  right: max(0.75rem, env(safe-area-inset-right, 0px));
}

.work-page__arrow-svg {
  width: 1.35rem;
  height: 1.35rem;
}

@media (max-width: 767px) {
  .work-page__arrows {
    display: none;
  }
}

/* Header + dropdown filter (FILTER label + title + vertical list) */
.work-page__header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 2rem;
}

@media (min-width: 768px) {
  .work-page__header {
    padding-bottom: 2.5rem;
  }
}

.work-page__filter-dropdown {
  max-width: 42rem;
}

.work-page__filter-summary {
  list-style: none;
  cursor: pointer;
}

.work-page__filter-summary::-webkit-details-marker {
  display: none;
}

.work-page__filter-summary:focus {
  outline: none;
}

.work-page__filter-summary:focus-visible .work-page__filter-title-row {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 6px;
}

.work-page__filter-kicker {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 0.62rem;
  font-weight: 200;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.work-page__filter-title-row {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.work-page__filter-title {
  font-size: clamp(1.85rem, 4.5vw, 2.85rem);
  font-weight: 200;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.96);
}

.work-page__filter-chevron {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.75);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-page__filter-dropdown[open] .work-page__filter-chevron {
  transform: rotate(180deg);
}

.work-page__filter-list {
  margin-top: 2rem;
  display: flex;
  max-width: 28rem;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.35rem;
  padding-top: 0.25rem;
  animation: work-filter-list-in 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
  .work-page__filter-list {
    gap: 1.55rem;
    margin-top: 2.25rem;
  }
}

@keyframes work-filter-list-in {
  from {
    opacity: 0;
    transform: translate3d(0, -6px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-page__filter-list {
    animation: none;
  }

  .work-page__filter-chevron {
    transition: none;
  }
}

.work-page__filter-option {
  display: block;
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  font-weight: 200;
  line-height: 1.35;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.38);
  text-decoration: none;
  transition: color 0.25s ease;
}

.work-page__filter-option:hover,
.work-page__filter-option:focus-visible {
  color: rgba(255, 255, 255, 0.72);
  outline: none;
}

.work-page__filter-option.is-active,
.work-page__filter-option[aria-current='page'] {
  color: rgba(255, 255, 255, 0.98);
}

/* Scroll-in cards — clearer motion on enter */
[data-work-reveal] {
  opacity: 0;
  transform: translate3d(0, 44px, 0);
  filter: blur(6px);
  transition:
    opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--work-reveal-i, 0) * 0.08s);
}

[data-work-reveal].is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

.work-grid-card__meta {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--work-reveal-i, 0) * 0.08s + 0.1s);
}

.work-grid-card.is-revealed .work-grid-card__meta {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
  [data-work-reveal],
  .work-grid-card__meta {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}
