/**
 * ALAMIA Homepage Section Styles
 * 
 * Styled specifically to match the luxury cosmetic campaign wireframes.
 */

/* ==========================================================================
   GLOBAL HOMEPAGE HELPERS
   ========================================================================== */
.section-header {
    margin-bottom: var(--spacing-lg);
}

.section-subtitle {
    display: block;
    font-family: var(--font-sans);
    font-size: var(--font-size-meta);
    letter-spacing: var(--ls-meta);
    text-transform: uppercase;
    color: var(--color-bronze);
    margin-bottom: var(--spacing-xs);
}

.section-title {
    margin-bottom: var(--spacing-sm);
}

/* Scroll reveal core structural classes (interaction disabled initially) */
.reveal {
    opacity: 1;
    transform: none;
}

/* ==========================================================================
   SECTION 1: HERO
   ========================================================================== */
.hero-section {
    position: relative;
    height: 100vh;
    background-image: var(--hero-bg);
    background-size: contain;          /* Do not crop the product image */
    background-position: right center; /* Display product on the right half */
    background-repeat: no-repeat;
    background-color: var(--color-ivory); /* Blend canvas color seamlessly */
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Linear gradient overlay to fade text background to transparent product area */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to right, var(--color-ivory) 35%, rgba(250, 247, 242, 0.8) 55%, rgba(250, 247, 242, 0) 100%);
    z-index: 1;
}

.hero-content {
    position: absolute;
    left: 8%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    max-width: 550px;
    padding: var(--spacing-md);
    text-align: left; /* Left aligned for luxury editorial layout */
}

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

.hero-logo-wrapper .alamia-logo-svg {
    height: 140px;
    width: auto;
    margin: 0; /* Align logo left */
}

.hero-title {
    font-size: var(--font-size-display);
    color: var(--color-cocoa);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
}

.hero-subtitle {
    font-family: var(--font-sans);
    font-size: var(--font-size-body);
    font-weight: 300;
    color: var(--color-cocoa);
    line-height: var(--lh-body);
    margin: 0 0 var(--spacing-lg) 0;
}

/* Mobile Hero adjustments to prevent text overlaps and keep product visual */
@media (max-width: 767px) {
    .hero-section {
        height: 80vh;
        background-size: cover; /* Fallback to cover for portrait aspect ratios */
        background-position: center;
        justify-content: center;
    }
    
    .hero-overlay {
        background-image: none;
        background-color: rgba(250, 247, 242, 0.55); /* Simple tint overlay for text readability */
    }

    .hero-content {
        position: relative;
        left: 0;
        top: 0;
        transform: none;
        margin: 0 auto;
        text-align: center;
    }
    
    .hero-logo-wrapper .alamia-logo-svg {
        height: 96px;
        margin: 0 auto;
    }
}

/* ==========================================================================
   SECTION 2: FEATURED PRODUCTS
   ========================================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md); /* 24px default */
    margin-bottom: var(--spacing-lg);
}

@media (min-width: 1024px) {
    .products-grid {
        gap: 48px; /* High-end catalog spacing */
    }
}

.product-card {
    display: flex;
    flex-direction: column;
}

.product-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
}

/* Luxury 3:4 Aspect Ratio Image Window */
.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 133.33%; /* 3:4 Aspect Ratio */
    background-color: var(--color-ivory);
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease-luxury); /* Mandatory 0.7s slow scale */
}

/* Mandatory Visual Hover Constraint (1.00 -> 1.03 scale) */
.product-card:hover .product-image {
    transform: scale(1.03);
}

.product-info {
    display: flex;
    flex-direction: column;
    margin-top: auto;
}

.product-category {
    font-family: var(--font-sans);
    font-size: var(--font-size-meta);
    color: var(--color-bronze);
    text-transform: uppercase;
    letter-spacing: var(--ls-meta);
    margin-bottom: 4px;
}

.product-title {
    font-family: var(--font-serif);
    font-size: var(--font-size-h3);
    font-weight: 400;
    color: var(--color-cocoa);
    margin-bottom: 6px;
}

.product-price {
    font-family: var(--font-sans);
    font-size: var(--font-size-body);
    font-weight: 400;
    color: var(--color-cocoa);
}

.featured-footer {
    margin-top: var(--spacing-md);
}

@media (max-width: 1023px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
}

/* ==========================================================================
   SECTION 3: ABOUT ALAMIA
   ========================================================================== */
.about-grid {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-lg);
}

@media (min-width: 1024px) {
    .about-grid {
        gap: 80px; /* High-end separation gap */
    }
}

.about-image-column {
    flex: 0 0 55%; /* 55% image */
}

.about-text-column {
    flex: 0 0 45%; /* 45% text */
    display: flex;
    flex-direction: column;
}

.about-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 125%; /* 4:5 Portrait orientation */
    overflow: hidden;
    background-color: var(--color-silt);
}

