@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
    --primary-yellow: #F9F5E3; /* From user image */
    --primary-green: #1B3022; /* Dark Premium Green */
    --accent-yellow: #FDF6E3;
    --dark-text: #1B3022;
    --body-text: #4A4238;
    --bg-white: #FFFFFF;
    --bg-cream: #F9F8F3;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--body-text);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
    /* Removed perspective from body to protect fixed header */
}

#sphere-wrapper {
    perspective: 1500px;
    transform-style: preserve-3d;
    position: relative;
    z-index: 1;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-green);
    font-weight: 600;
}

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

ul {
    list-style: none;
}

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

/* --- Layout Components --- */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section, footer {
    padding: 80px 0;
    transform-origin: center center -500px;
    backface-visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    scroll-snap-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    pointer-events: auto;
}

/* Force flat transform when section is centered for form accessibility */
section.is-active, footer.is-active {
    transform: rotateX(0) scale(1) translateZ(0) !important;
    opacity: 1 !important;
    z-index: 100;
}

input, textarea, button, a {
    position: relative;
    z-index: 50;
    pointer-events: auto;
}

/* --- Header --- */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999; /* Very high z-index */
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(27, 48, 34, 0.05);
    transition: var(--transition);
}

header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

header.scrolled nav {
    height: 60px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
    transition: height 0.3s ease;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary-green);
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-green);
    position: relative;
    opacity: 0.8;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-green);
    transition: var(--transition);
}

.nav-links a:hover {
    opacity: 1;
}

.nav-links a:hover::after {
    width: 100%;
}

/* --- Hero Section --- */

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    background-color: var(--bg-cream);
    overflow: hidden;
}

.hero-content {
    flex: 1;
    z-index: 2;
}

.hero-image-wrapper {
    flex: 1.2;
    height: 100%;
    position: relative;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: polygon(10% 0, 100% 0, 100% 100%, 0% 100%);
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--primary-green);
}

.hero h1 span {
    color: var(--primary-green);
    background: linear-gradient(to right, var(--primary-green), #2e4d3a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.1rem;
    max-width: 500px;
    margin-bottom: 2.5rem;
    color: var(--body-text);
}

.cta-button {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: var(--primary-yellow);
    color: var(--primary-green);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 4px;
    border: 1px solid rgba(27, 48, 34, 0.1);
    transition: var(--transition);
}

.cta-button:hover {
    background: var(--primary-green);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(27, 48, 34, 0.1);
}

/* --- Section Title --- */

.section-title {
    text-align: center;
    margin-bottom: 5rem;
}

.section-title h2 {
    font-size: 2.8rem;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-title .divider {
    width: 80px;
    height: 2px;
    background: var(--primary-green);
    margin: 0 auto;
}

/* --- Products Section --- */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(27, 48, 34, 0.05);
}

.product-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(27, 48, 34, 0.08);
}

.product-image {
    height: 350px;
    background: #f9f9f9;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 2.5rem;
    text-align: center;
}

.product-info h3 {
    margin-bottom: 0.8rem;
    font-size: 1.5rem;
}

.product-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--primary-green);
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 1.2rem;
    display: block;
    opacity: 0.6;
}

/* --- Services Section --- */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
}

.service-item {
    text-align: center;
    padding: 2rem;
}

.service-item h3 {
    margin-bottom: 1.2rem;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Footer --- */

footer {
    background: var(--primary-green);
    color: #fff;
    padding: 100px 0 50px;
}

.footer-logo {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--primary-yellow);
    margin-bottom: 2rem;
    letter-spacing: 3px;
}

footer p {
    opacity: 0.7;
    max-width: 400px;
    margin: 0 auto;
}

.copyright {
    margin-top: 4rem;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    opacity: 0.5;
    letter-spacing: 1px;
}

/* --- Detailed Product Sections --- */

.product-feature-section {
    position: relative;
    padding: 120px 0;
    color: white;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

.product-feature-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(27, 48, 34, 0.95) 30%, rgba(27, 48, 34, 0.6));
    z-index: 1;
}

.product-feature-section .container {
    position: relative;
    z-index: 2;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
}

.feature-content h2 {
    color: var(--primary-yellow);
    font-size: 3.5rem;
    margin-bottom: 2rem;
}

.feature-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.feature-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.detail-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 4px;
    border: 1px solid rgba(249, 245, 227, 0.1);
}

.detail-box h4 {
    color: var(--primary-yellow);
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.detail-box ul li {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
}

.detail-box ul li::before {
    content: '•';
    color: var(--primary-yellow);
    margin-right: 10px;
}

@media (max-width: 992px) {
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .feature-content h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        height: auto;
        padding-bottom: 80px;
    }
    .hero-image-wrapper {
        width: 100%;
        height: 450px;
        order: 1;
    }
    .hero-image {
        clip-path: none;
    }
    .hero-content {
        order: 2;
        padding: 60px 2rem 0;
    }
    .hero h1 {
        font-size: 3rem;
    }
}
