@font-face {
    font-family: 'Audiowide';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(fonts/audiowide.ttf) format('truetype')
}

@font-face {
    font-family: 'Josefin Sans';
    font-style: italic;
    font-weight: 300;
    font-display: swap;
    src: url(fonts/josefinsans300i.ttf) format('truetype')
}

@font-face {
    font-family: 'Josefin Sans';
    font-style: italic;
    font-weight: 600;
    font-display: swap;
    src: url(fonts/josefinsans600i.ttf) format('truetype')
}

@font-face {
    font-family: 'Josefin Sans';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url(fonts/josefinsans300.ttf) format('truetype')
}

@font-face {
    font-family: 'Josefin Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(fonts/josefinsans600.ttf) format('truetype')
}

@font-face {
    font-family: 'Material Symbols Outlined';
    font-style: normal;
    font-weight: 100 700;
    src: url(fonts/materialiconsoutline.woff2) format('woff2')
}

html[lang="es"] [lang]:not([lang="es"]),
html[lang="en"] [lang]:not([lang="en"]),
html[lang="pt"] [lang]:not([lang="pt"]) {
    display: none !important;
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-size: 3.5rem;
    line-height: 0;
    vertical-align: middle;
    color: #040;
    line-height: 1;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 200, 'GRAD' 0, 'opsz' 24;
}

.logo svg {
    height: 100%;
    overflow: visible
}

.logo path {
    stroke-linejoin: round;
    fill: none;
    transform-origin: 52px 48px;
    stroke-linecap: round
}

.logo .sup,
.logo .inf,
.logo .ctr {
    stroke-width: 12
}

.logo .supm,
.logo .infm,
.logo .ctrm {
    stroke-width: 8.5
}

.logo .texto {
    fill: #fff
}

.logo .ctr,
.logo .ctrm {
    stroke: #fff
}

.logo .sup,
.logo .infm {
    stroke: #fff
}

.logo .supm,
.logo .inf {
    stroke: #fff
}

.logo .ctr {
    transform: scale(.75);
    stroke-width: 9px
}

.logo .ctrm {
    transform: scale(.6) rotate(120deg)
}

.logo .sup,
.logo .supm {
    transform: scale(0.5) translate(50px, -84px) rotate(180deg)
}

.logo .inf,
.logo .infm {
    transform: scale(.5) translate(-50px, 90px) rotate(180deg)
}

.logo path {
    transition: transform 0.7s
}

.logo.hoverLogo:hover path,
body.menu nav .logo path,
header.initial a.logo path {
    transform: none !important
}

header:not(.initial) a.logo path {
    animation: initialHeader 1s ease-out 1
}

@keyframes initialHeader {

    0%,
    25% {
        transform: none
    }
}

header a.logo {
    transition: transform 1s, opacity .4s;
    transition-timing-function: ease-out, ease-out
}

header.initial a.logo {
    transform: scale(10);
    opacity: 0
}

body.loadingFonts .material-symbols-outlined {
    font-size: 0 !important;
    opacity: 0 !important
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
    font-family: 'Josefin Sans', sans-serif
}

::-webkit-scrollbar {
    width: 0;
    height: 0
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Audiowide', sans-serif;
    font-weight: normal;
    text-align: center
}

.button {
    text-decoration: none;
    font-weight: bold;
    padding: .4em .8em;
    color: #040;
    background: #f8f8f8;
    border: solid 1px #4448;
    margin: auto 0;
    border-radius: .15em;
    transition: .1s;
    text-align: center
}

.button:hover {
    box-shadow: inset 1px 2px 3px #4448;
    border-color: transparent
}

.button.disabled {
    color: #ddd;
    background: hsl(0deg 0% 50%);
    cursor: pointer;
    box-shadow: inset 1px 2px 3px #4448;
    border-color: transparent
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased
}

*:focus {
    outline: none
}

html,
body {
    margin: 0;
    line-height: 1.5;
    position: relative
}

