/* Landing Page Styles for EduTracker */

/* Landing Page Base Styles */
.landing-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--foreground);
    background-color: var(--background);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.landing-page.loaded {
    opacity: 1;
}

/* Landing Header */
.landing-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: all 0.3s ease;
}

.landing-nav {
    padding: 0.75rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--foreground);
}


.nav-brand-text h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-brand-text span {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    display: block;
    line-height: 1.2;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Mobile Navigation - Clean Implementation */

/* Mobile Navigation Styles */
.mobile-nav-menu {
    display: none;
}

@media (max-width: 768px) {

    /* Improved hero typography for mobile */
    .hero-title {
        font-size: clamp(1.8rem, 6vw, 2.2rem);
        margin-bottom: 1.25rem;
        line-height: 1.15;
        text-align: center;
    }
    
    .hero-title .title-line {
        display: block;
        margin-bottom: 0.25rem;
    }
    
    .hero-title .hero-highlight {
        margin-bottom: 0;
    }

    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 1.75rem;
        line-height: 1.6;
        max-width: 100%;
        text-align: center;
        padding: 0 0.5rem;
    }

    .hero-actions {
        gap: 0.75rem;
        margin-bottom: 2rem;
        justify-content: center;
        flex-direction: column;
    }

    /* Better mobile button sizing */
    .hero-actions .btn {
        min-height: 48px;
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        border-radius: 8px;
        width: 100%;
        max-width: 280px;
    }

    .hero-stats {
        gap: 1rem;
        justify-content: center;
        margin-top: 1rem;
        flex-wrap: wrap;
    }

    .stat-item {
        flex: 1;
        min-width: 80px;
        text-align: center;
    }

    .stat-number {
        font-size: 1.25rem;
        font-weight: 700;
    }

    .stat-label {
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Features and sections scale */
    .features-section,
    .about-section,
    .cta-section {
        padding: 3rem 0;
    }

    .features-container,
    .about-container,
    .cta-container,
    .hero-container,
    .footer-container {
        padding: 0 1.5rem;
    }

    .section-header { margin-bottom: 2rem; }
    .section-title { font-size: clamp(1.3rem, 4.5vw, 1.6rem); }
    .section-description { font-size: 0.85rem; }
    
    /* CTA title matches section titles */
    .cta-title { font-size: clamp(1.3rem, 4.5vw, 1.6rem); }

    .features-grid { gap: 1rem; }
    .feature-card { padding: 0.8rem; }
    .feature-icon { width: 1.8rem; height: 1.8rem; font-size: 0.9rem; margin-bottom: 0.5rem; }
    .feature-title { font-size: 0.9rem; margin-bottom: 0.3rem; }
    .feature-description { font-size: 0.8rem; }

    /* Improved dashboard mockup for mobile */
    .dashboard-mockup {
        transform: none;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .mockup-header { 
        padding: 0.75rem 1rem; 
    }
    .mockup-title { 
        font-size: 0.9rem; 
    }
    .mockup-time { 
        font-size: 0.8rem; 
    }
    .mockup-content { 
        padding: 1.25rem; 
    }
    .mockup-stats { 
        gap: 0.75rem; 
        grid-template-columns: 1fr 1fr;
    }
    .mockup-stat { 
        padding: 0.75rem; 
        gap: 0.5rem; 
    }
    .mockup-stat-icon { 
        width: 2rem; 
        height: 2rem; 
        font-size: 0.8rem; 
    }
    .mockup-stat-number { 
        font-size: 1.1rem; 
    }
    .mockup-stat-label { 
        font-size: 0.7rem; 
    }
    .mockup-qr-section { 
        grid-template-columns: 1fr; 
        gap: 1rem; 
    }
    .mockup-scanner-icon { 
        width: 2.25rem; 
        height: 2.25rem; 
        font-size: 1.1rem; 
    }
    .mockup-scanner-text { 
        font-size: 0.8rem; 
    }
    .mockup-scanner-status { 
        font-size: 0.7rem; 
    }

    /* About section compact scale */
    .about-content { grid-template-columns: 1fr; gap: 1.5rem; }
    .about-actions { gap: 0.75rem; margin-top: 1.5rem; }
    .about-feature { gap: 0.5rem; margin-bottom: 0.75rem; }
    .about-feature i { font-size: 0.9rem; }
    .image-placeholder { padding: 1.5rem; }
    .image-placeholder i { font-size: 2rem; }
    .image-placeholder p { font-size: 0.85rem; }
    .about-feature span { font-size: 0.85rem; }
}

.nav-link {
    color: var(--foreground);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

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

.nav-link-primary {
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.nav-link-primary:hover {
    background: var(--primary);
    opacity: 0.9;
    transform: translateY(-1px);
}

.nav-link-primary::after {
    display: none;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    color: var(--muted-foreground);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    position: relative;
    overflow: hidden;
}

.dark-mode-toggle:hover {
    background-color: var(--accent);
    color: var(--accent-foreground);
    transform: scale(1.05);
}

.dark-mode-toggle:active {
    transform: scale(0.95);
}

.dark-mode-toggle i {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.dark-mode-toggle:hover i {
    transform: rotate(180deg);
}

/* Smooth theme transition for the entire page */
* {
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced theme transition during switching */
.theme-transitioning * {
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--foreground);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: background-color 0.3s ease;
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle:hover {
    background: var(--accent);
    color: var(--accent-foreground);
    transform: translateY(-50%) scale(1.05);
}

.mobile-menu-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

.mobile-menu-toggle i {
    transition: transform 0.3s ease;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    overflow: hidden;
}

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

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--foreground);
}

.hero-title .title-line {
    display: block;
    white-space: nowrap;
}

.hero-highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

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

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-top: 0.25rem;
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-dashboard-preview {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.dashboard-mockup {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s ease;
}

.dashboard-mockup:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.mockup-header {
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}


.mockup-title {
    font-weight: 600;
    font-size: 0.875rem;
    flex: 1;
}

.mockup-time {
    font-size: 0.75rem;
    opacity: 0.8;
    font-family: 'Courier New', monospace;
}

.mockup-content {
    padding: 1.5rem;
}

.mockup-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.mockup-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    background: var(--muted);
    border-radius: var(--radius);
    transition: transform 0.2s ease;
}

.mockup-stat:hover {
    transform: translateY(-1px);
}

.mockup-stat-icon {
    width: 2.25rem;
    height: 2.25rem;
    background: var(--primary);
    color: var(--primary-foreground);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.mockup-stat-info {
    flex: 1;
    min-width: 0;
}

.mockup-stat-number {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--foreground);
    line-height: 1;
}

.mockup-stat-label {
    font-size: 0.6875rem;
    color: var(--muted-foreground);
    margin-top: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mockup-qr-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.mockup-qr-scanner {
    background: linear-gradient(135deg, hsl(var(--primary) / 0.05), hsl(var(--secondary) / 0.05));
    border: 1px solid hsl(var(--primary) / 0.2);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mockup-scanner-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    color: white;
    font-size: 1.25rem;
}

.mockup-scanner-text {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.mockup-scanner-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    color: var(--success);
    font-weight: 500;
}

.mockup-scanner-status .status-dot {
    width: 0.375rem;
    height: 0.375rem;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.mockup-recent-activity {
    background: var(--muted);
    border-radius: var(--radius);
    padding: 1rem;
}

.activity-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.75rem;
    text-align: center;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 1.5rem;
    height: 1.5rem;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    color: var(--muted-foreground);
    flex-shrink: 0;
}

.activity-info {
    flex: 1;
    min-width: 0;
}

.activity-name {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-time {
    font-size: 0.625rem;
    color: var(--muted-foreground);
}

.activity-status {
    font-size: 0.625rem;
    font-weight: 500;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    flex-shrink: 0;
}

.activity-status.present {
    background: hsl(var(--success) / 0.1);
    color: var(--success);
}

.activity-status.late {
    background: hsl(var(--warning) / 0.1);
    color: var(--warning);
}

.activity-status.absent {
    background: hsl(var(--destructive) / 0.1);
    color: var(--destructive);
}

/* Hero Background */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
}

.hero-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    left: 5%;
    animation-delay: 2s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 50%;
    animation-delay: 4s;
}

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

/* Features Section */
.features-section {
    padding: 6rem 0;
    background: var(--muted);
}

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

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

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    max-width: 600px;
    margin: 0 auto;
}

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

.feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 1.5rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--muted-foreground);
    line-height: 1.6;
}

/* About Section */
.about-section {
    padding: 6rem 0;
    background: var(--background);
}

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

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-features {
    margin: 2rem 0;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--muted-foreground);
}

