/* css/layouts.css - Grid Systems, Section Spacing, and Heroes */

/* --- CONTAINERS --- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
    width: 100%;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--gutter);
    width: 100%;
}

/* --- GRIDS --- */
.grid-12 {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--grid-gap);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
}

.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-7 { grid-column: span 7; }
.col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }

@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .col-7, .col-5, .col-6, .col-8, .col-4 {
        grid-column: span 12;
    }
}

@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .grid-12 {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .col-3 {
        grid-column: span 12;
    }
}

/* --- SECTION PATTERNS --- */
section {
    padding: var(--section-spacing-desktop) 0;
    position: relative;
}

.section-dark {
    background-color: var(--deep-espresso);
    color: var(--ivory-cream);
}

.section-dark-relief {
    background-color: var(--walnut-brown);
    color: var(--ivory-cream);
}

.section-light-relief {
    background-color: var(--sand-beige);
    color: var(--deep-espresso);
}

/* Thai Silk Pattern Overlay */
.pattern-overlay-silk::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/patterns/silk-pattern.svg');
    background-size: 24px 24px;
    opacity: 0.08;
    pointer-events: none;
    z-index: 1;
}

/* Water Ripple Overlay */
.pattern-overlay-ripple::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/patterns/water-ripple.svg');
    background-size: 100px 40px;
    opacity: 0.04;
    pointer-events: none;
    z-index: 1;
}

/* --- HERO VARIANTS --- */

/* 1. Full Height (Homepage) */
.hero-full {
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    color: var(--ivory-cream);
    position: relative;
    overflow: hidden;
    background-color: var(--deep-espresso);
}

.hero-full-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-full-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    z-index: 2;
}

.hero-full .container {
    position: relative;
    z-index: 3;
}

.hero-full-content {
    max-width: 800px;
}

.hero-full-content h1 {
    margin-bottom: 24px;
}

.hero-full-content p {
    margin-bottom: 40px;
    opacity: 0.9;
    font-size: 22px;
}

/* 2. Editorial (Half Height for Content pages) */
.hero-editorial {
    padding: 280px 0 100px 0;
    background-color: var(--deep-espresso);
    color: var(--ivory-cream);
    position: relative;
    overflow: hidden;
}

.hero-editorial-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    opacity: 0.35;
}

.hero-editorial-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(74, 52, 43, 0.6), rgba(74, 52, 43, 0.9));
    z-index: 2;
}

.hero-editorial .container {
    position: relative;
    z-index: 3;
}

.hero-editorial-content {
    max-width: 850px;
}

.hero-editorial-content h1 {
    margin-bottom: 16px;
}

/* 3. Minimal (For Legal / Text Heavy pages) */
.hero-minimal {
    padding: 180px 0 80px 0;
    background-color: var(--deep-espresso);
    color: var(--ivory-cream);
    border-bottom: 1px solid rgba(201, 169, 106, 0.15);
}

.hero-minimal-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-minimal-content h1 {
    margin-bottom: 12px;
}

/* Responsive adjust */
@media (max-width: 768px) {
    section {
        padding: var(--section-spacing-mobile) 0;
    }
    
    .hero-full {
        min-height: 100dvh;
    }
    
    .hero-full-content p {
        font-size: 18px;
    }
    
    .hero-editorial {
        padding: 280px 0 80px 0;
    }

    .hero-minimal {
        padding: 240px 0 60px 0;
    }
}
