:root {
    --apm-primary: #2563EB;
    --apm-accent: #06B6D4;
    --apm-dark: #07111F;
    --apm-slate: #101828;
    --apm-text: #EAF1FA;
    --apm-muted: #9FB0C6;
    --apm-border: rgba(159, 176, 198, 0.18);
    --apm-card: rgba(16, 24, 40, 0.88);
    --apm-radius: 20px;
    --apm-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.apm-projects,
.apm-single-project,
.apm-project-archive {
    color: var(--apm-text);
    font-family: inherit;
}

.apm-shell {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.apm-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--apm-accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.4;
    text-transform: uppercase;
}

.apm-eyebrow::before {
    width: 24px;
    height: 2px;
    background: currentColor;
    content: "";
}

.apm-projects__intro,
.apm-section-heading {
    max-width: 760px;
    margin-bottom: 34px;
}

.apm-projects__intro h2,
.apm-section-heading h2,
.apm-case-study-sections h2,
.apm-project-cta h2 {
    margin: 0;
    color: var(--apm-text);
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.apm-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 14px;
    margin: 0 0 30px;
    padding: 18px;
    border: 1px solid var(--apm-border);
    border-radius: 16px;
    background: rgba(7, 17, 31, 0.72);
}

.apm-filters label {
    display: grid;
    flex: 1 1 220px;
    gap: 7px;
    margin: 0;
    color: var(--apm-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.apm-filters select {
    min-height: 48px;
    margin: 0;
    padding: 0 42px 0 14px;
    border: 1px solid var(--apm-border);
    border-radius: 11px;
    background-color: var(--apm-slate);
    color: var(--apm-text);
    font: inherit;
    text-transform: none;
}

.apm-filter-reset {
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid var(--apm-border);
    border-radius: 11px;
    background: transparent;
    color: var(--apm-text);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.apm-filter-reset:hover,
.apm-filter-reset:focus-visible {
    border-color: var(--apm-accent);
    color: var(--apm-accent);
}

.apm-project-grid {
    display: grid;
    gap: 24px;
}

.apm-columns-1 { grid-template-columns: minmax(0, 1fr); }
.apm-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apm-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apm-columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.apm-project-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--apm-border);
    border-radius: var(--apm-radius);
    background: linear-gradient(180deg, rgba(16, 24, 40, 0.98), rgba(7, 17, 31, 0.98));
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.apm-project-card:hover {
    border-color: rgba(6, 182, 212, 0.52);
    box-shadow: var(--apm-shadow);
    transform: translateY(-5px);
}

.apm-project-card[hidden] {
    display: none !important;
}

.apm-project-card__image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(6, 182, 212, 0.12));
}

.apm-project-card__image img {
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    transition: transform 300ms ease;
}

.apm-project-card:hover .apm-project-card__image img {
    transform: scale(1.035);
}

.apm-project-card__placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    background:
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.18), transparent 38%),
        linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(7, 17, 31, 0.8));
}

.apm-project-card__placeholder span {
    color: rgba(234, 241, 250, 0.28);
    font-size: 84px;
    font-weight: 800;
}

.apm-project-card__status {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(7, 17, 31, 0.82);
    color: var(--apm-text);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.apm-project-card__body {
    padding: 24px;
}

.apm-project-card__types {
    margin-bottom: 10px;
    color: var(--apm-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.apm-project-card h3 {
    margin: 0 0 10px;
    color: var(--apm-text);
    font-size: clamp(22px, 2vw, 28px);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.apm-project-card h3 a,
.apm-project-card__link {
    color: inherit;
    text-decoration: none;
}

.apm-project-card__subtitle {
    margin: 0 0 10px !important;
    color: #D9E5F5 !important;
    font-weight: 600;
}

.apm-project-card__body > p:not(.apm-project-card__subtitle) {
    margin: 0 0 18px;
    color: var(--apm-muted);
    font-size: 15px;
    line-height: 1.65;
}

.apm-project-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 19px;
}

.apm-project-card__meta span {
    padding: 6px 9px;
    border: 1px solid var(--apm-border);
    border-radius: 999px;
    color: #C8D4E4;
    font-size: 12px;
}

.apm-project-card__link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--apm-text);
    font-weight: 700;
}

.apm-project-card__link span {
    color: var(--apm-accent);
    transition: transform 160ms ease;
}

.apm-project-card__link:hover span {
    transform: translateX(4px);
}

.apm-empty,
.apm-no-results {
    grid-column: 1 / -1;
    padding: 28px;
    border: 1px solid var(--apm-border);
    border-radius: 14px;
    background: rgba(16, 24, 40, 0.72);
    color: var(--apm-muted);
    text-align: center;
}

.apm-project-hero,
.apm-archive-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(80px, 10vw, 150px) 0 clamp(70px, 9vw, 120px);
    background:
        radial-gradient(circle at 86% 14%, rgba(6, 182, 212, 0.16), transparent 32%),
        radial-gradient(circle at 8% 70%, rgba(37, 99, 235, 0.18), transparent 38%),
        var(--apm-dark);
}

.apm-project-hero .apm-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.88fr);
    align-items: center;
    gap: clamp(40px, 7vw, 90px);
}

.apm-project-hero h1,
.apm-archive-hero h1 {
    max-width: 920px;
    margin: 0;
    color: var(--apm-text);
    font-size: clamp(46px, 7.2vw, 90px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.apm-project-hero__subtitle,
.apm-archive-hero p {
    max-width: 760px;
    margin: 22px 0 0;
    color: #D8E4F3;
    font-size: clamp(20px, 2.3vw, 30px);
    line-height: 1.35;
}

.apm-project-hero__summary {
    max-width: 720px;
    margin: 18px 0 0;
    color: var(--apm-muted);
    font-size: 17px;
    line-height: 1.7;
}

.apm-project-hero__image {
    overflow: hidden;
    border: 1px solid var(--apm-border);
    border-radius: 24px;
    background: rgba(16, 24, 40, 0.8);
    box-shadow: var(--apm-shadow);
    transform: rotate(1.2deg);
}

.apm-project-hero__image img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

.apm-project-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.apm-button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 10px;
    text-decoration: none !important;
    font-weight: 700;
    transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.apm-button:hover {
    transform: translateY(-2px);
}

.apm-button--primary {
    background: linear-gradient(135deg, var(--apm-primary), var(--apm-accent));
    color: #FFFFFF !important;
}

.apm-button--ghost {
    border-color: var(--apm-border);
    background: rgba(16, 24, 40, 0.56);
    color: var(--apm-text) !important;
}

.apm-project-content,
.apm-archive-content {
    padding-top: clamp(60px, 8vw, 100px);
    padding-bottom: clamp(70px, 10vw, 130px);
}

.apm-project-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin: 0 0 44px;
    border: 1px solid var(--apm-border);
    border-radius: 18px;
    background: var(--apm-border);
}

.apm-project-facts > div {
    min-width: 0;
    padding: 20px;
    background: var(--apm-card);
}

.apm-project-facts dt {
    margin-bottom: 7px;
    color: var(--apm-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.apm-project-facts dd {
    margin: 0;
    color: var(--apm-text);
    font-size: 15px;
    line-height: 1.55;
}

.apm-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 0 0 clamp(70px, 9vw, 110px);
}

.apm-stats > div {
    padding: 30px;
    border: 1px solid var(--apm-border);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.12), rgba(16, 24, 40, 0.82));
}

