/* ===================================
   Melblon Website - Main Stylesheet
   Mobile-First Responsive Design
   =================================== */

/* ===================================
   CSS Variables & Reset
   =================================== */
:root {
    /* Brand Colors */
    --primary-green: #69b387;
    --secondary-green: #5a9c73;
    --light-sage: #F5F5F0;
    --text-dark: #2c3e50;
    --text-gray: #64748b;
    --text-light: #94a3b8;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #69b387 0%, #5a9c73 100%);
    --gradient-light: linear-gradient(135deg, rgba(105, 179, 135, 0.1) 0%, rgba(90, 156, 115, 0.1) 100%);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Typography */
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-base);
}

body {
    font-family: var(--font-family);
    line-height: var(--line-height-base);
    color: var(--text-dark);
    background-color: #ffffff;
    overflow-x: hidden;
}

/* ===================================
   Typography
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-gray);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

/* ===================================
   Container & Layout
   =================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

section {
    padding: var(--spacing-xl) 0;
}

/* ===================================
   Navigation Bar
   =================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-sm) 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.nav-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.nav-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.nav-links {
    display: none;
    list-style: none;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-link {
    color: var(--text-gray);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-base);
}

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

.nav-divider {
    width: 1px;
    height: 24px;
    background: #e0e0e0;
    margin: 0 0.5rem;
    align-self: center;
}

.nav-contact {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-gray);
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition-base);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    position: relative;
}

.nav-contact:hover {
    color: var(--primary-green);
    background: var(--gradient-light);
}

.nav-contact .material-icons {
    font-size: 1.125rem;
}

.nav-contact-text {
    display: inline;
    white-space: nowrap;
}

.nav-cta {
    background: var(--gradient-primary);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-base);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dark);
    padding: var(--spacing-xs);
}

.mobile-menu-toggle .material-icons {
    font-size: 1.75rem;
}

/* Mobile Menu Active State */
.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
    gap: 0.5rem;
    z-index: 1000;
}

/* Hide contact text and divider on mobile by default */
@media (max-width: 767px) {
    .nav-contact-text {
        display: none;
    }
    
    .nav-divider {
        display: none;
    }
    
    /* Show in mobile menu when expanded */
    .nav-links.active .nav-contact-text {
        display: inline;
    }
    
    .nav-links.active .nav-divider {
        display: block;
        width: 100%;
        height: 1px;
        margin: 0.5rem 0;
    }
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-base);
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

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

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

.btn-large {
    padding: 1.125rem 2.25rem;
    font-size: 1.125rem;
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    background: var(--gradient-light);
    padding: var(--spacing-xl) 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero .container {
    display: grid;
    gap: var(--spacing-lg);
    align-items: center;
}

.hero-content {
    text-align: center;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-gray);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
}

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

.phone-hero {
    position: relative;
    margin-top: 1rem;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.phone-frame {
    width: 200px;
    height: 400px;
    background: #000;
    border-radius: 36px;
    padding: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    position: relative;
    max-width: 100%;
    height: auto;
    aspect-ratio: 200/400;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.phone-frame .screen {
    width: 100%;
    height: 100%;
    border-radius: 34px;
    overflow: hidden;
    background: #fff;
}

.phone-frame .screen img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
}

.phone-frame.side {
    position: absolute;
    top: 0;
    transform: translateX(-160px);
    opacity: 0.95;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.phone-frame.side.right {
    transform: translateX(160px);
}

.phone-frame.side:hover {
    transform: translateX(-120px) rotate(0deg) scale(1.1);
    z-index: 15;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
}

.phone-frame.side.right:hover {
    transform: translateX(120px) rotate(0deg) scale(1.1);
    z-index: 15;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
}

.phone-frame:hover {
    transform: scale(1.05);
    z-index: 10;
}

/* ===================================
   Section Headers
   =================================== */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-gray);
    font-weight: 400;
}

/* ===================================
   About Section
   =================================== */
.about {
    background: white;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.about-card {
    background: var(--gradient-light);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition-base);
    border: 2px solid transparent;
}

.about-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-green);
}

.about-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.about-card-text {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-gray);
}

.about-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

/* ===================================
   Features Section
   =================================== */
