/* ========================================
   RENDER & ROOT NATURALS - MAIN STYLESHEET
   Modern, Clean Skincare Website
   ======================================== */

/* ===== CSS RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --primary-blue: #8BA8C4;
    --cream: #FAF8F3;
    --light-cream: #F5F3ED;
    --amber: #B8956A;
    --charcoal: #2C2C2C;
    --dark: #3A3A3A;
    --sage: #8B9C7E;
    --white: #FFFFFF;
    --gray: #7A746F;
    
    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--charcoal);
    background-color: var(--cream);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 130px; /* space for fixed header + curve */
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
    color: var(--charcoal);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: var(--spacing-sm);
    font-size: 1rem;
    line-height: 1.8;
}

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

a:hover {
    color: var(--amber);
}

/* ===== LAYOUT CONTAINERS ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-wide {
    max-width: 1400px;
}

.container-narrow {
    max-width: 900px;
}

.section {
    padding: var(--spacing-xl) 0;
}

.section-sm {
    padding: var(--spacing-lg) 0;
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    background-color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: var(--transition);
    isolation: isolate;
    overflow: visible;
}

.header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -40px;
    height: 60px;
    /* Two gentle curves to match the page wave dividers */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' d='M0,40 C240,90 480,10 720,60 C960,110 1200,20 1440,70 L1440,0 L0,0 Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    pointer-events: none;
    z-index: -1;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
}

.logo {
    height: 60px;
    width: auto;
    transition: var(--transition);
}

.logo:hover {
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--charcoal);
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.cart-icon {
    position: relative;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--amber);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--charcoal);
    transition: var(--transition);
    border-radius: 2px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--charcoal);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-secondary {
    background-color: var(--amber);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--gray);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--charcoal);
    color: var(--charcoal);
}

.btn-outline:hover {
    background-color: var(--charcoal);
    color: var(--white);
}

/* ===== HERO SECTION ===== */
.hero {
    background-color: var(--light-cream);
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.hero-text {
    max-width: 600px;
}

.hero-title {
    margin-bottom: var(--spacing-md);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: var(--spacing-md);
    font-weight: 300;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.hero-image {
    position: relative;
    padding: var(--spacing-md);
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    transition: var(--transition);
}

.hero-image img:hover {
    transform: scale(1.02);
}

/* ===== PRODUCT GRID ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.product-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background-color: var(--light-cream);
}

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

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

.product-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background-color: var(--amber);
    color: var(--white);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-info {
    padding: var(--spacing-md);
}

.product-category {
    font-size: 0.85rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.product-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--charcoal);
}

.product-description {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: var(--spacing-sm);
}

.product-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* ===== FEATURES SECTION ===== */
.features {
    background-color: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.feature-card {
    text-align: center;
    padding: var(--spacing-md);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-sm);
    background-color: var(--light-cream);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-description {
    color: var(--gray);
    line-height: 1.6;
}

/* ===== STORY SECTION ===== */
.story {
    background-color: var(--light-cream);
}

.story-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.story-text {
    max-width: 600px;
}

.story-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-sm);
}

.story-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

/* ===== NEWSLETTER SECTION ===== */
.newsletter {
    background-color: var(--primary-blue);
    color: var(--white);
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.newsletter h2 {
    color: var(--white);
    margin-bottom: var(--spacing-sm);
}

.newsletter p {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: var(--spacing-sm);
}

.newsletter-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 2px;
    font-size: 1rem;
    font-family: var(--font-body);
}

.newsletter-input:focus {
    outline: 2px solid var(--amber);
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--dark);
    color: var(--white);
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
    color: var(--white);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.footer-section p,
.footer-section a {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-section a:hover {
    color: var(--primary-blue);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--primary-blue);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: var(--spacing-md);
    text-align: center;
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 968px) {
    .hero-content,
    .story-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .hero {
        min-height: auto;
        padding: var(--spacing-lg) 0;
    }
    
    .hero-text {
        text-align: center;
        order: 2;
    }
    
    .hero-image {
        order: 1;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: var(--spacing-md);
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--white);
        flex-direction: column;
        padding: var(--spacing-md);
        transition: var(--transition);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .btn {
        padding: 0.875rem 2rem;
        font-size: 0.9rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== SVG WAVE DIVIDERS BETWEEN SECTIONS ===== */
.wave-divider {
    position: relative;
    width: 100%;
    line-height: 0;
    margin: -1px 0; /* overlap edges to avoid gaps */
    background-color: transparent;
}

.wave-divider svg {
    display: block;
    width: 100%;
    height: 90px;
}

.wave-divider path {
    fill: currentColor;
}

.wave-divider.flip-vertical svg {
    transform: scaleY(-1);
    transform-origin: center;
}

@media (max-width: 768px) {
    .wave-divider svg {
        height: 60px;
    }
}
