/* ===================================================================
   TaskMe Landing Page — Premium Styles
   Inspired by Wix.com / Monday.com design language
   =================================================================== */

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --brand-400: #c084fc;
    --brand-500: #a855f7;
    --brand-600: #9333ea;
    --brand-700: #7e22ce;
    --indigo-500: #6366f1;
    --indigo-600: #4f46e5;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    background: #ffffff;
    color: #1a1a2e;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== ANIMATED GRADIENT MESH HERO ===== */
.hero-gradient {
    background: linear-gradient(-45deg, #1e0a3c, #3b1578, #6d28d9, #4f46e5, #2563eb, #7c3aed);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    25%  { background-position: 100% 50%; }
    50%  { background-position: 100% 0%; }
    75%  { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

/* Hero noise overlay for texture */
.hero-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
    z-index: 1;
}

/* Cursor glow */
.hero-cursor-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: left 0.3s ease-out, top 0.3s ease-out;
}

/* ===== NAVBAR ===== */
#navbar {
    background: rgba(255, 255, 255, 0);
    transition: all 0.4s var(--ease-out-expo);
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

#navbar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease, opacity 0.3s ease;
}

#navbar .nav-link:hover {
    color: #ffffff;
}

#navbar.scrolled .nav-link {
    color: #4b5563;
}

#navbar.scrolled .nav-link:hover {
    color: var(--brand-600);
}

#navbar #mobile-menu-btn { color: white; }
#navbar.scrolled #mobile-menu-btn { color: #374151; }

/* Login ghost button */
.nav-login {
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 9999px;
    padding: 6px 18px;
    transition: all 0.3s ease;
}

.nav-login:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

#navbar.scrolled .nav-login {
    border-color: #e5e7eb;
    color: #4b5563;
}

#navbar.scrolled .nav-login:hover {
    border-color: var(--brand-600);
    color: var(--brand-600);
    background: rgba(147, 51, 234, 0.04);
}

/* ===== BUTTON SHINE EFFECT ===== */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -75%;
    width: 50%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: skewX(-20deg);
    animation: shine 4s ease-in-out infinite;
}

@keyframes shine {
    0%   { left: -75%; }
    20%  { left: 125%; }
    100% { left: 125%; }
}

/* ===== TYPING CURSOR ===== */
.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: rgba(255, 255, 255, 0.8);
    margin-left: 4px;
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ===== HERO EMAIL INPUT ===== */
.hero-input-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    padding: 6px 6px 6px 24px;
    max-width: 480px;
    width: 100%;
    transition: all 0.3s ease;
}

.hero-input-group:focus-within {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.hero-input-group input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 15px;
    font-weight: 400;
    min-width: 0;
}

.hero-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.hero-input-group button {
    flex-shrink: 0;
    padding: 12px 28px;
    border-radius: 9999px;
    background: #ffffff;
    color: var(--brand-700);
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
}

.hero-input-group button:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* ===== INFINITE MARQUEE ===== */
.marquee-wrapper {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 64px;
    width: max-content;
    animation: marquee 30s linear infinite;
}

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

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

.marquee-logo {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #9ca3af;
    white-space: nowrap;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    user-select: none;
}

.marquee-logo:hover { opacity: 1; }

/* ===== COUNTERS ===== */
.counter-section {
    position: relative;
}

.counter-item {
    text-align: center;
}

.counter-value {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-600), var(--indigo-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

/* ===== GLASSMORPHISM CARDS ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    transition: all 0.4s var(--ease-out-expo);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-4px);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.04),
        0 20px 40px -4px rgba(139, 92, 246, 0.1);
}

/* Gradient border card */
.gradient-border-card {
    position: relative;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0), rgba(99, 102, 241, 0));
    transition: background 0.5s ease;
}

.gradient-border-card:hover {
    background: linear-gradient(135deg, var(--brand-500), var(--indigo-500));
}

.gradient-border-card > .card-inner {
    background: #ffffff;
    border-radius: 23px;
    height: 100%;
    transition: background 0.4s ease;
}

.gradient-border-card:hover > .card-inner {
    background: rgba(255, 255, 255, 0.97);
}

/* ===== FEATURE ICON BOX ===== */
.feature-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease;
}

.gradient-border-card:hover .feature-icon-box {
    transform: scale(1.1) rotate(-3deg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ===== HOW IT WORKS TIMELINE ===== */
.timeline-line {
    position: absolute;
    top: 40px;
    left: 16.67%;
    right: 16.67%;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.timeline-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--brand-600), var(--indigo-500));
    border-radius: 2px;
    transition: width 1.2s var(--ease-out-expo);
}

.step-badge {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    position: relative;
    z-index: 2;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.25);
}

/* ===== PERSPECTIVE MOCKUP ===== */
.perspective-mockup {
    perspective: 1200px;
}

.perspective-mockup .tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out;
    will-change: transform;
}

.mockup-glow {
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--brand-500), var(--indigo-500), var(--brand-400));
    z-index: -1;
    opacity: 0.4;
    filter: blur(20px);
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(1.02); }
}

/* ===== PRICING TOGGLE ===== */
.pricing-toggle {
    position: relative;
    width: 52px;
    height: 28px;
    background: #d1d5db;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.3s ease;
    border: none;
    padding: 0;
}

