/* ============================================================
   gunsul.studio - Vaporwave Construction Aesthetic
   Colors: #ff2d87, #1a1035, #4ecdc4, #ffb4a2, #e8e0f0, #e8b4f8, #c77dff, #0d0a1f
   Fonts: Playfair Display, Space Grotesk, Inter
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    overflow: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #0d0a1f;
    color: #e8e0f0;
    overflow: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* --- Grain Overlay --- */
#grain-overlay {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.1;
    filter: url(#grain-filter);
    background: rgba(255,255,255,0.03);
}

/* --- Scaffolding Lines --- */
#scaffolding {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.scaffold-line {
    position: absolute;
    background: linear-gradient(180deg, transparent, #c77dff, transparent);
    opacity: 0.08;
}

.scaffold-line-1 {
    width: 1px;
    height: 100%;
    left: 15%;
    animation: scaffoldPulse 8s ease-in-out infinite;
}

.scaffold-line-2 {
    width: 1px;
    height: 100%;
    left: 35%;
    animation: scaffoldPulse 8s ease-in-out 1.5s infinite;
}

.scaffold-line-3 {
    width: 1px;
    height: 100%;
    left: 65%;
    animation: scaffoldPulse 8s ease-in-out 3s infinite;
}

.scaffold-line-4 {
    width: 1px;
    height: 100%;
    left: 85%;
    animation: scaffoldPulse 8s ease-in-out 4.5s infinite;
}

.scaffold-line-5 {
    width: 100%;
    height: 1px;
    top: 30%;
    animation: scaffoldPulseH 10s ease-in-out 2s infinite;
}

.scaffold-line-6 {
    width: 100%;
    height: 1px;
    top: 70%;
    animation: scaffoldPulseH 10s ease-in-out 5s infinite;
}

@keyframes scaffoldPulse {
    0%, 100% { opacity: 0.04; }
    50% { opacity: 0.12; }
}

@keyframes scaffoldPulseH {
    0%, 100% { opacity: 0.03; }
    50% { opacity: 0.08; }
}

/* --- Construction Progress --- */
#construction-progress {
    position: fixed;
    top: 24px;
    left: 32px;
    z-index: 100;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.progress-label {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 18px;
    color: #c77dff;
    letter-spacing: 0.02em;
}

.progress-value {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: 14px;
    color: #e8b4f8;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

/* --- Main Scroll Container --- */
#scroll-container {
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
}

/* Hide scrollbar but keep functionality */
#scroll-container::-webkit-scrollbar {
    width: 0;
    display: none;
}

#scroll-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- Diagonal Sections --- */
.diagonal-section {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    overflow: hidden;
}

.section-inner {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 80px 60px;
}

.diagonal-divider {
    position: absolute;
    bottom: -60px;
    left: 0;
    width: 100%;
    height: 120px;
    z-index: 10;
}

/* Section backgrounds */
#section-hero {
    background: linear-gradient(170deg, #0d0a1f 0%, #1a1035 40%, #0d0a1f 100%);
}

#section-process {
    background: linear-gradient(190deg, #1a1035 0%, #0d0a1f 50%, #1a1035 100%);
}

#section-vision {
    background: linear-gradient(170deg, #0d0a1f 0%, #1a1035 60%, #0d0a1f 100%);
}

#section-contact {
    background: linear-gradient(190deg, #1a1035 0%, #0d0a1f 40%, #1a1035 100%);
}

/* Diagonal divider shapes */
#section-hero .diagonal-divider {
    background: linear-gradient(to right, #c77dff 0%, #ff2d87 100%);
    clip-path: polygon(0 0, 100% 60%, 100% 100%, 0 100%);
    opacity: 0.15;
}

#section-process .diagonal-divider {
    background: linear-gradient(to right, #4ecdc4 0%, #c77dff 100%);
    clip-path: polygon(0 40%, 100% 0, 100% 100%, 0 100%);
    opacity: 0.12;
}

