body {
    margin: 0;
    overflow-x: hidden;
    background-color: #000;
    color: #fff;
    font-family: 'Arial', sans-serif
}

.lines {
    position: absolute;
    top: -1.5%;
    left: 0;
    right: 0;
    height: 105%;
    margin: auto;
    width: 90vw;
    opacity: .8
}

.line {
    position: absolute;
    width: 1px;
    height: 105%;
    top: -5px;
    left: 50%;
    background: rgb(255 255 255 / .05);
    overflow: hidden
}

.line::after {
    content: "";
    display: block;
    position: absolute;
    height: 15vh;
    width: 100%;
    opacity: .8;
    top: 0%;
    transform: translateY(-50%);
    left: 0;
    background: linear-gradient(to bottom, #fff0 0%, #ffffff 75%, #ffffff 100%);
    -webkit-animation: drop 7s 0s infinite;
    animation: drop 7s 0s infinite;
    -webkit-animation-fill-mode: forwards;
    animation-fill-mode: forwards;
    -webkit-animation-timing-function: cubic-bezier(.4, .26, 0, .97);
    animation-timing-function: cubic-bezier(.4, .26, 0, .97)
}

.line:nth-child(1) {
    left: 12.5%
}

.line:nth-child(1)::after {
    -webkit-animation-delay: 2s;
    animation-delay: 2s;
    opacity: .4
}

.line:nth-child(3) {
    left: 87.5%
}

.line:nth-child(3)::after {
    -webkit-animation-delay: 2.5s;
    animation-delay: 2.5s;
    opacity: .4
}

@-webkit-keyframes drop {
    0% {
        transform: translateY(-50%)
    }

    100% {
        transform: translateY(1200%)
    }
}

@keyframes drop {
    0% {
        transform: translateY(-50%)
    }

    100% {
        transform: translateY(1200%)
    }
}

canvas {
    display: block;
    width: 100%;
    height: 100%
}

#ui {
    position: absolute;
    bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 1rem;
    left: 0;
    top: auto;
    width: 100%;
    text-align: center;
    z-index: 100;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(.25, .46, .45, .94);
    --ui-glow-1: Thistle;
    --ui-glow-2: Orchid;
    --ui-glow-3: MediumSlateBlue;
    --ui-glow-4: MediumOrchid
}

@keyframes anim {

    0%,
    100% {
        filter: drop-shadow(0 0 3vmin var(--ui-glow-1)) drop-shadow(0 5vmin 4vmin var(--ui-glow-2)) drop-shadow(2vmin -2vmin 15vmin var(--ui-glow-3)) drop-shadow(0 0 7vmin var(--ui-glow-4))
    }

    30% {
        filter: drop-shadow(0 0 2.5vmin var(--ui-glow-1)) drop-shadow(0 4vmin 3vmin var(--ui-glow-2)) drop-shadow(2vmin -1vmin 10vmin var(--ui-glow-3)) drop-shadow(0 0 5vmin var(--ui-glow-4))
    }

    50% {
        filter: drop-shadow(0 0 2.75vmin var(--ui-glow-1)) drop-shadow(0 4.5vmin 3.7vmin var(--ui-glow-2)) drop-shadow(2vmin -1.5vmin 12vmin var(--ui-glow-3)) drop-shadow(0 0 6vmin var(--ui-glow-4))
    }

    70% {
        filter: drop-shadow(0 0 2.5vmin var(--ui-glow-1)) drop-shadow(0 5vmin 3vmin var(--ui-glow-2)) drop-shadow(2vmin -1vmin 10vmin var(--ui-glow-3)) drop-shadow(0 0 5vmin var(--ui-glow-4))
    }
}

#ui::before {
    animation: anim 12s infinite;
    background-color: rgb(0 0 0);
    background: radial-gradient(ellipse farthest-side at bottom, rgb(0 0 0) 75%, #fff0 100%);
    border-radius: 50% 50% 0% 0%;
    content: "";
    filter: drop-shadow(0 0 3vmin var(--ui-glow-1)) drop-shadow(0 5vmin 4vmin var(--ui-glow-2)) drop-shadow(2vmin -2vmin 15vmin var(--ui-glow-3)) drop-shadow(0 0 7vmin var(--ui-glow-4));
    height: calc(4vmin + 1em);
    position: absolute;
    width: 132%;
    bottom: -30px;
    left: -16%;
    transition: none
}

