:root {
    /* Fonts */
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* ViewCreator-inspired Dark Theme Palette */
    --bg-dark: #0a0a0a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-hover: rgba(255, 255, 255, 0.15);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    /* Brand Accents (Vibrant Neon) */
    --accent-gym: #ef4444;    /* Red-500 */
    --accent-food: #f97316;   /* Orange-500 */
    --accent-grocery: #22c55e; /* Green-500 */
    --accent-habit: #3b82f6;  /* Blue-500 */
    --accent-primary: #8b5cf6; /* Violet-500 (Core Brand) */

    /* Gradients */
    --gradient-gym: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    --gradient-food: linear-gradient(135deg, #f97316 0%, #c2410c 100%);
    --gradient-grocery: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
    --gradient-habit: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --gradient-main: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    --gradient-text: linear-gradient(to right, #ffffff 0%, #a1a1aa 100%);

    /* Shadows & Glows */
    --glow-subtle: 0 0 40px -10px rgba(139, 92, 246, 0.15);
    --glow-card: 0 0 0 1px var(--border-glass), 0 4px 20px -2px rgba(0, 0, 0, 0.5);
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

/* Utilities */
.text-gradient {
    background: linear-gradient(to right, #fff, #9ca3af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gym { color: var(--accent-gym); }
.text-food { color: var(--accent-food); }
.text-grocery { color: var(--accent-grocery); }
.text-habit { color: var(--accent-habit); }

/* Glassmorphism Card */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glass-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
}

/* Floating Navbar */
.nav-floating {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.nav-floating.scrolled {
    background: rgba(10, 10, 10, 0.85);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: clamp(1.5rem, 4vw, 5rem);
    align-items: center;
}

.nav-link-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}

.nav-link-item:hover {
    color: white;
}

.btn-nav-cta {
    background: white;
    color: black;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: transform 0.2s;
    white-space: nowrap;
}

.btn-nav-cta:hover {
    transform: scale(1.05);
}

/* Hero Section */
.hero-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 100px; /* Offset for navbar */
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139,92,246,0.15) 0%, rgba(10,10,10,0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 1;
    padding: 0 1.5rem;
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: 100px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}

.hero-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-primary-glow {
    background: var(--gradient-main);
    color: white;
    padding: 0.85rem 2rem;
    border-radius: 100px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 0 20px -5px rgba(139, 92, 246, 0.5);
    transition: all 0.2s;
}

.btn-primary-glow:hover {
    box-shadow: 0 0 30px -5px rgba(139, 92, 246, 0.7);
    transform: translateY(-2px);
    color: white;
}

.btn-secondary-outline {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: white;
    padding: 0.85rem 2rem;
    border-radius: 100px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-secondary-outline:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glass-hover);
    color: white;
}

/* Orbit Animation Container */
.orbit-container {
    position: relative;
    width: 380px;
    height: 380px;
    margin: 3rem auto 0;
    /* perspective: 1000px; */ /* Removed perspective for flat 2D orbit look */
}

.orbit-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--gradient-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 0 50px -10px rgba(139, 92, 246, 0.6);
    z-index: 10;
}

.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 260px;
    height: 260px;
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 50%;
    animation: spin 20s linear infinite;
}

.orbit-ring:hover {
    animation-play-state: paused;
}

.orbit-item {
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--bg-dark);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    /* Counter-rotate to keep icons upright */
    animation: spin-reverse 20s linear infinite;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
    text-decoration: none; /* Ensure link underline is removed */
}

.orbit-ring:hover .orbit-item {
    animation-play-state: paused;
}

.orbit-item:hover {
    /* transform: scale(1.15); Removed to prevent overriding rotation */
    box-shadow: 0 8px 25px rgba(0,0,0,0.7);
    z-index: 20;
    border-color: white;
}

.orbit-item:hover i {
    transform: scale(1.2); /* Scale icon instead */
}

/* Positioning orbit items on the ring */
.orbit-item:nth-child(1) { top: -25px; left: 50%; margin-left: -25px; color: var(--accent-gym); border-color: rgba(239,68,68,0.3); }
.orbit-item:nth-child(2) { bottom: -25px; left: 50%; margin-left: -25px; color: var(--accent-habit); border-color: rgba(59,130,246,0.3); }
.orbit-item:nth-child(3) { left: -25px; top: 50%; margin-top: -25px; color: var(--accent-grocery); border-color: rgba(34,197,94,0.3); }
.orbit-item:nth-child(4) { right: -25px; top: 50%; margin-top: -25px; color: var(--accent-food); border-color: rgba(249,115,22,0.3); }

