/* Expertise: home accordion, expertise list page, detail page. */

/*3. our expertise card*/
.expertise-card__header {
    display: block;
    width: 100%;
}

.expertise-card__toggle {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: var(--space-3xs);
    flex-shrink: 0;
    margin-top: var(--space-4xs);
    color: var(--fg-20);
    font-size: calc(var(--text-s) * 0.68);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    user-select: none;
}

.expertise-card__toggle-state {
    min-width: 1.75em;
    font-weight: 700;
}

.expertise-card__toggle-switch {
    position: relative;
    width: 2.1rem;
    height: 1.15rem;
    padding: 0;
    border: 1px solid color-mix(in hsl, var(--fg-20), transparent 45%);
    border-radius: var(--radius-full);
    background-color: var(--bg-80);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.expertise-card__toggle-switch:focus-visible {
    outline: 2px solid var(--fg);
    outline-offset: 2px;
}

.expertise-card__toggle-switch[aria-checked="true"] {
    background-color: var(--primary);
    border-color: var(--primary);
}

.expertise-card__toggle-thumb {
    position: absolute;
    top: 50%;
    left: 0.15rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: var(--radius-full);
    background-color: var(--fg-20);
    transform: translateY(-50%);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.expertise-card__toggle-switch[aria-checked="true"] .expertise-card__toggle-thumb {
    background-color: var(--fg);
    transform: translate(1.05rem, -50%);
}

/* plain boxed cards */
.expertise-card__wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    width: 100%;
}

.expertise-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid hsl(0 0% 100% / 0.16);
    border-radius: var(--radius-m);
    background: var(--card);
    transition: border-color 0.2s ease;
}

.expertise-card:hover {
    border-color: hsl(0 0% 100% / 0.4);
}

/* row: title · description · down arrow */
.expertise-card__trigger {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 2.5rem;
    align-items: center;
    gap: var(--space-l);
    width: 100%;
    padding: var(--space-l);
    border: 0;
    background: transparent;
    color: var(--fg);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.expertise-card__trigger:focus-visible {
    outline: 2px solid var(--fg);
    outline-offset: -4px;
    border-radius: var(--radius-m);
}

.expertise-card__title {
    font-size: var(--text-l);
    font-weight: 700;
    line-height: 1.15;
}

.expertise-card__description {
    max-width: 38rem;
    font-size: 1.0625rem;
    line-height: 1.55;
    color: hsl(220 15% 75%);
}

.expertise-card__icon {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
}

.expertise-card__arrow {
    width: 1.75rem;
    height: 1.75rem;
    fill: #fff;
    transition: transform 0.3s ease;
}

/* open: arrow points up */
.expertise-card__trigger {
    transition: background-color 0.25s ease;
}

/* open (as in the original design): solid red gradient header, no border */
.expertise-card--open {
    border-color: transparent;
}

.expertise-card--open .expertise-card__trigger {
    background: var(--gradient);
}

.expertise-card--open .expertise-card__description {
    color: hsl(0 0% 100% / 0.9);
}

.expertise-card--open .expertise-card__arrow {
    transform: rotate(180deg);
}

@media (max-width: 48rem) {
    .expertise-card__trigger {
        grid-template-columns: minmax(0, 1fr) 2.5rem;
        gap: var(--space-2xs) var(--space-s);
        padding: var(--space-m);
    }

    .expertise-card__description {
        grid-column: 1 / -1;
        grid-row: 2;
        font-size: 0.9375rem;
    }

    .expertise-card__icon {
        grid-column: 2;
        grid-row: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .expertise-card__arrow {
        transition: none;
    }
}

.expertise-card__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}

.expertise-card--open .expertise-card__panel {
    grid-template-rows: 1fr;
}

.expertise-card__panel-inner {
    min-height: 0;
    overflow: hidden;
}

.expertise-card__child-wrapper {
    display: grid;
    grid-template-columns: var(--columns-2);
    gap: var(--space-2xs);
    padding: var(--space-s);
}

.expertise-card__child {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
    min-height: 20rem;
    padding: var(--space-m);
    overflow: hidden;
    border-color: var(--border);
    transition: border-color 0.2s ease;
}

.expertise-card__child::before,
.expertise-card__child::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.expertise-card__child::before {
    z-index: -2;
    background-image: var(--expertise-image, none);
    /* `cardPosition` in data.js: which part of the photo the card shows */
    background-position: var(--expertise-image-position, center);
    background-size: var(--expertise-image-size, cover);
    background-repeat: no-repeat;
}

.expertise-card__child::after {
    z-index: -1;
    background-color: var(--bg);
    opacity: 0.65;
}

/* `cardFade` in data.js: for screenshots with lots of small text, the top of the card (behind
   the title) is solid dark and the screen shows clearly lower down */
.expertise-card__child--fade::before {
    background-position: var(--expertise-image-position, center bottom);
}

.expertise-card__child--fade::after {
    opacity: 1;
    background: linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 92%, transparent) 38%, color-mix(in srgb, var(--bg) 45%, transparent) 75%, color-mix(in srgb, var(--bg) 30%, transparent) 100%);
}