body {
    overflow-x: hidden
}

nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 10;
    display: flex;
    margin: 0;
    padding: 1em;
    gap: .5em;
    background: #444;
    border-bottom-left-radius: 2em;
    transition: .15s;
    color: #fff;
    font-size: 0.75rem;
    box-shadow: 1px 2px 3px #4448;
    flex-direction: column;
    align-items: center
}

nav .link.logo svg {
    width: 1em;
    height: 1em;
}

nav::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    transition: .1s
}

nav:hover::after {
    left: 100%
}

nav:hover .logo {
    width: 100%
}

nav .logo path {
    transition: .3s
}

nav .logo .texto {
    transition: .1s;
    display: none;
}

nav:not(:hover) .logo .texto {
    transform: scale(0)
}

nav:hover {
    font-size: 1rem
}

nav .icon {
    font-size: 2rem;
    line-height: 1;
    text-decoration: none;
    color: inherit
}

nav .link {
    display: flex;
    align-items: center;
    gap: 0.25em;
    position: relative;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    font-size: 0;
    justify-content: flex-start;
    width: 100%;
    cursor: pointer;
}

nav:hover .link,
nav.hover .link {
    transition: .1s;
    font-size: 1em
}

nav .link .icon {
    opacity: .5
}

nav .link:hover .icon {
    opacity: 1
}

body.header nav .link {
    opacity: 1
}

body.services nav .link.services .icon {
    opacity: 1
}

body.aboutus nav .link.aboutus .icon {
    opacity: 1
}

body.stack nav .link.stack .icon {
    opacity: 1
}

body.portfolio nav .link.portfolio .icon {
    opacity: 1
}

body.contact nav .link.contact .icon {
    opacity: 1
}

