/*
 * VISUPHORIA Portfolio Studio — Phase 2
 * Works alongside the existing theme's style.css.
 */

/* ----------------------------------------
   GLOBAL PORTFOLIO DETAILS
---------------------------------------- */

.vis-single-main {
    min-height: 65vh;
    background: var(--bg, #18171e);
}

.vis-project-detail {
    overflow: clip;
}

.vis-project-detail h1,
.vis-archive-accent {
    font-family: var(--display, "Outfit", sans-serif);
}

.vis-archive-accent {
    display: block;
    color: var(--coral, #e69a84);
    font-weight: 400;
}

.vis-project-back {
    display: inline-flex;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(230,154,132,.5);
    color: var(--coral-light, #f2b9a7);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .15em;
}

.vis-project-back:hover {
    color: white;
}

/* ----------------------------------------
   HOMEPAGE FEATURED PROJECTS
---------------------------------------- */

.vis-featured-projects {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
}

.vis-featured-projects .portfolio-card {
    min-height: 390px;
}

.vis-featured-projects .portfolio-card-image {
    height: 100%;
    min-height: 390px;
}

.vis-project-card {
    isolation: isolate;
    transition: transform .25s, box-shadow .25s;
}

.vis-project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 45px rgba(0,0,0,.24);
}

.vis-project-card .portfolio-card-image {
    position: relative;
}

.vis-project-card .portfolio-card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(11,9,17,.85),
        transparent 60%
    );
}

.vis-project-card .portfolio-card-caption {
    z-index: 1;
    background: none;
}

.vis-project-card .portfolio-card-caption h3 {
    font-size: clamp(23px,2.5vw,33px);
}

.vis-card-venue {
    margin: 3px 0 10px;
    color: #d3c7d7;
    font-size: 12px;
}

.vis-project-card .portfolio-link {
    display: inline-block;
    margin-top: 7px;
    color: var(--coral-light, #f2b9a7);
    font-weight: 700;
}

/* ----------------------------------------
   PORTFOLIO ARCHIVE
---------------------------------------- */

.vis-category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 5px 0 38px;
}

.vis-category-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 17px;
    border: 1px solid var(--border);
    background: #25212c;
    color: #d5cbd8;
    font-size: 12px;
    font-weight: 700;
    transition: background .2s, border-color .2s;
}

.vis-category-nav a:hover {
    border-color: var(--coral);
    background: #322734;
}

.vis-category-nav a.is-active {
    border-color: var(--coral);
    background: var(--coral);
    color: #20161f;
}

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

.vis-archive-grid .portfolio-card-image {
    height: 380px;
}

.vis-empty-work {
    padding: 65px 24px;
    border: 1px solid var(--border);
    background: linear-gradient(140deg, #28212f, #1b1923);
    text-align: center;
}

.vis-empty-icon {
    color: var(--coral);
    font-size: 55px;
}

.vis-empty-work h2 {
    margin: 10px 0;
    font-family: var(--display);
    font-size: clamp(25px, 4vw, 40px);
    font-weight: 500;
}

.vis-empty-work p {
    margin: 0;
    color: var(--muted);
}

/* ----------------------------------------
   SINGLE PROJECT: SHARED
---------------------------------------- */

.vis-project-detail h1 {
    max-width: 1000px;
    margin: 0;
    font-size: clamp(48px, 7.2vw, 105px);
    font-weight: 500;
    line-height: 1.03;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
}

.vis-project-subtitle {
    max-width: 720px;
    margin: 23px 0 0;
    color: #ded5e1;
    font-family: var(--display);
    font-size: clamp(18px, 2.5vw, 27px);
    line-height: 1.5;
}

.vis-project-body {
    padding-top: 50px;
    padding-bottom: 110px;
}

.vis-project-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px 40px;
    align-items: start;
    margin-bottom: 68px;
    padding-bottom: 35px;
    border-bottom: 1px solid var(--border);
}

.vis-project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 5px;
}

.vis-project-tags a {
    display: inline-flex;
    padding: 7px 13px;
    border: 1px solid rgba(230,154,132,.38);
    color: var(--coral-light);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
}

.vis-project-tags a:hover {
    background: rgba(230,154,132,.12);
}

.vis-project-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(130px,1fr));
    gap: 20px 32px;
    width: min(100%, 630px);
    margin: 0;
}

.vis-fact dt {
    margin-bottom: 5px;
    color: var(--coral-light);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .16em;
}

