/* MeroProject Stylesheet */

/* ==========================================
   1. Design Tokens & Variables
   ========================================== */
:root {
    /* Color Palette - Dark Mode (Default) */
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --bg-tertiary: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --accent-start: #6366f1; /* Indigo */
    --accent-end: #a855f7;   /* Purple */
    --accent-glow: rgba(99, 102, 241, 0.15);
    --accent-teal: #14b8a6;
    
    --glass-bg: rgba(17, 24, 39, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.18);
    
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
    --glow-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
    
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

body.light-mode {
    /* Color Palette - Light Mode Override */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --accent-start: #4f46e5;
    --accent-end: #9333ea;
    --accent-glow: rgba(79, 70, 229, 0.1);
    
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(0, 0, 0, 0.06);
    --glass-border-hover: rgba(0, 0, 0, 0.12);
    
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    --glow-shadow: 0 0 25px rgba(79, 70, 229, 0.2);
}

/* ==========================================
   2. Reset & Global Styles
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ==========================================
   3. Animated Background Spheres
   ========================================== */
#hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.glow-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(130px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.45;
    mix-blend-mode: screen;
}

body.light-mode .glow-sphere {
    opacity: 0.15;
    mix-blend-mode: multiply;
}

.sphere-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--accent-start) 0%, rgba(99, 102, 241, 0) 70%);
    top: -100px;
    right: -100px;
    animation: float-sphere-1 20s infinite alternate ease-in-out;
}

.sphere-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-end) 0%, rgba(168, 85, 247, 0) 70%);
    top: 400px;
    left: -150px;
    animation: float-sphere-2 25s infinite alternate ease-in-out;
}

@keyframes float-sphere-1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-100px, 150px) scale(1.2); }
}

@keyframes float-sphere-2 {
    0% { transform: translate(0, 0) scale(1.1); }
    100% { transform: translate(120px, -100px) scale(0.9); }
}

