/* =========================================================
   PROJECTS
   Editorial Liquid Glass Layout
   ========================================================= */

.projects {
    position: relative;
}

.projects .section-content {
    width: 100%;
}


/* =========================================================
   PROJECT CARD
   ========================================================= */

.project-card-editorial {
    --mx: 50%;
    --my: 50%;

    position: relative;

    display: grid;
    grid-template-columns:
    80px
    minmax(320px, 0.95fr)
    minmax(380px, 1.25fr)
    50px;
    align-items: center;

    width: 100%;
    min-height: 430px;

    margin-top: 80px;

    padding: 42px;

    color: #ffffff;
    text-decoration: none;

    background:
        radial-gradient(
            circle at var(--mx) var(--my),
            rgba(168, 85, 247, 0.18),
            transparent 32%
        ),
        rgba(12, 10, 16, 0.72);

    border: 1px solid rgba(255, 255, 255, 0.10);

    border-radius: 28px;

    overflow: hidden;

    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);

    transform:
        perspective(1200px)
        rotateX(0deg)
        rotateY(0deg);

    transition:
        border-color 0.4s ease,
        background 0.4s ease,
        box-shadow 0.4s ease,
        transform 0.25s ease;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.45);
}


/* animated border glow */

.project-card-editorial::before {
    content: "";

    position: absolute;

    inset: 0;

    border-radius: inherit;

    pointer-events: none;

    background:
        radial-gradient(
            circle at var(--mx) var(--my),
            rgba(168, 85, 247, 0.42),
            transparent 28%
        );

    opacity: 0.65;

    transition: opacity 0.4s ease;
}


/* inner glass highlight */

.project-card-editorial::after {
    content: "";

    position: absolute;

    inset: 1px;

    border-radius: inherit;

    pointer-events: none;

    background:
        linear-gradient(
            120deg,
            rgba(255,255,255,0.07),
            transparent 35%,
            transparent 70%,
            rgba(255,255,255,0.025)
        );
}


/* hover */

.project-card-editorial:hover {
    border-color: rgba(168, 85, 247, 0.42);

    box-shadow:
        0 35px 100px rgba(0, 0, 0, 0.6),
        0 0 70px rgba(168, 85, 247, 0.10);
}

.project-card-editorial:hover::before {
    opacity: 1;
}


/* =========================================================
   PROJECT META
   ========================================================= */

.project-meta {
    position: relative;
    z-index: 2;

    align-self: start;

    display: flex;
    flex-direction: column;

    gap: 12px;

    padding-top: 4px;
}

.project-meta .project-number {
    font-size: 14px;
    font-weight: 700;

    letter-spacing: 0.08em;

    color: rgba(255, 255, 255, 0.45);
}

.project-type {
    writing-mode: vertical-rl;

    transform: rotate(180deg);

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 0.16em;

    color: rgba(255, 255, 255, 0.35);
}


/* =========================================================
   PROJECT INFO
   ========================================================= */

.project-info {
    position: relative;
    z-index: 2;

    min-width: 0;
    width: 100%;

    padding-right: 30px;
}

..project-info h3 {
    margin: 0 0 28px;

    font-size: clamp(40px, 3.4vw, 60px);

    line-height: 0.9;

    font-weight: 900;

    letter-spacing: -0.055em;

    color: #ffffff;

    max-width: 100%;
}

.project-info p {
    max-width: 390px;

    margin: 0 0 28px;

    font-size: 14px;

    line-height: 1.7;

    color: rgba(255, 255, 255, 0.48);
}

.project-tech {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 28px;

    font-size: 9px;

    font-weight: 700;

    letter-spacing: 0.16em;

    color: rgba(255, 255, 255, 0.42);
}

.project-tech span {
    color: rgba(168, 85, 247, 0.75);
}

.project-view {
    display: inline-flex;

    align-items: center;

    gap: 10px;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 0.14em;

    color: #ffffff;
}

.project-view span {
    font-size: 16px;

    transition:
        transform 0.3s ease;
}

.project-card-editorial:hover .project-view span {
    transform: translate(4px, -4px);
}


/* =========================================================
   PROJECT PREVIEW
   ========================================================= */

