/* ==========================================================
   ATRABYTE — PORTFOLIO DETAIL
   Full rewrite / 2026
   ========================================================== */

.project-detail {
    --pd-bg: #f9f9fd;
    --pd-surface: #f2f3f9;
    --pd-surface-2: #f6f6fb;
    --pd-text: #10121f;
    --pd-muted: #747887;
    --pd-soft: #a0a3af;
    --pd-border: #e5e6ee;
    --pd-purple: #6758ff;
    --pd-purple-soft: #efedff;
    --pd-dark: #0c0f1c;
    --pd-container: 1180px;
    --pd-wide: 1420px;

    width: 100%;
    overflow: hidden;
    background: var(--pd-bg);
    color: var(--pd-text);
}

.project-container {
    width: min(var(--pd-container), calc(100% - 64px));
    margin-inline: auto;
}

.project-detail h1,
.project-detail h2,
.project-detail h3,
.project-detail p {
    margin-top: 0;
}

.project-detail img {
    max-width: 100%;
}

.project-detail em {
    color: var(--pd-purple);
    font-style: normal;
}

html[dir="rtl"] .project-detail {
    font-family: "Estedad", sans-serif;
}

html[dir="ltr"] .project-detail {
    font-family: "Archivo", sans-serif;
}


/* ==========================================================
   HERO
   Visual LEFT / Content RIGHT in every language
   ========================================================== */

.project-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 18px 0 58px;
    background:
        radial-gradient(circle at 18% 44%, rgba(103, 88, 255, .11), transparent 29%),
        radial-gradient(circle at 43% 52%, rgba(137, 122, 255, .045), transparent 26%),
        #fafafe;
}

.project-hero .project-container {
    width: min(var(--pd-wide), calc(100% - 72px));
}

.project-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    min-width: 0;
    gap: 7px;
    margin: 0 0 12px;
    color: var(--pd-soft);
    font-size: 9px;
    line-height: 1.5;
    font-weight: 500;
}

.project-breadcrumb a {
    flex: 0 0 auto;
    color: #858995;
    text-decoration: none;
    transition: color .18s ease;
}

.project-breadcrumb a:hover {
    color: var(--pd-purple);
}

.project-breadcrumb > span:not([aria-current="page"]) {
    flex: 0 0 auto;
    color: #c5c7cf;
}

.project-breadcrumb [aria-current="page"] {
    min-width: 0;
    max-width: 220px;
    overflow: hidden;
    color: #a3a6b1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
    grid-template-areas: "visual content";
    align-items: center;
    gap: clamp(46px, 5vw, 86px);
    min-height: 480px;
}

.project-hero__visual {
    grid-area: visual;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 470px;
}

.project-hero__content {
    grid-area: content;
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 560px;
    min-width: 0;
}

html[dir="rtl"] .project-hero__content {
    direction: rtl;
    text-align: right;
}

html[dir="ltr"] .project-hero__content {
    direction: ltr;
    text-align: left;
}

.project-hero__visual-glow {
    position: absolute;
    z-index: 0;
    top: 50%;
    left: 46%;
    width: 88%;
    max-width: 650px;
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle,
            rgba(103, 88, 255, .16) 0%,
            rgba(103, 88, 255, .08) 30%,
            rgba(103, 88, 255, .025) 53%,
            transparent 72%);
    filter: blur(24px);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.project-hero__visual-stage {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
}

.project-hero__image {
    display: block;
    width: 100%;
    max-width: 790px;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 25px 34px rgba(25, 21, 62, .085));
    transform: translateZ(0);
    transition: transform .4s cubic-bezier(.2, .8, .2, 1), filter .4s ease;
}

@media (hover: hover) {
    .project-hero__visual:hover .project-hero__image {
        transform: translateY(-3px);
        filter: drop-shadow(0 31px 40px rgba(25, 21, 62, .11));
    }
}

