/* Table of Contents
--------------------------------------------------
1.  :root Variables
2.  Global Resets & Base Styles
3.  Utility Classes (e.g., .container)
4.  Typography (h1-h6, p, a)
5.  Buttons (.btn, .btn-outline)
6.  Header & Navigation (.main-header, .logo, .main-nav, .menu-toggle)
7.  Hero Section (#hero, .hero-content)
8.  General Section Styling (.section, .section-title)
9.  About Section (#about)
10. Products Section (#products, .products-grid, .product-card)
11. Services Section (#services, .services-grid, .service-card)
12. Philosophy Section (#philosophy, .philosophy-item)
13. Product Page Specific Styles
    - .product-hero-bg, .product-page-hero
    - .product-description
    - .fund-status-highlight
    - .brochure-download-section
14. Newsletter Section (#newsletter, .newsletter-form)
15. Contact & Forms (.contact-form, .waitlist-form, .form-group, input, textarea, select, form messages)
16. Footer (.main-footer)
17. Responsive Adjustments
-------------------------------------------------- */

/* 1. :root Variables
-------------------------------------------------- */
:root {
    --primary-bg: #121212; /* Very dark grey, almost black */
    --secondary-bg: #1E1E1E; /* Slightly lighter dark grey */
    --tertiary-bg: #2a2a2a; /* For elements like input fields */
    --primary-text: #E0E0E0; /* Light grey for readability */
    --secondary-text: #B0B0B0; /* Muted grey */
    --accent-color: #00AEEF; /* A bright, modern blue for accents */
    --accent-hover: #008cbf;
    --accent-hover-transparent: rgba(0, 174, 239, 0.3); /* For box-shadows on focus */
    --border-color: #333333;
    --card-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    --card-hover-shadow: 0 12px 35px rgba(0,0,0,0.4);
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --success-color: #28a745;
    --error-color: #dc3545;
}

/* 2. Global Resets & Base Styles
-------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size */
}

body {
    font-family: var(--font-body);
    background-color: var(--primary-bg);
    color: var(--primary-text);
    line-height: 1.7;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* 3. Utility Classes
-------------------------------------------------- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.sr-only { /* For visually hidden labels, accessible to screen readers */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* 4. Typography
-------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary-text);
    margin-bottom: 0.8em;
}

h1 { font-size: 2.8rem; line-height: 1.2; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p {
    margin-bottom: 1em;
    color: var(--secondary-text);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
}

/* 5. Buttons
-------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--accent-color);
    color: #fff;
    border-radius: 5px;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    color: #fff; /* Ensure text color remains white on hover */
    box-shadow: 0 4px 10px rgba(0, 174, 239, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}
.btn-outline:hover {
    background-color: var(--accent-color);
    color: #fff;
}
.btn i { /* Icon spacing in button */
    margin-right: 8px;
}

/* 6. Header & Navigation
-------------------------------------------------- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background-color: rgba(18, 18, 18, 0.9); /* Semi-transparent primary-bg */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* For Safari */
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: padding 0.3s ease;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-text);
}
.logo span {
    color: var(--accent-color);
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul li a {
    font-family: var(--font-heading);
    font-weight: 400; /* Was 600, adjusted for better balance */
    font-size: 0.95rem; /* Slightly adjusted */
    color: var(--primary-text);
    padding-bottom: 5px;
    position: relative;
    text-transform: uppercase; /* Added for a more formal look */
    letter-spacing: 0.5px; /* Added */
}
.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}
.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
}
.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: var(--accent-color); /* Highlight active/hovered link text */
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--primary-text);
    cursor: pointer;
    padding: 5px; /* Added for better touch target */
}
.menu-toggle i {
    transition: transform 0.3s ease;
}
.main-nav.active + .menu-toggle i.fa-bars { /* If using JS to change icon class */
   transform: rotate(90deg);
}
.main-nav.active + .menu-toggle i.fa-times {
    transform: rotate(0deg);
}


/* 7. Hero Section
-------------------------------------------------- */
#hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* background: linear-gradient(rgba(18, 18, 18, 0.85), rgba(18, 18, 18, 0.85)), url('https://placehold.co/1920x1080/121212/1E1E1E?text=Hero+Background') no-repeat center center/cover; */ /* Placeholder */
    /* Replace with your actual hero image: url('../images/hero-banner.jpg') */
    padding-top: 80px; /* Account for fixed header, adjust if header padding changes */
    position: relative; /* For potential pseudo-elements or overlays */
}

