/* Define colors based on the logo and app theme */
:root {
    --color-gold: #d4a800; /* Gold/Yellow from logo */
    --color-dark-purple: #4d394e; /* Dark color from logo */
    --color-black: #0a0a0a; /* A slightly softer black than #000 for background */
    --color-white: #ffffff; /* White text for contrast */
    --color-gray-text: #aaaaaa; /* Lighter grey for secondary text */
    --color-light-bg: #f0f0f0; /* Very light grey for sections */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: var(--color-black);
    color: var(--color-white);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1200px; /* Standard container width */
    margin: 0 auto;
    padding: 0 20px; /* Add padding on sides for smaller screens */
}

header {
    background-color: var(--color-dark-purple);
    color: var(--color-white);
    padding: 15px 0;
    position: sticky; /* Make header stick to the top */
    top: 0;
    z-index: 1000; /* Ensure header is above other content */
}

header .container {
     display: flex;
     justify-content: space-between;
     align-items: center;
     flex-wrap: wrap; /* Allow items to wrap on smaller screens */
}

.logo {
     display: flex;
     align-items: center;
     font-size: 1.5em;
     font-weight: bold;
     color: var(--color-gold); /* Logo text color */
     flex-shrink: 0; /* Prevent shrinking */
}

.logo img {
    height: 40px; /* Adjust logo height */
    margin-right: 10px;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* Arrange nav links horizontally */
}

nav li {
    margin-left: 20px;
}

nav a {
    color: var(--color-white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* --- Hero Section --- */
.hero-section {
    display: flex; /* Use flexbox for split layout */
    min-height: calc(100vh - 70px); /* Make hero section fill remaining viewport height */
    background-color: var(--color-gold); /* Gold background on the left side */
    color: var(--color-dark-purple); /* Dark text on gold */
    position: relative; /* Needed for potential pseudo-elements or absolute positioning */
    overflow: hidden; /* Hide anything outside the section boundaries */
}

.hero-left {
    flex: 1; /* Take up remaining space */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: left; /* Align text left */
    max-width: 60%; /* Control the width of the left text area */
}

.hero-content {
    max-width: 600px; /* Limit width of the text content */
}

.hero-left h2 {
    font-size: 3.5em; /* Large headline */
    color: var(--color-dark-purple); /* Dark purple headline */
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-left p {
    font-size: 1.2em;
    color: var(--color-dark-purple); /* Dark purple body text */
    margin-bottom: 30px;
}

.hero-right {
    flex: 1; /* Take up the other half */
    display: flex;
    align-items: flex-end; /* Align image to the bottom */
    justify-content: center;
    background-color: var(--color-black); /* Black background on the right */
    position: relative; /* For image positioning */
}

.hero-right img {
    display: block;
    max-width: 100%; /* Ensure image scales */
    height: auto; /* Maintain aspect ratio */
    object-fit: cover; /* Cover the container area */
    /* Adjust positioning if needed to match TRAINR image style */
    /* transform: translateX(10%); /* Example offset */
}

/* --- General Section Styling --- */
section {
    padding: 60px 0; /* Vertical padding for sections */
    text-align: center;
}

section h2 {
    font-size: 2.2em;
    color: var(--color-gold);
    margin-bottom: 40px;
    text-transform: uppercase;
}

/* --- Features Section --- */
.features-section {
    background-color: var(--color-black); /* Keep background dark */
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 30px; /* Space between grid items */
}

.feature-item {
    background-color: var(--color-dark-purple); /* Dark purple background for feature boxes */
    padding: 30px;
    border-radius: 8px;
    text-align: left; /* Text aligned left within feature boxes */
}

.feature-item h3 {
    color: var(--color-gold); /* Gold heading for features */
    margin-top: 0;
    margin-bottom: 15px;
}

.feature-item p {
    color: var(--color-gray-text); /* Grey text for feature description */
    margin-bottom: 0;
}

/* --- App Renders Section --- */
.renders-section {
    background-color: var(--color-light-bg); /* Light background for this section */
}

.renders-section h2 {
     color: var(--color-dark-purple); /* Dark heading on light background */
}

.app-renders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Grid for app images */
    gap: 20px;
    justify-items: center; /* Center images in grid cells */
}

.app-renders-grid img {
    max-width: 100%;
    height: auto;
    border-radius: 8px; /* Rounded corners for images */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Subtle shadow */
    transition: transform 0.3s ease; /* Add hover effect */
}

.app-renders-grid img:hover {
    transform: translateY(-10px); /* Lift image on hover */
}

/* --- CTA Section --- */
.cta-section {
    background-color: var(--color-dark-purple); /* Dark purple background */
    color: var(--color-white);
}

.cta-section p {
     color: var(--color-gray-text); /* Grey text */
     font-size: 1.1em;
     margin-bottom: 30px;
     text-align: center; /* Center text in CTA section */
}


/* --- Buttons --- */
.button {
    display: inline-block; /* Allows margin and padding */
    padding: 15px 30px;
    margin: 10px 0;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    background-color: var(--color-gold); /* Gold button */
    color: var(--color-dark-purple); /* Dark text on gold */
    border: none; /* Remove default button border */
}

.button:hover {
    background-color: #ffc107; /* Slightly lighter gold on hover */
    color: var(--color-dark-purple);
}

/* --- Footer --- */
footer {
    background-color: var(--color-dark-purple);
    color: var(--color-gray-text);
    font-size: 0.9em;
    padding: 20px 0;
    margin-top: 0; /* Remove top margin */
}

footer .container {
     text-align: center;
}

footer p {
    margin: 5px 0;
    text-align: center;
}

.footer-link {
    color: var(--color-gray-text);
    text-decoration: none;
    border-bottom: 1px solid var(--color-gray-text); /* Underline on hover */
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
}

.footer-link:hover {
    color: var(--color-white);
    border-bottom-color: var(--color-white);
}


/* --- Responsiveness --- */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column; /* Stack columns on smaller screens */
        min-height: auto; /* Remove min-height */
    }

    .hero-left,
    .hero-right {
        flex: none; /* Remove flex sizing */
        max-width: 100%; /* Allow full width */
        padding: 30px 20px;
        text-align: center; /* Center text on stacked layout */
    }

     .hero-left h2 {
         font-size: 2.5em; /* Adjust headline size */
         margin-bottom: 15px;
     }

     .hero-left p {
         font-size: 1em; /* Adjust body text size */
     }

    .hero-right img {
        max-width: 80%; /* Reduce image size on mobile */
        margin-top: 20px;
        /* Reset any transforms */
        transform: none;
    }

     header .container {
         flex-direction: column;
         align-items: center;
     }

     header nav ul {
         margin-top: 10px;
         flex-direction: column;
         align-items: center;
     }

     nav li {
         margin: 5px 0; /* Vertical margin for stacked links */
     }

     section {
         padding: 40px 0; /* Reduce section padding */
     }

     section h2 {
         font-size: 1.8em; /* Adjust section title size */
         margin-bottom: 30px;
     }
}