:root {
    --lg-ink: #2A1114;
    --lg-ink-soft: #6B5B5E;
    --lg-deep: #3B0F12;
    --lg-wine: #861E34;
    --lg-cardinal: #AF1731;
    --lg-sand: #E2BE96;
    --lg-green: #246257;
    --lg-line: #DDD5D7;
    --lg-error: #B3202F;
    --lg-font-display: 'Bricolage Grotesque', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --lg-font-body: 'Figtree', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

.lg-body {
    font-family: var(--lg-font-body);
    color: var(--lg-ink);
    background: #fff;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.lg-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.lg-brand {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: clamp(2rem, 5vw, 4.5rem);
    color: #fff;
    background:
        radial-gradient(900px 600px at 85% 95%, rgba(175, 23, 49, .6), transparent 60%),
        radial-gradient(700px 500px at 0% 0%, rgba(134, 30, 52, .55), transparent 65%),
        var(--lg-deep);
}

.lg-brand__pattern {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-repeat: repeat;
    background-size: 700px auto;
    opacity: .08;
    mix-blend-mode: screen;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .25) 70%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .25) 70%, transparent 100%);
}

.lg-brand__title {
    max-width: 11em;
    margin: 0 0 1.25rem;
    font-family: var(--lg-font-display);
    font-weight: 800;
    font-size: clamp(2.6rem, 4.4vw, 4.6rem);
    line-height: 1;
    letter-spacing: -.03em;
    text-wrap: balance;
}

.lg-brand__title span {
    display: block;
    background: linear-gradient(100deg, var(--lg-sand) 0%, #fff 75%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lg-brand__text {
    max-width: 28rem;
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .85);
}

.lg-brand__foot {
    position: relative;
    z-index: 2;
    margin: 0;
    font-size: .85rem;
    color: rgba(255, 255, 255, .62);
}

.lg-map {
    position: relative;
    flex: 1;
    min-height: 0;
    margin: 1.5rem 0 1.25rem;
    pointer-events: none;
    animation: lg-map-in 1s cubic-bezier(.2, .7, .2, 1) both;
}

.lg-map__stage {
    position: absolute;
    top: 0;
    right: clamp(0rem, 3vw, 3rem);
    height: 100%;
    aspect-ratio: 333 / 440;
    max-width: 100%;
}

.lg-map__stage::before {
    content: '';
    position: absolute;
    inset: -12%;
    z-index: -1;
    background: radial-gradient(closest-side, rgba(226, 190, 150, .38), transparent 72%);
    animation: lg-glow 5s ease-in-out infinite;
}

.lg-map svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .35));
}

.lg-map__shape {
    stroke: var(--lg-sand);
    stroke-width: 1.8;
    stroke-linejoin: round;
}

.lg-map__links path {
    fill: none;
    stroke: var(--lg-sand);
    stroke-opacity: .5;
    stroke-width: 1.2;
    stroke-dasharray: 3 5;
    stroke-linecap: round;
}

.lg-map__flow circle {
    fill: #fff;
    filter: drop-shadow(0 0 4px var(--lg-sand));
}

.pin__dot {
    fill: var(--lg-sand);
    stroke: #fff;
    stroke-width: 1.6;
}

.pin--main .pin__dot {
    fill: #fff;
    stroke: var(--lg-sand);
    stroke-width: 3;
}

.pin__pulse {
    fill: var(--lg-sand);
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: lg-pulse 3s ease-out infinite;
    animation-delay: var(--d, 0s);
}

.pin--main .pin__pulse {
    animation-duration: 2.2s;
}

.lg-chip {
    position: absolute;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem 1rem .5rem .5rem;
    font-size: .88rem;
    font-weight: 600;
    white-space: nowrap;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .45);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    animation: lg-float 6s ease-in-out infinite;
}

.lg-chip i {
    display: grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    font-size: .8rem;
    color: var(--lg-deep);
    background: var(--lg-sand);
    border-radius: 50%;
}

