/* style.css - Main stylesheet for encosion.com */

/* ==========================================================================
   CSS Variables & Base Styles
   ========================================================================== */

:root {
    /* Greyscale variations */
    --dark-base: #000000;
    --dark-medium-darkest: #0a0a0a;
    --dark-medium-darker: #141414;
    --dark-medium: #1f1f1f;
    --dark-medium-lighter: #545454;
    --dark-medium-lightest: #878787;
    --dark-medium-lightest-30percent: rgba(84, 84, 84, 0.3);
    --dark-light: #d1d1d1;
    
    /* Accent variations */
    --accent-base: hotpink;
    --accent-hover: #e55ba0;
    --accent-muted: #dda0c0;
    --accent-light: #ffb3d9;
    --accent-dark: #ac127b;
    --accent-darker: #6c0547;
    --accent-darkest: #3b0422;
    
    /* Typography - Responsive Font Scale using clamp() */
    --font-xs: clamp(0.7rem, 0.8vw + 0.6rem, 0.8rem);      /* 0.7rem - 0.8rem */
    --font-sm: clamp(0.75rem, 0.8vw + 0.65rem, 0.85rem); /* 0.75rem - 0.85rem */
    /* Base */
    --font-md: clamp(1rem, 1.2vw + 0.8rem, 1.2rem);       /* 1rem - 1.2rem */
    --font-lg: clamp(1.1rem, 1.4vw + 0.8rem, 1.4rem);     /* 1.1rem - 1.4rem */
    --font-xl: clamp(1.3rem, 1.6vw + 1rem, 1.6rem);       /* 1.3rem - 1.6rem */
    --font-2xl: clamp(1.5rem, 2vw + 1.2rem, 2rem);        /* 1.5rem - 2rem */
    --font-3xl: clamp(2rem, 2.5vw + 1.5rem, 2.5rem);      /* 2rem - 2.5rem */
    --font-4xl: clamp(2.5rem, 3vw + 2rem, 3rem);         /* 2.5rem - 3rem */
    --font-5xl: clamp(3rem, 4vw + 2.5rem, 4rem);         /* 3rem - 4rem */
    
    /* Responsive unified sizing scale */
    --xs: clamp(0.25rem, 0.5vw + 0.25rem, 0.5rem);    /* 4px to 8px */
    --sm: clamp(0.75rem, 1vw + 0.5rem, 1rem);        /* 12px to 16px */
    --md: clamp(1rem, 1.5vw + 0.75rem, 1.5rem);     /* 16px to 24px */
    --lg: clamp(1.5rem, 2vw + 1rem, 2rem);           /* 24px to 32px */
    --xl: clamp(2rem, 3vw + 1.5rem, 3rem);           /* 32px to 48px */
    
    /* Responsive line-heights using clamp() */
    --tight: clamp(1.1, 0.1vw + 1.0, 1.2);    /* 1.1 to 1.2 */
    --normal: clamp(1.4, 0.2vw + 1.3, 1.6);  /* 1.4 to 1.6 */
    --relaxed: clamp(1.5, 0.3vw + 1.4, 1.8); /* 1.5 to 1.8 */
    --loose: clamp(1.7, 0.5vw + 1.7, 2.2);   /* 2.2 to 2.6 */
    
    /* Border radius */
    --radius: 0.5rem;
    --radius-rounded: 50%;
    
    /* Text shadows */
    --text-shadow-layered: 0px 0px 1px rgba(0,0,0,0.4), -1px 1px 2px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.2);
    --text-shadow-layered-small: 0px 0px 1px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--dark-base);
    color: var(--dark-light);
    line-height: var(--normal);
    font-size: var(--font-md);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Layout & Container
   ========================================================================== */

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--lg);
    padding-top: var(--lg);
    flex: 1;
}

/* Expand container width on mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--md); /* Reduce padding from --lg to --md on mobile */
    }
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1 {
    font-size: var(--font-3xl);
    font-weight: 700;
    line-height: var(--tight);
    margin-bottom: var(--lg);
    letter-spacing: -0.03em;
    color: var(--dark-light);
}

h2 {
    font-size: var(--font-2xl);
    font-weight: 700;
    line-height: var(--tight);
    margin-bottom: var(--lg);
    letter-spacing: -0.03em;
    color: var(--dark-light);
}

h3 {
    font-size: var(--font-xl);
    font-weight: 700;
    line-height: var(--tight);
    margin-bottom: var(--lg);
    letter-spacing: -0.03em;
    color: var(--dark-light);
}

p {
    margin-bottom: var(--md);
    line-height: var(--relaxed);
}

a {
    color: var(--accent-base);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: none;
}

/* ==========================================================================
   Parallax Container Styling
   ========================================================================== */

.parallax-container {
    position: relative;
    height: 600vh; /* 6 sections × 100vh each */
    overflow: hidden;
    margin-top: -80px; /* Pull up to overlap with header */
}

/* Fixed centered content */
.fixed-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100; /* Below header (1000) but above backgrounds */
    pointer-events: none; /* Allow clicks to pass through to links */
}

.hero-content {
    position: relative;
    text-align: center;
    padding: var(--lg);
    max-width: 600px;
    pointer-events: auto; /* Re-enable pointer events for links */
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content a,
.hero-content .no-link {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: var(--font-2xl);
    font-weight: 600;
    color: white;
    text-decoration: none;
    text-shadow: var(--text-shadow-layered);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: var(--md);
    border-radius: var(--radius);
    backdrop-filter: blur(15px);
    /* background: rgba(0, 0, 0, 0.3); */
    border: 1px solid rgba(255, 255, 255, 0.15);
    opacity: 0;
    pointer-events: none;
}

.hero-content a.active-link,
.hero-content .no-link.active-link {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.hero-content a:hover {
    color: var(--accent-base);
    transform: translate(-50%, -50%) translateY(-8px) scale(1.08);
    background: rgba(0, 0, 0, 0.3);
    /* box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6); */
}

.hero-content .no-link {
    cursor: not-allowed;
}

/* Parallax background sections */
.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    transform: translateZ(0); /* Hardware acceleration */
}

/* Background image assignments */
.parallax-bg[data-bg="bg_thoughts.avif"] {
    background-image: url('/i/bg_thoughts.avif');
    top: 0vh;
}

.parallax-bg[data-bg="bg_music.avif"] {
    background-image: url('/i/bg_music.avif');
    top: 100vh;
}

.parallax-bg[data-bg="bg_photos.avif"] {
    background-image: url('/i/bg_photos.avif');
    top: 200vh;
}

.parallax-bg[data-bg="bg_issues.avif"] {
    background-image: url('/i/bg_issues.avif');
    top: 300vh;
}

.parallax-bg[data-bg="bg_work.avif"] {
    background-image: url('/i/bg_work.avif');
    top: 400vh;
}

.parallax-bg[data-bg="bg_theory.avif"] {
    background-image: url('/i/bg_theory.avif');
    top: 500vh;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-content a,
    .hero-content .no-link {
        font-size: var(--font-2xl);
        padding: var(--sm);
    }
    
    .hero-content {
        padding: var(--md);
    }
}

@media (max-width: 480px) {
    .hero-content a,
    .hero-content .no-link {
        font-size: var(--font-xl);
    }
}