/* ==========================================
   &multiply.co Styles
   ========================================== */

:root {
    /* Default palette - will be overwritten by JS */
    --colour-core: #FF3366;
    --colour-accent: #FFD000;
    --colour-shadow: #1A0A10;
    --colour-highlight: #FFF0F3;
    
    /* Typography */
    --font-logo: 'Libre Baskerville', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Timing */
    --sweep-duration: 2.2s;
    --colour-cycle-interval: 7000;
}

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

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

body {
    font-family: var(--font-body);
    background: #FFFFFF;
    color: #1a1a1a;
}

/* ==========================================
   COLOUR SWEEP OVERLAY
   Cycles every 5-10 seconds, random direction
   ========================================== */
.colour-sweep {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Sweep direction classes */
.colour-sweep.sweep-from-top {
    background: linear-gradient(to bottom, var(--colour-core) 0%, var(--colour-accent) 45%, transparent 100%);
    animation: sweepVertical var(--sweep-duration) ease-out forwards;
    --clip-start: polygon(0 0, 100% 0, 100% 0, 0 0);
    --clip-end: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.colour-sweep.sweep-from-bottom {
    background: linear-gradient(to top, var(--colour-core) 0%, var(--colour-accent) 45%, transparent 100%);
    animation: sweepVertical var(--sweep-duration) ease-out forwards;
    --clip-start: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    --clip-end: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.colour-sweep.sweep-from-left {
    background: linear-gradient(to right, var(--colour-core) 0%, var(--colour-accent) 45%, transparent 100%);
    animation: sweepHorizontal var(--sweep-duration) ease-out forwards;
    --clip-start: polygon(0 0, 0 0, 0 100%, 0 100%);
    --clip-end: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.colour-sweep.sweep-from-right {
    background: linear-gradient(to left, var(--colour-core) 0%, var(--colour-accent) 45%, transparent 100%);
    animation: sweepHorizontal var(--sweep-duration) ease-out forwards;
    --clip-start: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
    --clip-end: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* Removed radial/diagonal sweeps - only clean edge sweeps */

/* Sweep Animations */
@keyframes sweepVertical {
    0% {
        opacity: 0;
        clip-path: var(--clip-start);
    }
    15% {
        opacity: 0.75;
    }
    100% {
        opacity: 0.35;
        clip-path: var(--clip-end);
    }
}

@keyframes sweepHorizontal {
    0% {
        opacity: 0;
        clip-path: var(--clip-start);
    }
    15% {
        opacity: 0.75;
    }
    100% {
        opacity: 0.35;
        clip-path: var(--clip-end);
    }
}

/* Only edge sweeps - removed center/diagonal */

/* ==========================================
   HEADER - Logo top-left, Nav top-right
   ========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem 2rem;
}

/* Logo Container - Top Left - Libre Baskerville serif */
.logo-container {
    font-family: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1;
    display: inline-flex;
    align-items: baseline;
}

.logo-text {
    color: #1a1a1a;
    font-family: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
}

/* Cursor - tight against text, slow elegant pulse */
.cursor {
    color: var(--colour-core);
    font-weight: 400;
    margin-left: -1px;
    margin-right: -1px;
    animation: softPulse 1.4s ease-in-out infinite;
}

.cursor.hidden {
    opacity: 0;
    animation: none;
}

@keyframes softPulse {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.2; }
}

/* Navigation - Top Right */
.nav-main {
    display: flex;
    gap: 2rem;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s;
}

.nav-main.visible {
    opacity: 1;
    transform: translateY(0);
}

.nav-link {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--colour-core);
}

/* ==========================================
   MAIN CONTENT
   ========================================== */
.main-content {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section {
    text-align: center;
    padding: 2rem;
    max-width: 700px;
}

/* Greeting */
.greeting {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.greeting-text {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 400;
    color: #333;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.greeting-subtext {
    font-size: clamp(0.9rem, 2vw, 1rem);
    font-weight: 300;
    color: #666;
    line-height: 1.5;
}

/* ==========================================
   WORLDS SIDEBAR
   ========================================== */
.worlds-strip {
    position: fixed;
    right: 0;
    top: 0;
    width: 8px;
    height: 100%;
    background: var(--colour-shadow);
    cursor: pointer;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s ease, background 0.3s ease;
}

.worlds-strip:hover {
    width: 36px;
    background: var(--colour-core);
}

.worlds-label {
    color: white;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.worlds-strip:hover .worlds-label {
    opacity: 1;
}

/* Worlds Panel */
.worlds-panel {
    position: fixed;
    right: -280px;
    top: 0;
    width: 280px;
    height: 100%;
    background: #1a1a1a;
    z-index: 199;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    padding: 2rem;
}

.worlds-panel.open {
    right: 0;
}

.worlds-content {
    width: 100%;
}

.world-link {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-decoration: none;
    transition: padding-left 0.2s ease;
}

.world-link:last-child {
    border-bottom: none;
}

.world-link:hover {
    padding-left: 0.5rem;
}

.world-name {
    display: block;
    color: white;
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 0.2rem;
}

.world-desc {
    display: block;
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    font-weight: 300;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .header {
        padding: 1rem 1.25rem;
    }
    
    .logo-container {
        font-size: 1.1rem;
    }
    
    .nav-main {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
    }
    
    .worlds-strip {
        width: 6px;
    }
    
    .worlds-strip:hover {
        width: 28px;
    }
}
