/* ============================================
   onthelook CREW - Style Sheet
   ============================================ */

/* --- CSS Variables --- */
:root {
    --brand-red: #FF3300;
    --truck-green: #004d40;
    --deep-black: #080808;
    --concrete: #1a1a1a;
    --off-white: #f0f0f0;
}

/* --- Base Styles --- */
body {
    background-color: var(--deep-black);
    color: var(--off-white);
    font-family: 'Noto Sans KR', sans-serif;
    overflow: hidden;
    margin: 0;
    padding: 0;
    user-select: none;
    outline: none;
}

/* --- Typography --- */
.font-heavy {
    font-family: 'Black Han Sans', sans-serif;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.font-eng {
    font-family: 'Anton', sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.text-stroke {
    -webkit-text-stroke: 2px white;
    color: transparent;
}

/* --- Slide Layout --- */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    background-color: var(--deep-black);
    overflow: hidden;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

/* --- Overlay Effects --- */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.grid-bg {
    background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* --- Custom Components --- */
.tape-label {
    background-color: var(--brand-red);
    color: white;
    padding: 0.2rem 1rem;
    font-family: 'Anton', sans-serif;
    font-size: 1.2rem;
    transform: rotate(-2deg);
    display: inline-block;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.5);
    margin-bottom: 1.5rem;
}

.stamp-box {
    border: 4px solid var(--brand-red);
    color: var(--brand-red);
    padding: 0.5rem 1rem;
    font-family: 'Anton', sans-serif;
    font-size: 2rem;
    transform: rotate(-10deg);
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

.insta-card {
    background: white;
    color: black;
    padding: 20px;
    width: 300px;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transform: rotate(3deg);
    transition: transform 0.3s;
}

.insta-card:hover {
    transform: rotate(0deg) scale(1.05);
}

.pipeline-box {
    border: 2px solid white;
    padding: 2rem;
    background: rgba(255,255,255,0.05);
    transition: all 0.3s;
}

.pipeline-box:hover {
    border-color: var(--brand-red);
    background: rgba(255, 51, 0, 0.1);
}

/* --- Progress Bar --- */
.slide-progress {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    z-index: 100;
    pointer-events: none;
    background-color: rgba(255, 255, 255, 0.1);
}

.slide-progress-fill {
    height: 100%;
    width: 0%;
    background-color: var(--brand-red);
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Navigation Zones --- */
.nav-zone {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 15%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    cursor: pointer;
}

.nav-zone:hover {
    opacity: 1;
}

.nav-left {
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.8), transparent);
}

.nav-right {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.8), transparent);
}

.nav-icon {
    font-size: 3rem;
    color: white;
    opacity: 0.8;
    filter: drop-shadow(0 0 5px black);
}

/* --- Marquee Animations --- */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    margin-bottom: 1.5rem;
}

.marquee-content {
    display: inline-flex;
    animation: marquee 360s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Vertical Marquee --- */
.vertical-marquee-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: vertical-marquee 3s linear infinite;
}

@keyframes vertical-marquee {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

.mask-gradient-y {
    mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
}

/* --- Creator Name Loading Effect --- */
.creator-target {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-out, visibility 0s 0.6s;
}

.creator-target.loaded {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease-out, visibility 0s;
}

/* --- Creator & Brand Items --- */
.creator-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: 0 1rem;
    width: 80px;
}

.creator-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eee;
    margin-bottom: 0.5rem;
}

.creator-name {
    font-size: 0.75rem;
    font-weight: bold;
    color: #333;
    white-space: normal;
    text-align: center;
}

.brand-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 1.5rem;
    width: 120px;
    height: 60px;
    background: #f9f9f9;
    border-radius: 8px;
    padding: 0.5rem;
}

.brand-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s;
}

.brand-item:hover .brand-img {
    filter: grayscale(0%);
    opacity: 1;
}

/* --- Background Animation --- */
#bg-gif {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%) contrast(1.2);
    animation: streetVibe 4s infinite step-end;
}

@keyframes streetVibe {
    0% { background-image: url('https://images.unsplash.com/photo-1523396870176-f8140aa96859?q=80&w=1920'); }
    33% { background-image: url('https://images.unsplash.com/photo-1515886657613-9f3515b0c78f?q=80&w=1920'); }
    66% { background-image: url('https://images.unsplash.com/photo-1483985988355-763728e1935b?q=80&w=1920'); }
    100% { background-image: url('https://images.unsplash.com/photo-1523396870176-f8140aa96859?q=80&w=1920'); }
}

/* --- Modal Styles --- */
#coffee-modal {
    display: flex;
}