.apm-stats strong {
    display: block;
    margin-bottom: 10px;
    color: var(--apm-text);
    font-size: clamp(40px, 5vw, 68px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.apm-stats span {
    color: var(--apm-muted);
    line-height: 1.5;
}

.apm-case-study-sections {
    display: grid;
    gap: clamp(60px, 8vw, 100px);
}

.apm-case-study-sections section {
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
    column-gap: clamp(35px, 7vw, 100px);
    align-items: start;
    padding-top: 34px;
    border-top: 1px solid var(--apm-border);
}

.apm-case-study-sections .apm-eyebrow,
.apm-case-study-sections h2 {
    grid-column: 1;
}

.apm-case-study-sections .apm-rich-text {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.apm-rich-text,
.apm-editor-content {
    color: var(--apm-muted);
    font-size: 18px;
    line-height: 1.82;
}

.apm-rich-text p:first-child,
.apm-editor-content > *:first-child {
    margin-top: 0;
}

.apm-editor-content,
.apm-gallery-section,
.apm-related-projects {
    margin-top: clamp(70px, 10vw, 130px);
}

.apm-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.apm-gallery-grid a {
    overflow: hidden;
    border: 1px solid var(--apm-border);
    border-radius: 18px;
    background: var(--apm-card);
}

.apm-gallery-grid img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    transition: transform 240ms ease;
}

.apm-gallery-grid a:hover img {
    transform: scale(1.02);
}

.apm-project-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-top: clamp(80px, 11vw, 140px);
    padding: clamp(30px, 5vw, 62px);
    border: 1px solid rgba(6, 182, 212, 0.26);
    border-radius: 24px;
    background:
        radial-gradient(circle at 100% 0, rgba(6, 182, 212, 0.16), transparent 38%),
        linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(16, 24, 40, 0.95));
}

.apm-project-cta h2 {
    max-width: 760px;
    font-size: clamp(30px, 4vw, 50px);
}

.apm-project-cta .apm-button {
    flex: 0 0 auto;
}

.apm-archive-hero .apm-shell {
    text-align: left;
}

.apm-archive-hero p {
    max-width: 800px;
    color: var(--apm-muted);
    font-size: 19px;
    line-height: 1.65;
}

.apm-project-archive,
.apm-single-project {
    background: #081321;
}

.apm-project-archive .navigation.pagination {
    margin-top: 50px;
}

.apm-project-archive .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.apm-project-archive .page-numbers {
    display: grid;
    min-width: 42px;
    min-height: 42px;
    padding: 8px 12px;
    place-items: center;
    border: 1px solid var(--apm-border);
    border-radius: 9px;
    background: var(--apm-slate);
    color: var(--apm-text);
    text-decoration: none;
}

.apm-project-archive .page-numbers.current,
.apm-project-archive .page-numbers:hover {
    border-color: var(--apm-accent);
    color: var(--apm-accent);
}

@media (max-width: 1024px) {
    .apm-columns-3,
    .apm-columns-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .apm-project-hero .apm-shell {
        grid-template-columns: 1fr;
    }

    .apm-project-hero__image {
        max-width: 760px;
        transform: none;
    }
}

@media (max-width: 760px) {
    .apm-shell {
        width: min(100% - 28px, 1180px);
    }

    .apm-columns-2,
    .apm-columns-3,
    .apm-columns-4,
    .apm-project-facts,
    .apm-stats,
    .apm-gallery-grid {
        grid-template-columns: 1fr;
    }

    .apm-case-study-sections section {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .apm-case-study-sections .apm-eyebrow,
    .apm-case-study-sections h2,
    .apm-case-study-sections .apm-rich-text {
        grid-column: 1;
        grid-row: auto;
    }

    .apm-project-cta {
        align-items: flex-start;
        flex-direction: column;
    }

    .apm-project-cta .apm-button {
        width: 100%;
    }

    .apm-filters {
        align-items: stretch;
        flex-direction: column;
    }

    .apm-filter-reset {
        width: 100%;
    }
}

/* Case study system */
.apm-case-study-card__metric {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: flex;
    max-width: calc(100% - 28px);
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(7, 17, 31, 0.88);
    color: #D7E3F2;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.025em;
    backdrop-filter: blur(10px);
}

.apm-case-study-card__metric strong {
    color: var(--apm-accent);
    font-size: 20px;
    line-height: 1;
}

.apm-case-study-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
    align-items: start;
    gap: clamp(34px, 6vw, 80px);
    margin-top: clamp(50px, 8vw, 90px);
}

.apm-case-study-main {
    min-width: 0;
}

.apm-case-section {
    padding: 0 0 clamp(52px, 7vw, 82px);
    scroll-margin-top: 110px;
}

.apm-case-section + .apm-case-section {
    padding-top: clamp(52px, 7vw, 82px);
    border-top: 1px solid var(--apm-border);
}

.apm-case-section h2 {
    max-width: 780px;
    margin: 13px 0 22px;
    color: var(--apm-text);
    font-size: clamp(31px, 4vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.apm-case-section .apm-rich-text,
.apm-case-section .apm-rich-text p,
.apm-case-section.apm-editor-content {
    color: var(--apm-muted);
    font-size: 18px;
    line-height: 1.82;
}

.apm-case-section .apm-rich-text p:last-child {
    margin-bottom: 0;
}

.apm-case-section--results {
    position: relative;
}

.apm-case-section--results::before {
    position: absolute;
    inset: clamp(34px, 5vw, 58px) -24px 24px;
    z-index: 0;
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.09), rgba(6, 182, 212, 0.05));
    content: "";
    pointer-events: none;
}

.apm-case-section--results > * {
    position: relative;
    z-index: 1;
}

.apm-case-study-sidebar {
    position: relative;
}

.apm-case-study-sidebar__inner {
    position: sticky;
    top: 110px;
    padding: 24px;
    border: 1px solid var(--apm-border);
    border-radius: 18px;
    background: rgba(16, 24, 40, 0.82);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(14px);
}

.apm-case-study-sidebar nav {
    display: grid;
    gap: 2px;
    margin: 16px 0 22px;
}

.apm-case-study-sidebar nav a {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: #D7E3F2;
    text-decoration: none;
    font-size: 14px;
    font-weight: 650;
    transition: color 150ms ease, padding-left 150ms ease;
}

.apm-case-study-sidebar nav a:hover {
    padding-left: 5px;
    color: var(--apm-accent);
}

.apm-case-study-sidebar .apm-button {
    width: 100%;
    text-align: center;
}

.apm-deliverables-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.apm-deliverables-list li {
    position: relative;
    margin: 0;
    padding: 16px 16px 16px 46px;
    border: 1px solid var(--apm-border);
    border-radius: 12px;
    background: rgba(16, 24, 40, 0.68);
    color: #DCE7F4;
    line-height: 1.5;
}

.apm-deliverables-list li::before {
    position: absolute;
    top: 16px;
    left: 16px;
    display: grid;
    width: 21px;
    height: 21px;
    place-items: center;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.13);
    color: var(--apm-accent);
    content: "✓";
    font-size: 12px;
    font-weight: 800;
}