.hero-content {
    max-width: 800px;
    animation: fadeInScaleUp 1s ease-out forwards;
}

@keyframes fadeInScaleUp {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}


#hero h1 {
    font-size: 3.5rem; /* Responsive adjustments will handle smaller screens */
    font-weight: 700;
    margin-bottom: 0.5em;
    color: #fff; /* Brighter for hero */
}
#hero h1 span {
    color: var(--accent-color);
}

#hero p {
    font-size: 1.2rem;
    margin-bottom: 1.5em;
    color: var(--secondary-text); /* Keep secondary for contrast */
    max-width: 600px; /* Constrain paragraph width */
    margin-left: auto;
    margin-right: auto;
}
#hero .btn {
    margin-top: 10px; /* Space above button */
}

/* 8. General Section Styling
-------------------------------------------------- */
.section {
    padding: 80px 0;
}
/* Optional: Alternate background for sections if desired */
/* .section:nth-child(even) {
    background-color: var(--secondary-bg);
} */

.section-title {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}
.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-transform: capitalize; /* Slight styling tweak */
}
.section-title p { /* Subtitle for section */
    font-size: 1.1rem;
    color: var(--secondary-text);
    max-width: 600px;
    margin: 0 auto 20px auto; /* Adjusted margin */
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 0 auto; /* Centered, removed top margin as p has bottom margin */
}
/* For left-aligned section titles (like in About section) */
.section-title.text-left {
    text-align: left;
}
.section-title.text-left::after {
    margin: 0; /* Align left */
    margin-top: 10px; /* Add some space if p is not present */
}
.section-title.text-left h2,
.section-title.text-left p {
    margin-left: 0;
    margin-right: 0;
}

/* 9. About Section (#about)
-------------------------------------------------- */
#about .container {
    display: flex;
    align-items: center;
    gap: 40px;
}
#about .about-content, #about .about-image {
    flex: 1;
}
#about .about-image img {
    width: 100%;
    max-width: 480px; /* Slightly increased */
    height: auto;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    object-fit: cover; /* Ensure image covers area well */
}
/* Specific styling for the section title in About if it's inline */
#about .about-content .section-title {
    margin-bottom: 30px; /* Adjust as needed */
}
#about .about-content .section-title h2 {
    margin-bottom: 5px; /* Closer to the decorative line */
}
#about .about-content .section-title::after {
    margin-top: 10px; /* Ensure line is below the title */
}


/* 10. Products Section (#products)
-------------------------------------------------- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--secondary-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--accent-color);
    display: flex; /* For better internal alignment */
    flex-direction: column; /* Stack content vertically */
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-hover-shadow);
}

.product-card .icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    height: 40px; /* Fixed height for icon area */
}
.product-card h3 {
    margin-bottom: 15px; /* More space after title */
}
.product-card p {
    flex-grow: 1; /* Make paragraph take available space */
    margin-bottom: 20px; /* Space before button */
}
.product-card .btn {
    margin-top: auto; /* Push button to the bottom */
    align-self: flex-start; /* Align button to the left */
}


/* 11. Services Section (#services) - Uses .services-grid and .service-card
-------------------------------------------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--secondary-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--accent-color);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-hover-shadow);
}

.service-card .icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    height: 40px; /* Fixed height for icon area */
}
.service-card h3 {
    margin-bottom: 15px;
}

/* 12. Philosophy Section (#philosophy)
-------------------------------------------------- */
#philosophy {
    background-color: var(--secondary-bg); /* If you want a distinct BG for this section */
}
.philosophy-item {
    display: flex;
    align-items: flex-start; /* Align icon with the start of the text */
    gap: 25px; /* Increased gap */
    margin-bottom: 35px; /* Increased margin */
    padding: 20px;
    border-radius: 5px;
    background-color: var(--primary-bg); /* Cards within the section */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.philosophy-item:last-child {
    margin-bottom: 0;
}
.philosophy-item .icon {
    font-size: 1.8rem; /* Or 2rem */
    color: var(--accent-color);
    margin-top: 5px; /* Align icon nicely with first line of text */
    flex-shrink: 0;
    width: 40px; /* Ensure alignment and space for icon */
    text-align: center;
}
.philosophy-item div h3 { /* Target h3 within the div next to icon */
    margin-bottom: 0.3em;
    color: var(--primary-text);
}
.philosophy-item div p {
    color: var(--secondary-text);
    margin-bottom: 0; /* Remove bottom margin if it's the last element */
}


/* 13. Product Page Specific Styles
-------------------------------------------------- */
.product-hero-bg { /* Shared hero style for product pages */
    height: 60vh; /* Shorter hero for product pages */
    min-height: 400px;
    /* You can set a specific background image per product page if needed
       e.g., #product-hero-fund { background-image: url(...); } */
    background: linear-gradient(rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 0.8)), url('https://placehold.co/1920x600/1E1E1E/333333?text=Product+Page') no-repeat center center/cover;
}