.pricing-toggle.active {
    background: var(--brand-600);
}

.pricing-toggle .toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s var(--ease-out-expo);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.pricing-toggle.active .toggle-knob {
    transform: translateX(24px);
}

/* Animated gradient border for popular card */
.pricing-popular {
    position: relative;
    border-radius: 28px;
    overflow: visible;
}

.pricing-popular::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 30px;
    background: conic-gradient(from 0deg, var(--brand-500), var(--indigo-500), var(--brand-400), var(--brand-500));
    z-index: -1;
    animation: rotateBorder 4s linear infinite;
}

@keyframes rotateBorder {
    0%   { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* ===== TESTIMONIAL CAROUSEL ===== */
.carousel-container {
    overflow: hidden;
    position: relative;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s var(--ease-out-expo);
}

.carousel-slide {
    min-width: 100%;
    padding: 0 16px;
}

@media (min-width: 768px) {
    .carousel-slide {
        min-width: 33.333%;
        padding: 0 12px;
    }
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot.active {
    background: var(--brand-600);
    width: 24px;
    border-radius: 4px;
}

/* ===== CTA EMAIL INPUT ===== */
.cta-input-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(16px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    padding: 6px 6px 6px 28px;
    max-width: 520px;
    width: 100%;
    transition: all 0.3s ease;
}

.cta-input-group:focus-within {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08);
}

.cta-input-group input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 15px;
    min-width: 0;
}

.cta-input-group input::placeholder { color: rgba(255, 255, 255, 0.5); }

.cta-input-group button {
    flex-shrink: 0;
    padding: 14px 32px;
    border-radius: 9999px;
    background: white;
    color: var(--brand-700);
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
}

.cta-input-group button:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

/* CTA glow pulse */
.cta-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.3) 0%, transparent 70%);
    animation: ctaPulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes ctaPulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50%      { transform: scale(1.15); opacity: 0.6; }
}

/* ===== FAQ ===== */
.faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    transition: all 0.3s var(--ease-out-expo);
    overflow: hidden;
}

.faq-item:hover {
    border-color: #d8b4fe;
}

.faq-item.active {
    border-color: var(--brand-600);
    background: linear-gradient(135deg, #faf5ff, #f5f3ff);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.08);
}

.faq-chevron {
    transition: transform 0.3s var(--ease-out-expo);
}

.faq-item.active .faq-chevron {
    transform: rotate(180deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s var(--ease-out-expo);
}

.faq-item.active .faq-content {
    max-height: 300px;
}

/* ===== SCROLL REVEAL ===== */
.fade-in {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.fade-in:nth-child(1)  { transition-delay: 0s; }
.fade-in:nth-child(2)  { transition-delay: 0.08s; }
.fade-in:nth-child(3)  { transition-delay: 0.16s; }
.fade-in:nth-child(4)  { transition-delay: 0.24s; }
.fade-in:nth-child(5)  { transition-delay: 0.32s; }
.fade-in:nth-child(6)  { transition-delay: 0.40s; }
.fade-in:nth-child(7)  { transition-delay: 0.48s; }
.fade-in:nth-child(8)  { transition-delay: 0.56s; }
.fade-in:nth-child(9)  { transition-delay: 0.64s; }

/* ===== FLOATING BLOBS ===== */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33%      { transform: translateY(-15px) rotate(2deg); }
    66%      { transform: translateY(-8px) rotate(-1deg); }
}

@keyframes floatAlt {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-20px) rotate(-3deg); }
}

.animate-float     { animation: float 8s ease-in-out infinite; }
.animate-float-alt { animation: floatAlt 10s ease-in-out infinite; animation-delay: 2s; }

/* ===== HERO ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-hero-1 { animation: fadeInUp 0.9s var(--ease-out-expo) 0.1s both; }
.animate-hero-2 { animation: fadeInUp 0.9s var(--ease-out-expo) 0.25s both; }
.animate-hero-3 { animation: fadeInUp 0.9s var(--ease-out-expo) 0.4s both; }
.animate-hero-4 { animation: fadeInUp 0.9s var(--ease-out-expo) 0.55s both; }
.animate-hero-5 { animation: fadeInUp 0.9s var(--ease-out-expo) 0.7s both; }

/* ===== SECTION DIVIDERS ===== */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e5e7eb 20%, #e5e7eb 80%, transparent);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--brand-400); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-600); }

/* ===== SELECTION ===== */
::selection {
    background: #e9d5ff;
    color: #581c87;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-input-group {
        flex-direction: column;
        border-radius: 20px;
        padding: 12px;
        gap: 8px;
    }

    .hero-input-group input {
        width: 100%;
        text-align: center;
        padding: 8px;
    }

    .hero-input-group button {
        width: 100%;
    }

    .cta-input-group {
        flex-direction: column;
        border-radius: 20px;
        padding: 12px;
        gap: 8px;
    }

    .cta-input-group input {
        width: 100%;
        text-align: center;
        padding: 8px;
    }

    .cta-input-group button {
        width: 100%;
    }

    .counter-value {
        font-size: 2rem;
    }

    .carousel-slide {
        min-width: 100%;
    }
}
