/*
 * Organic journey timeline
 * A botanical alternative to the original straight rule and circular markers.
 */
.history-tree-section {
    --history-branch-deep: #312e81;
    --history-branch-main: #4f46e5;
    --history-branch-light: #818cf8;
    --history-leaf-pale: #e0e7ff;
}

.journey-sprout {
    width: 174px;
    height: 42px;
    margin: 14px auto 0;
}

.journey-sprout svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.journey-sprout__stem,
.journey-sprout__twig {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.journey-sprout__stem {
    stroke: var(--history-branch-main);
    stroke-width: 2.5;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
}

.journey-sprout__twig {
    stroke: var(--history-branch-light);
    stroke-width: 1.4;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
}

.journey-sprout__leaf {
    filter: drop-shadow(0 4px 7px rgba(79, 70, 229, .16));
    transform-box: fill-box;
    transform-origin: center;
}

.luxe-motion-enabled .history-tree-section:not(.is-revealed) .journey-sprout__stem,
.luxe-motion-enabled .history-tree-section:not(.is-revealed) .journey-sprout__twig {
    stroke-dashoffset: 1;
}

.history-tree-section.is-revealed .journey-sprout__stem {
    transition: stroke-dashoffset 1.15s cubic-bezier(.16, 1, .3, 1) .18s;
}

.history-tree-section.is-revealed .journey-sprout__twig {
    transition: stroke-dashoffset .8s cubic-bezier(.16, 1, .3, 1) .76s;
}

.luxe-motion-enabled .history-tree-section:not(.is-revealed) .journey-sprout__leaf {
    opacity: 0;
    transform: scale(.15) rotate(-18deg);
}

.history-tree-section.is-revealed .journey-sprout__leaf {
    opacity: 1;
    transform: scale(1) rotate(0);
    transition:
        opacity .55s ease 1.04s,
        transform .95s cubic-bezier(.16, 1, .3, 1) 1.04s;
}

.heritage-timeline {
    isolation: isolate;
}

.history-tree {
    position: absolute;
    z-index: 0;
    top: -36px;
    bottom: -36px;
    left: 50%;
    width: 184px;
    height: calc(100% + 72px);
    overflow: visible;
    pointer-events: none;
    transform: translateX(-50%);
}

.history-tree__shadow,
.history-tree__trunk,
.history-tree__sap,
.history-tree__twig,
.history-tree__vein {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.history-tree__shadow {
    stroke: rgba(49, 46, 129, .08);
    stroke-width: 10;
}

.history-tree__trunk {
    stroke-width: 3.2;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    filter: drop-shadow(0 5px 7px rgba(79, 70, 229, .16));
}

.history-tree__sap {
    stroke: rgba(255, 255, 255, .8);
    stroke-width: .8;
    stroke-dasharray: .018 .982;
    stroke-dashoffset: 1;
    opacity: 0;
    animation: history-sap-flow 6.4s linear infinite;
    animation-play-state: paused;
}

.history-tree__twig {
    stroke-width: 2;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    filter: drop-shadow(0 3px 4px rgba(79, 70, 229, .12));
}

.history-tree__vein {
    stroke: rgba(99, 102, 241, .58);
    stroke-width: 1.15;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
}

.history-tree__seed {
    fill: #fff;
    stroke: var(--history-branch-light);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 3px 6px rgba(79, 70, 229, .2));
}

.luxe-motion-enabled .history-tree-section:not(.is-revealed) .history-tree__trunk,
.luxe-motion-enabled .history-tree-section:not(.is-revealed) .history-tree__twig,
.luxe-motion-enabled .history-tree-section:not(.is-revealed) .history-tree__vein {
    stroke-dashoffset: 1;
}

.luxe-motion-enabled .history-tree-section:not(.is-revealed) .history-tree__seed {
    opacity: 0;
    transform: scale(0);
}

.history-tree-section.is-revealed .history-tree__trunk {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 2.8s cubic-bezier(.65, 0, .35, 1) .2s;
}

.history-tree-section.is-revealed .history-tree__branch--one .history-tree__twig,
.history-tree-section.is-revealed .history-tree__branch--one .history-tree__vein {
    transition: stroke-dashoffset .9s cubic-bezier(.16, 1, .3, 1) .72s;
}

.history-tree-section.is-revealed .history-tree__branch--two .history-tree__twig,
.history-tree-section.is-revealed .history-tree__branch--two .history-tree__vein {
    transition: stroke-dashoffset .9s cubic-bezier(.16, 1, .3, 1) 1.25s;
}

.history-tree-section.is-revealed .history-tree__branch--three .history-tree__twig,
.history-tree-section.is-revealed .history-tree__branch--three .history-tree__vein {
    transition: stroke-dashoffset .9s cubic-bezier(.16, 1, .3, 1) 1.82s;
}

.history-tree-section.is-revealed .history-tree__branch--four .history-tree__twig,
.history-tree-section.is-revealed .history-tree__branch--four .history-tree__vein {
    transition: stroke-dashoffset .9s cubic-bezier(.16, 1, .3, 1) 2.34s;
}

.history-tree-section.is-revealed .history-tree__twig,
.history-tree-section.is-revealed .history-tree__vein {
    stroke-dashoffset: 0;
}

.history-tree-section.is-revealed .history-tree__seed {
    opacity: 1;
    transform: scale(1);
    transform-box: fill-box;
    transform-origin: center;
    transition:
        opacity .45s ease var(--history-seed-delay, 1s),
        transform .85s cubic-bezier(.16, 1, .3, 1) var(--history-seed-delay, 1s);
}

.history-tree-section.is-revealed .history-tree__sap {
    opacity: .92;
    animation-play-state: running;
    transition: opacity .5s ease 2.8s;
}

.history-milestone {
    z-index: 1;
}

.history-branch-node {
    position: absolute;
    z-index: 12;
    top: 50%;
    display: block;
    width: 54px;
    height: 58px;
    pointer-events: none;
}

.history-branch-node--right {
    left: 0;
    transform: translate(-50%, -50%);
}

.history-branch-node--left {
    right: 0;
    transform: translate(50%, -50%);
}

.history-branch-node__stem {
    position: absolute;
    left: 50%;
    top: 18px;
    width: 2px;
    height: 29px;
    border-radius: 999px;
    background: linear-gradient(to bottom, var(--history-branch-light), var(--history-branch-deep));
    transform: translateX(-50%) rotate(5deg);
    transform-origin: 50% 100%;
    box-shadow: 0 3px 7px rgba(79, 70, 229, .18);
}

.history-branch-node__core {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 31px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50% 50% 50% 12%;
    background: var(--history-branch-main);
    box-shadow:
        0 0 0 3px rgba(99, 102, 241, .16),
        0 5px 12px rgba(49, 46, 129, .22);
    transform: translate(-50%, -50%) rotate(45deg);
}

.history-branch-node__leaf {
    position: absolute;
    z-index: 2;
    display: block;
    opacity: 1;
    transform: scale(1);
    transform-origin: 50% 100%;
}

.history-branch-node__leaf > span {
    display: block;
    width: 17px;
    height: 27px;
    border: 1px solid rgba(255, 255, 255, .62);
    border-radius: 100% 0 100% 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .32), transparent 45%),
        linear-gradient(145deg, var(--history-leaf-pale), var(--history-branch-light) 48%, var(--history-branch-main));
    box-shadow: 0 7px 15px rgba(79, 70, 229, .2);
    transform-origin: 12% 88%;
    animation: history-leaf-sway 4.6s ease-in-out infinite alternate;
}

