/* CSS Custom Properties */
:root {
    --color-white: #fff;
    --color-black: #000;
    --color-text: #333;
    --color-text-light: #666;
    --color-border: #ddd;
    --color-background: #f8f8f8;

    --font-family: "Inter", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-size-base: 1rem;
    --font-size-small: 0.9rem;
    --font-size-large: 1.1rem;
    --font-size-2xl: 2rem;
    --font-size-3xl: 2.5rem;
    --line-height: 1.6;
    --line-height-relaxed: 1.7;

    --space-xs: 0.5rem;
    --space-sm: 2rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;

    --header-height: 80px;
    --header-height-tablet: 100px;
    --max-width: 1200px;
    --logo-height: 20px;
    --logo-height-tablet: 40px;

    --transition-fast: 0.3s ease;
    --border-radius: 4px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: var(--line-height);
    color: var(--color-text);
    background-color: var(--color-white);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: transparent;
    z-index: 100;
    mix-blend-mode: difference;
}

.header-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm);
    max-width: var(--max-width);
    margin: 0 auto;
    gap: var(--space-lg);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: var(--logo-height);
    width: auto;
    min-width: 142px;
}

.nav {
    display: flex;
    gap: var(--space-lg);
}

.nav-link {
    color: var(--color-white);
    transition: opacity var(--transition-fast);
    position: relative;
    font-weight: 600;
}

.nav-link:hover {
    opacity: 0.8;
}

/* Main Content */
.main {
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    z-index: 0;
}

.main:has(.hero) {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
}

/* Home Page - Single Hero Image */
.hero {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    position: relative;
    overflow: hidden;
    background-color: var(--color-white);
}

.hero img {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 1.2s ease;
}

.hero img.active {
    opacity: 1;
}

/* Six-Column Layout System for Overlay Pages */
.overlay-page {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-lg);
    align-items: start;
    width: 100%;
    max-width: var(--max-width);
}

.col-half { grid-column: span 1; }
.col-1 { grid-column: span 2; }
.col-2 { grid-column: span 4; }
.col-3 { grid-column: span 6; }

.overlay-page h1 {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-md);
    font-weight: 700;
    color: var(--color-black);
}

.overlay-page p {
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-large);
    line-height: var(--line-height-relaxed);
    color: var(--color-black);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    width: 100%;
    max-width: 640px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    padding: 0.75rem 0;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-black);
    resize: vertical;
}

.contact-form select {
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--color-black) 50%), linear-gradient(135deg, var(--color-black) 50%, transparent 50%);
    background-position: right 8px top 1.2em, right 2px top 1.2em;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.contact-form input:-webkit-autofill,
.contact-form input:-webkit-autofill:hover,
.contact-form input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--color-black);
    -webkit-box-shadow: 0 0 0 1000px var(--color-white) inset;
    box-shadow: 0 0 0 1000px var(--color-white) inset;
    transition: background-color 9999s ease-in-out 0s;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-bottom-color: var(--color-black);
}

.contact-form button {
    align-self: flex-start;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: 600;
    padding: 0.875rem 2.25rem;
    margin-top: 0.5rem;
    border: none;
    border-radius: 999px;
    background: var(--color-black);
    color: var(--color-white);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.contact-form button:hover {
    background: #222;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.contact-form button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.contact-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-status {
    font-size: var(--font-size-small);
    color: var(--color-text-light);
    margin: 0;
}

.form-status.error {
    color: #c0392b;
}

.form-status.success {
    color: #27632a;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: transparent;
    padding: var(--space-md) var(--space-sm);
    mix-blend-mode: difference;
    z-index: 100;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.copyright {
    color: var(--color-white);
    font-size: var(--font-size-small);
}

.social-links {
    display: flex;
    gap: var(--space-md);
}

.social-link {
    color: var(--color-white);
    font-size: var(--font-size-small);
    transition: opacity var(--transition-fast);
}

.social-link:hover {
    opacity: 0.8;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-black);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-blur {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(30px);
    z-index: 9998;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader-blur.hidden {
    opacity: 0;
    visibility: hidden;
}

.percentage {
    color: var(--color-white);
    font-size: var(--font-size-3xl);
    font-weight: 300;
    font-family: var(--font-family);
    min-width: 120px;
    text-align: center;
}

/* Contact page layout */
.contact-page {
    min-height: 100vh;
    min-height: 100dvh;
    padding: calc(var(--header-height) + 20px) 32px calc(var(--header-height) + 20px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Styles */
@media (max-width: 767px) {
    .overlay-page {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
    }

    .col-half { grid-column: span 1; }
    .col-1 { grid-column: span 2; }
    .col-2 { grid-column: span 3; }
    .col-3 { grid-column: span 3; }

    .contact-page {
        padding: calc(var(--header-height) + 20px) var(--space-md);
    }

    .header-content,
    .footer {
        padding-left: 5vw;
        padding-right: 5vw;
    }
}

/* Tablet Styles */
@media (min-width: 768px) {
    .header-content {
        padding: var(--space-md) var(--space-lg);
    }

    .hero img {
        max-width: 80%;
        max-height: 80%;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .header-content {
        padding: var(--space-md) 0;
    }
}
