/* ============================================================
   WORK EXPERIENCE detail pages (/work/<slug>) - loaded after style.css, only by
   netlify/functions/work.js. Same visual language as the Project case-study
   page (hero, .cs-section, .cs-details, .cs-related, chips) built on the
   existing tokens: --ink --ivory --muted --line --cyan --surface --display
   --mono --ease. Nothing here changes any other page.
   ============================================================ */

/* ---------- accessibility ---------- */
.we-skip{ position:absolute; left:16px; top:-64px; z-index:1200; background:var(--ivory); color:#0a0a0f; padding:12px 18px; font-family:var(--mono); font-size:12px; letter-spacing:.08em; text-transform:uppercase; transition: top .25s var(--ease); }
.we-skip:focus{ top:16px; outline:2px solid var(--cyan); outline-offset:3px; }
.we-page a:focus-visible, .we-page button:focus-visible{ outline:2px solid var(--cyan); outline-offset:4px; border-radius:4px; }
#main{ scroll-margin-top:96px; }
/* CMS text can contain a very long word or URL: wrap it instead of overflowing */
.we-page main{ overflow-wrap:anywhere; }

/* scroll reveal - without JS (or with reduced motion) everything is simply visible */
.js .we-rise{ opacity:0; transform:translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i,0) * 50ms); }
.js .we-rise.is-in{ opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce){ .js .we-rise{ opacity:1; transform:none; transition:none; } }

/* ---------- hero ---------- */
.cs-hero{ padding:150px 0 40px; }
.cs-back{ display:inline-flex; align-items:center; gap:8px; min-height:44px; font-family:var(--mono); font-size:12.5px; color:var(--muted); text-transform:uppercase; letter-spacing:.08em; margin-bottom:16px; transition: color .3s var(--ease); }
.cs-back:hover, .cs-back:focus-visible{ color:var(--cyan); }
.cs-back .ico{ display:inline-block; transform:rotate(180deg); }
.cs-eyebrow{ color:var(--cyan); font-family:var(--mono); font-size:13px; text-transform:uppercase; letter-spacing:.06em; margin-bottom:14px; }
.cs-content h1{ font-family:var(--display); font-weight:600; font-size:clamp(28px,4.2vw,46px); line-height:1.1; margin-bottom:12px; max-width:820px; }
.we-company{ color:var(--cyan); font-family:var(--mono); font-size:14px; text-transform:uppercase; letter-spacing:.06em; margin-bottom:22px; }
.cs-content > p.we-short{ color:var(--muted); font-size:15.5px; max-width:720px; margin-bottom:30px; }
.we-hero-meta{ margin:0; }
.we-cover{ margin:36px 0 0; max-width:960px; aspect-ratio:16/9; border:1px solid var(--line); border-radius:12px; overflow:hidden; background:var(--surface); }
.we-cover img{ width:100%; height:100%; object-fit:cover; display:block; }

/* role / company / date / location grid (same pattern as the project page) */
.cs-details{ display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:24px 36px; max-width:760px; padding-top:24px; border-top:1px solid var(--line); }
.cs-details dt{ font-family:var(--mono); font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); margin-bottom:6px; }
.cs-details dd{ margin:0; font-size:15.5px; }

/* ---------- body sections ---------- */
#we-body{ padding-top:20px; }
.cs-section{ margin-bottom:64px; }
.cs-section:last-child{ margin-bottom:0; }
.cs-section h2{ font-family:var(--display); font-weight:600; font-size:clamp(24px,3vw,32px); margin-bottom:18px; }
.we-rich{ max-width:760px; }
.we-rich p{ color:var(--muted); font-size:15.5px; line-height:1.75; }
.we-rich p + p, .we-rich p + ul, .we-rich p + ol, .we-rich ul + p, .we-rich ol + p{ margin-top:14px; }
.we-rich ul, .we-rich ol{ color:var(--muted); font-size:15.5px; line-height:1.75; padding-left:22px; }
.we-rich a{ color:var(--cyan); text-decoration:underline; text-underline-offset:3px; }
.cs-section .benefit-list{ max-width:760px; }

/* skills / tools chips */
.we-tools{ list-style:none; padding:0; margin:0; }

/* Selected Work: cards linking to the existing project case-study pages */
.we-projects{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:18px; max-width:860px; }
.we-pcard{ display:flex; flex-direction:column; gap:10px; height:100%; border:1px solid var(--line); border-radius:16px; padding:22px 20px; background:var(--surface); transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease); }
.we-pcard:hover, .we-pcard:focus-visible{ border-color:rgba(47,230,200,.4); transform:translateY(-3px); box-shadow:0 24px 50px -22px rgba(108,92,231,.35); }
.we-pcard-n{ font-family:var(--mono); font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); }
.we-pcard-t{ font-family:var(--display); font-weight:600; font-size:18px; line-height:1.25; }
.we-pcard-l{ margin-top:auto; padding-top:6px; font-family:var(--mono); font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--cyan); }

/* other roles + CTA (unchanged pattern) */
.cs-related{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; max-width:760px; border-top:1px solid var(--line); }
.cs-related a{ display:flex; justify-content:space-between; align-items:center; gap:18px; padding:18px 0; border-bottom:1px solid var(--line); font-family:var(--display); font-size:18px; transition: color .3s var(--ease), padding .3s var(--ease); }
.cs-related a span{ font-family:var(--mono); color:var(--muted); font-size:13px; flex-shrink:0; }
.cs-related a:hover, .cs-related a:focus-visible{ color:var(--cyan); padding-left:8px; }
.cs-cta{ display:flex; align-items:center; gap:18px; flex-wrap:wrap; padding-top:8px; }

/* ---------- not found / unavailable ---------- */
.cs-notfound{ padding:150px 0 100px; text-align:center; }
.cs-notfound .cs-eyebrow{ margin-bottom:12px; }
.cs-notfound h1{ font-family:var(--display); font-weight:600; font-size:clamp(24px,3.4vw,34px); margin-bottom:14px; }
.cs-notfound p{ color:var(--muted); margin:0 auto 26px; max-width:520px; }
.cs-notfound .we-actions{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

@media (max-width:640px){
  .cs-hero{ padding:120px 0 30px; }
  .cs-section{ margin-bottom:48px; }
  .cs-notfound{ padding:120px 0 80px; }
  .cs-related a{ padding:20px 0; font-size:17px; }
  .cs-details{ grid-template-columns:1fr 1fr; gap:20px 24px; }
}

/* ---------- /work archive (reuses the homepage .tl-row cards) ---------- */
.we-archive{ margin-bottom:20px; }
.we-archive .tl-body h2{ font-size:22px; margin-bottom:6px; }
.we-empty{ color:var(--muted); max-width:520px; }