#coffee-modal.hidden {
    display: none;
}

/* --- Mobile Dots Navigation --- */
#mobile-dots {
    display: none;
}

@media (max-width: 768px) {
    #mobile-dots {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.mobile-dot {
    width: 6px !important;
    height: 6px !important;
    min-width: 6px;
    min-height: 6px;
    max-height: 6px;
    border-radius: 50% !important;
    background-color: rgba(255, 255, 255, 0.3) !important;
    border: none !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0;
    flex-shrink: 0;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.mobile-dot.active {
    width: 18px !important;
    min-width: 18px;
    height: 6px !important;
    border-radius: 3px !important;
    background-color: white !important;
}

/* ============================================
   Responsive Styles
   ============================================ */

/* --- Small Mobile (480px and below) --- */
@media (max-width: 480px) {
    .slide {
        padding: 3rem 1rem;
    }
    
    .font-heavy {
        letter-spacing: -0.01em;
    }
    
    .tape-label {
        font-size: 0.9rem;
        padding: 0.15rem 0.75rem;
    }
    
    .stamp-box {
        font-size: 1.2rem;
        padding: 0.3rem 0.6rem;
    }
    
    /* Marquee adjustments for small screens */
    .creator-item {
        width: 60px;
        margin: 0 0.5rem;
    }
    
    .creator-img {
        width: 48px;
        height: 48px;
    }
    
    .creator-name {
        font-size: 0.65rem;
    }
    
    .brand-item {
        width: 80px;
        height: 40px;
        margin: 0 0.75rem;
    }
    
    /* Pipeline box adjustments */
    .pipeline-box {
        padding: 1.25rem;
    }
}

/* --- Mobile (768px and below) --- */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .slide {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
        padding: 4rem 1rem;
        justify-content: center;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    /* Hide desktop navigation zones */
    .nav-zone {
        display: none;
    }
    
    .insta-card {
        width: 260px;
        transform: none !important;
        margin: 0 auto;
    }
    
    /* Progress bar repositioning */
    .slide-progress {
        width: 100%;
        height: 4px;
        bottom: 0;
        left: 0;
        border-radius: 0;
    }

    /* Chart adjustments */
    canvas {
        max-height: 180px;
    }
    
    /* Typography scaling */
    .text-stroke {
        -webkit-text-stroke: 1px white;
    }
    
    /* Marquee speed adjustment for mobile */
    .marquee-content {
        animation-duration: 180s;
    }
    
    .vertical-marquee-column {
        animation-duration: 2s;
    }
    
    /* Grid background adjustment */
    .grid-bg {
        background-size: 20px 20px;
    }
    
    /* Pipeline box for mobile */
    .pipeline-box {
        padding: 1.5rem;
    }
}

/* --- Tablet (1024px and below) --- */
@media (max-width: 1024px) {
    .nav-zone {
        width: 10%;
    }
    
    .nav-icon {
        font-size: 2rem;
    }
}

/* --- Touch device optimizations --- */
@media (hover: none) and (pointer: coarse) {
    .nav-zone {
        display: none;
    }
    
    /* Larger touch targets */
    button, 
    a, 
    .pipeline-box {
        min-height: 44px;
    }
    
    /* Disable hover effects that don't work on touch */
    .pipeline-box:hover {
        transform: none;
    }
}

/* --- Landscape mobile --- */
@media (max-height: 500px) and (orientation: landscape) {
    .slide {
        padding: 2rem 1rem;
        min-height: auto;
        height: auto;
    }
}

/* --- Safe area support for notched devices --- */
@supports (padding: max(0px)) {
    .slide {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
    
    .slide-progress {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* --- Reduced motion preference --- */
@media (prefers-reduced-motion: reduce) {
    .slide {
        transition: opacity 0.3s ease;
    }
    
    .marquee-content,
    .vertical-marquee-column {
        animation: none;
    }
}

/* ============================================
   Mobile Tap Navigation Overlays
   ============================================ */
.tap-overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 40%;
    z-index: 90;
    pointer-events: none;
    opacity: 0;
    transition: opacity 150ms ease-out;
}

.tap-overlay-left {
    left: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.15), transparent);
}

.tap-overlay-right {
    right: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.15), transparent);
}

.tap-overlay.active {
    opacity: 1;
}

/* Hide tap overlays on desktop */
@media (min-width: 769px) {
    .tap-overlay {
        display: none;
    }
}

/* Show tap overlays only on mobile/touch devices */
@media (max-width: 768px) {
    .tap-overlay {
        display: block;
    }
}