.history-branch-node__leaf--one {
    left: 27px;
    top: 3px;
    rotate: 14deg;
}

.history-branch-node__leaf--two {
    left: 10px;
    top: 13px;
    rotate: -78deg;
}

.history-branch-node__leaf--two > span {
    width: 14px;
    height: 23px;
    animation-delay: -1.6s;
}

.luxe-motion-enabled .history-milestone:not(.is-revealed) .history-branch-node__stem {
    opacity: 0;
    transform: translateX(-50%) scaleY(0) rotate(5deg);
}

.luxe-motion-enabled .history-milestone:not(.is-revealed) .history-branch-node__core {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0) rotate(15deg);
}

.luxe-motion-enabled .history-milestone:not(.is-revealed) .history-branch-node__leaf {
    opacity: 0;
    transform: scale(.12);
}

.history-milestone.is-revealed .history-branch-node__stem,
.history-milestone.is-revealed .history-branch-node__core,
.history-milestone.is-revealed .history-branch-node__leaf {
    transition:
        opacity .5s ease var(--history-node-delay, .28s),
        transform .9s cubic-bezier(.16, 1, .3, 1) var(--history-node-delay, .28s);
}

.history-milestone.is-revealed .history-branch-node__leaf--two {
    transition-delay: calc(var(--history-node-delay, .28s) + .14s);
}

@keyframes history-sap-flow {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes history-leaf-sway {
    0% {
        transform: rotate(-3deg) scale(.98);
        filter: saturate(.95);
    }
    55% {
        transform: rotate(4deg) scale(1.025);
        filter: saturate(1.12);
    }
    100% {
        transform: rotate(-1deg) scale(1);
        filter: saturate(1);
    }
}

@media (max-width: 767px) {
    .journey-sprout {
        width: 150px;
    }

    .heritage-timeline {
        padding-left: 36px;
    }

    .history-tree {
        left: -56px;
        width: 152px;
        transform: none;
        opacity: .72;
    }

    .history-branch-node--right,
    .history-branch-node--left {
        right: auto;
        left: -16px;
        transform: translate(-50%, -50%) scale(.82);
    }

    .history-milestone {
        margin-bottom: 74px;
    }

    .history-milestone:last-child {
        margin-bottom: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .journey-sprout__stem,
    .journey-sprout__twig,
    .history-tree__trunk,
    .history-tree__twig,
    .history-tree__vein {
        stroke-dashoffset: 0 !important;
        transition: none !important;
    }

    .journey-sprout__leaf,
    .history-tree__seed,
    .history-branch-node__stem,
    .history-branch-node__core,
    .history-branch-node__leaf {
        opacity: 1 !important;
        transition: none !important;
    }

    .history-tree__sap {
        display: none;
    }

    .history-branch-node__leaf > span {
        animation: none !important;
    }
}
