/* ==========================================================================
   Presentation Page — Apple-style immersive parallax experience
   Lokris edition — Light Theme
   ========================================================================== */

/* --- Global: smooth scroll + hide overflow artifacts --- */
html:has(.discover-page) {
    scroll-behavior: smooth;
}

.discover-page {
    overflow-x: clip;
}

/* --- Progress bar (fixed top, gradient animated) --- */
.discover-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #FDC237, #5eb9f0, #f97316, #FDC237);
    background-size: 300% 100%;
    animation: progress-gradient 3s linear infinite;
    transform-origin: left center;
    transform: scaleX(0);
    z-index: 100;
}

@keyframes progress-gradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* --- Floating side navigation --- */
.discover-nav {
    position: fixed;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: auto;
}

.discover-nav-separator {
    width: 12px;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0.25rem 0;
}

.discover-nav-dot {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: none;
    border: none;
    padding: 0.25rem;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.discover-nav-dot .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.15);
    background: transparent;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    position: relative;
}

.discover-nav-dot .label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(52, 63, 82, 0.4);
    white-space: nowrap;
    opacity: 1;
    transform: translateX(0);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.discover-nav-dot:hover .label {
    color: rgba(52, 63, 82, 0.7);
}

.discover-nav-dot:hover .dot {
    border-color: rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.2);
}

.discover-nav-dot.discover-nav-active .dot {
    border-color: #FDC237;
    background: #FDC237;
    box-shadow: 0 0 20px rgba(253, 194, 55, 0.4), 0 0 40px rgba(253, 194, 55, 0.15);
    transform: scale(1.3);
}

.discover-nav-dot.discover-nav-active .label {
    opacity: 1;
    transform: translateX(0);
    color: #FDC237;
}

/* --- Glow orbs (decorative background elements) --- */
.discover-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
}

/* --- HERO SECTION — Full-screen immersive --- */
.discover-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Logo: starts scaled 3x + blurred, then resolves */
.discover-hero-logo {
    animation: hero-logo-pop 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes hero-logo-pop {
    0% {
        opacity: 0;
        transform: scale(3);
        filter: blur(40px);
    }
    40% {
        opacity: 1;
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

.discover-hero-tagline {
    animation: hero-text-reveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.8s both;
}

.discover-hero-subtitle {
    animation: hero-text-reveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) 1.3s both;
}

.discover-hero-scroll {
    animation: hero-text-reveal 1s ease-out 2s both, hero-float 2.5s ease-in-out 3s infinite;
}

@keyframes hero-text-reveal {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.95);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes hero-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(12px); }
}

/* Subtle warm gradient background for hero */
.discover-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 50% 50%, rgba(253, 194, 55, 0.04) 0%, transparent 70%);
}

/* Grid pattern overlay */
.discover-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black, transparent);
}

/* --- FULL-SCREEN SECTIONS --- */
.discover-fullscreen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* --- SCROLL-DRIVEN REVEAL SYSTEM --- */
/* Elements start invisible/transformed and animate in via JS */
[data-discover] {
    will-change: transform, opacity, filter;
}

