/* =========================================================
   AVOLVE Media — OUR WORK page (work.html)

   Used only by work.html. Every rule is scoped to this page
   (.work-page, or a class starting with work-), so it cannot
   change the homepage carousel, the shared navigation or the footer.
   ========================================================= */

.work-page {
  --wk-ivory: #efe1d3;       /* matched to the sculpture artwork's background */
  --wk-night: #070708;
  --wk-card: #141518;
  --wk-radius: 14px;
  --wk-gap: clamp(16px, 2vw, 28px);
}

/* Current page in the shared navigation (this page only) */
.work-page .primary-nav a[aria-current="page"] { background: var(--ink); color: var(--canvas); }
.work-page .mobile-menu a[aria-current="page"] { background: rgba(0, 0, 1, .06); font-weight: 500; }

/* ---------- One rounded frame holding hero + gallery ---------- */
.work-frame {
  position: relative;
  margin: var(--frame-gap);
  border-radius: var(--radius-frame);
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
  background: var(--wk-night);
  box-shadow:
    0 0 0 1px rgba(0, 240, 255, .28),
    0 0 18px 2px rgba(0, 240, 255, .30),
    0 0 46px 6px rgba(0, 240, 255, .16);
}

/* ---------- HERO ---------- */
.work-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(12px, 3vw, 48px);
  min-height: clamp(600px, 94vh, 1000px);
  min-height: clamp(600px, 94svh, 1000px);
  padding: calc(var(--header-h) + clamp(24px, 3vw, 48px)) var(--pad-x) clamp(84px, 8vw, 120px);
  background:
    radial-gradient(60% 55% at 18% 30%, rgba(255, 250, 244, .55), transparent 70%),
    var(--wk-ivory);
  color: var(--ink);
}
/* fine paper grain */
.work-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .22 0 0 0 0 .14 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
.work-hero__copy { position: relative; z-index: 1; }
.work-hero__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(4rem, 10.4vw, 10.6rem);
  line-height: .88;
  letter-spacing: -.035em;
}
.work-hero__line { display: block; }
.work-hero__title em { font-style: italic; }
.work-hero__lede {
  max-width: 21em;
  margin: clamp(22px, 2.4vw, 36px) 0 0;
  font-size: clamp(1.05rem, 1.55vw, 1.5rem);
  line-height: 1.4;
  color: rgba(0, 0, 1, .82);
  text-wrap: balance;
}
.work-hero__art {
  position: relative;
  display: flex;
  justify-content: center;
}
/* Layered artwork stage: back SVG, sculpture image, front SVG share one 1400 x 1355 coordinate box.
   Same outer width as before; the sculpture now fills more of it (about 15% larger on screen). */
.work-orbit {
  position: relative;
  width: min(100%, 640px);
  aspect-ratio: 876 / 848;    /* same box shape as before, so the hero height is unchanged */
  line-height: 0;
}
.work-orbit__back,
.work-orbit__front {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.work-orbit__sculpture {
  position: absolute;
  left: 2.857%;          /* 40 / 1400 */
  top: 2.777%;           /* 37.63 / 1355.25 */
  width: 90.357%;        /* 1265 / 1400 */
  height: auto;
}
.work-orbit__shadow { fill: rgba(62, 50, 40, .36); }
.work-orbit__reflection { fill: var(--cyan); opacity: .16; }
.work-orbit__glint { fill: #38383c; opacity: .78; }
.work-orbit__line {
  fill: none;
  stroke: rgba(255, 255, 255, .82);
  stroke-width: .9;
  vector-effect: non-scaling-stroke;
}
.work-orbit__line--edge { stroke: rgba(70, 72, 78, .42); stroke-width: 2.2; }
.work-orbit__path { fill: none; stroke: none; }

/* faint dotted texture, strongest at the far-right edge and fading away from it */
.work-hero::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 46%;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(46, 46, 50, .24) 1px, transparent 1.4px);
  background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 88%), linear-gradient(180deg, #000 30%, transparent 85%);
          mask-image: linear-gradient(90deg, transparent, #000 88%), linear-gradient(180deg, #000 30%, transparent 85%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}
.work-hero__explore {
  position: absolute;
  z-index: 1;
  left: var(--pad-x);
  bottom: clamp(30px, 3.4vw, 50px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: .98rem;
  text-decoration: none;
  color: var(--ink);
  text-underline-offset: 5px;
}
.work-hero__explore svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.work-hero__explore:hover { text-decoration: underline; }
.work-hero__explore:hover svg { transform: translateY(2px); }
.work-hero__explore:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 6px; }

/* ---------- GALLERY ---------- */
.work-gallery {
  position: relative;
  padding: clamp(80px, 8.4vw, 132px) var(--pad-x) clamp(88px, 9vw, 140px);
  background: var(--wk-night);
  outline: none;
}
/* restrained cyan transition from the ivory hero */
.work-gallery::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(0, 240, 255, .25), var(--cyan) 18%, var(--cyan) 82%, rgba(0, 240, 255, .25));
  box-shadow: 0 0 14px 1px rgba(0, 240, 255, .55);
}
.work-gallery::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 2px;
  height: 90px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 240, 255, .09), rgba(0, 240, 255, 0));
}