.about-feature i {
    color: var(--success);
    font-size: 1.125rem;
}

.about-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-image {
    width: 100%;
    max-width: 400px;
}

.image-placeholder {
    background: var(--muted);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 3rem;
    text-align: center;
    color: var(--muted-foreground);
}

.image-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.image-placeholder p {
    font-size: 1.125rem;
    font-weight: 500;
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    text-align: center;
}

.cta-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-actions .btn {
    background: white;
    color: var(--primary);
    border: 2px solid white;
}

.cta-actions .btn:hover {
    background: transparent;
    color: white;
    border-color: white;
}

.cta-actions .btn-outline {
    background: transparent;
    color: white;
    border-color: white;
}

.cta-actions .btn-outline:hover {
    background: white;
    color: var(--primary);
}

/* Landing Footer */
.landing-footer {
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
}

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

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}


.footer-brand-text h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.footer-brand-text p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.footer-description {
    color: var(--muted-foreground);
    line-height: 1.6;
    max-width: 300px;
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--muted-foreground);
}

.contact-item i {
    width: 1rem;
    color: var(--primary);
}

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

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.footer-version {
    opacity: 0.7;
}

/* Desktop - Ensure mobile elements are hidden */
@media (min-width: 769px) {
    .mobile-nav-menu {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: none !important;
    }
}