body nav .langSelector {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

html[lang="en"] nav .langSelector .lang.en,
html[lang="es"] nav .langSelector .lang.es,
html[lang="pt"] nav .langSelector .lang.pt {
    font-weight: bold;
}

nav .langSelector small {
    font-size: 0;
    transition: .1s;
}

nav .langSelector .lang:hover small {
    font-size: 1em;
}

body.header nav .logo {
    opacity: 0;
    width: 0;
    height: 0
}

body.header nav {
    color: #444
}

body.header nav,
body.contact nav {
    background: none;
    box-shadow: none;
}

body.header nav {
    padding-top: 0
}

header,
footer {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: calc(50vh - 10vmin);
    position: relative;
    z-index: 1;
    overflow: hidden;
    scroll-snap-align: start
}

footer {
    backdrop-filter: invert(0.9)
}

header a.logo,
footer .logo {
    filter: drop-shadow(0 0 13px #000);
    height: 20vmin
}

header p {
    margin: 0.5em 0 1em;
    font-size: 2.5vmin
}

header .button {
    margin: 0
}

body.header:not(.services) .scroller{
    display: block;
}
.scroller{
    display: none;
    position: absolute;
    bottom:0;
    left:50%;
    width: 2.5rem;
    transform: translateX(-50%);
    user-select: none;
    z-index: -1;
}

.scroller span{
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding-top: 100%;
    animation: scroller 5s infinite;
    filter: drop-shadow(0 0 3px #0008);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="-10 -10 120 120" style="fill:none;stroke:white;stroke-width:12;stroke-linecap:round;stroke-linejoin:round"><path d="m52-0.76 42 24-4e-3 49-42 24-42-24-0.023-49z"></path><path style="stroke-width:8.5;" d="m67 59-15-8.5m-15 8.5 15-8.5m0-17v17"></path></svg>');
}
.scroller span:nth-child(1){
    transform: translateX(-200%) rotate(179deg);
    animation-delay: -5s;
}
.scroller span:nth-child(2){
    transform: translateX(-100%) rotate(-179deg);
    animation-delay: -2s;
}
.scroller span:nth-child(3){
    transform: translateX(0) rotate(-179deg);
    animation-delay: -4s;
}
.scroller span:nth-child(4){
    transform: translateX(100%) rotate(179deg);
    animation-delay: -1s;
}
.scroller span:nth-child(5){
    transform: translateX(200%) rotate(179deg);
    animation-delay: -3s;
}
@keyframes scroller {
    0%,100%{
        opacity: 0;
    }
    20%,95%{
        opacity: 1;
    }
    90%,100%{
        transform: translate(0px, -30vh) scale(0.001) rotate(0deg);
    }
    
}
footer .wrap {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 2em;
    padding: 1em
}

footer .link {
    text-align: center;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: .4em .8em;
    transition: .5s ease-out
}

footer .icon {
    color: currentColor;
    font-weight: bold;
    font-size: 2.5em;
    margin-right: 0.15em
}

footer .link svg {
    display: inline-block;
    height: 3em;
    vertical-align: middle
}

footer .link:hover {
    filter: drop-shadow(0 0 .5em #fff)
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background-image: url(./bg.jpg);
    background-position: center;
    z-index: -1;
    background-size: cover
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(to top, #fff8, transparent 5vmin);
    z-index: -1
}

main {
    background-color: #fff8
}

section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    scroll-snap-align: start;
    width: 80%;
    margin: auto;
    padding: 1em 0;
    max-width: 1200px;
}

.collapsable {
    text-align: left;
    transition: .5s ease-in;
    overflow: hidden;
    max-height: 100vh;
    border: solid 1px #bbb;
    padding: 0 1em;
    margin: .5em 0;
    border-radius: .25em;
    box-sizing: border-box;
    --lineheight: 2.63em;
    background-color: #fff9
}

.closing .collapsable.open {
    transition-delay: .25s
}

.collapsable>summary {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: var(--lineheight);
    cursor: pointer;
    font-weight: bold
}

#services {
    width: 100%;
    overflow: hidden
}

#services>div>.wrap:last-of-type>.collapsable {
    --lineheight: 2em
}

#services>div>.wrap:last-of-type>.collapsable>summary {
    flex-direction: row-reverse
}

.collapsable>summary::after {
    content: "+";
    background: #bbb;
    color: white;
    font-weight: bold;
    border-radius: 1em;
    line-height: 1;
    width: 1em;
    height: 1em;
    text-align: center;
    font-size: 1.2em
}

.collapsable.open>summary::after {
    content: "–"
}

.collapsable:not(.open) {
    max-height: var(--lineheight);
    transition: .25s
}

section>h1:first-child {
    font-size: 2em;
    grid-column: 1/-1;
    grid-row: 2;
    margin: 0 auto
}

#services>div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em 3em;
    max-width: 65em;
    align-items: start;
    margin: auto;
    position: relative;
    width: 90%
}

#services>div::before {
    content: '';
    position: absolute;
    top: -1.5em;
    left: 50%;
    width: 2em;
    bottom: 50%;
    border-left: solid 1px #444;
    border-top-left-radius: 2em;
    z-index: -1
}

#services>div::after {
    content: '';
    position: absolute;
    bottom: -1.5em;
    right: calc(50% - 1px);
    width: 2em;
    top: 50%;
    border-right: solid 1px #444;
    border-bottom-right-radius: 2em;
    z-index: -1
}

#services>div> :first-of-type {
    grid-column: 1;
    text-align: right;
    margin: 0;
    --xoffset: -1
}

#services>div> :last-of-type {
    grid-column: 2;
    text-align: left;
    margin: 0;
    --xoffset: 1
}

#services h2 {
    grid-row: 1;
    --delay: -.6s
}

#services .text {
    grid-row: 2;
    --delay: -.4s;
    margin: 0
}

#services div .experiencia {
    grid-row: 3;
    text-align: center;
    font-weight: bold;
    --delay: -.2s
}

#services .wrap {
    grid-row: 4;
    --delay: 0s
}