.project-hero__image-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 720px;
    aspect-ratio: 16 / 10;
    border: 1px solid rgba(103, 88, 255, .10);
    border-radius: 24px;
    background: linear-gradient(145deg, #fff, #f2f1ff);
    color: var(--pd-purple);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .18em;
}

.project-hero__visual-mark {
    position: absolute;
    z-index: 3;
    left: 3%;
    bottom: 1%;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #aaadb8;
    font-size: 7px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .12em;
    white-space: nowrap;
}

.project-hero__visual-mark i {
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, rgba(103,88,255,.65), rgba(103,88,255,.05));
}

.project-hero__eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 17px;
    color: #8074ed;
    font-size: 8px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.project-hero__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 27px;
    height: 20px;
    padding-inline: 7px;
    border-radius: 999px;
    background: rgba(103,88,255,.075);
    color: var(--pd-purple);
    font-size: 8px;
    font-weight: 800;
}

.project-hero__eyebrow-line {
    width: 26px;
    height: 1px;
    background: rgba(103,88,255,.28);
}

.project-hero__category {
    color: #8176ec;
}

.project-hero__title {
    width: 100%;
    max-width: 560px;
    margin: 0;
    color: var(--pd-text);
    font-size: clamp(42px, 3.55vw, 60px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -.04em;
    text-wrap: balance;
}

html[dir="rtl"] .project-hero__title {
    font-size: clamp(39px, 3.2vw, 55px);
    line-height: 1.3;
    letter-spacing: normal;
}

.project-hero__lead {
    width: 100%;
    max-width: 520px;
    margin: 17px 0 0;
    color: var(--pd-muted);
    font-size: 13px;
    line-height: 1.9;
}

html[dir="rtl"] .project-hero__lead {
    line-height: 2;
}

.project-hero__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    margin-top: 24px;
    padding-top: 17px;
    border-top: 1px solid rgba(16,18,31,.07);
}

.project-hero__meta-item {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 4px;
    padding-inline: 15px;
}

.project-hero__meta-item:first-child {
    padding-inline-start: 0;
}

.project-hero__meta-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 1px;
    inset-inline-end: 0;
    width: 1px;
    height: 28px;
    background: rgba(16,18,31,.065);
}

.project-hero__meta-item span {
    color: #a3a6b1;
    font-size: 7px;
    font-weight: 600;
}

.project-hero__meta-item strong {
    min-width: 0;
    overflow: hidden;
    color: #383b48;
    font-size: 10px;
    line-height: 1.45;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-hero__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
}

.project-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    gap: 10px;
    padding: 0 17px;
    border: 1px solid transparent;
    border-radius: 999px;
    text-decoration: none;
    font-size: 9px;
    line-height: 1;
    font-weight: 700;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease,
                transform .18s ease, box-shadow .18s ease;
}

.project-button--primary {
    border-color: #11131f;
    background: #11131f;
    color: #fff;
    box-shadow: 0 7px 18px rgba(17,19,31,.10);
}

.project-button--primary:hover {
    border-color: var(--pd-purple);
    background: var(--pd-purple);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 11px 23px rgba(103,88,255,.18);
}

.project-button--secondary,
.project-button--ghost {
    border-color: rgba(16,18,31,.09);
    background: rgba(255,255,255,.65);
    color: #555967;
}

.project-button--secondary:hover,
.project-button--ghost:hover {
    border-color: rgba(103,88,255,.26);
    background: #fff;
    color: var(--pd-purple);
    transform: translateY(-2px);
}

.project-button__icon {
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    font-size: 10px;
    transition: transform .18s ease;
}

.project-button--primary:hover .project-button__icon {
    transform: translateY(2px);
}

.project-button--secondary:hover .project-button__icon,
.project-button--ghost:hover .project-button__icon {
    transform: translate(2px, -2px);
}

.project-hero__signature {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 19px;
    color: #b1b3bd;
}

