﻿/*
==============================================
TIMETRACKERAI HOME PAGE - FULL SCREEN DESIGN
==============================================
This stylesheet defines the layout, color, and component styles for the TimeTrackerAI home/landing page.
It covers hero, notice, features, CTA, and responsive breakpoints for mobile and desktop.
Sections are organized for clarity, maintainability, and onboarding.
*/

:root {
    /* Color palette from your existing theme */
    --color-primary: #1E40AF;
    --color-accent: #3B82F6;
    --color-standout: #F97316;
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;
    --color-info: #06B6D4;
    --color-bg-light: #F1F5F9;
    --color-bg-lighter: #F8FAFC;
    --color-shadow-sm: 0 2px 10px rgba(30, 64, 175, 0.08);
    --color-overlay: rgba(0, 0, 0, 0.5);
    --color-text: #0F172A;
    --color-text-muted: #64748B;
    --color-text-white: #FFFFFF;
    /* Home page specific variables */
    --hero-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --hero-overlay: linear-gradient(rgba(30, 64, 175, 0.8), rgba(59, 130, 246, 0.6));
    --section-spacing: clamp(2rem, 5vw, 4rem);
    --content-max-width: 1200px;
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================
   RESET & BASE STYLES
================================ */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
}

/* Ensure main content takes full width on home page */
main {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

    main .container-fluid {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

/* ================================
   FULL SCREEN CONTAINER
================================ */
.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-top: 60px; /* Account for fixed header */
    padding-bottom: 40px; /* Account for fixed footer */
    contain: content; /* Optimize critical path rendering */
}

/* ================================
   HERO SECTION - REDUCED HEIGHT
================================ */
.hero {
    position: relative;
    min-height: 35vh;
    height: clamp(300px, 35vh, 450px);
    background: var(--hero-gradient);
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    will-change: transform; /* Hint for browser to optimize */
    transform: translateZ(0); /* Force GPU acceleration */
}

    /* Hero background image overlay */
    .hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: var(--hero-overlay), url('/images/herobg2.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        z-index: 1;
    }

    /* Animated background elements */
    .hero::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%), radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
        z-index: 2;
        animation: float 20s ease-in-out infinite;
    }

@keyframes float {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }

    33% {
        transform: translate3d(0, -20px, 0) rotate(1deg);
    }

    66% {
        transform: translate3d(0, 10px, 0) rotate(-1deg);
    }
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--color-text-white);
    max-width: 700px;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.hero .lead {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    margin-bottom: 2rem;
    font-weight: 400;
    opacity: 0.95;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero .btn {
    background: linear-gradient(135deg, var(--color-standout) 0%, #ff6b35 100%);
    border: none;
    color: var(--color-text-white);
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    font-weight: 600;
    padding: clamp(0.65rem, 2.5vw, 1rem) clamp(1.75rem, 5vw, 2.5rem);
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

    .hero .btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s;
    }

    .hero .btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 35px rgba(249, 115, 22, 0.6);
        color: var(--color-text-white);
    }

        .hero .btn:hover::before {
            left: 100%;
        }

/* ================================
   NOTICE SECTION - CENTERED
================================ */
.notice {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-top: 3px solid var(--color-accent);
    border-bottom: 3px solid var(--color-accent);
    padding: clamp(1rem, 3vw, 1.5rem) var(--section-spacing);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

    .notice::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: repeating-linear-gradient( 45deg, transparent, transparent 10px, rgba(251, 191, 36, 0.1) 10px, rgba(251, 191, 36, 0.1) 20px );
        z-index: 1;
    }

.notice-content {
    position: relative;
    z-index: 2;
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.notice-text {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    font-weight: 500;
    color: #92400e;
    margin: 0;
    line-height: 1.5;
}

    .notice-text strong {
        font-weight: 700;
        color: #78350f;
    }

    .notice-text a {
        color: var(--color-primary);
        text-decoration: none;
        font-weight: 600;
        border-bottom: 2px solid transparent;
        transition: var(--transition);
    }

        .notice-text a:hover {
            border-bottom-color: var(--color-primary);
            color: var(--color-primary);
        }

/* ================================
   FEATURES SECTION - INLINE LAYOUT
================================ */
.features {
    flex: 1;
    background: linear-gradient(180deg, var(--color-bg-lighter) 0%, var(--color-bg-light) 100%);
    padding: clamp(3rem, 8vw, 6rem) var(--section-spacing);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .features::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100px;
        height: 4px;
        background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
        border-radius: 2px;
    }

.features-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    width: 100%;
}

/* Make features display inline */
.features .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1.5rem, 4vw, 3rem);
    flex-wrap: wrap;
}

.features .col-md-4 {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
}

.feature-card {
    background: var(--color-text-white);
    padding: clamp(1.75rem, 4vw, 2.5rem);
    border-radius: var(--border-radius);
    box-shadow: var(--color-shadow-sm);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

    .feature-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
        transform: scaleX(0);
        transition: var(--transition);
    }

    .feature-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(30, 64, 175, 0.15);
    }

        .feature-card:hover::before {
            transform: scaleX(1);
        }

/* Feature icons - PRIMARY COLOR */
.feature-icon,
.features i {
    color: var(--color-primary) !important; /* Force primary color */
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    margin-bottom: 1.25rem;
    transition: var(--transition);
    display: block;
}