/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    /* Mobile Navigation Backdrop */
    .mobile-nav-menu::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: -1;
        backdrop-filter: blur(4px);
    }

    .mobile-nav-menu.active::before {
        opacity: 1;
    }

    /* New Mobile Navigation */
    .mobile-nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        max-width: 320px;
        height: 100vh;
        height: 100dvh; /* Use dynamic viewport height for better mobile support */
        background: var(--card);
        z-index: 10000;
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border: none;
        box-shadow: var(--shadow-lg);
        border-left: 1px solid var(--border);
    }

    .mobile-nav-menu.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    /* Mobile Navigation Header */
    .mobile-nav-header {
        background: var(--card);
        color: var(--foreground);
        /* Match page header padding and alignment */
        padding: 0.75rem 1.5rem;
        /* legacy iOS fallback */
        padding-top: calc(0.75rem + constant(safe-area-inset-top));
        padding-left: calc(1.5rem + constant(safe-area-inset-left));
        padding-right: calc(1.5rem + constant(safe-area-inset-right));
        /* modern */
        padding-top: calc(0.75rem + env(safe-area-inset-top));
        padding-left: calc(1.5rem + env(safe-area-inset-left));
        padding-right: calc(1.5rem + env(safe-area-inset-right));
        display: flex;
        align-items: center;
        gap: 1rem;
        position: sticky;
        top: 0;
        z-index: 1;
        box-shadow: var(--shadow-sm);
        flex-shrink: 0;
    }


    .mobile-nav-title {
        font-size: 1rem;
        font-weight: 600;
        color: var(--foreground);
        flex: 1;
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
    }

    .mobile-nav-title i {
        font-size: 1rem;
        color: var(--foreground);
    }

    .mobile-nav-close {
        background: none;
        border: none;
        color: var(--muted-foreground);
        padding: var(--spacing-sm);
        border-radius: var(--radius);
        cursor: pointer;
        transition: var(--transition);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2rem;
        height: 2rem;
        font-size: 1.125rem;
    }

    .mobile-nav-close:hover {
        background: var(--accent);
        color: var(--foreground);
    }

    /* Mobile Navigation Content */
    .mobile-nav-content {
        flex: 1;
        padding: 0 1.5rem var(--spacing-md) 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 0;
        overflow-y: auto;
        background: var(--card);
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }

    .mobile-nav-link {
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
        padding: var(--spacing-sm) 0;
        border-radius: var(--radius);
        text-decoration: none;
        color: var(--muted-foreground);
        font-weight: 500;
        transition: var(--transition);
        border: 1px solid transparent;
        background: transparent;
        cursor: pointer;
        font-size: 1rem;
        min-height: 40px; /* Reduced from 44px */
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-nav-link:hover,
    .mobile-nav-link:focus {
        background: var(--accent);
        color: var(--accent-foreground);
        outline: none;
    }

    .mobile-nav-link i {
        width: 1rem;
        text-align: center;
        color: var(--muted-foreground);
        font-size: 1rem;
    }

    .mobile-nav-link:hover i,
    .mobile-nav-link:focus i {
        color: var(--accent-foreground);
    }


    .mobile-nav-cta {
        background: var(--primary);
        color: var(--primary-foreground);
        border: 1px solid var(--primary);
        margin-top: var(--spacing-sm);
        justify-content: center;
        font-weight: 600;
        min-height: 40px; /* Reduced from 44px */
        box-shadow: var(--shadow-sm);
        font-size: 1rem;
    }

    .mobile-nav-cta:hover,
    .mobile-nav-cta:focus {
        background: var(--primary);
        color: var(--primary-foreground);
        opacity: 0.9;
        outline: 2px solid var(--ring);
        outline-offset: 2px;
    }

    .mobile-nav-cta i {
        color: var(--primary-foreground);
    }


    /* Hide hamburger menu when mobile menu is open */
    .mobile-nav-open .mobile-menu-toggle {
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    /* Prevent body scroll when menu is open */
    .mobile-nav-open {
        overflow: hidden;
        height: 100vh;
        height: 100dvh; /* Use dynamic viewport height */
    }

    /* Ensure mobile nav is above everything */
    .mobile-nav-open .mobile-nav-menu {
        z-index: 10001;
    }



    .mobile-menu-toggle {
        display: flex !important;
        position: absolute;
        right: 2rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }

    .dark-mode-toggle {
        display: none;
    }

    .landing-nav {
        padding: 0.5rem 0;
    }

    .nav-links {
        display: none;
    }

    .nav-container {
        padding: 0 1.5rem;
        position: relative;
    }

    .mobile-menu-toggle {
        right: 1.5rem;
        display: flex !important;
        z-index: 10001;
        min-width: 48px;
        min-height: 48px;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        border-radius: 8px;
        transition: all 0.2s ease;
        background: transparent;
        border: none;
        color: var(--foreground);
    }
    
    .mobile-menu-toggle:hover {
        background: var(--accent);
        color: var(--accent-foreground);
    }
    
    .mobile-menu-toggle:active {
        transform: translateY(-50%) scale(0.95);
    }

    .nav-brand-text h2 {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
        line-height: 1.1;
        white-space: nowrap;
    }

    .nav-brand-text span {
        font-size: 0.7rem;
        display: block;
        line-height: 1.1;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-section {
        padding: 5rem 0 2.5rem;
        min-height: 85vh;
        display: flex;
        align-items: center;
    }
    
    .hero-container {
        width: 100%;
    }

    .hero-actions {
        justify-content: center;
        align-items: center;
    }

    .hero-stats {
        justify-content: center;
        align-items: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .about-actions {
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .cta-actions .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .landing-nav {
        padding: 0.375rem 0;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .nav-brand-text h2 {
        font-size: 0.7rem;
        margin-bottom: 0.2rem;
        line-height: 1.1;
        white-space: nowrap;
    }

    .nav-brand-text span {
        font-size: 0.65rem;
        display: block;
        line-height: 1.1;
    }

    /* Keep consistent side padding with 768 rules */
    .hero-container,
    .features-container,
    .about-container,
    .cta-container,
    .footer-container { padding: 0 1rem; }

    .hero-section {
        padding: 4rem 0 2rem;
        min-height: 80vh;
        display: flex;
        align-items: center;
    }

    .features-section,
    .about-section,
    .cta-section {
        padding: 4rem 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    /* Reduce headings and descriptions for very small phones */
    .section-title { font-size: clamp(1.1rem, 4.5vw, 1.3rem); }
    .section-description { font-size: 0.75rem; }
    
    /* CTA title matches section titles on small phones */
    .cta-title { font-size: clamp(1.1rem, 4.5vw, 1.3rem); }
    
    /* Even more compact hero on small phones */
    .hero-title {
        font-size: clamp(1.4rem, 5vw, 1.8rem);
        margin-bottom: 0.75rem;
        line-height: 1.2;
        text-align: center;
    }
    
    .hero-title .title-line {
        display: block;
        margin-bottom: 0.2rem;
    }

    .hero-description {
        font-size: 0.85rem;
        margin-bottom: 1.25rem;
        line-height: 1.5;
        max-width: 100%;
        text-align: center;
        padding: 0 0.25rem;
    }

    /* Feature cards follow compact scale */
    .feature-card { padding: 0.75rem; }
    .feature-icon { width: 1.6rem; height: 1.6rem; font-size: 0.85rem; margin-bottom: 0.4rem; }
    .feature-title { font-size: 0.85rem; margin-bottom: 0.25rem; }
    .feature-description { font-size: 0.75rem; }

    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .about-actions {
        flex-direction: column;
    }

    .about-actions .btn {
        width: 100%;
    }

    .hero-stats { justify-content: space-around; }

    .stat-item {
        flex: 1;
        min-width: 80px;
    }

    .stat-number { font-size: 1.2rem; }

    .stat-label { font-size: 0.6rem; }

    .dashboard-mockup {
        transform: none;
    }

    .mockup-stats {
        grid-template-columns: 1fr;
    }

    /* Dashboard internals tighter */
    .mockup-header { padding: 0.5rem 0.75rem; }
    .mockup-content { padding: 0.875rem; }
    .mockup-stat { padding: 0.5rem; gap: 0.5rem; }
    .mockup-stat-icon { width: 1.6rem; height: 1.6rem; font-size: 0.7rem; }
    .mockup-stat-number { font-size: 0.95rem; }
    .mockup-stat-label { font-size: 0.6rem; }

    .mockup-qr-section {
        grid-template-columns: 1fr;
    }

    .mockup-qr-scanner { padding: 0.875rem; }
    .mockup-scanner-icon { width: 1.75rem; height: 1.75rem; font-size: 0.9rem; }
    .mockup-scanner-text { font-size: 0.65rem; }
    .mockup-scanner-status { font-size: 0.6rem; }

    .mockup-recent-activity {
        margin-top: 1rem;
    }

    /* About visuals */
    .image-placeholder { padding: 1.25rem; }
    .image-placeholder i { font-size: 1.8rem; }
    .image-placeholder p { font-size: 0.8rem; }
    .about-feature span { font-size: 0.8rem; }
}

/* Extra small screens */
@media (max-width: 375px) {
    .nav-brand-text h2 {
        font-size: 0.65rem;
        white-space: nowrap;
    }

    .nav-brand-text span {
        font-size: 0.6rem;
    }
}

/* Very small screens */
@media (max-width: 320px) {
    .nav-brand-text h2 {
        font-size: 0.6rem;
        white-space: nowrap;
    }

    .nav-brand-text span {
        font-size: 0.55rem;
    }
}

/* Dark mode support */
.dark .landing-header {
    background: var(--background);
    border-bottom-color: var(--border);
}

/* Dark mode mobile navigation */
.dark .mobile-nav-menu {
    background: var(--card);
    border-left-color: var(--border);
}

.dark .mobile-nav-header {
    background: var(--card);
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.dark .mobile-nav-header .mobile-nav-title {
    color: var(--foreground);
}

.dark .mobile-nav-close {
    color: var(--muted-foreground);
}

.dark .mobile-nav-close:hover {
    background: var(--accent);
    color: var(--foreground);
}

.dark .mobile-nav-content {
    background: var(--card);
}

.dark .mobile-nav-link {
    color: var(--muted-foreground);
}

.dark .mobile-nav-link:hover,
.dark .mobile-nav-link:focus {
    background: var(--accent);
    color: var(--accent-foreground);
}

.dark .mobile-nav-link i {
    color: var(--muted-foreground);
}

.dark .mobile-nav-link:hover i,
.dark .mobile-nav-link:focus i {
    color: var(--accent-foreground);
}

.dark .mobile-nav-cta {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.dark .mobile-nav-cta:hover,
.dark .mobile-nav-cta:focus {
    background: var(--primary);
    color: var(--primary-foreground);
    opacity: 0.9;
}

.dark .mobile-nav-cta i {
    color: var(--primary-foreground);
}

.dark .mobile-nav-divider {
    background: var(--border);
}

/* Additional dark mode improvements for mobile nav */
.dark .mobile-nav-menu::before {
    background: rgba(0, 0, 0, 0.7);
}

.dark .mobile-nav-link:focus {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.dark .mobile-nav-cta:focus {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.dark .features-section {
    background: var(--muted);
}

.dark .about-section {
    background: var(--background);
}

.dark .cta-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.dark .landing-footer {
    background: var(--card);
    border-top-color: var(--border);
}

.dark .hero-background .shape {
    opacity: 0.05;
}

.dark .hero-section {
    background: var(--background);
}

.dark .dashboard-mockup {
    background: var(--card);
    border-color: var(--border);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.dark .mockup-header {
    background: var(--primary);
    color: var(--primary-foreground);
}

.dark .mockup-content {
    background: var(--card);
}

.dark .mockup-stat {
    background: var(--muted);
    border: 1px solid var(--border);
}

.dark .mockup-qr-scanner {
    background: linear-gradient(135deg, hsl(var(--primary) / 0.1), hsl(var(--secondary) / 0.1));
    border-color: hsl(var(--primary) / 0.3);
}

.dark .mockup-recent-activity {
    background: var(--muted);
}

.dark .activity-item {
    border-bottom-color: var(--border);
}

.dark .feature-card {
    background: var(--card);
    border-color: var(--border);
}

.dark .feature-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.dark .image-placeholder {
    background: var(--muted);
    border-color: var(--border);
    color: var(--muted-foreground);
}

.dark .image-placeholder i {
    color: var(--primary);
}

.dark .footer-brand-text h3 {
    color: var(--primary);
}

.dark .footer-title {
    color: var(--foreground);
}

.dark .footer-links a {
    color: var(--muted-foreground);
}

.dark .footer-links a:hover {
    color: var(--primary);
}

.dark .contact-item {
    color: var(--muted-foreground);
}

.dark .contact-item i {
    color: var(--primary);
}

.dark .footer-bottom-content {
    color: var(--muted-foreground);
}

.dark .footer-version {
    opacity: 0.7;
}


/* Animation utilities */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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

/* Mockup animations */
.mockup-stat,
.activity-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.mockup-stat.visible,
.activity-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.mockup-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.activity-item:hover {
    background: var(--accent);
    border-radius: var(--radius);
    margin: 0 -0.5rem;
    padding: 0.5rem;
}

/* Scroll animations */
@media (prefers-reduced-motion: no-preference) {
    .feature-card,
    .about-feature,
    .stat-item {
        opacity: 0;
        transform: translateY(30px);
        transition: all 0.6s ease;
    }

    .feature-card.visible,
    .about-feature.visible,
    .stat-item.visible {
        opacity: 1;
        transform: translateY(0);
    }
}
