/* ==========================================================================
   Click Media | Our Work page
   Loads after app.css and contact.css (breadcrumbs). Prefix: cm-wk-
   ========================================================================== */

/* ---------- Hero ---------- */
.cm-wk-hero { position: relative; padding: calc(var(--cm-header-h) + 36px) 0 20px; }
.cm-wk-hero::before {
    content: ''; position: absolute; inset: 0 0 auto; height: 440px; z-index: -1; pointer-events: none;
    background: radial-gradient(700px 320px at 85% 0%, rgba(139, 92, 246, .16), transparent 70%), radial-gradient(500px 280px at 0% 40%, rgba(255, 77, 109, .1), transparent 70%);
}
.cm-wk-hero__row { display: grid; gap: 24px; align-items: end; }
.cm-wk-hero h1 { font-size: clamp(36px, 7.6vw, 62px); font-weight: 800; letter-spacing: -.035em; margin-bottom: 14px; max-width: 820px; }
.cm-wk-hero__lead { font-size: clamp(16.5px, 2.2vw, 18.5px); max-width: 600px; margin: 0; }
.cm-wk-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cm-wk-stats li { padding: 16px 18px; border-radius: 18px; background: var(--cm-surface); box-shadow: var(--cm-shadow-sm), inset 0 0 0 1px var(--cm-line); }
.cm-wk-stats strong { display: block; font-family: var(--cm-display); font-size: clamp(26px, 5vw, 34px); line-height: 1; color: var(--cm-ink); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.cm-wk-stats span { font-size: 13px; font-weight: 600; color: var(--cm-muted); }

/* ---------- Filter ---------- */
.cm-wk-projects { padding: 20px 0 40px; }
.cm-wk-filter {
    position: sticky; top: 10px; z-index: 20; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; width: max-content; max-width: 100%;
    padding: 6px; margin-bottom: 24px; border-radius: 999px; background: rgba(255, 255, 255, .88); backdrop-filter: blur(14px);
    box-shadow: var(--cm-shadow-sm), inset 0 0 0 1px var(--cm-line); transition: top .45s var(--cm-ease);
}
body:has(.cm-header.is-scrolled:not(.is-hidden)) .cm-wk-filter { top: 74px; }
.cm-wk-filter::-webkit-scrollbar { display: none; }
.cm-wk-filter__btn { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--cm-ink-2); transition: background .25s, color .25s; }
.cm-wk-filter__btn span { min-width: 22px; padding: 1px 7px; border-radius: 999px; font-size: 12px; background: var(--cm-bg-2); color: var(--cm-muted); }
.cm-wk-filter__btn:hover { background: var(--cm-bg); color: var(--cm-ink); }
.cm-wk-filter__btn.is-active { background: var(--cm-ink); color: #fff; }
.cm-wk-filter__btn.is-active span { background: rgba(255, 255, 255, .2); color: #fff; }

/* ---------- Grid + cards ---------- */
.cm-wk-grid { display: grid; gap: 18px; }
.cm-wk-card { animation: cm-wk-in .6s var(--cm-ease) both; }
.cm-wk-card.is-hidden { display: none; }
.cm-wk-card__btn {
    display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; text-align: left; border-radius: var(--cm-r-lg); overflow: hidden;
    background: var(--cm-surface); box-shadow: var(--cm-shadow-sm), inset 0 0 0 1px var(--cm-line); cursor: pointer;
    transition: transform .5s var(--cm-ease), box-shadow .5s var(--cm-ease);
}
.cm-wk-card__btn:hover { transform: translateY(-6px); box-shadow: var(--cm-shadow), inset 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent); }
.cm-wk-card__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--cm-bg-2); }
.cm-wk-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--cm-ease); }
.cm-wk-card__btn:hover .cm-wk-card__media img { transform: scale(1.06); }
.cm-wk-card__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(13, 11, 31, .55)); }
.cm-wk-card__stat { position: absolute; left: 14px; bottom: 14px; z-index: 1; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); box-shadow: var(--cm-shadow-sm); }
.cm-wk-card__stat strong { display: block; font-family: var(--cm-display); font-size: 22px; line-height: 1; color: var(--cm-ink); }
.cm-wk-card__stat small { display: block; font-size: 11.5px; font-weight: 600; color: var(--cm-muted); margin-top: 2px; }
.cm-wk-card__open { position: absolute; top: 14px; right: 14px; z-index: 1; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--cm-ink); font-size: 14px; transform: scale(.8); opacity: 0; transition: transform .4s var(--cm-ease), opacity .3s; }
.cm-wk-card__btn:hover .cm-wk-card__open, .cm-wk-card__btn:focus-visible .cm-wk-card__open { transform: none; opacity: 1; }
.cm-wk-card__body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.cm-wk-card__brand { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--cm-muted); margin-bottom: 8px; }
.cm-wk-card__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.cm-wk-card__title { display: block; font-family: var(--cm-display); font-weight: 700; font-size: 21px; line-height: 1.2; color: var(--cm-ink); margin-bottom: 6px; letter-spacing: -.01em; }
.cm-wk-card__summary { display: block; flex: 1; font-size: 15px; color: var(--cm-ink-2); margin-bottom: 14px; }
.cm-wk-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-wk-card__tags em { display: inline-flex; align-items: center; gap: 6px; font-style: normal; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--cm-bg); color: var(--cm-ink); }
.cm-wk-empty { text-align: center; padding: 30px 0; font-weight: 600; }