.apm-testimonial {
    margin: clamp(60px, 9vw, 110px) 0;
    padding: clamp(30px, 5vw, 58px);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 24px;
    background:
        radial-gradient(circle at 90% 0, rgba(6, 182, 212, 0.12), transparent 38%),
        linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(16, 24, 40, 0.92));
}

.apm-testimonial blockquote {
    max-width: 950px;
    margin: 0;
    color: var(--apm-text);
    font-size: clamp(26px, 3.5vw, 44px);
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

.apm-testimonial figcaption {
    margin-top: 22px;
    color: var(--apm-accent);
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.apm-linked-project .apm-project-card {
    display: grid;
    grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1fr);
}

.apm-linked-project .apm-project-card__image {
    min-height: 100%;
}

@media (max-width: 1024px) {
    .apm-case-study-layout {
        grid-template-columns: 1fr;
    }

    .apm-case-study-sidebar__inner {
        position: static;
    }

    .apm-case-study-sidebar nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px 16px;
    }
}

@media (max-width: 760px) {
    .apm-deliverables-list,
    .apm-case-study-sidebar nav,
    .apm-linked-project .apm-project-card {
        grid-template-columns: 1fr;
    }

    .apm-case-section--results::before {
        right: -10px;
        left: -10px;
    }

    .apm-case-study-card__metric {
        right: 10px;
        bottom: 10px;
        left: 10px;
        justify-content: center;
    }
}

/* Version 1.2: editorial case studies and improved archives */
.apm-archive-hero--compact {
    padding: clamp(72px, 8vw, 112px) 0 clamp(58px, 7vw, 88px);
}

.apm-archive-hero--compact h1 {
    font-size: clamp(52px, 6.4vw, 82px);
}

.apm-archive-intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 34px;
}

.apm-archive-intro > div {
    max-width: 760px;
}

.apm-archive-intro h2 {
    margin: 0;
    color: var(--apm-text);
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.apm-archive-count {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 1px solid var(--apm-border);
    border-radius: 999px;
    background: rgba(16, 24, 40, 0.75);
    color: var(--apm-muted);
    font-size: 13px;
    font-weight: 700;
}

.apm-grid-count-1 {
    grid-template-columns: minmax(0, 1fr) !important;
}

.apm-grid-count-1 > .apm-project-card {
    display: grid;
    grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.05fr);
    min-height: 430px;
}

.apm-grid-count-1 > .apm-project-card .apm-project-card__image {
    height: 100%;
    min-height: 430px;
    aspect-ratio: auto;
}

.apm-grid-count-1 > .apm-project-card .apm-project-card__body {
    display: flex;
    padding: clamp(34px, 5vw, 66px);
    flex-direction: column;
    justify-content: center;
}

.apm-grid-count-1 > .apm-project-card h3 {
    max-width: 680px;
    font-size: clamp(34px, 4vw, 54px);
}

.apm-grid-count-1 > .apm-project-card .apm-project-card__body > p:not(.apm-project-card__subtitle) {
    max-width: 680px;
    font-size: 17px;
}

.apm-case-study-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(78px, 9vw, 126px) 0 clamp(68px, 8vw, 106px);
    background:
        radial-gradient(circle at 88% 10%, rgba(6, 182, 212, 0.16), transparent 30%),
        radial-gradient(circle at 8% 80%, rgba(37, 99, 235, 0.18), transparent 38%),
        var(--apm-dark);
}

.apm-case-study-hero__inner {
    max-width: 1040px;
}

.apm-case-study-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--apm-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.apm-case-study-breadcrumb a {
    color: var(--apm-accent);
    text-decoration: none;
}

