/* ==========================================================================
   CHONK — Coming Soon CSS Design System (High Fashion Horizontal Scroller)
   ========================================================================== */

/* --- Font Declarations --- */
@font-face {
    font-family: 'Aeonik';
    src: url('../fonts/Aeonik-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aeonik';
    src: url('../fonts/Aeonik-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aeonik';
    src: url('../fonts/Aeonik-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aeonik';
    src: url('../fonts/Aeonik-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* --- Design Tokens / Root Variables --- */
:root {
    --font-primary: 'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Premium Color Palette */
    --color-bg-base: #000000;
    --color-text-primary: #ffffff;
    --color-text-secondary: #e5e5ea;
    --color-text-muted: #8e8e93;
    --color-border-line: rgba(255, 255, 255, 0.18);
    
    /* Spacing & Kerning (High fashion aesthetic) */
    --ls-widest: 0.3em;
    --ls-wider: 0.2em;
    --ls-wide: 0.12em;
}

/* --- Base Resets & Global Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--color-bg-base);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    font-weight: 700; /* Bolder baseline for editorial typography */
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100dvh;
    width: 100%;
}

body {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    /* Default cursor for the rest of the page */
}

/* Ensure links and interactive icons retain pointer cursors */
a, button, .footer-icon-link {
    cursor: pointer;
}

/* --- Fullscreen Scrolling Background Marquee --- */
.scroller-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    z-index: 1; /* Render on top of body (z-index 0) to receive hover cursors directly */
    overflow-x: hidden;
    overflow-y: hidden;
    touch-action: none;
    white-space: nowrap;
    user-select: none;
    
    /* Align the scroller track to the bottom edge */
    display: flex;
    align-items: flex-end;
    background-color: #000000;
}

/* Hide scrollbars */
.scroller-wrapper::-webkit-scrollbar {
    display: none;
}
.scroller-wrapper {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scroller-track {
    display: inline-flex;
    height: 75vh; /* Increased from 65vh to reduce top empty space */
    align-items: flex-end; /* Touch the bottom of the page */
    gap: 24px; /* Space between vertical panels */
    padding: 0 12px;
    cursor: grab; /* Cursor hand indicator ONLY on the slider */
    
    /* Smooth entrance transition: starts translated down and fades in (GPU-optimized) */
    opacity: 0;
    transform: translateY(80px); /* Clear slide-up animation */
    transition: opacity 1.8s cubic-bezier(0.19, 1, 0.22, 1) 1.2s, 
                transform 1.8s cubic-bezier(0.19, 1, 0.22, 1) 1.2s;
    will-change: opacity, transform;
}

.is-loaded .scroller-track {
    opacity: 1;
    transform: translateY(0);
}

.scroller-item {
    height: 100%;
    width: auto;
    flex-shrink: 0;
    overflow: hidden; /* Clips the scaled and translated image for parallax */
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    will-change: transform;
    cursor: grab; /* Cursor hand indicator on individual slides */
}

/* Global grabbing cursor active while dragging */
.is-dragging, .is-dragging * {
    cursor: grabbing !important;
}

/* Smoothly scale down vertical panels when user is dragging */
.is-dragging .scroller-item {
    transform: scale(0.94);
}

.scroller-item img {
    height: 100%;
    width: auto;
    object-fit: cover;
    display: block;
    pointer-events: none;
    /* Scale up the image slightly more (1.30) to allow noticeable horizontal parallax translation */
    transform: scale(1.30) translate3d(0, 0, 0); 
    will-change: transform;
    filter: saturate(1.25) brightness(0.80); /* Photo color grade */
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    /* Very light overlay to preserve image brightness but protect readability */
    background: rgba(0, 0, 0, 0.12);
}

/* --- Main Layout Container (Full Bleed) --- */
.site-container {
    width: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 2; /* Render on top of scroller (z-index 1) */
    pointer-events: none; /* Let clicks pass through to drag the background */
    box-sizing: border-box;
}

/* Enable pointer events on interactive layout elements */
.header, .bottom-area, .header-icon-link {
    pointer-events: auto;
}

/* --- Header Section (Left-Aligned Logo, Right-Aligned Instagram) --- */
.header {
    display: flex;
    justify-content: space-between; /* Space logo to left, instagram to right */
    align-items: flex-start; /* Align logo and Instagram to the top */
    padding: 35px 40px 20px; /* Reduced top padding from 50px to 35px */
    width: 100%;
}

.logo-container {
    position: relative; /* Relative positioning for absolute blurred overlay */
    display: flex;
    align-items: center;
    width: fit-content; /* Sized exactly to logo bounds to constrain hover detection */
    justify-content: flex-start;
    opacity: 0; /* Start hidden for entrance animation */
}

.logo-wrapper {
    position: relative;
    width: fit-content;
    height: fit-content;
    display: block;
}

.brand-logo {
    width: 100%;
    max-width: 280px; /* Small, elegant logo left-aligned */
    height: auto;
    object-fit: contain;
}

.logo-sharp {
    filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.15));
}

.logo-blur-wrapper {
    position: absolute;
    top: -20px; /* Offset the 20px padding to align exactly with sharp logo */
    left: -20px;
    padding: 20px; /* Provides render margin so browser does not clip the mask-image */
    box-sizing: content-box;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Ignore pointer events so they fall through to sharp logo */
    opacity: 0;
    transition: opacity 0.35s ease;
    /* Mask coordinates shifted by 20px to match absolute offset */
    -webkit-mask-image: radial-gradient(circle 80px at calc(var(--mouse-x, 0px) + 20px) calc(var(--mouse-y, 0px) + 20px), rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    mask-image: radial-gradient(circle 80px at calc(var(--mouse-x, 0px) + 20px) calc(var(--mouse-y, 0px) + 20px), rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
}

.logo-blur {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    filter: blur(14px) drop-shadow(0 1px 6px rgba(0, 0, 0, 0.15)); /* High-intensity blur */
}

/* Reveal blurred logo near cursor on hover */
.logo-wrapper:hover .logo-blur-wrapper {
    opacity: 1;
}

/* --- Bottom Layout Area --- */
.bottom-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-top: auto;
}

/* Rows with horizontal padding */
.tagline-row, .info-row, .footer-row {
    padding-left: 40px;
    padding-right: 40px;
    width: 100%;
}

/* --- Tagline Row --- */
.tagline-row {
    margin-bottom: 18px; /* Tagline margin bottom */
}

.tagline-title {
    display: flex;
    flex-direction: column;
    font-size: clamp(48px, 4.5vw, 84px); /* Responsive typography matching the prototype */
    line-height: 0.95;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-primary);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); /* Reduced text shadow */
}

.tagline-title span {
    display: block;
    opacity: 0;
}

/* --- Divider Line (Full Bleed) --- */
.divider-line {
    height: 1px; /* Back to 1px thickness */
    background-color: #fff; /* Solid white color */
    margin-left: 40px; /* Aligns exactly with the side padding of the text */
    margin-right: 40px;
    opacity: 0; /* Start hidden for load animation */
}

/* --- Info Row (Collection Label & Countdown) --- */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px; /* Reduced vertical padding */
    padding-bottom: 10px;
    opacity: 0;
}

