/* ============================================================
   lunge.dev - Frutiger Aero Candy Glass Parallax
   ============================================================ */

/* Root & Typography */
:root {
    --color-dark: #1A1A2E;
    --color-dark-muted: #4A4A6E;
    --color-pink: #FF5AA0;
    --color-yellow: #FFE14D;
    --color-cyan: #00D4AA;
    --color-lavender: #B088FF;
    --color-gray: #C0C0D0;
    --color-light: #FAFAFA;

    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

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

body {
    font-family: var(--font-body);
    background: var(--color-light);
    color: var(--color-dark);
    position: relative;
}

/* Viewport Container with Perspective */
.viewport {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow-y: scroll;
    overflow-x: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
    scroll-behavior: smooth;
}

/* Scrollbar styling */
.viewport::-webkit-scrollbar {
    width: 8px;
}

.viewport::-webkit-scrollbar-track {
    background: var(--color-light);
}

.viewport::-webkit-scrollbar-thumb {
    background: rgba(26, 26, 46, 0.3);
    border-radius: 4px;
}

.viewport::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 26, 46, 0.5);
}

/* Parallax Sections */
.parallax-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    overflow: hidden;
}

.parallax-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform-style: preserve-3d;
}

/* Calculate parallax depth based on --depth variable */
.parallax-layer {
    transform: translateZ(calc(var(--depth) * 500px));
}

/* Background Gradients */
.gradient-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.gradient-yellow {
    background: linear-gradient(135deg, #FFE14D 0%, rgba(255, 225, 77, 0.7) 50%, #00D4AA 100%);
}

.gradient-pink {
    background: linear-gradient(135deg, #FF5AA0 0%, rgba(255, 90, 160, 0.7) 50%, #B088FF 100%);
}

.gradient-cyan {
    background: linear-gradient(135deg, #00D4AA 0%, rgba(0, 212, 170, 0.7) 50%, #FFE14D 100%);
}

.gradient-purple {
    background: linear-gradient(135deg, #B088FF 0%, rgba(176, 136, 255, 0.7) 50%, #FF5AA0 100%);
}

/* Layer Positioning */
.layer-bg {
    z-index: 1;
}

.layer-far {
    z-index: 2;
}

.layer-mid {
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.layer-content {
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

/* Hero Section */
.hero-container {
    text-align: center;
    z-index: 10;
    padding: 40px;
    max-width: 800px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 120px;
    font-weight: 300;
    letter-spacing: -3px;
    color: var(--color-dark);
    margin-bottom: 20px;
    text-transform: lowercase;
    animation: fadeInTitle 1.2s ease-out forwards;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 22px;
    font-weight: 400;
    color: rgba(26, 26, 46, 0.7);
    letter-spacing: 0.5px;
    animation: fadeInSubtitle 1.5s ease-out forwards;
    animation-delay: 0.3s;
}

/* Content Sections */
.section-content {
    text-align: center;
    max-width: 700px;
    padding: 60px 40px;
    position: relative;
    z-index: 10;
}

.section-content h2 {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.section-content p {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.8;
    color: rgba(26, 26, 46, 0.75);
    margin-bottom: 32px;
}

/* Icon Grid */
.icon-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.icon-small {
    animation: float 4s ease-in-out infinite;
}

.icon-small:nth-child(2) {
    animation-delay: 0.5s;
}

/* SVG Icons */
.icon-cube,
.icon-cylinder,
.icon-cone,
.icon-discs,
.icon-tiny {
    filter: drop-shadow(0 10px 20px rgba(26, 26, 46, 0.1));
    animation: gentle-rotate 10s linear infinite;
}

.icon-cone {
    animation-duration: 8s;
}

.icon-discs {
    animation-duration: 12s;
}

.icon-tiny {
    animation: float 3s ease-in-out infinite;
}

/* Color Blocks for Section 4 */
.color-blocks {
    display: grid;
    grid-template-columns: repeat(2, 100px);
    gap: 30px;
    animation: fadeIn 1s ease-out;
}

.color-block {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    border: 2px solid var(--color-dark);
    opacity: 0.6;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.color-block:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.color-yellow {
    background: var(--color-yellow);
}

.color-pink {
    background: var(--color-pink);
}

.color-cyan {
    background: var(--color-cyan);
}

.color-purple {
    background: var(--color-lavender);
}

.color-muted {
    background: var(--color-dark-muted);
}

/* Floating Boxes in Section 3 */
.floating-box {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-dark);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    animation: float 6s ease-in-out infinite;
}

.box-1 {
    width: 120px;
    height: 120px;
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.box-2 {
    width: 140px;
    height: 140px;
    bottom: 25%;
    right: 10%;
    animation-delay: 2s;
}

/* Animations */
@keyframes fadeInTitle {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeInSubtitle {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes gentle-rotate {
    from {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    to {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(0deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Section Specific Styles */
.section-1 .layer-mid {
    animation: float 8s ease-in-out infinite;
}

.section-2 .icon-grid {
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Typography */
@media (max-width: 768px) {
    .hero-title {
        font-size: 72px;
        letter-spacing: -2px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .section-content h2 {
        font-size: 40px;
    }

    .section-content p {
        font-size: 16px;
    }

    .color-blocks {
        grid-template-columns: repeat(2, 80px);
        gap: 20px;
    }

    .color-block {
        width: 80px;
        height: 80px;
    }

    .icon-grid {
        gap: 20px;
    }

    .icon-small {
        width: 100px;
        height: 100px;
    }

    .box-1 {
        width: 90px;
        height: 90px;
        top: 15%;
        left: 10%;
    }

    .box-2 {
        width: 100px;
        height: 100px;
        bottom: 20%;
        right: 8%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 48px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .section-content h2 {
        font-size: 32px;
    }

    .section-content p {
        font-size: 14px;
        line-height: 1.6;
    }

    .section-content {
        padding: 40px 20px;
    }

    .icon-grid {
        gap: 15px;
    }

    .color-blocks {
        grid-template-columns: repeat(2, 70px);
        gap: 15px;
    }

    .color-block {
        width: 70px;
        height: 70px;
    }
}

/* Candy Glass Effect for Sections */
.parallax-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* Use muted color for visual depth in backgrounds */
.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(74, 74, 110, 0.02) 0%,
        transparent 100%
    );
    pointer-events: none;
}

/* Smooth scroll transition between sections */
.parallax-section:nth-child(n+2) {
    border-top: 1px solid rgba(26, 26, 46, 0.05);
}

/* Ensure 3D transforms work across all browsers */
.viewport * {
    backface-visibility: hidden;
}

/* Override default link styles if needed */
a {
    color: var(--color-pink);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-dark);
    text-decoration: underline;
}