#ui.sticky {
    position: fixed;
    top: 0;
    bottom: auto;
    background: rgb(12 17 26 / .9);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 30px rgb(0 0 0 / .5);
    padding: 10px 0
}

#ui.sticky::before {
    transform: translateY(-27px) scale(.9, .25);
    height: .5em;
    transition: transform 0.55s ease-in-out
}

#ui.sticky #info,
#ui.sticky #lang-selector {
    background: #fff0;
    border: none;
    box-shadow: none;
    backdrop-filter: none
}

#ui.sticky .logo img {
    transform: scale(.6) translateY(0);
    mix-blend-mode: screen;
    opacity: .92
}

#info {
    font-size: 14px;
    padding: 10px 18px;
    background-color: rgb(25 30 50 / .35);
    border-radius: 10px;
    text-shadow: 0 0 5px rgb(0 128 255 / .8);
    border: 1px solid rgb(255 255 255 / .1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: inset 0 0 10px rgb(255 255 255 / .05);
    mix-blend-mode: plus-lighter
}

#ui.sticky #info {
    padding: 5px 15px
}

#lang-selector {
    mix-blend-mode: plus-lighter;
    margin-left: 15px;
    font-size: 14px;
    padding: 10px 18px;
    background-color: rgb(25 30 50 / .35);
    border-radius: 10px;
    border: 1px solid rgb(255 255 255 / .1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.5s ease;
    pointer-events: auto
}

nav {
    display: inline-block;
    pointer-events: auto
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 15px
}

nav a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.5s ease;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #fff0;
    display: block;
    outline: none
}

nav a span {
    color: #cecece
}

nav a .icon {
    width: 36px;
    height: 36px;
    fill: rgb(173 227 241 / .35);
    display: none
}

nav a:hover {
    color: #fff;
    background-color: rgb(255 255 255 / .05)
}

nav a:active {
    transform: translateY(1px);
    background-color: rgb(255 255 255 / .1)
}

nav a:focus-visible {
    border-color: rgb(0 255 234 / .5);
    box-shadow: 0 0 10px rgb(0 255 234 / .3);
    color: #fff
}

nav a.active {
    color: #a5c1e9;
    text-shadow: 0 0 10px rgb(0 195 255 / .6);
    border-color: rgb(106 117 130 / 51%);
    background-color: rgb(0 255 234 / .05)
}

nav a:hover .icon {
    transform: scale(1.1)
}

#lang-selector:hover {
    background-color: rgb(25 30 50 / .55);
    border-color: rgb(255 255 255 / .3)
}

#lang-selector a {
    color: rgb(255 255 255 / .4);
    text-decoration: none;
    transition: color 0.5s ease;
    font-weight: 700
}

#lang-selector a:hover {
    color: #fff
}

#lang-selector a.active {
    color: #a5c1e9;
    text-shadow: 0 0 8px rgb(182 232 255 / .5)
}

#lang-selector .separator {
    color: rgb(255 255 255 / .3);
    margin: 0 5px
}

#loading {
    position: fixed;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.6s ease-out
}

#loading span {
    font-size: 24px;
    letter-spacing: 2px;
    margin-bottom: 15px
}

#progress-container {
    width: 60%;
    max-width: 300px;
    height: 6px;
    background-color: rgb(255 255 255 / .1);
    border-radius: 3px;
    overflow: hidden
}

#progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00a2ff, #00ffea);
    transition: width 0.3s ease;
    border-radius: 3px
}

#controls {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 100;
    width: 100%;
    pointer-events: none
}

#shape-slider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    pointer-events: auto;
    background: rgb(0 0 0 / .3);
    padding: 1rem 2rem;
    border-radius: 50px;
    backdrop-filter: blur(5px);
    border: 1px solid rgb(255 255 255 / .1);
    transition: all 0.3s ease;
    mix-blend-mode: hard-light
}

#shape-slider:hover {
    background: rgb(0 0 0 / .5);
    border-color: rgb(255 255 255 / .2)
}

.arrow-btn {
    background: #fff0;
    border: none;
    color: rgb(255 255 255 / .7);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0
}

