:root {
    --green-900: #1b4332;
    --green-800: #2d6a4f;
    --green-700: #40916c;
    --green-600: #52b788;
    --green-500: #74c69d;
    --green-400: #95d5b2;
    --green-300: #b7e4c7;
    --green-200: #d8f3dc;
    --green-100: #f0fdf4;

    --gray-900: #1a202c;
    --gray-700: #4a5568;
    --gray-500: #a0aec0;
    --gray-200: #edf2f7;
    --gray-100: #f7fafc;
    --gray-50: #fcfdfd;

    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --font-serif: 'Source Sans 3', serif;
    --font-display: 'Poppins', sans-serif;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    font-family: var(--font-sans);
    margin: 0;
    padding: 0;
    background-color: var(--gray-50);
    color: var(--gray-700);
    line-height: 1.5;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    backdrop-filter: none;
    border-bottom: 1px solid #e9efec;
    z-index: 1000;
    padding: 0.5rem 0;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    min-height: 56px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding-left: 0;
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 32px;
    width: 32px;
    border-radius: 50%;
}

.logo span {
    font-size: 2rem;
    font-weight: 700;
    color: var(--green-900);
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

nav {
    display: flex;
    gap: 0.2rem;
    align-items: center;
    padding: 0.26rem;
    border-radius: 999px;
    background: #f4f6f5;
    border: 1px solid #edf1ef;
}

nav a {
    font-weight: 600;
    color: #2f3e36;
    text-decoration: none;
    font-size: 0.88rem;
    position: relative;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

nav a:hover {
    color: var(--green-900);
    background: #e9f2ed;
    transform: none;
}

nav a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0.25rem;
    width: 6px;
    height: 2px;
    background: #5a9a78;
    border-radius: 2px;
    transform: translateX(-50%) scaleX(0);
    transition: transform 0.24s ease;
}

nav a:hover::after,
nav a.active::after {
    transform: translateX(-50%) scaleX(1);
}

nav a.active {
    background: #dfeee5;
    color: var(--green-900);
}

.auth-links {
    display: flex;
    font-weight: 600;
    gap: 0.38rem;
    align-items: center;
    padding-right: 0;
}

.auth-links a {
    text-decoration: none;
    font-size: 0.86rem;
    padding: 0.52rem 0.9rem;
    border-radius: 99px;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.auth-links .signup {
    color: #2c3b34;
    background-color: #f4f6f5;
    border: 1px solid #edf1ef;
}

.auth-links .signup:hover {
    background-color: #ebefed;
    border-color: #e1e9e4;
}

.auth-links .login {
    background: #2f7d5b;
    color: white;
    border: 1px solid #2a6d4f;
}

.auth-links .login:hover {
    transform: none;
    box-shadow: none;
    background: #286f50;
}

main {
    padding-top: 72px;
    min-height: calc(100vh - 72px);
    background:
        linear-gradient(115deg, rgba(8, 24, 17, 0.74), rgba(19, 53, 39, 0.58)),
        url("bgimg.jpg") center center / cover no-repeat;
    display: flex;
    align-items: stretch;
}

.hero-shell {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    max-width: 1240px;
    margin: 0 auto;
    padding: 2.2rem 2rem 1.6rem;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    max-width: 680px;
    padding: 0;
}

.hero-copy .eyebrow {
    font-size: 0.82rem;
    font-weight: 700;
    color: #d9f9e9;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.4rem 0.95rem;
    background-color: rgba(255, 255, 255, 0.13);
    border-radius: 99px;
    width: fit-content;
}

.hero-copy h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.2vw, 3.85rem);
    font-weight: 700;
    line-height: 1.12;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin: 0;
    max-width: 14ch;
    text-wrap: balance;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
}

.hero-copy p {
    font-size: clamp(1rem, 1.3vw, 1.18rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.92);
    max-width: 46ch;
    margin: 0;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 0.45rem;
}

.hero-actions a {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    padding: 0.9rem 1.5rem;
    border-radius: 99px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-md);
}

#scan {
    background-color: #ffffff;
    color: var(--green-900);
    border: 1px solid transparent;
}

#scan i {
    color: var(--green-900);
}

#scan:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: var(--shadow-lg);
}

.hero-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.hero-secondary:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: var(--shadow-lg);
    border-color: #ffffff;
}

