/* =========================================================
   Nova Vita — Seção A História (Michelle)
   Prefixo: .nv-historia
   ========================================================= */

.nv-historia {
    --nv-hs-bg: #f6f3ec;
    --nv-hs-title: #22271f;
    --nv-hs-text: #4e5049;
    --nv-hs-olive: #5f654a;
    --nv-hs-quote: #596046;
    --nv-hs-line: rgba(78, 82, 64, 0.35);
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--nv-hs-bg);
    color: var(--nv-hs-title);
}

.nv-historia__inner {
    width: min(1540px, calc(100% - 110px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 52% 48%;
    gap: 60px;
    padding: 80px 0 50px;
    align-items: stretch;
}

/* ---------- Label ---------- */
.nv-historia__label {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 60px;
    font-family: Inter, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--nv-hs-olive);
    line-height: 1.2;
}

.nv-historia__label-line {
    display: block;
    width: 65px;
    height: 1px;
    flex: 0 0 auto;
    background: #666b55;
}

/* ---------- Título ---------- */
.nv-historia__title {
    max-width: 720px;
    margin: 0;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(58px, 5vw, 76px);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -1.3px;
    color: var(--nv-hs-title);
    text-transform: none;
}

/* ---------- Texto ---------- */
.nv-historia__text {
    max-width: 630px;
    margin-top: 40px;
    font-family: Inter, system-ui, sans-serif;
    font-size: 19px;
    font-weight: 300;
    line-height: 1.55;
    color: var(--nv-hs-text);
}

.nv-historia__text p {
    margin: 0 0 26px;
}

.nv-historia__text p:last-child {
    margin-bottom: 0;
}

/* ---------- Rodapé esquerdo ---------- */
.nv-historia__footer-left {
    margin-top: 70px;
    display: flex;
    align-items: center;
    gap: 25px;
}

.nv-historia__footer-left > span {
    display: block;
    width: 70px;
    height: 1px;
    flex: 0 0 auto;
    background: #77796b;
}

.nv-historia__footer-left p {
    margin: 0;
    font-family: Inter, system-ui, sans-serif;
    font-size: 10px;
    letter-spacing: 4px;
    font-weight: 400;
    text-transform: uppercase;
    color: #747568;
}

/* ---------- Visual ---------- */
.nv-historia__visual {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.nv-historia__image-wrap {
    position: relative;
    flex: 1;
    min-height: 800px;
    overflow: hidden;
}

.nv-historia__image {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    box-shadow: none;
}

/* ---------- Bloco verde ---------- */
.nv-historia__quote {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 3;
    width: 260px;
    min-height: 420px;
    box-sizing: border-box;
    padding: 70px 42px 45px;
    background: var(--nv-hs-quote);
    color: #f5f2e9;
}

.nv-historia__quote-top {
    display: block;
    width: 1px;
    height: 70px;
    margin: -70px 0 35px 30px;
    background: rgba(255, 255, 255, 0.7);
}

.nv-historia__quote p {
    margin: 0;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 30px;
    line-height: 1.3;
    font-weight: 400;
    font-style: italic;
}

.nv-historia__quote-bottom {
    display: block;
    width: 70px;
    height: 1px;
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.75);
}

/* ---------- Rodapé direito ---------- */
.nv-historia__footer-right {
    margin-top: 28px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 26px;
}

.nv-historia__footer-right span {
    display: block;
    width: 220px;
    height: 1px;
    flex: 0 0 auto;
    background: rgba(78, 82, 64, 0.45);
}

.nv-historia__footer-right p {
    margin: 0;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: #4d5141;
    white-space: nowrap;
}

/* ---------- Entrada ---------- */
.js .nv-historia:not(.nv-historia--visible) .nv-historia__label,
.js .nv-historia:not(.nv-historia--visible) .nv-historia__title,
.js .nv-historia:not(.nv-historia--visible) .nv-historia__text,
.js .nv-historia:not(.nv-historia--visible) .nv-historia__quote,
.js .nv-historia:not(.nv-historia--visible) .nv-historia__footer-left,
.js .nv-historia:not(.nv-historia--visible) .nv-historia__footer-right {
    opacity: 0;
}

.js .nv-historia:not(.nv-historia--visible) .nv-historia__title,
.js .nv-historia:not(.nv-historia--visible) .nv-historia__text {
    transform: translateY(20px);
}

.js .nv-historia:not(.nv-historia--visible) .nv-historia__quote {
    transform: translateX(20px);
}

.js .nv-historia:not(.nv-historia--visible) .nv-historia__image {
    transform: scale(1.03);
}

.nv-historia__label,
.nv-historia__title,
.nv-historia__text,
.nv-historia__quote,
.nv-historia__footer-left,
.nv-historia__footer-right {
    opacity: 1;
    transition:
        opacity 0.9s ease,
        transform 0.9s ease;
}

.nv-historia__image {
    transform-origin: center;
    transition: transform 1.4s ease;
}

.nv-historia--visible .nv-historia__label,
.nv-historia--visible .nv-historia__title,
.nv-historia--visible .nv-historia__text,
.nv-historia--visible .nv-historia__quote,
.nv-historia--visible .nv-historia__footer-left,
.nv-historia--visible .nv-historia__footer-right {
    opacity: 1;
    transform: none;
}

.nv-historia--visible .nv-historia__image {
    transform: scale(1);
}

.nv-historia--visible .nv-historia__title {
    transition-delay: 0.08s;
}

.nv-historia--visible .nv-historia__text {
    transition-delay: 0.16s;
}

.nv-historia--visible .nv-historia__quote {
    transition-delay: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
    .js .nv-historia:not(.nv-historia--visible) .nv-historia__label,
    .js .nv-historia:not(.nv-historia--visible) .nv-historia__title,
    .js .nv-historia:not(.nv-historia--visible) .nv-historia__text,
    .js .nv-historia:not(.nv-historia--visible) .nv-historia__quote,
    .js .nv-historia:not(.nv-historia--visible) .nv-historia__footer-left,
    .js .nv-historia:not(.nv-historia--visible) .nv-historia__footer-right,
    .js .nv-historia:not(.nv-historia--visible) .nv-historia__image,
    .nv-historia__label,
    .nv-historia__title,
    .nv-historia__text,
    .nv-historia__quote,
    .nv-historia__footer-left,
    .nv-historia__footer-right,
    .nv-historia__image {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------- Desktop menor ---------- */
@media (max-width: 1250px) {
    .nv-historia__inner {
        width: calc(100% - 60px);
        gap: 45px;
    }

    .nv-historia__title {
        font-size: 60px;
    }

    .nv-historia__text {
        font-size: 17px;
    }

    .nv-historia__quote {
        width: 220px;
        min-height: 380px;
        padding: 60px 32px 40px;
    }

    .nv-historia__quote p {
        font-size: 26px;
    }

    .nv-historia__image-wrap {
        min-height: 720px;
    }
}

/* ---------- Tablet ---------- */
@media (max-width: 950px) {
    .nv-historia__inner {
        width: 100%;
        display: flex;
        flex-direction: column;
        padding: 65px 30px 40px;
        gap: 40px;
    }

    .nv-historia__content {
        width: 100%;
    }

    .nv-historia__title {
        max-width: 800px;
        font-size: 58px;
    }

    .nv-historia__text {
        max-width: 760px;
    }

    .nv-historia__image-wrap {
        min-height: 680px;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
    .nv-historia__inner {
        padding: 52px 20px 35px;
        gap: 28px;
    }

    .nv-historia__label {
        margin-bottom: 38px;
        gap: 16px;
        font-size: 11px;
        letter-spacing: 3px;
    }

    .nv-historia__label-line {
        width: 38px;
    }

    .nv-historia__title {
        font-size: 45px;
        line-height: 0.98;
        letter-spacing: -1px;
    }

    .nv-historia__text {
        margin-top: 30px;
        font-size: 16px;
        line-height: 1.55;
    }

    .nv-historia__text p {
        margin-bottom: 20px;
    }

    .nv-historia__footer-left {
        margin-top: 45px;
        gap: 15px;
    }

    .nv-historia__footer-left > span {
        width: 40px;
    }

    .nv-historia__footer-left p {
        font-size: 8px;
        letter-spacing: 2.5px;
    }

    .nv-historia__image-wrap {
        min-height: 560px;
    }

    .nv-historia__quote {
        width: 190px;
        min-height: 320px;
        padding: 45px 25px 30px;
    }

    .nv-historia__quote p {
        font-size: 22px;
    }

    .nv-historia__quote-top {
        height: 45px;
        margin-top: -45px;
        margin-bottom: 25px;
    }

    .nv-historia__footer-right span {
        width: 80px;
    }

    .nv-historia__footer-right p {
        font-size: 17px;
        letter-spacing: 4px;
    }
}
