/* ==========================================================================
   Alpha Optical — Dynamic Brands Page (LTR Styling)
   ========================================================================== */

/* 1. Global Section Container Styles */
.alpha-brand-section {
    width: 100%;
    padding: 120px 0;
    color: #1A2A38;
    box-sizing: border-box;
    transition: background-color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

/* Font Family Toggles */
.alpha-brand-section.alpha-font-custom {
    font-family: 'Outfit', sans-serif;
}

.alpha-brand-section.alpha-font-theme {
    font-family: inherit;
}

.alpha-brand-section * {
    box-sizing: border-box;
}

.alpha-section-inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 60px;
}

/* Alternate Section Styles */
.alpha-brand-section.alpha-bg-white {
    background-color: #FFFFFF;
}

.alpha-brand-section.alpha-bg-cream {
    background-color: #FCF6ED;
}

/* 2. Elegant Section Header */
.alpha-section-header {
    margin-bottom: 70px;
}

.alpha-section-meta {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: #1A2A38;
    opacity: 0.6;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Scoped Custom Fonts */
.alpha-font-custom .alpha-section-meta {
    font-family: 'Outfit', sans-serif;
}

.alpha-section-separator {
    font-weight: 300;
    opacity: 0.5;
}

.alpha-section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 80px;
    flex-wrap: wrap;
}

.alpha-section-title {
    font-size: 68px;
    font-weight: 400;
    margin: 0;
    line-height: 0.95;
    color: #1A2A38;
    letter-spacing: -0.02em;
}

.alpha-font-custom .alpha-section-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

.alpha-section-desc {
    max-width: 440px;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.65;
    margin: 0;
    color: #1A2A38;
    opacity: 0.8;
}

.alpha-font-custom .alpha-section-desc {
    font-family: 'Outfit', sans-serif;
}

/* 3. The Grid & Cell Border System (Premium, No Double Borders) */
.alpha-brands-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid rgba(26, 42, 56, 0.12);
    border-left: 1px solid rgba(26, 42, 56, 0.12);
    margin-top: 40px;
}

.alpha-brand-cell-link {
    text-decoration: none;
    color: inherit;
    display: block;
    outline: none;
}

.alpha-brand-cell {
    aspect-ratio: 1 / 0.58;
    min-height: 160px;
    border-right: 1px solid rgba(26, 42, 56, 0.12);
    border-bottom: 1px solid rgba(26, 42, 56, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    position: relative;
    background-color: transparent;
    transition: background-color 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

/* 4. Sequenced Brand Numbers */
.alpha-brand-number {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: #1A2A38;
    opacity: 0.4;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.alpha-font-custom .alpha-brand-number {
    font-family: 'Outfit', sans-serif;
}

/* 5. Brand Visual Elements (Logo / Text Name) */
.alpha-brand-content-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Premium Text Logo */
.alpha-brand-name {
    font-size: 26px;
    font-weight: 400;
    color: #1A2A38;
    letter-spacing: -0.01em;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-block;
}

.alpha-font-custom .alpha-brand-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

/* Premium Image Logo */
.alpha-brand-logo {
    max-width: 65%;
    max-height: 52px;
    object-fit: contain;
    /* Luxury styling: Grayscale with soft transparency, turns into full color on hover */
    opacity: 0.65;
    filter: grayscale(100%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                filter 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center center;
}

/* 6. Advanced Hover Micro-Animations */
.alpha-brand-cell-link:hover .alpha-brand-cell {
    background-color: rgba(26, 42, 56, 0.02); /* Elegant, soft darkening */
    box-shadow: inset 0 0 0 1px rgba(26, 42, 56, 0.04);
}

/* If background is Cream, hover cell becomes slightly warmer/darker cream */
.alpha-bg-cream .alpha-brand-cell-link:hover .alpha-brand-cell {
    background-color: rgba(26, 42, 56, 0.03);
}

.alpha-brand-cell-link:hover .alpha-brand-number {
    opacity: 0.7;
    transform: translate(-50%, -2px);
}

/* Hover Logo: Bring to full color and scale up softly */
.alpha-brand-cell-link:hover .alpha-brand-logo {
    opacity: 1.0;
    filter: grayscale(0%);
    transform: scale(1.07);
}

/* Hover Text-only Logo: elegant gold/accent shift and subtle lift */
.alpha-brand-cell-link:hover .alpha-brand-name {
    color: #bfa15f; /* Elegant Champagne Gold accent */
    transform: translateY(-4px);
}

/* 7. Empty Directory fallback styling */
.alpha-empty-grid {
    grid-column: 1 / -1;
    padding: 80px 40px;
    text-align: center;
    font-size: 15px;
    font-weight: 300;
    opacity: 0.5;
    color: #1A2A38;
}

.alpha-font-custom .alpha-empty-grid {
    font-family: 'Outfit', sans-serif;
}

/* 8. Fallback Inheritance for Theme Fonts */
.alpha-brand-section.alpha-font-theme,
.alpha-brand-section.alpha-font-theme *,
.alpha-font-theme .alpha-section-meta,
.alpha-font-theme .alpha-section-title,
.alpha-font-theme .alpha-section-desc,
.alpha-font-theme .alpha-brand-number,
.alpha-font-theme .alpha-brand-name,
.alpha-font-theme .alpha-empty-grid {
    font-family: inherit !important;
}

/* ==========================================================================
   9. Responsive Design & Media Queries (Buttery Smooth Scale-downs)
   ========================================================================== */

/* Large Tablets & Small Laptops */
@media (max-width: 1200px) {
    .alpha-brand-section {
        padding: 100px 0;
    }
    .alpha-section-inner {
        padding: 0 40px;
    }
    .alpha-section-title {
        font-size: 58px;
    }
    .alpha-brand-name {
        font-size: 24px;
    }
}

/* Medium Tablets (3 Columns or 2 Columns depending on premium sizing) */
@media (max-width: 1024px) {
    .alpha-brands-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .alpha-section-title-row {
        gap: 40px;
    }
    .alpha-section-title {
        font-size: 48px;
    }
    .alpha-section-desc {
        max-width: 100%; /* Spans full width on smaller screens below title */
    }
}

/* Portrait Tablets & Large Phones */
@media (max-width: 768px) {
    .alpha-brand-section {
        padding: 80px 0;
    }
    .alpha-section-inner {
        padding: 0 30px;
    }
    .alpha-brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .alpha-section-title {
        font-size: 42px;
    }
    .alpha-brand-cell {
        aspect-ratio: 1 / 0.65;
        padding: 30px 16px;
    }
}

/* Small Smart Phones */
@media (max-width: 480px) {
    .alpha-brand-section {
        padding: 60px 0;
    }
    .alpha-section-inner {
        padding: 0 20px;
    }
    .alpha-brands-grid {
        grid-template-columns: 1fr;
        border-left: none;
        border-right: none;
    }
    .alpha-brand-cell {
        aspect-ratio: auto;
        height: 120px;
        padding: 24px 16px;
        border-left: 1px solid rgba(26, 42, 56, 0.12);
        border-right: 1px solid rgba(26, 42, 56, 0.12);
    }
    
    /* Reset borders on 1-column layouts to keep outline consistent */
    .alpha-brands-grid {
        border-left: 1px solid rgba(26, 42, 56, 0.12);
        border-right: 1px solid rgba(26, 42, 56, 0.12);
    }
    
    .alpha-section-title {
        font-size: 36px;
    }
    .alpha-brand-name {
        font-size: 22px;
    }
}
