/* ========================================
   ODX Split Landing Page - Styles
   ======================================== */

/* ========================================
   Font Face - LOT Font
   ======================================== */
@font-face {
    font-family: 'LOT';
    src: url('../fonts/LOT.otf?v=1.0.1') format('opentype'),
         url('../fonts/LOT.ttf?v=1.0.1') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ========================================
   Font Face - GLORY LIGHT Font
   ======================================== */
@font-face {
    font-family: 'GLORY LIGHT';
    src: url('../fonts/GLORY-LIGHT.otf') format('opentype'),
         url('../fonts/GLORY-LIGHT.ttf') format('truetype'),
         url('../fonts/Glory-Light.otf') format('opentype'),
         url('../fonts/Glory-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* CSS Custom Properties (Variables) */
:root {
    /* Colors */
    --color-black: #0a0a0a;
    --color-white: #ffffff;
    --color-accent: #e0e0e0;
    --color-accent-light: #ffffff;
    --overlay-dark: rgba(0, 0, 0, 0.55);
    --overlay-hover: rgba(0, 0, 0, 0.35);
    --overlay-dim: rgba(0, 0, 0, 0.7);

    /* Typography */
    --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --panel-width: 50%;
    --panel-width-hover: 55%;
    --panel-width-shrink: 45%;
}

/* ========================================
   Reset & Base Styles
   ======================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-black);
    color: var(--color-white);
    overflow: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.preloader-logo {
    width: 120px;
    height: auto;
    animation: logoFade 2s ease-in-out infinite;
}

.preloader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(224, 224, 224, 0.2);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes logoFade {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Split Container
   ======================================== */
.split-container {
    display: flex;
    width: 100%;
    height: 100vh;
    position: relative;
}

/* ========================================
   Split Panel (Common Styles)
   ======================================== */
.split-panel {
    position: relative;
    width: var(--panel-width);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: width var(--transition-medium);
}

/* Panel Background Image */
.panel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform var(--transition-slow);
    will-change: transform;
}

/* Studio Panel Background */
.studio-panel .panel-bg {
    background-image: url('../images/odx-studio.jpg');
    background-color: #1a1a2e; /* Fallback color */
}

/* Yachts Panel Background */
.yachts-panel .panel-bg {
    background-image: url('../images/odx-yachts.jpg');
    background-color: #0a1628; /* Fallback color */
}

/* Panel Overlay */
.panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    transition: background var(--transition-medium);
    will-change: background;
}

/* ========================================
   Panel Content
   ======================================== */
.panel-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    transform: translateY(0);
    transition: transform var(--transition-medium);
}

/* Label (Enter) */
.panel-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.3rem;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1rem;
    opacity: 0.8;
    transition: opacity var(--transition-fast), letter-spacing var(--transition-fast);
}

/* Title */
.panel-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    transition: letter-spacing var(--transition-fast);
}

/* ODX Text - LOT Font */
.title-odx {
    font-family: 'LOT', var(--font-primary);
}

/* Brand Text (Yachts/Studio) - GLORY LIGHT Font */
.title-brand {
    font-family: 'GLORY LIGHT', var(--font-primary);
    font-weight: 300;
}

/* Subtitle */
.panel-subtitle {
    font-size: clamp(0.875rem, 2vw, 1.125rem);
    font-weight: 300;
    letter-spacing: 0.15rem;
    opacity: 0.85;
    margin-bottom: 2rem;
    transition: opacity var(--transition-fast);
}