.hero-info {
    display: flex;
    gap: 2rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 0.55rem;
    padding-left: 0;
    border-left: none;
    font-size: 0.95rem;
}

.hero-visual {
    display: none;
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    object-fit: cover;
}

.hero-stat {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: absolute;
    bottom: -1.5rem;
    box-shadow: var(--shadow-md);
}

.hero-stat strong {
    font-size: 2rem;
    font-weight: 800;
    color: var(--green-900);
    display: block;
}

.hero-stat span {
    font-weight: 600;
    color: var(--green-800);
}

.feature-strip {
    background: linear-gradient(180deg, #f8fcfa 0%, #ffffff 100%);
    padding: 5rem 2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1280px;
    margin: 0 auto;
}

.feature-card {
    background-color: #ffffff;
    padding: 2.2rem;
    border-radius: 1.1rem;
    border: 1px solid var(--gray-200);
    text-align: left;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

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

.feature-card i {
    font-size: 2.5rem;
    color: var(--green-700);
    margin-bottom: 1.5rem;
    display: inline-block;
    background-color: var(--green-200);
    padding: 1rem;
    border-radius: 50%;
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

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

@media (max-width: 1200px) {
    nav {
        display: none;
    }

    .container {
        min-height: 62px;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 992px) {
    .hero-shell {
        justify-content: center;
        padding-top: 2rem;
        padding-bottom: 1.5rem;
        text-align: left;
    }

    .hero-copy {
        max-width: 100%;
    }
    
    .hero-info {
        flex-wrap: wrap;
        gap: 1rem 1.4rem;
    }

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

@media (max-width: 768px) {
    .hero-copy h1 {
        font-size: clamp(1.8rem, 9vw, 2.6rem);
    }

    .hero-copy {
        gap: 1.05rem;
    }

    .hero-shell {
        padding-top: 1.6rem;
        padding-bottom: 1.2rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
    }

    .hero-actions a {
        width: 100%;
        justify-content: center;
    }

    .hero-info {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
        padding-left: 0;
    }
}

/* Dropdown menu */
.dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.62rem);
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffffff;
    color: var(--gray-700);
    box-shadow: 0 12px 24px rgba(19, 50, 36, 0.12);
    border-radius: 0.8rem;
    min-width: 190px;
    z-index: 1000;
    padding: 0.45rem 0;
    border: 1px solid #e8efea;
    backdrop-filter: none;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.dropdown-menu a:hover {
    background-color: #edf4ef;
    color: var(--green-900);
}

.dropdown-menu a i {
    margin-right: 0.75rem;
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

#scanPlant i.fa-chevron-down {
    margin-left: 0.3rem;
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.dropdown:hover #scanPlant i.fa-chevron-down {
    transform: rotate(180deg);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.modal-content h2 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    transition: color 0.2s ease;
}

.close:hover {
    color: var(--gray-900);
}

#drop-area {
    border: 2px dashed var(--green-400);
    border-radius: 0.75rem;
    padding: 3rem 2rem;
    text-align: center;
    background-color: var(--green-100);
    transition: all 0.2s ease-in-out;
    font-family: var(--font-sans);
    color: var(--green-800);
    font-size: 1.1rem;
    font-weight: 600;
    position: relative;
}

#drop-area:hover {
    background-color: var(--green-200);
    border-color: var(--green-600);
}

#drop-area.dragover {
    background-color: var(--green-300);
    border-color: var(--green-700);
}

#drop-area p {
    margin: 0.5rem 0;
}

#fileInput {
    margin-top: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.mobile-menu-toggle {
    display: none;
    background: #f1f4f2;
    border: 1px solid #e3ebe6;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    font-size: 1.12rem;
    color: #305141;
    cursor: pointer;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100%;
    background-color: white;
    box-shadow: var(--shadow-lg);
    z-index: 1002;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: right 0.3s ease-in-out;
}

.mobile-nav.is-open {
    right: 0;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--gray-500);
    cursor: pointer;
    align-self: flex-end;
    margin-bottom: 1rem;
}

.mobile-nav a {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-700);
    text-decoration: none;
}

.mobile-nav hr {
    border: none;
    border-top: 1px solid var(--gray-200);
    margin: 1rem 0;
}

.mobile-nav .login {
    background-color: var(--green-800);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    text-align: center;
}

