/* ================================================
   Works Page Specific Styles
   ================================================ */

:root {
    --color-teal-works: #0BFFB7;
    --color-dark-works: #0F1114;
    --color-deep-navy: #0A0D12;
}

.sp-only {
    display: none;
}

/* ================================================
   Body Background Fix
   ================================================ */

body {
    background: linear-gradient(135deg, rgba(10, 13, 18, 1) 0%, rgba(15, 17, 20, 1) 100%) !important;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* ================================================
   Particles Canvas
   ================================================ */

.particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 1;
}

/* Z-index Layer Management */
.header {
    position: relative;
    z-index: 1000 !important;
}

/* Sections should be above particles */
section {
    position: relative;
}

/* Content elements above particles */
.works-hero-content,
.work-card-inner,
.works-cta-content,
.footer-content,
.footer-bottom {
    position: relative;
    z-index: auto;
}

.container {
    position: relative;
    z-index: auto;
}

/* Footer should have solid background */
.footer {
    background: var(--color-dark-works) !important;
    z-index: auto;
}

/* ================================================
   Hero Section
   ================================================ */

.works-hero {
    padding: 100px 0 60px;
    background: transparent;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    z-index: auto;
    min-height: auto;
}

.works-hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    opacity: 1 !important;
    visibility: visible !important;
}

.works-title {
    font-family: 'Noto Serif JP', serif;
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.works-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
    font-weight: 300;
    line-height: 1.8;
}

.works-hero-line {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-teal-works), transparent);
    margin: 0 auto 2rem auto;
    box-shadow: 0 0 20px var(--color-teal-works);
}

/* ================================================
   Works Grid Section
   ================================================ */

.works-grid-section {
    padding: 100px 0;
    background: transparent;
    position: relative;
    z-index: auto;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    opacity: 1 !important;
    visibility: visible !important;
}

/* ================================================
   Work Card (Glass Morphism)
   ================================================ */

.work-card {
    position: relative;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.work-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.work-card-inner {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(11, 255, 183, 0.2);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 1 !important;
    visibility: visible !important;
}

.work-card-inner:hover {
    transform: translateY(-8px);
    border-color: var(--color-teal-works);
    box-shadow: 
        0 0 30px rgba(11, 255, 183, 0.3),
        0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ================================================
   Work Thumbnail
   ================================================ */

.work-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
}

.work-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.work-card-inner:hover .work-thumbnail img {
    transform: scale(1.08);
}

.work-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(15, 17, 20, 0.6) 100%
    );
    pointer-events: none;
}

/* ================================================
   Work Content
   ================================================ */

.work-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.work-category {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(11, 255, 183, 0.1);
    border: 1px solid rgba(11, 255, 183, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-teal-works);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    width: fit-content;
    transition: all 0.3s ease;
}

.work-card-inner:hover .work-category {
    background: rgba(11, 255, 183, 0.2);
    border-color: var(--color-teal-works);
    box-shadow: 0 0 15px rgba(11, 255, 183, 0.3);
}

.work-name {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.4;
    margin: 0.5rem 0;
}

.work-scope {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    font-weight: 300;
    flex: 1;
}

.work-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-teal-works);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    width: fit-content;
}

.work-link:hover {
    gap: 0.75rem;
    text-shadow: 0 0 10px var(--color-teal-works);
}

/* ================================================
   CTA Section
   ================================================ */

.works-cta {
    padding: 120px 0;
    background: transparent;
    position: relative;
    text-align: center;
    z-index: auto;
}

.works-cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.works-cta-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.works-cta-text {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
}

.works-cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ================================================
   Responsive Design
   ================================================ */

/* Tablet (768px - 1199px) */
@media (max-width: 1199px) {
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .sp-only {
        display: inline;
    }
    
    .works-hero .works-hero-content {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .works-hero .works-title {
        order: 1 !important;
        margin-bottom: 0 !important;
        font-size: 2.5rem !important;
    }
    
    .works-hero .works-hero-line {
        order: 2 !important;
        margin: 1rem auto !important;
    }
    
    .works-hero .works-subtitle {
        order: 3 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        font-size: 1rem !important;
    }
    
    .works-hero {
        padding: 140px 0 80px;
    }

    .works-grid-section {
        padding: 60px 0;
    }

    .works-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .work-content {
        padding: 1.5rem;
    }

    .work-name {
        font-size: 1.2rem;
    }

    .works-cta {
        padding: 80px 0;
    }

    .works-cta-title {
        font-size: 1.75rem;
    }

    .works-cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .works-cta-buttons .btn {
        width: 100%;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .works-hero {
        padding: 120px 0 60px;
    }

    .works-title {
        font-size: 2rem;
    }

    .works-grid-section {
        padding: 40px 0;
    }

    .works-grid {
        gap: 1.5rem;
    }

    .work-content {
        padding: 1.25rem;
    }

    .work-name {
        font-size: 1.1rem;
    }

    .works-cta {
        padding: 60px 0;
    }
}

/* ================================================
   Animation Utilities
   ================================================ */

[data-animate="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-animate="fade-up"].animated {
    opacity: 1;
    transform: translateY(0);
}

/* ================================================
   Custom Scrollbar
   ================================================ */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-dark-works);
}

::-webkit-scrollbar-thumb {
    background: rgba(11, 255, 183, 0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(11, 255, 183, 0.5);
}
