/* CASCADE-LAYER: intentionally-unlayered — page composition. See .planning/phases/01-foundation-activation/01-CONTEXT.md D-01. */
/* stylelint-disable media-feature-name-disallowed-list -- Phase 6: max-width media queries retained; mobile-first conversion deferred (D-08). Strict-value/!important/order cleaned. */

/**
 * Unified Page Header Styles
 * 
 * Consistent styling for all content page headers across the site.
 * This ensures modularity and design consistency.
 * Based on the beautiful products page header design.
 */

/* ================================
   PAGE HERO SECTION
   ================================ */

.page-hero {
    position: relative;
    padding: var(--space-8) 0;
    color: var(--text-on-purple);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    overflow: hidden;
    margin-bottom: var(--space-8);
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(45deg, 
        transparent 0%, 
        rgb(255 255 255 / 5%) 25%, 
        rgb(255 255 255 / 10%) 50%, 
        rgb(255 255 255 / 5%) 75%, 
        transparent 100%);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

/* shimmer animation available in style.css */

/* ================================
   BREADCRUMB NAVIGATION
   ================================ */

.breadcrumb {
    margin-bottom: var(--space-8);
    font-family: var(--font-family-base);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    opacity: 0.9;
    text-align: center;
    letter-spacing: var(--letter-spacing-wide);
    animation: fade-in-down 0.6s ease-out 0.2s both;
}

/* Animation moved to utilities.css for consistency */

.breadcrumb a {
    position: relative;
    /* stylelint-disable-next-line scale-unlimited/declaration-strict-value -- off-grid 0.4rem/0.8rem breadcrumb-pill gutter; no --space-* token is byte-identical */
    padding: 0.4rem 0.8rem;
    font-weight: var(--font-weight-medium);
    color: rgb(255 255 255 / 90%);
    border-radius: var(--border-radius-full);
    transition: var(--transition-base);
    text-decoration: none;
}

.breadcrumb a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgb(255 255 255 / 10%);
    border-radius: var(--border-radius-full);
    opacity: 0;
    transition: var(--transition-base);
}

.breadcrumb a:hover {
    color: var(--text-on-purple);
    text-decoration: none;
}

.breadcrumb a:hover::before {
    opacity: 1;
}

.breadcrumb-separator {
    margin: 0 var(--space-4);
    font-weight: var(--font-weight-normal);
    opacity: 0.6;
}

.current-page {
    font-weight: var(--font-weight-semibold);
    color: var(--text-on-purple);
    opacity: 1;
}

/* ================================
   HERO CONTENT
   ================================ */

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-8);
}

.hero-main {
    flex: 1;
}

/* ================================
   PAGE TITLE CONTAINER
   ================================ */

.page-title {
    margin: 0 0 var(--space-3);
    font-family: var(--font-family-secondary);
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--text-on-purple);
    text-shadow: 0 2px 4px rgb(0 0 0 / 20%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizelegibility;
}

/* ================================
   PAGE DESCRIPTION
   ================================ */

.page-description {
    margin: 0;
    font-family: var(--font-family-base);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--text-on-purple);
    opacity: 0.95;
    animation: fade-in-up 0.8s ease-out 0.6s both;
    letter-spacing: var(--letter-spacing-normal);
    text-shadow: 0 1px 2px rgb(0 0 0 / 10%);
}

/* fade-in-up animation available in faq.css */

/* ================================
   PAGE STATS (for pages that have them)
   ================================ */

.hero-stats-compact {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    min-width: 280px;
}

.hero-stats-compact .stat-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    background: rgb(255 255 255 / 15%);
    border: 1px solid rgb(255 255 255 / 20%);
    border-radius: var(--border-radius-lg);
    transition: var(--transition-base);
    backdrop-filter: blur(10px);
}

.hero-stats-compact .stat-item:hover {
    background: rgb(255 255 255 / 20%);
    /* stylelint-disable-next-line scale-unlimited/declaration-strict-value -- bespoke hover-lift shadow geometry; no byte-exact --shadow-* token */
    box-shadow: 0 8px 25px rgb(0 0 0 / 15%);
    transform: translateY(-2px);
}

.hero-stats-compact .stat-icon {
    font-size: var(--text-2xl);
    flex-shrink: 0;
}

.hero-stats-compact .stat-text {
    margin: 0;
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    line-height: 1.3;
    color: var(--text-on-purple);
}

/* ================================
   SINGLE STAT ITEM (for pages with one stat)
   ================================ */

.hero-single-stat {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 280px;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (width <= 768px) {
    .page-hero {
        padding: var(--space-6) 0;
    }

    .breadcrumb {
        font-size: var(--font-size-xs);
        margin-bottom: var(--space-6);
    }

    .breadcrumb-separator {
        margin: 0 var(--space-3);
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-6);
    }

    .hero-stats-compact,
    .hero-single-stat {
        width: 100%;
        min-width: auto;
        max-width: 400px;
        margin: 0 auto;
    }

    .page-title {
        font-size: var(--font-size-2xl);
    }

    .page-description {
        max-width: 95%;
        font-size: var(--font-size-base);
    }
}

@media (width <= 480px) {
    .page-hero {
        padding: var(--space-4) 0;
    }

    .breadcrumb {
        margin-bottom: var(--space-4);
    }

    .hero-stats-compact .stat-item {
        gap: var(--space-2);
        padding: var(--space-3) var(--space-4);
    }

    .hero-stats-compact .stat-icon {
        font-size: var(--text-xl);
    }

    .hero-stats-compact .stat-text {
        font-size: var(--font-size-sm);
    }

    .page-title {
        font-size: var(--font-size-xl);
    }

    .page-description {
        font-size: var(--font-size-sm);
    }

    .breadcrumb-separator {
        margin: 0 var(--space-2);
    }
}

/* ================================
   ACCESSIBILITY ENHANCEMENTS
   ================================ */

@media (prefers-reduced-motion: reduce) {
    /* No !important: these selectors are styled only in this file at earlier
       source order; the reduced-motion override wins by source order (D-07). */
    .page-hero::before,
    .page-title,
    .page-description,
    .breadcrumb {
        animation: none;
    }
}

/* stylelint-disable-next-line media-feature-name-value-no-unknown -- `high` is a valid prefers-contrast value (MDN); this stylelint build's dictionary lags the spec */
@media (prefers-contrast: high) {
    .page-hero {
        background: var(--primary-color);
    }

    .breadcrumb a {
        border: 1px solid rgb(255 255 255 / 50%);
    }
}

/* ================================
   PRINT STYLES
   ================================ */

@media print {
    /* No !important: print rules follow the screen rules in source order at
       equal specificity, so they win for the print medium without a flag (D-07). */
    .page-hero {
        padding: var(--space-8) 0 var(--space-4);
        /* stylelint-disable-next-line scale-unlimited/declaration-strict-value -- pure-black print ink; no byte-exact token (--text-primary is charcoal, not #000) */
        color: black;
        background: white;
        box-shadow: none;
    }

    .page-hero::before {
        display: none;
    }

    .page-title {
        /* stylelint-disable-next-line scale-unlimited/declaration-strict-value -- pure-black print ink; no byte-exact token (--text-primary is charcoal, not #000) */
        color: black;
        text-shadow: none;
    }

    .page-description,
    .breadcrumb,
    .breadcrumb a,
    .current-page {
        /* stylelint-disable-next-line scale-unlimited/declaration-strict-value -- pure-black print ink; no byte-exact token (--text-primary is charcoal, not #000) */
        color: black;
        text-shadow: none;
    }
}