.project-preview {
    position: relative;

    min-width: 0;

    z-index: 2;

    width: 100%;
    height: 320px;

    overflow: hidden;

    border-radius: 20px;

    background:
        rgba(5, 4, 8, 0.82);

    border:
        1px solid rgba(255, 255, 255, 0.08);

    box-shadow:
        inset 0 0 50px rgba(168, 85, 247, 0.05);

    isolation: isolate;
}


/* purple glow */

.preview-glow {
    position: absolute;

    width: 280px;
    height: 280px;

    left: 50%;
    top: 50%;

    transform:
        translate(-50%, -50%);

    background:
        radial-gradient(
            circle,
            rgba(168, 85, 247, 0.22),
            transparent 68%
        );

    filter: blur(20px);

    pointer-events: none;
}


/* =========================================================
   AI PREVIEW
   ========================================================= */

.ai-window {
    position: absolute;

    inset: 18px;

    border:
        1px solid rgba(255, 255, 255, 0.07);

    border-radius: 14px;

    background:
        rgba(15, 12, 20, 0.9);

    overflow: hidden;
}

.preview-topbar {
    display: flex;

    align-items: center;

    gap: 6px;

    height: 38px;

    padding: 0 14px;

    border-bottom:
        1px solid rgba(255,255,255,0.06);
}

.preview-topbar > span {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background:
        rgba(255,255,255,0.22);
}

.preview-topbar b {
    margin-left: auto;

    font-size: 7px;

    font-weight: 700;

    letter-spacing: 0.14em;

    color: rgba(255,255,255,0.3);
}

.ai-content {
    padding: 26px;
}

.ai-query {
    display: flex;

    align-items: center;
    justify-content: space-between;

    height: 46px;

    padding: 0 16px;

    border:
        1px solid rgba(168,85,247,0.18);

    border-radius: 9px;

    background:
        rgba(255,255,255,0.025);

    font-size: 8px;

    font-weight: 600;

    letter-spacing: 0.12em;

    color: rgba(255,255,255,0.34);
}

.ai-query strong {
    font-size: 18px;

    font-weight: 400;

    color: rgba(168,85,247,0.85);
}

.ai-cards {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 10px;

    margin-top: 18px;
}

.ai-cards > div {
    height: 92px;

    border-radius: 9px;

    background:
        linear-gradient(
            145deg,
            rgba(168,85,247,0.12),
            rgba(255,255,255,0.025)
        );

    border:
        1px solid rgba(255,255,255,0.06);
}

.ai-line {
    width: 100%;
    height: 5px;

    margin-top: 20px;

    border-radius: 999px;

    background:
        rgba(255,255,255,0.07);
}

.ai-line.short {
    width: 68%;

    margin-top: 9px;
}


/* =========================================================
   FASHION PREVIEW
   ========================================================= */

.fashion-window {
    position: absolute;

    inset: 18px;

    padding: 22px;

    border:
        1px solid rgba(255,255,255,0.07);

    border-radius: 14px;

    background:
        rgba(15,12,20,0.9);
}

.fashion-title {
    margin-bottom: 18px;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 0.25em;

    color: rgba(255,255,255,0.72);
}

.fashion-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 10px;

    height: 190px;
}

.fashion-grid > div {
    border-radius: 8px;

    background:
        linear-gradient(
            145deg,
            rgba(168,85,247,0.18),
            rgba(255,255,255,0.035)
        );

    border:
        1px solid rgba(255,255,255,0.06);
}

.fashion-grid > div:nth-child(1) {
    transform: translateY(18px);
}

.fashion-grid > div:nth-child(2) {
    transform: translateY(-2px);
}

.fashion-grid > div:nth-child(3) {
    transform: translateY(12px);
}

.fashion-grid > div:nth-child(4) {
    transform: translateY(-8px);
}

.fashion-footer {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-top: 20px;

    font-size: 7px;

    font-weight: 700;

    letter-spacing: 0.14em;

    color: rgba(255,255,255,0.28);
}

.fashion-footer span {
    font-size: 14px;

    color: rgba(168,85,247,0.8);
}


/* =========================================================
   PREVIEW INDEX
   ========================================================= */

.preview-index {
    position: absolute;

    right: 18px;
    bottom: 14px;

    z-index: 5;

    font-size: 7px;

    font-weight: 700;

    letter-spacing: 0.15em;

    color: rgba(255,255,255,0.25);
}


/* =========================================================
   PROJECT ARROW
   ========================================================= */

