/* interplanetary.quest - Street-style cosmic zine */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Caveat', cursive;
    background-color: #0D0221;
    color: #E8D5F5;
    overflow-x: hidden;
    min-height: 100vh;
    background-image:
        radial-gradient(1px 1px at 12% 18%, #FFFFFF 0.5px, transparent 1px),
        radial-gradient(1px 1px at 28% 42%, #FFFFFF 0.5px, transparent 1px),
        radial-gradient(1.5px 1.5px at 45% 78%, #E8D5F5 0.7px, transparent 1px),
        radial-gradient(1px 1px at 62% 12%, #FFFFFF 0.5px, transparent 1px),
        radial-gradient(1px 1px at 78% 32%, #E8D5F5 0.6px, transparent 1px),
        radial-gradient(1.5px 1.5px at 85% 65%, #FFFFFF 0.7px, transparent 1px),
        radial-gradient(1px 1px at 92% 88%, #E8D5F5 0.5px, transparent 1px),
        radial-gradient(1px 1px at 8% 70%, #FFFFFF 0.5px, transparent 1px),
        radial-gradient(1.5px 1.5px at 35% 55%, #E8D5F5 0.7px, transparent 1px),
        radial-gradient(1px 1px at 52% 38%, #FFFFFF 0.5px, transparent 1px),
        radial-gradient(1px 1px at 18% 92%, #FFFFFF 0.5px, transparent 1px),
        radial-gradient(1px 1px at 73% 48%, #E8D5F5 0.6px, transparent 1px),
        radial-gradient(1.5px 1.5px at 95% 22%, #FFFFFF 0.7px, transparent 1px),
        radial-gradient(1px 1px at 5% 38%, #E8D5F5 0.5px, transparent 1px),
        radial-gradient(1px 1px at 38% 8%, #FFFFFF 0.5px, transparent 1px),
        radial-gradient(1px 1px at 65% 95%, #E8D5F5 0.6px, transparent 1px),
        radial-gradient(1.5px 1.5px at 22% 62%, #FFFFFF 0.7px, transparent 1px),
        radial-gradient(1px 1px at 88% 8%, #E8D5F5 0.5px, transparent 1px),
        linear-gradient(180deg, #0D0221, #1B0A3C);
    background-attachment: fixed;
}

.cosmos {
    position: relative;
    width: 100%;
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 100;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #7B6D8E;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-dot.active {
    background-color: var(--current-accent, #A855F7);
    border-color: var(--current-accent, #A855F7);
    animation: progress-pulse 2s ease-in-out infinite;
    transform: scale(1.2);
}

@keyframes progress-pulse {
    0%, 100% { transform: scale(1.0); }
    50% { transform: scale(1.2); }
}

/* Section Layout */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 80px 24px;
    overflow: hidden;
}

.column {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Background Bubbles */
.background-bubble {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
    z-index: 1;
}

.background-bubble.bubble-1 {
    width: 200px;
    height: 200px;
    background: var(--accent-color, #A855F7);
    opacity: 0.08;
    top: 10%;
    left: 5%;
    animation: bubble-drift 12s ease-in-out infinite;
}

.background-bubble.bubble-2 {
    width: 120px;
    height: 120px;
    background: var(--accent-color, #A855F7);
    opacity: 0.06;
    bottom: 15%;
    right: 8%;
    animation: bubble-drift 9s ease-in-out infinite;
    animation-delay: -3s;
}

.background-bubble.bubble-3 {
    width: 80px;
    height: 80px;
    background: var(--accent-color, #A855F7);
    opacity: 0.1;
    top: 60%;
    left: 12%;
    animation: bubble-drift 14s ease-in-out infinite;
    animation-delay: -6s;
}

@keyframes bubble-drift {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-18px) scale(1.03); }
}

/* Section 0: Launch Pad */
.launch-pad {
    --accent-color: #FF6B6B;
    text-align: center;
}

.starfield {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 14% 22%, #FFFFFF 0.5px, transparent 1px),
        radial-gradient(1px 1px at 30% 48%, #FFFFFF 0.6px, transparent 1px),
        radial-gradient(1.5px 1.5px at 47% 75%, #E8D5F5 0.7px, transparent 1px),
        radial-gradient(1px 1px at 64% 16%, #FFFFFF 0.5px, transparent 1px),
        radial-gradient(1px 1px at 80% 35%, #E8D5F5 0.6px, transparent 1px),
        radial-gradient(1.5px 1.5px at 88% 62%, #FFFFFF 0.7px, transparent 1px),
        radial-gradient(1px 1px at 6% 75%, #FFFFFF 0.5px, transparent 1px),
        radial-gradient(1.5px 1.5px at 38% 58%, #E8D5F5 0.7px, transparent 1px),
        radial-gradient(1px 1px at 55% 38%, #FFFFFF 0.5px, transparent 1px);
    z-index: 1;
}

.launch-pad-title {
    font-family: 'Bebas Neue', 'Inter', sans-serif;
    font-size: clamp(48px, 9vw, 96px);
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
}

.bubble-letter {
    display: inline-block;
    background: rgba(255, 107, 107, 0.18);
    border: 2px solid #FF6B6B;
    border-radius: 50% / 40%;
    padding: 4px 10px;
    margin: 2px;
    color: #FFFFFF;
    animation: letter-wobble 3s ease-in-out infinite;
    transform-origin: center;
}

.bubble-letter:nth-child(odd) { animation-delay: -0.5s; }
.bubble-letter:nth-child(even) { animation-delay: -1.2s; }
.bubble-letter:nth-child(3n) { animation-delay: -2s; }
.bubble-letter:nth-child(5n) { animation-delay: -1.8s; }

@keyframes letter-wobble {
    0%, 100% { transform: rotate(-2deg) translateY(0); }
    50% { transform: rotate(2deg) translateY(-4px); }
}

.tagline {
    font-family: 'Caveat', cursive;
    font-size: 28px;
    color: #E8D5F5;
    margin-top: 48px;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

/* Transit Zones */
.transit-zone {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.transit-icon {
    width: 64px;
    height: 64px;
    animation: transit-spin 8s linear infinite, transit-bob 3s ease-in-out infinite;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}

@keyframes transit-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes transit-bob {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -8px; }
}

/* Section 1-4: Destinations */
.destination {
    --accent-color: #FF6B6B;
}

.destination-title {
    font-family: 'Bebas Neue', 'Inter', sans-serif;
    font-size: clamp(48px, 7vw, 72px);
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1;
    margin-bottom: 48px;
    opacity: 0;
    transform: translateX(-120px);
    transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1), transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.section.in-view .destination-title {
    opacity: 1;
    transform: translateX(0);
}

.icon-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 48px;
    padding: 24px;
    background: rgba(255, 107, 107, 0.06);
    border-radius: 20px;
    position: relative;
}

.destination[data-section="1"] { --accent-color: #FF6B6B; }
.destination[data-section="2"] { --accent-color: #4ECDC4; }
.destination[data-section="3"] { --accent-color: #FFE66D; }
.destination[data-section="4"] { --accent-color: #A855F7; }

.destination[data-section="1"] .icon-cluster { background: rgba(255, 107, 107, 0.06); }
.destination[data-section="2"] .icon-cluster { background: rgba(78, 205, 196, 0.06); border: 1px dashed #4ECDC4; }
.destination[data-section="3"] .icon-cluster { background: rgba(255, 230, 109, 0.06); border: 1px dashed #FFE66D; }
.destination[data-section="4"] .icon-cluster { background: rgba(168, 85, 247, 0.06); }

.icon-bubble {
    width: 110px;
    height: 110px;
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent-color) 12%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: -8px;
    cursor: pointer;
    transition: all 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform: translateX(-80px);
    filter: drop-shadow(0 0 0 2px #FFFFFF);
}

.icon-bubble:nth-child(odd) {
    transform: translateX(-80px);
    transform: rotate(-3deg) translateX(-80px);
}

.icon-bubble:nth-child(even) {
    transform: translateX(80px);
    transform: rotate(2deg) translateX(80px);
}

.section.in-view .icon-bubble:nth-child(odd) {
    opacity: 1;
    transform: rotate(-3deg) translateX(0);
}

.section.in-view .icon-bubble:nth-child(even) {
    opacity: 1;
    transform: rotate(2deg) translateX(0);
}

.section.in-view .icon-bubble:nth-child(1) { transition-delay: 0ms; }
.section.in-view .icon-bubble:nth-child(2) { transition-delay: 100ms; }
.section.in-view .icon-bubble:nth-child(3) { transition-delay: 200ms; }
.section.in-view .icon-bubble:nth-child(4) { transition-delay: 300ms; }
.section.in-view .icon-bubble:nth-child(5) { transition-delay: 400ms; }
.section.in-view .icon-bubble:nth-child(6) { transition-delay: 500ms; }

.icon-bubble:hover {
    border-width: 5px;
    background: color-mix(in srgb, var(--accent-color) 25%, transparent);
}

.icon-bubble:hover svg {
    transform: scale(1.15);
}

.icon-bubble svg {
    width: 60%;
    height: 60%;
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.destination-text {
    font-family: 'Caveat', cursive;
    font-size: 24px;
    color: #E8D5F5;
    line-height: 1.6;
    letter-spacing: 0.02em;
    max-width: 600px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 400ms ease-out 800ms, transform 400ms ease-out 800ms;
}

.section.in-view .destination-text {
    opacity: 1;
    transform: translateY(0);
}

/* Section 5: Sticker Wall */
.sticker-wall {
    --accent-color: #A855F7;
    min-height: 150vh;
    align-items: flex-start;
    padding-top: 120px;
}

.sticker-title {
    font-family: 'Bebas Neue', 'Inter', sans-serif;
    font-size: clamp(48px, 7vw, 72px);
    color: #A855F7;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1;
    margin-bottom: 64px;
    opacity: 0;
    transform: translateX(-120px);
    transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1), transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sticker-wall.in-view .sticker-title {
    opacity: 1;
    transform: translateX(0);
}

.sticker-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: flex-start;
    align-items: center;
    padding: 24px;
    position: relative;
    min-height: 600px;
}

.sticker {
    width: 100px;
    height: 100px;
    position: relative;
    cursor: pointer;
    opacity: 0;
    transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 400ms ease-out;
    filter: drop-shadow(0 0 0 2px #FFFFFF) drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.4));
}

.sticker svg {
    width: 100%;
    height: 100%;
    display: block;
}

.sticker-label {
    font-family: 'Space Mono', 'Inter', monospace;
    font-size: 11px;
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-align: center;
    margin-top: 4px;
    opacity: 0;
    transition: opacity 200ms ease-out;
}

.sticker:hover {
    transform: scale(1.1) rotate(0deg) !important;
    z-index: 10;
}

.sticker:hover .sticker-label {
    opacity: 1;
}

/* Per-sticker rotations and entrance directions */
.sticker.badge-1 { transform: translateX(-200px) rotate(-6deg); }
.sticker.badge-2 { transform: translateX(200px) rotate(4deg); }
.sticker.badge-3 { transform: translateX(-200px) rotate(-2deg); }
.sticker.badge-4 { transform: translateX(200px) rotate(7deg); }
.sticker.badge-5 { transform: translateX(-200px) rotate(-5deg); }
.sticker.badge-6 { transform: translateX(200px) rotate(3deg); }
.sticker.badge-7 { transform: translateX(-200px) rotate(-8deg); }
.sticker.badge-8 { transform: translateX(200px) rotate(6deg); }

.sticker-wall.in-view .sticker.badge-1 { opacity: 1; transform: translateX(0) rotate(-6deg); transition-delay: 0ms; }
.sticker-wall.in-view .sticker.badge-2 { opacity: 1; transform: translateX(0) rotate(4deg); transition-delay: 50ms; }
.sticker-wall.in-view .sticker.badge-3 { opacity: 1; transform: translateX(0) rotate(-2deg); transition-delay: 100ms; }
.sticker-wall.in-view .sticker.badge-4 { opacity: 1; transform: translateX(0) rotate(7deg); transition-delay: 150ms; }
.sticker-wall.in-view .sticker.badge-5 { opacity: 1; transform: translateX(0) rotate(-5deg); transition-delay: 250ms; }
.sticker-wall.in-view .sticker.badge-6 { opacity: 1; transform: translateX(0) rotate(3deg); transition-delay: 300ms; }
.sticker-wall.in-view .sticker.badge-7 { opacity: 1; transform: translateX(0) rotate(-8deg); transition-delay: 350ms; }
.sticker-wall.in-view .sticker.badge-8 { opacity: 1; transform: translateX(0) rotate(6deg); transition-delay: 400ms; }

/* Section 6: Sign-Off */
.sign-off {
    --accent-color: #FF6B6B;
    text-align: center;
}

.sign-off .column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.sign-off-icon {
    width: 160px;
    height: 160px;
    border: 4px solid #FF6B6B;
    border-radius: 50%;
    background: rgba(255, 107, 107, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bubble-drift 6s ease-in-out infinite;
    opacity: 0;
    transition: opacity 600ms ease-out;
}

.sign-off.in-view .sign-off-icon {
    opacity: 1;
}

.sign-off-icon svg {
    width: 70%;
    height: 70%;
}

.sign-off-text {
    font-family: 'Bebas Neue', 'Inter', sans-serif;
    font-size: clamp(36px, 5vw, 48px);
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.1;
    opacity: 0;
    transform: translateX(-120px);
    transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1) 200ms, transform 600ms cubic-bezier(0.22, 1, 0.36, 1) 200ms;
}

.sign-off.in-view .sign-off-text {
    opacity: 1;
    transform: translateX(0);
}

.social-icons {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.social-icon {
    width: 60px;
    height: 60px;
    border: 3px solid #FF6B6B;
    border-radius: 50%;
    background: rgba(255, 107, 107, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform: translateY(40px);
}

.sign-off.in-view .social-icon {
    opacity: 1;
    transform: translateY(0);
}

.sign-off.in-view .social-icon:nth-child(1) { transition-delay: 600ms; }
.sign-off.in-view .social-icon:nth-child(2) { transition-delay: 700ms; }
.sign-off.in-view .social-icon:nth-child(3) { transition-delay: 800ms; }

.social-icon:hover {
    border-width: 5px;
    transform: scale(1.1) translateY(0);
    background: rgba(255, 107, 107, 0.25);
}

.social-icon svg {
    width: 60%;
    height: 60%;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .column {
        padding: 0 12px;
    }

    .scroll-progress {
        right: 16px;
        gap: 12px;
    }

    .progress-dot {
        width: 10px;
        height: 10px;
    }

    .icon-cluster {
        gap: 8px;
        padding: 16px;
    }

    .icon-bubble {
        width: 80px;
        height: 80px;
        margin: -4px;
    }

    .destination-title,
    .sticker-title {
        margin-bottom: 32px;
    }

    .sticker {
        width: 80px;
        height: 80px;
    }

    .sticker-container {
        gap: 12px;
        min-height: 500px;
    }

    .background-bubble.bubble-1 {
        width: 120px;
        height: 120px;
    }

    .background-bubble.bubble-2 {
        width: 80px;
        height: 80px;
    }

    .background-bubble.bubble-3 {
        width: 50px;
        height: 50px;
    }

    .sign-off-icon {
        width: 120px;
        height: 120px;
    }
}
