/* =========================================================
   YAFFI SPACE PAGE
   ========================================================= */

.space-page {
    background: #f1ede3;
    color: #20251f;
}


/* =========================================================
   SPACE LOADER
   ========================================================= */

.space-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 25px;

    background: #394738;

    transition:
        opacity .4s ease,
        visibility .4s ease;
}

.space-loader img {
    width: 72px;
    height: 72px;

    object-fit: contain;
}

.space-loader span {
    position: relative;

    width: 80px;
    height: 1px;

    overflow: hidden;

    background: rgba(255, 255, 255, .15);
}

.space-loader span::after {
    content: "";

    position: absolute;
    inset: 0;

    background: #f1ede3;

    transform: translateX(-100%);

    animation: loaderLine 1.2s ease forwards;
}

.space-loader.hide {
    opacity: 0;
    visibility: hidden;
}

@keyframes loaderLine {
    to {
        transform: translateX(0);
    }
}


/* =========================================================
   HERO
   ========================================================= */

.space-hero {
    position: relative;

    min-height: 100svh;

    overflow: hidden;

    background: #394738;
    color: #f7f4ec;
}

.space-hero-bg {
    position: absolute;
    inset: 0;

    background:
        radial-gradient(
            circle at 75% 30%,
            rgba(122, 145, 113, .20),
            transparent 30%
        ),
        radial-gradient(
            circle at 15% 80%,
            rgba(255, 255, 255, .045),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            #202821 0%,
            #394738 48%,
            #303c32 100%
        );
}

.space-hero-bg::before,
.space-hero-bg::after {
    content: "";

    position: absolute;

    border: 1px solid rgba(255, 255, 255, .08);

    border-radius: 50%;
}

.space-hero-bg::before {
    width: 650px;
    height: 650px;

    right: -170px;
    top: 12%;
}

.space-hero-bg::after {
    width: 420px;
    height: 420px;

    right: -55px;
    top: 25%;
}

.space-hero-inner {
    position: relative;
    z-index: 2;

    min-height: 100svh;

    padding: 125px 6vw 40px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.space-hero-top,
.space-hero-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;

    color: rgba(247, 244, 236, .48);

    font-size: 8px;
    font-weight: 600;

    letter-spacing: .18em;
}

.space-hero-content {
    max-width: 1100px;
}

.space-kicker {
    margin-bottom: 22px;

    color: #b9c7ae;

    font-size: 9px;
    font-weight: 600;

    letter-spacing: .25em;
}

.space-hero h1 {
    max-width: 1050px;

    font-family: var(--serif);

    font-size: clamp(70px, 12vw, 180px);

    line-height: .80;

    font-weight: 500;

    letter-spacing: -.065em;
}

.space-hero h1 em {
    display: block;

    margin-left: 11vw;

    color: #c9d2bf;

    font-style: italic;
}

.space-hero-description {
    max-width: 440px;

    margin-top: 42px;
    margin-left: 11vw;

    color: rgba(247, 244, 236, .58);

    font-size: 12px;

    line-height: 1.8;
}

.space-scroll-line {
    flex: 1;

    max-width: 100px;

    height: 1px;

    margin: 0 18px;

    background: rgba(255, 255, 255, .16);
}


/* =========================================================
   GALLERY SECTION
   ========================================================= */

.gallery-section {
    padding: 145px 6vw 120px;

    background: #f1ede3;
}


/* =========================================================
   GALLERY INTRO
   ========================================================= */

.gallery-intro {
    display: grid;

    grid-template-columns: 1.2fr .8fr;

    gap: 80px;

    align-items: end;

    max-width: 1250px;

    margin: 0 auto 90px;
}

.section-label {
    color: #747970;

    font-size: 9px;
    font-weight: 600;

    letter-spacing: .22em;
}

.gallery-intro h2 {
    max-width: 750px;

    margin-top: 15px;

    font-family: var(--serif);

    font-size: clamp(42px, 5.5vw, 76px);

    line-height: .96;

    font-weight: 500;

    letter-spacing: -.045em;
}

.gallery-intro h2 em {
    color: #687764;

    font-style: italic;
}

.gallery-intro > p {
    max-width: 350px;

    color: #747970;

    font-size: 12px;

    line-height: 1.9;
}


/* =========================================================
   GEOMETRIC EDITORIAL GALLERY
   ========================================================= */

.space-gallery {
    width: min(1180px, 100%);

    margin: 0 auto;

    display: grid;

    grid-template-columns: repeat(12, minmax(0, 1fr));

    grid-auto-rows: 135px;

    gap: 16px;

    align-items: stretch;
}


/* =========================================================
   GALLERY ITEM
   ========================================================= */

