/* XenoLink pages: homepage and sector/normal pages */

.nav-dropdown-empty {
    display: block;
    padding: 12px 14px;
    color: #9aa3a8;
    font-size: 15px;
}

/* Homepage hero */
.home-hero {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(48px, 7vw, 100px);
    padding: 58px 0 40px;
}

.home-hero-copy {
    min-width: 0;
}

.home-eyebrow {
    margin: 0 0 18px;
    color: #666980;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .28em;
    text-transform: uppercase;
}

.home-title {
    max-width: 520px;
    margin: 0 0 24px;
}

.home-title img {
    display: block;
    width: min(100%, 510px);
    height: auto;
}

.home-intro {
    max-width: 470px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}

.home-art {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-art-frame {
    width: 100%;
    max-width: 650px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #faf9ff;
    box-shadow: 0 12px 34px rgba(20, 17, 30, .07);
}

.home-art-frame img {
    display: block;
    width: 100%;
    height: auto;
}

.home-intro-block {
    max-width: 760px;
    margin: 12px auto 0;
    padding: 58px 28px 72px;
    background: var(--divider-mark) center top / 16px 13px no-repeat, var(--divider-line) center 6px / 100% 2px no-repeat;
    text-align: center;
}

.home-intro-block .eyebrow {
    margin-bottom: 12px;
}

.home-intro-block h2 {
    margin: 0 0 14px;
    color: var(--ink);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.08;
    letter-spacing: -.04em;
}

.home-intro-block p:last-child {
    max-width: 620px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.8;
}

/* Purple divider between the hero and the homepage text */
.home-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 760px;
    margin: 0 auto;
}

.home-divider::before,
.home-divider::after {
    content: "";
    flex: 1;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(116, 27, 255, 0), var(--purple));
}

.home-divider::after {
    background: linear-gradient(90deg, var(--purple), rgba(116, 27, 255, 0));
}

.home-divider span {
    width: 0;
    height: 0;
    border-right: 8px solid transparent;
    border-left: 8px solid transparent;
    border-bottom: 13px solid var(--purple);
}

.home-content {
    padding: 36px 0 8px;
}

/* The same divider above Latest work and above the footer */
.home-divider-spaced {
    margin-top: 48px;
}


.home-content > :first-child {
    margin-top: 0;
}

/* Responsive content inserted through XenoLink/TinyMCE */
.home-page main iframe {
    display: block;
    width: 100% !important;
    max-width: 700px !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    margin-inline: auto;
    border: 0;
}

.home-page main img,
.home-page main video {
    max-width: 100%;
    height: auto;
}

@media (max-width: 760px) {
    /* Keep YouTube videos slightly inset on small screens. */
    .home-page main iframe {
        width: calc(100% - 20px) !important;
        max-width: 700px !important;
    }

    .header {
        padding-top: 10px;
        padding-bottom: 4px;
        gap: 6px;
    }

    .main-navigation {
        margin-top: 0;
    }

    .main-navigation a {
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .home-hero {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 26px;
        min-height: 0;
        padding: 18px 0 30px;
    }

    .home-eyebrow {
        margin-bottom: 14px;
        font-size: 10px;
        letter-spacing: .22em;
    }

    .home-title {
        margin-bottom: 18px;
    }

    .home-intro {
        font-size: 15px;
        line-height: 1.75;
    }

    .home-art {
        margin-top: 2px;
    }

    .home-art-frame {
        border-radius: 10px;
    }

    .home-divider {
        gap: 12px;
    }

    .home-content {
        padding-top: 26px;
    }

    .home-intro-block {
        margin-top: 0;
        padding: 42px 10px 48px;
    }

    .home-intro-block h2 {
        font-size: 29px;
    }

    .home-intro-block p:last-child {
        font-size: 14px;
    }
}

/* Homepage: Latest work (blog, MNodes, shaders and gallery mixed) */
.latest-work,
.home-tools {
    margin: 0;
    padding: 40px 0 48px;
}

.latest-work-head {
    margin-bottom: 26px;
    text-align: center;
}

.latest-work-head h2 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.1;
    letter-spacing: -.04em;
}

.latest-work-head p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
}

.latest-work-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

/* Cards side by side: XenoLink > Settings > Site (3 to 6). Smaller screens cap it below. */
.latest-work-grid.latest-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.latest-work-grid.latest-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.latest-work-grid.latest-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }

.latest-work-grid[aria-busy="true"] {
    opacity: .45;
    transition: opacity .15s ease;
}

/* "Browse" buttons in the head: links to each Creations overview page.
   Squarer and outlined in purple, so they don't look like the filter pills below. */
.latest-work-browse {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.latest-work-browse-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.latest-work-browse a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid rgba(124, 92, 255, .45);
    border-radius: 8px;
    background: rgba(124, 92, 255, .06);
    color: var(--purple);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .15s ease, color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.latest-work-browse a:hover,
.latest-work-browse a:focus-visible {
    border-color: var(--purple);
    background: var(--purple);
    color: #fff;
    box-shadow: 0 6px 16px rgba(116, 27, 255, .25);
}

.latest-work-browse .type-icon {
    width: 14px;
    height: 14px;
}

.latest-work-browse-arrow {
    transition: transform .15s ease;
}

.latest-work-browse a:hover .latest-work-browse-arrow {
    transform: translateX(2px);
}

/* Filter buttons above the cards */
.latest-work-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: -6px 0 26px;
}