.project-hero__signature > span {
    width: 23px;
    height: 1px;
    background: rgba(103,88,255,.36);
}

.project-hero__signature small {
    font-size: 7px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .1em;
}

/* ==========================================================
   PROJECT DETAIL — CONTENT AFTER HERO
   ========================================================== */

.project-section {
    position: relative;
    padding: 72px 0;
}

.project-section + .project-section {
    border-top: 1px solid rgba(16, 18, 31, .045);
}

.project-section__intro {
    min-width: 0;
}

.project-section__eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 20px;

    color: var(--pd-purple);

    font-size: 9px;
    line-height: 1;
    font-weight: 700;
}

.project-section__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 31px;
    height: 22px;

    padding-inline: 8px;

    border: 1px solid rgba(103, 88, 255, .10);
    border-radius: 999px;

    background: rgba(103, 88, 255, .045);
    color: var(--pd-purple);

    font-size: 8px;
    font-weight: 800;
}

.project-section__eyebrow i {
    display: block;

    width: 28px;
    height: 1px;

    background: rgba(103, 88, 255, .24);
}

.project-section__title {
    max-width: 500px;

    margin: 0;

    color: var(--pd-text);

    font-size: clamp(28px, 2.6vw, 40px);
    line-height: 1.35;
    font-weight: 800;

    letter-spacing: -.025em;
}

html[dir="rtl"] .project-section__title {
    letter-spacing: normal;
    line-height: 1.55;
}

.project-section__text {
    max-width: 570px;

    margin-top: 18px;

    color: var(--pd-muted);

    font-size: 13px;
    line-height: 2;
}

.project-richtext > :last-child {
    margin-bottom: 0;
}

.project-richtext p {
    margin-bottom: 10px;
}

.project-richtext ul,
.project-richtext ol {
    margin: 16px 0 0;
    padding-inline-start: 20px;
}

.project-richtext li {
    margin-bottom: 7px;
}


/* ==========================================================
   02 — OVERVIEW
   ========================================================== */

.project-overview {
    padding-top: 78px;
    padding-bottom: 82px;

    background:
        radial-gradient(
            circle at 78% 40%,
            rgba(103, 88, 255, .045),
            transparent 25%
        ),
        #fbfbfe;
}

.project-overview__layout {
    display: grid;

    grid-template-columns:
        minmax(300px, .9fr)
        minmax(0, 1.1fr);

    align-items: center;

    gap: clamp(55px, 7vw, 110px);
}

.project-overview__cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 14px;
}

.project-overview-card {
    min-height: 180px;

    padding: 25px 18px;

    border: 1px solid rgba(103, 88, 255, .075);
    border-radius: 18px;

    background: rgba(255, 255, 255, .76);

    box-shadow:
        0 12px 35px rgba(36, 31, 82, .035);

    transition:
        transform .25s ease,
        border-color .25s ease,
        box-shadow .25s ease;
}

.project-overview-card:hover {
    transform: translateY(-4px);

    border-color: rgba(103, 88, 255, .16);

    box-shadow:
        0 18px 42px rgba(36, 31, 82, .065);
}

.project-overview-card__index {
    display: grid;
    place-items: center;

    width: 42px;
    height: 42px;

    margin-bottom: 22px;

    border-radius: 50%;

    background: var(--pd-purple-soft);
    color: var(--pd-purple);

    font-size: 10px;
    font-weight: 800;
}

.project-overview-card p {
    margin: 0;

    color: #454957;

    font-size: 12px;
    line-height: 1.9;
    font-weight: 600;
}


/* ==========================================================
   03 — CHALLENGE
   ========================================================== */

.project-challenge {
    background:
        linear-gradient(
            90deg,
            rgba(103, 88, 255, .025),
            rgba(103, 88, 255, .065),
            rgba(103, 88, 255, .025)
        ),
        #f9f9fd;
}

