/**
 * Landing Page Styles
 * Implements the "Rustic Cyber-Agri" identity for the public-facing portal.
 */

:root {
    --landing-bg: #F4F1E1;
    --landing-text: #3B2B20;
    --landing-accent: #3B2B20; /* Solid Earthy Brown */
    --landing-footer-bg: #EAE5D1;
    --landing-glass: rgba(255, 255, 255, 0.2);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--landing-bg);
    color: var(--landing-text);
    font-family: 'PT Sans', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Phase 1: Navigation Bar (Flexbox) */
.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 5%;
    background: transparent;
    width: 100%;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--landing-text);
    text-decoration: none;
}

.btn-create-account {
    background-color: var(--landing-accent);
    color: #FFFFFF;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s ease, opacity 0.2s ease;
    border: none;
    display: inline-block;
}

.btn-create-account:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Phase 2: Hero Section (2-Column) */
.hero-section {
    display: flex;
    align-items: center;
    padding: 60px 5%;
    min-height: 80vh;
    gap: 60px;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 3.8rem;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 32px;
    opacity: 0.9;
}

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image-container img {
    width: 100%;
    max-width: 600px;
    border-radius: 48px; /* Large rounded image */
    box-shadow: 0 24px 48px rgba(59, 43, 32, 0.15);
    object-fit: cover;
}

/* Phase 3: Features Grid (3-Column) */
.features-section {
    padding: 100px 5%;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.feature-card svg {
    width: 40px; /* Small SVG icons */
    height: 40px;
    margin-bottom: 20px;
    fill: var(--landing-accent);
}

/* Phase 4: Footer Section (3-Column Link Grid) */
.landing-footer {
    background-color: var(--landing-footer-bg);
    padding: 80px 5% 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
}

.footer-col h4 {
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

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

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--landing-text);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 1;
}

/* Tablet Responsiveness */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }
}

/* Drawer and Mobile Auth UI */
.auth-drawer-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none; /* Hidden by default */
}

.auth-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background-color: #F4F1E1;
    z-index: 1000;
    padding: 24px;
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}

@keyframes slideInRight {
    from { right: -100%; }
    to { right: 0; }
}

.auth-drawer.open {
    right: 0;
    animation: slideInRight 0.3s ease-out;
}

.auth-drawer-overlay.open {
    display: block;
}

.mobile-auth-icon {
    display: none; /* Hidden globally */
}

@media (max-width: 1024px) {
    /* Navigation Adjustments */
    .landing-nav { padding: 16px 5%; }
    .nav-links { display: none; } /* Hide middle links on mobile */
    .auth-buttons { display: flex; gap: 8px; align-items: center; }
    .btn-create-account, #btn-signin { padding: 8px 12px; font-size: 0.9em; margin: 0; }

    /* Hide standard buttons in favor of the mobile icon */
    .landing-nav .btn-create-account, 
    .landing-nav #btn-signin {
        display: none !important;
    }

    .mobile-auth-icon {
        display: flex;
        align-items: center;
        cursor: pointer;
    }

    /* Hero Section Adjustments */
    .hero-section { 
        flex-direction: column; 
        padding: 40px 5%; 
        gap: 40px; 
        text-align: left; 
    }
    .hero-content h1 { font-size: 2.5rem; margin-bottom: 16px; }
    .hero-content p { font-size: 1.1rem; }
    
    /* Stack Hero Buttons Full Width */
    .hero-buttons { 
        flex-direction: column !important; 
        width: 100%; 
    }
    .hero-buttons button, .hero-buttons a { 
        width: 100%; 
        text-align: center; 
        justify-content: center;
    }

    /* Collapse Grids */
    .features-grid, .footer-grid { 
        grid-template-columns: 1fr; 
        gap: 32px;
    }
    .trust-section {
        flex-wrap: wrap;
        gap: 40px;
    }
}