/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Typography variables */
:root {
    --font-primary: 'Cormorant Garamond', serif;
    --font-secondary: 'Luxurious Roman', serif;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 24px;
    --font-size-xl: 36px;
    --font-size-xxl: 50px;
    --line-height-tight: 1.2;
    --line-height-base: 1.6;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: #ffffff;
    color: #000000;
    line-height: var(--line-height-base);
    font-weight: 400;
    font-size: var(--font-size-base);
}

.container {
    max-width: 80%; /* Adjusted to match Figma width */
    margin: 0 auto;
    padding: 50px 0; /* Adjusted padding */
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 50px;
}

/* Top navigation styles */
.top-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    align-items: center;
    margin-bottom: 30px;
}

.top-nav .refresh-note {
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
    font-style: italic;
    opacity: 0.6;
    letter-spacing: 0.5px;
    transition: opacity 0.3s ease;
    margin: 0;
}

.top-nav .refresh-note:hover {
    opacity: 1;
}

.top-nav a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.top-nav a:hover {
    opacity: 1;
}

.top-nav a .refresh-note {
    margin: 0;
}

h1 {
    font-family: var(--font-secondary);
    font-size: var(--font-size-xxl);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0; /* Removed letter spacing to match Figma */
}

/* Image grid styles */
.image-grid {
    display: flex;
    flex-direction: column;
    gap: 50px; /* Adjusted to match Figma spacing */
}

.image-row {
    display: flex;
    gap: 40px;
    justify-content: space-between;
}

.image-container {
    flex: 1;
    max-width: 100%; /* Exact width from Figma */
    overflow: hidden;
    position: relative;
    perspective: 1000px;
}

.image-container img {
    width: 100%;
    height: auto; /* Exact height from Figma */
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 0.5s ease, box-shadow 0.5s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 5px 10px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
}

.image-container img.loaded {
    opacity: 1;
}

.image-container:hover img {
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25), 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* When focus effect is active, only hovered images scale */
.image-grid.has-focus-effect .image-container:not(:hover) img,
.image-grid.has-focus-effect .grid-item:not(:hover) img,
.image-grid.has-focus-effect .full-width-image:not(:hover) img,
.image-grid.has-focus-effect .image-container:not(:hover) video,
.image-grid.has-focus-effect .grid-item:not(:hover) video,
.image-grid.has-focus-effect .full-width-image:not(:hover) video {
    transform: scale(1);
}

/* Focus cards effect - blur and scale non-hovered items */
.image-grid.has-focus-effect .image-container,
.image-grid.has-focus-effect .grid-item,
.image-grid.has-focus-effect .full-width-image {
    transition: filter 0.3s ease, transform 0.3s ease;
    will-change: filter, transform;
}

.image-grid.has-focus-effect .image-container:not(:hover),
.image-grid.has-focus-effect .grid-item:not(:hover),
.image-grid.has-focus-effect .full-width-image:not(:hover) {
    filter: blur(3px);
    transform: scale(0.98);
}

.image-grid.has-focus-effect .image-container:hover,
.image-grid.has-focus-effect .grid-item:hover,
.image-grid.has-focus-effect .full-width-image:hover {
    filter: blur(0);
    transform: scale(1);
    z-index: 5;
    position: relative;
}

/* Adjust image transform to work with container transform */
.image-grid.has-focus-effect .image-container:hover img,
.image-grid.has-focus-effect .grid-item:hover img,
.image-grid.has-focus-effect .image-container:hover video,
.image-grid.has-focus-effect .grid-item:hover video {
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25), 0 10px 20px rgba(0, 0, 0, 0.15);
}

.image-grid.has-focus-effect .full-width-image:hover img,
.image-grid.has-focus-effect .full-width-image:hover video {
    transform: scale(1.01) translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), 0 15px 25px rgba(0, 0, 0, 0.2);
}

/* Media element styles (for both images and videos) */
.media-element {
    width: 100%;
    height: 719px; /* Default height */
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 0.5s ease, box-shadow 0.5s ease;
    display: block;
    max-width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 5px 10px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
}

