/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #000000;
    background-color: #F5F5F5;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 40px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: #FF4500;
}

/* Color Utilities */
.text-black {
    color: #000000;
}

.text-orange {
    color: #FF4500;
}

/* Navigation */
.navbar {
    background-color: #FFFFFF;
    border-bottom: 1px solid #E0E0E0;
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: #000000;
}

.nav-right {
    font-size: 17px;
    font-weight: 500;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hero Section */
.hero-section {
    background-color: #F5F5F5;
    padding: 120px 0 100px;
    text-align: center;
}

.hero-title {
    font-size: 96px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 30px;
}

.hero-subtitle {
    font-size: 24px;
    font-weight: 400;
    color: #666666;
}

/* Gallery Section */
.gallery-section {
    background-color: #FFFFFF;
    padding: 60px 0;
}

.section-title {
    font-size: 72px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -1px;
    margin-top: 0;
    margin-bottom: 48px;
}

.animations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.animation-card {
    background-color: #F5F5F5;
    padding: 30px;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.animation-card:hover {
    transform: scale(1.2);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    z-index: 100;
    background-color: #FFFFFF;
}

.animation-card:hover .animation-placeholder {
    border-color: #FF4500;
    box-shadow: 0 0 30px rgba(255, 69, 0, 0.4);
    min-height: 400px;
}

/* Icon set: no card/lightbox hover — only icon color inversion */
.animation-card--large:hover {
    transform: none;
    box-shadow: none;
    background-color: #F5F5F5;
}

.animation-card--large:hover .animation-placeholder {
    border-color: #E0E0E0;
    box-shadow: none;
    min-height: 380px;
}

.animation-title {
    font-size: 20px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.animation-subhead {
    font-size: 14px;
    font-weight: 400;
    color: #666666;
    margin-bottom: 25px;
    line-height: 1.4;
}

.animation-placeholder {
    background-color: #FFFFFF;
    border: 2px dashed #E0E0E0;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.animation-placeholder::before {
    content: 'Animation will appear here';
    color: #999999;
    font-size: 16px;
    font-weight: 400;
}

.animation-placeholder:has(> *)::before {
    display: none;
}

.animation-placeholder iframe,
.animation-placeholder video,
.animation-placeholder canvas {
    width: 100%;
    height: 100%;
    min-height: 300px;
    border: none;
    display: block;
}

.animation-placeholder video {
    object-fit: cover;
    object-position: center;
    background-color: transparent;
}

/* Saturation effect for plantbutterfly video - starts grayscale */
#plantbutterfly-video {
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

#jellyfish-canvas,
#jellyfish-canvas-2,
#torus-canvas,
#star-canvas,
#ball-canvas {
    width: 100%;
    height: 100%;
    min-height: 300px;
    display: block;
}

#confirm-svg,
#costcomp-svg {
    width: 80%;
    height: 80%;
    min-height: 300px;
    display: block;
    max-width: 320px;
    margin: 0 auto;
    transform: scale(0.72); /* reverted to first 10% smaller state */
}

/* Large tile: 4 icons in 2x2 grid */
.animation-card--large {
    grid-column: span 2;
}

.four-icons-placeholder {
    min-height: 380px;
    padding: 20px;
}

.four-icons-placeholder::before {
    display: none;
}

.four-icons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    column-gap: 24px;
    row-gap: 80px;
    width: 100%;
    height: 100%;
    min-height: 340px;
    padding-top: 24px;
    padding-bottom: 24px;
}

.four-icons-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 4px;
}

.four-icons-cell svg {
    width: 80%;
    max-width: 140px;
    height: auto;
    display: block;
    transform: scale(0.62);
    transform-origin: center center;
}

/* Icon set: invert colors on hover (orange ↔ black) — per icon only */
.four-icons-cell .icon-orange,
.four-icons-cell .icon-black {
    transition: stroke 0.2s ease;
}

.four-icons-cell:hover .icon-orange {
    stroke: #000;
}

.four-icons-cell:hover .icon-black {
    stroke: #FD5706;
}

/* About Section */
.about-section {
    background-color: #F5F5F5;
    padding: 100px 0;
}

.about-content {
    max-width: 800px;
}

.about-text {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.8;
    color: #333333;
}

/* Footer */
.footer-section {
    background-color: #FFFFFF;
    padding: 80px 0 40px;
    border-top: 1px solid #E0E0E0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-name {
    font-size: 32px;
    font-weight: 700;
    color: #000000;
    letter-spacing: -0.5px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-link {
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-link:hover {
    color: #FF4500;
}

.footer-divider {
    color: #FF4500;
    font-size: 14px;
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid #E0E0E0;
}

.footer-bottom p {
    font-size: 14px;
    color: #999999;
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 968px) {
    .animations-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .animation-card:hover {
        transform: scale(1.15);
    }
    
    .animation-card:hover .animation-placeholder {
        min-height: 350px;
    }
    
    .animation-card--large:hover {
        transform: none;
    }
    
    .animation-card--large:hover .animation-placeholder {
        min-height: 380px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .hero-title {
        font-size: 64px;
    }

    .section-title {
        font-size: 48px;
    }

    .hero-section {
        padding: 80px 0 60px;
    }

    .gallery-section,
    .about-section {
        padding: 60px 0;
    }

    .animations-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .nav-right {
        font-size: 14px;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 48px;
    }

    .section-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .about-text {
        font-size: 18px;
    }

    .nav-right {
        font-size: 13px;
    }

    .footer-name {
        font-size: 24px;
    }
}