/* Work (2026-11-15; rebuilt 2026-11-16 twice after Jeet's reviews: "copy the inspiration", Awake's projects section,
   memory/references/website-2026-11/awake/, studied live again 11-16). Three portrait cards in a zigzag on the dark wine
   ground the hand section ends on: each card is the live site on a MacBook in its brand's own world (generated scenes,
   the real screenshots set into the screens: src/work_cards.py), and pointing at it melts in the brand itself, its
   name on its own texture, through a liquid blob that follows the cursor (Awake's gooey reveal; js/work.js). Only a
   category and the name under it; the whole card is the link. Each card floats at its own pace with the scroll and
   a glow in its brand's colour lies behind it, like light from its screen (round 4, 11-16: this replaced the marker
   line, which never quite met the services section's).
   Layout, in one word: zigzag (Solenne upper left, Établi lower right, Lista under Solenne, below Établi). */

.work {
  --soft: #A9B9C8;                            /* sky-tinted grey on dark wine: 8.9:1 */
  --card-w: clamp(300px, 27vw, 430px);
  position: relative;
  padding: var(--s9) 0 clamp(150px, 12vw, 200px);
  background: var(--ink);
  color: var(--cold);
  overflow-x: clip;                           /* the cards' glows reach past the edge; never a sideways scroll */
}
/* one chapter with the hand section: its glow and forearm stop at a straight line where it ends, so a soft fade to
   the ground is laid over its last 180 px (nothing else of the hand section lives there) */
.work::before {
  content: ""; position: absolute; left: 0; right: 0; top: -180px; height: 181px; z-index: 3; pointer-events: none;
  background: linear-gradient(rgba(42, 14, 22, 0), rgba(42, 14, 22, 0.55) 45%, var(--ink) 92%);
}
.work :focus-visible { outline-color: var(--sky); }   /* the wine ring disappears on dark wine (1.74:1) */

.work-head, .work-list { position: relative; z-index: 1; padding: 0 var(--pad); }

.work-head h2 {
  margin: 0; max-width: 13em;
  font: 500 clamp(36px, min(3.4vw, 6.2svh), 60px)/1 var(--sans);   /* the hand section's heading size */
  letter-spacing: -0.03em; text-wrap: balance;
}

/* the zigzag: each card overlaps the one before it in height, never in width; Lista stands in Solenne's column */
.work-list { display: flex; flex-direction: column; margin-top: clamp(72px, 6.5vw, 104px); }
.work-item { width: var(--card-w); scroll-margin-top: clamp(48px, 9vh, 96px); }
/* Awake's spacing, measured live (11-16): the cards stand 9% in from the left and 7% in from the right; the second
   starts 0.43 of a card's height below the first, the third 1.65 below the first (Jeet: "a bit apart") */
.work-item:nth-child(1), .work-item:nth-child(3) { align-self: flex-start; margin-left: clamp(24px, 5.6vw, 110px); }
.work-item:nth-child(2) { align-self: flex-end; margin-right: clamp(24px, 4vw, 80px); margin-top: calc(var(--card-w) * -0.74); }
.work-item:nth-child(3) { margin-top: calc(var(--card-w) * 0.28); }

.work-item { will-change: transform; }          /* js/work.js floats each card at its own pace */
.work-card { position: relative; isolation: isolate; display: block; color: inherit; border-radius: clamp(12px, 1.1vw, 16px); }
/* the glow: each brand's own light behind its card, as if from its screen; brighter while you point at it */
.work-card::before {
  content: ""; position: absolute; z-index: -1; left: -42%; right: -42%; top: -30%; height: 145%; pointer-events: none;
  background: radial-gradient(closest-side, var(--glow) 0%, var(--glow) 42%, transparent 100%);
  opacity: 0.42; transition: opacity 600ms var(--ease-out);
}
#work-solenne { --glow: rgba(232, 158, 108, 0.9); }   /* the dusk's amber */
#work-etabli { --glow: rgba(122, 142, 216, 0.9); }    /* the studio's steel blue */
#work-lista { --glow: rgba(240, 92, 52, 0.9); }       /* blood orange */
@media (hover: hover) and (pointer: fine) { .work-card:hover::before { opacity: 0.72; } }
/* the picture: Awake's portrait card; the brand underneath is revealed through a blob js/work.js draws */
.work-thumb {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 380 / 440; border-radius: clamp(12px, 1.1vw, 16px);
  background: #3B1A24;
  box-shadow: 0 36px 70px -40px rgba(0, 0, 0, 0.7);
}
.work-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.work-reveal { clip-path: circle(0 at 50% 50%); }
.work-card:focus-visible .work-reveal { clip-path: none !important; }   /* the keyboard sees the brand at once */
.work-label { display: flex; flex-direction: column; gap: 2px; margin-top: var(--s4); }
.work-cat { font-size: var(--t-small); line-height: 1.4; color: var(--soft); }
.work-name { margin: 0; font: 500 var(--t-lead)/1.25 var(--sans); letter-spacing: -0.01em; }
.work-vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- tablet and phone: the same zigzag, one card under the next ---------- */
@media (prefers-reduced-motion: reduce) { .work-card::before { transition: none; } }

@media (max-width: 1099px) {
  .work { --card-w: min(70vw, 420px); padding-bottom: 150px; }
  .work-head h2 { font-size: clamp(30px, 8.4vw, 44px); line-height: 1.02; }
  .work-list { margin-top: 64px; }
  .work-item:nth-child(1), .work-item:nth-child(3) { margin-left: 0; }
  .work-item:nth-child(2) { margin-right: 0; margin-top: 72px; }
  .work-item:nth-child(3) { margin-top: 72px; }
}

/* ---------- the line of light (2026-11-19): behind the cards, from one picture to the next (js/work.js) ---------- */
.work-line { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; overflow: visible; }
.work-line path { fill: none; stroke: #BFD9EE; stroke-opacity: 0.55; stroke-width: 1.5; stroke-linecap: round; }
.work-tip {
  position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none;
  opacity: 0; transition: opacity 250ms ease;
}
.work-tip::before, .work-tip::after { content: ""; position: absolute; border-radius: 50%; }
.work-tip::before { left: -22px; top: -22px; width: 44px; height: 44px; background: radial-gradient(closest-side, rgba(191, 217, 238, 0.55), rgba(191, 217, 238, 0)); }
.work-tip::after { left: -3px; top: -3px; width: 6px; height: 6px; background: #F3F7FA; box-shadow: 0 0 8px 2px rgba(191, 217, 238, 0.8); }
.work-list > .work-item { position: relative; z-index: 1; }   /* the cards stand in front of the line */
