/* MQC FRONT PAGE TYPOGRAPHY + MOTION PATCH */

/* Masthead */
.masthead__title {
    color: #1a1a1a !important;
    letter-spacing: -0.045em !important;
    line-height: 0.95 !important;
}

/* Navigation */
@media (min-width: 1024px) {
    .primary-nav__list {
        gap: 1.25rem !important;
    }

    .primary-nav__list a {
        font-size: 0.75rem !important;
        letter-spacing: 0.08em !important;
        text-transform: uppercase !important;
        transition: color 0.18s ease, border-color 0.18s ease !important;
    }

    .primary-nav__list a:hover {
        color: #c41230 !important;
    }
}

/* Secondary cards */
.card-secondary {
    transition:
        transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 280ms ease,
        border-color 160ms ease;
}

.card-secondary:hover {
    transform: translateY(-3px);
}

.card-secondary__headline {
    font-size: clamp(1.08rem, 1.6vw, 1.35rem) !important;
    line-height: 1.12 !important;
    letter-spacing: -0.025em !important;
}

/* Animated headline underline */
.card-secondary__headline a,
.card-secondary a {
    color: inherit;
    text-decoration: none !important;
    background-image: linear-gradient(currentColor, currentColor);
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0% 1px;
    transition:
        background-size 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
        color 180ms ease;
}

.card-secondary__headline a:hover,
.card-secondary a:hover {
    background-size: 100% 1px;
    color: #c41230;
}

/* Excerpt rhythm */
.card-secondary__excerpt {
    display: block !important;
    font-family: 'Lora', Georgia, serif !important;
    font-size: 0.875rem !important;
    line-height: 1.62 !important;
    color: #4a4a4a !important;
    margin-top: 0.55rem !important;
    max-width: 68ch;
}

/* Feed sections */
.feed-section {
    margin-bottom: 2.75rem;
    padding-bottom: 2.75rem;
    border-bottom: 1px solid #1a1a1a;
    animation: mqcSectionEnter 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.feed-section:last-child {
    border-bottom: none;
}

@keyframes mqcSectionEnter {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section labels */
.section-label,
.section-label--analysis {
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.11em !important;
    text-transform: uppercase !important;
}

.section-label--analysis {
    color: #c41230 !important;
}

/* View all links */
.view-all-link {
    display: inline-block;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #1a1a1a;
    border-bottom: 1px solid #c41230;
    padding-bottom: 2px;
    margin-top: 1rem;
    transition:
        color 0.18s ease,
        transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
        border-color 0.18s ease;
}

.view-all-link:hover {
    color: #c41230;
    transform: translateX(3px);
}

.view-all-link--analysis {
    color: #c41230;
}

/* Footer contact */
.footer__contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer__contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.65);
    transition:
        color 0.15s ease,
        transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.footer__contact-link:hover {
    color: #c41230;
    transform: translateX(3px);
}

.footer__contact-icon {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Mobile nav */
@media (max-width: 1023px) {
    .primary-nav {
        display: block !important;
        height: auto !important;
        padding: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        transition:
            max-height 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
            padding 220ms ease !important;
    }

    .primary-nav[data-visible="true"] {
        max-height: 500px !important;
        padding: 0.5rem 0 !important;
    }

    .primary-nav[data-visible="false"] {
        max-height: 0 !important;
        padding: 0 !important;
    }

    .primary-nav__list {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        gap: 0 !important;
    }

    .primary-nav__list li {
        width: 100% !important;
        border-bottom: 1px solid #d8d4cc !important;
    }

    .primary-nav__list li:last-child {
        border-bottom: none !important;
    }

    .primary-nav__list a {
        display: block !important;
        padding: 0.875rem 1rem !important;
        font-size: 0.8125rem !important;
        letter-spacing: 0.08em !important;
        text-transform: uppercase !important;
        color: #1a1a1a !important;
        border-bottom: none !important;
    }

    .primary-nav__list a:hover {
        color: #c41230 !important;
    }
}

/* Mobile headline control */
@media (max-width: 640px) {
    .masthead__title {
        letter-spacing: -0.035em !important;
    }

    .card-secondary__headline {
        font-size: clamp(1.05rem, 5.2vw, 1.45rem) !important;
        line-height: 1.14 !important;
    }

    .card-secondary__excerpt {
        font-size: 0.9rem !important;
        line-height: 1.58 !important;
    }

    .feed-section {
        margin-bottom: 2rem;
        padding-bottom: 2rem;
    }
}

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}