/*
Theme Name: Mahlzait
Description: A modern nutrition tracking app landing page theme
Version: 1.0
Author: Your Name
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fff;
    color: #333;
    overflow-x: hidden;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    background: transparent;
    z-index: 1000;
    transition: all 0.3s ease;
}

nav.scrolled {
    padding: 15px 50px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: -1px;
}

.logo a {
    color: inherit;
    text-decoration: none;
}

.logo .highlight {
    background: linear-gradient(135deg, #38A89D 0%, #4ECDC4 50%, #38A89D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 1px 3px rgba(56, 168, 157, 0.3);
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.nav-links a:hover {
    opacity: 1;
    color: #38A89D;
}

.download-btn {
    background: #38A89D;
    color: #fff;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(56, 168, 157, 0.3);
}

/* Hero Section */
.hero {
    height: 650vh; /* Back to original height for proper feature navigation */
    display: flex;
    justify-content: center;
    position: relative;
    background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 40%, #e9ecef 85%, #f0f1f2 92%, #f2f3f4 98%, #f2f3f4 100%);
}

.hero-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transition: background 0.15s ease-out;
    opacity: 1;
    /* Always visible green gradient background - MUCH MORE VISIBLE */
    background: radial-gradient(ellipse at center, 
        rgba(56, 168, 157, 0.4) 0%, 
        rgba(78, 205, 196, 0.25) 30%, 
        rgba(56, 168, 157, 0.15) 60%, 
        rgba(56, 168, 157, 0.05) 80%, 
        transparent 100%) !important;
}

.hero-container {
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    padding: 0 50px;
}

.hero-left-column {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-content {
    position: absolute;
    width: 100%;
    /* Removed transitions to avoid conflicts with scroll-based animations */
}

.hero-content h1 .h1-teal {
    transition: color 0.5s ease;
}

.hero-content h1 {
    font-size: clamp(34px, 4.5vw, 52px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 30px;
    letter-spacing: -1px;
    color: #333;
}

.gradient-text {
    background: linear-gradient(135deg, #333 0%, #38A89D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 20px;
    opacity: 0.7;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 500px;
    color: #666;
}

.app-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.app-button {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #333;
    color: #fff;
    padding: 15px 30px;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid #ddd;
}

.app-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(56, 168, 157, 0.4);
}

.app-button svg {
    width: 24px;
    height: 24px;
}

.button-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.button-text span:first-child {
    font-size: 12px;
    opacity: 0.8;
}

.button-text span:last-child {
    font-size: 18px;
    font-weight: 600;
}

.features-view {
    position: absolute;
    width: 100%;
    display: grid;
    grid-template-columns: 0.5fr 1.5fr;
    gap: 20px;
    align-items: center;
    opacity: 0;
    /* Removed transitions to avoid conflicts with scroll-based animations */
    pointer-events: none;
}

.features-description {
    position: relative;
    display: grid;
}

.feature-content {
    grid-area: 1 / 1;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

.feature-content.active {
    opacity: 1;
    pointer-events: auto;
}

.typing::after {
    content: '▋';
    animation: blink 1s step-end infinite;
}

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

footer {
    background: linear-gradient(to bottom, #f8f9fa 0%, #f8f9fa 90%, #f0f1f2 100%);
    padding: 80px 50px 30px;
    text-align: center;
    color: #333;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.footer-content p {
    font-size: 18px;
    opacity: 0.7;
    margin-bottom: 40px;
}

.footer-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.legal-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    font-size: 14px;
}

.legal-links a {
    color: #666;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.legal-links a:hover {
    opacity: 1;
    color: #38A89D;
}

.copyright {
    opacity: 0.5;
    font-size: 14px;
}



/* Legal Pages Styles */
.legal-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #e0e0e0;
    padding-top: 120px;
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.legal-header {
    text-align: center;
    margin-bottom: 60px;
}

.legal-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
}

.legal-header .highlight {
    color: #38A89D;
}

.legal-header p {
    font-size: 1.2rem;
    color: #b0b0b0;
    max-width: 600px;
    margin: 0 auto;
}

.legal-content {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
}

.legal-content h2 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 30px 0 15px 0;
    border-left: 4px solid #38A89D;
    padding-left: 15px;
}

.legal-content h3 {
    color: #e0e0e0;
    font-size: 1.2rem;
    font-weight: 500;
    margin: 20px 0 10px 0;
}

.legal-content p {
    color: #d0d0d0;
    line-height: 1.7;
    margin-bottom: 15px;
}

.legal-content ul, .legal-content ol {
    color: #d0d0d0;
    line-height: 1.7;
    margin: 15px 0;
    padding-left: 30px;
}

.legal-content li {
    line-height: 1.7;
    margin-bottom: 10px;
    color: #d0d0d0;
}

.legal-content strong {
    color: #ffffff;
}

.legal-content a {
    color: #38A89D;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.legal-content a:hover {
    border-bottom-color: #38A89D;
}

.back-to-home {
    text-align: center;
    margin: 40px 0;
}

.back-to-home a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #38A89D;
    text-decoration: none;
    font-weight: 500;
    padding: 12px 24px;
    border: 1px solid #38A89D;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.back-to-home a:hover {
    background: #38A89D;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 168, 157, 0.3);
}