.lg-chip--1 {
    left: -64%;
    top: 16%;
}

.lg-chip--2 {
    left: -82%;
    top: 46%;
    animation-delay: -2s;
}

.lg-chip--3 {
    left: -58%;
    top: 74%;
    animation-delay: -4s;
}

.lg-access {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem clamp(1.25rem, 4vw, 3.5rem) 1.25rem;
    background:
        radial-gradient(520px 360px at 100% 0%, rgba(175, 23, 49, .06), transparent 70%),
        #fff;
}

.lg-card {
    width: 100%;
    max-width: 25rem;
    margin: auto 0;
}

.lg-card__logo {
    display: block;
    width: 220px;
    height: auto;
    margin: 0 0 1.5rem -.6rem;
}

.lg-card__head h2 {
    position: relative;
    margin: 0 0 .5rem;
    padding-bottom: .9rem;
    font-family: var(--lg-font-display);
    font-weight: 800;
    font-size: 2.15rem;
    line-height: 1.1;
    letter-spacing: -.02em;
    color: var(--lg-deep);
}

.lg-card__head h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 3rem;
    height: 4px;
    background: linear-gradient(90deg, var(--lg-cardinal), var(--lg-sand));
    border-radius: 4px;
}

.lg-card__head p {
    margin: 0 0 1.6rem;
    color: var(--lg-ink-soft);
}

.lg-rise>* {
    animation: lg-rise .6s cubic-bezier(.2, .7, .2, 1) both;
}

.lg-rise>*:nth-child(2) {
    animation-delay: .06s;
}

.lg-rise>*:nth-child(3) {
    animation-delay: .12s;
}

.lg-rise>*:nth-child(4) {
    animation-delay: .18s;
}

.lg-rise>*:nth-child(5) {
    animation-delay: .24s;
}

.lg-steps {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

.lg-steps__item {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .88rem;
    font-weight: 600;
    color: #9A8C90;
}

.lg-steps__item span {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    font-size: .8rem;
    border: 1.5px solid var(--lg-line);
    border-radius: 50%;
    transition: background-color .25s, border-color .25s, color .25s;
}

.lg-steps__item.is-active {
    color: var(--lg-wine);
}

.lg-steps__item.is-active span {
    color: #fff;
    background: var(--lg-wine);
    border-color: var(--lg-wine);
}

.lg-steps__item.is-done {
    color: var(--lg-green);
}

.lg-steps__item.is-done span {
    font-size: 0;
    color: #fff;
    background: var(--lg-green);
    border-color: var(--lg-green);
}

.lg-steps__item.is-done span::before {
    content: '\2713';
    font-size: .85rem;
}

.lg-steps__line {
    flex: 1;
    height: 2px;
    background: var(--lg-line);
    border-radius: 2px;
    transition: background-color .25s;
}

.lg-steps__item.is-done+.lg-steps__line {
    background: var(--lg-green);
}

.lg-field {
    margin-bottom: 1.2rem;
}

.lg-field label {
    display: block;
    margin-bottom: .45rem;
    font-size: .9rem;
    font-weight: 600;
}

.lg-field__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.lg-field__row label {
    margin-bottom: .45rem;
}

.lg-link {
    font-size: .86rem;
    font-weight: 600;
    color: var(--lg-wine);
    text-decoration: none;
    border-radius: 4px;
}

.lg-link:hover {
    color: var(--lg-cardinal);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.lg-input {
    position: relative;
    display: flex;
    align-items: center;
    height: 3.3rem;
    background: #fff;
    border: 1.5px solid var(--lg-line);
    border-radius: 12px;
    transition: border-color .18s, box-shadow .18s, background-color .18s;
}

.lg-input:hover {
    border-color: #C9BEC1;
}

.lg-input:focus-within {
    border-color: var(--lg-wine);
    box-shadow: 0 0 0 4px rgba(134, 30, 52, .14);
}

.lg-input>i:first-child {
    flex: none;
    width: 3rem;
    font-size: .95rem;
    text-align: center;
    color: #9A8C90;
    transition: color .18s;
}

.lg-input:focus-within>i:first-child {
    color: var(--lg-wine);
}

.lg-input input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 1rem 0 0;
    font: inherit;
    font-size: 1rem;
    color: var(--lg-ink);
    background: transparent;
    border: 0;
    outline: 0;
}

.lg-input input::placeholder {
    color: #A99DA0;
}

.lg-input input:-webkit-autofill {
    -webkit-text-fill-color: var(--lg-ink);
    box-shadow: 0 0 0 40px #fff inset;
}

.lg-input.is-invalid {
    background: #FFF9F9;
    border-color: var(--lg-error);
}

.lg-input.is-invalid:focus-within {
    box-shadow: 0 0 0 4px rgba(179, 32, 47, .14);
}

.lg-input--code input {
    padding-left: 0;
    font-family: var(--lg-font-display);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: .5em;
}

.lg-input--code input::placeholder {
    font-size: 1.1rem;
    letter-spacing: .5em;
}

.lg-toggle {
    flex: none;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 100%;
    padding: 0;
    color: #8A7B7F;
    background: transparent;
    border: 0;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    transition: color .15s;
}

.lg-toggle:hover {
    color: var(--lg-wine);
}

.lg-hint {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: .55rem 0 0;
    padding: .45rem .7rem;
    font-size: .84rem;
    font-weight: 500;
    color: #7A4300;
    background: #FFF4DF;
    border-radius: 8px;
}

.lg-meter {
    margin-top: .65rem;
}

.lg-meter__bars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .35rem;
}

