/* ==========================================================================
   Selected Work reel — extracted from the standalone module.
   Global resets, html/body rules and the :root token block were dropped or
   scoped to .reel so nothing leaks into the rest of the site.
   ========================================================================== */
/* Pin the exact Futura LT ExtraBold face by name (weight 800 alone can resolve to Heavy).
     For production, add your licensed file first: url('fonts/FuturaLT-ExtraBold.woff2') format('woff2') */
  @font-face {
    font-family: 'Reel Display';
    src: local('Futura LT Extra Bold'), local('FuturaLT-ExtraBold');
    font-weight: 800;
    font-display: swap;
  }
  .reel {
    --bg: #151515;
    --title: #fff6e6;
    --ink: #fff;
    --display: 'Reel Display', 'Jost', 'Century Gothic', system-ui, sans-serif;
    --body: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  }
  .reel :focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  .reel {
    position: relative; height: 100svh; min-height: 480px; overflow: hidden;
    touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
  }
  .reel.is-dragging { cursor: grabbing; }
  /* The section carries tabindex="0" so the arrow keys can drive the arc, but it
     is a whole screen: a ring around it reads as a browser artifact, not as
     design. This rule used to set only the offset, which left the UA's own blue
     `outline: auto` painting a line 6px inside the panel edge. The controls
     inside it — arrows, CTA, chips — keep their accent ring from the rule above,
     so keyboard focus is still visible where it means something. */
  .reel:focus-visible { outline: none; }
  .reel__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

  .reel__nav { position: absolute; z-index: 3; left: clamp(20px, 4.9vw, 96px); bottom: 24px; display: flex; gap: 10px; }
  .reel__arrow {
    width: clamp(44px, 3.4vw, 60px); aspect-ratio: 1; display: grid; place-items: center;
    border: 1.5px solid rgba(255, 255, 255, .28); border-radius: 50%; background: transparent; color: #fff;
    cursor: pointer; transition: background-color .2s, border-color .2s, color .2s, transform .2s;
  }
  .reel__arrow svg { width: 42%; height: 42%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  /* The disc fills with the light and the arrow goes dark — no accent here:
     these two sit over the artwork, where an orange flash reads as part of a
     card rather than as a control. */
  .reel__arrow:hover { background: var(--title); border-color: var(--title); color: var(--bg); }
  .reel__arrow:active { transform: scale(.94); }

  /* keeps the copy readable where a bright card passes behind it; delete to drop it */
  .reel__scrim {
    position: absolute; inset: 0 auto 0 0; z-index: 1; width: min(42vw, 680px); pointer-events: none;
    background: linear-gradient(to right, rgba(21, 21, 21, .9), rgba(21, 21, 21, .72) 35%, rgba(21, 21, 21, .28) 72%, rgba(21, 21, 21, 0));
  }

  /* ---- Project copy ------------------------------------------------------- */
  .reel__copy {
    position: absolute; z-index: 2; left: clamp(20px, 4.9vw, 96px); top: clamp(28px, 7vh, 80px);
    width: min(64vw, 1100px); display: grid; pointer-events: none;
    font-family: var(--display); font-weight: 800; letter-spacing: -.04em; text-transform: uppercase; line-height: 1;
  }
  .copy { grid-area: 1 / 1; }
  .copy__client { font-size: clamp(14px, 1.9vw, 36px); color: var(--accent); }
  .copy__title { margin-top: clamp(10px, 2.3vw, 44px); font-size: clamp(40px, 6.25vw, 120px); font-weight: 800; line-height: .9; color: var(--title); }
  .copy__desc {
    max-width: min(46ch, 34vw); margin-top: clamp(14px, 1.6vw, 28px);
    font-family: var(--body); font-weight: 400; font-size: clamp(14px, 1.15vw, 22px); line-height: 1.25;
    letter-spacing: -.01em; text-transform: none; color: var(--title);
  }
  /* label / value rows: Client, Type, Role, Awards */
  .copy__meta {
    display: grid; grid-template-columns: minmax(84px, 22%) 1fr;
    gap: clamp(10px, 1vw, 18px) clamp(16px, 2.4vw, 46px);
    max-width: min(46ch, 34vw); margin-top: clamp(18px, 2.6vw, 48px);
    font-family: var(--body); font-weight: 400; font-size: clamp(12px, .95vw, 18px); line-height: 1.35;
    letter-spacing: 0; text-transform: none;
  }
  .copy__meta dt { text-transform: uppercase; letter-spacing: .04em; color: rgba(255, 255, 255, .45); }
  .copy__meta dd { color: var(--title); }

  /* every line and title word slides through its own mask */
  .m { display: block; overflow: hidden; padding-top: .12em; margin-top: -.12em; }
  .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .12em .04em 0; margin: -.12em -.04em 0; }
  .m > span, .w > span {
    display: inline-block; transform: translate3d(0, var(--enter, 110%), 0);
    transition: transform .85s cubic-bezier(.16, 1, .3, 1) calc(var(--i, 0) * 45ms);
  }
  .copy.is-active :is(.m, .w) > span { transform: none; }
  .copy.is-leaving :is(.m, .w) > span { /* keep in sync with LEAVE_MS / LEAVE_STAGGER */
    transform: translate3d(0, var(--leave, -110%), 0);
    transition: transform .4s cubic-bezier(.7, 0, .84, 0) calc(var(--i, 0) * 15ms);
  }
  .copy:not(.is-active):not(.is-leaving) { visibility: hidden; }
  .copy:not(.is-active):not(.is-leaving) :is(.m, .w) > span { transition: none; }

  /* the project list stays in the page for screen readers and search engines */
  .reel__source { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; list-style: none; }

  /* ---- Fallback without WebGL2: a scroll-snap row of cards ---------------- */
  .reel.is-fallback { cursor: auto; touch-action: auto; user-select: auto; }
  .reel.is-fallback :is(.reel__canvas, .reel__copy, .reel__nav, .reel__scrim) { display: none; }
  .reel.is-fallback .reel__source {
    position: static; width: auto; height: 100%; clip: auto; white-space: normal;
    display: flex; align-items: center; gap: 20px; padding: 0 5vw; overflow-x: auto; scroll-snap-type: x mandatory;
  }
  .reel.is-fallback .reel__source > li { flex: 0 0 min(70vw, 380px); scroll-snap-align: center; }
  .reel.is-fallback video { display: block; width: 100%; aspect-ratio: .68; object-fit: cover; border-radius: 14px; background: #222; }
  .reel.is-fallback h2 { margin-top: 12px; font: 800 22px/1 var(--display); letter-spacing: -.04em; text-transform: uppercase; }
  .reel.is-fallback :is(p, dl) { color: #aaa; font-size: 12px; }
  .reel.is-fallback dl { display: grid; grid-template-columns: 80px 1fr; gap: 2px 10px; }
  .reel.is-fallback dt { text-transform: uppercase; opacity: .6; }

  @media (max-width: 699px) {
    .reel__copy { top: 24px; width: calc(100vw - 40px); }
    .copy__title { margin-top: 8px; font-size: 40px; }
    .copy__desc { max-width: none; margin-top: 12px; font-size: 13px; }
    .copy__meta { max-width: none; margin-top: 14px; font-size: 12px; grid-template-columns: minmax(70px, 30%) 1fr; }
    .reel__scrim {
      inset: auto 0 0 0; width: auto; height: 52vh;
      background: linear-gradient(to top, rgba(21, 21, 21, .92), rgba(21, 21, 21, .6) 45%, rgba(21, 21, 21, 0));
    }
  }