.back-to-home svg {
    transition: transform 0.3s ease;
}

.back-to-home a:hover svg {
    transform: translateX(-3px);
}

.last-updated {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    font-style: italic;
}

@media (max-width: 768px) {
    .legal-page {
        padding-top: 100px;
    }
    
    .legal-header h1 {
        font-size: 2rem;
    }
    
    .legal-content {
        padding: 30px 20px;
    }
    
    .legal-container {
        padding: 0 15px 40px;
    }
}



.features-nav ul {
    list-style: none;
    padding: 0;
    position: relative;
    --scroll-position: 0px;
}

.features-nav ul::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(56, 168, 157, 0.15);
    border-radius: 2px;
}

.features-nav ul::after {
    content: '';
    position: absolute;
    left: 8px;
    top: var(--scroll-position);
    width: 4px;
    height: 16px;
    background: #38A89D;
    border-radius: 2px;
    transition: top 0.3s ease;
}

.features-nav li {
    padding: 15px 20px 15px 30px;
    margin: 10px 0;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    position: relative;
}

.features-nav li.active {
    opacity: 1;
    font-weight: 600;
}

.features-description h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #333;
}

.features-description p {
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.7;
    color: #666;
}

.hero-mockup {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1179 / 2556;
    transition: transform 0.5s ease;
    /* Removed scaling - use natural size for better quality */
    max-width: 420px; /* Adjusted to match previous scaled size but without quality loss */
    margin: 0 auto;
}

spline-viewer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#canvas3d {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    /* High quality rendering */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* Smooth scaling for better quality */
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* Fallback for Spline model if it fails to load */
.hero-mockup::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: linear-gradient(135deg, rgba(56, 168, 157, 0.1) 0%, rgba(78, 205, 196, 0.1) 100%);
    border-radius: 25px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.hero-mockup.loading::before {
    opacity: 1;
}

/* Loading animation for Spline model */
.spline-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #38A89D;
    font-size: 14px;
    opacity: 0.7;
    z-index: 10;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.spline-loading::after {
    content: '...';
    animation: pulse 1.5s ease-in-out infinite;
}