/* ==========================================
   4. Header & Navigation
   ========================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 100;
    transition: var(--transition-smooth);
    border-bottom: 1px solid transparent;
}

.site-header.scrolled {
    background-color: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    height: 70px;
}

.header-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.logo-text {
    color: var(--text-primary);
}

.logo-text span {
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    animation: rotate-logo 15s linear infinite;
}

@keyframes rotate-logo {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
    transition: var(--transition-fast);
}

.nav-link:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Theme Toggle Button */
.theme-btn {
    background: none;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.theme-btn:hover {
    border-color: var(--glass-border-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sun-icon { display: none; width: 20px; height: 20px; }
.moon-icon { display: block; width: 20px; height: 20px; }

body.light-mode .sun-icon { display: block; }
body.light-mode .moon-icon { display: none; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
}

.btn-glow {
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    color: #ffffff;
    position: relative;
    z-index: 1;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    border-radius: 12px;
    z-index: -1;
    filter: blur(8px);
    opacity: 0.6;
    transition: var(--transition-smooth);
}

.btn-glow:hover {
    transform: translateY(-2px);
}

.btn-glow:hover::before {
    filter: blur(14px);
    opacity: 0.9;
}

/* ==========================================
   5. Hero Section
   ========================================== */
.hero-section {
    padding: 160px 0 100px 0;
    position: relative;
    z-index: 10;
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.badge-container {
    margin-bottom: 1.5rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

body.light-mode .badge {
    background: rgba(79, 70, 229, 0.08);
    color: var(--accent-start);
}

.badge-pulse {
    width: 8px;
    height: 8px;
    background-color: var(--accent-teal);
    border-radius: 50%;
    position: relative;
}

.badge-pulse::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--accent-teal);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

.hero-greeting {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.hero-greeting::after {
    content: '|';
    animation: blink 0.8s infinite;
    color: var(--accent-start);
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-title {
    font-size: 4rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    max-width: 800px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1.25rem;
}

/* ==========================================
   6. Features Section
   ========================================== */
.features-section {
    padding: 100px 0;
    position: relative;
    z-index: 10;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

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

.section-subtitle {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--glass-border-hover);
    box-shadow: var(--glow-shadow);
}

.feature-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.75rem;
    color: var(--accent-start);
    transition: var(--transition-smooth);
}

.feature-card:hover .feature-icon-wrapper {
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    color: #ffffff;
    transform: rotate(5deg) scale(1.05);
}

.feature-icon {
    width: 28px;
    height: 28px;
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* ==========================================
   7. Showcase Mockup Section
   ========================================== */
.showcase-section {
    padding: 80px 0;
    position: relative;
    z-index: 10;
}

.showcase-card-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--card-shadow), 0 30px 60px rgba(0,0,0,0.4);
    backdrop-filter: blur(20px);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.showcase-card-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.window-controls {
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.close { background-color: #ff5f56; }
.minimize { background-color: #ffbd2e; }
.expand { background-color: #27c93f; }

.window-title {
    margin-left: 2rem;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.showcase-card-body {
    display: flex;
    min-height: 400px;
}

.showcase-sidebar {
    width: 200px;
    border-right: 1px solid var(--glass-border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-item {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sidebar-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-start);
    font-weight: 500;
}

.sidebar-dot {
    width: 6px;
    height: 6px;
    background-color: currentColor;
    border-radius: 50%;
}

.showcase-content {
    flex: 1;
    padding: 2rem;
}

.showcase-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.showcase-content-header h3 {
    font-size: 1.5rem;
}

.status-indicator {
    background-color: rgba(20, 184, 166, 0.15);
    color: var(--accent-teal);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
}

.dummy-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.dummy-column {
    background: rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

body.light-mode .dummy-column {
    background: rgba(0,0,0,0.03);
}

.dummy-column h4 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dummy-task {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.85rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.dummy-task.active-task {
    border-left: 3px solid var(--accent-start);
}

.dummy-task.completed-task {
    text-decoration: line-through;
    color: var(--text-muted);
    opacity: 0.7;
}

/* ==========================================
   8. Interactive Planner Section
   ========================================== */
.planner-section {
    padding: 100px 0;
    position: relative;
    z-index: 10;
}

.planner-app {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(15px);
    padding: 2.5rem;
}

.planner-input-area {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.planner-input-area input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-primary);
    outline: none;
    transition: var(--transition-fast);
}

.planner-input-area input:focus {
    border-color: var(--accent-start);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.planner-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.planner-column {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
}

body.light-mode .planner-column {
    background: rgba(0, 0, 0, 0.02);
}

.planner-column:hover {
    border-color: var(--glass-border);
    background: rgba(0, 0, 0, 0.15);
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.column-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

.task-count {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.task-list {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.task-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    transition: var(--transition-smooth);
    position: relative;
    cursor: grab;
    overflow: hidden;
}

.task-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2);
    border-color: var(--glass-border-hover);
}

.task-card:active {
    cursor: grabbing;
}

.task-card-content {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    word-break: break-word;
}

.task-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-card-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.task-btn-group {
    display: flex;
    gap: 0.5rem;
}

.task-btn {
    background: none;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.task-btn:hover {
    color: var(--text-primary);
    border-color: var(--glass-border-hover);
}

.task-btn.btn-delete:hover {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.05);
}

/* Status specific layouts */
#col-todo .task-card { border-left: 3px solid var(--accent-start); }
#col-progress .task-card { border-left: 3px solid var(--accent-end); }
#col-completed .task-card { 
    border-left: 3px solid var(--accent-teal); 
    opacity: 0.75;
}
#col-completed .task-card-content {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Empty task list state helper */
.empty-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    height: 100px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    pointer-events: none;
}

/* ==========================================
   9. Footer
   ========================================== */
.site-footer {
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid var(--glass-border);
    padding: 5rem 0 2rem 0;
    position: relative;
    z-index: 10;
}

body.light-mode .site-footer {
    background: var(--bg-tertiary);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand {
    max-width: 350px;
}

.footer-brand .logo-container {
    margin-bottom: 1.25rem;
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 5rem;
}

.link-group h4 {
    font-size: 1rem;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.link-group ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.link-group a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.link-group a:hover {
    color: var(--text-primary);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
}

.footer-bottom-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-meta-links {
    display: flex;
    gap: 1.5rem;
}

.footer-meta-links a:hover {
    color: var(--text-secondary);
}

/* ==========================================
   10. Responsive Media Queries
   ========================================== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3.25rem;
    }
    .showcase-card-body {
        flex-direction: column;
    }
    .showcase-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        flex-direction: row;
        overflow-x: auto;
        padding: 1rem;
    }
    .sidebar-item {
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .site-header {
        height: 70px;
    }
    
    .main-nav {
        display: none; /* In a full app we would use a mobile menu toggle */
    }
    
    .hero-section {
        padding: 120px 0 60px 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    .dummy-board {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 2.5rem;
    }
    
    .footer-links {
        width: 100%;
        justify-content: space-between;
        gap: 2rem;
    }
    
    .footer-bottom-container {
        flex-direction: column;
        align-items: flex-start;
    }
}