.feature-card:hover .feature-icon,
.feature-card:hover i {
    transform: scale(1.1);
    color: var(--color-accent) !important; /* Hover state */
}

.feature-card h5 {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text);
    line-height: 1.3;
}

.feature-card p {
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 0;
}

/* ================================
   CTA SECTION
================================ */
.cta {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: var(--color-text-white);
    padding: clamp(3rem, 6vw, 4rem) var(--section-spacing);
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .cta::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%), radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
        z-index: 1;
    }

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.cta h5 {
    font-size: clamp(1.3rem, 4vw, 2rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.cta p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    opacity: 0.95;
    margin-bottom: 0;
    font-weight: 300;
    line-height: 1.6;
}

/* ================================
   RESPONSIVE DESIGN - UPDATED
================================ */

/* Large tablets and small desktops */
@media (max-width: 1199.98px) {
    :root {
        --section-spacing: clamp(1.5rem, 4vw, 3rem);
    }

    .hero {
        min-height: 32vh;
        height: clamp(280px, 32vh, 400px);
    }

    .features .row {
        gap: clamp(1.25rem, 3vw, 2rem);
    }
}

/* Tablets */
@media (max-width: 991.98px) {
    .hero {
        min-height: 30vh;
        height: clamp(260px, 30vh, 380px);
        background-attachment: scroll;
    }

    .features .row {
        gap: clamp(1.5rem, 3vw, 2rem);
    }

    .feature-card {
        padding: clamp(1.5rem, 4vw, 2rem);
    }

    .features .col-md-4 {
        min-width: 220px;
        max-width: 300px;
    }
}

/* Mobile landscape and small tablets */
@media (max-width: 767.98px) {
    .page-container {
        padding-top: 60px;
    }

    .hero {
        min-height: 28vh;
        height: clamp(240px, 28vh, 350px);
    }

    .hero-content {
        padding: clamp(1.25rem, 3vw, 1.75rem);
    }

    .notice {
        padding: clamp(1rem, 3vw, 1.25rem) clamp(1rem, 4vw, 2rem);
    }

    .features {
        padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem);
    }

        /* Stack features vertically on mobile */
        .features .row {
            flex-direction: column;
            gap: 1.5rem;
            align-items: center;
        }

        .features .col-md-4 {
            min-width: 100%;
            max-width: 400px;
        }

    .feature-card {
        padding: clamp(1.5rem, 5vw, 2rem);
        margin-bottom: 0;
    }

    .cta {
        padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 4vw, 2rem);
    }
}

/* Mobile portrait */
@media (max-width: 575.98px) {
    .hero {
        min-height: 25vh;
        height: clamp(220px, 25vh, 320px);
    }

        .hero h1 {
            margin-bottom: 0.75rem;
        }

        .hero .lead {
            margin-bottom: 1.5rem;
        }

    .notice-text br {
        display: none;
    }

    .features {
        padding: clamp(2rem, 8vw, 3rem) 1rem;
    }

        .features .row {
            gap: 1.25rem;
        }

    .feature-card {
        padding: 1.5rem;
    }

    .cta {
        padding: clamp(2rem, 6vw, 2.5rem) 1rem;
    }
}

/* Very small screens */
@media (max-width: 374.98px) {
    .hero {
        min-height: 22vh;
        height: clamp(200px, 22vh, 280px);
    }

    .hero-content {
        padding: 1rem;
    }

    .notice {
        padding: 1rem 0.75rem;
    }

    .features {
        padding: 2rem 0.75rem;
    }

    .feature-card {
        padding: 1.25rem;
    }

    .cta {
        padding: 2rem 0.75rem;
    }
}

/* ================================
   ACCESSIBILITY & PERFORMANCE
================================ */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero::after {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero {
        background: var(--color-primary);
    }

        .hero::before {
            background: rgba(0, 0, 0, 0.7);
        }

    .feature-card {
        border: 2px solid var(--color-text);
    }
}

/* Focus states for accessibility */
.hero .btn:focus-visible,
.notice-text a:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 4px;
}

/* Print styles */
@media print {
    .hero,
    .notice,
    .cta {
        background: none !important;
        color: var(--color-text) !important;
    }

        .hero .btn,
        .notice-text a {
            display: none;
        }
}

/* ================================
   LOADING STATES & ANIMATIONS
================================ */
.page-container {
    animation: pageEnter 0.6s ease-out;
}

@keyframes pageEnter {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Staggered animation for feature cards */
.feature-card:nth-child(1) {
    animation-delay: 0.1s;
}

.feature-card:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.3s;
}

.feature-card {
    animation: slideInUp 0.6s ease-out both;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Optimize animations */
@keyframes float {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    33% {
        transform: translate3d(0, -20px, 0) rotate(1deg);
    }
    66% {
        transform: translate3d(0, 10px, 0) rotate(-1deg);
    }
}

/* Add preconnect for any external resources */
@media not all and (min-width: 768px) {
    /* Mobile-specific optimizations for feature layout */
    .hero h1 {
        font-size: clamp(2rem, 8vw, 3.5rem); /* Improved clamp values for mobile headings */
    }
    
    /* Ensure feature columns stack and cards fill width on mobile */
    .features .col-md-4 {
        display: flex;
    }
    
    .feature-card {
        width: 100%;
    }
}