.expertise-card__child-title {
    font-size: var(--text-l);
    font-weight: 700;
    color: var(--fg);
}

.expertise-card__child p {
    font-size: var(--text-s);
    line-height: 1.45;
    color: var(--fg-20);
}

.expertise-card__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-4xs);
    margin-top: auto;
    align-self: flex-end;
    padding: var(--space-4xs) var(--space-s);
    border: 1px solid color-mix(in hsl, var(--border), transparent 35%);
    border-radius: var(--radius-full);
    background-color: color-mix(in hsl, var(--bg-40), transparent 35%);
    color: var(--fg);
    font-size: calc(var(--text-s) * 0.8);
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.expertise-card__link-arrow {
    transition: transform 0.2s ease;
}

.expertise-card__child-link {
    color: inherit;
    text-decoration: none;
}

/* the title link covers the whole card, so clicking the image opens the solution */
.expertise-card__child-link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.expertise-card__child-link:focus-visible {
    outline: none;
}

.expertise-card__child:has(.expertise-card__child-link:focus-visible) {
    outline: 2px solid var(--fg);
    outline-offset: 3px;
}

/* "Show more" stays clickable above the stretched link */
.expertise-card__link {
    position: relative;
    z-index: 2;
}

/* hover: image zooms, overlay lightens, border brightens */
.expertise-card__child {
    cursor: pointer;
    transition: border-color 0.3s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.expertise-card__child::before {
    transition: transform 0.7s cubic-bezier(.2, .75, .25, 1);
}

.expertise-card__child::after {
    transition: opacity 0.35s ease;
}

.expertise-card__child:hover {
    border-color: var(--fg);
    box-shadow: 0 18px 40px -18px hsl(213 73% 3% / 0.9);
}

.expertise-card__child:hover::before {
    transform: scale(1.06);
}

.expertise-card__child:hover::after {
    opacity: 0.5;
}

.expertise-card__child:hover .expertise-card__link-arrow {
    transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
    .expertise-card__child,
    .expertise-card__child::before,
    .expertise-card__child::after {
        transition: none;
    }
}

/* deep links (#expertise-<group>) land below the fixed navigation */
.expertise-card {
    scroll-margin-top: calc(var(--navigation-height, 4.5rem) + var(--space-m));
}

/* ---------- 3c. solution detail page (pages/expertise.html?item=…) ---------- */
.section.expertise-detail-section {
    padding-top: 0;
}

.solution {
    --solution-line: hsl(0 0% 100% / 0.1);
    --solution-muted: hsl(220 14% 74%);

    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    width: 100%;
}

/* full-bleed hero: the solution photo is the background */
.solution-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    width: 100vw;
    min-height: min(78vh, 46rem);
    margin-left: calc(50% - 50vw);
    padding: calc(var(--navigation-height, 4.5rem) + var(--space-l)) var(--space-2xl) var(--space-2xl);
    overflow: hidden;
}

.solution-hero::before,
.solution-hero::after {
    content: '';
    position: absolute;
    inset: 0;
}

.solution-hero::before {
    z-index: -2;
    background: var(--solution-image) var(--solution-image-position, center) / cover no-repeat;
    /* `heroBrightness` in data.js dims a bright picture so the header stays dark */
    filter: brightness(var(--solution-image-brightness, 1));
}