/* Desktop: 24-column grid. Portrait = 6 columns (4 per row);
   three-card rows start at column 4 so they sit centred;
   the widescreen pair (videos 14–15) takes 12 columns each, side by side.
   Rows: 01–04 | 05–07 | 08–10 | 11–13 | 14 + 15 */
.work-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 44px) var(--wk-gap);
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.work-grid__item { grid-column: span 6; margin: 0; }
.work-grid__item--wide { grid-column: span 12; }
.work-grid__item:nth-child(5),
.work-grid__item:nth-child(8),
.work-grid__item:nth-child(11) { grid-column: 4 / span 6; }

/* Card: cover + small play icon only */
.work-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  padding: 0;
  border: 0;
  border-radius: var(--wk-radius);
  overflow: hidden;
  cursor: pointer;
  color: var(--white);
  background: radial-gradient(120% 80% at 30% 20%, #1d2024, var(--wk-card) 70%);
  transition: box-shadow .35s var(--ease);
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}
.work-card--wide { aspect-ratio: 16 / 9; }
.work-card__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;     /* fills the frame without stretching */
}
.work-card.is-missing .work-card__cover { display: none; }

/* bottom gradient, shown on hover / keyboard focus */
.work-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 58%, rgba(0, 0, 1, .62));
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.work-card__play {
  position: absolute;
  z-index: 2;
  left: clamp(10px, 1.1vw, 16px);
  bottom: clamp(10px, 1.1vw, 16px);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .9);
  background: rgba(0, 0, 1, .32);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}
.work-card__play svg { width: 20px; height: 20px; margin-left: 1px; }

.work-card:hover,
.work-card:focus-visible {
  box-shadow: 0 0 0 1px rgba(0, 240, 255, .42), 0 0 34px -4px rgba(0, 240, 255, .42);
}
.work-card:hover::after,
.work-card:focus-visible::after { opacity: 1; }
.work-card:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }

/* no poster image: the card keeps its plain brand background and play icon */

/* ---------- Tablet: two portrait columns, widescreen full width ---------- */
@media (max-width: 1023px) {
  .work-hero__title { font-size: clamp(3.6rem, 11vw, 7rem); }
  .work-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 760px;
  }
  .work-grid__item,
  .work-grid__item:nth-child(5),
  .work-grid__item:nth-child(8),
  .work-grid__item:nth-child(11) { flex: 0 0 calc((100% - var(--wk-gap)) / 2); }
  .work-grid__item--wide { flex-basis: 100%; }
}

/* ---------- Mobile: copy, then sculpture; gallery stays in order ---------- */
@media (max-width: 759px) {
  .work-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: calc(var(--header-h) + 36px) 20px 92px;
  }
  .work-hero__title { font-size: clamp(3.4rem, 17vw, 5rem); }
  .work-orbit { width: min(88%, 440px); }
  .work-hero__explore { left: 20px; bottom: 28px; }
  .work-gallery { padding: 64px 20px 80px; }
  .work-grid { row-gap: 20px; }
}
@media (max-width: 359px) {
  .work-grid__item,
  .work-grid__item:nth-child(5),
  .work-grid__item:nth-child(8),
  .work-grid__item:nth-child(11) { flex-basis: min(100%, 340px); }
  .work-grid__item--wide { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .work-card, .work-card::after, .work-hero__explore svg { transition: none; }
}
