/* =========================================================
   A MONTANHA ESQUECIDA — RAIZES V1
   ========================================================= */

.ame-raizes {
    position: relative;
    width: min(100%, 1100px);
    margin: 72px auto 0;
    padding: 0 max(4vmin, 20px) 96px;
    overflow: hidden;
    isolation: isolate;
}

.ame-raizes-head {
    position: relative;
    z-index: 4;
    text-align: center;
    margin-bottom: 24px;
}

.ame-raizes-eyebrow {
    margin: 0 0 8px;
    color: rgba(183, 165, 116, .72);
    font-family: var(--ame-sans);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.ame-raizes-title {
    margin: 0;
    color: #eee8d7;
    font-family: var(--ame-serif);
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -.025em;
}

.ame-raizes-sub {
    max-width: 520px;
    margin: 14px auto 0;
    color: rgba(217, 213, 203, .62);
    font-family: var(--ame-serif);
    font-size: 1.6rem;
    line-height: 1.5;
}

.ame-raizes-montanha-wrap {
    position: relative;
    z-index: 3;
    width: min(100%, 760px);
    margin: 26px auto 0;
}

.ame-raizes-montanha {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 22px 22px 8px 8px;
    opacity: .86;
    filter:
        saturate(.72)
        brightness(.72)
        contrast(1.06);
    -webkit-mask-image:
        linear-gradient(
            to bottom,
            #000 0%,
            #000 70%,
            rgba(0,0,0,.88) 82%,
            rgba(0,0,0,.35) 94%,
            transparent 100%
        );
    mask-image:
        linear-gradient(
            to bottom,
            #000 0%,
            #000 70%,
            rgba(0,0,0,.88) 82%,
            rgba(0,0,0,.35) 94%,
            transparent 100%
        );
}

.ame-raizes-body {
    position: relative;
    width: min(100%, 920px);
    height: 600px;
    margin: -38px auto 0;
}

.ame-raizes-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    z-index: 1;
    pointer-events: none;
}

.ame-raiz {
    fill: none;
    stroke: rgba(183, 165, 116, .27);
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;

    stroke-dasharray: 1100;
    stroke-dashoffset: 1100;

    transition:
        stroke-dashoffset 2400ms cubic-bezier(.22,.61,.36,1),
        opacity 800ms ease;

    opacity: .72;
}

.ame-raiz-principal {
    stroke-width: 3;
    stroke: rgba(151, 169, 132, .34);
}

.ame-raizes-visible .ame-raiz {
    stroke-dashoffset: 0;
}

.ame-raizes-node {
    position: absolute;
    z-index: 3;
    transform: translate(-50%, -50%);

    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 132px;
    min-height: 54px;
    padding: 10px 14px;

    border: 1px solid rgba(221, 214, 192, .10);
    border-radius: 999px;

    color: rgba(238, 234, 222, .76);
    background:
        radial-gradient(
            circle at 50% 30%,
            rgba(135, 152, 120, .08),
            rgba(5, 6, 7, .82) 68%
        );

    font-family: var(--ame-serif);
    font-size: 1.45rem;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;

    opacity: 0;
    transform:
        translate(-50%, -44%)
        scale(.97);

    transition:
        opacity 900ms ease,
        transform 1100ms cubic-bezier(.22,.61,.36,1),
        border-color 220ms ease,
        color 220ms ease,
        background 220ms ease;
}

.ame-raizes-visible .ame-raizes-node {
    opacity: 1;
    transform:
        translate(-50%, -50%)
        scale(1);
}

.ame-raizes-node:hover {
    color: #f4efe2;
    border-color: rgba(168, 181, 150, .28);
    background:
        radial-gradient(
            circle at 50% 30%,
            rgba(135, 152, 120, .14),
            rgba(5, 6, 7, .88) 70%
        );
}

.ame-raizes-node::before {
    content: "";
    position: absolute;
    width: 5px;
    height: 5px;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    background: rgba(183, 165, 116, .55);
    box-shadow:
        0 0 12px rgba(183, 165, 116, .18);
}

.ame-raizes-node:nth-of-type(1) {
    transition-delay: 500ms;
}

.ame-raizes-node:nth-of-type(2) {
    transition-delay: 720ms;
}

.ame-raizes-node:nth-of-type(3) {
    transition-delay: 940ms;
}

.ame-raizes-node:nth-of-type(4) {
    transition-delay: 1160ms;
}

.ame-raizes-node:nth-of-type(5) {
    transition-delay: 1380ms;
}

@media (max-width: 767px) {
    .ame-raizes {
        margin-top: 52px;
        padding-bottom: 72px;
    }

    .ame-raizes-head {
        margin-bottom: 12px;
    }

    .ame-raizes-sub {
        max-width: 330px;
        font-size: 1.5rem;
    }

    .ame-raizes-montanha-wrap {
        width: calc(100% + 24px);
        margin-left: -12px;
    }

    .ame-raizes-montanha {
        border-radius: 14px;
    }

    .ame-raizes-body {
        height: 690px;
        margin-top: -28px;
    }

    .ame-raizes-node {
        min-width: 118px;
        min-height: 48px;
        padding: 9px 12px;
        font-size: 1.35rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ame-raiz,
    .ame-raizes-node {
        transition: none !important;
    }

    .ame-raiz {
        stroke-dashoffset: 0 !important;
    }

    .ame-raizes-node {
        opacity: 1 !important;
        transform:
            translate(-50%, -50%)
            scale(1) !important;
    }
}

/* =========================================================
   RAIZES V1.1 — ORGANICAS
   ========================================================= */

.ame-raiz {
    stroke: rgba(155, 154, 118, .25);
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ame-raiz-principal {
    stroke-width: 4.2;
    stroke: rgba(132, 145, 112, .34);
}

.ame-raiz-media {
    stroke-width: 2.4;
    opacity: .72;
}

.ame-raiz-fina {
    stroke-width: 1.15;
    opacity: .46;
}

.ame-raiz-fantasma {
    stroke-width: .8;
    opacity: .22;
}

/* os destinos deixam de parecer botoes */
.ame-raizes-node {
    min-width: 0 !important;
    min-height: 0 !important;

    padding: 7px 9px !important;

    border: 0 !important;
    border-radius: 0 !important;

    background: none !important;

    color: rgba(226, 220, 202, .72);

    font-size: 1.5rem;
    font-weight: 500;

    text-shadow:
        0 2px 14px rgba(0,0,0,.95),
        0 0 18px rgba(0,0,0,.65);
}

.ame-raizes-node::before {
    width: 4px;
    height: 4px;

    top: 50%;
    left: -3px;

    transform: translateY(-50%);

    background: rgba(177, 164, 116, .48);

    box-shadow:
        0 0 9px rgba(177, 164, 116, .18);
}

.ame-raizes-node::after {
    content: "";

    position: absolute;

    left: 8%;
    right: 8%;
    bottom: 1px;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(183,165,116,.20),
            transparent
        );

    transform: scaleX(.35);
    opacity: .2;

    transition:
        transform 400ms ease,
        opacity 400ms ease;
}

.ame-raizes-node:hover::after {
    transform: scaleX(1);
    opacity: .7;
}

.ame-raizes-node:hover {
    color: #f1ecdf;
}

/* mobile mais vertical e menos simetrico */
@media (max-width: 767px) {

    .ame-raizes-body {
        height: 720px;
    }

    .ame-raizes-node {
        font-size: 1.42rem;
        max-width: 145px;
    }
}