.project-challenge__layout {
    display: grid;

    grid-template-columns:
        minmax(320px, .82fr)
        minmax(0, 1.18fr);

    align-items: center;

    gap: clamp(60px, 7vw, 120px);
}

.project-media {
    position: relative;

    min-width: 0;

    margin: 0;
}

.project-media img {
    display: block;

    width: 100%;
    height: auto;

    object-fit: contain;
}

.project-media--challenge {
    overflow: hidden;

    border-radius: 24px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.9),
            rgba(239,237,255,.7)
        );

    box-shadow:
        0 20px 55px rgba(29, 25, 67, .06);
}

.project-media--challenge img {
    max-height: 390px;
}


/* ==========================================================
   04 — SOLUTION
   ========================================================== */

.project-solution {
    padding-top: 84px;
    padding-bottom: 88px;

    background: #fbfbfe;
}

.project-solution__layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1.12fr)
        minmax(330px, .88fr);

    align-items: center;

    gap: clamp(60px, 7vw, 115px);
}

.project-media--solution {
    position: relative;

    padding: 20px;

    border: 1px solid rgba(103, 88, 255, .07);
    border-radius: 25px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.96),
            rgba(242,241,255,.78)
        );

    box-shadow:
        0 25px 60px rgba(29, 25, 67, .07);
}

.project-media--solution::before {
    content: "";

    position: absolute;
    z-index: -1;

    inset: 16% -7% -10% 20%;

    border-radius: 50%;

    background: rgba(103, 88, 255, .09);

    filter: blur(45px);
}

.project-media--solution img {
    max-height: 480px;
}


/* ==========================================================
   MODULES
   ========================================================== */

.project-modules__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 14px;

    margin-top: 62px;
}

.project-module {
    min-height: 126px;

    padding: 20px;

    border: 1px solid rgba(103, 88, 255, .075);
    border-radius: 17px;

    background: rgba(255, 255, 255, .84);

    box-shadow:
        0 10px 30px rgba(36, 31, 82, .035);

    transition:
        transform .22s ease,
        border-color .22s ease,
        box-shadow .22s ease;
}

.project-module:hover {
    transform: translateY(-3px);

    border-color: rgba(103, 88, 255, .17);

    box-shadow:
        0 16px 38px rgba(36, 31, 82, .06);
}

.project-module__head {
    display: flex;
    align-items: center;

    gap: 12px;
}

.project-module__icon,
.project-module__index {
    flex: 0 0 auto;

    display: grid;
    place-items: center;

    width: 37px;
    height: 37px;

    border-radius: 11px;

    background: var(--pd-purple-soft);
    color: var(--pd-purple);

    font-size: 11px;
    font-weight: 800;
}

.project-module h3 {
    margin: 0;

    color: #252836;

    font-size: 13px;
    line-height: 1.5;
    font-weight: 750;
}

.project-module p {
    margin: 11px 49px 0 0;

    color: var(--pd-muted);

    font-size: 10px;
    line-height: 1.8;
}

html[dir="ltr"] .project-module p {
    margin: 11px 0 0 49px;
}


/* ==========================================================
   05 / 06 — TECHNOLOGIES + SERVICES
   ========================================================== */

.project-capabilities {
    padding: 0;

    background: #fafafe;
}

.project-capabilities .project-container {
    width: min(var(--pd-wide), calc(100% - 72px));
}

.project-capabilities__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;

    border-top: 1px solid var(--pd-border);
    border-bottom: 1px solid var(--pd-border);
}

.project-capabilities__column {
    min-width: 0;

    padding: 48px clamp(30px, 4vw, 68px);
}

.project-capabilities__column + .project-capabilities__column {
    border-inline-start: 1px solid var(--pd-border);
}


/* technologies */

.project-technologies__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 22px;

    margin-top: 29px;
}

.project-technology {
    display: flex;
    flex-direction: column;
    align-items: center;

    min-width: 0;

    gap: 9px;

    text-align: center;
}

