/* --- SEKCJA 4: FORMULA (LIFT triFACTOR) --- */
.section-formula {
    background: #fff;
    color: #000;
    position: relative;
    /* Content needs to be z-index 2 to sit above grid (z-index 1) */
}

.section-formula>* {
    position: relative;
    z-index: 2;
}

.formula-header {
    text-align: center;
    margin-bottom: 4rem;
}

.trifactor-logo {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
}

.trifactor-logo span {
    font-weight: 600;
}

.formula-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 4rem;
}

/* Matematyczny Układ */
.math-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(4rem, 12vw, 10rem);
    line-height: 1;
    font-weight: 500;
    color: #000;
}

.math-left {
    display: flex;
    align-items: center;
    margin-right: 0.8rem;
}

.math-var {
    position: relative;
}

.math-sup {
    font-size: 0.5em;
    vertical-align: super;
    line-height: 0;
    position: relative;
    top: -0.2em;
}

.math-equals {
    margin: 0 0.5rem;
}

.math-fraction-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.math-numerator {
    padding-bottom: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.3em;
}

.math-line {
    width: 100%;
    height: 0.08em;
    background-color: #000;
    margin: 0.1em 0;
}

.math-denominator {
    padding-top: 0.1em;
}

.math-times {
    font-size: 0.8em;
    font-weight: 300;
}

.math-legend {
    margin-top: 5rem;
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .math-container {
        flex-direction: column;
        gap: 1rem;
    }

    .math-legend {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}