.about-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content {
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.about-content p {
    font-size: var(--font-size-body);
    color: var(--color-cocoa);
    margin-bottom: var(--spacing-sm);
}

.about-cta {
    margin-top: var(--spacing-xs);
}

@media (max-width: 767px) {
    .about-grid {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .about-image-column,
    .about-text-column {
        flex: 0 0 100%;
        width: 100%;
    }

    .about-image-wrapper {
        padding-top: 100%; /* 1:1 square ratio for mobile space saving */
    }
}

/* ==========================================================================
   SECTION 4: WHY ALAMIA
   ========================================================================== */
.why-section {
    background-color: var(--color-silt); /* Silt Beige secondary background */
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
}

.why-pillar {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pillar-icon-wrapper {
    width: 64px;
    height: 64px;
    color: var(--color-bronze);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pillar-icon-svg {
    width: 48px;
    height: 48px;
    display: block;
}

.pillar-title {
    font-family: var(--font-serif);
    font-size: var(--font-size-h3);
    font-weight: 500;
    color: var(--color-cocoa);
    margin-bottom: var(--spacing-xs);
}

.pillar-text {
    font-size: 14px;
    line-height: 1.55;
    color: var(--color-cocoa);
    max-width: 260px;
}

@media (max-width: 1023px) {
    .why-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
}

@media (max-width: 479px) {
    .why-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   SECTION 5: ALAMIA FILM
   ========================================================================== */
.film-description {
    max-width: 540px;
    margin: 0 auto var(--spacing-md) auto;
    font-size: var(--font-size-body);
}

.film-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Strictly centered 1:1 Video Box Layout */
.film-video-wrapper {
    position: relative;
    width: 100%;
    max-width: 640px; /* Locked max width for 1:1 canvas */
    padding-top: 100%; /* 1:1 Aspect Ratio Box */
    background-color: var(--color-silt);
    overflow: hidden;
}

.film-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 767px) {
    .film-video-wrapper {
        max-width: 100%;
        width: 100%;
    }
}

/* ==========================================================================
   SECTION 6: BEAUTY RITUAL
   ========================================================================== */
.ritual-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md) var(--spacing-lg);
}

@media (min-width: 1024px) {
    .ritual-grid {
        gap: 64px 48px; /* Generous grid separation */
    }
}

.ritual-card {
    display: flex;
    flex-direction: row;
    background-color: var(--color-ivory);
    align-items: center;
    border-bottom: 1px solid var(--color-silt);
    padding-bottom: var(--spacing-md);
}

.ritual-card-image-wrapper {
    flex: 0 0 220px;
    height: 220px;
    overflow: hidden;
    position: relative;
    background-color: var(--color-silt);
    margin-right: var(--spacing-md);
}

.ritual-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ritual-card-content {
    flex: 1;
}

.ritual-card-title {
    font-family: var(--font-serif);
    font-size: var(--font-size-h3);
    font-weight: 500;
    color: var(--color-cocoa);
    margin-bottom: var(--spacing-xs);
}

.ritual-card-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-cocoa);
}

@media (max-width: 767px) {
    .ritual-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .ritual-card {
        flex-direction: column;
        align-items: flex-start;
        border-bottom: 1px solid var(--color-silt);
        padding-bottom: var(--spacing-md);
    }

    .ritual-card-image-wrapper {
        width: 100%;
        flex: 0 0 auto;
        height: 240px;
        margin-right: 0;
        margin-bottom: var(--spacing-sm);
    }
}

/* ==========================================================================
   SECTION 7: CONTACT
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 4fr 6fr;
    gap: var(--spacing-lg);
}

.contact-info-column {
    display: flex;
    flex-direction: column;
}

.contact-details {
    margin-top: var(--spacing-md);
}

.contact-detail-block {
    margin-bottom: var(--spacing-md);
}

.detail-title {
    font-family: var(--font-sans);
    font-size: var(--font-size-meta);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--ls-meta);
    color: var(--color-bronze);
    margin-bottom: var(--spacing-xs);
}

.contact-detail-block p a {
    font-size: 15px;
    color: var(--color-cocoa);
}

.contact-form-column {
    display: flex;
    flex-direction: column;
}

.minimal-contact-form {
    width: 100%;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-control {
    width: 100%;
    height: 56px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-silt);
    color: var(--color-cocoa);
    font-family: var(--font-sans);
    font-size: var(--font-size-body);
    font-weight: 300;
    outline: none;
    transition: border-bottom-color var(--transition-fast) var(--ease-luxury);
    border-radius: 0;
}

/* Input text placeholder color cocoa with light opacity */
.form-control::placeholder {
    color: var(--color-cocoa);
    opacity: 0.5;
}

.form-control:focus {
    border-bottom-color: var(--color-bronze);
}

.form-control.textarea {
    height: auto;
    padding-top: var(--spacing-xs);
    resize: none;
}

@media (max-width: 767px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .form-control {
        font-size: 16px; /* Prevents iOS auto-zoom shift */
    }
}