.gallery-item {
    position: relative;

    width: 100%;
    height: 100%;

    margin: 0;

    overflow: hidden;

    background: #ded8c9;

    opacity: 0;

    transform: translateY(28px);

    cursor: zoom-in;

    transition:
        opacity .75s ease,
        transform .9s var(--ease);
}

.gallery-item.gallery-visible {
    opacity: 1;

    transform: translateY(0);
}


/* =========================================================
   GEOMETRIC IMAGE POSITIONS
   ========================================================= */

/*
    Main visual
*/

.gallery-item:nth-child(1) {
    grid-column: 1 / span 5;
    grid-row: span 3;

    border-radius: 0 0 0 28px;
}


/*
    Top right
*/

.gallery-item:nth-child(2) {
    grid-column: 7 / span 3;
    grid-row: span 2;

    margin-top: 35px;

    border-radius: 28px 0 0 0;
}


/*
    Small upper right
*/

.gallery-item:nth-child(3) {
    grid-column: 10 / span 3;
    grid-row: span 2;

    border-radius: 0 28px 0 0;
}


/*
    Middle left
*/

.gallery-item:nth-child(4) {
    grid-column: 2 / span 3;
    grid-row: span 2;

    margin-top: 18px;
}


/*
    Middle center
*/

.gallery-item:nth-child(5) {
    grid-column: 5 / span 4;
    grid-row: span 2;

    margin-top: 18px;
}


/*
    Middle right
*/

.gallery-item:nth-child(6) {
    grid-column: 9 / span 4;
    grid-row: span 3;

    margin-top: 18px;

    border-radius: 0 0 28px 0;
}


/*
    Lower left
*/

.gallery-item:nth-child(7) {
    grid-column: 1 / span 3;
    grid-row: span 2;

    margin-top: 15px;

    border-radius: 28px 0 0 0;
}


/*
    Lower center
*/

.gallery-item:nth-child(8) {
    grid-column: 4 / span 4;
    grid-row: span 2;

    margin-top: 15px;
}


/*
    Lower right large
*/

.gallery-item:nth-child(9) {
    grid-column: 8 / span 5;
    grid-row: span 2;

    margin-top: 15px;

    border-radius: 0 0 0 28px;
}


/*
    Continue pattern
*/

.gallery-item:nth-child(10) {
    grid-column: 1 / span 4;
    grid-row: span 2;

    margin-top: 10px;
}

.gallery-item:nth-child(11) {
    grid-column: 6 / span 3;
    grid-row: span 2;

    margin-top: 10px;

    border-radius: 0 28px 0 0;
}

.gallery-item:nth-child(12) {
    grid-column: 9 / span 4;
    grid-row: span 2;

    margin-top: 10px;

    border-radius: 28px 0 0 0;
}


/* =========================================================
   GALLERY IMAGE
   ========================================================= */

.gallery-item img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 1s cubic-bezier(.16, 1, .3, 1),
        filter .5s ease;
}

.gallery-item:hover img {
    transform: scale(1.055);

    filter: brightness(.94);
}


/* =========================================================
   GALLERY OVERLAY
   ========================================================= */

.gallery-item::after {
    content: "";

    position: absolute;

    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            to top,
            rgba(20, 25, 21, .38),
            transparent 38%
        );

    opacity: 0;

    transition: opacity .5s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}


/* =========================================================
   GALLERY NUMBER
   ========================================================= */

.gallery-number {
    position: absolute;

    left: 16px;
    bottom: 14px;

    z-index: 3;

    color: rgba(255, 255, 255, .9);

    font-family: var(--serif);

    font-size: 12px;

    letter-spacing: .12em;

    opacity: 0;

    transform: translateY(8px);

    pointer-events: none;

    text-shadow:
        0 1px 6px rgba(0, 0, 0, .45);

    transition:
        opacity .5s ease,
        transform .5s var(--ease);
}

.gallery-item:hover .gallery-number {
    opacity: 1;

    transform: translateY(0);
}


/* =========================================================
   GALLERY IMAGE BUTTON
   Used by the lightbox JS
   ========================================================= */

.gallery-image-button {
    position: relative;

    display: block;

    width: 100%;
    height: 100%;

    padding: 0;

    border: 0;

    background: none;

    overflow: hidden;

    cursor: zoom-in;
}

.gallery-image-button img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.gallery-image-button:hover img {
    transform: scale(1.055);
}


/* =========================================================
   IMAGE VIEW OVERLAY
   ========================================================= */

.gallery-image-overlay {
    position: absolute;

    inset: 0;

    z-index: 4;

    display: flex;

    align-items: center;
    justify-content: center;

    opacity: 0;

    background: rgba(0, 0, 0, .16);

    transition:
        opacity .35s ease;
}

.gallery-image-button:hover .gallery-image-overlay {
    opacity: 1;
}