.arrow-btn:hover {
    color: #fff;
    transform: scale(1.2);
    text-shadow: 0 0 10px rgb(255 255 255 / .5);
    background: #fff0;
    box-shadow: none
}

#shape-text-container {
    text-align: center;
    min-width: 250px;
    color: #fff;
    overflow: hidden;
    position: relative;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center
}

#shape-title {
    font-family: 'Segoe UI', sans-serif;
    font-size: 1.4rem;
    font-weight: 400;
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgb(255 255 255 / .3)
}

#shape-desc {
    font-family: 'Segoe UI', sans-serif;
    font-size: .85rem;
    margin: 4px 0 0 0;
    opacity: .7;
    font-weight: 300
}

.container {
    position: relative;
    min-height: 180px;
    margin: 160px auto 120px auto
}

section#servicios {
    padding: 80px 0;
    background: linear-gradient(180deg, #000 0%, #0f1520 50%, #070f16 100%);
    position: relative;
    text-align: center
}

.atom-container {
    position: relative
}

#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden
}

#logo-container {
    transition: transform 0.4s ease;
    display: flex;
    align-items: center
}

#logo-container img {
    width: 175px;
    height: 47px;
    filter: drop-shadow(0 0 10px rgb(0 0 0 / .5));
    transition: transform 0.4s ease;
    mix-blend-mode: overlay
}

#zoom-progress-container {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 300px;
    opacity: .75;
    background: rgb(255 255 255 / .1);
    border-radius: 4px;
    overflow: hidden;
    z-index: 90;
    pointer-events: none;
    box-shadow: 0 0 10px rgb(0 0 0 / .5);
    backdrop-filter: blur(2px);
    border: 1px solid rgb(255 255 255 / .05)
}

#zoom-progress-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #00ffea;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ffea;
    opacity: .5
}

#zoom-progress-container::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #00ffea;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ffea;
    opacity: .5
}

#zoom-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: scaleY(0);
    transform-origin: bottom;
    background: linear-gradient(to top, #00a2ff, #00ffea);
    border-radius: 4px;
    box-shadow: 0 0 15px rgb(0 255 234 / .6);
    transition: transform 0.1s linear;
    will-change: transform
}

#zoom-progress-glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleY(0);
    transform-origin: bottom;
    width: 10px;
    height: 100%;
    background: #fff0;
    box-shadow: 0 0 20px rgb(0 255 234 / .4);
    z-index: -1;
    transition: transform 0.1s linear;
    will-change: transform
}

.text-reveal {
    position: relative;
    display: flex;
    justify-content: center;
    color: #fff;
    font-size: 2.5em;
    letter-spacing: 2px;
    opacity: 0;
    transition: opacity .2s ease;

    span {
        opacity: 0;
        transform: scale(0);
        animation: fadeIn 2.2s forwards
    }

    &::before,
    &::after {
        position: absolute;
        content: "";
        top: 0;
        bottom: 0;
        width: 2px;
        height: 100%;
        background: #fff;
        opacity: 0;
        transform: scale(0)
    }

    &::before {
        left: 50%;
        animation: slideLeft 1.5s cubic-bezier(.7, -.6, .3, 1.5) forwards
    }

    &::after {
        right: 50%;
        animation: slideRight 1.5s cubic-bezier(.7, -.6, .3, 1.5) forwards
    }
}

::-webkit-scrollbar {
    width: 6px;
    background: #0b0b0b
}

::-webkit-scrollbar-thumb {
    background: #00ffea;
    border-radius: 3px
}

::-webkit-scrollbar-thumb:hover {
    background: #0cb
}

.text-reveal.revealed {
    opacity: 1
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: scale(1)
    }
}

@keyframes slideLeft {
    to {
        left: -6%;
        opacity: 1;
        transform: scale(.9)
    }
}

@keyframes slideRight {
    to {
        right: -6%;
        opacity: 1;
        transform: scale(.9)
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease 1.4s, transform 1.5s ease 1.4s, filter 1.5s ease 1.4s;
    filter: blur(4px)
}

.fade-in.revealed {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0)
}