/* CTA Button */
.panel-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    color: var(--color-accent);
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--color-accent);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.cta-arrow {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

/* ========================================
   Hover Effects - Desktop
   ======================================== */
@media (hover: hover) and (pointer: fine) {
    /* Panel Width Change on Hover */
    .split-container:hover .split-panel {
        width: var(--panel-width-shrink);
    }

    .split-container .split-panel:hover {
        width: var(--panel-width-hover);
    }

    /* Background Zoom on Hover */
    .split-panel:hover .panel-bg {
        transform: scale(1.1);
    }

    /* Overlay Lighten on Hover */
    .split-panel:hover .panel-overlay {
        background: rgba(0, 0, 0, 0.3);
    }

    /* Sibling Panel Dim Effect */
    .split-container:hover .split-panel:not(:hover) .panel-overlay {
        background: rgba(0, 0, 0, 0.7);
    }

    /* Content Lift on Hover */
    .split-panel:hover .panel-content {
        transform: translateY(-10px);
    }

    /* Label Enhancement */
    .split-panel:hover .panel-label {
        opacity: 1;
        letter-spacing: 0.4rem;
    }

    /* Title Enhancement */
    .split-panel:hover .panel-title {
        letter-spacing: 0.3rem;
    }

    /* Subtitle Enhancement */
    .split-panel:hover .panel-subtitle {
        opacity: 1;
    }

    /* CTA Enhancement */
    .split-panel:hover .panel-cta {
        background-color: var(--color-accent);
        color: var(--color-black);
        border-color: var(--color-accent);
    }

    .split-panel:hover .cta-arrow {
        transform: translateX(5px);
    }
}

/* ========================================
   Focus States (Accessibility)
   ======================================== */
.split-panel:focus {
    outline: none;
}

.split-panel:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: -3px;
}

.split-panel:focus-visible .panel-cta {
    background-color: var(--color-accent);
    color: var(--color-black);
}

/* ========================================
   Responsive Design - Tablet
   ======================================== */
@media screen and (max-width: 1024px) {
    .panel-title {
        font-size: clamp(1.75rem, 4vw, 2.5rem);
    }
}

/* ========================================
   Responsive Design - Mobile
   ======================================== */
@media screen and (max-width: 768px) {
    body {
        overflow-y: auto;
    }

    .split-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .split-panel {
        width: 100%;
        height: 50vh;
        min-height: 350px;
    }

    /* Disable width transition on mobile */
    .split-container:hover .split-panel,
    .split-container .split-panel:hover {
        width: 100%;
    }

    .panel-content {
        padding: 1.5rem;
    }

    .panel-title {
        font-size: 1.75rem;
        letter-spacing: 0.15rem;
    }

    .panel-subtitle {
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
    }

    .panel-cta {
        font-size: 0.75rem;
        padding: 0.625rem 1.25rem;
    }

    /* Mobile Touch Effects */
    .split-panel:active .panel-bg {
        transform: scale(1.05);
    }

    .split-panel:active .panel-overlay {
        background: rgba(0, 0, 0, 0.3);
    }

    .split-panel:active .panel-cta {
        background-color: var(--color-accent);
        color: var(--color-black);
    }
}

/* ========================================
   Responsive Design - Small Mobile
   ======================================== */
@media screen and (max-width: 480px) {
    .split-panel {
        min-height: 300px;
    }

    .panel-label {
        font-size: 0.625rem;
        letter-spacing: 0.2rem;
    }

    .panel-title {
        font-size: 1.5rem;
    }

    .panel-subtitle {
        font-size: 0.8125rem;
    }
}

/* ========================================
   Landscape Mobile
   ======================================== */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .split-container {
        flex-direction: row;
        height: 100vh;
    }

    .split-panel {
        width: 50%;
        height: 100%;
        min-height: auto;
    }
}

/* ========================================
   High Resolution Displays
   ======================================== */
@media screen and (min-width: 1920px) {
    .panel-title {
        font-size: 4rem;
    }

    .panel-subtitle {
        font-size: 1.25rem;
    }

    .panel-cta {
        font-size: 1rem;
        padding: 1rem 2rem;
    }
}

/* ========================================
   Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .preloader {
        display: none;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .split-container {
        flex-direction: column;
        height: auto;
    }

    .split-panel {
        width: 100%;
        height: auto;
        min-height: 200px;
        page-break-inside: avoid;
    }

    .panel-bg,
    .panel-overlay,
    .preloader {
        display: none;
    }

    .panel-content {
        color: #000;
    }

    .panel-title {
        color: #000;
    }

    .panel-cta {
        color: #000;
        border-color: #000;
    }
}