#services:not(.initial)>div> :not(h1) {
    animation: initialServicios 1s ease-out var(--delay) 1
}

#services.initial>div> :not(h1) {
    transform: translateX(calc(var(--xoffset) * 100vw)) scale(2);
    filter: blur(1em)
}

#services .button {
    margin: auto;
    width: fit-content;
    display: block
}

@keyframes initialServicios {

    0%,
    50% {
        transform: translateX(calc(var(--xoffset) * 100vw)) scale(2);
        filter: blur(1em);
    }

    100% {
        transform: none;
        filter: none;
    }
}

#aboutus>h1 {
    margin-bottom: 1em
}

#aboutus .wrap,
#aboutus .wrap>div {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-evenly
}

#aboutus .wrap>div {
    flex-grow: 1
}

#aboutus article {
    display: flex;
    flex-direction: column;
    align-items: center
}

#aboutus .wrap h3 {
    grid-row: calc(var(--pos) + 1);
    width: 20em
}

#aboutus .wrap iframe {
    grid-row: calc(var(--pos) + 2);
    box-shadow: inset 1px 2px 3px #4448;
    border: none;
    border-radius: 0.15em;
    width: calc(var(--height) * 16 / 9);
    height: var(--height);
    --height: 11.25em;
    background-color: #eee
}

#aboutus .wrap p {
    grid-row: calc(var(--pos) + 3);
    max-width: 20em
}

#portfolio {
    gap: 2em
}

#portfolio>div {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%
}

#portfolio .arrow {
    cursor: pointer;
    font-size: 5em;
    line-height: 3;
    user-select: none
}

#portfolio .wrap {
    --drag: 0px;
    display: flex;
    width: 100%;
    overflow: hidden;
    /* scroll-behavior: smooth;
    scroll-snap-type: x mandatory; */
    position: relative;
}

#portfolio article {
    display: grid;
    grid-template-areas: 's title title t' 's anim anim t' 's desc button t';
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    flex-shrink: 0;
    align-items: center;
    scroll-snap-align: center;
    /* margin-left: -100%; */
    opacity: 0;
    transition: left .5s ease-out;
    row-gap: 1em;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
}

#portfolio .wrap.drag article {
    transition-duration: .05s;
}

#portfolio article.active {
    left: var(--drag);
    opacity: 1;
    z-index: 1;
    height: 100%;
}

#portfolio article.next,
#portfolio article.prev {
    left: 150%;
    opacity: 1;
    z-index: 1;
    height: 100%;
    transition: left .5s ease-out, opacity 0s 1s;
}

#portfolio article.prev {
    left: -150%;
}

#portfolio .wrap:not([style]) article {
    height: unset !important;
}

/* #portfolio article.active~article {
    margin: 0
} */

#portfolio article h3 {
    grid-area: title;
    margin: auto
}

#portfolio article h3 img.clientlogo {
    height: 3em;
    vertical-align: middle;
    margin-right: 1em;
}

#portfolio article h3 img.clientlogo.big {
    height: 4em;
}

#portfolio article h3 img.clientlogo.shadow {
    filter: drop-shadow(0 0 0.1em black);
}

#portfolio article p {
    grid-area: desc;
    margin-left: auto
}

#portfolio article .button {
    grid-area: button;
    margin: auto
}

#portfolio .clientAnimation {
    width: 50vmin;
    margin: auto;
    grid-area: anim;
    box-shadow: inset 1px 2px 3px #4448;
    border-radius: 0.15em;
    background-color: #eee
}

#portfolio .clientAnimation>div {
    width: 100%;
    padding-top: 61%;
    position: relative
}

#portfolio .clientAnimation img {
    position: absolute;
    top: 9%;
    height: 82%;
    left: 6%;
    width: 88%;
    object-fit: cover;
    object-position: 0 0;
    transform-origin: center;
    animation: clientAnimation 10s infinite ease;
    /*cubic-bezier(0.18, 0.89, 0.32, 1.28);*/
    box-shadow: 2px 4px 6px #444a;
    border-radius: 0.15em;
    background-color: #fff
}