#section-vision .diagonal-divider {
    background: linear-gradient(to right, #ff2d87 0%, #ffb4a2 100%);
    clip-path: polygon(0 0, 100% 50%, 100% 100%, 0 100%);
    opacity: 0.1;
}

/* --- Content Block --- */
.content-block {
    max-width: 800px;
    position: relative;
    z-index: 5;
}

/* --- Section Numbers --- */
.section-number {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 24px;
}

.number-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: #4ecdc4;
    text-transform: uppercase;
}

.number-value {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 48px;
    color: #c77dff;
    opacity: 0.2;
    line-height: 1;
}

/* --- Headlines --- */
.headline {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(42px, 6vw, 96px);
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 24px;
}

.headline-line {
    display: block;
    transform: translateY(40px);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1),
                opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.headline-line.visible {
    transform: translateY(0);
    opacity: 1;
}

.headline-hero .headline-line:first-child {
    color: #c77dff;
    -webkit-text-stroke: 1px #c77dff;
}

.headline-hero .headline-line:last-child {
    color: #e8e0f0;
}

.headline-process .headline-line {
    color: #ffb4a2;
}

.headline-vision .headline-line {
    color: #4ecdc4;
}

.headline-contact .headline-line:first-child {
    color: #ff2d87;
}

.headline-contact .headline-line:last-child {
    color: #e8b4f8;
}

/* --- Subtext --- */
.subtext {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: clamp(16px, 2vw, 22px);
    line-height: 1.6;
    color: #e8e0f0;
    opacity: 0.7;
    max-width: 560px;
    margin-bottom: 32px;
    transform: translateY(30px);
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.3s,
                opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.3s;
}

.reveal-content.visible .subtext {
    transform: translateY(0);
    opacity: 0.7;
}

/* --- Blueprint Annotation --- */
.blueprint-annotation {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    opacity: 0;
    transform: translateX(-20px);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1) 0.6s,
                opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1) 0.6s;
}

.reveal-content.visible .blueprint-annotation {
    opacity: 1;
    transform: translateX(0);
}

.annotation-marker {
    color: #ff2d87;
    font-size: 10px;
}

.annotation-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.15em;
    color: #c77dff;
    opacity: 0.5;
    text-transform: uppercase;
}

/* --- Gradient Orbs --- */
.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.orb-hero {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(199,125,255,0.25) 0%, rgba(255,45,135,0.1) 50%, transparent 70%);
    right: -100px;
    top: 10%;
    animation: orbFloat 12s ease-in-out infinite;
}

.orb-process {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(78,205,196,0.2) 0%, rgba(199,125,255,0.08) 50%, transparent 70%);
    left: -80px;
    bottom: 10%;
    animation: orbFloat 14s ease-in-out 2s infinite;
}

.orb-vision {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,45,135,0.15) 0%, rgba(232,180,248,0.1) 40%, transparent 70%);
    right: -150px;
    top: 20%;
    animation: orbFloat 16s ease-in-out 4s infinite;
}

.orb-contact {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(255,180,162,0.2) 0%, rgba(78,205,196,0.1) 50%, transparent 70%);
    left: -100px;
    top: 15%;
    animation: orbFloat 13s ease-in-out 1s infinite;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* --- Blueprint Background --- */
.blueprint-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    background-image:
        linear-gradient(rgba(199,125,255,0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(199,125,255,0.3) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
}

/* --- Process Grid --- */
.process-grid {
    display: flex;
    gap: 40px;
    margin: 32px 0;
    flex-wrap: wrap;
}

.process-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transform: translateY(30px);
    transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1),
                opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-content.visible .process-item:nth-child(1) { transition-delay: 0.3s; }
.reveal-content.visible .process-item:nth-child(2) { transition-delay: 0.5s; }
.reveal-content.visible .process-item:nth-child(3) { transition-delay: 0.7s; }

