:root {
    --red: #e10004;
    --grey: #d9d9d9;
    --black: #000000;
    --grey-2: #ababab;
}

/* ================================== */
/*               FONTS                */
/* ================================== */

@font-face {
    font-family: "ABC Walter Rauchwaren";
    src:
        url("ABCWalterAlte-Rauchwaren.woff2") format("woff2"),
        url("ABCWalterAlte-Rauchwaren.woff") format("woff");
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

body,
.type-ABCWalter,
.popup__form input,
.popup__form button {
    font-family: "ABC Walter Rauchwaren", Arial, Helvetica, sans-serif;
}

/* ================================== */
/*           DEFAULT STYLES           */
/* ================================== */

* {
    box-sizing: border-box;
    -webkit-touch-callout: none;
    /* prevent callout to copy image, etc when tap to hold */
    -webkit-text-size-adjust: none;
    /* prevent webkit from resizing text to fit */
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    /* prevent tap highlight color / shadow */
}

body {
    overflow-x: hidden;
    background-color: #000;
    color: var(--red);
}

html {
    scrollbar-width: none;
    /* Firefox */
}

body,
html {
    margin: 0;
    padding: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
    scroll-behavior: smooth;
    /* Desactivar si vols fer un .animate() al body per fer scroll. */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body::-webkit-scrollbar {
    display: none;
}

::selection {
    background-color: var(--red);
    color: #000;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    padding: 0;
    font-weight: normal;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

b,
strong {
    font-weight: normal;
}

:focus {
    outline: 0;
}

input[type="text"],
input[type="password"],
textarea,
input[type="email"],
input[type="submit"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

input:focus,
textarea:focus,
select:focus {
    outline-offset: 0;
}

video,
img {
    display: block;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* ================================== */
/*                SIZES               */
/* ================================== */

body,
.t16-16,
.t16-16 *,
.popup__form input,
.popup__form button {
    font-size: 16px;
    line-height: 0.95em;
    letter-spacing: -0.05em;

    @media (min-width: 1920px) {
        font-size: calc(16px + (18 - 16) * ((100vw - 1920px) / (2560 - 1920)));
    }
}

/* ============================== */
/*             LAYOUT             */
/* ============================== */

.mobile {
    display: none;

    @media (max-width: 991px) {
        display: block;
    }
}

.desktop {
    display: block;

    @media (max-width: 991px) {
        display: none;
    }
}

/* ============================== */
/*             HEADER             */
/* ============================== */

header {}

header .logo {
    display: block;
    height: auto;

    position: fixed;
    top: 23px;
    left: 50%;
    width: 87px;
    z-index: 100;
    transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
    -moz-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    -o-transform: translateX(-50%);

    @media (min-width: 1920px) {
        top: calc(100vw * 23 / 1920);
        width: calc(100vw * 87 / 1920);
    }

    @media (max-width: 768px) {
        left: 18px;
        transform: none;
    }
}

header .logo svg {
    display: block;
    width: 100%;
    height: auto;
}

header .contact__btn {
    position: fixed;
    top: 23px;
    right: 20px;
    cursor: pointer;
    transition: 0.3s ease;
    background-color: var(--grey);
    padding: 3px 10px 4px;
    border-radius: 9px;
    z-index: 100;
    color: var(--black);
    display: block;
    transition: 0.3s ease;

    @media (max-width: 768px) {
        padding: 9px 26px 10px;
        border-radius: 5px;
        right: 18px;
    }
}

header .contact__btn:hover {
    opacity: 0.8;
}

header .contact__btn.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ============================== */
/*             LANDING            */
/* ============================== */

.section-landing {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: space-between;
    justify-content: space-between;
    padding: 23px 16px;

    @media (min-width: 1920px) {
        padding: calc(100vw * 23 / 1920) calc(100vw * 16 / 1920);
    }

    @media (max-width: 991px) {
        height: 100dvh;
        align-items: flex-end;
        align-content: flex-end;
        padding: 18px;
    }
}

.section-landing .landing__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.section-landing .landing__bg .media__item {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section-landing .slogan,
.section-landing .texts,
.section-landing .logo-footer {
    position: relative;
    z-index: 2;
}

.section-landing .slogan,
.section-landing .texts {
    width: max-content;
}

.section-landing .slogan {
    @media (max-width: 991px) {
        position: absolute;
        bottom: 18px;
        right: 18px;
        width: calc(50% - 18px);
        text-align: right;
    }
}

.logo-spacer {
    opacity: 0;
}

.section-landing .texts {
    display: flex;
    gap: 50px;

    @media (min-width: 1920px) {
        gap: calc(100vw * 50 / 1920);
    }

    @media (max-width: 991px) {
        flex-direction: column;
        gap: 18px;
    }
}

.section-landing .text-block {
    width: 255px;

    @media (min-width: 1920px) {
        width: calc(100vw * 255 / 1920);
    }

    @media (max-width: 991px) {
        width: 100%;
        max-width: 560px;
    }
}

.section-landing .logo-footer {
    padding-top: 70px;

    @media (max-width: 991px) {
        padding-top: 20px;
    }
}

.section-landing .logo-footer,
.section-landing .logo-footer .desktop,
.section-landing .logo-footer .mobile {
    width: 100%;
}

.section-landing .logo-footer svg {
    display: block;
    width: 100%;
    height: auto;
}

/* ============================== */
/*             POPUP              */
/* ============================== */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px 26px;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;

    @media (max-width: 768px) {
        padding: 0;
        background-color: unset;
    }
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.popup {
    transform: translateY(12px);
    transition: transform 0.3s ease;
    background-color: #d9d9d980;
    padding: 25px;
    border-radius: 8px;
    height: fit-content;
    backdrop-filter: blur(14px);

    @media (max-width: 768px) {
        transform: translateY(0);
        border-radius: 0;
        width: 100vw;
        height: 100dvh;
        padding: 9px 8px;
    }
}

.popup-overlay.active .popup {
    transform: translateY(0);
}

.popup__close {
    cursor: pointer;
    width: fit-content;
    margin-bottom: 45px;
    margin-left: auto;
}

.popup__form {
    @media (max-width: 768px) {
        padding-inline: 28px;
    }
}

.popup__form .double-input {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;

    @media (max-width: 768px) {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.popup__form input {
    background-color: var(--grey);
    border: none;
    border-radius: 5px;
    padding: 16px 9px 14px;
    width: 100%;
    margin-bottom: 20px;
    color: var(--black);
    letter-spacing: 0;

    @media (max-width: 768px) {
        margin-bottom: 14px;
    }
}

.popup__form input::placeholder {
    color: var(--grey-2);
    opacity: 1;
}

.popup__form button {
    padding: 10px 10px 12px;
    width: 100%;
    background-color: var(--red);
    color: var(--grey);
    border-radius: 5px;
    border: none;
    text-align: center;
    cursor: pointer;
    transition: 0.3s ease;
    letter-spacing: 0;
    margin-top: 37px;

    @media (max-width: 768px) {
        margin-top: 30px;
    }
}

.popup__form button:hover {
    opacity: 0.8;
}

.popup__form button:disabled {
    cursor: default;
    opacity: 0.6;
}

.popup__form-message {
    display: none;
    margin-top: 18px;
    color: var(--grey);
    letter-spacing: 0;
    line-height: 1.2;
    text-align: center;
}

.popup__form-message.active {
    display: block;
}

.popup__form-message--success {
    color: var(--grey);
}

.popup__form-message--error {
    color: var(--red);
}
