/* Font Loading */
@font-face {
    font-family: 'PP Right Grotesk';
    src: url('fonts/PPRightGrotesk-NarrowMedium.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto Condensed';
    src: url('fonts/RobotoCondensed-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
}

/* Color Palette */
:root {
    --true-black: rgb(0, 0, 0);
    --pure-white: rgb(255, 255, 255);
    --newsprint-cream: rgb(232, 228, 217);
    --halftone-gray: rgb(128, 128, 128);
    --singles-club-red: rgb(220, 20, 60);
    --hot-pink: rgb(255, 20, 147);
    --electric-lime: rgb(50, 205, 50);
    --electric-blue: rgb(0, 153, 204);
    --deep-purple: rgb(102, 51, 153);
    --burnt-orange: rgb(204, 70, 26);
    --pacific-teal: rgb(32, 178, 170);
    --navy-blue: rgb(30, 58, 95);
    --saddle-brown: rgb(139, 69, 19);
    --burgundy: rgb(128, 0, 32);
    --olive-drab: rgb(85, 107, 47);
    --dwarf-magenta: rgb(164, 2, 116);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Link Colors */
a {
    color: var(--electric-blue);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--electric-lime);
}

a:visited {
    color: var(--dwarf-magenta);
}

/* Hidden Site Navigation */
.nav-trigger {
    position: fixed;
    top: 0;
    left: 200px;
    right: 200px;
    height: 44px;
    z-index: 98;
}

.site-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.1em;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.site-nav a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    padding: 8px 4px;
}

.site-nav a:hover {
    color: var(--electric-lime);
}

.site-nav a:focus {
    color: var(--electric-lime);
    outline: none;
}

.site-nav .nav-divider {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 8px;
}

/* Show nav on hover trigger or focus-within */
.nav-trigger:hover + .site-nav,
.site-nav:hover,
.site-nav:focus-within,
.site-nav.visible {
    opacity: 1;
}

/* Site Footer */
.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 24px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.site-footer em {
    font-style: normal;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 600px) {
    .site-footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 20px;
    }
}

/* Reset heading styles to prevent default browser styling */
h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 400;
    overflow-x: hidden;
    background: #000;
    color: #fff;
}

/* Reset semantic HTML5 elements */
main, header, nav, section {
    display: block;
    margin: 0;
    padding: 0;
}

/* Diptych Layout */
.diptych {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
}

.panel {
    width: 50%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.panel:hover {
    opacity: 0.9;
}

.panel-left {
    background: #000;
}

.panel-right {
    background: #111;
}

/* Photo */
.photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Three.js Canvas */
#three-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Center Divider */
.divider {
    position: fixed;
    left: 50%;
    top: 0;
    width: 1px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-50%);
    z-index: 10;
}

/* Wordmark */
.wordmark {
    position: fixed;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 20;
    font-family: 'PP Right Grotesk', sans-serif;
    font-size: clamp(120px, 18vw, 400px);
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    pointer-events: none;
    transition: top 0.3s ease-out, transform 0.3s ease-out;
}

.wordmark-left {
    position: absolute;
    right: 50%;
    padding-right: 0.15em;
}

.wordmark-right {
    position: absolute;
    left: 50%;
    padding-left: 0.15em;
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    font-size: 14px;
    color: #fff;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Phrases (Phase 2) */
.phrase {
    position: fixed;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 15;
    font-size: 4vw;
    color: #fff;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.phrase-left {
    position: absolute;
    right: 50%;
    padding-right: 0.3em;
}

.phrase-right {
    position: absolute;
    left: 50%;
    padding-left: 0.3em;
}

/* Tagline (Phase 3) */
.tagline {
    position: fixed;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 15;
    font-size: 4vw;
    color: #fff;
    white-space: nowrap;
    opacity: 0;
    transition: top 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.tagline-left {
    position: absolute;
    right: 50%;
    padding-right: 0.3em;
}

.tagline-right {
    position: absolute;
    left: 50%;
    padding-left: 0.3em;
}

/* Navigation Buttons (Phase 3) */
.prev-button,
.next-button {
    position: fixed;
    z-index: 20;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: #fff;
    background: transparent;
    border: 1px solid #fff;
    padding: 12px 24px;
    cursor: pointer;
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.3s ease, background 0.3s ease, color 0.3s ease, top 0.3s ease, left 0.3s ease;
}

.prev-button {
    left: 50%;
    transform: translateX(calc(-100% - 10px));
}

.next-button {
    left: 50%;
    transform: translateX(10px);
}

.prev-button:hover:not(.disabled),
.next-button:hover:not(.disabled) {
    background: #fff;
    color: #000;
}

.prev-button.disabled,
.next-button.disabled {
    cursor: default;
}

/* Scroll Spacer */
.scroll-spacer {
    height: 400vh;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wordmark {
        font-size: clamp(60px, 16vw, 200px);
        top: 40%;
    }

    .phrase {
        font-size: 5vw;
    }

    .tagline {
        font-size: 5vw;
    }

    .prev-button,
    .next-button {
        font-size: 14px;
        padding: 10px 18px;
    }
}