.project-technology__icon {
    display: grid;
    place-items: center;

    width: 48px;
    height: 48px;

    border: 1px solid rgba(103, 88, 255, .08);
    border-radius: 13px;

    background: #fff;
    color: var(--pd-purple);

    font-size: 22px;

    box-shadow:
        0 8px 24px rgba(36, 31, 82, .035);
}

.project-technology strong {
    color: #383b48;

    font-size: 10px;
    line-height: 1.4;
    font-weight: 700;
}


/* services */

.project-services__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 12px;

    margin-top: 29px;
}

.project-service {
    display: flex;
    align-items: center;

    min-height: 44px;

    padding: 10px 16px;

    border: 1px solid rgba(103, 88, 255, .085);
    border-radius: 999px;

    background: rgba(255, 255, 255, .82);
    color: #3f4250;

    font-size: 10px;
    line-height: 1.4;
    font-weight: 600;

    box-shadow:
        0 7px 22px rgba(36, 31, 82, .03);
}

.project-service::before {
    content: "";

    flex: 0 0 auto;

    width: 7px;
    height: 7px;

    margin-inline-end: 10px;

    border-radius: 50%;

    background: var(--pd-purple);

    box-shadow:
        0 0 0 5px rgba(103, 88, 255, .08);
}


/* ==========================================================
   07 — GALLERY
   ========================================================== */

.project-gallery {
    padding-top: 82px;
    padding-bottom: 88px;

    background:
        radial-gradient(
            circle at 30% 15%,
            rgba(103, 88, 255, .045),
            transparent 27%
        ),
        #fbfbfe;
}

.project-gallery__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 38px;
}

.project-gallery__hint {
    max-width: 32ch;
    margin: 0;
    color: #535567;
    font-size: 12px;
    line-height: 1.9;
}

.project-gallery__track {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 28px 22px;
}