.vis-fact dd {
    margin: 0;
    color: #eee7ee;
    font-family: var(--display);
    font-size: 18px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.vis-section-topline {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(230,154,132,.4);
    color: var(--coral-light);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .16em;
}

.vis-project-story,
.vis-project-gallery-section,
.vis-project-video {
    margin-block: 80px;
}

.vis-project-story .prose {
    margin-top: 32px;
}

.vis-project-gallery-section > h2,
.vis-project-video > h2 {
    margin: 20px 0 30px;
    font-family: var(--display);
    font-size: clamp(32px,4.3vw,55px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -.03em;
}

.vis-project-story .prose {
    max-width: 850px;
}

.vis-project-story .prose p {
    margin-bottom: 20px;
}

.vis-project-story .wp-block-video video,
.vis-project-story video {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

.vis-project-story .wp-block-embed__wrapper {
    max-width: 100%;
}

.vis-project-story iframe {
    max-width: 100%;
}

/* ----------------------------------------
   CINEMATIC
---------------------------------------- */

.vis-project-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    min-height: min(790px, 85vh);
    background:
        radial-gradient(
            ellipse at 70% 20%,
            rgba(181,75,157,.4),
            transparent 50%
        ),
        #201723;
}

.vis-project-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background-image:
        linear-gradient(
            0deg,
            rgba(13,11,19,.98) 0%,
            rgba(13,11,19,.65) 45%,
            rgba(13,11,19,.15) 100%
        ),
        var(--project-cover, none);
    background-position: center;
    background-size: cover;
}

.vis-project-hero-inner {
    display: flex;
    min-height: inherit;
    flex-direction: column;
    justify-content: space-between;
    padding-top: 65px;
    padding-bottom: 90px;
}

.vis-project-hero .vis-project-hero-copy h1 {
    text-shadow: 0 5px 35px rgba(0,0,0,.34);
}

.vis-project-hero .vis-project-subtitle {
    color: white;
}

/* ----------------------------------------
   EDITORIAL
---------------------------------------- */

.vis-editorial-header {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 45px;
    align-items: center;
    padding-top: 72px;
    padding-bottom: 65px;
}

.vis-editorial-copy h1 {
    font-size: clamp(46px,5vw,77px);
}

.vis-editorial-copy .vis-project-facts {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid var(--border);
}

.vis-editorial-cover {
    min-height: 550px;
    overflow: hidden;
    background: #37273c;
}

.vis-editorial-cover > img {
    width: 100%;
    height: 550px;
    object-fit: cover;
}

.vis-editorial-cover .portfolio-art {
    min-height: 550px;
}

.vis-layout-editorial .vis-project-body {
    padding-top: 0;
}

/* ----------------------------------------
   GALLERY FIRST
---------------------------------------- */

.vis-gallery-first-header {
    padding-top: 70px;
}

.vis-gallery-first-header h1 {
    max-width: 1050px;
}

.vis-gallery-first-cover {
    margin-top: 45px;
    overflow: hidden;
    background: #35273a;
}

.vis-gallery-first-cover img {
    display: block;
    width: 100%;
    max-height: 640px;
    object-fit: cover;
}

.vis-layout-gallery .vis-project-gallery-section {
    margin-top: 38px;
}

/* ----------------------------------------
   PHOTO GALLERY
---------------------------------------- */

.vis-project-gallery {
    display: grid;
    grid-template-columns: repeat(12,minmax(0,1fr));
    gap: 13px;
}

.vis-gallery-link {
    position: relative;
    display: block;
    grid-column: span 4;
    min-height: 245px;
    overflow: hidden;
    background: #2d2537;
}

.vis-gallery-link:nth-child(1),
.vis-gallery-link:nth-child(7) {
    grid-column: span 8;
    min-height: 370px;
}

.vis-gallery-link:nth-child(2),
.vis-gallery-link:nth-child(8) {
    grid-column: span 4;
    min-height: 370px;
}

.vis-gallery-link img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
    transition: transform .45s, filter .45s;
}

.vis-gallery-link:hover img {
    transform: scale(1.045);
    filter: brightness(.8);
}

.vis-gallery-zoom {
    position: absolute;
    top: 13px;
    right: 13px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: rgba(22,15,27,.75);
    color: white;
    font-size: 20px;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity .2s, transform .2s;
}

.vis-gallery-link:hover .vis-gallery-zoom,
.vis-gallery-link:focus-visible .vis-gallery-zoom {
    opacity: 1;
    transform: translateY(0);
}

/* ----------------------------------------
   LIGHTBOX
---------------------------------------- */

.vis-lightbox {
    position: fixed;
    max-width: min(1200px, 96vw);
    max-height: 96vh;
    width: 100%;
    margin: auto;
    padding: 46px 65px 25px;
    overflow: auto;
    border: 1px solid rgba(255,255,255,.16);
    background: #141019;
    color: white;
}

.vis-lightbox::backdrop {
    background: rgba(5,4,9,.94);
    backdrop-filter: blur(8px);
}

.vis-lightbox figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0;
}