.product-page-hero h1 {
    font-size: 3rem; /* Slightly smaller than main hero */
}
.product-page-hero p {
    font-size: 1.1rem;
}

.product-description {
    max-width: 800px; /* Constrain width for readability */
    margin: 0 auto 40px auto; /* Center and add bottom margin */
    text-align: left; /* Default text align */
}
.product-description p {
    font-size: 1.05rem;
    line-height: 1.8;
}

.fund-status-highlight {
    background-color: var(--tertiary-bg);
    border-left: 5px solid var(--accent-color);
    padding: 20px 25px;
    margin: 30px 0;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}
.fund-status-highlight p {
    margin-bottom: 0.5em;
    color: var(--primary-text);
    font-size: 1rem;
}
.fund-status-highlight p:last-child {
    margin-bottom: 0;
}
.fund-status-highlight i {
    margin-right: 10px;
    color: var(--accent-color);
}

.brochure-download-section {
    margin: 30px 0;
    padding: 20px;
    background-color: var(--secondary-bg);
    border-radius: 8px;
    text-align: center; /* Center content */
}
.brochure-download-section .btn {
    margin-bottom: 10px; /* Space between button and note */
}
.brochure-note {
    font-size: 0.9rem;
    color: var(--secondary-text);
    margin: 0;
}


/* 14. Newsletter Section (#newsletter)
-------------------------------------------------- */
#newsletter {
    background-color: var(--secondary-bg); /* Distinct background */
}
.newsletter-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 15px;
    align-items: stretch; /* Make items same height */
}
.newsletter-form .form-group {
    flex-grow: 1; /* Input takes available space */
    margin-bottom: 0; /* Remove default margin */
}
.newsletter-form input[type="email"] {
    height: 100%; /* Match button height */
    /* Padding is already defined in general input styles */
}
.newsletter-form .btn {
    flex-shrink: 0; /* Prevent button from shrinking */
    padding-top: 12px; /* Ensure text aligns with input */
    padding-bottom: 12px;
}
.newsletter-message { /* For success/error messages */
    text-align: center;
    margin-top: 15px;
    font-size: 0.95rem;
}


/* 15. Contact & Forms (.contact-form, .waitlist-form, .form-group, input, textarea, select)
-------------------------------------------------- */
.contact-form, .waitlist-form { /* Shared styles for all forms */
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--secondary-bg);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-family: var(--font-heading);
    color: var(--secondary-text);
    margin-bottom: 8px;
    font-size: 0.9rem; /* Slightly smaller label */
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"], /* Added for potential phone input */
.form-group input[type="url"],  /* Added for potential URL input */
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--tertiary-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--primary-text);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-hover-transparent);
}

.form-group select {
    appearance: none; /* Remove default arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23B0B0B0' width='18px' height='18px'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); /* Custom arrow */
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px; /* Space for custom arrow */
}
/* For IE/Edge */
.form-group select::-ms-expand {
    display: none;
}


.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group .checkbox-label { /* Specific styling for checkbox labels */
    font-family: var(--font-body);
    font-weight: normal;
    color: var(--secondary-text);
    font-size: 0.9rem;
    display: inline; /* Align with checkbox */
    margin-left: 8px;
    cursor: pointer;
    position: relative;
    top: -2px; /* Fine-tune vertical alignment */
}
.form-group input[type="checkbox"] {
    width: auto; /* Default width for checkbox */
    margin-right: 5px;
    accent-color: var(--accent-color); /* Style checkbox color */
    transform: scale(1.1); /* Slightly larger checkbox */
}