.gallery-view-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    border:
        1px solid
        rgba(255, 255, 255, .7);

    border-radius: 50%;

    color: #fff;

    font-size: 18px;

    background: rgba(0, 0, 0, .18);

    backdrop-filter: blur(8px);

    transform: scale(.8);

    transition:
        transform .35s ease;
}

.gallery-image-button:hover .gallery-view-icon {
    transform: scale(1);
}


/* =========================================================
   GALLERY ERROR
   ========================================================= */

.gallery-item.gallery-image-error {
    display: none;
}


/* =========================================================
   GALLERY LOADING / EMPTY
   ========================================================= */

.gallery-loading,
.gallery-empty {
    grid-column: 1 / -1;

    min-height: 420px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 14px;

    color: #747970;
}

.loading-symbol {
    font-family: var(--serif);

    font-size: 35px;
}

.gallery-empty span {
    font-family: var(--serif);

    font-size: 25px;
}


/* =========================================================
   GALLERY END
   ========================================================= */

.gallery-end {
    max-width: 1180px;

    margin: 90px auto 0;

    display: flex;

    align-items: center;

    gap: 18px;

    color: #969b94;

    font-size: 8px;
    font-weight: 600;

    letter-spacing: .18em;
}

.gallery-end div {
    flex: 1;

    height: 1px;

    background: rgba(32, 37, 31, .12);
}


/* =========================================================
   SPACE LIGHTBOX
   ========================================================= */

.space-gallery-lightbox {
    position: fixed;

    inset: 0;

    z-index: 99999;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 40px;

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition:
        opacity .3s ease,
        visibility .3s ease;
}

.space-gallery-lightbox.is-open {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;
}


/* =========================================================
   LIGHTBOX BACKDROP
   ========================================================= */

.space-lightbox-backdrop {
    position: absolute;

    inset: 0;

    background:
        rgba(10, 13, 11, .93);

    backdrop-filter: blur(14px);

    -webkit-backdrop-filter: blur(14px);
}


/* =========================================================
   LIGHTBOX CARD
   ========================================================= */

.space-lightbox-card {
    position: relative;

    z-index: 2;

    width: min(1100px, 92vw);

    height: min(86vh, 850px);

    display: flex;

    align-items: center;
    justify-content: center;

    pointer-events: none;
}


/* =========================================================
   LIGHTBOX IMAGE WRAPPER
   ========================================================= */

.space-lightbox-image-wrapper {
    position: relative;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    pointer-events: auto;
}


/* =========================================================
   LIGHTBOX IMAGE
   ========================================================= */

.space-lightbox-image {
    display: block;

    max-width: calc(100% - 120px);
    max-height: calc(100% - 70px);

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 2px;

    user-select: none;

    box-shadow:
        0 25px 80px
        rgba(0, 0, 0, .4);
}


/* =========================================================
   LIGHTBOX CLOSE
   ========================================================= */

.space-lightbox-close {
    position: absolute;

    top: -12px;
    right: -12px;

    z-index: 10;

    width: 46px;
    height: 46px;

    display: flex;

    align-items: center;
    justify-content: center;

    border:
        1px solid
        rgba(255, 255, 255, .35);

    border-radius: 50%;

    color: #fff;

    background:
        rgba(20, 25, 22, .7);

    font-size: 25px;
    font-weight: 300;

    cursor: pointer;

    pointer-events: auto;

    backdrop-filter: blur(10px);

    transition:
        background .25s ease,
        transform .25s ease;
}

.space-lightbox-close:hover {
    transform: rotate(90deg);

    background:
        rgba(255, 255, 255, .14);
}


/* =========================================================
   LIGHTBOX ARROWS
   ========================================================= */

.space-lightbox-arrow {
    position: absolute;

    top: 50%;

    z-index: 10;

    width: 50px;
    height: 50px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 0;

    border:
        1px solid
        rgba(255, 255, 255, .3);

    border-radius: 50%;

    color: #fff;

    background:
        rgba(20, 25, 22, .65);

    font-size: 22px;

    cursor: pointer;

    pointer-events: auto;

    transform: translateY(-50%);

    backdrop-filter: blur(10px);

    transition:
        background .25s ease,
        transform .25s ease;
}

.space-lightbox-arrow:hover {
    background:
        rgba(255, 255, 255, .14);
}

.space-lightbox-prev {
    left: 0;
}

.space-lightbox-next {
    right: 0;
}

.space-lightbox-prev:hover {
    transform:
        translateY(-50%)
        translateX(-3px);
}

.space-lightbox-next:hover {
    transform:
        translateY(-50%)
        translateX(3px);
}


/* =========================================================
   LIGHTBOX BOTTOM INFO
   ========================================================= */

