/*
 * Theme styles for the Luxury Interiors site
 *
 * The layout was crafted to mirror the structure of an upscale interior design studio,
 * with a minimalist aesthetic and warm accents. Responsiveness is achieved via
 * CSS Grid, Flexbox and media queries. To maximize Lighthouse scores, no
 * external font files are loaded; instead, system fonts are used throughout.
 */

/* CSS reset and base styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
        Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    /* Use a deep charcoal for primary text to improve contrast */
    color: var(--secondary);
    line-height: 1.6;
    /* Off‑white background gives a luxe, warm feel */
    background-color: var(--light);
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    /* Use a classic serif for headings to evoke sophistication */
    font-family: 'Georgia', serif;
    font-weight: 600;
    line-height: 1.2;
    color: var(--secondary);
}

/* Variables for easy colour management */
:root {
    /* Colour palette inspired by the Dkor Interiors reference site.  
       Shades of green and warm neutrals convey a feeling of luxury and calm. */
    --primary: #5b7754;    /* deep muted green for buttons and highlights */
    --secondary: #333333;  /* dark grey for primary text */
    --light: #f9f8f6;      /* off‑white background for pages */
    --accent: #7b9470;     /* lighter green used on hover states */
    --muted: #f2f0ed;      /* very light grey for section backgrounds */
    --border: #dcd8cf;     /* soft beige for subtle borders */
}

/* Utility classes */
.container {
    width: min(90%, 1200px);
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--primary);
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    text-align: center;
}

.primary-btn {
    background-color: var(--primary);
    color: var(--light);
}
.primary-btn:hover,
.primary-btn:focus {
    background-color: var(--accent);
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary);
}
.secondary-btn:hover,
.secondary-btn:focus {
    background-color: var(--primary);
    color: var(--light);
}

/* Header and Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--light);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}
.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--secondary);
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}

nav {
    display: flex;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-left: auto;
}

.nav-list li a {
    font-weight: 500;
    padding: 0.5rem 0;
    color: var(--secondary);
    transition: color 0.3s;
}
.nav-list li a:hover,
.nav-list li a:focus {
    color: var(--primary);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--light);
    text-align: center;
    padding: 2rem 1rem;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Slightly lighter overlay for improved legibility without darkening images excessively */
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.hero p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: 2rem;
}

.hero .buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Sections */
section {
    padding: 4rem 0;
}

section h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2rem;
    color: #555;
    font-size: 1rem;
}

/* Services Section */
.services {
    background-color: var(--muted);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}
.service-card {
    background-color: var(--light);
    padding: 2rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.service-card .icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: var(--primary);
}
.service-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    color: var(--secondary);
}
.service-card p {
    font-size: 0.95rem;
    color: #555;
}

/* Portfolio Section */
.portfolio {
    background-color: var(--light);
}

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

.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    background-color: var(--muted);
}
.project-card img {
    width: 100%;
    display: block;
    transition: transform 0.5s;
}
.project-card:hover img {
    transform: scale(1.05);
}
.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: var(--light);
    padding: 1rem;
    transition: transform 0.3s;
    transform: translateY(100%);
}
.project-card:hover .project-info {
    transform: translateY(0);
}
.project-info h3 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}
.project-info p {
    font-size: 0.9rem;
}

/* About Section */
.about {
    background-color: var(--muted);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
}

.about-content img {
    flex: 1 1 45%;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.about-text {
    flex: 1 1 45%;
}
.about-text h3 {
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    color: var(--secondary);
}
.about-text p {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #555;
}

/* Testimonials Section */
.testimonials {
    background-color: var(--light);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.testimonial-card {
    background-color: var(--muted);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.testimonial-card .quote {
    font-style: italic;
    margin-bottom: 1rem;
    color: #444;
}
.testimonial-card .author {
    font-weight: 600;
    color: var(--secondary);
}

/* Contact Section */
.contact {
    background-color: var(--muted);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.contact-form {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}
.form-group.full-width {
    grid-column: 1 / -1;
}
.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--secondary);
}
.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    color: var(--secondary);
    background-color: var(--light);
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.contact form button {
    grid-column: 1 / -1;
    justify-self: center;
    margin-top: 1rem;
}

/* Footer */
footer {
    background-color: #222;
    color: #ddd;
    padding: 2rem 0 1rem;
}
.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
}
.footer-about,
.footer-contact,
.footer-social {
    flex: 1 1 250px;
}
.footer-about h3 {
    margin-bottom: 0.5rem;
    color: #fff;
}
.footer-about p {
    color: #bbb;
    font-size: 0.9rem;
}
.footer-contact h4,
.footer-social h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #fff;
}
.footer-contact p {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}
.footer-contact a {
    color: #bbb;
}

.social-links {
    display: flex;
    gap: 0.5rem;
}
.social-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    color: #fff;
    transition: background-color 0.3s;
}
.social-icon:hover {
    background-color: rgba(255,255,255,0.2);
}
.footer-bottom {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #777;
}

/* Responsive styles */
@media (max-width: 768px) {
    .nav-list {
        position: absolute;
        top: 100%;
        right: 0;
        background-color: var(--light);
        flex-direction: column;
        width: 200px;
        border: 1px solid var(--border);
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s, opacity 0.3s;
    }
    nav.open .nav-list {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .menu-toggle {
        display: flex;
    }
    nav {
        position: relative;
    }
    .nav-list li {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border);
    }
    .nav-list li a {
        width: 100%;
        display: block;
    }
}

@media (max-width: 600px) {
    .about-content {
        flex-direction: column;
    }
    .footer-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-contact,
    .footer-social {
        margin-top: 1rem;
    }
}