.media-element.loaded {
    opacity: 1;
}

.image-container:hover .media-element,
.grid-item:hover .media-element {
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25), 0 10px 20px rgba(0, 0, 0, 0.15);
}

.full-width-image:hover .media-element {
    transform: scale(1.01) translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), 0 15px 25px rgba(0, 0, 0, 0.2);
}

/* Specific video styles */
video.media-element {
    display: block; /* Remove any extra space */
    background-color: #000; /* Black background while loading */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 5px 10px rgba(0, 0, 0, 0.1);
}

/* Video in full-width container */
.full-width-image video.media-element {
    width: 1208px; /* Exact width from Figma */
    height: 1510px; /* Exact height from Figma */
}

/* Quote styles */
.quote {
    text-align: left; /* Aligned to match Figma */
    margin: 50px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
    max-width: 870px; /* Exact width from Figma */
    margin-left: auto;
    margin-right: auto;
}

.quote.visible {
    opacity: 1;
    transform: translateY(0);
}

.quote p {
    font-family: var(--font-secondary);
    font-size: var(--font-size-xxl);
    line-height: var(--line-height-tight);
    font-weight: 400;
    letter-spacing: 0; /* Match Figma */
    color: #000000; /* Solid color to match Figma */
}

/* Full width image */
.full-width-image {
    width: 100%;
    height:auto;
    overflow: hidden;
    display: flex;
    justify-content: center; /* Center the image */
    position: relative;
    perspective: 1200px;
}

.full-width-image img {
    width: 1208px; /* Exact width from Figma */
    height: 1510px; /* Exact height from Figma */
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease, box-shadow 0.8s ease;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2), 0 8px 15px rgba(0, 0, 0, 0.12);
    transform-style: preserve-3d;
}

.full-width-image img.loaded {
    opacity: 1;
}

.full-width-image:hover img {
    transform: scale(1.01) translateY(-8px); /* Very subtle zoom */
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), 0 15px 25px rgba(0, 0, 0, 0.2);
}

/* Grid layout (2x2) */
.grid-layout {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 50px; /* Adjusted to match Figma */
}

.grid-row {
    display: flex;
    gap: 40px;
    height: 760px; /* Exact height from Figma */
}

.grid-item {
    flex: 1;
    max-width: 640px; /* Exact width from Figma */
    overflow: hidden;
    position: relative;
    perspective: 1000px;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 0.5s ease, box-shadow 0.5s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 5px 10px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
}

.grid-item img.loaded {
    opacity: 1;
}

.grid-item:hover img {
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25), 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Video container styles */
.video-container {
    width: 100%;
    margin: 20px 0;
    overflow: hidden;
    border-radius: 0; /* Matching the image style */
}

.video-container video {
    width: 100%;
    display: block;
    transition: opacity 0.8s ease-in-out;
}

/* Footer styles */
footer {
    margin-top: 50px;
    padding: 20px 0;
    text-align: center;
}

.copyright {
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
    opacity: 0.7;
}

/* Image source styles */
.image-source {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    font-family: var(--font-primary);
    font-size: var(--font-size-xs);
    padding: 3px 6px;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.3s ease;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    pointer-events: auto;
}

.image-source:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.image-container:hover .image-source,
.grid-item:hover .image-source,
.full-width-image:hover .image-source {
    opacity: 1;
}

.image-source.hidden {
    opacity: 0 !important;
}

/* Model info overlay - minimalist style */
.model-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0) 100%);
    padding: 40px 20px 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.model-overlay:empty {
    display: none;
}

.image-container:hover .model-overlay,
.grid-item:hover .model-overlay,
.full-width-image:hover .model-overlay {
    opacity: 1;
}