.project-arrow {
    position: relative;

    z-index: 3;

    align-self: start;

    justify-self: end;

    font-size: 22px;

    color: rgba(255,255,255,0.55);

    transition:
        transform 0.35s ease,
        color 0.35s ease;
}

.project-card-editorial:hover .project-arrow {
    transform: translate(5px, -5px);

    color: #ffffff;
}


/* =========================================================
   PREVIEW ANIMATION
   ========================================================= */

.project-preview-ai .ai-query {
    position: relative;

    overflow: hidden;
}

.project-preview-ai .ai-query::after {
    content: "";

    position: absolute;

    top: 0;
    left: -100%;

    width: 70%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(168,85,247,0.18),
            transparent
        );

    animation:
        previewScan 3.5s ease-in-out infinite;
}

.project-preview-ai .ai-cards > div {
    animation:
        aiCardPulse 3s ease-in-out infinite;
}

.project-preview-ai .ai-cards > div:nth-child(2) {
    animation-delay: 0.25s;
}

.project-preview-ai .ai-cards > div:nth-child(3) {
    animation-delay: 0.5s;
}

.project-preview-ai .ai-line {
    animation:
        linePulse 2.8s ease-in-out infinite;
}

.project-preview-ai .ai-line.short {
    animation-delay: 0.4s;
}

.project-preview-fashion .fashion-grid > div {
    animation:
        fashionFloat 4s ease-in-out infinite;
}

.project-preview-fashion .fashion-grid > div:nth-child(2) {
    animation-delay: 0.3s;
}

.project-preview-fashion .fashion-grid > div:nth-child(3) {
    animation-delay: 0.6s;
}

.project-preview-fashion .fashion-grid > div:nth-child(4) {
    animation-delay: 0.9s;
}

.project-preview-fashion .fashion-title {
    animation:
        titleBreath 4s ease-in-out infinite;
}


/* =========================================================
   KEYFRAMES
   ========================================================= */

@keyframes previewScan {
    0% {
        left: -100%;
    }

    45%,
    100% {
        left: 130%;
    }
}

@keyframes aiCardPulse {
    0%,
    100% {
        transform: translateY(0);
        opacity: 0.78;
    }

    50% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

@keyframes linePulse {
    0%,
    100% {
        opacity: 0.25;
        transform: scaleX(0.96);
    }

    50% {
        opacity: 0.7;
        transform: scaleX(1);
    }
}

@keyframes fashionFloat {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-6px) scale(1.015);
    }
}

@keyframes titleBreath {
    0%,
    100% {
        opacity: 0.75;
        letter-spacing: 0.08em;
    }

    50% {
        opacity: 1;
        letter-spacing: 0.12em;
    }
}


/* =========================================================
   SECOND PROJECT SPACING
   ========================================================= */

.project-card-editorial + .project-card-editorial {
    margin-top: 24px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .project-card-editorial {
        grid-template-columns:
            70px
            1fr
            1.2fr
            40px;

        padding: 30px;

        min-height: 390px;
    }

    .project-info h3 {
        font-size: 42px;
    }

    .project-preview {
        height: 280px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .project-card-editorial {
        grid-template-columns: 1fr;

        gap: 26px;

        padding: 24px;

        min-height: auto;

        margin-top: 50px;

        border-radius: 22px;
    }

    .project-meta {
        flex-direction: row;

        align-items: center;

        justify-content: space-between;
    }

    .project-type {
        writing-mode: initial;

        transform: none;
    }

    .project-info {
        padding-right: 0;
    }

    .project-info h3 {
        font-size: clamp(38px, 12vw, 58px);

        margin-bottom: 22px;
    }

    .project-info p {
        font-size: 13px;
    }

    .project-preview {
        height: 260px;
    }

    .project-arrow {
        display: none;
    }

    .ai-content {
        padding: 18px;
    }

    .ai-cards > div {
        height: 70px;
    }

    .fashion-grid {
        height: 145px;
    }

}


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

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

    .project-preview-ai .ai-query::after,
    .project-preview-ai .ai-cards > div,
    .project-preview-ai .ai-line,
    .project-preview-fashion .fashion-grid > div,
    .project-preview-fashion .fashion-title {
        animation: none;
    }

    .project-card-editorial {
        transition: none;
    }
}