/* =========================================
   1. CSS Variables (Apple-style Theme)
   ========================================= */
   :root {
    --primary-color: #482D6F; /* Deep Purple */
    --accent-color: #BB9C4E;  /* Muted Gold */
    --accent-hover: #A38744;  /* Darker Gold for hover states */
    --text-color: #1D1D1F;    /* Apple-style deep dark gray/black */
    --text-secondary: #86868B;
    --bg-color: #F5F5F7;      /* Clean off-white background */
    --white: #FFFFFF;
    
    /* Prioritizing Apple's SF Pro, falling back to other system sans-serifs */
    --font-main: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* =========================================
   2. Base Reset & Typography
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
    color: var(--primary-color);
    letter-spacing: -0.02em; /* Bold, tight look for headings */
}

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

/* =========================================
   3. Navigation Structure (Glassmorphism)
   ========================================= */
header {
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 150px; /* Constrains the stacked logo properly in the header */
    width: 500px;
    object-fit: contain;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

nav a {
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

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

.nav-cta {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 0.5rem 1.25rem;
    border-radius: 980px; /* Pill shape */
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.nav-cta:hover {
    background-color: var(--accent-hover);
    color: var(--white);
}

/* =========================================
   4. Hero Section Layout
   ========================================= */
#home {
    text-align: center;
    padding: 6rem 5% 5rem;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#home h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    max-width: 900px;
    margin-bottom: 1rem;
    line-height: 1.1;
}

#home p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.cta-button {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 980px;
    margin-bottom: 4rem;
    transition: background 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
    background-color: var(--accent-hover);
    transform: scale(1.02);
}

#home img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* =========================================
   5. Services Grid Layout
   ========================================= */
#services {
    padding: 6rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

#services-heading {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background-color: var(--white);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.service-card img {
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--text-secondary);
}

/* =========================================
   6. RFQ Form Styles
   ========================================= */
#contact {
    padding: 5rem 5% 6rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: 3rem;
}

#contact-heading {
    font-size: 2.5rem;
}

.contact-header p {
    color: var(--text-secondary);
}

#rfq-form {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

fieldset {
    border: none;
    margin-bottom: 2.5rem;
}

legend {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    width: 100%;
    border-bottom: 1px solid #E5E5EA;
    padding-bottom: 0.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

input, select, textarea {
    padding: 1rem;
    border: 1px solid transparent;
    border-radius: 12px;
    font-family: var(--font-main);
    font-size: 1rem;
    background-color: #F5F5F7;
    transition: all 0.3s ease;
}

/* Minimalist Focus States */
input:focus, select:focus, textarea:focus {
    outline: none;
    background-color: var(--white);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(187, 156, 78, 0.15);
}

.submit-btn {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 980px;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
    transition: background 0.3s ease, transform 0.1s ease;
}

.submit-btn:hover {
    background-color: #3a2459;
}

.submit-btn:active {
    transform: scale(0.98);
}

/* =========================================
   7. Footer
   ========================================= */
footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 3rem 2rem;
    font-size: 0.9rem;
}

/* =========================================
   8. Mobile Navigation & Responsiveness
   ========================================= */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--primary-color);
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
    position: relative;
    border-radius: 2px;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
        z-index: 2000;
    }
    
    nav ul {
        position: fixed;
        top: 0;
        right: -100%; 
        height: 100vh;
        width: 100%;
        max-width: 350px;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        transition: right 0.4s cubic-bezier(0.1, 0.7, 0.1, 1);
        z-index: 1500;
    }
    
    nav ul.active {
        right: 0; 
    }

    .mobile-menu-toggle[aria-expanded="true"] .hamburger {
        background-color: transparent; 
    }
    
    .mobile-menu-toggle[aria-expanded="true"] .hamburger::before {
        transform: translateY(6px) rotate(45deg);
    }
    
    .mobile-menu-toggle[aria-expanded="true"] .hamburger::after {
        transform: translateY(-6px) rotate(-45deg);
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    #rfq-form {
        padding: 2rem 1.5rem;
    }
}