[data-discover="zoom-in"] {
    opacity: 0;
    transform: scale(0.3);
    filter: blur(30px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-discover="zoom-in"].in-view {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

[data-discover="zoom-out"] {
    opacity: 0;
    transform: scale(2.5);
    filter: blur(20px);
    transition: all 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-discover="zoom-out"].in-view {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

[data-discover="fade-up"] {
    opacity: 0;
    transform: translateY(100px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-discover="fade-up"].in-view {
    opacity: 1;
    transform: translateY(0);
}

[data-discover="fade-left"] {
    opacity: 0;
    transform: translateX(150px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-discover="fade-left"].in-view {
    opacity: 1;
    transform: translateX(0);
}

[data-discover="fade-right"] {
    opacity: 0;
    transform: translateX(-150px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-discover="fade-right"].in-view {
    opacity: 1;
    transform: translateX(0);
}

[data-discover="pop"] {
    opacity: 0;
    transform: scale(0) rotate(-10deg);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-discover="pop"].in-view {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

[data-discover="clip-up"] {
    clip-path: inset(100% 0 0 0);
    transition: clip-path 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-discover="clip-up"].in-view {
    clip-path: inset(0 0 0 0);
}

/* Stagger delays for children */
[data-discover-delay="1"] { transition-delay: 0.1s !important; }
[data-discover-delay="2"] { transition-delay: 0.2s !important; }
[data-discover-delay="3"] { transition-delay: 0.3s !important; }
[data-discover-delay="4"] { transition-delay: 0.4s !important; }
[data-discover-delay="5"] { transition-delay: 0.5s !important; }
[data-discover-delay="6"] { transition-delay: 0.6s !important; }
[data-discover-delay="7"] { transition-delay: 0.7s !important; }
[data-discover-delay="8"] { transition-delay: 0.8s !important; }

/* --- STICKY PIN SECTION (text stays, visuals scroll) --- */
.discover-pin-wrapper {
    position: relative;
}

.discover-pin-text {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    z-index: 2;
}

/* --- BROWSER FRAME — Cinematic zoom-in --- */
.discover-browser {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow:
        0 50px 100px -20px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 0 80px -20px rgba(253, 194, 55, 0.08);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.discover-browser:hover {
    box-shadow:
        0 60px 120px -20px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(253, 194, 55, 0.2),
        0 0 120px -20px rgba(253, 194, 55, 0.12);
    transform: translateY(-8px) scale(1.01);
}

.discover-browser-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.discover-browser-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.discover-browser-dot:nth-child(1) { background: #FF5F57; }
.discover-browser-dot:nth-child(2) { background: #FEBC2E; }
.discover-browser-dot:nth-child(3) { background: #28C840; }

/* --- GLASS CARDS --- */
.discover-glass {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 1.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.discover-glass:hover {
    background: white;
    border-color: rgba(253, 194, 55, 0.4);
    box-shadow: 0 12px 40px rgba(253, 194, 55, 0.15);
    transform: translateY(-6px);
}

/* --- FLOATING BADGE --- */
.discover-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* --- GRADIENT TEXT UTILITY --- */
.discover-gradient-text {
    color: #FDC237;
}

/* --- PARALLAX LAYERS (moved by JS based on scroll) --- */
.discover-parallax-layer {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* --- FEATURE RING (circular layout for module features) --- */
.discover-feature-ring {
    position: relative;
    width: 400px;
    height: 400px;
}

.discover-feature-ring-item {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.discover-feature-ring-item:hover {
    transform: scale(1.2);
    background: rgba(253, 194, 55, 0.08);
    border-color: rgba(253, 194, 55, 0.3);
    box-shadow: 0 8px 30px rgba(253, 194, 55, 0.15);
}

/* --- ANIMATED COUNTER --- */
.discover-counter {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* --- SECTION DIVIDER --- */
.discover-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.08) 50%, transparent 100%);
}

/* --- TEXTURE OVERLAYS — dot grid & cross-hatch for depth --- */
.discover-texture-dots {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, black 20%, transparent 80%);
    z-index: 0;
}

.discover-texture-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, transparent 0%, black 30%, black 70%, transparent 100%);
    z-index: 0;
}

.discover-texture-diagonal {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 20px,
        rgba(0, 0, 0, 0.015) 20px,
        rgba(0, 0, 0, 0.015) 21px
    );
    mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 70%);
    z-index: 0;
}

/* --- MINI SCREENSHOT — small inline browser preview --- */
.discover-mini-browser {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow:
        0 20px 50px -15px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.04);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.discover-mini-browser:hover {
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow:
        0 25px 60px -15px rgba(0, 0, 0, 0.12),
        0 0 60px -20px rgba(253, 194, 55, 0.1);
    transform: translateY(-4px) scale(1.02);
}

.discover-mini-browser-bar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.discover-mini-browser-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.discover-mini-browser-dot:nth-child(1) { background: #FF5F57; }
.discover-mini-browser-dot:nth-child(2) { background: #FEBC2E; }
.discover-mini-browser-dot:nth-child(3) { background: #28C840; }

/* --- RESPONSIVE --- */

/* Give content space for the nav sidebar */
.discover-page {
    padding-left: 160px;
}

/* Mid-res: smaller nav, less padding needed */
@media (max-width: 1280px) {
    .discover-page {
        padding-left: 120px;
    }

    .discover-nav-dot .label {
        font-size: 0.55rem;
    }
}

/* Small screens: hide nav, remove padding */
@media (max-width: 768px) {
    .discover-page {
        padding-left: 0;
    }
}

/* Small: hide nav entirely */
@media (max-width: 640px) {
    .discover-nav {
        display: none;
    }
}

/* --- PREFERS REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    [data-discover] {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        clip-path: none !important;
    }
}
