/* Samples strip at the end of "What we do". A wide "all in 2 minutes" card, then five samples. Same card look as .cnow__card. */
.csamples { margin-top: clamp(28px, 4vw, 40px); }
.csamples__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 18px; }
.csamples__head h3 { margin: 0; font-size: clamp(19px, 1.9vw, 22px); color: var(--deep); }
.csamples__head h3 a { color: inherit; text-decoration: none; border-radius: 4px; }
.csamples__head h3 a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; text-decoration-color: var(--orange, #f28b3c); }
.csamples__head h3 a:focus-visible { outline: 3px solid var(--focus, var(--deep)); outline-offset: 3px; }
.csamples__head p { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
.csamples__head a { color: var(--deep); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.csamples__head a:hover { text-decoration-color: var(--orange, #f28b3c); }

.csample {
    position: relative; display: flex; flex-direction: column; height: 100%; background: #fff; color: var(--ink); text-decoration: none;
    border: 1.5px solid rgba(91, 71, 23, .3); border-radius: 12px 15px 11px 14px; overflow: hidden;
    transition: transform .25s ease, border-color .25s ease;
}
.csample__media { position: relative; display: block; overflow: hidden; background: #0c3040; }
.csample__media img, .csample__media video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.csample__media img { transition: transform .45s ease; }
.csample__media video { position: absolute; inset: 0; height: 100%; opacity: 0; transition: opacity .3s ease; }
.csample__media.is-playing video { opacity: 1; }
.csample__title { display: block; padding: 10px 14px 12px; font-weight: 700; font-size: 15.5px; line-height: 1.3; color: var(--deep); border-top: 1.5px solid rgba(91, 71, 23, .18); background: #fff; }
.csample:hover { transform: translateY(-2px); border-color: rgba(91, 71, 23, .55); }
.csample:hover .csample__media img { transform: scale(1.03); }
.csample:focus-visible { outline: 3px solid var(--focus, var(--deep)); outline-offset: 3px; }

/* the wide card: all the demos in one short video */
.csample--all { margin-top: 14px; }
.csample--all .csample__media img, .csample--all .csample__media video { aspect-ratio: 32 / 9; }
.csample--all .csample__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3, 34, 47, .78) 0%, rgba(3, 34, 47, .35) 45%, rgba(3, 34, 47, 0) 70%); pointer-events: none; }
.csample__label { position: absolute; left: clamp(16px, 3vw, 28px); bottom: clamp(14px, 2.6vw, 24px); z-index: 1; max-width: 60%; color: #fffcf5; font-weight: 800; font-size: clamp(18px, 2.4vw, 28px); line-height: 1.15; }
.csample__play { position: absolute; left: clamp(16px, 3vw, 28px); top: clamp(14px, 2.6vw, 24px); z-index: 1; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 252, 245, .92); }
.csample__play::after { content: ""; position: absolute; left: 17px; top: 13px; border-left: 15px solid #0d3d50; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }

.csamples__grid { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.csamples__grid li { grid-column: span 2; }
.csamples__grid li:nth-child(4) { grid-column: 2 / span 2; }
.csamples__grid li:nth-child(5) { grid-column: 4 / span 2; }

@media (max-width: 960px) {
    .csamples__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .csamples__grid li, .csamples__grid li:nth-child(4), .csamples__grid li:nth-child(5) { grid-column: auto; }
    .csamples__grid li:nth-child(5) { grid-column: 1 / -1; width: calc(50% - 8px); justify-self: center; }
}
@media (max-width: 620px) {
    .csample--all .csample__media img, .csample--all .csample__media video { aspect-ratio: 16 / 7; }
    .csamples__grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; gap: 12px; }
    .csamples__grid li, .csamples__grid li:nth-child(4), .csamples__grid li:nth-child(5) { grid-column: auto; width: auto; scroll-snap-align: start; }
    .csample__title { font-size: 14.5px; }
}
@media (prefers-reduced-motion: reduce) {
    .csample, .csample__media img, .csample__media video { transition: none; }
    .csample:hover, .csample:hover .csample__media img { transform: none; }
}
html.calm .csample, html.calm .csample__media img { transition: none; }
html.calm .csample:hover, html.calm .csample:hover .csample__media img { transform: none; }

/* The /samples page (include with ['full' => true]): an intro line, the same cards with a line or two each, and a closing invitation */
.csamples--full { margin-top: 0; }
.csamples__intro { margin: 0; max-width: 46em; font-size: clamp(16px, 1.6vw, 18px); line-height: 1.55; color: var(--ink); }
.csamples__links { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15.5px; }
.csamples__links a { color: var(--deep); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.csamples__links a:hover { text-decoration-color: var(--orange, #f28b3c); }
.csamples--full .csample--all { margin-top: 22px; }
.csamples--full .csamples__grid { margin-top: 22px; gap: 22px; }
.csample__desc { display: block; flex: 1; padding: 0 14px 14px; font-size: 14.5px; line-height: 1.5; color: var(--ink); background: #fff; }
.csamples--full .csample__title { padding-bottom: 6px; }
.csamples__more { margin-top: clamp(32px, 5vw, 48px); padding: clamp(20px, 3vw, 28px); background: #fff; border: 1.5px solid rgba(91, 71, 23, .3); border-radius: 14px 12px 15px 11px; }
.csamples__more h2 { margin: 0 0 6px; font-size: clamp(20px, 2.2vw, 26px); color: var(--deep); }
.csamples__more p { margin: 0 0 16px; max-width: 42em; line-height: 1.55; }
@media (max-width: 620px) {
    .csamples--full .csamples__grid { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr; overflow: visible; scroll-snap-type: none; gap: 16px; }
}

/* Categories (10/11): a small tag on each home card, and grouped sections on /samples */
.csample__cat { position: absolute; left: 8px; top: 8px; z-index: 1; max-width: calc(100% - 16px); padding: 2px 8px; border-radius: 999px; background: rgba(3, 34, 47, .78); color: #fffcf5; font-size: 11.5px; font-weight: 700; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.csamples__groups { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px 22px; margin-top: 28px; }
.csamples__group { grid-column: var(--start) / span var(--span); min-width: 0; }
.csamples__cat { margin: 0 0 10px; font-size: clamp(17px, 1.8vw, 21px); line-height: 1.25; color: var(--deep); }
.csamples--full .csamples__group .csamples__grid { margin: 0; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.csamples__group .csamples__grid li:nth-child(n) { grid-column: auto; width: auto; justify-self: stretch; }
@media (max-width: 960px) {
    .csamples__groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .csamples__group { grid-column: auto / span 1; }
    .csamples__group.is-multi { grid-column: 1 / -1; }
    .csamples--full .csamples__group.is-multi .csamples__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .csamples__groups { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .csamples__group, .csamples__group.is-multi { grid-column: auto; }
    .csamples--full .csamples__group .csamples__grid, .csamples--full .csamples__group.is-multi .csamples__grid { grid-template-columns: minmax(0, 1fr); grid-auto-flow: row; overflow: visible; }
}

/* The overview card has its own poster, so it no longer repeats the samples below (10/11) */
.csample__sub { display: block; margin-top: 6px; font-size: clamp(13.5px, 1.4vw, 16px); font-weight: 500; line-height: 1.35; opacity: .92; }
.csamples:not(.csamples--full) .csample--all .csample__media img { aspect-ratio: 40 / 9; }
@media (max-width: 620px) { .csamples:not(.csamples--full) .csample--all .csample__media img { aspect-ratio: 16 / 7; } }

/* The overview card's text as a little title card: a big title with an orange underline, and the three areas as chips (10/11) */
.csample__big { display: inline-block; padding-bottom: 6px; background: linear-gradient(90deg, var(--orange, #f28b3c), #ffd27a) left bottom / 64px 4px no-repeat; font-size: clamp(22px, 3.2vw, 38px); letter-spacing: -.01em; }
.csample__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.csample__chip { display: inline-block; padding: 4px 11px; border-radius: 999px; background: rgba(255, 252, 245, .16); border: 1.5px solid rgba(255, 252, 245, .55); color: #fffcf5; font-size: clamp(12.5px, 1.25vw, 14.5px); font-weight: 700; line-height: 1.2; backdrop-filter: blur(2px); }
.csample__chip:first-child { background: #fffcf5; color: #0d3d50; border-color: #fffcf5; }
@media (max-width: 620px) { .csample__chips { gap: 4px; margin-top: 7px; } .csample__chip { padding: 3px 9px; } }

/* The overview card reads as a video (11/11): the round play is now a "Watch the video" button, a dark disc that pulses
   gently and the words beside it. On phones it says just "Video" and stays at the top right, clear of the title and
   9 px from the AI tab. On hover the products' screens slide in from the right (.csample__reel, rebrand-samples.js) */
.csample--all .csample__play {
    width: auto; height: auto; display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px;
    background: rgba(255, 252, 245, .96); color: #0d3d50; font-weight: 800; font-size: clamp(14px, 1.3vw, 16px); line-height: 1;
    box-shadow: 0 4px 16px rgba(3, 34, 47, .35); transition: background .2s ease, transform .2s ease;
}
.csample--all .csample__play::before { content: ""; flex: none; width: 34px; height: 34px; border-radius: 50%; background: #0d3d50; animation: csample-pulse 2.4s ease-out infinite; }
.csample--all .csample__play::after { left: 20px; top: 50%; margin-top: -7px; border-left: 12px solid #fffcf5; border-top-width: 7px; border-bottom-width: 7px; }
.csample--all:hover .csample__play, .csample--all:focus-visible .csample__play { background: #fff; transform: scale(1.04); }
.csample__play-short { display: none; }
@keyframes csample-pulse { 0% { box-shadow: 0 0 0 0 rgba(242, 139, 60, .75); } 70%, 100% { box-shadow: 0 0 0 11px rgba(242, 139, 60, 0); } }

.csample__reel {
    position: absolute; z-index: 1; top: 0; bottom: 0; left: 46%; right: 0; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .35s ease;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%); mask-image: linear-gradient(90deg, transparent 0, #000 14%);
}
.csample__reel.is-on { opacity: 1; }
.csample__track { position: absolute; top: 11%; bottom: 11%; left: 0; display: flex; gap: 14px; padding-left: 28px; will-change: transform; }
.csample__shot { flex: none; height: 100%; 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); }
.csample__shot video, .csample__shot img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
@media (max-width: 620px), (hover: none) { .csample__reel { display: none; } }
@media (prefers-reduced-motion: reduce) { .csample--all .csample__play::before { animation: none; } .csample--all .csample__play { transition: none; } }
html.calm .csample--all .csample__play::before { animation: none; }

/* Phones (11/11): the video button of the overview card sits at the top right, so it never covers the title, and a long category label wraps instead of being cut */
@media (max-width: 620px) {
    .csample--all .csample__play { left: auto; right: 24px; top: 12px; gap: 7px; padding: 4px 12px 4px 4px; font-size: 14px; }
    .csample--all .csample__play::before { width: 30px; height: 30px; }
    .csample--all .csample__play::after { left: 15px; margin-top: -6px; border-left-width: 11px; border-top-width: 6px; border-bottom-width: 6px; }
    .csample__play-long { display: none; }
    .csample__play-short { display: inline; }
    .csample__cat { font-size: 11px; white-space: normal; text-overflow: clip; border-radius: 10px; line-height: 1.3; padding: 3px 8px; }
}