.space-lightbox-bottom {
    position: absolute;

    left: 50%;
    bottom: 0;

    z-index: 10;

    display: flex;

    align-items: center;

    gap: 16px;

    max-width: 70%;

    transform:
        translateX(-50%);

    color: #fff;

    pointer-events: none;
}

.space-lightbox-counter {
    font-size: 11px;

    letter-spacing: .15em;

    white-space: nowrap;

    opacity: .7;
}

.space-lightbox-title {
    max-width: 400px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-size: 11px;

    letter-spacing: .08em;

    opacity: .7;
}


/* =========================================================
   PREVENT PAGE SCROLL
   ========================================================= */

body.space-lightbox-open {
    overflow: hidden;
}


/* =========================================================
   CLOSING SECTION
   ========================================================= */

.space-closing {
    padding: 150px 6vw;

    background: #394738;

    color: #f7f4ec;
}

.space-closing-inner {
    max-width: 1100px;

    margin: auto;

    text-align: center;
}

.space-closing .section-label {
    color: rgba(247, 244, 236, .46);
}

.space-closing h2 {
    max-width: 850px;

    margin: 22px auto 40px;

    font-family: var(--serif);

    font-size: clamp(45px, 6vw, 80px);

    line-height: .95;

    font-weight: 500;

    letter-spacing: -.045em;
}

.space-closing h2 em {
    display: block;

    color: #c9d2bf;

    font-style: italic;
}


/* =========================================================
   VISIT BUTTON
   ========================================================= */

.space-visit-button {
    display: inline-flex;

    align-items: center;

    gap: 28px;

    padding:
        15px
        18px
        15px
        23px;

    border:
        1px solid
        rgba(247, 244, 236, .22);

    border-radius: 100px;

    color: #f7f4ec;

    font-size: 10px;

    letter-spacing: .08em;

    transition:
        background .4s ease,
        color .4s ease,
        transform .4s var(--ease);
}

.space-visit-button i {
    width: 30px;
    height: 30px;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background: #f1ede3;

    color: #394738;

    font-style: normal;
}

.space-visit-button:hover {
    background: #f1ede3;

    color: #394738;

    transform: translateY(-4px);
}


/* =========================================================
   COMMUNITY MODAL
   ========================================================= */

.community-modal {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 24px;

    visibility: hidden;

    opacity: 0;

    pointer-events: none;

    transition:
        opacity .45s cubic-bezier(.22, 1, .36, 1),
        visibility .45s;
}

.community-modal.is-open {
    visibility: visible;

    opacity: 1;

    pointer-events: auto;
}

.community-modal-backdrop {
    position: absolute;

    inset: 0;

    background:
        rgba(20, 27, 21, .68);

    backdrop-filter: blur(18px);

    -webkit-backdrop-filter: blur(18px);
}

.community-modal-card {
    position: relative;

    z-index: 2;

    width: min(560px, 100%);

    max-height:
        min(
            760px,
            calc(100vh - 48px)
        );

    overflow-y: auto;

    background: #f1ede3;

    color: #20251f;

    padding: 52px;

    transform:
        translateY(24px)
        scale(.97);

    opacity: 0;

    transition:
        transform .55s cubic-bezier(.22, 1, .36, 1),
        opacity .45s ease;
}

.community-modal.is-open .community-modal-card {
    transform:
        translateY(0)
        scale(1);

    opacity: 1;
}

.community-modal-close {
    position: absolute;

    top: 20px;
    right: 20px;

    width: 42px;
    height: 42px;

    border:
        1px solid
        rgba(32, 37, 31, .18);

    background: transparent;

    color: #20251f;

    font-size: 24px;

    cursor: pointer;

    transition:
        background .25s ease,
        color .25s ease;
}

.community-modal-close:hover {
    background: #394738;

    color: #f1ede3;
}

.community-modal-content .section-label {
    display: block;

    margin-bottom: 18px;
}

.community-modal-content h2 {
    margin: 0;

    font-family:
        "Playfair Display",
        Georgia,
        serif;

    font-size:
        clamp(
            42px,
            6vw,
            64px
        );

    line-height: .95;

    font-weight: 500;

    letter-spacing: -.035em;
}

.community-modal-content h2 em {
    display: block;

    color: #394738;

    font-style: italic;
}

.community-modal-content > p {
    max-width: 450px;

    margin:
        24px 0 30px;

    color: #747970;

    font-size: 14px;

    line-height: 1.8;
}


/* =========================================================
   COMMUNITY DROPZONE
   ========================================================= */

.community-dropzone {
    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    min-height: 240px;

    padding: 28px;

    border:
        1px dashed
        rgba(57, 71, 56, .38);

    background:
        rgba(255, 255, 255, .28);

    cursor: pointer;

    text-align: center;

    transition:
        border-color .3s ease,
        background .3s ease,
        transform .3s ease;
}