.latest-work-filters a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .15s ease, color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.latest-work-filters a:hover {
    border-color: rgba(124, 92, 255, .45);
    color: var(--purple);
}

.latest-work-filters a.active {
    border-color: var(--purple);
    background: var(--purple);
    color: #fff;
    box-shadow: 0 6px 16px rgba(116, 27, 255, .25);
}

.latest-work-filters .type-icon {
    width: 14px;
    height: 14px;
}

/* "Load more" under the cards */
.latest-work-more {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.latest-work-more-button {
    padding: 11px 26px;
    border: 1px solid var(--purple);
    border-radius: 999px;
    background: #fff;
    color: var(--purple);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.latest-work-more-button:hover,
.latest-work-more-button:focus-visible {
    background: var(--purple);
    color: #fff;
    box-shadow: 0 8px 20px rgba(116, 27, 255, .25);
}

.latest-work-more-button[aria-busy="true"] {
    opacity: .6;
    pointer-events: none;
}

.latest-work-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(20, 17, 30, .05);
    transition: transform .2s ease, box-shadow .2s ease;
}

.latest-work-card:hover,
.latest-work-card:focus-within {
    transform: translateY(-6px);
    border-color: rgba(124, 92, 255, .35);
    box-shadow: 0 4px 10px rgba(20, 17, 30, .06), 0 18px 38px rgba(70, 30, 160, .16);
}

.home-page main .latest-work-image img {
    transition: transform .45s ease;
}

.home-page main .latest-work-card:hover .latest-work-image img {
    transform: scale(1.05);
}

.latest-work-image {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0d0b14;
}

.home-page main .latest-work-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Card without an image: the type icon large, with a soft purple glow. */
.latest-work-placeholder {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 45%, rgba(124, 92, 255, .32), rgba(124, 92, 255, 0) 62%), #0d0b14;
    color: #b9a6ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.latest-work-placeholder .type-icon {
    width: 42px;
    height: 42px;
    color: #cdbcff;
    filter: drop-shadow(0 0 10px rgba(150, 110, 255, .75));
    transition: transform .3s ease;
}

.latest-work-card:hover .latest-work-placeholder .type-icon {
    transform: scale(1.1);
}

.latest-work-body {
    padding: 12px 13px 15px;
}

.latest-work-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 8px;
    margin: 0 0 7px;
    color: var(--muted);
    font-size: 12px;
}

.latest-work-type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px 2px 7px;
    border-radius: 999px;
    background: rgba(124, 92, 255, .1);
    color: var(--purple);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.latest-work-body h3 {
    margin: 0 0 5px;
    font-size: 15px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.latest-work-body h3 a {
    color: var(--ink);
    text-decoration: none;
}

.latest-work-body h3 a:hover {
    color: var(--purple);
}

.latest-work-body p:last-child {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

@media (max-width: 1100px) {
    .latest-work-grid,
    .latest-work-grid.latest-cols-6 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .latest-work-grid.latest-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .latest-work-grid,
    .latest-work-grid.latest-cols-4,
    .latest-work-grid.latest-cols-6 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 720px) {
    .latest-work-grid,
    .latest-work-grid.latest-cols-3,
    .latest-work-grid.latest-cols-4,
    .latest-work-grid.latest-cols-6 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .latest-work,
    .home-tools {
        padding: 30px 0 36px;
    }

    .home-divider-spaced {
        margin-top: 36px;
    }

    .latest-work-grid,
    .latest-work-grid[class*="latest-cols-"] {
        gap: 12px;
    }

    .latest-work-filters {
        gap: 6px;
        margin-bottom: 20px;
    }

    .latest-work-filters a {
        padding: 6px 11px;
        font-size: 12px;
    }
}

@media (max-width: 420px) {
    .latest-work-grid,
    .latest-work-grid[class*="latest-cols-"] {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .latest-work-card,
    .home-page main .latest-work-image img,
    .latest-work-placeholder .type-icon {
        transition: none;
    }

    .latest-work-card:hover,
    .latest-work-card:focus-within {
        transform: none;
    }

    .home-page main .latest-work-card:hover .latest-work-image img,
    .latest-work-card:hover .latest-work-placeholder .type-icon {
        transform: none;
    }
}

/* "More like this" under MNodes, shaders, 3D models, gallery items and posts (templates/related-work.php). */
.related-work {
    margin-top: 44px;
    padding: 34px 0 10px;
    border-top: 1px solid var(--line);
}

.related-work .latest-work-head {
    margin-bottom: 20px;
}

.related-work .latest-work-head h2 {
    font-size: clamp(22px, 3vw, 28px);
}

.related-work .latest-work-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.related-work .latest-work-card:hover .latest-work-image img {
    transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
    .related-work .latest-work-image img { transition: none; }
    .related-work .latest-work-card:hover .latest-work-image img { transform: none; }
}

/* Tool in maintenance (XenoLink > Settings > Tools) */
.tool-maintenance-badge { display:inline-block; margin-left:8px; padding:2px 8px; border-radius:999px; background:#fff1db; color:#9a5800; font-size:11px; font-weight:700; letter-spacing:.02em; text-transform:none; vertical-align:middle; }
