/* ===== CSS Variables ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --accent: #f59e0b;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --gradient-secondary: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --transition: all 0.3s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-700);
    background: var(--white);
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== Utility Classes ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-tag {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-desc {
    font-size: 1.125rem;
    color: var(--gray-600);
    line-height: 1.7;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(37, 99, 235, 0.5);
}

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

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-full {
    width: 100%;
}

.btn-nav {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
}

.logo-icon {
    font-size: 1.75rem;
}

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

.nav-menu a {
    font-weight: 500;
    color: var(--gray-700);
    transition: var(--transition);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--dark);
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0fdf4 100%);
    z-index: -1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
}

.hero-content {
    max-width: 800px;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 600px;
}

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

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

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* ===== About Section ===== */
.about {
    padding: 100px 0;
    background: var(--white);
}

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

.about-card {
    padding: 2.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    transition: var(--transition);
}

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

.about-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.about-icon svg {
    width: 30px;
    height: 30px;
    color: var(--white);
}

.about-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.about-card p {
    color: var(--gray-600);
    line-height: 1.7;
}

/* ===== DeCODE Section ===== */
.decode {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
}

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

.decode-tagline {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

.decode-desc {
    font-size: 1.125rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.decode-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.feature h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.feature p {
    font-size: 0.9rem;
    color: var(--gray-500);
}

.decode-visual {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.supply-chain {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.chain-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.step-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.5rem;
    background: var(--gray-100);
}

.step-icon.producer { background: #dbeafe; }
.step-icon.distributor { background: #fce7f3; }
.step-icon.retailer { background: #d1fae5; }
.step-icon.consumer { background: #fef3c7; }

.chain-step span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-600);
}

.chain-arrow {
    color: var(--gray-400);
    font-size: 1.25rem;
}

.qr-demo {
    display: flex;
    justify-content: center;
}

.phone-mockup {
    width: 200px;
    height: 350px;
    background: var(--dark);
    border-radius: 30px;
    padding: 10px;
    box-shadow: var(--shadow-xl);
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--white);
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.scan-animation {
    width: 100px;
    height: 100px;
    border: 3px solid var(--primary);
    border-radius: var(--radius);
    position: relative;
    animation: pulse 2s infinite;
}

.scan-animation::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    animation: scan 2s infinite;
}

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

@keyframes scan {
    0%, 100% { top: 0; }
    50% { top: 100%; }
}

.phone-screen p {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* ===== Freshness Master Section ===== */
.freshness {
    padding: 100px 0;
    background: var(--white);
}

.freshness-how {
    margin-bottom: 4rem;
}

.freshness-how h3 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 2rem;
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.how-card {
    padding: 2rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-radius: var(--radius-xl);
    border: 1px solid #d1fae5;
}

.how-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary);
    opacity: 0.3;
    margin-bottom: 0.5rem;
}

.how-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.how-card p {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.freshness-results h3 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 2rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.result-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.result-card:hover {
    transform: translateY(-5px);
}

.result-image {
    height: 180px;
    background-size: cover;
    background-position: center;
}

.durian-bg {
    background-image: url('images/durian.jpg');
    background-size: cover;
    background-position: center;
}

.durian-bg::after {
    content: none;
}

.flower-bg {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
}

.flower-bg::after {
    content: '🌹';
    font-size: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.shipping-bg {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.shipping-bg::after {
    content: '🚢';
    font-size: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.result-content {
    padding: 1.5rem;
}

.result-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.result-stat {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.big-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary);
}

.stat-unit {
    font-size: 1rem;
    color: var(--gray-500);
}

.result-content p {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.freshness-cta {
    background: var(--gradient-secondary);
    padding: 3rem;
    border-radius: var(--radius-xl);
    text-align: center;
}

.cta-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.75rem;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.freshness-cta .btn-primary {
    background: var(--white);
    color: var(--secondary-dark);
    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.2);
}

/* ===== Contact Section ===== */
.contact {
    padding: 100px 0;
    background: var(--gray-50);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info p {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-item h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.contact-item p {
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark);
    margin: 0;
}

.map-link {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--primary);
    margin-top: 0.25rem;
    transition: var(--transition);
}

.map-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.contact-form-wrapper {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    color: var(--gray-400);
    padding: 60px 0 30px;
}

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

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-links h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    font-size: 0.9rem;
    transition: var(--transition);
}

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

.footer-links li {
    font-size: 0.9rem;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--gray-800);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
    .decode-wrapper,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        opacity: 0;
        transition: var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-stats {
        gap: 2rem;
    }

    .supply-chain {
        justify-content: center;
    }

    .chain-arrow {
        display: none;
    }

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

    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .section-header {
        margin-bottom: 3rem;
    }

    .about-card,
    .how-card {
        padding: 1.5rem;
    }

    .contact-form-wrapper {
        padding: 1.5rem;
    }
}