/* ---------- CTA ---------- */
.cm-wk-cta__panel { position: relative; overflow: hidden; padding: 40px 24px; border-radius: var(--cm-r-xl); background: var(--cm-grad); color: rgba(255, 255, 255, .88); text-align: center; }
.cm-wk-cta__panel::after { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; right: -150px; top: -200px; background: rgba(255, 255, 255, .14); pointer-events: none; }
.cm-wk-cta__brands { font-family: var(--cm-display); font-weight: 700; font-size: clamp(14px, 1.8vw, 16px); letter-spacing: .02em; color: rgba(255, 255, 255, .7); margin-bottom: 20px; }
.cm-wk-cta__panel h2 { color: #fff; font-size: clamp(28px, 5vw, 42px); margin-bottom: 10px; }
.cm-wk-cta__panel > p:not(.cm-wk-cta__brands) { max-width: 520px; margin: 0 auto 24px; font-size: 17px; }
.cm-wk-cta__btns { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- Sheet (right panel on desktop, bottom sheet on mobile) ---------- */
.cm-wk-sheet {
    padding: 0; border: 0; margin: auto 0 0; width: 100%; max-width: 100%; height: 92dvh; max-height: 92dvh;
    border-radius: 26px 26px 0 0; background: var(--cm-surface); box-shadow: 0 -20px 60px rgba(13, 11, 31, .25); overflow: hidden;
}
.cm-wk-sheet::backdrop { background: rgba(13, 11, 31, .5); backdrop-filter: blur(4px); }
.cm-wk-sheet[open] { animation: cm-wk-up .5s var(--cm-ease); }
.cm-wk-sheet.is-closing { animation: cm-wk-down .35s var(--cm-ease) forwards; }
.cm-wk-sheet__inner { display: flex; flex-direction: column; height: 100%; }
.cm-wk-sheet__bar { position: relative; display: flex; align-items: center; gap: 8px; padding: 18px 16px 12px; border-bottom: 1px solid var(--cm-line); }
.cm-wk-sheet__grab { position: absolute; top: 7px; left: 50%; width: 42px; height: 5px; border-radius: 5px; background: var(--cm-line-2); transform: translateX(-50%); }
.cm-wk-sheet__nav { display: flex; gap: 6px; }
.cm-wk-sheet__nav button, .cm-wk-sheet__close { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--cm-bg); color: var(--cm-ink); transition: background .25s, color .25s; }
.cm-wk-sheet__nav button:hover, .cm-wk-sheet__close:hover { background: var(--cm-ink); color: #fff; }
.cm-wk-sheet__share { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--cm-bg); font-weight: 700; font-size: 13.5px; color: var(--cm-ink); transition: background .25s, color .25s; }
.cm-wk-sheet__share.is-copied { background: var(--cm-mint); color: #fff; }
.cm-wk-sheet__scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.cm-wk-sheet__cover { aspect-ratio: 16 / 9; background: var(--cm-bg-2); overflow: hidden; }
.cm-wk-sheet__cover img { width: 100%; height: 100%; object-fit: cover; }
.cm-wk-sheet__content { padding: 22px 20px 30px; }
.cm-wk-sheet__brand { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--cm-muted); }
.cm-wk-sheet__brand span { width: 10px; height: 10px; border-radius: 50%; }
.cm-wk-sheet h2 { font-size: clamp(26px, 4.4vw, 34px); margin-bottom: 12px; }
.cm-wk-sheet h3 { font-size: 13px; font-family: var(--cm-font); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--cm-primary); margin: 26px 0 10px; }
.cm-wk-sheet__content > p { font-size: 16px; }
.cm-wk-sheet__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-wk-sheet__tags em { display: inline-flex; align-items: center; gap: 6px; font-style: normal; font-size: 12.5px; font-weight: 700; padding: 6px 11px; border-radius: 999px; background: var(--cm-primary-soft); color: var(--cm-primary); }
.cm-wk-sheet__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.cm-wk-sheet__stats div { padding: 16px; border-radius: 16px; background: var(--cm-bg); }
.cm-wk-sheet__stats strong { display: block; font-family: var(--cm-display); font-size: 30px; line-height: 1; color: var(--cm-ink); margin-bottom: 4px; }
.cm-wk-sheet__stats small { display: block; font-size: 13px; color: var(--cm-muted); }
.cm-wk-sheet__list { display: grid; gap: 9px; }
.cm-wk-sheet__list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; color: var(--cm-ink); line-height: 1.5; }
.cm-wk-sheet__list li::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; background: var(--cm-line-2); }
.cm-wk-sheet__list--results li::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; color: #fff; background: var(--cm-mint); }
.cm-wk-sheet__quote { margin: 24px 0 0; padding: 20px 22px; border-radius: 18px; background: var(--cm-grad-soft); font-family: var(--cm-display); font-weight: 700; font-size: clamp(18px, 2.6vw, 21px); color: var(--cm-ink); line-height: 1.35; }
.cm-wk-sheet__gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.cm-wk-sheet__gallery:empty { display: none; }
.cm-wk-sheet__gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; background: var(--cm-bg-2); }
.cm-wk-sheet__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 28px; padding: 18px; border-radius: 18px; background: var(--cm-ink); color: rgba(255, 255, 255, .75); }
.cm-wk-sheet__cta strong { display: block; color: #fff; font-size: 17px; }
.cm-wk-sheet__cta small { display: block; font-size: 14px; }

/* ---------- Breakpoints ---------- */
@media (min-width: 600px) {
    .cm-wk-grid { grid-template-columns: repeat(2, 1fr); }
    .cm-wk-cta__panel { padding: 56px 44px; }
}

@media (min-width: 900px) {
    .cm-wk-hero__row { grid-template-columns: 1fr auto; gap: 40px; }
    .cm-wk-stats { min-width: 360px; }
    .cm-wk-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; }
    .cm-wk-card--feature { grid-column: span 2; }
    .cm-wk-card--feature .cm-wk-card__btn { flex-direction: row; }
    .cm-wk-card--feature .cm-wk-card__media { flex: 1.25; aspect-ratio: auto; min-height: 100%; }
    .cm-wk-card--feature .cm-wk-card__body { flex: 1; justify-content: center; padding: 28px; }
    .cm-wk-card--feature .cm-wk-card__title { font-size: 28px; }
    .cm-wk-card--feature .cm-wk-card__summary { flex: 0 0 auto; }
    .cm-wk-cta__panel { padding: 70px 64px; }

    /* Right-side panel */
    .cm-wk-sheet { margin: 0 0 0 auto; width: min(620px, 92vw); height: 100dvh; max-height: 100dvh; border-radius: 28px 0 0 28px; box-shadow: -30px 0 80px rgba(13, 11, 31, .25); }
    .cm-wk-sheet[open] { animation: cm-wk-left .5s var(--cm-ease); }
    .cm-wk-sheet.is-closing { animation: cm-wk-right .35s var(--cm-ease) forwards; }
    .cm-wk-sheet__grab { display: none; }
    .cm-wk-sheet__bar { padding: 16px 20px; }
    .cm-wk-sheet__content { padding: 28px 32px 40px; }
}

/* ---------- Keyframes ---------- */
@keyframes cm-wk-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes cm-wk-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes cm-wk-down { to { transform: translateY(100%); } }
@keyframes cm-wk-left { from { transform: translateX(100%); } to { transform: none; } }
@keyframes cm-wk-right { to { transform: translateX(100%); } }
