/* =====================================================================
   work.css: "Our work" gallery (/work/) and case studies (/work/<slug>/).
   Sits on site.css tokens (--black, --purple, --border, ...). Motion comes from motion.css
   (data-m reveals, .m-parallax); the only motion defined here is the hover drift of the device
   frames, and it lives inside prefers-reduced-motion: no-preference + real hover devices.
   ===================================================================== */

/* ---------- hero ---------- */
.wk-hero { padding: 150px 0 40px; text-align: center; }
.wk-hero .breadcrumb { color: var(--muted-2); font-size: .78rem; margin-bottom: 22px; }
.wk-hero .breadcrumb a { color: inherit; }
.wk-hero .breadcrumb a:hover { color: var(--text); }
.wk-hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.6rem); line-height: .95; letter-spacing: -.06em; max-width: 980px; }
.wk-lede { max-width: 690px; margin: 26px auto 0; color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.13rem); line-height: 1.75; }
.wk-honest { max-width: 640px; margin: 18px auto 0; color: var(--muted-2); font-size: .86rem; line-height: 1.6; }
.wk-honest strong { color: #c9cedb; font-weight: 650; }

/* ---------- section heads ---------- */
.wk-section { padding: 70px 0; }
.wk-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px 40px; margin-bottom: 34px; }
.wk-head h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.02; letter-spacing: -.045em; max-width: 640px; }
.wk-head p { color: var(--muted); max-width: 460px; font-size: .95rem; line-height: 1.65; }