/* Floating particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #38A89D;
    border-radius: 50%;
    opacity: 0.3;
    animation: float-particle 10s infinite linear;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float-particle {
    from {
        transform: translateY(100vh) translateX(0);
    }
    to {
        transform: translateY(-100px) translateX(100px);
    }
}







.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.splash-icon {
    width: 80px;
    height: 80px;
    animation: breath 2s ease-in-out infinite;
}

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

.highlight {
    background: linear-gradient(135deg, #38A89D 0%, #4ECDC4 50%, #38A89D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 1px 3px rgba(56, 168, 157, 0.3);
}

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

    /* DISABLE desktop green glow effect on mobile */
    .hero-glow {
        display: none !important;
    }

    /* Mobile Layout: True 30/70 Split */
    .hero {
        height: 100vh; /* Full viewport */
        min-height: 100vh;
        background: linear-gradient(135deg, #f8f9fa 0%, #fff 30%, #fff 70%, rgba(248, 249, 250, 0.3) 100%);
        display: flex;
        flex-direction: column;
        padding: 0;
        position: relative;
        overflow: hidden;
    }

    .hero-container {
        position: relative;
        height: 100vh;
        padding: 0;
        display: flex;
        flex-direction: column;
        max-width: 100%;
        overflow: hidden;
    }

    /* TOP 30% - Text Content Area */
    .hero-left-column {
        position: relative;
        width: 100%;
        height: 30vh; /* Exactly 30% of viewport */
        display: flex;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        z-index: 10;
        overflow: hidden;
    }

    /* Hide desktop features view on mobile */
    .features-view {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        position: absolute !important;
        left: -9999px !important;
    }

    /* Hero content within the 30% area */
    .hero-content {
        opacity: 1 !important;
        position: relative;
        margin: 0;
        padding: 80px 15px 15px; /* Account for navbar */
        text-align: center;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        overflow: hidden;
    }

    .hero-content h1 .h1-teal {
        color: #38A89D !important;
    }

    .hero-content h1 {
        margin-bottom: 8px;
        font-size: clamp(18px, 4.5vw, 24px);
        font-weight: 800;
        line-height: 1.1;
        letter-spacing: -0.5px;
    }

    .hero-content p {
        margin-bottom: 12px;
        font-size: 13px;
        line-height: 1.3;
        color: #666;
        max-width: 100%;
        padding: 0 5px;
        display: -webkit-box;
        -webkit-line-clamp: 3; /* Limit text to save space */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .app-buttons {
        margin-bottom: 0;
        justify-content: center;
        gap: 6px;
        flex-wrap: wrap;
    }

    .app-button {
        padding: 6px 12px;
        border-radius: 6px;
        transition: all 0.3s ease;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        font-size: 11px;
    }

    .app-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(56, 168, 157, 0.3);
    }

    /* MOBILE FEATURES - Scrollable within the 30% area */
    .mobile-features {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 30vh; /* Same as hero-left-column */
        margin: 0;
        padding: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 15; /* Above hero content */
        scrollbar-width: none;
        -ms-overflow-style: none;
        transform: translateX(100%); /* Initially hidden */
        transition: transform 0.3s ease;
    }

    .mobile-features.visible {
        transform: translateX(0); /* Slide in when needed */
    }

    .mobile-features::-webkit-scrollbar {
        display: none;
    }
    
    .mobile-features h2 {
        display: none;
    }

    .mobile-feature-list {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 80px 0 20px;
    }

    .mobile-feature-item {
        display: block;
        padding: 15px;
        background: rgba(255, 255, 255, 0.95);
        border: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        margin: 0;
        position: relative;
        backdrop-filter: blur(10px);
    }

    .mobile-feature-item:first-child {
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }

    .mobile-feature-item:hover {
        background: rgba(56, 168, 157, 0.1);
    }

    .mobile-feature-item.active {
        background: rgba(56, 168, 157, 0.15);
        border-color: rgba(56, 168, 157, 0.3);
    }

    .mobile-feature-item.active h3 {
        color: #38A89D;
    }

    .mobile-feature-content {
        max-width: 100%;
        padding: 0;
    }

    .mobile-feature-content h3 {
        font-size: 14px;
        font-weight: 600;
        color: #333;
        margin-bottom: 6px;
        line-height: 1.2;
    }

    .mobile-feature-content p {
        font-size: 12px;
        color: #666;
        line-height: 1.3;
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* BOTTOM 70% - Dedicated 3D Model Area */
    .hero-mockup {
        position: relative; /* NOT fixed - part of layout */
        width: 100%;
        height: 70vh; /* Exactly 70% of viewport */
        background: linear-gradient(135deg, #f8f9fa 0%, #fff 50%, #e9ecef 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
        box-sizing: border-box;
    }

    .hero-mockup canvas {
        width: auto !important;
        height: auto !important;
        max-width: 80%; /* Control overall size */
        max-height: 80%; /* Control overall size */
        object-fit: contain; /* PRESERVE ASPECT RATIO */
        aspect-ratio: auto; /* Let it keep natural proportions */
    }


}

@media (max-width: 480px) {
    nav {
        padding: 15px 20px;
    }

    .hero {
        padding-top: 0;
    }

    .hero-container {
        padding: 0;
        height: 100vh;
    }

    /* Hero content within top 30% - smaller text for small screens */
    .hero-content {
        padding: 70px 10px 10px; /* Less navbar padding */
    }

    .hero-content h1 {
        font-size: clamp(16px, 5vw, 20px);
        margin-bottom: 6px;
    }

    .hero-content p {
        font-size: 11px;
        padding: 0 5px;
        margin-bottom: 10px;
        -webkit-line-clamp: 2; /* Even more limited on small screens */
    }

    .app-button {
        padding: 5px 10px;
        font-size: 10px;
        gap: 4px;
    }

    /* 3D MODEL - Same dedicated area approach */
    .hero-mockup {
        position: relative;
        width: 100%;
        height: 70vh;
        padding: 15px; /* Less padding on small screens */
    }

    .hero-mockup canvas {
        max-width: 85%; /* Slightly larger for small screens */
        max-height: 85%;
    }

    /* Mobile features - same structure */
    .mobile-feature-list {
        padding: 70px 0 15px;
    }

    .mobile-feature-item {
        padding: 12px 10px;
    }

    .mobile-feature-content h3 {
        font-size: 13px;
        margin-bottom: 5px;
    }

    .mobile-feature-content p {
        font-size: 11px;
        line-height: 1.3;
        -webkit-line-clamp: 2;
    }






}

/* Add better responsive breakpoints after existing mobile styles */

/* Small tablets and landscape phones */
@media (max-width: 768px) {
    .hero-container {
        padding: 60px 20px;
        gap: 40px;
    }
    
    .hero-content h1 {
        font-size: clamp(28px, 6vw, 42px);
    }
    
    .hero-content p {
        font-size: 18px;
    }
    

    
    .nav-container {
        padding: 0 20px;
    }
    
    .app-buttons {
        justify-content: center;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .hero-container {
        padding: 80px 20px 50px;
    }

    .hero-content h1 {
        font-size: clamp(24px, 8vw, 32px);
        line-height: 1.2;
        margin-bottom: 20px;
    }
    
    .hero-content p {
        font-size: 16px;
        margin-bottom: 30px;
        padding: 0 5px;
    }
    
    .app-button {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .button-text span:last-child {
        font-size: 16px;
    }
    

    


    /* Extra small screens - much smaller */
    .hero-mockup {
        width: min(45%, 160px);
        max-width: 160px;
        margin: 0 auto 30px;
    }

    /* Mobile features adjustments for very small screens */
    .mobile-features {
        margin-top: 40px;
        padding: 30px 0;
    }

    .mobile-features h2 {
        font-size: 26px;
        margin-bottom: 35px;
        padding: 0 20px;
        line-height: 1.3;
    }

    .mobile-feature-list {
        margin: 0 -10px;
    }

    .mobile-feature-item {
        padding: 28px 25px;
    }

    .mobile-feature-content h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .mobile-feature-content h3::before {
        left: -20px;
        width: 10px;
        height: 10px;
    }

    .mobile-feature-content p {
        font-size: 15px;
        line-height: 1.5;
        padding-right: 5px;
    }
}

/* Landscape orientation on small devices */
@media (max-width: 968px) and (orientation: landscape) and (max-height: 600px) {
    .hero-container {
        padding: 30px 20px;
        gap: 15px;
    }
    
    .hero-mockup {
        width: min(30%, 150px); /* Much smaller in landscape */
        max-width: 150px;
        margin: 0 auto 15px;
    }
    
    .hero-content h1 {
        font-size: clamp(20px, 5vw, 28px);
        margin-bottom: 15px;
    }
    
    .hero-content p {
        font-size: 14px;
        margin-bottom: 20px;
    }
}

/* High-resolution displays - ensure Spline model stays crisp */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    #canvas3d {
        /* Force high-quality rendering on retina displays */
        image-rendering: -webkit-optimize-contrast;
        image-rendering: optimize-contrast;
        backface-visibility: hidden;
        transform: translateZ(0);
    }
}

/* Ultra-wide screens - prevent Spline model from getting too large */
@media (min-width: 1600px) {
    .hero-mockup {
        max-width: 500px; /* Proper sizing without scaling */
    }
}

/* Very short screens (like some tablets in landscape) */
@media (max-height: 500px) and (min-width: 768px) {
    .hero-mockup {
        max-width: 280px; /* Proper sizing without scaling */
    }
    
    .hero-container {
        height: 80vh;
    }
}

/* Improve navigation for small screens */
@media (max-width: 968px) {
    .nav-container {
        justify-content: space-between;
    }
    
    .logo {
        font-size: 22px;
    }
    
    .download-btn {
        padding: 8px 20px;
        font-size: 14px;
    }
}

/* Handle very wide but short screens (like some ultrawide monitors) */
@media (max-height: 600px) and (min-width: 1200px) {
    .hero-container {
        height: 90vh;
        padding: 40px 50px;
    }
    
    .hero-content h1 {
        font-size: clamp(32px, 3.5vw, 44px);
        margin-bottom: 20px;
    }
    
    .hero-content p {
        font-size: 18px;
        margin-bottom: 30px;
    }
}

/* Improve text readability on all small screens */
@media (max-width: 768px) {
    body {
        font-size: 16px;
        line-height: 1.6;
    }
    
    .legal-content {
        font-size: 16px;
        line-height: 1.7;
    }
    

}

/* Mobile Navigation Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle:hover {
    color: #38A89D;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 9999;
    padding: 80px 20px 20px;
}

.mobile-nav.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.mobile-nav-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    color: #333;
    cursor: pointer;
    padding: 10px;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.mobile-nav-links li {
    margin: 30px 0;
}

.mobile-nav-links a {
    color: #333;
    text-decoration: none;
    font-size: 24px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.mobile-nav-links a:hover {
    color: #38A89D;
}

.mobile-download-btn {
    margin-top: 40px;
    background: #38A89D;
    color: #fff;
    padding: 15px 35px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
}

/* Show mobile menu toggle on small screens */
@media (max-width: 968px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
    }
    
    .download-btn {
        display: none;
    }
}

/* Mobile Features - Hidden by default, shown only on mobile */
.mobile-features {
    display: none;
}

/* Show mobile features only on small screens */
@media (max-width: 968px) {
    .mobile-features {
        display: block;
        margin-top: 0; /* Remove top margin since it's now in hero */
        padding: 50px 0 30px;
        background: linear-gradient(to bottom, 
            rgba(248, 249, 250, 0.3) 0%, 
            rgba(248, 249, 250, 0.6) 10%,
            #fff 25%, 
            #fff 75%, 
            rgba(248, 249, 250, 0.6) 90%,
            rgba(248, 249, 250, 0.3) 100%
        );
        position: relative;
    }
    
    .mobile-features::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 4px;
        background: linear-gradient(135deg, #38A89D 0%, #4ECDC4 100%);
        border-radius: 2px;
        opacity: 0.8;
    }
    
    .mobile-features h2 {
        margin-bottom: 40px;
        padding: 0 30px;
        position: relative;
        padding-top: 20px;
    }
    

}

/* === Mobile layout override for sticky 3-D model (<=968px) === */
@media (max-width: 968px) {
    /* Basic vertical flow: hero text section (full viewport), sticky mockup, features sections */

    /* HERO TEXT SECTION */
    .hero-left-column {
        min-height: 100vh;            /* full viewport height */
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 0 20px;
        background: #fff;
    }

    .hero-content h1 {
        font-size: clamp(22px, 6vw, 32px);
    }

    /* 3-D MODEL – sticky */
    .hero-mockup {
        position: sticky;
        top: 70px;                   /* below fixed nav (≈70px) */
        height: 70vh;                /* occupies 70% of viewport */
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f8f9fa;
        z-index: 0;                  /* behind nav */
    }

    .hero-mockup canvas {
        width: auto !important;
        height: 100% !important;
        max-height: 100%;
        object-fit: contain;         /* preserve ratio */
        aspect-ratio: 9/19.5;        /* keep phone proportions */
    }

    /* FEATURES LIST */
    .mobile-features {
        display: block;
        position: static;            /* in normal flow */
        padding: 0;
        background: #fff;
    }

    .mobile-feature-list {
        margin: 0;
        padding: 0;
    }

    .mobile-feature-item {
        min-height: 100vh;           /* full viewport per feature */
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 0 20px;
        border-bottom: 1px solid rgba(0,0,0,.05);
    }

    .mobile-feature-content h3 {
        font-size: 22px;
        margin-bottom: 12px;
    }

    .mobile-feature-content p {
        font-size: 16px;
        line-height: 1.45;
    }

    /* Hide previously added mobile toggle button */

}

/* Theme Configuration Section */
.theme-section {
    min-height: 100vh;
    max-height: 120vh; /* Limit maximum height */
    background: linear-gradient(135deg, #38A89D 0%, #4ECDC4 50%, #38A89D 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 80px 0; /* Add padding to ensure content doesn't touch edges */
}

.theme-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.theme-container {
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    padding: 0 50px;
    position: relative;
    z-index: 2;
}

.theme-content {
    color: white;
}

.theme-content h2 {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    margin-bottom: 30px;
    line-height: 1.2;
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.theme-content p {
    font-size: 20px;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 500px;
}

.theme-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.theme-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 16px 24px;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 16px;
    font-weight: 600;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.theme-btn.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.theme-icon {
    font-size: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.theme-showcase {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-image-stack {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 1000px;
}

.theme-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8) rotateY(15deg);
    overflow: hidden;
}

.theme-image.active {
    opacity: 1 !important;
    transform: translate(-50%, -50%) scale(1) rotateY(0deg) !important;
    z-index: 999 !important;
    background: rgba(255, 255, 255, 0.95) !important;
}

.theme-image.hidden {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6) rotateY(45deg) translateY(200px);
    z-index: 1;
}

.theme-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
}

.theme-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.theme-image:hover .theme-overlay {
    transform: translateY(0);
}

.theme-overlay h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.theme-overlay p {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.4;
}

/* Mobile Theme Section */
.mobile-theme {
    display: none;
    padding: 40px 20px;
    text-align: center;
}

.mobile-theme-content {
    margin-bottom: 40px;
}

.mobile-theme-content h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 20px;
    color: white;
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-theme-content p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 30px;
}

