/* Home Page Specific Styles */

/* Navigation Override - Hide nav links on desktop (show "Currently at Atlassian" only); on mobile they appear in hamburger menu */
@media (min-width: 769px) {
    .nav-items a {
        display: none;
    }
}

.nav-current {
    font-weight: 500;
    font-size: 16px;
    text-transform: titlecase;
    color: var(--text-muted);
}

/* Main Content Override */
main {
    padding: 0px 32px;
}

/* Hero Section */
.hero {
    padding-top: var(--nav-spacing); 
}

.intro {
    display: flex;
    flex-direction: row;
    gap: 100px;
    padding: 0px 0px 40px 0px;
    align-items: center;
    justify-content: space-between;
}

.header-text {
    max-width: 500px;
    align-self: flex-end;
}

/* Sub Navigation */
.sub-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 0;
}

.sub-nav a {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.3;
    text-transform: titlecase;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.sub-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 2px;
    width: 0;
    height: 2px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.3;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0px 0;
    transition: color 0.3s ease;
}

.sub-nav a:hover {
    color: var(--text-primary);
}

.sub-nav a:hover::after {
    width: 100%;
}

.header-text {
    max-width: 754px;
    text-align: right;              
}


/* Header text fade in animation */
.header-text {
    animation: fadeInUp 1s ease-out 0.3s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gallery Section */
.gallery {
    padding: 16px 0;
    margin: 0;
}

.gallery-grid {
    display: grid;
    padding: 0px 0;
    row-gap: 20px;
    column-gap: 20px;
    width: 100%;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: repeat(2, 1fr);
}

.gallery-item {
    position: relative;
    background: #E5E4DE;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 0;
    opacity: 0;
    animation: fadeInScale 0.6s ease-out forwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.5s; }
.gallery-item:nth-child(2) { animation-delay: 0.6s; }
.gallery-item:nth-child(3) { animation-delay: 0.7s; }
.gallery-item:nth-child(4) { animation-delay: 0.8s; }
.gallery-item:nth-child(5) { animation-delay: 0.9s; }
.gallery-item:nth-child(6) { animation-delay: 1s; }
.gallery-item:nth-child(7) { animation-delay: 1.1s; }
.gallery-item:nth-child(8) { animation-delay: 1.2s; }

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Top row: first 3 items span 2 columns each */
.gallery-item:nth-child(1),
.gallery-item:nth-child(2),
.gallery-item:nth-child(3) {
    grid-column: span 2;
}

/* Bottom row: items 4 and 5 span 3 columns each, centered */
.gallery-item:nth-child(4) {
    grid-column: 1 / span 3;
}

.gallery-item:nth-child(5) {
    grid-column: 4 / span 3;
}

.gallery-item:hover {
    transform: translateY(-4px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease, filter 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: brightness(0.9);
}

/* Make gallery item links behave like blocks */
.gallery-item a {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 1;
}

/* Centered logo overlay */
.gallery-logo {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: transform 0.4s ease;
}

.gallery-logo img {
    width: 180px;
    max-width: 60%;
    height: auto;
}

.gallery-item:hover .gallery-logo {
    transform: scale(1.05);
}

/* Bottom-left pill */
.gallery-pill {
    position: absolute;
    bottom: 16px;
    left: 24px;
    font-size: 14px;
    font-weight: 700;
    text-transform: titlecase;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.04em;
    pointer-events: none;
    text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

/* Dark overlay */
.gallery-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.25);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-label {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.9);
    padding: 16px;
    border-radius: 4px;
    backdrop-filter: blur(8px);
}

.gallery-label-title {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.gallery-label-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

/* About Section */
.about-section {
    padding: 120px 0 40px 0;
    display: flex;
    flex-direction: column;
    gap: 64px;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.about-body {
    max-width: 747px;
}

/* Logos Section */
.logos-section {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.client-logo {
    height: 40px;
    width: 120px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    filter: grayscale(100%);
    object-fit: contain;
    display: block;
    object-position: left center;
}

.client-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* Scroll-triggered animations */
.scroll-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-fade-in-delay {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s, 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.scroll-fade-in-delay.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Logo row animation */
.logo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-row.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth page load animation */
body {
    animation: pageLoad 0.3s ease-in;
}

@keyframes pageLoad {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .intro {
        flex-direction: column;
        gap: 40px;
    }
}

@media (max-width: 980px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .gallery-item:nth-child(1),
    .gallery-item:nth-child(2),
    .gallery-item:nth-child(3),
    .gallery-item:nth-child(4),
    .gallery-item:nth-child(5) {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    main {
        padding: 64px 24px;
    }
}

@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        width: 100%;
    }

    .gallery-item:nth-child(1),
    .gallery-item:nth-child(2),
    .gallery-item:nth-child(3),
    .gallery-item:nth-child(4),
    .gallery-item:nth-child(5) {
        grid-column: 1 / -1;
        width: 100%;
    }
}
