/* What we do, the merged grid (12/11): the demos, what is in the works and our two ways in to a proposal, as one grid
   of the same cards (.csample, rebrand-samples.css), with categories to filter by. The cards without a screen of their
   own get a placeholder: a dotted dark panel with their status in big letters and a few lines of text. */
.cwork { margin-top: clamp(28px, 4vw, 40px); min-width: 0; }
/* The title, and the filters under it (Nikos, 13/11): a funnel and the word "Filter" in front, the number of cards in
   each, and a raised edge like the site's buttons, so they do not read as the flat category labels on the cards */
.cwork__head { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.cwork__head h3 { margin: 0; font-size: clamp(19px, 1.9vw, 22px); color: var(--deep); }
.cwork__filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cwork__filters[hidden] { display: none; }
.cwork__flabel { display: inline-flex; align-items: center; gap: 5px; margin-right: 2px; font-size: 14px; font-weight: 700; color: var(--deep); white-space: nowrap; }
.cwork__flabel, .cwork__flabel svg, .cwork__filter { flex: none; }
.cwork__filter {
    appearance: none; margin: 0; font: inherit; font-size: 14px; font-weight: 700; line-height: 1.2; padding: 6px 10px 6px 13px; border-radius: 999px;
    border: 1.5px solid rgba(0, 61, 80, .45); background: #fff; color: var(--deep); cursor: pointer; white-space: nowrap;
    box-shadow: 0 2px 0 rgba(0, 61, 80, .4);
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .1s ease, box-shadow .1s ease;
}
.cwork__filter:hover { border-color: var(--deep); }
.cwork__filter:active { transform: translateY(2px); box-shadow: none; }
.cwork__filter[aria-pressed="true"] { background: var(--deep); border-color: var(--deep); color: #fffcf5; }
.cwork__n {
    display: inline-block; min-width: 1.6em; margin-left: 3px; padding: 0 5px; border-radius: 999px; background: rgba(0, 61, 80, .1);
    font-size: 12px; line-height: 1.55; text-align: center;
}
.cwork__filter[aria-pressed="true"] .cwork__n { background: rgba(255, 252, 245, .2); }
.cwork__filter:focus-visible, .cwork__ftoggle:focus-visible { outline: 3px solid var(--focus, var(--deep)); outline-offset: 2px; }
/* "Demo", in the orange of the Demo label on the cards (Nikos, 13/11) */
.cwork__filter--demo { border-color: var(--orange, #f28b3c); box-shadow: 0 2px 0 #c9661f; }
.cwork__filter--demo:hover { border-color: #c9661f; }
.cwork__filter--demo .cwork__n { background: rgba(242, 139, 60, .22); }
.cwork__filter--demo[aria-pressed="true"] { background: var(--orange, #f28b3c); border-color: var(--orange, #f28b3c); color: #10222b; }
.cwork__filter--demo[aria-pressed="true"] .cwork__n { background: rgba(16, 34, 43, .14); }

/* Where the buttons would take two lines (tablets, phones, a long language): a dropdown in the same style. The toggle
   shows the filter that is on; the panel lists them all, with their numbers */
.cwork__fbox { position: relative; max-width: 100%; }
.cwork__ftoggle {
    appearance: none; display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 7px 14px 7px 12px; border-radius: 999px;
    border: 1.5px solid var(--deep); background: #fff; color: var(--deep); box-shadow: 0 2px 0 rgba(0, 61, 80, .4);
    font: inherit; font-size: 14px; font-weight: 700; line-height: 1.2; white-space: nowrap; cursor: pointer;
}
.cwork__ftoggle[hidden] { display: none; }
.cwork__ftoggle svg { flex: none; }
.cwork__fcur { font-weight: 800; }
.cwork__ftoggle::after {
    content: ""; width: 7px; height: 7px; margin-left: 3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg); transition: transform .2s ease;
}
.cwork__fbox.is-open .cwork__ftoggle::after { transform: translateY(2px) rotate(-135deg); }
.cwork__ftoggle.is-demo { border-color: var(--orange, #f28b3c); box-shadow: 0 2px 0 #c9661f; }
.cwork__ftoggle.is-demo .cwork__fcount { background: rgba(242, 139, 60, .22); }
.cwork__fbox.is-compact .cwork__filters { display: none; }
.cwork__fbox.is-compact.is-open .cwork__filters {
    position: absolute; z-index: 6; top: calc(100% + 8px); left: 0; display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    min-width: 230px; padding: 8px; background: var(--paper, #fffcf5); border: 1.5px solid rgba(51, 40, 15, .22); border-radius: 12px;
    box-shadow: 0 10px 28px rgba(3, 34, 47, .22);
}
.cwork__fbox.is-compact .cwork__flabel { display: none; }
.cwork__fbox.is-compact .cwork__filter {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 10px 9px 12px; border: 0; border-radius: 8px;
    background: none; box-shadow: none; text-align: left; transform: none;
}
.cwork__fbox.is-compact .cwork__filter:hover { background: var(--tape, #fdeed8); }
.cwork__fbox.is-compact .cwork__filter[aria-pressed="true"] { background: var(--deep); color: #fffcf5; }
.cwork__fbox.is-compact .cwork__filter--demo { box-shadow: inset 3px 0 0 var(--orange, #f28b3c); }
.cwork__fbox.is-compact .cwork__filter--demo[aria-pressed="true"] { background: var(--orange, #f28b3c); color: #10222b; }
@media (prefers-reduced-motion: reduce) { .cwork__ftoggle::after { transition: none; } }
html.calm .cwork__ftoggle::after { transition: none; }

/* The video card: three product screens stand still on the right; on hover the carousel takes their place */
.cwork .csample--all { margin-top: 14px; }
.cwork__stills { position: absolute; z-index: 1; top: 0; bottom: 0; left: 48%; right: 0; pointer-events: none; transition: opacity .35s ease; }
.cwork__still {
    position: absolute; top: 50%; height: 64%; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: #0c3040;
    border: 2px solid rgba(255, 252, 245, .75); box-shadow: 0 8px 22px rgba(3, 34, 47, .45);
}
.cwork__still img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.cwork__still:nth-child(1) { right: 44%; transform: translateY(-50%) rotate(-4deg); }
.cwork__still:nth-child(2) { right: 23%; transform: translateY(-46%) rotate(2.5deg); z-index: 1; }
.cwork__still:nth-child(3) { right: 3%; transform: translateY(-54%) rotate(-2deg); }
.csample__reel.is-on ~ .cwork__stills { opacity: 0; }

/* The grid: four across on wide screens, three, then two; on phones a row to swipe, as the strip was */
.cwork__grid { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cwork__item { min-width: 0; }
.cwork__item[hidden] { display: none; }
.cwork__card .csample__title { padding-bottom: 4px; }
/* every card says what it is in up to three lines: its own short text (work_card, 13/11); the clamp only guards it */
.cwork__desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0 0 8px; padding: 0 14px; background: #fff; color: var(--ink); font-size: 14px; line-height: 1.45; }
.cwork__cta { display: block; margin-top: auto; padding: 0 14px 12px; background: #fff; color: #0a5a78; font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.cwork__cta::after { content: " \2192"; }
.cwork__cta--out::after { content: " \2197"; }
.cwork__card:hover .cwork__cta { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--orange, #f28b3c); }

/* "Demo" on the cards that open one */
.cwork__demo {
    position: absolute; right: 8px; top: 8px; z-index: 1; padding: 2px 9px; border-radius: 999px; background: var(--orange, #f28b3c); color: #10222b;
    font-size: 11.5px; font-weight: 800; line-height: 1.5; letter-spacing: .02em;
}

/* The status of a card in the works that has a screen (Pilot): bottom right, as the top right of the screen holds its
   test-data note; light, so it does not read as "Demo" */
.cwork__tag {
    position: absolute; right: 8px; bottom: 8px; z-index: 1; padding: 2px 9px; border-radius: 999px; background: var(--sand, #fee4a4); color: var(--ink, #33280f);
    font-size: 11.5px; font-weight: 800; line-height: 1.5; letter-spacing: .02em; pointer-events: none;
}

/* The placeholder of a card without a screen: its status in big letters, the roles, or the two countdowns */
.cwork__ph {
    aspect-ratio: 16 / 10; display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; padding: 40px 16px 14px; color: #fffcf5;
    background: radial-gradient(circle, rgba(255, 252, 245, .11) 1.2px, transparent 1.7px) 0 0 / 14px 14px, linear-gradient(155deg, #0f4d64 0%, #0c3040 72%);
}
.cwork__big {
    align-self: flex-start; padding-bottom: 6px; font-size: clamp(22px, 2.1vw, 27px); font-weight: 800; line-height: 1.05; letter-spacing: -.01em;
    background: linear-gradient(90deg, var(--orange, #f28b3c), #ffd27a) left bottom / 40px 3px no-repeat;
}
/* The closing card: two columns wide, so the last row is full; something similar for your team, the demos password
   and all the samples */
.cwork__item--wide { grid-column: span 2; }
.cwork__more {
    height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: clamp(18px, 2.4vw, 28px);
    background: #fff4dc; border: 1.5px dashed rgba(91, 71, 23, .4); border-radius: 12px 15px 11px 14px;
}
.cwork__more h4 { margin: 0; font-size: clamp(19px, 1.8vw, 22px); line-height: 1.25; color: var(--deep); }
.cwork__more p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink); max-width: 34em; }
.cwork__more .cwork__more-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 4px; }

@media (min-width: 1200px) { .cwork__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 819px) { .cwork__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* three narrow columns on tablets: the panels of all cards a little taller, so the roles and countdowns still fit */
@media (min-width: 621px) and (max-width: 1199px) {
    .cwork__grid .csample__media img, .cwork__grid .csample__media video, .cwork__ph { aspect-ratio: 16 / 11; }
}
@media (max-width: 620px) {
    /* nowrap: in a wrapping column the line takes the width of the buttons' row, and the page scrolled sideways; the
       filters no longer scroll sideways, they fold into the dropdown (13/11) */
    .cwork__head { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
    .cwork__filter { font-size: 13.5px; }
    .cwork__grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; gap: 12px; }
    .cwork__item { scroll-snap-align: start; }
    .cwork__item--wide { grid-column: auto; }
    .cwork__more { justify-content: flex-start; }
    /* one small screen, in the corner between the video button and the chips, clear of the title */
    .cwork__stills { left: auto; right: 16px; top: 60px; bottom: 24px; aspect-ratio: 16 / 10; }
    .cwork__still { height: 100%; right: 0; border-radius: 8px; }
    .cwork__still:nth-child(1) { right: 0; transform: translateY(-50%) rotate(-3deg); }
    .cwork__still:nth-child(2), .cwork__still:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .cwork__filter, .cwork__stills { transition: none; } }
html.calm .cwork__filter, html.calm .cwork__stills { transition: none; }

/* "v2.3.0, updated 13/11" by the title of a tool, the version always and "updated" for 14 days after a release (Nikos,
   13/11; the same words and days as the hub); after that, the version alone, without the orange dot */
.cwork__upd {
    display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: var(--sand, #fee4a4); color: var(--ink, #33280f);
    font-size: 11.5px; font-weight: 800; line-height: 1.5; letter-spacing: .01em; vertical-align: 2px; white-space: nowrap;
}
.cwork__upd::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--orange, #f28b3c); vertical-align: 1px; }
.cwork__upd--ver { background: rgba(0, 61, 80, .08); color: var(--deep); font-weight: 700; }
.cwork__upd--ver::before { display: none; }