.lg-meter__bars span {
    height: 5px;
    background: #EDE6E8;
    border-radius: 4px;
    transition: background-color .25s;
}

.lg-meter[data-level="1"] .lg-meter__bars span:nth-child(-n+1) {
    background: var(--lg-error);
}

.lg-meter[data-level="2"] .lg-meter__bars span:nth-child(-n+2) {
    background: #D98A1F;
}

.lg-meter[data-level="3"] .lg-meter__bars span:nth-child(-n+3) {
    background: #6BA33F;
}

.lg-meter[data-level="4"] .lg-meter__bars span {
    background: var(--lg-green);
}

.lg-meter__label,
.lg-match {
    margin: .4rem 0 0;
    font-size: .84rem;
    color: var(--lg-ink-soft);
}

.lg-match.is-ok {
    color: var(--lg-green);
    font-weight: 600;
}

.lg-match.is-bad {
    color: var(--lg-error);
}

.lg-submit {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    width: 100%;
    height: 3.4rem;
    margin-top: 1.6rem;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .01em;
    color: #fff;
    background: linear-gradient(135deg, var(--lg-wine) 0%, var(--lg-cardinal) 100%);
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 10px 24px -8px rgba(134, 30, 52, .55);
    transition: transform .15s, box-shadow .2s;
}

.lg-submit::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: skewX(-20deg);
    transition: left .6s ease;
}

.lg-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px -8px rgba(134, 30, 52, .65);
}

.lg-submit:hover::after {
    left: 130%;
}

.lg-submit:active {
    transform: translateY(0) scale(.99);
}

.lg-submit__icon {
    font-size: .9rem;
    transition: transform .2s;
}

.lg-submit:hover .lg-submit__icon {
    transform: translateX(4px);
}

.lg-submit__spinner {
    position: absolute;
    width: 1.35rem;
    height: 1.35rem;
    border: 3px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    opacity: 0;
    animation: lg-spin .7s linear infinite;
}

.lg-submit.is-loading {
    pointer-events: none;
    filter: saturate(.85);
}

.lg-submit.is-loading .lg-submit__label,
.lg-submit.is-loading .lg-submit__icon {
    opacity: 0;
}

.lg-submit.is-loading .lg-submit__spinner {
    opacity: 1;
}