/* ---------- labels ---------- */
.wk-tag { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--border-hover); background: rgba(255,255,255,.04); color: #d7dbe4; }
.wk-tag-live { border-color: rgba(62,227,161,.3); background: rgba(62,227,161,.07); color: #bff5dd; }
.wk-tag-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(62,227,161,.18); }
.wk-tag-concept { border-color: rgba(130,87,255,.3); background: rgba(130,87,255,.08); color: #d4c9ff; }
.wk-industry { color: var(--muted); font-size: .84rem; }

/* ---------- device frames (laptop + phone) ---------- */
.wk-devices { position: relative; padding: 0 9% 7% 0; }
.wk-laptop { position: relative; }
.wk-screen { position: relative; border-radius: 12px 12px 4px 4px; padding: 2.1% 2.1% 2.6%; background: linear-gradient(180deg, #1a1d26, #11131a); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 40px 90px -30px rgba(0,0,0,.85), 0 0 0 1px rgba(0,0,0,.4) inset; }
.wk-screen::before { content: ""; position: absolute; top: .9%; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #2a2e3a; }
.wk-screen img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; border-radius: 3px; background: #0d1017; }
.wk-base { position: relative; height: 0; padding-bottom: 2.6%; margin: 0 -5.5%; border-radius: 0 0 14px 14px; background: linear-gradient(180deg, #2a2e39, #15171e); border: 1px solid rgba(255,255,255,.08); border-top: 0; }
.wk-base::before { content: ""; position: absolute; top: 0; left: 50%; width: 15%; height: 38%; transform: translateX(-50%); border-radius: 0 0 8px 8px; background: #0f1117; }
.wk-phone { position: absolute; right: 0; bottom: 0; width: 23%; padding: 1.3%; border-radius: 18% / 8.5%; background: #0d0f15; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 30px 60px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(0,0,0,.5); }
.wk-phone img { display: block; width: 100%; height: auto; aspect-ratio: 390 / 844; object-fit: cover; object-position: top center; border-radius: 15% / 7%; background: #0d1017; }
.wk-phone::before { content: ""; position: absolute; z-index: 1; top: 2.6%; left: 50%; width: 30%; height: 2.4%; transform: translateX(-50%); border-radius: 99px; background: #050609; }
.wk-glow { position: absolute; inset: 12% 8% -4%; z-index: -1; background: radial-gradient(closest-side, rgba(130,87,255,.28), transparent); filter: blur(10px); pointer-events: none; }

@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .wk-laptop, .wk-phone-wrap { transition: translate .6s var(--m-ease, cubic-bezier(.16,.8,.24,1)); }
  .wk-card:hover .wk-laptop, .wk-feature:hover .wk-laptop { translate: 0 -6px; }
  .wk-card:hover .wk-phone-wrap, .wk-feature:hover .wk-phone-wrap { translate: -6px -14px; }
}
.wk-phone-wrap { position: absolute; inset: 0; pointer-events: none; }
.wk-phone-wrap .wk-phone { pointer-events: auto; }

/* ---------- featured client work ---------- */
.wk-feature { position: relative; display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 56px; align-items: center; padding: 48px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(160deg, rgba(130,87,255,.08), rgba(255,255,255,.015) 45%, rgba(53,200,255,.035)); overflow: hidden; }
.wk-feature h3 { font-family: "Manrope", Inter, ui-sans-serif, system-ui, sans-serif; font-size: clamp(1.9rem, 3.4vw, 2.9rem); line-height: 1; letter-spacing: -.045em; margin: 18px 0 8px; }
.wk-feature p.wk-summary { color: var(--muted); margin-top: 16px; line-height: 1.7; }
.wk-facts { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.wk-facts li { position: relative; padding-left: 22px; color: #c9cedb; font-size: .92rem; line-height: 1.5; }
.wk-facts li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--purple-light); opacity: .8; }
.wk-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.wk-actions .button { min-height: 46px; }
.wk-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--purple-light); font-weight: 700; font-size: .9rem; text-decoration: none; }
.wk-link:hover { color: #c8b8ff; text-decoration: underline; text-underline-offset: 4px; }
.wk-link:focus-visible { outline: 2px solid var(--purple-light); outline-offset: 3px; border-radius: 6px; }

/* ---------- filter chips ---------- */
.wk-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.wk-chip { min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border-hover); background: rgba(255,255,255,.03); color: #c9cedb; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
.wk-chip:hover { border-color: rgba(169,141,255,.5); color: var(--text); }
.wk-chip[aria-pressed="true"] { background: rgba(130,87,255,.18); border-color: rgba(169,141,255,.6); color: #fff; }
.wk-chip:focus-visible { outline: 2px solid var(--purple-light); outline-offset: 3px; }
.wk-count { margin: -14px 0 24px; color: var(--muted-2); font-size: .82rem; min-height: 1.2em; }

/* ---------- concept grid ---------- */
.wk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; list-style: none; margin: 0; padding: 0; }
.wk-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(255,255,255,.02); overflow: hidden; transition: border-color .25s ease, background-color .25s ease; }
.wk-card:hover, .wk-card:focus-within { border-color: var(--border-hover); background: rgba(255,255,255,.03); }
.wk-card[hidden] { display: none; }
.wk-card-media { position: relative; isolation: isolate; padding: 34px 34px 26px; background: radial-gradient(120% 90% at 50% 0%, rgba(130,87,255,.12), transparent 60%), #080a0f; border-bottom: 1px solid var(--border); }
.wk-card-body { display: flex; flex-direction: column; gap: 6px; padding: 24px 26px 26px; flex: 1; }
.wk-card-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.wk-card h3 { font-family: "Manrope", Inter, ui-sans-serif, system-ui, sans-serif; font-size: 1.45rem; letter-spacing: -.03em; margin-top: 10px; }
.wk-card p { color: var(--muted); font-size: .93rem; line-height: 1.6; }
.wk-card .wk-actions { margin-top: auto; padding-top: 18px; }
.wk-card .button { padding: 12px 18px; }
.wk-empty { padding: 34px; border: 1px dashed var(--border-hover); border-radius: var(--radius); color: var(--muted); text-align: center; }

/* ---------- proof + CTA ---------- */
.wk-proof:empty { display: none; }
.wk-cta { margin: 30px auto 110px; padding: 56px 40px; text-align: center; border: 1px solid var(--border); border-radius: var(--radius); background: radial-gradient(80% 120% at 50% 0%, rgba(130,87,255,.16), transparent 70%), rgba(255,255,255,.02); }
.wk-cta h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); letter-spacing: -.045em; line-height: 1.04; max-width: 720px; margin: 0 auto; }
.wk-cta p { color: var(--muted); max-width: 560px; margin: 16px auto 0; line-height: 1.7; }
.wk-cta .hero-buttons { margin-top: 28px; }

/* ---------- case study ---------- */
.wk-case-hero { padding: 150px 0 30px; }
.wk-case-hero .breadcrumb { color: var(--muted-2); font-size: .78rem; margin-bottom: 22px; }
.wk-case-hero .breadcrumb a { color: inherit; }
.wk-case-hero .breadcrumb a:hover { color: var(--text); }
.wk-case-hero h1 { margin: 18px 0 0; font-size: clamp(2.6rem, 6vw, 5rem); line-height: .96; letter-spacing: -.06em; max-width: 900px; }
.wk-case-hero .wk-lede { margin: 22px 0 0; max-width: 680px; }
.wk-case-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; align-items: end; }
.wk-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 44px 0 0; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--border); }
.wk-meta div { padding: 18px 20px; background: #07090d; }
.wk-meta dt { color: var(--muted-2); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.wk-meta dd { margin: 6px 0 0; color: var(--text); font-weight: 600; font-size: .95rem; }
.wk-case-stage { padding: 30px 0 40px; }
.wk-case-stage .wk-devices { max-width: 1040px; margin: 0 auto; }
.wk-two { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.wk-two h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); letter-spacing: -.045em; line-height: 1.05; }
.wk-prose p { color: var(--muted); line-height: 1.75; }
.wk-prose p + p { margin-top: 14px; }
.wk-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; list-style: none; margin: 0; padding: 0; }
.wk-shot { margin: 0; }
.wk-shot-frame { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #0d1017; }
.wk-shot-frame::before { content: ""; display: block; height: 26px; border-bottom: 1px solid var(--border); background: radial-gradient(circle at 16px 13px, #3a3f4c 4px, transparent 5px), radial-gradient(circle at 30px 13px, #3a3f4c 4px, transparent 5px), radial-gradient(circle at 44px 13px, #3a3f4c 4px, transparent 5px), #11131a; }
.wk-shot img { display: block; width: 100%; height: auto; }
.wk-shot figcaption { margin-top: 10px; color: var(--muted); font-size: .86rem; }
.wk-note { margin-top: 18px; color: var(--muted-2); font-size: .8rem; line-height: 1.6; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .wk-feature { grid-template-columns: 1fr; gap: 34px; padding: 30px 24px; }
  .wk-feature .wk-devices { order: -1; }
  .wk-two, .wk-case-top { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 760px) {
  .wk-hero, .wk-case-hero { padding-top: 120px; }
  .wk-section { padding: 46px 0; }
  .wk-grid, .wk-shots { grid-template-columns: 1fr; }
  .wk-card-media { padding: 24px 20px 18px; }
  .wk-card-body { padding: 20px; }
  .wk-meta { grid-template-columns: 1fr; }
  .wk-cta { padding: 40px 22px; margin-bottom: 80px; }
  .wk-actions .button { flex: 1 1 auto; }
  .wk-phone { width: 26%; }
}

/* Privacy note inside the /work/ closing CTA */
.wk-private-note { margin: 18px auto 0; max-width: 40em; font-size: .86rem; }