.vis-lightbox figure img {
    display: block;
    max-width: 100%;
    max-height: calc(96vh - 145px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.vis-lightbox figcaption {
    color: #dfd3e1;
    font-size: 13px;
    text-align: center;
}

.vis-lightbox button {
    position: absolute;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.2);
    background: #2d2536;
    color: #f5eaf3;
    font-size: 31px;
    cursor: pointer;
}

.vis-lightbox button:hover {
    background: #653e64;
}

.vis-lightbox button[hidden] {
    display: none;
}

.vis-lightbox-close {
    top: 8px;
    right: 8px;
}

.vis-lightbox-prev {
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
}

.vis-lightbox-next {
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

/* ----------------------------------------
   VIDEO
---------------------------------------- */

.vis-video-frame {
    position: relative;
    width: 100%;
    max-width: 1050px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #100e17;
    border: 1px solid var(--border);
}

.vis-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.vis-project-video .button {
    margin-top: 5px;
}

/* ----------------------------------------
   BOTTOM CTA
---------------------------------------- */

.vis-project-bottom {
    margin-top: 85px;
    padding: 55px;
    border: 1px solid rgba(230,154,132,.3);
    background:
        radial-gradient(
            ellipse at 88% 18%,
            rgba(160,73,140,.24),
            transparent 55%
        ),
        linear-gradient(120deg,#312638,#201a28);
}

.vis-project-bottom > span {
    color: var(--coral-light);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .17em;
}

.vis-project-bottom h2 {
    max-width: 720px;
    margin: 15px 0 28px;
    font-family: var(--display);
    font-size: clamp(30px,4.5vw,55px);
    font-weight: 500;
    line-height: 1.15;
}

.vis-project-bottom-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ----------------------------------------
   TABLET
---------------------------------------- */

@media (max-width: 1000px) {
    .vis-featured-projects {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .vis-editorial-header {
        gap: 28px;
    }

    .vis-editorial-cover,
    .vis-editorial-cover > img,
    .vis-editorial-cover .portfolio-art {
        min-height: 430px;
        height: 430px;
    }

    .vis-gallery-link {
        grid-column: span 6;
    }

    .vis-gallery-link:nth-child(1),
    .vis-gallery-link:nth-child(7) {
        grid-column: span 6;
    }
}

/* ----------------------------------------
   MOBILE
---------------------------------------- */

@media (max-width: 760px) {
    .vis-featured-projects,
    .vis-archive-grid {
        grid-template-columns: 1fr;
    }

    .vis-featured-projects .portfolio-card,
    .vis-featured-projects .portfolio-card-image {
        min-height: 320px;
    }

    .vis-project-detail h1 {
        font-size: clamp(43px,9vw,69px);
    }

    .vis-project-hero {
        min-height: 580px;
    }

    .vis-project-hero-inner {
        padding-top: 50px;
        padding-bottom: 62px;
    }

    .vis-project-subtitle {
        font-size: 19px;
    }

    .vis-project-info {
        flex-direction: column;
        gap: 22px;
        margin-bottom: 45px;
    }

    .vis-project-facts {
        width: 100%;
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 22px;
    }

    .vis-editorial-header {
        grid-template-columns: 1fr;
        padding-top: 45px;
        padding-bottom: 40px;
    }

    .vis-editorial-copy h1 {
        font-size: clamp(42px,9vw,65px);
    }

    .vis-editorial-cover,
    .vis-editorial-cover > img,
    .vis-editorial-cover .portfolio-art {
        min-height: 340px;
        height: 340px;
    }

    .vis-gallery-first-header {
        padding-top: 45px;
    }

    .vis-gallery-first-cover {
        margin-top: 30px;
    }

    .vis-project-body {
        padding-top: 35px;
        padding-bottom: 70px;
    }

    .vis-project-story,
    .vis-project-gallery-section,
    .vis-project-video {
        margin-block: 55px;
    }

    .vis-gallery-link,
    .vis-gallery-link:nth-child(1),
    .vis-gallery-link:nth-child(7),
    .vis-gallery-link:nth-child(2),
    .vis-gallery-link:nth-child(8) {
        grid-column: span 6;
        min-height: 220px;
    }

    .vis-gallery-zoom {
        opacity: 1;
        transform: none;
    }

    .vis-project-bottom {
        margin-top: 55px;
        padding: 35px 25px;
    }

    .vis-lightbox {
        padding: 50px 45px 25px;
        max-width: 100vw;
        max-height: 100vh;
    }

    .vis-lightbox figure img {
        max-height: calc(100vh - 155px);
    }

    .vis-lightbox-prev {
        left: 2px;
    }

    .vis-lightbox-next {
        right: 2px;
    }
}

@media (max-width: 480px) {
    .vis-project-facts {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
    }

    .vis-fact dd {
        font-size: 16px;
    }

    .vis-project-gallery {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .vis-gallery-link,
    .vis-gallery-link:nth-child(1),
    .vis-gallery-link:nth-child(7),
    .vis-gallery-link:nth-child(2),
    .vis-gallery-link:nth-child(8) {
        grid-column: 1;
        min-height: 235px;
        height: 235px;
    }

    .vis-project-bottom-actions {
        flex-direction: column;
    }

    .vis-project-bottom-actions .button {
        width: 100%;
        justify-content: space-between;
    }

    .vis-category-nav {
        gap: 7px;
    }

    .vis-category-nav a {
        padding: 7px 11px;
        font-size: 11px;
    }
}