.solution-hero::after {
    z-index: -1;
    background:
        linear-gradient(0deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 55%, transparent) 40%, color-mix(in srgb, var(--bg) 15%, transparent) 70%, color-mix(in srgb, var(--bg) 60%, transparent) 100%),
        linear-gradient(90deg, color-mix(in srgb, var(--bg) 75%, transparent) 0%, transparent 65%);
}

/* fills the hero: breadcrumb at the top (under the navigation), title at the bottom */
.solution-hero__inner {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-3xl);
    width: 100%;
    max-width: var(--container-7xl);
    margin: 0 auto;
}

.solution-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    list-style: none;
    font-size: 0.875rem;
    color: hsl(0 0% 100% / 0.75);
}

.solution-breadcrumb li + li::before {
    content: '/';
    margin-right: 0.4rem;
    opacity: 0.5;
}

.solution-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.solution-breadcrumb a:hover {
    color: var(--fg);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.solution-breadcrumb [aria-current] {
    color: var(--fg);
}

.solution-hero__text {
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
    max-width: 44rem;
}

.section p.solution-hero__category {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: hsl(0 0% 100% / 0.85);
}

.section p.solution-hero__category::before {
    content: '';
    width: 1.75rem;
    height: 2px;
    background: var(--primary);
}

.solution-hero h1 {
    font-size: clamp(2.75rem, 7vw, 6rem);
    line-height: 0.98;
    letter-spacing: -0.03em;
    text-shadow: 0 4px 30px hsl(213 73% 3% / 0.5);
}

.section p.solution-hero__lead {
    max-width: 36rem;
    font-size: var(--text-s);
    line-height: 1.6;
    color: hsl(0 0% 100% / 0.85);
}

/* ---------- header photo marquee ---------- */
/* a header with a photo strip is taller, so the strip doesn't cover the header photo */
.solution-hero--marquee {
    min-height: min(90vh, 54rem);
}

/* edge-to-edge strip under the title; one lap is repeated twice, so sliding it by half its
   width loops without a jump */
.solution-marquee {
    --photo-h: clamp(10rem, 21vw, 17.5rem);
    --gap: clamp(0.75rem, 1.4vw, 1.25rem);
    flex-shrink: 0;
    margin: var(--space-xl) calc(-1 * var(--space-2xl)) 0;
    padding-block: 0.5rem;
    overflow: hidden;
    /* soft fade at both screen edges */
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.solution-marquee__track {
    display: flex;
    gap: var(--gap);
    width: max-content;
    animation: solution-marquee var(--duration, 40s) linear infinite;
}

.solution-marquee:hover .solution-marquee__track,
.solution-marquee.is-paused .solution-marquee__track {
    animation-play-state: paused;
}

@keyframes solution-marquee {
    to {
        /* half the track + half a gap = exactly one lap */
        transform: translateX(calc(-50% - var(--gap) / 2));
    }
}

.solution-marquee__photo {
    position: relative;
    flex-shrink: 0;
    height: var(--photo-h);
    aspect-ratio: 16 / 10;
    padding: 0;
    overflow: hidden;
    border: 1px solid hsl(0 0% 100% / 0.16);
    border-radius: var(--radius-m);
    background: var(--bg-40);
    box-shadow: 0 16px 32px -18px hsl(213 73% 3% / 0.95);
    cursor: zoom-in;
    transition: transform 0.35s cubic-bezier(.2, .75, .25, 1), border-color 0.3s ease;
}

.solution-marquee__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    transition: transform 0.5s ease, filter 0.3s ease;
    filter: brightness(0.88);
}

/* glass sheen */
.solution-marquee__photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, hsl(0 0% 100% / 0.14) 0%, transparent 40%);
    pointer-events: none;
}

.solution-marquee__photo:hover,
.solution-marquee__photo:focus-visible {
    border-color: hsl(0 0% 100% / 0.4);
    transform: translateY(-0.3rem);
}

.solution-marquee__photo:hover img,
.solution-marquee__photo:focus-visible img {
    transform: scale(1.06);
    filter: none;
}

.solution-marquee__photo:focus-visible {
    outline: 2px solid var(--fg);
    outline-offset: 2px;
}

/* reduced motion: no sliding; the strip scrolls by hand instead */
@media (prefers-reduced-motion: reduce) {
    .solution-marquee {
        overflow-x: auto;
    }

    .solution-marquee__track {
        animation: none;
    }

    .solution-marquee__photo,
    .solution-marquee__photo img {
        transition: none;
    }
}