.community-dropzone:hover,
.community-dropzone.is-dragging {
    border-color: #394738;

    background:
        rgba(57, 71, 56, .06);
}

.community-preview {
    width: 76px;
    height: 76px;

    margin-bottom: 18px;

    display: flex;

    align-items: center;
    justify-content: center;

    border:
        1px solid
        rgba(57, 71, 56, .2);

    color: #394738;

    font-size: 32px;

    overflow: hidden;
}

.community-preview.has-image {
    border-color: #394738;
}

.community-preview img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.community-dropzone strong {
    font-family:
        "DM Sans",
        Arial,
        sans-serif;

    font-size: 14px;

    font-weight: 600;
}

.community-dropzone small {
    margin-top: 8px;

    color: #747970;

    font-size: 10px;

    letter-spacing: .12em;
}

.community-file-name {
    min-height: 18px;

    margin-top: 12px;

    color: #394738;

    font-size: 12px;

    text-align: center;

    word-break: break-word;
}


/* =========================================================
   COMMUNITY BUTTONS
   ========================================================= */

.community-submit-button,
.community-done-button {
    width: 100%;
    height: 58px;

    margin-top: 22px;

    border: 0;

    background: #394738;

    color: #f1ede3;

    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 0 22px;

    font-family:
        "DM Sans",
        Arial,
        sans-serif;

    font-size: 11px;

    font-weight: 600;

    letter-spacing: .12em;

    text-transform: uppercase;

    cursor: pointer;

    transition:
        opacity .25s ease,
        transform .25s ease;
}

.community-submit-button:hover:not(:disabled),
.community-done-button:hover {
    transform: translateY(-2px);
}

.community-submit-button:disabled {
    opacity: .38;

    cursor: not-allowed;
}

.community-submit-button.is-loading {
    opacity: .7;
}

.community-submit-button i,
.community-done-button i {
    font-style: normal;

    font-size: 18px;
}


/* =========================================================
   COMMUNITY MESSAGE
   ========================================================= */

.community-message {
    min-height: 18px;

    margin-top: 12px;

    font-size: 12px;

    text-align: center;
}

.community-message.is-error {
    color: #9b493f;
}

.community-message.is-visible {
    color: #394738;
}


/* =========================================================
   COMMUNITY SUCCESS
   ========================================================= */

.community-success {
    text-align: center;
}

.community-success-icon {
    width: 74px;
    height: 74px;

    margin: 0 auto 28px;

    display: flex;

    align-items: center;
    justify-content: center;

    border:
        1px solid
        #394738;

    color: #394738;

    font-size: 26px;
}

.community-success h2 {
    font-size:
        clamp(
            38px,
            6vw,
            58px
        );
}

.community-success p {
    max-width: 390px;

    margin:
        24px auto 0;
}

.community-success .community-done-button {
    justify-content: center;
}


/* =========================================================
   COMMUNITY OPEN STATE
   ========================================================= */

.community-modal-open {
    overflow: hidden;
}


/* =========================================================
   COMMUNITY SHARE BUTTON
   ========================================================= */

.community-share-button {
    display: inline-flex;

    align-items: center;

    gap: 24px;

    margin-top: 26px;

    padding: 15px 20px;

    border:
        1px solid
        rgba(57, 71, 56, .3);

    background: transparent;

    color: #394738;

    font-family:
        "DM Sans",
        Arial,
        sans-serif;

    font-size: 10px;

    font-weight: 600;

    letter-spacing: .13em;

    text-transform: uppercase;

    cursor: pointer;

    transition:
        background .3s ease,
        color .3s ease,
        transform .3s ease;
}

.community-share-button i {
    font-style: normal;

    font-size: 16px;
}

.community-share-button:hover {
    background: #394738;

    color: #f1ede3;

    transform: translateY(-2px);
}


/* =========================================================
   TABLET — 1000px
   ========================================================= */