#stack .wrap {
    gap: 2em;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: flex-start;
}

#stack .stack {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    gap: .25em;
    width: 7em;
}

#stack .stack img {
    width: 5em;
    height: 5em;
    object-fit: contain;
}

@keyframes clientAnimation {

    0%,
    10%,
    86%,
    100% {
        left: 6%;
        width: 88%;
        object-position: 0% 0
    }

    20%,
    43% {
        left: 31%;
        width: 37%;
        object-position: 79% 0
    }

    53%,
    76% {
        left: 38.5%;
        width: 23%;
        object-position: 100% 0
    }

    15% {
        transform: rotate(5deg);
        filter: blur(3px)
    }

    48% {
        transform: rotate(1deg);
        filter: blur(3px)
    }

    81% {
        transform: rotate(-5deg);
        filter: blur(3px)
    }

    10%,
    20%,
    43%,
    53%,
    76%,
    86% {
        transform: rotate(0deg);
        filter: none;
    }
}

@media (min-aspect-ratio: 1/1) {
    #portfolio .clientAnimation.double {
        width: 90vmin;
        max-width: 100%;
        display: flex;
        flex-direction: row;
    }

    #portfolio .clientAnimation.double>div {
        padding-top: 30.5%;
    }

    #portfolio .clientAnimation.double div:first-child img {
        left: unset !important;
        right: 4%;
    }

    #portfolio .clientAnimation.double div+div img {
        left: 4% !important;
    }
}

@media (max-aspect-ratio: 1/1) {
    body::before {
        top: calc(50vh - 50vw);
        left: calc(50vw - 50vh);
        height: 100vw;
        width: 100vh;
        transform: rotate(90deg);
    }

    header {
        padding-top: calc(50vh - 15vmin);
    }

    header a.logo {
        height: 30vmin;
    }

    #portfolio>div {
        margin-right: -1rem;
    }

    #portfolio .arrow {
        font-size: 2.5rem;
        line-height: 1;
        margin: 0 -0.5em auto;
    }

    #portfolio .clientAnimation {
        width: 100%
    }
}

@media (max-width: 1200px) {
    #aboutus .wrap {
        grid-template-columns: repeat(2, 1fr);
    }

    #aboutus .wrap :nth-of-type(n+3) {
        --pos: 3
    }

    #aboutus .wrap iframe {
        --height: 15vmin;
    }
}

@media (max-width: 900px) {
    html {
        scroll-snap-type: none;
    }

    section {
        padding-bottom: 10rem;
    }

    #services>div {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #services>div::before,
    #services>div::after {
        display: none;
    }

    #services>div> :nth-child(n) {
        text-align: center;
    }

    #services>div>.wrap:nth-child(n)>.collapsable {
        --lineheight: 2.5em;
    }

    #services>div>.wrap:nth-child(n)>.collapsable>summary {
        flex-direction: row;
    }

    #aboutus .wrap iframe {
        --height: 25vmin;
    }

    #stack .wrap {
        max-height: 50vh;
        overflow: scroll;
    }
}

@media (max-width: 700px) {
    section {
        width: 90%;
        padding-right: 1rem;
    }

    section>h1:first-child {
        font-size: 1.5em;
    }

    #portfolio article {
        display: flex;
        flex-direction: column;
    }

    #portfolio article p {
        margin: 0;
    }

    footer .wrap {
        display: flex;
        flex-direction: column;
        gap: .25em;
    }
}

@media (max-width: 500px) {
    header p {
        font-size: 1em;
    }

    nav {
        font-size: .5rem;
    }

    nav:not(:hover) .icon {
        font-size: 1rem;
    }


    #services .wrap:nth-child(n) {
        margin-bottom: 1em;
    }

    #aboutus .wrap {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #aboutus .wrap iframe {
        --height: 40vmin;
    }
}