/* ---------- full-size photo viewer ---------- */
.solution-lightbox {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: clamp(3.5rem, 7vh, 5rem) clamp(1rem, 6vw, 6rem);
    border: 0;
    background: transparent;
    color: var(--fg);
    /* the viewer opens outside <main>, so it needs the site font itself */
    font-family: Arial, Helvetica, sans-serif;
}

.solution-lightbox button {
    font-family: inherit;
}

.solution-lightbox[open] {
    display: grid;
    place-items: center;
    animation: solution-lightbox-in 0.3s ease both;
}

.solution-lightbox::backdrop {
    background: hsl(213 73% 3% / 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

@keyframes solution-lightbox-in {
    from { opacity: 0; transform: scale(0.97); }
}

.is-lightbox-open {
    overflow: hidden;
}

.solution-lightbox__figure {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
}

.solution-lightbox__img {
    display: block;
    max-width: min(100%, 80rem);
    max-height: calc(100dvh - clamp(3.5rem, 7vh, 5rem) * 2 - 2.5rem);
    margin: 0 auto;
    border-radius: var(--radius-m);
    box-shadow: 0 30px 80px -20px hsl(0 0% 0% / 0.8);
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.solution-lightbox__img.is-ready {
    opacity: 1;
}

.solution-lightbox__bar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.875rem;
    color: hsl(0 0% 100% / 0.75);
}

.solution-lightbox__title {
    font-weight: 600;
    color: var(--fg);
}

.solution-lightbox__nav,
.solution-lightbox__close {
    position: fixed;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: 1px solid hsl(0 0% 100% / 0.2);
    border-radius: 999px;
    background: hsl(213 73% 3% / 0.55);
    color: var(--fg);
    font-size: 1.9rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.solution-lightbox__nav:hover,
.solution-lightbox__close:hover {
    border-color: hsl(0 0% 100% / 0.45);
    background: var(--primary);
}

.solution-lightbox__nav:focus-visible,
.solution-lightbox__close:focus-visible {
    outline: 2px solid var(--fg);
    outline-offset: 2px;
}

.solution-lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
}

.solution-lightbox__nav--prev { left: clamp(0.5rem, 2vw, 1.5rem); }
.solution-lightbox__nav--next { right: clamp(0.5rem, 2vw, 1.5rem); }

.solution-lightbox__close {
    top: clamp(0.75rem, 2vh, 1.25rem);
    right: clamp(0.75rem, 2vw, 1.5rem);
}

/* phones: arrows move under the photo so they don't cover it (swipe also works) */
@media (max-width: 48rem) {
    .solution-lightbox__nav {
        top: auto;
        bottom: 1rem;
        transform: none;
    }

    .solution-lightbox__nav--prev { left: calc(50% - 3.5rem); }
    .solution-lightbox__nav--next { right: calc(50% - 3.5rem); }
}

@media (prefers-reduced-motion: reduce) {
    .solution-lightbox__img {
        transition: none;
    }

    .solution-lightbox[open] {
        animation: none;
    }
}

/* sections */
/* section headings (Overview, Projects, Partners, More in …): clearly bigger than
   the project titles below them */
.solution-block h2 {
    margin-bottom: var(--space-m);
    font-size: var(--text-l);
    font-weight: 700;
    line-height: 1.2;
}

/* short red bar under each section heading, so it stands apart from the project titles */
.solution-block h2::after {
    content: '';
    display: block;
    width: 2.5rem;
    height: 3px;
    margin-top: 0.6rem;
    border-radius: 2px;
    background: var(--primary);
    letter-spacing: -0.01em;
}

.solution-overview {
    display: grid;
    grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
    gap: var(--space-l);
}

.section p.solution-block__text {
    max-width: 48rem;
    font-size: clamp(1.125rem, 1.6vw, 1.375rem);
    line-height: 1.6;
    color: hsl(220 20% 90%);
}

.solution-block__paragraphs {
    display: grid;
    gap: 1.1em;
    max-width: 48rem;
    font-size: clamp(1.125rem, 1.6vw, 1.375rem);
}

.section p.solution-block__empty {
    padding: var(--space-m);
    border: 1px dashed var(--solution-line);
    border-radius: var(--radius-m);
    font-size: 1rem;
    color: var(--solution-muted);
}

.solution-block__empty a {
    margin-left: 0.25rem;
    color: var(--fg);
}

/* projects (wide column) + partners (narrow column) side by side */
.solution-split {
    display: grid;
    /* projects take the room; partners sit in a narrow column of compact logo tiles */
    grid-template-columns: minmax(0, 1fr) 12rem;
    gap: var(--space-2xl);
    align-items: start;
}

/* partners stay in view beside a long project list */
.solution-split > .solution-block:nth-child(2) {
    position: sticky;
    top: 6rem;
}

.solution-split--single {
    grid-template-columns: minmax(0, 1fr);
}

/* projects: plain text list, styled like the Overview */
.solution-projects {
    display: flex;
    flex-direction: column;
    list-style: none;
}

.solution-project {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    padding-block: var(--space-m);
    border-top: 1px solid var(--solution-line);
}

.solution-project:first-child {
    padding-top: 0;
    border-top: 0;
}

.solution-project h3 {
    font-size: clamp(1.125rem, 1.6vw, 1.375rem);
    font-weight: 700;
    line-height: 1.4;
}

/* same text style as the Overview paragraph */
.section p.solution-project__text {
    font-size: clamp(1rem, 1.3vw, 1.125rem);
    line-height: 1.6;
    color: hsl(220 20% 90%);
}

/* optional project / feature image, shown in a rounded app-window frame:
   slim top bar with three dots, soft navy glow behind, gentle lift on hover */
.solution-shot {
    position: relative;
    isolation: isolate;
    width: 100%;
    max-width: 42rem;
    margin: var(--space-xs) 0 0;
}

.solution-shot::before {
    content: '';
    position: absolute;
    inset: 8% 6% -6%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(closest-side, hsl(215 70% 45% / 0.35), transparent);
    filter: blur(40px);
}

.solution-shot__window {
    overflow: hidden;
    border: 1px solid hsl(0 0% 100% / 0.14);
    border-radius: 0.9rem;
    background: hsl(220 25% 12%);
    box-shadow:
        0 0 0 6px hsl(0 0% 100% / 0.03),
        0 28px 56px -28px hsl(0 0% 0% / 0.85);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.solution-shot__bar {
    display: flex;
    gap: 0.35rem;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid hsl(0 0% 100% / 0.08);
    background: hsl(220 25% 15%);
}

.solution-shot__bar i {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: hsl(0 0% 100% / 0.22);
}

/* empty image slot: same window, a soft grid and the feature's icon, until a screenshot is added */
.solution-shot__empty {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    background:
        linear-gradient(hsl(0 0% 100% / 0.035) 1px, transparent 1px) 0 0 / 2rem 2rem,
        linear-gradient(90deg, hsl(0 0% 100% / 0.035) 1px, transparent 1px) 0 0 / 2rem 2rem,
        radial-gradient(circle at 50% 45%, hsl(215 60% 30% / 0.35), transparent 65%),
        hsl(220 25% 11%);
}

.solution-shot__empty svg {
    width: 3rem;
    height: 3rem;
    fill: none;
    stroke: hsl(0 0% 100% / 0.28);
    stroke-width: 1.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.solution-project__image {
    display: block;
    /* whole image, never cropped (screenshots must show the full screen) */
    width: 100%;
    height: auto;
}

/* screenshots: never stretched past their real size, and tall panels (e.g. a side list)
   capped in height. The window shrinks around the picture and sits centred. */
.solution-shot .solution-project__image {
    width: auto;
    max-width: 100%;
    max-height: min(34rem, 75vh);
    margin-inline: auto;
}

/* two or more screenshots for one feature: stacked with a small gap */
.solution-shot__window + .solution-shot__window {
    margin-top: var(--space-s);
}

.solution-shot__window {
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
}

.solution-project:hover .solution-shot__window {
    transform: translateY(-4px);
    box-shadow:
        0 0 0 6px hsl(0 0% 100% / 0.04),
        0 36px 64px -28px hsl(0 0% 0% / 0.9);
}

@media (prefers-reduced-motion: reduce) {
    .solution-shot__window { transition: none; }
    .solution-project:hover .solution-shot__window { transform: none; }
}

/* Key Features: alternating rows, text on one side and the screenshot on the other */
.solution-features__list .solution-project {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    /* empty rows above and below keep the icon, title and text together as one block,
       centred against the screenshot(s) - with two screenshots, between the two */
    grid-template-areas:
        ".     image"
        "icon  image"
        "title image"
        "text  image"
        ".     image";
    grid-template-rows: 1fr auto auto auto 1fr;
    align-items: start;
    column-gap: var(--space-2xl);
    row-gap: var(--space-xs);
    padding-block: var(--space-xl);
    border-top: 0;
}

.solution-features__list .solution-project:nth-child(even) {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    grid-template-areas:
        "image ."
        "image icon"
        "image title"
        "image text"
        "image .";
}

.solution-features__list .solution-project h3 {
    grid-area: title;
    font-size: var(--text-m);
}

.section .solution-features__list p.solution-project__text {
    grid-area: text;
    align-self: start;
    text-align: justify;
    color: hsl(220 15% 78%);
}

.solution-features__list .solution-shot {
    grid-area: image;
    align-self: center;
    max-width: none;
    margin: 0;
}

/* a feature without a screenshot (e.g. NovaGMS Map Layer Control) in a list that has them:
   text centred across the full width instead of beside an empty space */
.solution-features__list .solution-project--text-only,
.solution-features__list .solution-project--text-only:nth-child(even) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "icon"
        "title"
        "text";
    grid-template-rows: none;
    justify-items: center;
    max-width: 44rem;
    margin-inline: auto;
    text-align: center;
}

.section .solution-features__list .solution-project--text-only p.solution-project__text {
    text-align: center;
}

@media (max-width: 48rem) {
    .solution-features__list .solution-project,
    .solution-features__list .solution-project:nth-child(even) {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "icon"
            "title"
            "text"
            "image";
        grid-template-rows: none;
        padding-block: var(--space-l);
    }

    .solution-features__list .solution-shot {
        margin-top: var(--space-xs);
    }
}

/* Key Features without screenshots (e.g. NovaGMS): a grid of quiet cards,
   icon + title + text, three per row on wide screens */
.solution-feature-cards {
    display: grid;
    /* min(…, 100%): never wider than the screen on the smallest phones */
    grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr));
    gap: var(--space-s);
    list-style: none;
}

.solution-feature-cards .solution-project {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    padding: var(--space-m);
    border: 1px solid hsl(0 0% 100% / 0.1);
    border-radius: var(--radius-l);
    background: hsl(0 0% 100% / 0.025);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.solution-feature-cards .solution-project:first-child {
    padding-top: var(--space-m);
    border-top: 1px solid hsl(0 0% 100% / 0.1);
}

.solution-feature-cards .solution-project:hover {
    border-color: hsl(0 0% 100% / 0.24);
    transform: translateY(-2px);
}

/* blank feature card (no text yet): same size and outline, nothing inside */
.solution-feature-cards .solution-project--empty {
    min-height: 13rem;
}

.solution-feature-cards .solution-project--empty:hover {
    border-color: hsl(0 0% 100% / 0.1);
    transform: none;
}

.solution-feature-cards .solution-project__icon {
    align-self: flex-start;
    margin-bottom: var(--space-xs);
}

.solution-feature-cards .solution-project h3 {
    font-size: var(--text-s);
    line-height: 1.35;
}

.section .solution-feature-cards p.solution-project__text {
    font-size: 0.9375rem;
    line-height: 1.6;
    text-align: left;
    -webkit-hyphens: manual;
    hyphens: manual;
    color: hsl(220 15% 76%);
}

@media (prefers-reduced-motion: reduce) {
    .solution-feature-cards .solution-project { transition: none; }
    .solution-feature-cards .solution-project:hover { transform: none; }
}

/* feature icon: red outline icon in a dark circle, above the feature title */
.solution-project__icon {
    grid-area: icon;
    align-self: end;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: var(--space-2xs);
    border: 1px solid hsl(0 0% 100% / 0.14);
    border-radius: 50%;
    background: hsl(220 25% 13%);
    box-shadow: 0 10px 24px -12px hsl(0 0% 0% / 0.8);
}

.solution-project__icon svg {
    width: 1.35rem;
    height: 1.35rem;
    fill: none;
    stroke: var(--primary);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Overview + project text: justified, so both edges line up.
   Hyphenation keeps the word spacing even on narrow screens. */
.section p.solution-block__text,
.section p.solution-project__text {
    text-align: justify;
    -webkit-hyphens: auto;
    hyphens: auto;
}

/* partners: stacked logo tiles beside the projects */
.solution-partners {
    display: grid;
    gap: var(--space-2xs);
    list-style: none;
}

.solution-split--single .solution-partners {
    grid-template-columns: repeat(auto-fill, minmax(10rem, 13rem));
}

.solution-partner {
    display: flex;
    align-items: center;
    justify-content: center;
    /* tall enough that two-line logos (IDS AirNav + its tagline) stay readable */
    height: 5.5rem;
    padding: 0.75rem 1.1rem;
    border: 1px solid var(--solution-line);
    border-radius: var(--radius-m);
    background: hsl(217 61% 18% / 0.55);
    transition: border-color 0.25s ease, background-color 0.25s ease;
}

.solution-partner:hover {
    border-color: hsl(0 0% 100% / 0.35);
    background: hsl(217 61% 22% / 0.7);
}

/* every logo gets the same box, centred, so wide (Thales) and tall (R&S) logos look even */
.solution-partner img {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: contain;
    object-position: center;
    filter: brightness(0) invert(1);
}

/* more in this category: compact secondary links */
/* photo tiles: quiet, neutral — dark surface, hairline border, white / grey text only */
.solution-related {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: var(--space-s);
    list-style: none;
}

.solution-related > li {
    display: flex;
}

.solution-related__card {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    border: 1px solid hsl(0 0% 100% / 0.1);
    border-radius: var(--radius-m);
    background: hsl(0 0% 100% / 0.025);
    color: var(--fg);
    text-decoration: none;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.solution-related__media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: hsl(0 0% 100% / 0.04);
}

.solution-related__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.85);
    transition: transform 0.6s cubic-bezier(.2, .75, .25, 1), filter 0.4s ease;
}

.solution-related__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: var(--space-s);
}