@media (max-width: 1000px) {

    .space-gallery {
        width: min(900px, 100%);

        grid-template-columns:
            repeat(6, minmax(0, 1fr));

        grid-auto-rows: 125px;

        gap: 12px;
    }


    .gallery-item:nth-child(1) {
        grid-column: 1 / span 3;
        grid-row: span 3;

        border-radius: 0 0 0 22px;
    }

    .gallery-item:nth-child(2) {
        grid-column: 4 / span 3;
        grid-row: span 2;

        margin-top: 25px;

        border-radius: 22px 0 0 0;
    }

    .gallery-item:nth-child(3) {
        grid-column: 4 / span 2;
        grid-row: span 2;

        border-radius: 0 22px 0 0;
    }

    .gallery-item:nth-child(4) {
        grid-column: 1 / span 2;
        grid-row: span 2;

        margin-top: 10px;
    }

    .gallery-item:nth-child(5) {
        grid-column: 3 / span 2;
        grid-row: span 2;

        margin-top: 10px;
    }

    .gallery-item:nth-child(6) {
        grid-column: 5 / span 2;
        grid-row: span 3;

        margin-top: 10px;

        border-radius: 0 0 22px 0;
    }

    .gallery-item:nth-child(7) {
        grid-column: 1 / span 2;
        grid-row: span 2;
    }

    .gallery-item:nth-child(8) {
        grid-column: 3 / span 3;
        grid-row: span 2;
    }

    .gallery-item:nth-child(9) {
        grid-column: 1 / span 3;
        grid-row: span 2;
    }

    .gallery-item:nth-child(10) {
        grid-column: 4 / span 3;
        grid-row: span 2;
    }

    .gallery-item:nth-child(11) {
        grid-column: 1 / span 2;
        grid-row: span 2;
    }

    .gallery-item:nth-child(12) {
        grid-column: 3 / span 4;
        grid-row: span 2;
    }


    .space-lightbox-card {
        width: 94vw;

        height: 82vh;
    }
}


/* =========================================================
   TABLET / MOBILE — 800px
   ========================================================= */

@media (max-width: 800px) {

    .space-hero-inner {
        padding:
            110px
            6vw
            30px;
    }

    .space-hero h1 {
        font-size:
            clamp(
                62px,
                18vw,
                120px
            );
    }

    .space-hero h1 em {
        margin-left: 7vw;
    }

    .space-hero-description {
        margin-left: 7vw;

        margin-top: 30px;
    }


    .gallery-section {
        padding:
            95px
            5vw
            80px;
    }

    .gallery-intro {
        grid-template-columns: 1fr;

        gap: 25px;

        margin-bottom: 55px;
    }


    .space-closing {
        padding:
            100px
            6vw;
    }
}


/* =========================================================
   MOBILE — 650px
   ========================================================= */

@media (max-width: 650px) {

    .space-gallery {
        width: 100%;

        grid-template-columns:
            repeat(4, minmax(0, 1fr));

        grid-auto-rows: 88px;

        gap: 8px;
    }


    /*
        Mobile geometric layout
    */

    .gallery-item:nth-child(1) {
        grid-column: 1 / span 2;
        grid-row: span 3;

        border-radius: 0 0 0 18px;
    }

    .gallery-item:nth-child(2) {
        grid-column: 3 / span 2;
        grid-row: span 2;

        margin-top: 15px;

        border-radius: 18px 0 0 0;
    }

    .gallery-item:nth-child(3) {
        grid-column: 3 / span 1;
        grid-row: span 2;

        margin-top: 0;
    }

    .gallery-item:nth-child(4) {
        grid-column: 4 / span 1;
        grid-row: span 2;

        margin-top: 0;

        border-radius: 0 18px 0 0;
    }

    .gallery-item:nth-child(5) {
        grid-column: 1 / span 2;
        grid-row: span 2;

        margin-top: 5px;
    }

    .gallery-item:nth-child(6) {
        grid-column: 3 / span 2;
        grid-row: span 3;

        margin-top: 5px;

        border-radius: 0 18px 0 18px;
    }

    .gallery-item:nth-child(7) {
        grid-column: 1 / span 2;
        grid-row: span 2;

        margin-top: 0;

        border-radius: 18px 0 0 0;
    }

    .gallery-item:nth-child(8) {
        grid-column: 3 / span 2;
        grid-row: span 2;

        margin-top: 0;
    }

    .gallery-item:nth-child(9) {
        grid-column: 1 / span 2;
        grid-row: span 3;

        margin-top: 0;

        border-radius: 0 0 0 18px;
    }

    .gallery-item:nth-child(10) {
        grid-column: 3 / span 2;
        grid-row: span 2;

        margin-top: 0;

        border-radius: 18px 0 0 0;
    }

    .gallery-item:nth-child(11) {
        grid-column: 3 / span 1;
        grid-row: span 2;

        margin-top: 0;
    }

    .gallery-item:nth-child(12) {
        grid-column: 4 / span 1;
        grid-row: span 2;

        margin-top: 0;

        border-radius: 0 0 18px 0;
    }


    /*
        Mobile image
    */

    .gallery-item img {
        transition:
            transform .65s
            cubic-bezier(.16, 1, .3, 1);
    }


    /*
        Mobile numbers
    */

    .gallery-number {
        left: 8px;

        bottom: 7px;

        font-size: 9px;

        opacity: .85;

        transform: none;
    }


    /*
        Disable hover overlay on touch devices
    */

    .gallery-image-overlay {
        display: none;
    }


    /*
        Lightbox
    */

    .space-gallery-lightbox {
        padding: 20px;
    }

    .space-lightbox-card {
        width: 100%;

        height: 78vh;
    }

    .space-lightbox-image {
        max-width:
            calc(100% - 80px);

        max-height:
            calc(100% - 80px);
    }

    .space-lightbox-arrow {
        width: 42px;
        height: 42px;

        font-size: 18px;
    }

    .space-lightbox-prev {
        left: -5px;
    }

    .space-lightbox-next {
        right: -5px;
    }

    .space-lightbox-close {
        top: -8px;
        right: -5px;

        width: 40px;
        height: 40px;

        font-size: 22px;
    }

    .space-lightbox-bottom {
        bottom: -5px;

        max-width: 80%;
    }

    .space-lightbox-title {
        display: none;
    }


    /*
        Community modal
    */

    .community-modal {
        padding: 14px;
    }

    .community-modal-card {
        padding:
            42px
            24px
            28px;

        max-height:
            calc(100vh - 28px);
    }

    .community-modal-content h2 {
        font-size: 42px;
    }

    .community-dropzone {
        min-height: 210px;
    }

    .community-share-button {
        width: 100%;

        justify-content: space-between;
    }
}