.tagline-sub {
    font-size: clamp(10px, 0.72vw, 13px); /* Proportional scaling */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--ls-widest);
    color: var(--color-text-primary);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); /* Reduced text shadow */
}

.countdown-timer {
    font-size: clamp(11px, 0.8vw, 15px); /* Minimal inline size matching tagline-sub weight */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em; /* Spaced out typography matching tagline-sub */
    color: var(--color-text-primary);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); /* Reduced text shadow */
    font-variant-numeric: tabular-nums;
}

.countdown-value {
    font-weight: 700;
}

.countdown-spacer {
    color: rgba(255, 255, 255, 0.4);
    margin: 0 4px;
    display: inline-block;
}

/* --- Footer Row --- */
.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px; /* Reduced vertical padding to 14px */
    padding-bottom: 40px;
    opacity: 0;
}

.footer-meta {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--ls-widest);
    color: var(--color-text-primary);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); /* Reduced text shadow */
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon-link {
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    opacity: 0; /* Start hidden for entrance animation */
    margin-top: 14px; /* Visually aligned with the CHONK portion of the logo */
}

.header-icon-link:hover {
    transform: translateY(-1px) scale(1.05);
}

.instagram-icon {
    display: block;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.15)); /* Reduced drop shadow */
}

/* --- Entrance Load Animations --- */
/* 1. Header (Logo & Icon Link) - 1.4s duration, 0s delay */
.animate-in .logo-container {
    animation: slideDownFade 1.4s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.animate-in .header-icon-link {
    animation: fadeIn 1.4s ease 0s forwards;
}

/* 2. Tagline Text (Accelerating delays and durations) */
.animate-in .tagline-title span {
    animation: slideUpFade cubic-bezier(0.19, 1, 0.22, 1) forwards;
}
.animate-in .tagline-title span:nth-child(1) {
    animation-delay: 0.20s;
    animation-duration: 1.2s;
}
.animate-in .tagline-title span:nth-child(2) {
    animation-delay: 0.35s;
    animation-duration: 1.1s;
}
.animate-in .tagline-title span:nth-child(3) {
    animation-delay: 0.47s;
    animation-duration: 1.0s;
}

/* 3. Divider Lines & Metadata Rows (Accelerating cascade delays and snappier durations) */
.animate-in .divider-line {
    animation: fadeIn ease forwards;
}
.animate-in .divider-1 {
    animation-delay: 0.56s;
    animation-duration: 0.9s;
}
.animate-in .divider-2 {
    animation-delay: 0.68s;
    animation-duration: 0.7s;
}

.animate-in .info-row {
    animation: slideUpFade 0.8s cubic-bezier(0.19, 1, 0.22, 1) 0.63s forwards;
}

.animate-in .footer-row {
    animation: fadeIn 0.6s ease 0.72s forwards;
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-25px) scale(1.01);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

@keyframes scaleLineX {
    from {
        transform: scaleX(0);
        opacity: 0;
    }
    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

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

/* --- Responsive Media Queries --- */

/* Medium Screens (Tablet & smaller Desktop) */
@media (max-width: 1024px) {
    .tagline-row, .info-row, .footer-row {
        padding-left: 30px;
        padding-right: 30px;
    }
    
    .tagline-title {
        font-size: clamp(40px, 5vw, 56px);
    }
    
    .countdown-timer {
        font-size: clamp(12px, 1.1vw, 15px);
        letter-spacing: 0.2em;
    }
}

/* Mobile Layout (Exactly matching high fidelity mobile prototype) */
@media (max-width: 768px) {
    .scroller-track {
        height: 72dvh; /* Taller scroller track to make background images fill more vertical space */
        gap: 16px; /* Tighter gap on mobile */
        align-items: flex-end; /* Touch the bottom of the page */
    }

    .header {
        padding: calc(20px + env(safe-area-inset-top, 0px)) 24px 10px;
    }
    
    .brand-logo {
        width: 100%;
        max-width: 180px; /* Smaller, elegant logo matching desktop ratio */
    }
    
    .header-icon-link {
        margin-top: 7px; /* Visually aligned with smaller mobile CHONK logo */
    }
    

    
    .tagline-row, .info-row, .footer-row {
        padding-left: 24px;
        padding-right: 24px;
    }
    
    .divider-line {
        margin-left: 24px; /* Align dividers with mobile side padding */
        margin-right: 24px;
    }
    
    .tagline-row {
        margin-bottom: 18px;
    }

    .tagline-title {
        font-size: clamp(32px, 8.5vw, 44px); /* Perfectly fills width like prototype */
        letter-spacing: 0.04em;
    }
    
    /* Info Row Stacks on Mobile */
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px; /* Tight vertical gap as requested */
        padding-top: 10px; /* Reduced vertical padding on mobile */
        padding-bottom: 10px;
    }
    
    .countdown-timer {
        font-size: 11px; /* Elegant, small inline count down */
        letter-spacing: 0.22em; /* tracked countdown numbers */
    }
    
    .footer-row {
        padding-top: 10px;
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); /* Safe area inset for mobile search/address bar */
    }
    
    .copyright-year {
        display: none; /* Remove "2026. " on mobile */
    }
}