@keyframes spin { 100% { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes spin-reverse { 100% { transform: rotate(-360deg); } }

/* Bento Grid Section */
.bento-section {
    padding: 8rem 0;
    background: var(--bg-dark);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
}

.section-label {
    color: var(--accent-primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    display: block;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.bento-card {
    height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    text-decoration: none;
    color: white;
}

.bento-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: rgba(255,255,255,0.05);
}

.bento-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.bento-card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.bento-visual {
    height: 120px;
    margin-top: auto;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    /* Visual Placeholder styling */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    border: 1px dashed var(--border-glass);
}

/* Feature Deep Dives */
.feature-section {
    padding: 8rem 0;
    position: relative;
}

.feature-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
    padding: 0 1.5rem;
}

.feature-content {
    flex: 1;
}

.feature-visual {
    flex: 1;
    perspective: 1000px;
}

.mockup-card {
    background: #1a1a1a;
    border-radius: 16px;
    border: 1px solid var(--border-glass);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    overflow: hidden;
    /* Removed 3D rotation transform for flatter, cleaner look */
    transform: none !important;
    transition: transform 0.5s ease;
}

.feature-section:hover .mockup-card {
    transform: translateY(-5px) !important; /* Simple lift on hover, overriding any inline rotation */
}

.feature-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Unified Ecosystem Diagram */
.ecosystem-section {
    padding: 8rem 0;
    background: linear-gradient(to bottom, var(--bg-dark), #0f0f11);
    text-align: center;
}

.diagram-container {
    max-width: 800px;
    margin: 4rem auto 0;
    position: relative;
    height: 400px;
}

.diagram-node {
    position: absolute;
    padding: 1rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    z-index: 2;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.diagram-node:not(.diagram-center):hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
    background: var(--bg-card-hover);
    border-color: white !important;
}

.diagram-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px -5px rgba(139, 92, 246, 0.3);
}

.diagram-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--border-glass-hover), transparent);
    z-index: 1;
}

/* Footer */
.footer-modern {
    border-top: 1px solid var(--border-glass);
    padding: 4rem 0;
    background: #050505;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-brand h4 {
    margin-bottom: 1rem;
}

.footer-col h5 {
    font-size: 0.9rem;
    color: white;
    margin-bottom: 1.5rem;
}

.footer-link {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-link:hover {
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-container {
        flex-direction: column;
        gap: 2rem;
    }

    .feature-container.reverse {
        flex-direction: column-reverse;
    }

    .mockup-card {
        transform: none !important;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .orbit-container {
        transform: scale(0.8);
    }

    .feature-visual {
        width: 100%;
    }
}

/* --- Animated Mockup Visuals --- */

/* 1. GymTracker: Live Workout */
.visual-gym-container {
    width: 100%;
    height: 350px;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
    font-family: 'Inter', sans-serif;
}

.gym-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid var(--border-glass);
    color: white;
}

.gym-rep-box {
    width: 60px;
    height: 40px;
    background: #2a2a2a;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.gym-progress-bar {
    height: 6px;
    background: #333;
    border-radius: 3px;
    margin-top: 20px;
    overflow: hidden;
    position: relative;
}

.gym-progress-fill {
    height: 100%;
    background: var(--accent-gym);
    width: 0%;
    animation: gymFill 3s ease-in-out infinite;
}

.gym-check-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #444;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gym);
    opacity: 0;
    transform: scale(0.5);
    animation: gymCheck 3s ease-in-out infinite;
}

.gym-pr-badge {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: var(--accent-gym);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 800;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
    opacity: 0;
    animation: gymPrPop 3s ease-in-out infinite;
}

@keyframes gymFill {
    0% { width: 0%; }
    40% { width: 100%; }
    100% { width: 100%; }
}

