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

:root {
    --primary-black: #000000;
    --primary-white: #ffffff;
    --accent-gray: #888888;
    --hover-gray: #1a1a1a;
    --card-bg: #0a0a0a;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--primary-black);
    color: var(--primary-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    line-height: 1.2;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 2px;
    color: var(--primary-white);
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    opacity: 0.7;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-links a {
    color: var(--primary-white);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--primary-white);
    transition: width 0.3s ease;
}

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

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--primary-white);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 2;
}

.hero-title {
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 400;
    letter-spacing: -2px;
    animation: fadeInUp 1s ease-out;
}

/* Filter Section */
.filter-section {
    padding: 3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 400;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 50px;
    color: var(--accent-gray);
}

.filter-btn:hover {
    color: var(--primary-white);
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-btn.active {
    color: var(--primary-black);
    background-color: var(--primary-white);
    border-color: var(--primary-white);
}

/* Work Grid */
.work-section {
    padding: 5rem 0;
    max-width: 1400px;
    margin: 0 auto;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    padding: 0 2rem;
}

.work-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 12px;
    background-color: var(--card-bg);
    transition: var(--transition);
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.work-item:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px);
}

.work-item.hide {
    display: none;
}

.video-container {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-item:hover .video-overlay {
    opacity: 1;
}

.work-item:hover video {
    transform: scale(1.05);
}

.work-info {
    padding: 1.5rem;
    background-color: var(--card-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.work-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-white);
}

.work-info p {
    color: var(--accent-gray);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* CTA Section */
.cta-section {
    padding: 8rem 0;
    text-align: center;
    background-color: #050505;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.cta-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

.cta-content {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-content.form-active {
    opacity: 0;
    transform: translateY(-30px);
    pointer-events: none;
}

.cta-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 2rem;
    font-weight: 400;
    color: var(--primary-white);
}

.cta-link {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-block;
    transition: var(--transition);
    font-family: inherit;
}

.cta-subtitle {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--accent-gray);
    font-weight: 400;
    position: relative;
    padding-bottom: 0.5rem;
    margin: 0;
}

.cta-subtitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary-white);
    transition: width 0.4s ease;
}

.cta-link:hover .cta-subtitle {
    color: var(--primary-white);
}

.cta-link:hover .cta-subtitle::after {
    width: 100%;
}

/* Contact Form */
.contact-form-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 95%;
    max-width: 900px;
    max-height: 80vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    overflow-y: auto;
}

.contact-form-wrapper.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.contact-form-container {
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    min-height: fit-content;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.form-header h3 {
    font-size: 1.5rem;
    color: var(--primary-white);
    font-weight: 500;
    margin: 0;
}

.form-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--accent-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.form-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--primary-white);
    transform: scale(1.1);
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group-full {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
}

.submit-button-full {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 200px;
    margin-top: 1rem;
}

.form-group label {
    color: var(--accent-gray);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0.875rem;
    color: var(--primary-white);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.submit-button {
    background: var(--primary-white);
    color: var(--primary-black);
    border: none;
    padding: 0.875rem 1.75rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    min-width: 180px;
}

.submit-button:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
}

.submit-button svg {
    transition: transform 0.3s ease;
}

.submit-button:hover svg {
    transform: translateX(3px);
}

/* Submit Animation States */
.contact-form.form-sending .form-group {
    animation: fieldsDisappear 1s ease-out forwards;
}

.contact-form.form-sending .form-header {
    animation: fieldsDisappear 1s ease-out forwards;
}

.submit-button.sending {
    pointer-events: none;
}

.submit-button.sending .button-icon {
    animation: iconFadeOut 0.8s ease-out forwards;
}