.features {
    background: var(--light-sage);
}

.features-grid {
    display: grid;
    gap: var(--spacing-md);
    grid-template-columns: 1fr;
}

.feature-card {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.feature-icon .material-icons {
    font-size: 2.5rem;
    color: white;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.feature-description {
    font-size: 1rem;
    color: var(--text-gray);
    line-height: 1.7;
}

/* ===================================
   How It Works Section
   =================================== */
.how-it-works {
    background: white;
}

.steps-container {
    display: grid;
    gap: var(--spacing-lg);
    max-width: 900px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
}

.step-description {
    font-size: 1rem;
    color: var(--text-gray);
    line-height: 1.7;
}

/* ===================================
   FAQ Section
   =================================== */
.faq {
    background: var(--light-sage);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: var(--spacing-sm);
}

.faq-item {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: white;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: var(--transition-base);
}

.faq-question:hover {
    background: var(--gradient-light);
}

.faq-icon {
    color: var(--primary-green);
    transition: transform var(--transition-base);
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.faq-answer p {
    padding: 0 var(--spacing-md) var(--spacing-md);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-gray);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* ===================================
   CTA Section
   =================================== */
.cta-section {
    background: var(--gradient-primary);
    color: white;
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: var(--spacing-sm);
}

.cta-text {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-md);
}

.cta-section .btn-primary {
    background: white;
    color: var(--primary-green);
}

.cta-section .btn-primary:hover {
    background: var(--light-sage);
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--text-dark);
    color: white;
    padding: var(--spacing-lg) 0 var(--spacing-md);
    text-align: center;
}

.footer-content {
    margin-bottom: var(--spacing-md);
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.footer-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.footer-tagline {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

.footer-contact {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-contact-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    margin-bottom: var(--spacing-md);
}

.footer-contact-items {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition-base);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
}

.footer-contact-item:hover {
    color: var(--primary-green);
    background: rgba(105, 179, 135, 0.1);
}

.footer-contact-item .material-icons {
    font-size: 1.25rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-light);
    font-size: 0.95rem;
    transition: var(--transition-base);
}

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

.footer-copyright {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* ===================================
   Responsive Design - Tablet
   =================================== */
@media (min-width: 768px) {
    /* Typography */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    /* Container */
    .container {
        padding: 0 var(--spacing-md);
    }
    
    section {
        padding: 5rem 0;
    }
    
    /* Navigation */
    .mobile-menu-toggle {
        display: none;
    }
    
    .nav-links {
        display: flex;
        flex-direction: row;
    }
    
    /* Hero */
    .hero .container {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero-content {
        text-align: left;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-cta {
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .phone-frame { 
        width: 175px;
        height: 350px;
    }
    
    .phone-frame.side {
        transform: translateX(-140px);
    }
    
    .phone-frame.side.right {
        transform: translateX(140px);
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Navigation Contact - Show full text on tablet+ */
    .nav-contact-text {
        display: inline;
    }
    
    .nav-divider {
        display: block;
    }
    
    /* Footer Contact */
    .footer-contact-items {
        flex-direction: row;
        justify-content: center;
        gap: var(--spacing-lg);
    }
}

/* ===================================
   Responsive Design - Desktop
   =================================== */
@media (min-width: 1024px) {
    /* Typography */
    h1 { font-size: 3rem; }
    h2 { font-size: 2.25rem; }
    
    /* Container */
    .container {
        padding: 0 var(--spacing-lg);
    }
    
    /* Hero */
    .hero-title {
        font-size: 3.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .phone-hero {
        height: 450px;
    }
    
    .phone-frame {
        width: 225px;
        height: 450px;
    }
    
    .phone-frame.side {
        transform: translateX(-180px);
    }
    
    .phone-frame.side.right {
        transform: translateX(180px);
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Steps */
    .steps-container {
        gap: var(--spacing-xl);
    }
}

/* ===================================
   Animations & Utilities
   =================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Smooth Scroll Offset for Sticky Nav */
html {
    scroll-padding-top: 80px;
}

/* Focus Styles for Accessibility */
*:focus-visible {
    outline: 3px solid var(--primary-green);
    outline-offset: 2px;
}