.project-gallery__item { min-width: 0; margin: 0; grid-column: span 3; }
.project-gallery__item--desktop { grid-column: span 6; }
.project-gallery__item:only-child { grid-column: 1 / -1; }
.project-gallery__image-button {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 360px;
    padding: 28px;
    overflow: hidden;
    border: 1px solid var(--pd-border);
    border-radius: 16px;
    background: #f0f1f7;
    cursor: zoom-in;
}
.project-gallery__expand {
    position: absolute;
    inset-block-start: 12px;
    inset-inline-end: 12px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    color: var(--pd-purple);
    font-size: 18px;
}
.project-gallery__device {
    position: relative;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    border: 7px solid #171925;
    background: #fff;
    transition: transform 200ms ease-out;
}
.project-gallery__device--desktop { width: 100%; aspect-ratio: 16 / 10; border-radius: 12px; }
.project-gallery__device--tablet { height: 290px; aspect-ratio: 3 / 4; border-radius: 18px; }
.project-gallery__device--mobile { height: 304px; aspect-ratio: 9 / 19; border-radius: 26px; }
.project-gallery__browser-bar {
    flex: 0 0 18px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding-inline: 7px;
    background: #f3f4f8;
}
.project-gallery__browser-bar i { width: 4px; height: 4px; border-radius: 50%; background: #a0a3b0; }
.project-gallery__device--tablet .project-gallery__browser-bar,
.project-gallery__device--mobile .project-gallery__browser-bar { flex-basis: 10px; justify-content: center; background: #171925; }
.project-gallery__device--tablet .project-gallery__browser-bar i,
.project-gallery__device--mobile .project-gallery__browser-bar i { display: none; }
.project-gallery__device--tablet .project-gallery__browser-bar::after,
.project-gallery__device--mobile .project-gallery__browser-bar::after { content: ''; width: 24px; height: 4px; border-radius: 4px; background: #06070b; }
.project-gallery__screen { flex: 1; min-height: 0; overflow: hidden; }
.project-gallery__screen img { display: block; width: 100%; height: auto; }
.project-gallery figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 12px; }
.project-gallery figcaption strong { color: #333643; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.project-gallery figcaption span { flex-shrink: 0; color: #57536b; font-size: 11px; }
.project-gallery__image-button:focus-visible,
.project-lightbox button:focus-visible,
.project-lightbox__viewport:focus-visible { outline: 3px solid #9185ff; outline-offset: 4px; }
@media (hover: hover) and (pointer: fine) {
    .project-gallery__image-button:hover .project-gallery__device { transform: translateY(-4px); }
}

/* Native dialog provides a top-layer modal and keyboard focus containment. */
html.project-lightbox-open { overflow: hidden; }
.project-lightbox {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 20px;
    border: 0;
    background: transparent;
    color: #fff;
}
.project-lightbox:not([open]) { display: none; }
.project-lightbox[open] { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; }
.project-lightbox::backdrop { background: rgb(8 10 20 / 94%); }
.project-lightbox__dialog {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: min(1100px, 100%);
    min-width: 0;
    height: 100%;
    max-height: 980px;
    min-height: 0;
}
.project-lightbox__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.project-lightbox__header p { margin: 0; font-size: 12px; line-height: 1.8; color: #d6d7e2; }
.project-lightbox button {
    flex-shrink: 0;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid #555766;
    border-radius: 8px;
    background: #252735;
    color: #fff;
    font: inherit;
    cursor: pointer;
}
.project-lightbox button[hidden] { display: none; }
.project-lightbox .project-lightbox__close { padding: 0; font-size: 26px; }
.project-lightbox__figure {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 0;
    margin: 0;
}
.project-lightbox__device {
    display: flex;
    flex-direction: column;
    flex-shrink: 1;
    min-height: 0;
    max-width: 100%;
    max-height: calc(100% - 55px);
    overflow: hidden;
    border: 8px solid #363847;
    background: #fff;
}
.project-lightbox__device[data-device="desktop"] { width: 100%; height: 100%; border-radius: 12px; }
.project-lightbox__device[data-device="tablet"] { width: min(570px, 65dvh); height: 100%; border-radius: 24px; }
.project-lightbox__device[data-device="mobile"] { width: min(360px, 37dvh); height: 100%; border-radius: 32px; }
.project-lightbox__chrome { display: flex; align-items: center; gap: 6px; flex: 0 0 26px; padding-inline: 10px; background: #ececf2; }
.project-lightbox__chrome i { width: 6px; height: 6px; border-radius: 50%; background: #9295a4; }
.project-lightbox__device:not([data-device="desktop"]) .project-lightbox__chrome { justify-content: center; flex-basis: 16px; background: #363847; }
.project-lightbox__device:not([data-device="desktop"]) .project-lightbox__chrome i { display: none; }
.project-lightbox__device:not([data-device="desktop"]) .project-lightbox__chrome::after { content: ''; width: 32px; height: 5px; border-radius: 5px; background: #14151c; }
.project-lightbox__viewport { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.project-lightbox__image { display: block; width: 100%; height: auto; color: #252735; }
.project-lightbox__caption { max-width: 65ch; max-height: 3.6em; overflow: auto; margin: 0; color: #e1e2ea; font-size: 13px; line-height: 1.8; text-align: center; overflow-wrap: anywhere; }
.project-lightbox__navigation { display: flex; align-items: center; justify-content: center; gap: 24px; font-size: 13px; }
@media (max-width: 960px) {
    .project-gallery__item, .project-gallery__item--desktop { grid-column: span 6; }
    .project-gallery__image-button { height: 330px; padding: 24px; }
}
@media (max-width: 640px) {
    .project-gallery__track { grid-template-columns: 1fr; }
    .project-gallery__item, .project-gallery__item--desktop { grid-column: 1; }
    .project-gallery__image-button { height: 300px; padding: 20px; }
    .project-gallery__device--tablet { height: 245px; }
    .project-gallery__device--mobile { height: 255px; }
    .project-lightbox__dialog { gap: 12px; }
    .project-lightbox__header p { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
    .project-gallery__device { transition: none; }
    .project-gallery__image-button:hover .project-gallery__device { transform: none; }
}


/* ==========================================================
   08 — OUTCOME
   ========================================================== */

.project-outcome {
    padding: 62px 0 68px;

    background:
        linear-gradient(
            90deg,
            rgba(103, 88, 255, .025),
            rgba(103, 88, 255, .065),
            rgba(103, 88, 255, .025)
        );
}

.project-outcome__layout {
    display: grid;

    grid-template-columns:
        minmax(280px, .75fr)
        minmax(0, 1.25fr);

    align-items: center;

    gap: 60px;
}

.project-outcome__heading .project-section__title {
    max-width: 390px;

    font-size: clamp(25px, 2.2vw, 34px);
}

.project-outcome__metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-metric {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;

    min-width: 0;

    padding: 12px 20px;

    text-align: center;
}

.project-metric:not(:last-child)::after {
    content: "";

    position: absolute;

    top: 10%;
    inset-inline-end: 0;

    width: 1px;
    height: 80%;

    background: rgba(16, 18, 31, .07);
}

.project-metric strong {
    color: var(--pd-purple);

    font-size: clamp(30px, 3vw, 43px);
    line-height: 1;
    font-weight: 800;

    letter-spacing: -.04em;
}

.project-metric span {
    margin-top: 10px;

    color: #4e5260;

    font-size: 11px;
    line-height: 1.5;
    font-weight: 600;
}


/* ==========================================================
   FINAL CTA
   ========================================================== */

.project-cta {
    position: relative;
    isolation: isolate;

    overflow: hidden;

    padding: 64px 0;

    background:
        radial-gradient(
            circle at 70% 130%,
            rgba(103, 88, 255, .34),
            transparent 33%
        ),
        radial-gradient(
            circle at 15% -20%,
            rgba(117, 98, 255, .13),
            transparent 30%
        ),
        #0d1020;

    color: #fff;
}

.project-cta::before {
    content: "";

    position: absolute;
    z-index: -1;

    width: 650px;
    height: 240px;

    right: -130px;
    bottom: -180px;

    border: 1px solid rgba(139, 123, 255, .20);
    border-radius: 50%;

    transform: rotate(-13deg);
}

.project-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 60px;
}

.project-cta__copy {
    max-width: 610px;
}

.project-cta__eyebrow {
    display: block;

    margin-bottom: 14px;

    color: #9186ff;

    font-size: 8px;
    font-weight: 800;

    letter-spacing: .16em;
}

.project-cta h2 {
    margin: 0;

    color: #fff;

    font-size: clamp(28px, 3vw, 43px);
    line-height: 1.4;
    font-weight: 800;
}

.project-cta p {
    max-width: 520px;

    margin: 13px 0 0;

    color: rgba(255,255,255,.55);

    font-size: 11px;
    line-height: 1.9;
}

.project-cta__button {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 170px;
    min-height: 50px;

    gap: 17px;

    padding: 0 24px;

    border-radius: 999px;

    background: #fff;
    color: #141622;

    text-decoration: none;

    font-size: 10px;
    font-weight: 750;

    box-shadow:
        0 15px 35px rgba(0,0,0,.14);

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.project-cta__button:hover {
    transform: translateY(-3px);

    box-shadow:
        0 20px 45px rgba(0,0,0,.20);
}


/* ==========================================================
   ACCESSIBILITY
   ========================================================== */

.sr-only {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    padding: 0 !important;
    margin: -1px !important;

    overflow: hidden !important;

    clip: rect(0, 0, 0, 0) !important;

    white-space: nowrap !important;

    border: 0 !important;
}


/* ==========================================================
   RESPONSIVE — <= 1100
   ========================================================== */

@media (max-width: 1100px) {

    .project-overview__layout,
    .project-challenge__layout,
    .project-solution__layout,
    .project-outcome__layout {
        gap: 45px;
    }

    .project-overview__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-modules__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-gallery__track {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .project-outcome__metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 25px;
    }

    .project-metric:nth-child(2)::after {
        display: none;
    }
}


/* ==========================================================
   RESPONSIVE — <= 820
   ========================================================== */

@media (max-width: 820px) {

    .project-section {
        padding: 58px 0;
    }

    .project-overview__layout,
    .project-challenge__layout,
    .project-solution__layout,
    .project-outcome__layout {
        grid-template-columns: 1fr;
    }

    .project-section__title {
        max-width: 620px;
    }

    .project-section__text {
        max-width: 650px;
    }

    .project-overview__cards {
        margin-top: 10px;
    }

    .project-challenge .project-section__intro {
        order: 1;
    }

    .project-media--challenge {
        order: 2;
    }

    .project-solution .project-section__intro {
        order: 1;
    }

    .project-media--solution {
        order: 2;
    }

    .project-capabilities__grid {
        grid-template-columns: 1fr;
    }

    .project-capabilities__column + .project-capabilities__column {
        border-inline-start: 0;
        border-top: 1px solid var(--pd-border);
    }

    .project-gallery__track {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .project-gallery__item,
    .project-gallery__item--featured,
    .project-gallery__item--desktop,
    .project-gallery__item--tablet,
    .project-gallery__item--mobile {
        grid-column: span 6;
    }

    .project-outcome__metrics {
        margin-top: 10px;
    }

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


/* ==========================================================
   RESPONSIVE — <= 560
   ========================================================== */

@media (max-width: 560px) {

    .project-section {
        padding: 48px 0;
    }

    .project-section__eyebrow {
        margin-bottom: 15px;
    }

    .project-section__title {
        font-size: 27px;
    }

    html[dir="rtl"] .project-section__title {
        line-height: 1.55;
    }

    .project-section__text {
        font-size: 12px;
    }

    .project-overview__cards,
    .project-modules__grid,
    .project-technologies__list,
    .project-services__list,
    .project-outcome__metrics {
        grid-template-columns: 1fr;
    }

    .project-gallery__track {
        grid-template-columns: 1fr;
    }

    .project-overview-card {
        min-height: 0;
    }

    .project-module p,
    html[dir="ltr"] .project-module p {
        margin-inline: 0;
    }

    .project-capabilities .project-container {
        width: min(var(--pd-container), calc(100% - 32px));
    }

    .project-capabilities__column {
        padding: 38px 0;
    }

    .project-technologies__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .project-gallery__item,
    .project-gallery__item--featured,
    .project-gallery__item--desktop,
    .project-gallery__item--tablet,
    .project-gallery__item--mobile {
        grid-column: 1;
    }

    .project-gallery__image-button,
    .project-gallery__item--featured .project-gallery__image-button {
        height: 300px;
    }

    .project-metric {
        padding: 21px 10px;

        border-bottom: 1px solid rgba(16,18,31,.06);
    }

    .project-metric:not(:last-child)::after {
        display: none;
    }

    .project-cta {
        padding: 52px 0;
    }

    .project-cta__inner {
        gap: 30px;
    }

    .project-cta__button {
        width: 100%;
    }

    .project-lightbox {
        padding: 16px;
    }

    .project-lightbox__nav--prev {
        left: 4px;
    }

    .project-lightbox__nav--next {
        right: 4px;
    }
}


/* ==========================================================
   REDUCED MOTION
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    .project-overview-card,
    .project-module,
    .project-gallery__image-button img,
    .project-gallery__control,
    .project-cta__button {
        transition: none;
    }

    .project-overview-card:hover,
    .project-module:hover,
    .project-gallery__image-button:hover img,
    .project-gallery__control:hover,
    .project-cta__button:hover {
        transform: none;
    }
}