.mobile-theme-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 30px;
}

.mobile-theme-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 600;
}

.mobile-theme-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.mobile-theme-btn.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

.mobile-theme-icon {
    font-size: 18px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
}

.mobile-theme-images {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 400px;
    margin: 0 auto;
}

.mobile-theme-image {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    overflow: hidden;
    opacity: 0.5;
    transform: scale(0.9);
}

.mobile-theme-image.active {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.mobile-theme-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

.mobile-theme-overlay {
    padding: 16px;
    text-align: center;
}

.mobile-theme-overlay h3 {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}

.mobile-theme-overlay p {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* Mobile Responsive for Theme Section */
@media (max-width: 968px) {
    .theme-container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 20px;
    }
    
    .theme-content {
        text-align: center;
        order: 2;
    }
    
    .theme-showcase {
        order: 1;
        height: 400px;
    }
    
    .theme-image {
        width: 280px;
    }
    
    .theme-content h2 {
        font-size: 28px;
    }
    
    .theme-content p {
        font-size: 18px;
    }
    
    .theme-buttons {
        justify-content: center;
    }
    
    /* Hide desktop theme on mobile */
    .theme-showcase {
        display: none;
    }
    
    /* Show mobile theme on mobile */
    .mobile-theme {
        display: block;
    }
}

@media (max-width: 480px) {
    .theme-container {
        padding: 0 15px;
    }
    
    .theme-image {
        width: 260px;
    }
    
    .theme-content h2 {
        font-size: 24px;
    }
    
    .theme-content p {
        font-size: 16px;
    }
    
    .theme-btn {
        padding: 14px 20px;
        font-size: 14px;
    }
    
    .mobile-theme {
        padding: 30px 15px;
    }
    
    .mobile-theme-content h2 {
        font-size: 24px;
    }
    
    .mobile-theme-content p {
        font-size: 16px;
    }
    
    .mobile-theme-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .mobile-theme-btn {
        width: 200px;
        justify-content: center;
    }
}