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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Playfair Display', serif;
    background-color: #000;
    color: #fff;
}

/* Add CSS variable for transition duration at root */
:root {
    --text-transition-duration: 1500ms;
}

/* Navigation bar */
.top-nav {
    position: fixed;
    top: 81%; /* Position at lower third */
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000; /* Above all other elements */
    display: flex;
    justify-content: center;
    opacity: 0; /* Initially hidden */
    transition: opacity 1s ease-out;
    pointer-events: none; /* Prevent interaction while hidden */
}

.top-nav.visible {
    opacity: 1;
    pointer-events: auto; /* Enable interaction when visible */
}

.nav-links {
    display: flex;
    align-items: center; /* Center align all items vertically */
    gap: clamp(15px, 4vw, 25px); /* Responsive gap between icons */
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icon links (envelope and instagram) */
.nav-link:not(:first-child) {
    font-size: clamp(30px, 5vw, 40px);
    width: clamp(30px, 5vw, 40px);
    height: clamp(30px, 5vw, 40px);
}

/* "a" link */
.nav-link:first-child {
    font-family: 'Playfair Display', serif;
    font-weight: 300;
    font-size: clamp(40px, 6vw, 50px);
    height: auto; /* Let height be determined by content */
    display: inline-flex; /* Better for text content */
    align-items: center;
    line-height: 1; /* Set line height to 1 for proper text alignment */
    position: relative;
    top: -6px; /* Slight adjustment to align with other icons */
}

.nav-link:hover {
    color: #fff;
    transform: translateY(-2px);
}

.image-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

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

.text-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    background: rgba(0, 0, 0, 0.3);
}

.text-content {
    text-align: center;
    padding: 2rem;
}

/* Update fade-text transition to use the variable */
.fade-text {
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity calc(var(--text-transition-duration) / 2) ease-out, 
                transform calc(var(--text-transition-duration) / 2) ease-out;
    padding: 0 1rem;
    text-align: center;
    width: 100%;
}

.fade-text a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    transition: border-color 0.3s ease;
}

.fade-text a:hover {
    border-bottom-color: rgba(255, 255, 255, 1);
}

/* Header size classes */
.fade-text.h1 {
    font-size: clamp(20px, 4vw, 60px);
}

.fade-text.h2 {
    font-size: clamp(17px, 3.5vw, 50px);
}

.fade-text.h3 {
    font-size: clamp(15px, 3vw, 40px);
}

.fade-text.h4 {
    font-size: clamp(12px, 2.5vw, 30px);
}

.fade-text.h5 {
    font-size: clamp(11px, 2.25vw, 25px);
}

.fade-text.h6 {
    font-size: clamp(10px, 2vw, 20px);
}

/* Default size for non-header text */
.fade-text:not([class*="h"]) {
    font-size: clamp(12px, 2.5vw, 30px);
}

.fade-text.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .text-content {
        padding: 1rem;
    }
    
    /* Adjust font sizes for smaller screens */
    .fade-text.h1 { font-size: 6vw; }
    .fade-text.h2 { font-size: 5.5vw; }
    .fade-text.h3 { font-size: 5vw; }
    .fade-text.h4 { font-size: 4.5vw; }
    .fade-text.h5 { font-size: 4vw; }
    .fade-text.h6 { font-size: 3.5vw; }
    .fade-text:not([class*="h"]) { font-size: 4.5vw; }
    
    /* Adjust navigation for mobile */
    .top-nav {
        padding: 15px 0;
    }
}

/* Loading screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999;
    transition: opacity 1s ease-out;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-logo {
    font-family: 'Playfair Display', serif;
    font-size: 5rem;
    font-weight: 300;
    color: #fff;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    animation: pulse 2s infinite
}

.loading-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 300;
    color: #fff;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 30px;
    opacity: 0.8;
}

.loading-bar-container {
    width: 200px;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.loading-bar {
    height: 100%;
    width: 0%;
    background-color: white;
    transition: width 0.3s ease-out;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
} 