/* =====================================================
   ARCHITECTURES PAGE
   Abdelhafid Dahhani
===================================================== */


/* =====================================================
   PAGE INTRO
===================================================== */

.architecture-intro {

    max-width: 1200px;

    margin: 0 auto;

    padding:
            130px 40px
            100px;

    display: grid;

    grid-template-columns:
        80px 1fr;

    gap: 50px;

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


.page-index {

    font-size: 11px;

    letter-spacing: 0.15em;

    opacity: 0.35;

    padding-top: 12px;
}


.intro-content {

    max-width: 780px;
}


.hero-label {

    display: inline-block;

    font-size: 10px;

    letter-spacing: 0.18em;

    opacity: 0.45;

    margin-bottom: 22px;
}


.architecture-intro h1 {

    margin: 0;

    max-width: 700px;

    font-size:
            clamp(48px, 7vw, 92px);

    line-height: 0.95;

    font-weight: 500;

    letter-spacing: -0.055em;
}


.architecture-intro p {

    max-width: 650px;

    margin-top: 35px;

    font-size: 16px;

    line-height: 1.75;

    opacity: 0.48;
}



/* =====================================================
   PROJECT SECTION
===================================================== */

.project-section {

    max-width: 1200px;

    margin: 0 auto;

    padding:
            0 40px;

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


.project-section:last-of-type {

    border-bottom: none;
}



/* =====================================================
   PROJECT ACCORDION
===================================================== */

.project-group {

    width: 100%;
}



/* =====================================================
   PROJECT SUMMARY
===================================================== */

.project-summary {

    position: relative;

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 40px;

    padding:
            110px 0
            55px;

    cursor: pointer;

    list-style: none;

    user-select: none;
}


.project-summary::-webkit-details-marker {

    display: none;
}


.project-summary::marker {

    display: none;
}


.project-summary-main {

    max-width: 800px;
}


.project-kicker {

    display: block;

    margin-bottom: 18px;

    font-size: 10px;

    letter-spacing: 0.18em;

    opacity: 0.4;
}


.project-summary h2 {

    margin: 0;

    font-size:
            clamp(42px, 6vw, 72px);

    line-height: 0.98;

    font-weight: 500;

    letter-spacing: -0.045em;
}


.project-summary p {

    margin-top: 20px;

    font-size: 15px;

    opacity: 0.42;

    letter-spacing: 0.01em;
}


.project-summary-side {

    display: flex;

    align-items: center;

    gap: 35px;

    padding-top: 12px;
}


.project-code {

    font-size: 10px;
    letter-spacing: 0.2em;

    white-space: nowrap;
}



/* =====================================================
   COLLAPSE INDICATOR
===================================================== */

.collapse-indicator {

    width: 24px;

    height: 24px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 20px;

    font-weight: 300;

    opacity: 0.4;

    transition:
            transform 0.3s ease,
            opacity 0.3s ease;
}


.collapse-open {

    display: none;
}


.collapse-closed {

    display: block;
}


.project-group[open]
.collapse-open {

    display: block;
}


.project-group[open]
.collapse-closed {

    display: none;
}


.project-summary:hover
.collapse-indicator {

    opacity: 0.8;

    transform: translateY(-1px);
}



/* =====================================================
   PROJECT CONTENT
===================================================== */

.project-content {

    padding-bottom: 110px;

    animation:
            projectReveal 0.45s ease both;
}


@keyframes projectReveal {

    from {

        opacity: 0;

        transform:
                translateY(-8px);
    }

    to {

        opacity: 1;

        transform:
                translateY(0);
    }
}



/* =====================================================
   PROJECT DESCRIPTION
===================================================== */

.project-description {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 80px;

    max-width: 950px;

    margin-bottom: 80px;
}


.project-description > div {

    max-width: 470px;
}


.label {

    display: block;

    margin-bottom: 15px;

    letter-spacing: 0.18em;

}


.project-description p {

    margin: 0;

    font-size: 14px;

    line-height: 1.8;

    opacity: 0.58;
}



/* =====================================================
   ARCHITECTURE GROUP
===================================================== */

.architecture-group {

    margin-top: 85px;
}


.architecture-group:first-of-type {

    margin-top: 0;
}



/* =====================================================
   ARCHITECTURE GROUP HEADER
===================================================== */

.architecture-group-header {

    margin-bottom: 28px;

    display: flex;

    justify-content: space-between;

    align-items: flex-start;
}


.architecture-group-header span {

    display: block;

    font-size: 15px;

    letter-spacing: 0.17em;
    color: var(--text);
    font-weight: 700;
}


.architecture-group-header p {

    margin-top: 8px;

    max-width: 600px;

    font-size: 15px;

    line-height: 1.6;

}



/* =====================================================
   MAIN ARCHITECTURE
===================================================== */

.architecture-main {

    overflow: hidden;

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

    box-shadow:
            0 20px 80px rgba(0,0,0,0.15);
}


.architecture-main-header {

    min-height: 82px;

    padding:
            22px 28px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 25px;

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


.diagram-number {

    display: block;

    margin-bottom: 8px;

    font-size: 9px;

    letter-spacing: 0.16em;

    opacity: 0.35;
}


.architecture-main-header h3 {

    margin: 0;

    font-size: 19px;

    font-weight: 500;

    letter-spacing: -0.025em;
}



/* =====================================================
   MAIN IMAGE
===================================================== */

.architecture-image {

    width: 100%;

    height: 560px;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    background:
            rgba(0,0,0,0.14);
}


.architecture-image img {

    width: 100%;

    height: 100%;

    object-fit: contain;

    padding: 35px;

    display: block;
}



/* =====================================================
   MAIN OPEN BUTTON
===================================================== */

.architecture-button {

    flex-shrink: 0;

    padding:
            10px 16px;

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

    border-radius: 999px;

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

    color: inherit;

    font-family: inherit;

    font-size: 10px;

    letter-spacing: 0.02em;

    cursor: pointer;

    transition:
            background 0.2s ease,
            border-color 0.2s ease,
            transform 0.2s ease;
}


.architecture-button:hover {

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

    border-color:
            rgba(255,255,255,0.28);

    transform:
            translateY(-1px);
}



/* =====================================================
   TECHNICAL VIEWS HEADER
===================================================== */

.architecture-views-header {

    margin-top: 50px;

    margin-bottom: 20px;

    display: flex;

    justify-content: space-between;

    align-items: center;
}


.architecture-views-header span {

    display: block;

    color: var(--text);
    font-weight: 700;

    letter-spacing: 0.17em;

}


.architecture-views-header small {

    display: block;

    margin-top: 7px;

    font-size: 13px;

}



/* =====================================================
   ARCHITECTURE VIEWS GRID
===================================================== */

.architecture-views {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    column-gap: 55px;

    row-gap: 0;
}



/* =====================================================
   ARCHITECTURE VIEW
===================================================== */

.architecture-view {

    min-width: 0;

    overflow: hidden;

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

    transition:
            background 0.3s ease,
            transform 0.3s ease;
}


.architecture-view:hover {

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

    transform:
            translateY(-2px);
}



/* =====================================================
   IMAGE CARD
===================================================== */

.architecture-view-image {

    position: relative;

    height: 275px;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    background:
            rgba(0,0,0,0.16);
}


.architecture-view-image img {

    width: 100%;

    height: 100%;

    object-fit: contain;

    padding: 20px;

    display: block;

    transition:
            transform 0.4s ease,
            filter 0.4s ease;
}


.architecture-view:hover
.architecture-view-image img {

    transform:
            scale(1.025);

    filter:
            brightness(0.68);
}



/* =====================================================
   IMAGE OPEN BUTTON
===================================================== */

.view-open {

    position: absolute;

    right: 14px;

    bottom: 14px;

    padding:
            8px 13px;

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

    border-radius: 999px;

    background:
            rgba(0,0,0,0.72);

    backdrop-filter:
            blur(12px);

    color: white;

    font-family: inherit;

    font-size: 10px;

    cursor: pointer;

    opacity: 0;

    transform:
            translateY(6px);

    transition:
            opacity 0.25s ease,
            transform 0.25s ease,
            background 0.2s ease;
}


.architecture-view:hover
.view-open {

    opacity: 1;

    transform:
            translateY(0);
}


.view-open:hover {

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



/* =====================================================
   ARCHITECTURE INFORMATION
===================================================== */

.architecture-view-info {

    display: grid;

    grid-template-columns:
        36px 1fr;

    gap: 10px;

    padding:
            20px 0 35px;
}


.architecture-view-info > span {

    padding-top: 3px;

    font-size: 9px;

    letter-spacing: 0.12em;

    opacity: 0.32;
}


.architecture-view-info h4 {

    margin: 0;

    font-size: 18px;

    line-height: 1.2;

    font-weight: 500;

    letter-spacing: -0.015em;
}


.architecture-view-info p {

    margin:
            8px 0 0;

    max-width: 400px;

    font-size: 15px;

    line-height: 1.65;

    opacity: 0.40;
}



/* =====================================================
   TEXT-ONLY ARCHITECTURE
===================================================== */

/*
   This is deliberately NOT an empty image card.

   It behaves as a proper architecture item even
   when there is no diagram.
*/

.architecture-view-text {

    min-height: 180px;

    display: flex;

    align-items: stretch;
}


.architecture-view-text
.architecture-view-info {

    width: 100%;

    padding:
            28px 0 38px;
}


.architecture-view-text
.architecture-view-info h4 {

    font-size: 18px;
}


.architecture-view-text
.architecture-view-info p {

    max-width: 500px;

    font-size: 15px;

    line-height: 1.75;

    opacity: 0.46;
}



/* =====================================================
   ARCHITECTURE META
===================================================== */

.architecture-meta {

    margin-top: 18px;

    font-size: 12px;

    line-height: 1.6;

    letter-spacing: 0.08em;

    text-transform: uppercase;

}



/* =====================================================
   TECHNOLOGY FOOTER
===================================================== */

.project-tech {

    margin-top: 60px;

    padding-top: 22px;

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

    font-size: 10px;

    line-height: 1.8;

    letter-spacing: 0.04em;

}



/* =====================================================
   FULLSCREEN VIEWER
===================================================== */

.architecture-viewer {

    position: fixed;

    inset: 0;

    z-index: 9999;

    display: none;

    align-items: center;

    justify-content: center;

    padding: 60px;

    background:
            rgba(5,5,5,0.97);

    backdrop-filter:
            blur(12px);
}


.architecture-viewer.active {

    display: flex;
}


.viewer-content {

    width: 100%;

    height: 100%;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: auto;
}


.viewer-content img {

    max-width: 96vw;

    max-height: 90vh;

    width: auto;

    height: auto;

    object-fit: contain;

    display: block;
}



/* =====================================================
   CLOSE VIEWER
===================================================== */

.close-viewer {

    position: fixed;

    top: 24px;

    right: 28px;

    z-index: 10000;

    padding:
            10px 16px;

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

    border-radius: 999px;

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

    color: white;

    font-family: inherit;

    font-size: 10px;

    cursor: pointer;

    transition:
            background 0.2s ease,
            border-color 0.2s ease;
}


.close-viewer:hover {

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

    border-color:
            rgba(255,255,255,0.30);
}



/* =====================================================
   FOOTER
===================================================== */

footer {

    max-width: 1200px;

    margin: 0 auto;

    padding:
            35px 40px
            50px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    font-size: 10px;

    opacity: 0.4;
}


footer div {

    display: flex;

    gap: 25px;
}


footer a {

    color: inherit;

    text-decoration: none;

    transition:
            opacity 0.2s ease;
}


footer a:hover {

    opacity: 0.65;
}



/* =====================================================
   RESPONSIVE — TABLET
===================================================== */

@media (max-width: 900px) {

    .architecture-intro {

        padding:
                100px 30px
                80px;

        grid-template-columns:
            45px 1fr;

        gap: 25px;
    }


    .project-section {

        padding:
                0 30px;
    }


    .project-summary {

        padding:
                85px 0
                45px;
    }


    .project-content {

        padding-bottom: 90px;
    }


    .project-description {

        gap: 45px;
    }


    .architecture-image {

        height: 450px;
    }


    .architecture-view-image {

        height: 240px;
    }


    .architecture-views {

        column-gap: 35px;
    }

}



/* =====================================================
   RESPONSIVE — MOBILE
===================================================== */

@media (max-width: 650px) {

    .architecture-intro {

        padding:
                80px 20px
                65px;

        display: block;
    }


    .page-index {

        margin-bottom: 30px;
    }


    .architecture-intro h1 {

        font-size:
                clamp(44px, 14vw, 68px);
    }


    .architecture-intro p {

        font-size: 14px;

        margin-top: 25px;
    }


    .project-section {

        padding:
                0 20px;
    }


    .project-summary {

        padding:
                75px 0
                40px;

        gap: 20px;
    }


    .project-summary h2 {

        font-size:
                clamp(40px, 13vw, 62px);
    }


    .project-summary p {

        font-size: 13px;
    }


    .project-summary-side {

        padding-top: 8px;
    }


    .project-code {

        display: none;
    }


    .project-content {

        padding-bottom: 75px;
    }


    .project-description {

        margin-bottom: 60px;

        grid-template-columns: 1fr;

        gap: 30px;
    }


    .architecture-group {

        margin-top: 65px;
    }


    .architecture-main-header {

        padding:
                20px;

        align-items: flex-start;

        flex-direction: column;

        gap: 15px;
    }


    .architecture-image {

        height: 330px;
    }


    .architecture-image img {

        padding: 20px;
    }


    .architecture-views {

        grid-template-columns: 1fr;

        column-gap: 0;
    }


    .architecture-view-image {

        height: 230px;
    }


    .view-open {

        opacity: 1;

        transform:
                translateY(0);
    }


    .architecture-view-info {

        padding:
                18px 0 30px;
    }


    .architecture-view-text {

        min-height: auto;
    }


    .architecture-view-text
    .architecture-view-info {

        padding:
                25px 0 35px;
    }


    .project-tech {

        font-size: 9px;

        margin-top: 45px;
    }


    .architecture-viewer {

        padding:
                20px;
    }


    .close-viewer {

        top: 15px;

        right: 15px;
    }


    footer {

        padding:
                30px 20px
                40px;

        align-items: flex-start;

        flex-direction: column;

        gap: 20px;
    }

}