.model-overlay-link {
    text-decoration: none;
    color: #ffffff;
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: 300;
    letter-spacing: 0.5px;
    display: block;
    transition: opacity 0.2s ease;
    pointer-events: auto;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.model-overlay-link:hover {
    opacity: 0.85;
}

/* Responsive styles */
@media (max-width: 1400px) {
    .container {
        padding: 50px 20px;
        max-width: 90%;
    }
    
    .full-width-image img,
    .full-width-image video.media-element {
        max-width: 100%;
        width: 100%;
        height: auto;
    }
}

@media (max-width: 1000px) {
    .container {
        padding: 40px 20px;
        max-width: 95%;
    }
    
    .image-row {
        gap: 30px;
    }
    
    .grid-row {
        gap: 30px;
    }
    
    .full-width-image img,
    .full-width-image video.media-element {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 30px 15px;
        max-width: 100%;
    }
    
    header {
        margin-bottom: 30px;
    }
    
    h1 {
        font-size: var(--font-size-xl);
        line-height: var(--line-height-tight);
        padding: 0 10px;
    }
    
    .top-nav {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
        padding: 0 10px;
    }
    
    .image-grid {
        gap: 40px;
    }
    
    .image-row {
        flex-direction: column;
        gap: 40px;
    }
    
    .image-container {
        width: 100%;
        max-width: 100%;
    }
    
    .image-container img,
    .image-container video,
    .image-container .media-element {
        width: 100%;
        height: auto;
        max-height: 85vh;
        object-fit: contain;
    }
    
    .quote {
        margin: 40px 0;
        padding: 0 15px;
        max-width: 100%;
    }
    
    .quote p {
        font-size: var(--font-size-xl);
        line-height: var(--line-height-tight);
    }
    
    .full-width-image {
        width: 100%;
        padding: 0;
    }
    
    .full-width-image img,
    .full-width-image video.media-element {
        width: 100%;
        height: auto;
        max-height: 90vh;
        object-fit: contain;
    }
    
    .grid-layout {
        gap: 40px;
    }
    
    .grid-row {
        flex-direction: column;
        gap: 40px;
        height: auto;
    }
    
    .grid-item {
        max-width: 100%;
        width: 100%;
    }
    
    .grid-item img,
    .grid-item video,
    .grid-item .media-element {
        width: 100%;
        height: auto;
        max-height: 85vh;
        object-fit: contain;
    }
    
    footer {
        text-align: center;
        padding: 0 15px;
        margin-top: 40px;
    }
    
    video.media-element {
        width: 100%;
        height: auto;
        max-height: 85vh;
        object-fit: contain;
    }
    
    .full-width-image video.media-element {
        width: 100%;
        height: auto;
        max-height: 90vh;
        object-fit: contain;
    }
    
    /* Disable focus effect on mobile for better performance */
    .image-grid.has-focus-effect .image-container:not(:hover),
    .image-grid.has-focus-effect .grid-item:not(:hover),
    .image-grid.has-focus-effect .full-width-image:not(:hover) {
        filter: none;
        transform: none;
    }
    
    .image-container:hover img,
    .grid-item:hover img,
    .full-width-image:hover img,
    .image-container:hover video,
    .grid-item:hover video,
    .full-width-image:hover video {
        transform: none;
    }
    
    /* Reduce shadow intensity on mobile for better performance */
    .image-container img,
    .grid-item img,
    .full-width-image img,
    .image-container .media-element,
    .grid-item .media-element,
    .full-width-image .media-element,
    video.media-element {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 10px;
    }
    
    h1 {
        font-size: var(--font-size-lg);
    }
    
    .image-grid {
        gap: 30px;
    }
    
    .image-row {
        gap: 30px;
    }
    
    .image-container img,
    .image-container video,
    .image-container .media-element {
        max-height: 75vh;
    }
    
    .quote p {
        font-size: var(--font-size-lg);
    }
    
    .full-width-image img,
    .full-width-image video.media-element {
        max-height: 80vh;
    }
    
    .grid-layout {
        gap: 30px;
    }
    
    .grid-row {
        gap: 30px;
    }
    
    .grid-item img,
    .grid-item video,
    .grid-item .media-element {
        max-height: 75vh;
    }
    
    video.media-element {
        max-height: 75vh;
    }
    
    .full-width-image video.media-element {
        max-height: 80vh;
    }
} 