/* =========================================================
   SMALL PHONES — 500px
   ========================================================= */

@media (max-width: 500px) {

    .space-hero-top span:last-child {
        display: none;
    }

    .space-hero-bottom {
        font-size: 7px;
    }


    .space-gallery {
        grid-auto-rows: 78px;

        gap: 6px;
    }


    .gallery-section {
        padding:
            80px
            14px
            70px;
    }


    .gallery-intro {
        margin-bottom: 42px;
    }


    .gallery-intro h2 {
        font-size:
            clamp(
                40px,
                12vw,
                58px
            );
    }


    .gallery-intro > p {
        font-size: 11px;
    }


    .gallery-end {
        margin-top: 55px;

        font-size: 7px;
    }


    .space-closing {
        padding:
            85px
            14px;
    }


    .space-closing h2 {
        font-size:
            clamp(
                42px,
                12vw,
                60px
            );
    }
}


/* =========================================================
   VERY SMALL PHONES — 380px
   ========================================================= */

@media (max-width: 380px) {

    .space-gallery {
        grid-auto-rows: 70px;

        gap: 5px;
    }

    .gallery-number {
        font-size: 8px;
    }

    .space-lightbox-arrow {
        width: 38px;
        height: 38px;

        font-size: 16px;
    }

    .space-lightbox-image {
        max-width:
            calc(100% - 68px);

        max-height:
            calc(100% - 70px);
    }
}



/* =========================================================
   FLOATING MAIN ICON
   ========================================================= */

.space-floating-icon {
    position: absolute;

    /* أكثر للشمال */
    right: 15vw;

    top: 50%;

    z-index: 10;

    /* أكبر */
    width: 220px;
    height: 220px;

    display: flex;
    align-items: center;
    justify-content: center;

    transform: translateY(-50%);

    pointer-events: none;

    animation: mainIconFloat 4s ease-in-out infinite;
}

.space-floating-icon img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}

@keyframes mainIconFloat {

    0%,
    100% {
        transform: translateY(-50%);
    }

    50% {
        transform: translateY(calc(-50% - 10px));
    }

}


/* Tablet */
@media (max-width: 1000px) {

    .space-floating-icon {
        right: 8vw;

        width: 90px;
        height: 90px;
    }

}


/* Mobile */
@media (max-width: 650px) {

    .space-floating-icon {
        right: 8vw;
        top: auto;
        bottom: 90px;

        width: 65px;
        height: 65px;

        transform: none;

        animation: mainIconFloatMobile 4s ease-in-out infinite;
    }

    @keyframes mainIconFloatMobile {

        0%,
        100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-7px);
        }

    }

}




/* =========================================================
   YAFFI FOOTER
   ========================================================= */

.site-footer {
    position: relative;
    display: block !important;
    width: calc(100% - 44px);
    margin: 22px 22px 0;
    min-height: 430px;
    overflow: hidden;
    padding: 85px 4vw 28px;
    background: var(--green);
    color: var(--cream);
    border-radius: 44px 44px 0 0;
}

.site-footer::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(241, 237, 227, .07);
    border-radius: 50%;
    pointer-events: none;
}

.site-footer::after {
    content: "";
    position: absolute;
    width: 760px;
    height: 760px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(241, 237, 227, .035);
    border-radius: 50%;
    pointer-events: none;
}


/* =========================================================
   MAIN
   ========================================================= */

.footer-main {
    position: relative;
    z-index: 2;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    min-height: 275px;
}


/* =========================================================
   CONTACT
   ========================================================= */

