:root {
    --primary: #F7941D;
    --secondary: #FFD24D;
    --info: #1BA9E1;
    --warning: #FFD24D;
    --dark: #0F4C75;
    --light: #F8F9FA;
    --text-color: #333;
    --overlay-bg: rgba(0, 0, 0, 0.85);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    /* Modern Animated Background */
    background: linear-gradient(-45deg, #f3f4f6, #e5e7eb, #d1d5db, #9ca3af);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    position: relative;
    overflow-x: hidden; /* Prevent scroll during animations */
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    /* Subtle noise texture using SVG data URI */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.4;
}

/* Background Animation Keyframes */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

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

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

.container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    max-width: 600px;
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    /* Animation */
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.logos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
    /* Animation */
    opacity: 0;
    animation: fadeIn 0.8s ease 0.3s forwards;
}

.content {
    /* Animation */
    opacity: 0;
    animation: fadeIn 0.8s ease 0.5s forwards;
}

.logo-img {
    height: 45px; /* Default height */
    object-fit: contain;
}

/* Adjust logo sizes to be visually equal */
.logo-client {
    height: 55px; /* Slightly larger for Toptan Buradan if needed */
}

.logo-studio {
    height: 38px;
    /* Simply invert colors: Black bg becomes white (invisible on white bg), White text becomes Black */
    filter: invert(1);
    mix-blend-mode: normal; 
    border-radius: 4px;
}

.content h1 {
    color: var(--dark);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.content p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: #e08315; /* Darker shade of primary */
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:focus {
    outline: 3px solid var(--secondary);
    outline-offset: 2px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-bg);
    z-index: 1000;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease, backdrop-filter 0.3s ease;
    backdrop-filter: blur(0px);
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
    backdrop-filter: blur(5px);
}

.modal-content {
    width: 95%;
    height: 90%;
    background: #000; /* Black background to match Figma presentation and hide borders */
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    /* Animation */
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--dark); /* Solid dark background */
    border: 2px solid white; /* White border for contrast */
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1010;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.close-btn:hover {
    background: #0a3552; /* Darker shade */
    transform: scale(1.05);
}

.close-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Crop Figma Footer Hack */
#iframeWrapper {
    width: 100%;
    height: 100%;
    overflow: hidden; /* Hide the overflow part */
    position: relative;
    border-radius: 0 0 8px 8px;
    background: #000; /* Ensure background is black behind iframe */
}

.iframe-container {
    width: 100%;
    /* Increase height to push the bottom bar out of view. 
       Figma footer is usually ~48px. Adding a bit more buffer. */
    height: calc(100% + 60px); 
    border: none !important; /* Remove any default border */
    opacity: 0;
    transition: opacity 0.5s ease;
    /* Move slightly up if needed, but usually just extending height works 
       if the footer is stuck to bottom of viewport */
    display: block;
}

.iframe-container.loaded {
    opacity: 1;
}

/* Loading Spinner */
.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Error Message */
.error-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: none;
    color: var(--dark);
}

.error-message p {
    margin-top: 10px;
}

.company-credit {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: #888;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem;
        width: 95%;
    }
    
    .logos {
        justify-content: center;
    }

    .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .close-btn {
        top: 10px; /* Adjusted to not be too close to edge on mobile */
        right: 10px;
    }
}