.p-line {
    position: relative;

    &:before,
    &:after {
        content: "";
        position: absolute;
        top: 50%;
        transform: translateY(-50%) translateX(-25%);
        left: -180px;
        width: 150px;
        height: 2px;
        opacity: 0;
        border-radius: 50%;
        transition: opacity 1.5s ease 1.8s, transform 1.5s ease 1.8s;
        background: linear-gradient(to right, transparent, #f3f3f3)
    }

    &:after {
        left: inherit;
        right: -180px;
        transform: translateY(-50%) translateX(25%);
        background: linear-gradient(to left, transparent, #f3f3f3)
    }
}

.p-line.revealed {
    transition: opacity 1.5s ease .4s, transform 1.5s ease .4s, filter 1.5s ease .4s;

    &:before,
    &:after {
        opacity: 1;
        transform: translateY(-50%)
    }
}

#servicios h2,
#contacto h2 {
    font-size: 2rem;
    line-height: 2.2rem;
    margin-bottom: 1.5rem
}

#servicios p,
#contacto p {
    font-size: 1.1rem;
    line-height: 1.7rem;
    max-width: 500px;
    margin: 0 auto;
    white-space: pretty;
    margin-bottom: .9rem
}

.subsection-text {
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 500px;
    margin: 1rem auto
}

footer {
    padding: 2rem .9rem;
    text-align: center;
    background: #0f1520;
    color: #838da7;
    border-top: 2px solid #080911
}

footer .legal {
    display: flex;
    justify-content: center;
    gap: 1rem;

    a {
        color: #fff;
        text-decoration: none;
        transition: color .2s ease;
        font-size: .9rem;

        &:hover {
            color: #dfe3ee
        }
    }
}

.menu {
    position: relative;
    width: 27px;
    height: 27px;
    display: none;
    background: none;
    border: none;
    outline: none;
    padding: 0;
    pointer-events: auto;
    cursor: pointer
}

.menu span {
    position: relative;
    top: 1px
}

.menu span:before,
.menu span:after {
    position: absolute;
    content: ''
}

.menu span,
.menu span:before,
.menu span:after {
    width: 27px;
    height: 2px;
    background-color: #a5c1e9;
    display: block;
    transition: transform .25s ease
}

.menu span:before {
    transform: translateY(-7px)
}

.menu span:after {
    transform: translateY(7px)
}

.menu:hover span,
.menu:hover span:before,
.menu:hover span:after {
    background-color: #5c7c93
}

.menu.active span {
    background-color: #fff0
}

.menu.active span:before {
    transform: translateY(0) rotate(45deg)
}

.menu.active span:after {
    transform: translateY(0) rotate(-45deg)
}

@media (max-width:768px) {
    .p-line.revealed {

        &:after,
        &:before {
            transform: translateY(-50%);
            width: 49%;
            opacity: .15;
            top: -100%
        }

        &:after {
            right: 0
        }

        &:before {
            left: 0
        }
    }

    #ui {
        justify-content: center
    }

    #info {
        position: absolute;
        right: 39px;
        bottom: 45px;
        transform: rotate(90deg);
        transform-origin: right;
        padding: 7px 10px
    }

    nav a {
        padding: 5px;
        transform: rotate(-90deg);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1px
    }

    nav a .icon {
        display: block
    }

    nav a span {
        display: none
    }

    #lang-selector {
        position: absolute;
        right: 10px;
        bottom: -5px;
        margin: 0;

        .separator {
            transform: rotateZ(74deg);
            display: block;
            margin: 0
        }
    }

    #zoom-progress-container {
        display: none
    }

    #ui.sticky {
        #lang-selector {
            bottom: 15px;

            .separator {
                display: inline;
                transform: rotateZ(0deg)
            }
        }

        #info {
            right: unset;
            left: 20px;
            transform: rotate(0deg) translateY(100px);
            padding: 0;

            nav {
                transform: translate(-100%, 21px);
                opacity: 0;
                transition: transform .4s ease, opacity .4s ease;
                padding: 5px;
                width: calc(100vw - 6px);
                border-radius: 10px;
                background: #010e18eb;

                a {
                    transform: rotate(0deg)
                }

                span {
                    display: block
                }

                li {
                    text-align: center
                }

                ul {
                    justify-content: space-around
                }
            }

            .active+nav {
                transform: translate(-20px, 20px);
                opacity: 1
            }
        }

        .menu {
            display: block
        }
    }
}