.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-self: start;
}

.footer-label {
    display: block;
    margin-bottom: 25px;
    color: rgba(241, 237, 227, .48);
    font-family: var(--sans);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.footer-contact-link {
    position: relative;
    width: fit-content;
    margin-bottom: 11px;
    color: var(--cream);
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
    transition:
        transform .45s var(--ease),
        opacity .35s ease;
}

.footer-contact-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 1px;
    background: var(--cream);
    transition: width .55s var(--ease);
}

.footer-contact-link:hover {
    transform: translateX(6px);
}

.footer-contact-link:hover::after {
    width: 100%;
}


/* =========================================================
   CENTER BRAND
   ========================================================= */

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    justify-self: center;
    text-align: center;
}

.footer-brand a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    text-decoration: none;
    transition:
        transform .9s var(--ease);
}

.footer-brand img {
    width: 105px;
    height: 105px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: .95;
    transition:
        transform .8s var(--ease),
        opacity .4s ease;
}

.footer-brand a:hover {
    transform: scale(1.06);
}

.footer-brand a:hover img {
    transform: scale(1.08) rotate(4deg);
    opacity: 1;
}

.footer-brand > span {
    margin-top: 8px;
    color: rgba(241, 237, 227, .42);
    font-family: var(--sans);
    font-size: 7px;
    font-weight: 700;
    letter-spacing: .28em;
}


/* =========================================================
   SOCIAL
   ========================================================= */

.footer-social {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-self: end;
}

.footer-social-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(241, 237, 227, .16);
    border-radius: 50%;
    color: var(--cream);
    transition:
        transform .5s var(--ease),
        background .45s ease,
        border-color .45s ease,
        color .45s ease;
}

.footer-social-links svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    transition: transform .4s var(--ease);
}

.footer-social-links a:nth-child(2) svg,
.footer-social-links a:nth-child(3) svg {
    fill: currentColor;
    stroke: none;
}

.footer-social-links a:hover {
    transform: translateY(-7px);
    background: var(--cream);
    border-color: var(--cream);
    color: var(--green);
}

.footer-social-links a:hover svg {
    transform: scale(1.12);
}


/* =========================================================
   BOTTOM
   ========================================================= */

.footer-bottom {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid rgba(241, 237, 227, .13);
    color: rgba(241, 237, 227, .45);
    font-family: var(--sans);
    font-size: 7px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.footer-line {
    flex: 1;
    height: 1px;
    background: rgba(241, 237, 227, .08);
}

.footer-top {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--cream);
    text-decoration: none;
    transition: transform .4s var(--ease);
}

.footer-top i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(241, 237, 227, .2);
    border-radius: 50%;
    font-size: 12px;
    font-style: normal;
    transition:
        background .4s ease,
        color .4s ease,
        transform .4s var(--ease);
}

.footer-top:hover {
    transform: translateY(-3px);
}

.footer-top:hover i {
    background: var(--cream);
    color: var(--green);
    transform: translateY(-2px);
}


/* =========================================================
   ENTRANCE
   ========================================================= */

.footer-contact,
.footer-brand,
.footer-social {
    opacity: 0;
    transform: translateY(30px);
    animation:
        yaffiFooterReveal 1s var(--ease) forwards;
}

.footer-contact {
    animation-delay: .05s;
}

.footer-brand {
    animation-delay: .15s;
}

.footer-social {
    animation-delay: .25s;
}

@keyframes yaffiFooterReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .site-footer {
        display: block !important;
        min-height: auto;
        padding: 70px 24px 25px;
    }

    .site-footer::before {
        width: 330px;
        height: 330px;
    }

    .site-footer::after {
        width: 500px;
        height: 500px;
    }

    .footer-main {
        display: grid;
        grid-template-columns: 1fr;
        gap: 48px;
        min-height: auto;
    }

    .footer-brand {
        order: -1;
    }

    .footer-contact {
        align-items: center;
        text-align: center;
    }

    .footer-social {
        align-items: center;
    }

    .footer-brand a {
        width: 125px;
        height: 125px;
    }

    .footer-brand img {
        width: 90px;
        height: 90px;
    }

    .footer-social-links {
        gap: 12px;
    }

    .footer-social-links a {
        width: 44px;
        height: 44px;
    }

    .footer-bottom {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 50px;
        gap: 14px;
        text-align: center;
    }

    .footer-line {
        display: none;
    }

    .footer-top {
        width: 100%;
        justify-content: center;
        margin-top: 7px;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 390px) {

    .site-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .footer-contact-link {
        font-size: 13px;
    }

    .footer-brand img {
        width: 82px;
        height: 82px;
    }

    .footer-brand > span {
        font-size: 6px;
        letter-spacing: .2em;
    }
}