.reveal-content.visible .process-item {
    opacity: 1;
    transform: translateY(0);
}

.process-icon svg {
    transition: transform 0.4s ease;
}

.process-item:hover .process-icon svg {
    transform: rotate(10deg) scale(1.1);
}

.process-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.1em;
    color: #e8e0f0;
    opacity: 0.6;
    text-transform: uppercase;
}

/* --- Color Bar Row --- */
.color-bar-row {
    display: flex;
    gap: 8px;
    margin: 24px 0;
    height: 4px;
}

.color-bar {
    flex: 1;
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-content.visible .color-bar:nth-child(1) { transform: scaleX(1); transition-delay: 0.4s; }
.reveal-content.visible .color-bar:nth-child(2) { transform: scaleX(1); transition-delay: 0.55s; }
.reveal-content.visible .color-bar:nth-child(3) { transform: scaleX(1); transition-delay: 0.7s; }
.reveal-content.visible .color-bar:nth-child(4) { transform: scaleX(1); transition-delay: 0.85s; }
.reveal-content.visible .color-bar:nth-child(5) { transform: scaleX(1); transition-delay: 1s; }

/* --- Wireframe Structure --- */
.wireframe-structure {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
    z-index: 0;
    animation: wireframeRotate 30s linear infinite;
}

@keyframes wireframeRotate {
    from { transform: translateY(-50%) rotate(0deg); }
    to { transform: translateY(-50%) rotate(360deg); }
}

/* --- Contact Block --- */
.contact-block {
    margin: 32px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-line {
    display: flex;
    align-items: baseline;
    gap: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(199,125,255,0.1);
    opacity: 0;
    transform: translateX(-30px);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
                opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-content.visible .contact-line:nth-child(1) { transition-delay: 0.3s; }
.reveal-content.visible .contact-line:nth-child(2) { transition-delay: 0.45s; }
.reveal-content.visible .contact-line:nth-child(3) { transition-delay: 0.6s; }

.reveal-content.visible .contact-line {
    opacity: 1;
    transform: translateX(0);
}

.contact-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: #4ecdc4;
    text-transform: uppercase;
    min-width: 120px;
}

.contact-value {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: #e8e0f0;
    opacity: 0.8;
}

/* --- Scroll Indicator --- */
#scroll-indicator {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: opacity 0.4s ease;
}

#scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 1.5px solid #c77dff;
    border-bottom: 1.5px solid #c77dff;
    transform: rotate(45deg);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.5; }
    50% { transform: rotate(45deg) translate(4px, 4px); opacity: 1; }
}

.scroll-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 10px;
    letter-spacing: 0.25em;
    color: #c77dff;
    opacity: 0.5;
    text-transform: uppercase;
}

/* --- Section Navigation --- */
#section-nav {
    position: fixed;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(199,125,255,0.2);
    border: 1px solid rgba(199,125,255,0.3);
    cursor: pointer;
    transition: all 0.4s ease;
    padding: 0;
}

.nav-dot:hover {
    background: rgba(199,125,255,0.5);
    transform: scale(1.3);
}

.nav-dot.active {
    background: #c77dff;
    border-color: #c77dff;
    box-shadow: 0 0 12px rgba(199,125,255,0.4);
}

/* --- Reveal Animation Classes --- */
.reveal-content {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.reveal-content.visible {
    opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .section-inner {
        padding: 60px 24px;
    }

    .headline {
        font-size: clamp(32px, 8vw, 64px);
    }

    .process-grid {
        gap: 24px;
    }

    .wireframe-structure {
        display: none;
    }

    #section-nav {
        right: 16px;
    }

    .contact-line {
        flex-direction: column;
        gap: 4px;
    }

    .contact-label {
        min-width: auto;
    }

    .gradient-orb {
        display: none;
    }

    #construction-progress {
        left: 16px;
        top: 16px;
    }
}