.lg-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    height: 3rem;
    margin-top: .75rem;
    font: inherit;
    font-size: .95rem;
    font-weight: 600;
    color: var(--lg-wine);
    background: transparent;
    border: 1.5px solid var(--lg-line);
    border-radius: 12px;
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
}

.lg-ghost:hover {
    background: #FBF4F5;
    border-color: var(--lg-wine);
}

.lg-help {
    margin: 1.5rem 0 0;
    padding-top: 1.25rem;
    font-size: .9rem;
    color: var(--lg-ink-soft);
    border-top: 1px solid #EFE9EA;
}

.lg-back {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .92rem;
    font-weight: 600;
    color: var(--lg-wine);
    text-decoration: none;
}

.lg-back i {
    font-size: .8rem;
    transition: transform .2s;
}

.lg-back:hover i {
    transform: translateX(-3px);
}

.lg-footer {
    margin-top: 1.5rem;
    font-size: .8rem;
    color: #8F8387;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    margin: 0 0 1.25rem;
    padding: .8rem 1rem;
    font-size: .92rem;
    line-height: 1.45;
    border: 1px solid transparent;
    border-radius: 12px;
}

.alert i {
    margin-top: .12rem;
    font-size: 1.05rem;
}

.alert-danger {
    color: #7D1220;
    background: #FDECEE;
    border-color: #F6C5CB;
}

.alert-success {
    color: #14473E;
    background: #E6F5F1;
    border-color: #B7E0D6;
}

.lg-link:focus-visible,
.lg-back:focus-visible,
.lg-toggle:focus-visible,
.lg-ghost:focus-visible,
.lg-submit:focus-visible {
    outline: 3px solid rgba(134, 30, 52, .55);
    outline-offset: 2px;
}

@keyframes lg-pulse {
    0% {
        opacity: .6;
        transform: scale(1);
    }

    70%,
    100% {
        opacity: 0;
        transform: scale(4.2);
    }
}

@keyframes lg-map-in {
    from {
        opacity: 0;
        transform: translateY(18px) scale(.97);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes lg-glow {

    0%,
    100% {
        opacity: .55;
        transform: scale(.94);
    }

    50% {
        opacity: 1;
        transform: scale(1.06);
    }
}

@keyframes lg-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes lg-rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes lg-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1180px) {
    .lg-chip {
        display: none;
    }
}

@media (max-width: 1100px) {
    .lg-brand__title {
        font-size: clamp(2.2rem, 4.4vw, 3rem);
    }
}

@media (max-width: 860px) {
    .lg-shell {
        grid-template-columns: 1fr;
    }

    .lg-brand {
        padding: 2rem 1.5rem 5rem;
    }

    .lg-brand__title {
        margin: 0;
        font-size: 2rem;
    }

    .lg-brand__text,
    .lg-brand__foot {
        display: none;
    }

    .lg-map {
        position: absolute;
        inset: 0;
        margin: 0;
        opacity: .4;
        animation: none;
    }

    .lg-map__stage {
        top: -20%;
        right: .5rem;
        height: 150%;
    }

    .lg-access {
        z-index: 2;
        margin-top: -2.5rem;
        padding-top: 2rem;
        border-radius: 28px 28px 0 0;
        box-shadow: 0 -12px 30px -12px rgba(59, 15, 18, .4);
    }

    .lg-card {
        margin: 0;
    }

    .lg-card__logo {
        width: 170px;
    }

    .lg-card__head h2 {
        font-size: 1.85rem;
    }
}

@media (max-width: 380px) {
    .lg-field__row {
        flex-wrap: wrap;
        gap: .15rem;
    }

    .lg-input--code input {
        letter-spacing: .3em;
    }
}

@media (min-width: 861px) and (max-height: 700px) {
    .lg-card__logo {
        width: 150px;
        margin-bottom: .75rem;
    }

    .lg-card__head p {
        margin-bottom: 1.1rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .lg-map__flow {
        display: none;
    }
}