@keyframes gymCheck {
    0%, 35% { opacity: 0; transform: scale(0.5); border-color: #444; background: transparent; }
    40% { opacity: 1; transform: scale(1.2); border-color: var(--accent-gym); background: rgba(239,68,68,0.2); }
    50% { transform: scale(1); }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes gymPrPop {
    0%, 50% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    60% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    70% { transform: translate(-50%, -50%) scale(1); }
    90% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
}


/* 2. CalorieTracker: Smart Scan */
.visual-scan-container {
    width: 100%;
    height: 350px;
    background: #1a1a1a;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scan-group {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: itemCycle 15s linear infinite;
}

.item-1 { animation-delay: 0s; }
.item-2 { animation-delay: 3s; }
.item-3 { animation-delay: 6s; }
.item-4 { animation-delay: 9s; }
.item-5 { animation-delay: 12s; }

.scan-target {
    font-size: 5rem;
    color: #444;
    position: relative;
    z-index: 1;
}

.scan-laser {
    position: absolute;
    width: 80%;
    height: 2px;
    background: var(--accent-food);
    box-shadow: 0 0 15px var(--accent-food);
    top: 20%;
    left: 10%;
    animation: scanMove 3s linear infinite;
    z-index: 2;
    opacity: 0.8;
}

.scan-card {
    position: absolute;
    right: -200px;
    top: 50%;
    transform: translateY(-50%);
    width: 140px;
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent-food);
    border-radius: 12px;
    padding: 15px;
    z-index: 3;
    animation: scanCardSlide 3s ease-in-out infinite;
}

.scan-macro-bar {
    height: 4px;
    background: #333;
    border-radius: 2px;
    margin-bottom: 8px;
    position: relative;
}

.scan-macro-fill {
    height: 100%;
    background: var(--accent-food);
    border-radius: 2px;
}

@keyframes scanMove {
    0% { top: 20%; opacity: 0; }
    10% { opacity: 1; }
    50% { top: 80%; }
    90% { opacity: 1; }
    100% { top: 20%; opacity: 0; }
}

@keyframes scanCardSlide {
    0%, 40% { right: -200px; opacity: 0; }
    50% { right: 30px; opacity: 1; }
    90% { right: 30px; opacity: 1; }
    100% { right: -200px; opacity: 0; }
}

@keyframes itemCycle {
    0% { opacity: 0; pointer-events: none; }
    5% { opacity: 1; pointer-events: auto; }
    20% { opacity: 1; pointer-events: auto; }
    25% { opacity: 0; pointer-events: none; }
    100% { opacity: 0; pointer-events: none; }
}

/* 3. GroceryTracker: Syncing List */
.visual-grocery-container {
    width: 100%;
    height: 350px;
    background: #1a1a1a;
    display: flex;
    gap: 20px;
    padding: 20px;
    justify-content: center;
    align-items: center;
}

.grocery-phone {
    width: 140px;
    height: 240px;
    border: 2px solid #444;
    border-radius: 16px;
    background: #222;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.grocery-item {
    height: 20px;
    background: #333;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 5px;
}

.grocery-checkbox {
    width: 12px;
    height: 12px;
    border: 1px solid #666;
    border-radius: 3px;
    margin-right: 5px;
}

/* Phone 1 (User A) Animation */
.phone-1 .grocery-item:nth-child(2) .grocery-checkbox {
    animation: groceryCheck 3s steps(1) infinite;
}
.phone-1 .grocery-item:nth-child(2) {
    animation: groceryFade 3s ease infinite;
}

/* Phone 2 (User B) Animation */
.phone-2 .grocery-item:nth-child(2) .grocery-checkbox {
    animation: groceryCheck 3s steps(1) infinite 0.2s; /* Slight delay */
}
.phone-2 .grocery-item:nth-child(2) {
    animation: groceryFade 3s ease infinite 0.2s;
}

.grocery-sync-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--accent-grocery);
    color: black;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    opacity: 0;
    animation: grocerySyncPop 3s ease infinite;
    z-index: 10;
}

@keyframes groceryCheck {
    0%, 20% { background: transparent; border-color: #666; }
    21%, 100% { background: var(--accent-grocery); border-color: var(--accent-grocery); }
}

@keyframes groceryFade {
    0%, 25% { opacity: 1; }
    30%, 100% { opacity: 0.4; text-decoration: line-through; }
}

@keyframes grocerySyncPop {
    0%, 25% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    30% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    40% { transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}


/* 4. HabitTracker: Streak Builder */
.visual-habit-container {
    width: 100%;
    height: 350px;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.habit-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.habit-day {
    width: 30px;
    height: 30px;
    background: #333;
    border-radius: 6px;
    transition: background 0.3s;
}

.habit-day.filled {
    background: var(--accent-habit);
    opacity: 0.5;
}

.habit-day.active-anim {
    animation: habitIgnite 3s ease infinite;
}

.habit-streak-badge {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(10px);
    animation: habitBadgeSlide 3s ease infinite;
}

.fire-icon {
    color: #f59e0b; /* Orange fire */
    font-size: 2rem;
    filter: drop-shadow(0 0 10px #f59e0b);
    animation: fireFlicker 0.5s infinite alternate;
}

@keyframes habitIgnite {
    0%, 30% { background: #333; transform: scale(1); }
    35% { transform: scale(0.9); }
    40% { background: var(--accent-habit); box-shadow: 0 0 15px var(--accent-habit); transform: scale(1.1); }
    50% { transform: scale(1); }
    100% { background: var(--accent-habit); }
}

@keyframes habitBadgeSlide {
    0%, 40% { opacity: 0; transform: translateY(20px); }
    50% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

@keyframes fireFlicker {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.1); opacity: 0.8; }
}