.solution-related__title {
    font-size: var(--text-s);
    font-weight: 700;
    line-height: 1.3;
}

.solution-related__summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 0.875rem;
    line-height: 1.45;
    color: hsl(0 0% 100% / 0.55);
}

.solution-related__card:hover,
.solution-related__card:focus-visible {
    border-color: hsl(0 0% 100% / 0.28);
    transform: translateY(-2px);
}

.solution-related__card:focus-visible {
    outline: 2px solid var(--fg);
    outline-offset: 3px;
}

.solution-related__card:hover .solution-related__media img {
    transform: scale(1.05);
    filter: saturate(1);
}

@media (prefers-reduced-motion: reduce) {
    .solution-related__card,
    .solution-related__media img {
        transition: none;
    }
}

@media (max-width: 64rem) {
    /* smaller screens: the photo sits behind the title, so darken it more */
    .solution-hero::after {
        background:
            linear-gradient(0deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 75%, transparent) 45%, color-mix(in srgb, var(--bg) 55%, transparent) 100%);
    }
}

@media (max-width: 48rem) {
    /* same side margins as the sections below, so the title lines up with the text */
    .solution-hero {
        min-height: 70vh;
    }

    /* which part of the photo phones show (`heroPositionSm` in data.js), e.g. a side
       of the picture without text */
    .solution-hero::before {
        background-position: var(--solution-image-position-sm, center);
        /* `heroSizeSm` in data.js can shrink the photo, e.g. to keep a picture's main
           subject above the title */
        background-size: var(--solution-image-size-sm, cover);
    }

    /* narrow column: justified text leaves big gaps, so align left on phones */
    .section p.solution-block__text,
    .section p.solution-project__text,
    .section .solution-features__list p.solution-project__text {
        text-align: left;
        -webkit-hyphens: manual;
        hyphens: manual;
    }

    .solution-overview {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .solution-split {
        grid-template-columns: minmax(0, 1fr);
    }

    .solution-split > .solution-block:nth-child(2) {
        position: static;
    }

    .solution-partners {
        grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
    }
}


/* thin divider between sections */
.solution-overview + .solution-split,
.solution-overview + .solution-features,
.solution-features + .solution-split,
.solution-features + .solution-block,
.solution-split + .solution-block {
    padding-top: var(--space-xl);
    border-top: 1px solid hsl(0 0% 100% / 0.14);
}
