/* ============================================
   HERO SECTION - Centralized Styles

   Shared styles for hero demo pages including:
   - NASA samples
   - Feather samples
   - Case studies
   - Other samples

   Usage: Add `heroSection: true` to frontmatter css block
   ============================================ */

/* Brand fonts for hero pages */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ----------------------------------------
   Base Reset (info panel only)
   Selective box-sizing to fix text wrapping without breaking layer animation
   ---------------------------------------- */
.demo-wrapper__info,
.demo-wrapper__info *,
.demo-wrapper__info *::before,
.demo-wrapper__info *::after {
    box-sizing: border-box;
}

/* ----------------------------------------
   Hero Demo Container
   ---------------------------------------- */
.hero-demo {
    width: 100%;
    height: calc(60vh + 143px);
    min-height: 593px;
    display: flex;
    flex-direction: column;
    /* Extend background up to fill header padding gap */
    margin-top: -143px;
    padding-top: 143px;
}

/* Laptop screens with limited height (1080p at 100% zoom) */
@media (min-width: 1024px) and (max-height: 900px) {
    .hero-demo {
        height: calc(55vh + 143px);
        min-height: 550px;
    }

    /* Constrain layer height for tall aspect ratios */
    .layer-animation__container {
        max-height: 350px;
    }

    .layer-animation__container .layer {
        max-height: 350px;
        width: auto;
    }

    .layer-animation__container .layer img {
        max-height: 350px;
        width: auto;
        height: auto;
    }
}

/* Tablet and smaller */
@media (max-width: 1024px) {
    .hero-demo {
        height: calc(60vh + 107px);
        min-height: 557px;
        margin-top: -107px;
        padding-top: 107px;
    }
}

/* ----------------------------------------
   Hero Content Wrapper
   ---------------------------------------- */
.hero-demo__content {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* ----------------------------------------
   Demo Wrapper - Two Panel Layout
   ---------------------------------------- */
.demo-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 500px;
}

.demo-wrapper__layers {
    flex: 0 0 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: flex 0.5s ease;
}

.demo-wrapper__info {
    flex: 0 0 50%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    opacity: 1;
    overflow: hidden;
    transition: opacity 0.4s ease, flex 0.5s ease;
}

/* Hover: Expand layers panel, hide info panel */
.demo-wrapper:hover .demo-wrapper__layers {
    flex: 0 0 100%;
}

.demo-wrapper:hover .demo-wrapper__info {
    opacity: 0;
    flex: 0 0 0%;
    padding: 0;
    overflow: hidden;
}

/* ----------------------------------------
   Info Panel Typography
   ---------------------------------------- */
.info-panel__title {
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.1;
}

.info-panel__divider {
    width: 60px;
    height: 2px;
    background: #f68b1f;
    margin-bottom: 20px;
}

/* Body text typography */
.info-panel__detail,
.info-panel__description,
.info-panel__credit,
.info-panel__effect,
.info-panel__sample-number {
    font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
}

.info-panel__detail {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
}

.info-panel__detail strong {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    display: inline-block;
    min-width: 80px;
}

.info-panel__detail a {
    color: #d4af37;
    text-decoration: none;
    transition: color 0.2s ease;
}

.info-panel__detail a:hover {
    color: #f4e4ba;
    text-decoration: underline;
}

.info-panel__sample-number {
    display: inline-block;
    max-width: fit-content;
    margin-top: 15px;
    padding: 6px 14px;
    background: rgba(246, 139, 31, 0.2);
    border: 1px solid rgba(246, 139, 31, 0.4);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #f68b1f;
}

.info-panel__description {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
    max-width: 55ch;
}

.info-panel__credit {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* ----------------------------------------
   Hero Controls - Toggle Typography
   ---------------------------------------- */
.paper-toggle__label,
.colorspace-toggle__label,
.process-toggle__label,
.sample-grid__label {
    font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
}

/* Sample grid item width constraints */
.sample-grid__item {
    width: 80px;
}

.sample-grid__label {
    width: 100%;
    word-wrap: break-word;
}

/* ----------------------------------------
   Effects List (Case Studies)
   ---------------------------------------- */
.info-panel__effects {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.info-panel__effect {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.info-panel__effect-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.9;
}

/* Credit line with logos (Case Studies) */
.info-panel__credit-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.info-panel__credit-logo {
    height: 16px;
    width: auto;
    opacity: 0.7;
}

.info-panel__credit-logo--invert {
    filter: invert(1);
}

/* ----------------------------------------
   Page Content Below Hero
   ---------------------------------------- */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-content h2 {
    color: #022662;
    font-size: 28px;
    margin-bottom: 20px;
}

.page-content p {
    color: #555;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* ----------------------------------------
   Responsive: Tablet (1024px and below)
   ---------------------------------------- */
@media (max-width: 1024px) {
    .demo-wrapper {
        flex-direction: column;
    }

    .demo-wrapper__layers,
    .demo-wrapper__info {
        flex: none;
        width: 100%;
    }

    .demo-wrapper__layers {
        min-height: 400px;
    }

    .demo-wrapper__info {
        padding: 30px;
    }

    /* Disable hover expansion on tablet/mobile */
    .demo-wrapper:hover .demo-wrapper__layers {
        flex: none;
    }

    .demo-wrapper:hover .demo-wrapper__info {
        opacity: 1;
        padding: 30px;
    }

    .info-panel__title {
        font-size: 32px;
    }
}

/* ----------------------------------------
   Responsive: Mobile (768px and below)
   ---------------------------------------- */
@media (max-width: 768px) {
    .info-panel__title {
        font-size: 28px;
    }

    .demo-wrapper__info {
        padding: 20px;
    }
}

/* ----------------------------------------
   Responsive: Small Mobile (480px and below)
   ---------------------------------------- */
@media (max-width: 480px) {
    .demo-wrapper__layers {
        min-height: 350px;
        padding: 15px;
    }

    .info-panel__title {
        font-size: 24px;
    }

    .info-panel__detail {
        font-size: 14px;
    }
}