.apm-case-study-hero h1 {
    max-width: 1000px;
    margin: 0;
    color: var(--apm-text);
    font-size: clamp(46px, 7vw, 86px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.apm-case-study-hero__subtitle {
    max-width: 900px;
    margin: 26px 0 0;
    color: #DDE8F6;
    font-size: clamp(21px, 2.5vw, 31px);
    font-weight: 600;
    line-height: 1.35;
}

.apm-case-study-hero__summary {
    max-width: 820px;
    margin: 18px 0 0;
    color: var(--apm-muted);
    font-size: 18px;
    line-height: 1.75;
}

.apm-case-study-page {
    padding-top: clamp(44px, 6vw, 80px);
    padding-bottom: clamp(80px, 10vw, 140px);
}

.apm-case-study-cover {
    overflow: hidden;
    margin: 0 0 clamp(44px, 7vw, 82px);
    border: 1px solid var(--apm-border);
    border-radius: 26px;
    background: var(--apm-card);
    box-shadow: var(--apm-shadow);
}

.apm-case-study-cover img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

.apm-case-study-layout--editorial {
    grid-template-columns: minmax(0, 790px) minmax(290px, 340px);
    justify-content: space-between;
    gap: clamp(40px, 6vw, 78px);
    margin-top: clamp(44px, 6vw, 76px);
}

.apm-case-study-article {
    min-width: 0;
}

.apm-case-study-body {
    color: #C6D3E3;
    font-size: 18px;
    line-height: 1.82;
}

.apm-case-study-body > *:first-child {
    margin-top: 0;
}

.apm-case-study-body p {
    margin: 0 0 1.45em;
}

.apm-case-study-body .apm-lead,
.apm-case-study-body > p:first-child {
    color: #E5EDF8;
    font-size: clamp(20px, 2.1vw, 24px);
    line-height: 1.65;
}

.apm-case-study-body h2,
.apm-case-study-body h3,
.apm-case-study-body h4 {
    color: var(--apm-text);
    scroll-margin-top: 120px;
}

.apm-case-study-body h2 {
    margin: clamp(64px, 8vw, 96px) 0 24px;
    padding-top: 24px;
    border-top: 1px solid var(--apm-border);
    font-size: clamp(32px, 4.2vw, 52px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.apm-case-study-body h2:first-child {
    margin-top: 0;
}

.apm-case-study-body h3 {
    margin: 44px 0 18px;
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.apm-case-study-body h4 {
    margin: 34px 0 14px;
    font-size: 22px;
    line-height: 1.3;
}

.apm-case-study-body ul,
.apm-case-study-body ol {
    margin: 0 0 28px;
    padding-left: 1.35em;
}

.apm-case-study-body li {
    margin-bottom: 10px;
    padding-left: 5px;
}

.apm-case-study-body a {
    color: var(--apm-accent);
    text-underline-offset: 3px;
}

.apm-case-study-body img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 18px;
}

.apm-case-study-body figure {
    margin: 38px 0 44px;
}

.apm-case-study-body figure img {
    display: block;
    width: 100%;
    margin: 0;
    border: 1px solid var(--apm-border);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.22);
}

.apm-case-study-body figcaption,
.apm-case-study-body .wp-caption-text {
    margin-top: 12px;
    color: var(--apm-muted);
    font-size: 13px;
    line-height: 1.55;
    text-align: center;
}

.apm-case-study-body blockquote {
    margin: 42px 0;
    padding: 28px 30px;
    border: 1px solid rgba(6, 182, 212, 0.22);
    border-left: 4px solid var(--apm-accent);
    border-radius: 16px;
    background: rgba(16, 24, 40, 0.82);
    color: #E3EDF8;
    font-size: 21px;
    line-height: 1.65;
}

.apm-case-study-body table {
    width: 100%;
    margin: 34px 0;
    border-collapse: collapse;
    border: 1px solid var(--apm-border);
    color: #D6E2F1;
}

.apm-case-study-body th,
.apm-case-study-body td {
    padding: 14px 16px;
    border: 1px solid var(--apm-border);
    text-align: left;
    vertical-align: top;
}

.apm-case-study-body th {
    background: rgba(37, 99, 235, 0.13);
    color: var(--apm-text);
}

.apm-content-callout,
.apm-result-callout {
    margin: 38px 0;
    padding: clamp(24px, 4vw, 36px);
    border: 1px solid var(--apm-border);
    border-radius: 18px;
    background: rgba(16, 24, 40, 0.8);
}

.apm-result-callout {
    border-color: rgba(6, 182, 212, 0.26);
    background:
        radial-gradient(circle at 100% 0, rgba(6, 182, 212, 0.12), transparent 38%),
        linear-gradient(135deg, rgba(37, 99, 235, 0.11), rgba(16, 24, 40, 0.9));
}

.apm-content-callout > *:last-child,
.apm-result-callout > *:last-child {
    margin-bottom: 0;
}

.apm-check-list {
    display: grid;
    gap: 12px;
    margin: 28px 0 38px !important;
    padding: 0 !important;
    list-style: none;
}

.apm-check-list li {
    position: relative;
    margin: 0 !important;
    padding: 15px 16px 15px 48px !important;
    border: 1px solid var(--apm-border);
    border-radius: 12px;
    background: rgba(16, 24, 40, 0.68);
}

.apm-check-list li::before {
    position: absolute;
    top: 15px;
    left: 16px;
    display: grid;
    width: 21px;
    height: 21px;
    place-items: center;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.13);
    color: var(--apm-accent);
    content: "✓";
    font-size: 12px;
    font-weight: 800;
}

.apm-case-study-sidebar--contact {
    min-width: 0;
}

.apm-case-study-sidebar__sticky {
    position: sticky;
    top: 100px;
    display: grid;
    gap: 18px;
}

.apm-sticky-contact-card,
.apm-sidebar-panel {
    padding: 24px;
    border: 1px solid var(--apm-border);
    border-radius: 18px;
    background: rgba(16, 24, 40, 0.9);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(14px);
}

.apm-sticky-contact-card {
    position: relative;
    overflow: hidden;
    border-color: rgba(6, 182, 212, 0.3);
    background:
        radial-gradient(circle at 100% 0, rgba(6, 182, 212, 0.19), transparent 42%),
        linear-gradient(145deg, rgba(37, 99, 235, 0.18), rgba(16, 24, 40, 0.96));
}

.apm-sticky-contact-card__label {
    display: block;
    margin-bottom: 12px;
    color: var(--apm-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.apm-sticky-contact-card h2,
.apm-sidebar-panel h2 {
    margin: 0;
    color: var(--apm-text);
    letter-spacing: -0.025em;
}

.apm-sticky-contact-card h2 {
    font-size: 29px;
    line-height: 1.15;
}

.apm-sticky-contact-card p {
    margin: 14px 0 20px;
    color: var(--apm-muted);
    font-size: 15px;
    line-height: 1.65;
}

.apm-sticky-contact-card .apm-button {
    width: 100%;
}

.apm-sidebar-panel h2 {
    margin-bottom: 16px;
    font-size: 18px;
}

.apm-sidebar-toc nav {
    display: grid;
    max-height: 360px;
    overflow: auto;
    padding-right: 4px;
}

.apm-sidebar-toc a {
    padding: 9px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: #CBD8E8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
    transition: color 160ms ease, padding-left 160ms ease;
}

.apm-sidebar-toc a:hover,
.apm-sidebar-toc a.is-active {
    padding-left: 5px;
    color: var(--apm-accent);
}

.apm-sidebar-toc .apm-toc-level-3 {
    padding-left: 14px;
    color: var(--apm-muted);
    font-size: 12px;
}

.apm-sidebar-details dl,
.apm-sidebar-details dd {
    margin: 0;
}

.apm-sidebar-details dl {
    display: grid;
    gap: 14px;
}

.apm-sidebar-details dl > div {
    padding-bottom: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.apm-sidebar-details dl > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.apm-sidebar-details dt {
    margin-bottom: 4px;
    color: var(--apm-accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.apm-sidebar-details dd {
    color: #D8E4F2;
    font-size: 13px;
    line-height: 1.55;
}

.apm-testimonial--inside-article {
    margin: clamp(60px, 8vw, 90px) 0 0;
}

.apm-testimonial--inside-article blockquote {
    font-size: clamp(24px, 3vw, 38px);
}

.apm-case-study-article .apm-gallery-section {
    margin-top: clamp(60px, 8vw, 92px);
}

@media (max-width: 1024px) {
    .apm-grid-count-1 > .apm-project-card {
        grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
    }

    .apm-case-study-layout--editorial {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 38px;
    }
}

@media (max-width: 860px) {
    .apm-case-study-layout--editorial {
        grid-template-columns: 1fr;
    }

    .apm-case-study-sidebar__sticky {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .apm-sticky-contact-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .apm-archive-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .apm-grid-count-1 > .apm-project-card {
        display: block;
        min-height: 0;
    }

    .apm-grid-count-1 > .apm-project-card .apm-project-card__image {
        min-height: 0;
        aspect-ratio: 16 / 10;
    }

    .apm-grid-count-1 > .apm-project-card .apm-project-card__body {
        padding: 26px;
    }

    .apm-grid-count-1 > .apm-project-card h3 {
        font-size: 30px;
    }

    .apm-case-study-hero {
        padding-top: 64px;
    }

    .apm-case-study-body {
        font-size: 17px;
        line-height: 1.75;
    }

    .apm-case-study-body h2 {
        margin-top: 58px;
    }

    .apm-case-study-sidebar__sticky {
        grid-template-columns: 1fr;
    }

    .apm-sticky-contact-card {
        grid-column: auto;
    }
}

/* v2 visual portfolio showcase */
.apm-project-showcase-hero {
    background:
        radial-gradient(circle at 15% 0, rgba(37, 99, 235, 0.2), transparent 36%),
        radial-gradient(circle at 88% 10%, rgba(6, 182, 212, 0.14), transparent 30%),
        var(--apm-dark);
}

.apm-project-cover {
    max-height: 760px;
}

.apm-project-cover img {
    width: 100%;
    max-height: 760px;
    object-fit: cover;
    object-position: center top;
}

.apm-gallery-section .apm-section-heading p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--apm-muted);
    font-size: 15px;
    line-height: 1.7;
}

.apm-showcase-stack {
    display: grid;
    gap: clamp(24px, 4vw, 46px);
}

.apm-showcase-item {
    overflow: hidden;
    margin: 0;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
}

.apm-showcase-item > a {
    display: block;
    cursor: zoom-in;
}

.apm-showcase-item img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

.apm-showcase-item figcaption {
    padding: 14px 18px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.apm-gallery-section--grid .apm-showcase-item {
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.apm-project-fixed-sections {
    margin-top: clamp(55px, 8vw, 90px);
}

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

.apm-lightbox {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(2, 6, 23, 0.94);
    backdrop-filter: blur(8px);
}

.apm-lightbox__stage {
    display: grid;
    max-width: min(94vw, 1500px);
    max-height: 91vh;
    gap: 12px;
    justify-items: center;
}

.apm-lightbox__stage img {
    display: block;
    max-width: 100%;
    max-height: calc(91vh - 44px);
    width: auto;
    height: auto;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.65);
}

.apm-lightbox__stage p {
    margin: 0;
    color: #dbeafe;
    font-size: 13px;
    text-align: center;
}

.apm-lightbox__close {
    position: fixed;
    top: 18px;
    right: 22px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    cursor: pointer;
    font-size: 30px;
    line-height: 1;
}

.apm-lightbox__close:hover {
    border-color: var(--apm-accent);
    color: var(--apm-accent);
}

@media (max-width: 760px) {
    .apm-lightbox {
        padding: 14px;
    }

    .apm-lightbox__close {
        top: 10px;
        right: 10px;
    }

    .apm-showcase-stack {
        gap: 20px;
    }

    .apm-showcase-item {
        border-radius: 12px;
    }
}

.apm-filters input[type="search"] {
    min-height: 48px;
    width: 100%;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--apm-border);
    border-radius: 11px;
    background-color: var(--apm-slate);
    color: var(--apm-text);
    font: inherit;
    text-transform: none;
}

.apm-filters input[type="search"]::placeholder {
    color: #7f8da3;
}

/* v2.1 project hero screenshot layout */
.apm-project-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 0.86fr) minmax(420px, 1.14fr);
    align-items: center;
    gap: clamp(44px, 6vw, 90px);
    max-width: 1320px;
}

.apm-project-hero__inner .apm-case-study-hero__copy {
    min-width: 0;
}

.apm-project-hero__inner .apm-case-study-hero h1,
.apm-project-hero__inner h1 {
    max-width: 760px;
    font-size: clamp(44px, 5.4vw, 76px);
}

.apm-project-hero__screenshot {
    position: relative;
    overflow: hidden;
    margin: 0;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
    transform: perspective(1500px) rotateY(-3deg) rotateX(1deg);
}

.apm-project-hero__browserbar {
    display: flex;
    height: 42px;
    align-items: center;
    gap: 8px;
    padding: 0 17px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
    background: #101828;
}

.apm-project-hero__browserbar i {
    display: block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.42);
}

.apm-project-hero__screenshot img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 650px;
    margin: 0;
    object-fit: cover;
    object-position: center top;
}

.apm-case-study-page > .apm-stats:first-child {
    margin-top: 0;
}

@media (max-width: 1080px) {
    .apm-project-hero__inner {
        grid-template-columns: 1fr;
    }

    .apm-project-hero__screenshot {
        max-width: 920px;
        transform: none;
    }
}

@media (max-width: 760px) {
    .apm-project-hero__inner {
        gap: 38px;
    }

    .apm-project-hero__screenshot {
        border-radius: 16px;
    }

    .apm-project-hero__browserbar {
        height: 34px;
    }

    .apm-project-hero__screenshot img {
        max-height: 440px;
    }
}

/* APM 3.0 Autopilot editorial visuals */
.apm-inline-project-image {
    margin: 42px 0 48px;
    padding: 0;
}
.apm-inline-project-image a {
    display: block;
    border-radius: 18px;
    overflow: hidden;
    background: #0b1626;
    border: 1px solid rgba(148, 163, 184, .18);
    box-shadow: 0 20px 50px rgba(2, 8, 23, .12);
}
.apm-inline-project-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 760px;
    object-fit: cover;
    object-position: top center;
}
.apm-inline-project-image figcaption {
    margin-top: 10px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}
.apm-inline-cta {
    margin: 48px 0;
    padding: 34px;
    border-radius: 20px;
    background: linear-gradient(135deg, #07111F 0%, #0b2340 62%, #0e5064 100%);
    border: 1px solid rgba(6, 182, 212, .28);
    color: #fff;
    box-shadow: 0 24px 60px rgba(2, 8, 23, .16);
}
.apm-inline-cta .apm-eyebrow { color: #67e8f9; }
.apm-inline-cta h3 {
    margin: 8px 0 10px;
    color: #fff;
    font-size: clamp(25px, 3vw, 36px);
    line-height: 1.12;
}
.apm-inline-cta p {
    margin: 0 0 22px;
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.75;
}
.apm-showcase-item img { width: 100%; height: auto; display: block; }

@media (max-width: 767px) {
    .apm-inline-project-image { margin: 28px 0 34px; }
    .apm-inline-project-image a { border-radius: 12px; }
    .apm-inline-cta { margin: 34px 0; padding: 24px 20px; border-radius: 16px; }
}
.apm-inline-project-image[data-apm-project-visual="2"] img,
.apm-inline-project-image[data-apm-project-visual="3"] img {
    height: clamp(340px, 46vw, 620px);
    object-fit: cover;
}
.apm-inline-project-image[data-apm-project-visual="2"] img { object-position: center center; }
.apm-inline-project-image[data-apm-project-visual="3"] img { object-position: center bottom; }

/* =========================================================
   APM 4.0 — 77-case-study premium editorial system
   ========================================================= */
.apm-single-case-study {
    --apm-case-accent: #2563EB;
    --apm-case-accent-2: #06B6D4;
    background: #f8fafc;
}
.apm-cs-premium-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(54px, 7vw, 96px) 0 clamp(48px, 7vw, 88px);
    background:
        radial-gradient(circle at 84% 16%, color-mix(in srgb, var(--apm-case-accent-2) 28%, transparent), transparent 32%),
        radial-gradient(circle at 20% 80%, color-mix(in srgb, var(--apm-case-accent) 23%, transparent), transparent 38%),
        linear-gradient(135deg, #06101d 0%, #07111f 52%, #0b1e35 100%);
    color: #fff;
}
.apm-cs-premium-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .32;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, #000, transparent 82%);
}
.apm-cs-premium-hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, .93fr) minmax(420px, 1.07fr);
    gap: clamp(46px, 6vw, 88px);
    align-items: center;
}
.apm-cs-premium-hero .apm-case-study-breadcrumb,
.apm-cs-premium-hero .apm-case-study-breadcrumb a { color: #94a3b8; }
.apm-cs-premium-hero .apm-case-study-breadcrumb span:last-child { color: #cbd5e1; }
.apm-cs-kicker {
    display: inline-flex;
    margin: 18px 0 14px;
    color: var(--apm-case-accent-2);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.apm-cs-premium-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(42px, 5.2vw, 72px);
    line-height: .98;
    letter-spacing: -.045em;
    max-width: 900px;
}
.apm-cs-premium-hero .apm-case-study-hero__subtitle {
    margin-top: 22px;
    color: #dbeafe;
    font-size: clamp(20px, 2.1vw, 28px);
    line-height: 1.35;
    max-width: 760px;
}
.apm-cs-premium-hero .apm-case-study-hero__summary {
    color: #aebed3;
    max-width: 760px;
    font-size: 16px;
    line-height: 1.75;
}
.apm-cs-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 24px 0 0;
}
.apm-cs-hero-tags span {
    display: inline-flex;
    padding: 8px 12px;
    border: 1px solid rgba(148,163,184,.22);
    border-radius: 999px;
    background: rgba(15,23,42,.46);
    color: #dbeafe;
    font-size: 12px;
    font-weight: 700;
}
.apm-cs-hero-visual {
    position: relative;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(148,163,184,.22);
    border-radius: 24px;
    background: #0b1626;
    box-shadow: 0 40px 90px rgba(0,0,0,.38), 0 0 0 1px rgba(255,255,255,.025) inset;
    transform: perspective(1400px) rotateY(-3deg) rotateX(1deg);
}
.apm-cs-browserbar {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 16px;
    background: #101828;
    border-bottom: 1px solid rgba(148,163,184,.18);
}
.apm-cs-browserbar i { width: 8px; height: 8px; display: block; border-radius: 50%; background: rgba(255,255,255,.4); }
.apm-cs-hero-visual__image img { width: 100%; height: auto; max-height: 650px; object-fit: cover; object-position: top center; display: block; }
.apm-cs-story-intro {
    margin: 0 0 36px;
    padding: 26px 30px;
    border: 1px solid #dce5f0;
    border-left: 4px solid var(--apm-case-accent);
    border-radius: 18px;
    background: #fff;
}
.apm-cs-story-intro p { margin: 8px 0 0; color: #475569; }
.apm-case-study-body > h2 {
    scroll-margin-top: 120px;
    margin-top: 58px;
}
.apm-case-study-body > h2:first-child { margin-top: 0; }
.apm-case-study-body a:not(.apm-button) { color: var(--apm-case-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.apm-case-study-body a:not(.apm-button):hover { color: var(--apm-case-accent-2); }
.apm-cs-process-grid {
    list-style: none;
    margin: 28px 0 40px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    counter-reset: none;
}
.apm-cs-process-grid li {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 15px;
    align-items: start;
    padding: 22px;
    border-radius: 16px;
    border: 1px solid #e1e8f2;
    background: linear-gradient(145deg, #fff 0%, #f8fbff 100%);
    box-shadow: 0 10px 28px rgba(15,23,42,.045);
}
.apm-cs-process-grid li > span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--apm-case-accent), var(--apm-case-accent-2));
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}
.apm-cs-process-grid h3 { margin: 0 0 7px; color: #0f172a; font-size: 18px; }
.apm-cs-process-grid p { margin: 0; color: #64748b; font-size: 14px; line-height: 1.65; }

.apm-cs-visual {
    margin: 44px 0 54px;
    position: relative;
}
.apm-cs-visual__media {
    display: grid;
    gap: 14px;
}
.apm-cs-visual__image {
    display: block;
    overflow: hidden;
    border-radius: 20px;
    background: #0b1626;
    border: 1px solid rgba(15,23,42,.11);
    box-shadow: 0 25px 65px rgba(15,23,42,.14);
}
.apm-cs-visual img { display: block; width: 100%; height: auto; max-height: 820px; object-fit: cover; object-position: top center; transition: transform .35s ease; }
.apm-cs-visual__image:hover img { transform: scale(1.01); }
.apm-cs-visual figcaption { margin-top: 11px; color: #64748b; font-size: 13px; }
.apm-cs-visual--browser { border-radius: 22px; background: #101828; overflow: hidden; box-shadow: 0 25px 65px rgba(15,23,42,.16); }
.apm-cs-visual--browser .apm-cs-visual__image { border: 0; border-radius: 0; box-shadow: none; }
.apm-cs-visual--browser figcaption { padding: 0 18px 15px; color: #cbd5e1; }
.apm-cs-visual--pair .apm-cs-visual__media { grid-template-columns: 1.1fr .9fr; align-items: stretch; }
.apm-cs-visual--pair .apm-cs-visual__image:nth-child(2) img { height: 100%; min-height: 410px; object-position: center; }
.apm-cs-visual--offset { width: calc(100% + 90px); margin-left: -45px; }
.apm-cs-visual--offset .apm-cs-visual__image { border-radius: 28px; }
.apm-cs-visual--stack .apm-cs-visual__media { grid-template-columns: 1fr 1fr; }
.apm-cs-visual--stack .apm-cs-visual__image:nth-child(2) { transform: translateY(32px); }
.apm-cs-visual--stack { margin-bottom: 82px; }

.apm-cs-inline-cta {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    align-items: center;
    margin: 54px 0;
    padding: 34px 36px;
    border-radius: 22px;
    background:
        radial-gradient(circle at 88% 30%, color-mix(in srgb, var(--apm-case-accent-2) 28%, transparent), transparent 34%),
        linear-gradient(135deg, #07111f 0%, #0b1e35 100%);
    color: #fff;
    box-shadow: 0 24px 60px rgba(2,8,23,.15);
}
.apm-cs-inline-cta h3 { margin: 7px 0 9px; color: #fff; font-size: clamp(25px, 3vw, 36px); line-height: 1.15; }
.apm-cs-inline-cta p { margin: 0; color: #cbd5e1; line-height: 1.7; }
.apm-cs-inline-cta .apm-eyebrow { color: var(--apm-case-accent-2); }

.apm-cs-service-links {
    margin: 58px 0 18px;
    padding: 32px;
    border: 1px solid #dce5f0;
    border-radius: 22px;
    background: #fff;
}
.apm-cs-service-links h2 { margin: 8px 0 22px !important; }
.apm-cs-service-links__grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.apm-cs-service-links__grid a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-radius: 14px;
    background: #f7faff;
    border: 1px solid #e2e8f0;
    color: #0f172a !important;
    text-decoration: none !important;
    font-weight: 700;
    transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.apm-cs-service-links__grid a:hover { transform: translateY(-2px); border-color: var(--apm-case-accent-2); background: #fff; }
.apm-cs-service-links__grid b { color: var(--apm-case-accent); font-size: 19px; }
.apm-cs-sticky-card { border-top: 4px solid var(--apm-case-accent-2); }
.apm-cs-project-link {
    display: block;
    margin-top: 14px;
    padding: 18px;
    border: 1px solid rgba(148,163,184,.22);
    border-radius: 16px;
    background: #0b1626;
    color: #fff;
    text-decoration: none;
}
.apm-cs-project-link span { display: block; margin-bottom: 4px; color: #94a3b8; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.apm-cs-project-link strong { color: #fff; }
.apm-cs-final-cta { background: linear-gradient(135deg, #07111f, #0d2747 65%, color-mix(in srgb, var(--apm-case-accent) 70%, #07111f)); }

/* Twelve deterministic layout signatures keep the 77 case studies visually varied
   while retaining the Avenzo design system. */
.apm-cs-layout-2 .apm-cs-premium-hero__inner,
.apm-cs-layout-6 .apm-cs-premium-hero__inner,
.apm-cs-layout-10 .apm-cs-premium-hero__inner { grid-template-columns: minmax(420px,1.08fr) minmax(0,.92fr); }
.apm-cs-layout-2 .apm-cs-hero-visual,
.apm-cs-layout-6 .apm-cs-hero-visual,
.apm-cs-layout-10 .apm-cs-hero-visual { order: -1; transform: perspective(1400px) rotateY(3deg) rotateX(1deg); }
.apm-cs-layout-3 .apm-cs-premium-hero__inner,
.apm-cs-layout-7 .apm-cs-premium-hero__inner,
.apm-cs-layout-11 .apm-cs-premium-hero__inner { grid-template-columns: 1fr; text-align: center; }
.apm-cs-layout-3 .apm-case-study-hero__copy,
.apm-cs-layout-7 .apm-case-study-hero__copy,
.apm-cs-layout-11 .apm-case-study-hero__copy { max-width: 950px; margin: auto; }
.apm-cs-layout-3 .apm-cs-hero-tags,
.apm-cs-layout-7 .apm-cs-hero-tags,
.apm-cs-layout-11 .apm-cs-hero-tags,
.apm-cs-layout-3 .apm-project-hero__actions,
.apm-cs-layout-7 .apm-project-hero__actions,
.apm-cs-layout-11 .apm-project-hero__actions { justify-content: center; }
.apm-cs-layout-3 .apm-cs-hero-visual,
.apm-cs-layout-7 .apm-cs-hero-visual,
.apm-cs-layout-11 .apm-cs-hero-visual { max-width: 1050px; margin: 0 auto; transform: none; }
.apm-cs-layout-4 .apm-cs-hero-visual,
.apm-cs-layout-8 .apm-cs-hero-visual,
.apm-cs-layout-12 .apm-cs-hero-visual { border-radius: 8px 40px 8px 40px; }
.apm-cs-layout-5 .apm-cs-premium-hero,
.apm-cs-layout-9 .apm-cs-premium-hero { background: linear-gradient(160deg,#050c16 0%,#07111f 55%,#101d30 100%); }
.apm-cs-layout-5 .apm-cs-hero-visual,
.apm-cs-layout-9 .apm-cs-hero-visual { transform: translateY(22px) rotate(-1deg); }
.apm-cs-layout-6 .apm-cs-process-grid li:nth-child(even),
.apm-cs-layout-12 .apm-cs-process-grid li:nth-child(even) { transform: translateY(12px); }
.apm-cs-layout-8 .apm-cs-story-intro,
.apm-cs-layout-11 .apm-cs-story-intro { border-left-width: 1px; border-top: 4px solid var(--apm-case-accent-2); }

@media (max-width: 1080px) {
    .apm-cs-premium-hero__inner,
    .apm-cs-layout-2 .apm-cs-premium-hero__inner,
    .apm-cs-layout-6 .apm-cs-premium-hero__inner,
    .apm-cs-layout-10 .apm-cs-premium-hero__inner { grid-template-columns: 1fr; }
    .apm-cs-layout-2 .apm-cs-hero-visual,
    .apm-cs-layout-6 .apm-cs-hero-visual,
    .apm-cs-layout-10 .apm-cs-hero-visual { order: initial; }
    .apm-cs-hero-visual { max-width: 960px; transform: none !important; }
    .apm-cs-visual--offset { width: 100%; margin-left: 0; }
}
@media (max-width: 760px) {
    .apm-cs-premium-hero { padding: 48px 0 58px; }
    .apm-cs-premium-hero h1 { font-size: clamp(36px, 11vw, 54px); }
    .apm-cs-process-grid { grid-template-columns: 1fr; }
    .apm-cs-visual--pair .apm-cs-visual__media,
    .apm-cs-visual--stack .apm-cs-visual__media { grid-template-columns: 1fr; }
    .apm-cs-visual--stack .apm-cs-visual__image:nth-child(2) { transform: none; }
    .apm-cs-visual--stack { margin-bottom: 48px; }
    .apm-cs-inline-cta { grid-template-columns: 1fr; padding: 26px 22px; }
    .apm-cs-service-links { padding: 24px 18px; }
    .apm-cs-service-links__grid { grid-template-columns: 1fr; }
    .apm-cs-visual img { max-height: 620px; }
}

/* APM 4.0 case-study archive and complete gallery refinements */
.apm-cs-archive-hero-actions{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-top:28px;
}
.apm-project-card__actions{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:14px;
    margin-top:18px;
}
.apm-project-card__link--case{
    color:var(--apm-aqua,#06B6D4);
}
.apm-cs-complete-gallery{
    margin-top:clamp(56px,8vw,100px);
    padding:clamp(28px,5vw,52px);
    border:1px solid rgba(148,163,184,.15);
    border-radius:28px;
    background:linear-gradient(145deg,rgba(7,17,31,.98),rgba(16,24,40,.97));
    box-shadow:0 28px 70px rgba(2,6,23,.22);
}
.apm-cs-complete-gallery .apm-section-heading{
    max-width:780px;
    margin-bottom:28px;
}
.apm-cs-complete-gallery .apm-section-heading p{
    color:#98A2B3;
    line-height:1.75;
}
.apm-cs-gallery-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:20px;
}
.apm-cs-gallery-item{
    position:relative;
    display:block;
    overflow:hidden;
    border:1px solid rgba(148,163,184,.15);
    border-radius:18px;
    background:#08111f;
    text-decoration:none;
    transition:transform .25s ease,border-color .25s ease,box-shadow .25s ease;
}
.apm-cs-gallery-item:hover{
    transform:translateY(-4px);
    border-color:rgba(6,182,212,.55);
    box-shadow:0 20px 44px rgba(2,6,23,.34);
}
.apm-cs-gallery-item img{
    display:block;
    width:100%;
    height:auto;
    max-height:760px;
    object-fit:cover;
    object-position:top center;
    background:#fff;
}
.apm-cs-gallery-number{
    position:absolute;
    z-index:2;
    top:12px;
    left:12px;
    min-width:42px;
    padding:7px 9px;
    border:1px solid rgba(255,255,255,.18);
    border-radius:999px;
    background:rgba(7,17,31,.82);
    color:#fff;
    font-size:11px;
    font-weight:800;
    letter-spacing:.12em;
    text-align:center;
    backdrop-filter:blur(10px);
}
.apm-cs-gallery-caption{
    display:block;
    padding:13px 16px 16px;
    color:#D0D5DD;
    font-size:13px;
    line-height:1.45;
}
@media (max-width:760px){
    .apm-cs-gallery-grid{grid-template-columns:1fr;}
    .apm-cs-complete-gallery{padding:22px 16px;border-radius:20px;}
}

/* Every seeded case study receives a deterministic 1–77 design signature. */
.apm-single-case-study .apm-cs-premium-hero{
    position:relative;
    isolation:isolate;
}
.apm-single-case-study .apm-cs-premium-hero::before{
    content:"";
    position:absolute;
    inset:0;
    z-index:-1;
    background:
        linear-gradient(var(--apm-cs-angle,135deg), color-mix(in srgb,var(--apm-case-accent) 20%,transparent), transparent 46%),
        radial-gradient(circle at calc(72% + var(--apm-cs-shift,0px)) 34%, color-mix(in srgb,var(--apm-case-accent-2) 22%,transparent), transparent 34%);
    pointer-events:none;
}
.apm-single-case-study .apm-cs-hero-visual,
.apm-single-case-study .apm-cs-visual,
.apm-single-case-study .apm-cs-gallery-item{
    border-radius:var(--apm-cs-radius,24px);
}
.apm-single-case-study .apm-case-study-body{
    --apm-cs-story-gap:var(--apm-cs-gap,24px);
}
.apm-single-case-study .apm-case-study-body > h2{
    margin-top:calc(52px + var(--apm-cs-gap,24px));
}
.apm-single-case-study .apm-cs-story-intro{
    transform:translateX(calc(var(--apm-cs-shift,0px) / 3));
}
.apm-lightbox__nav{
    position:fixed;
    z-index:3;
    top:50%;
    transform:translateY(-50%);
    width:52px;
    height:52px;
    border:1px solid rgba(255,255,255,.2);
    border-radius:999px;
    background:rgba(7,17,31,.82);
    color:#fff;
    font-size:38px;
    line-height:1;
    cursor:pointer;
    backdrop-filter:blur(10px);
}
.apm-lightbox__nav--prev{left:22px;}
.apm-lightbox__nav--next{right:22px;}
.apm-lightbox__meta{
    display:flex;
    justify-content:space-between;
    gap:20px;
    align-items:center;
    color:#D0D5DD;
}
.apm-lightbox__meta p{margin:10px 0 0;}
.apm-lightbox__meta span{white-space:nowrap;font-size:12px;font-weight:800;letter-spacing:.08em;}
@media (max-width:700px){
    .apm-lightbox__nav{width:42px;height:42px;font-size:30px;}
    .apm-lightbox__nav--prev{left:8px;}
    .apm-lightbox__nav--next{right:8px;}
}

/* =========================================================
   APM 4.3 — Case Study Readability / Theme Conflict Repair
   The V4 editorial body uses a light canvas while the legacy
   V1/V2 variables were designed for dark pages. These scoped
   rules keep dark hero/sidebar components intact and make the
   light editorial content fully readable.
   ========================================================= */
.apm-single-case-study .apm-case-study-page {
    color: #334155;
    background: #f8fafc;
}

.apm-single-case-study .apm-case-study-layout--editorial {
    align-items: start;
}

.apm-single-case-study .apm-case-study-article {
    color: #334155;
}

.apm-single-case-study .apm-case-study-body {
    color: #475569;
    font-size: 18px;
    line-height: 1.82;
}

.apm-single-case-study .apm-case-study-body > p,
.apm-single-case-study .apm-case-study-body > ul:not(.apm-check-list),
.apm-single-case-study .apm-case-study-body > ol:not(.apm-cs-process-grid),
.apm-single-case-study .apm-case-study-body > ul:not(.apm-check-list) li,
.apm-single-case-study .apm-case-study-body > ol:not(.apm-cs-process-grid) li {
    color: #475569;
}

.apm-single-case-study .apm-case-study-body > p:first-child,
.apm-single-case-study .apm-case-study-body .apm-lead {
    color: #334155;
}

.apm-single-case-study .apm-case-study-body > h2,
.apm-single-case-study .apm-case-study-body > h3,
.apm-single-case-study .apm-case-study-body > h4 {
    color: #0f172a;
}

.apm-single-case-study .apm-case-study-body > p strong,
.apm-single-case-study .apm-case-study-body > li strong,
.apm-single-case-study .apm-case-study-body > ul li strong,
.apm-single-case-study .apm-case-study-body > ol li strong {
    color: #172033;
}

/* Process cards are light cards nested inside the article. */
.apm-single-case-study .apm-cs-process-grid li {
    color: #475569;
}
.apm-single-case-study .apm-cs-process-grid h3 {
    color: #0f172a;
}
.apm-single-case-study .apm-cs-process-grid p {
    color: #526174;
}
.apm-single-case-study .apm-cs-process-grid strong {
    color: #172033;
}

/* Related service block is also a light surface. */
.apm-single-case-study .apm-cs-service-links,
.apm-single-case-study .apm-cs-service-links p {
    color: #475569;
}
.apm-single-case-study .apm-cs-service-links h2,
.apm-single-case-study .apm-cs-service-links h3 {
    color: #0f172a;
}

/* Explicitly keep dark callouts readable after the light body repair. */
.apm-single-case-study .apm-content-callout,
.apm-single-case-study .apm-result-callout,
.apm-single-case-study .apm-content-callout p,
.apm-single-case-study .apm-result-callout p,
.apm-single-case-study .apm-content-callout li,
.apm-single-case-study .apm-result-callout li {
    color: #d6e2f1;
}
.apm-single-case-study .apm-content-callout h2,
.apm-single-case-study .apm-content-callout h3,
.apm-single-case-study .apm-content-callout h4,
.apm-single-case-study .apm-result-callout h2,
.apm-single-case-study .apm-result-callout h3,
.apm-single-case-study .apm-result-callout h4,
.apm-single-case-study .apm-content-callout strong,
.apm-single-case-study .apm-result-callout strong {
    color: #f8fafc;
}

/* Check-list cards are dark in the legacy component set. */
.apm-single-case-study .apm-check-list li {
    color: #dce7f4;
}
.apm-single-case-study .apm-check-list strong {
    color: #f8fafc;
}

/* Tables inside the light editorial canvas. */
.apm-single-case-study .apm-case-study-body table {
    border-color: #dbe4ee;
    background: #ffffff;
    color: #475569;
}
.apm-single-case-study .apm-case-study-body th,
.apm-single-case-study .apm-case-study-body td {
    border-color: #dbe4ee;
}
.apm-single-case-study .apm-case-study-body th {
    background: #eef4ff;
    color: #0f172a;
}

/* Preserve premium dark components regardless of theme/global CSS. */
.apm-single-case-study .apm-cs-premium-hero,
.apm-single-case-study .apm-sticky-contact-card,
.apm-single-case-study .apm-sidebar-panel,
.apm-single-case-study .apm-cs-inline-cta,
.apm-single-case-study .apm-cs-final-cta,
.apm-single-case-study .apm-cs-complete-gallery,
.apm-single-case-study .apm-cs-project-link {
    color: #eaf1fa;
}
.apm-single-case-study .apm-sticky-contact-card h2,
.apm-single-case-study .apm-sidebar-panel h2,
.apm-single-case-study .apm-cs-inline-cta h3,
.apm-single-case-study .apm-cs-final-cta h2,
.apm-single-case-study .apm-cs-complete-gallery h2 {
    color: #f8fafc;
}
.apm-single-case-study .apm-sticky-contact-card p,
.apm-single-case-study .apm-cs-inline-cta p,
.apm-single-case-study .apm-cs-complete-gallery p {
    color: #cbd5e1;
}

/* Improve editorial rhythm and prevent theme paragraph rules from washing text out. */
.apm-single-case-study .apm-case-study-body > p {
    margin-bottom: 1.35em;
}
.apm-single-case-study .apm-case-study-body > h2 {
    margin-bottom: 22px;
}
.apm-single-case-study .apm-case-study-body > h3 {
    margin-bottom: 15px;
}

@media (max-width: 760px) {
    .apm-single-case-study .apm-case-study-body {
        color: #475569;
        font-size: 17px;
        line-height: 1.75;
    }
}