/* Form validation and submission messages */
.form-error-message {
    display: block; /* Ensure it takes its own line */
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 5px;
}
.form-submission-message { /* For general messages after form submission */
    display: block;
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.95rem;
}
.form-submission-message.success {
    background-color: rgba(var(--success-color), 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}
.form-submission-message.error {
    background-color: rgba(var(--error-color), 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
}


/* 16. Footer
-------------------------------------------------- */
.main-footer {
    background-color: var(--secondary-bg);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.main-footer p {
    margin: 0;
    color: var(--secondary-text);
    font-size: 0.9rem;
}
.main-footer p:not(:last-child) {
    margin-bottom: 8px; /* Space between P tags in footer */
}
.main-footer .social-links {
    margin-bottom: 15px;
}
.main-footer .social-links a {
    color: var(--secondary-text);
    font-size: 1.5rem;
    margin: 0 12px; /* Slightly more space */
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block; /* For transform to work */
}
.main-footer .social-links a:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

/* 17. Responsive Adjustments
-------------------------------------------------- */
@media (max-width: 992px) {
    html { font-size: 15px; } /* Adjust base font size */

    h1 { font-size: 2.5rem; }
    #hero h1 { font-size: 3rem; }
    .product-page-hero h1 { font-size: 2.6rem; }
    h2 { font-size: 2rem; }
    .section-title h2 { font-size: 2.2rem; }

    #about .container {
        flex-direction: column;
        text-align: center;
    }
    #about .about-content .section-title {
        text-align: center; /* Center title on smaller screens */
    }
    #about .about-content .section-title::after {
        margin-left: auto; /* Center line */
        margin-right: auto;
    }
    #about .about-image {
        margin-top: 30px;
        max-width: 80%;
    }

    .products-grid, .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Adjust minmax for tablets */
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 15px 0; /* Slightly reduce header padding */
    }
    .main-nav {
        position: fixed;
        top: 0; /* Align with top of viewport */
        right: -100%; /* Start fully off-screen */
        width: 280px;
        height: 100vh;
        background-color: var(--secondary-bg); /* Solid background */
        padding-top: 80px; /* Space for close button or logo if moved */
        transition: right 0.35s ease-in-out; /* Smoother transition */
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
        z-index: 999; /* Below header backdrop but above content */
        overflow-y: auto; /* Allow scrolling if menu is long */
    }
    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: flex-start; /* Align items to the left */
        padding: 0 20px; /* Add some padding */
    }
    .main-nav ul li {
        margin: 0;
        width: 100%;
    }
    .main-nav ul li a {
        display: block;
        padding: 15px 10px; /* Adjust padding */
        text-align: left; /* Align text left */
        border-bottom: 1px solid var(--border-color);
        font-size: 1rem;
    }
    .main-nav ul li:last-child a {
        border-bottom: none;
    }
    .main-nav ul li a::after { display: none; /* Remove underline for mobile nav items */ }
    .main-nav ul li a:hover,
    .main-nav ul li a.active {
        background-color: var(--tertiary-bg);
        color: var(--accent-color); /* Ensure active color is prominent */
    }

    .menu-toggle {
        display: block;
        z-index: 1001; /* Above nav overlay */
        position: relative; /* To ensure it's clickable */
    }

    #hero {
        padding-top: 70px; /* Adjust for smaller header */
        height: auto; /* Allow content to define height */
        min-height: calc(100vh - 70px); /* Ensure it still feels full-screen */
        padding-bottom: 60px; /* Add some bottom padding */
    }
    #hero h1 { font-size: 2.5rem; }
    #hero p { font-size: 1rem; }

    .product-hero-bg {
        height: auto;
        min-height: 350px;
        padding: 60px 0;
    }
    .product-page-hero h1 { font-size: 2.2rem; }

    .services-grid, .products-grid {
        grid-template-columns: 1fr; /* Stack cards on smaller screens */
    }

    .contact-form, .waitlist-form {
        padding: 30px;
    }
    .newsletter-form {
        flex-direction: column; /* Stack input and button */
        gap: 10px;
    }
    .newsletter-form .btn {
        width: 100%; /* Full width button */
    }

    .philosophy-item {
        padding: 15px;
        gap: 15px;
    }
    .philosophy-item .icon {
        font-size: 1.5rem;
        width: 30px;
    }
}

@media (max-width: 480px) {
    html { font-size: 14px; }

    .container { width: 95%; padding: 0 10px; }
    h1 { font-size: 2rem; }
    #hero h1 { font-size: 2.2rem; }
    .product-page-hero h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    .section-title h2 { font-size: 2rem; }

    .btn { padding: 10px 20px; font-size: 0.9rem;}

    .main-header { padding: 10px 0; }
    #hero { padding-top: 60px; min-height: calc(100vh - 60px); }

    .contact-form, .waitlist-form { padding: 20px; }
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group textarea,
    .form-group select {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    .form-group select {
        background-position: right 10px center;
        padding-right: 30px;
    }
}
