/* EXIT88 Selected Work player: one stage and one index of films and case studies (js/work-showcase.js).
   Moved verbatim from the homepage (index.html, where it is linked at the same point in the cascade) so the discipline pages
   use the same player; the homepage renders exactly as before. */
/* ===== FEATURED WORK — one stage + one index (js/work-showcase.js) ===== */
.view-case-btn{font-family:var(--font-mono);font-size:0.7rem;padding:6px 14px;border:1px solid var(--accent);color:var(--accent);letter-spacing:0.08em;text-transform:uppercase;background:transparent;transition:all var(--transition);display:inline-flex;align-items:center;gap:4px;}
.view-case-btn:hover{background:var(--accent);color:#fff;}
/* ===== SELECTED WORK: an exhibition room after the hero =====
   Its own colour marks the room (graphite by night, ivory by day; no rules between rooms), the hero's type system carries
   over, and the stage + index keep their markup and behaviour (js/work-showcase.js, unchanged).
   Locked copy: tests/work/Approved-Work-Copy-Locked.txt (data-copy-id); tests/work/work-check.mjs checks it. */
.work{
  --wk-room:#181817;--wk-ink:#E9E5DE;--wk-quiet:#9C978F;--wk-accent:#05BDB2;--wk-on-accent:#0D0D0D;
  --wk-line:rgba(233,229,222,.16);--wk-tint:rgba(233,229,222,.06);--wk-hover:rgba(233,229,222,.03);
  --wk-display:'Sofia Sans Extra Condensed','Arial Narrow','Helvetica Neue',Arial,sans-serif;
  --wk-text:'Sofia Sans','Helvetica Neue',Arial,sans-serif;
  /* The statement on one line (owner direction 2026-11-14), always smaller than the hero's question: at most .6 of the hero's
     size formula at each breakpoint below, and on phones the content width over 6.4 (the line is 6.19 sizes wide). */
  --wk-h2:min(10rem,12vw,20.4vh);
  padding:clamp(88px,11vw,160px) 0 clamp(80px,9vw,128px);background:var(--wk-room);color:var(--wk-ink);
}
html.light .work{--wk-room:#F5F3F0;--wk-ink:#0D0D0D;--wk-quiet:#5B5750;--wk-accent:#03736C;--wk-on-accent:#F5F3F0;
  --wk-line:rgba(13,13,13,.16);--wk-tint:rgba(13,13,13,.05);--wk-hover:rgba(13,13,13,.025);}
/* Header: the eyebrow and the statement across the width; the approved line in the right-hand column beneath. */
.work-header{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);column-gap:clamp(24px,4vw,72px);row-gap:clamp(28px,3.2vw,48px);margin-bottom:clamp(48px,6vw,88px);}
/* The statement runs the width on one line. */
.work-heading{grid-column:1 / -1;}
/* Eyebrow (owner direction 2026-11-15): the same shape as OUR DISCIPLINES. */
.work-eyebrow{margin:0 0 clamp(14px,1.4vw,22px);font-family:var(--wk-text);font-weight:400;font-size:clamp(.9375rem,.85rem + .3vw,1.125rem);line-height:1.2;letter-spacing:.22em;color:var(--wk-quiet);}
.work-title{margin:0;font-family:var(--wk-display);font-weight:900;font-size:var(--wk-h2);line-height:.84;letter-spacing:-.01em;white-space:nowrap;color:var(--wk-ink);font-synthesis:none;}
/* The full stop in teal: the work is the answer to the hero's question. */
.work-mark{color:var(--wk-accent);}
.work-intro{grid-column:2;}
.work-lead{margin:0;font-family:var(--wk-text);font-weight:500;font-size:clamp(1.25rem,.95rem + .8vw,1.75rem);line-height:1.3;letter-spacing:-.008em;color:var(--wk-ink);text-wrap:balance;}
/* The exhibition: one large stage (no frame; the work is the object) and its index to the right. */
.work-grid{display:grid;grid-template-columns:minmax(0,1fr) clamp(300px,25vw,360px);gap:clamp(32px,4vw,64px);align-items:start;}
.work-stage{scroll-margin-top:96px;}
.work-media{position:relative;aspect-ratio:16/9;overflow:hidden;background:#050505;}
/* By day a hairline keeps white artwork from dissolving into the ivory room. */
html.light .work-media{box-shadow:0 0 0 1px rgba(13,13,13,.08);}
/* The YouTube player sits under the planes and is never faded, transformed or animated; the planes are hidden once it is ready. */
.work-media iframe{position:absolute;inset:0;width:100%;height:100%;border:0;}
.work-planes{position:absolute;inset:0;overflow:hidden;background:#050505;isolation:isolate;}
.work-media.is-playing .work-planes{display:none;}
/* Each image is a plane. At rest it fills the stage, which clips its hairline edge and shadow; they show only while planes trade places. */
.work-layer{position:absolute;inset:0;box-shadow:0 0 0 1px rgba(255,255,255,0.1),0 24px 60px rgba(0,0,0,0.8);}
.work-layer img{width:100%;height:100%;max-width:none;object-fit:cover;}
/* Small flush tab in the bottom-left corner: the plainest corner across the project artwork at every size. */
.work-tag{position:absolute;left:0;bottom:0;font-family:var(--wk-text);font-size:.75rem;font-weight:600;line-height:1;letter-spacing:.14em;text-transform:uppercase;color:#E9E5DE;background:rgba(13,13,13,.72);padding:6px 9px;}
.work-play{position:absolute;left:50%;top:50%;width:84px;height:84px;margin:-42px 0 0 -42px;border-radius:50%;border:1px solid rgba(233,229,222,.85);background:rgba(13,13,13,.55);color:#E9E5DE;display:flex;align-items:center;justify-content:center;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);transition:transform .3s,background-color .3s,border-color .3s,color .3s;}
.work-play:hover{transform:scale(1.05);background:var(--wk-accent);border-color:var(--wk-accent);color:var(--wk-on-accent);}
.work-play:focus-visible{outline:2px solid #E9E5DE;outline-offset:4px;}
.work-play svg{width:22px;height:22px;margin-left:4px;}
/* While YouTube's player loads, the play control shows a spinner over the poster. */
.work-layer.is-loading .work-play svg{display:none;}
.work-layer.is-loading .work-play::after{content:"";width:22px;height:22px;border-radius:50%;border:2px solid rgba(233,229,222,0.3);border-top-color:#E9E5DE;animation:workSpin 0.8s linear infinite;}
@keyframes workSpin{to{transform:rotate(360deg);}}
/* Placard under the work: meta, title in the display face, one line of description, and the case link. A fixed height keeps the
   stage column, and the index beside it, the same height for every selection. */
.work-caption{display:flex;justify-content:space-between;align-items:flex-start;gap:32px;padding:clamp(20px,2vw,28px) 0 0;min-height:212px;}
.work-caption-text{min-width:0;}
.work-caption-meta{font-family:var(--wk-text);font-size:.75rem;font-weight:600;line-height:1.4;letter-spacing:.16em;text-transform:uppercase;color:var(--wk-accent);margin-bottom:10px;}
.work-caption-title{font-family:var(--wk-display);font-weight:800;font-size:clamp(1.75rem,1.1rem + 1.1vw,2.5rem);line-height:1;text-transform:uppercase;color:var(--wk-ink);margin-bottom:10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-synthesis:none;}
.work-caption-desc{font-family:var(--wk-text);font-size:1rem;line-height:1.6;color:var(--wk-quiet);max-width:66ch;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;}
.work-caption-action{flex:none;}
.work-caption-action:empty{display:none;}
/* "View Case" here reads as a quiet link like the hero's (the base .view-case-btn button style is the old archive cards'). */
.work .view-case-btn{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0;border:0;background:transparent;font-family:var(--wk-text);font-size:1rem;font-weight:700;letter-spacing:.005em;text-transform:none;color:var(--wk-ink);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:9px;text-decoration-color:var(--wk-line);white-space:nowrap;}
.work .view-case-btn:hover{background:transparent;color:var(--wk-accent);text-decoration-color:currentColor;}
/* Desktop: the whole index shows at its natural height beside the stage (no inner scroll, no item cut off at the fold). */
.work-index{display:flex;flex-direction:column;}
.work-scroll{order:1;}
.work-group{display:flex;flex-direction:column;}
.work-group--films{order:1;}
.work-group--projects{order:2;}
.work-group-head{display:flex;justify-content:space-between;padding:22px 10px 10px;font-family:var(--wk-text);font-size:.75rem;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:var(--wk-quiet);}
/* The index starts level with the top of the stage. */
.work-group--films .work-group-head{padding-top:0;}
.work-list{display:grid;gap:2px;}
.work-item{display:grid;grid-template-columns:72px minmax(0,1fr);align-items:center;gap:16px;padding:6px 10px;border:1px solid transparent;background:transparent;color:var(--wk-ink);text-align:left;min-width:0;font-family:var(--wk-text);transition:background-color .25s,border-color .25s;}
.work-thumb{position:relative;display:block;aspect-ratio:16/9;overflow:hidden;background:#050505;}
/* height:auto + its own 16:9 ratio, not height:100%: iOS 17 Safari resolved the percentage against an unsized box and grew the video strip to ~520px. */
.work-thumb img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;filter:grayscale(1);opacity:.62;transition:filter .3s,opacity .3s;}
.work-thumb-play{position:absolute;left:6px;bottom:5px;width:0;height:0;border-left:6px solid #fff;border-top:4px solid transparent;border-bottom:4px solid transparent;}
.work-thumb-dur{display:none;position:absolute;right:3px;bottom:3px;font-family:var(--wk-text);font-size:.6875rem;font-weight:600;color:#fff;background:rgba(13,13,13,.6);padding:1px 4px;}
.work-item-text{display:flex;flex-direction:column;gap:2px;min-width:0;}
.work-item-name{font-size:.9375rem;font-weight:600;line-height:1.25;letter-spacing:-.005em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:.72;transition:opacity .2s;}
.work-item-meta{font-size:.8125rem;font-weight:500;letter-spacing:.01em;color:var(--wk-quiet);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .2s;}
.work-item:hover{background:var(--wk-hover);}
.work-item:hover .work-item-name{opacity:1;}
.work-item:hover .work-thumb img{filter:grayscale(.25);opacity:1;}
.work-item[aria-current="true"]{background:var(--wk-tint);}
.work-item[aria-current="true"] .work-item-name{opacity:1;font-weight:700;}
.work-item[aria-current="true"] .work-thumb img{filter:none;opacity:1;}
.work-item[aria-current="true"] .work-item-meta{color:var(--wk-accent);}
.work-item:focus-visible{outline:2px solid var(--wk-accent);outline-offset:-2px;}
.work-all{order:3;align-self:flex-start;margin-top:20px;margin-left:10px;display:inline-flex;align-items:center;gap:8px;min-height:44px;font-family:var(--wk-text);font-size:1rem;font-weight:700;color:var(--wk-ink);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:9px;text-decoration-color:var(--wk-line);transition:color .3s,text-decoration-color .3s;}
.work-all:hover{color:var(--wk-accent);text-decoration-color:currentColor;}
.work-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;}
.cursor-native .cursor-dot,.cursor-native .cursor-ring{opacity:0;}
/* Tablet and phone: the header stacks, videos become a strip under the stage, then the case-study list. */
@media(max-width:1024px){
  .work-header{grid-template-columns:minmax(0,1fr);row-gap:24px;}
  .work-intro{grid-column:1;}
  .work-grid{grid-template-columns:minmax(0,1fr);gap:24px;}
  .work-scroll{display:contents;}
  .work-group--films{order:0;}
  .work-group-head{padding:0 0 12px;}
  .work-group--films .work-list{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;}
  .work-group--films .work-item{grid-template-columns:64px minmax(0,1fr);gap:10px;padding:6px;border-color:var(--wk-line);}
  .work-group--films .work-item-name{white-space:normal;font-size:.875rem;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}
  .work-group--films .work-meta-label{display:none;}
  .work-group--projects{margin-top:32px;}
  /* Thumbnails line up with the group heading; the padding only frames the hover and selected tint. */
  .work-group--projects .work-list{grid-template-columns:1fr 1fr;column-gap:16px;margin:0 -10px;}
  .work-all{margin-left:0;}
}
@media(max-width:640px){
  .work{padding:72px 0 80px;}
  .work-group--projects .work-list{grid-template-columns:minmax(0,1fr);}
  .work-group--films .work-item{grid-template-columns:minmax(0,1fr);gap:0;padding:3px;}
  .work-group--films .work-item-text{display:none;}
  .work-group--films .work-thumb-dur{display:block;}
  .work-grid{gap:18px;}
  /* Height reserved by js/work-showcase.js: the tallest video caption at this width. */
  .work-caption{flex-direction:column;justify-content:flex-start;gap:12px;min-height:0;}
  .work-caption-title{-webkit-line-clamp:3;}
  .work-play{width:64px;height:64px;margin:-32px 0 0 -32px;}
  .work-play svg{width:24px;height:24px;}
  .work-tag{font-size:.6875rem;padding:4px 6px;}
}
@media (max-width:1023px), (orientation:portrait){.work{--wk-h2:min(8rem,12.35vw);}}
@media (max-width:639px){.work{--wk-h2:calc((100vw - 40px) / 6.4);}}
/* Touch screens have no hover state to reveal the control, so video posters show it filled. */
@media(hover:none){
  .work-play{background:var(--wk-accent);border-color:var(--wk-accent);color:var(--wk-on-accent);box-shadow:0 6px 24px rgba(0,0,0,0.45);}
}
/* No leftover transform from the scroll reveal on the player's ancestors. */
.work .reveal.visible{transform:none;}