.submit-button.sent {
    background: var(--primary-black);
    color: var(--primary-white);
    transition: all 0.6s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.submit-button.sent .button-text {
    opacity: 1;
    transition: all 0.4s ease 0.2s;
}

.submit-button.sent .button-icon {
    opacity: 0;
    display: none;
}

/* Fields Disappear Animation */
@keyframes fieldsDisappear {
    0% { 
        opacity: 1;
        transform: translateY(0);
    }
    100% { 
        opacity: 0;
        transform: translateY(10px);
        pointer-events: none;
    }
}

/* Icon Fade Out Animation */
@keyframes iconFadeOut {
    0% { 
        opacity: 1;
        transform: translateX(0);
    }
    100% { 
        opacity: 0;
        transform: translateX(10px);
    }
}

/* Form Animation States */
.form-group {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-form-wrapper.active .form-group {
    opacity: 1;
    transform: translateY(0);
}

.contact-form-wrapper.active .form-group:nth-child(1) { transition-delay: 0.1s; }
.contact-form-wrapper.active .form-group:nth-child(2) { transition-delay: 0.2s; }
.contact-form-wrapper.active .form-group:nth-child(3) { transition-delay: 0.3s; }
.contact-form-wrapper.active .form-group:nth-child(4) { transition-delay: 0.4s; }
.contact-form-wrapper.active .form-group:nth-child(5) { transition-delay: 0.5s; }
.contact-form-wrapper.active .submit-button { 
    transition-delay: 0.6s;
    opacity: 1;
    transform: translateY(0);
}

.submit-button {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Footer */
.footer {
    background-color: #000000;
    color: var(--primary-white);
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-left p {
    font-size: 0.9rem;
    color: #666;
}

.footer-right {
    display: flex;
    gap: 2rem;
}

.footer-right a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-right a:hover {
    color: var(--primary-white);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-black);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.3);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .work-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .filter-container {
        gap: 1rem;
    }
    
    .filter-btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-right {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Thumbnail Video Styles */
.thumbnail-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-button {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--primary-white);
}

.work-item:hover .video-overlay {
    opacity: 1;
}

.work-item:hover .play-button {
    transform: scale(1);
    background: rgba(255, 255, 255, 0.25);
}

.work-item:hover .thumbnail-video {
    transform: scale(1.02);
}

.work-item {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.work-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: rgba(10, 10, 10, 0.9);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.video-modal.active .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--primary-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
}

.modal-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.modal-info {
    padding: 2rem;
    text-align: center;
    background: rgba(5, 5, 5, 0.8);
}

.modal-info h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--primary-white);
}

.modal-info p {
    color: var(--accent-gray);
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Enhanced Grid Animation */
.work-grid {
    animation: gridFadeIn 1s ease-out 0.3s both;
}

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

.work-item {
    animation: itemFadeIn 0.6s ease-out both;
}

.work-item:nth-child(1) { animation-delay: 0.1s; }
.work-item:nth-child(2) { animation-delay: 0.2s; }
.work-item:nth-child(3) { animation-delay: 0.3s; }
.work-item:nth-child(4) { animation-delay: 0.4s; }
.work-item:nth-child(5) { animation-delay: 0.5s; }
.work-item:nth-child(6) { animation-delay: 0.6s; }
.work-item:nth-child(7) { animation-delay: 0.7s; }
.work-item:nth-child(8) { animation-delay: 0.8s; }
.work-item:nth-child(9) { animation-delay: 0.9s; }

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

/* Loading State */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 2rem auto;
    }
    
    .modal-info {
        padding: 1.5rem;
    }
    
    .modal-info h3 {
        font-size: 1.4rem;
    }
    
    .modal-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
}

/* Responsive Contact Form */
@media (max-width: 1024px) {
    .contact-form {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .contact-form-wrapper {
        width: 95%;
        max-height: 90vh;
    }
    
    .contact-form-container {
        padding: 1.5rem;
        margin: 0;
    }
    
    .form-header {
        margin-bottom: 1.25rem;
    }
    
    .form-header h3 {
        font-size: 1.3rem;
    }
    
    .form-close {
        width: 32px;
        height: 32px;
    }
    
    .contact-form {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .submit-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        max-width: none;
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .form-group-full {
        margin-top: 0.25rem;
    }
}
