/* ============================================================
                        Index
==============================================================

                    # Variables

                # Initial setup & page layout

                    # Reset

                    # Components
                        -> Scroll-up button
                        -> Button
                        -> Block
                        -> Social button

                    # Helpers / Utility

                    # Header {MOBILE} [header.css]
                        -> # Header {DESKTOP} [header-desktop.css]
                        -> Navigation
                            -> Sub-menu

                    # Main {MOBILE} [main.css]
                        -> # Main {DESKTOP} [main-desktop.css]

                    # Sidebar [sidebar.css]

                    # Footer {MOBILE} [footer.css]
                        -> Footer {DESKTOP} [footer-desktop.css]
                        -> Copyright footer
                        
============================================================ */




/* ========================================
                CSS variables
                [START]
========================================= */

:root {

    /* Global properties */
    --page-width: 90%;
    --font-family: redhat, arial, sans-serif;
    --line-height: 1.6;
    --title-font-size: 1.75rem;
    --block-zoom-transition-curves: cubic-bezier(0.06, 0.62, 0.22, 0.88);
    --soft-border: 1px solid rgb(0, 0, 0, 8%);
    --scroll-bar-width: var(--space-sm);
    --header-height: 104px;
    --header-mobile-height: 534px;
    --min-screen-width: 320px;
    --top-z-index: 999999999;
    --under-top-z-index: 999999998;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-xxl: 24px;
    --space-xxxl: 32px;
    --space-4xl: 40px;
    --space-5xl: 48px;
    --space-6xl: 56px;
    --space-7xl: 64px;

    /* Sizing */
    --size-xs: 4px;
    --size-sm: 8px;
    --size-md: 12px;
    --size-lg: 16px;
    --size-xl: 20px;
    --size-xxl: 24px;
    --size-xxxl: 32px;
    --size-4xl: 40px;
    --size-5xl: 48px;
    --size-6xl: 56px;
    --size-7xl: 64px;

    /* Border radius */
    --border-radius-xs: 4px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --border-radius-xl: 32px;
    --border-radius-full: 50%;

    /* Colors */
        /* Primary */
        --color-primary: #72001d;
        --color-primary-darker: #b0102d;
        --color-on-primary: #ffffff;
        --color-on-primary-darker: #ffffff;

        /* Secondary */
        --color-secondary: #944d00;
        --color-on-secondary: #ffffff;

        /* Background */
        --color-background: #fbfbf9;
        --color-on-background: #1f1313;
        
        /* Surface */
        --color-surface: #F5F4F0;
        --color-on-surface: #1C1308;

        /* Error */
        --color-error: #810000;
        --color-on-error: #c20000;

        /* Success */
        --color-success: #fff;
        --color-on-success: #fff;

    /* Footer */
    --footer-bg-color: var(--color-surface);
    --footer-text-color: var(--color-on-surface);
    --footer-font-size: 1rem;
    --footer-copyright-bg-color: var(--footer-bg-color);

    /* Button */
    --button-bg-color: var(--color-primary);
    --button-hover-bg-color: var(--color-primary-darker); 
    --button-text-color: var(--color-on-primary);
    --button-font-size: 1rem;
    --button-border-radius: var(--border-radius-xs);

    /* Card */
    --card-bg-color: #f3f3f3;
    --card-hover-bg-color: #fff;
    --card-text-color: #000;
    --card-border-radius: var(--border-radius-lg);

    /* Social button */
    --social-button-bg-color: #f3f3f3;
    --social-button-hover-bg-color: #343945;
    --social-button-icon-color: #343945;
    --social-button-hover-icon-color: #f3f3f3;
    --social-button-border: var(--soft-border);
    --social-button-border-radius: var(--border-radius-full);

    /* Scroll-up button */
    --scroll-up-button-bg-color: var(--button-bg-color);
    --scroll-up-button-hover-bg-color: var(--button-hover-bg-color);
    --scroll-up-button-text-color: var(--button-text-color);

    /* Notice */
    --notice-bg-color: #d30000;
}

@media (min-width: 1200px) {

    :root {
        --page-width: 68%;
        --title-font-size: 2.125rem;
    }

}

/* ========================================
                CSS variables
                [END]
========================================= */




/* ========================================
            Initial setup & page layout
                [START]
========================================= */

@font-face {
    font-family: redhat;
    font-style: normal;
    src: url('../../fonts/RedHat/static/RedHatDisplay-Regular.ttf');
    font-display: swap; /* Improve font loading */
}

*,
*::after,
*::before { 
    box-sizing: border-box;     
}

* {
    margin: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

html:has(.page__header--sticky) {
    scroll-padding-top: var(--header-mobile-height);
}

@media (min-width: 1200px) {

    html:has(.page__header--sticky) {
        scroll-padding-top: var(--header-height);
    }

}

body {
    min-height: 100vh;
    /* font-size: clamp(1rem, 2.5vw, 2rem); */
    font-family: var(--font-family);
    font-weight: 300;
    line-height: var(--line-height);
    color: var(--color-on-background);
    -webkit-font-smoothing: antialiased;
    accent-color: var(--color-primary);
    scrollbar-color: var(--color-primary);
    background-color: var(--color-background);
}

body.page--disabled-scroll {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.page__header {
    width: 100%;
    height: auto;
    background-color: var(--header-bg-color);
}

.page__header--sticky {
    position: fixed; 
    z-index: 9999999;
}

.page__main {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: calc(100vh - var(--header-mobile-height));
}

body:has(.page__header--sticky) .page__main {
    padding-top: var(--header-mobile-height);
}

@media (min-width: 1200px) {

    .page__main {
        min-height: calc(100vh - var(--header-height));
    }

    body:has(.page__header--sticky) .page__main {
        padding-top: var(--header-height);
    }

}

.page__main .global-container.has-sidebar {
    display: flex;
    flex-direction: column;
    row-gap: 24px;
}

.page__main .global-container.has-sidebar .page__content {
    flex-grow: 1;
}

@media (min-width: 1200px) {

    .page__main .global-container.has-sidebar {
        flex-direction: row;
        column-gap: 72px;
    }

}

.page__footer {
    width: 100%;
    height: auto;
    margin-top: var(--space-7xl);
    border-top: var(--soft-border);
    background-color: var(--footer-bg-color);
}

:focus-visible {
    outline-color: var(--color-primary); 
}

::selection {
    background-color: var(--color-primary); 
}

::marker {
    color: var(--color-primary); 
}

:is(::-webkit-calendar-picker-indicator,
    ::-webkit-clear-button,
    ::-webkit-inner-spin-button, 
    ::-webkit-outer-spin-button) {
    color: var(--color-primary);
}

::-webkit-scrollbar {
    width: var(--scroll-bar-width);
}

::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-primary-darker);
}

/* ========================================
            Initial setup & page layout
                [END]
========================================= */




/* ========================================
                Reset
                [START]
========================================= */

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

a {
    color: inherit;
}

li {
    list-style: none;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input,
textarea,
select,
button {
    font: inherit;
}

/* ========================================
                Reset
                [END]
========================================= */




/* ========================================
                Components
                [START]
========================================= */

input:not(input[type="submit"]),
textarea {
    /* Sets input font size to a min of 16px */
    /* https://css-tricks.com/16px-or-larger-text-prevents-ios-form-zoom/ */
    font-size: 16px !important;

    padding: var(--space-xs);
    border: var(--soft-border);
    border-radius: var(--border-radius-xs);
}

input:not(input[type="submit"]):hover,
textarea:hover {
    filter: brightness(98%);
}

textarea {
    min-width: 100%;
    max-width: 100%;
    min-height: calc( (1rem * var(--line-height)) + 2rem + (var(--space-xs) * 2) );
    max-height: 300px;
}

/* Button */
.button, 
input[type="submit"] {
    display: block;
    width: fit-content;
    padding-top: var(--space-sm);
    padding-left: var(--space-xxl);
    padding-right: var(--space-xxl);
    padding-bottom: var(--space-sm);
    font-size: var(--button-font-size);
    border: none;
    border-radius: var(--button-border-radius);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    appearance: none;
    color: var(--button-text-color);
    background-color: var(--button-bg-color);
}

.button:hover, 
input[type="submit"]:hover {
    background-color: var(--button-hover-bg-color);
}

.button--scroll-up {
    display: none; /* Hides button by default */

    /* Creates circel with slight shadow */
    width: 64px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 8px 0 0 8px;
    background-color: var(--scroll-up-button-bg-color);
    box-shadow: 5px 5px 20px rgb(0, 0, 0, 40%);

    /* Positions the button in the bottom left corner of the page */
    position: fixed;
    bottom: 48px;
    right: 0;
    z-index: 99999;

    font-size: var(--button-font-size);
    text-align: center;
    color: var(--scroll-up-button-text-color);
    cursor: pointer;
}

.button--scroll-up:hover {
    background-color: var(--scroll-up-button-hover-bg-color);
}

/* Card */
.card {
    width: 100%;
    border-radius: var(--card-border-radius);
    color: var(--card-text-color);
    background-color: var(--card-bg-color);
}

.card:hover {
    background-color: var(--card-hover-bg-color);
}

@media (min-width: 1200px) {

    .card {
        width: calc((100% / 4) - (var(--gap-size) / 4));
    }

}

.dialog[open] {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: var(--top-z-index);
    transform: translate(-50%, -50%);
    min-width: 500px;
    min-height: 400px;
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
    padding-left: var(--space-4xl);
    padding-right: var(--space-4xl);
    border: 1px solid rgb(0, 0, 0, 20%);
    border-radius: var(--border-radius-lg);
    background-color: #fff;
}

.dialog__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
}

.dialog__close-button {
    position: fixed;
    top: 0;
    right: 0;
    display: block;
    width: 24px;
    height: 24px;
    margin: 8px;
    appearance: none;
    border: none;
    cursor: pointer;
    background-color: transparent;
    background-image: url('../../img/icons/material_symbols/icon-close.svg');
    background-repeat: no-repeat;
    transition: filter .5s, transform .5s;
}

.dialog__close-button:hover {
    transform: scale(1.075);
    filter: brightness(.7);
}

.dialog__body {
    display: flex;
    flex-direction: column;
    row-gap: var(--space-md);
}

.dialog__img {
    max-width: 420px;
}

.dialog::backdrop {
    background-color: rgb(0, 0, 0, 60%);
}

body:has(dialog[open]) {
    overflow: hidden;
    padding-right: var(--scroll-bar-width);
    filter: blur(4px);
}

/* Social button */
.social-button {
    display: flex;
    width: 50px;
    height: 50px;
    /* border: var(--social-button-border); */
    border: none;
    border-radius: var(--social-button-border-radius);
    text-decoration: none;
    /* background-color: var(--social-button-bg-color); */
}

.social-button:hover {
    background-color: var(--social-button-hover-bg-color); 
}

.social-button i {
    color: var(--social-button-icon-color);
    font-size: 1.875rem;
    line-height: 0;
}

.social-button:hover i {
    color: var(--social-button-hover-icon-color);
}

.social-button:hover svg path {
    fill: var(--social-button-hover-icon-color);
}

.social-button--instagram:hover svg path, 
.social-button--instagram:hover svg rect {
    fill: var(--social-button-icon-color);
    stroke: var(--social-button-hover-icon-color);
}

/* Hero */
.hero {
    position: relative;
    width: 100%;
    height: 300px;
    margin-bottom: var(--space-5xl);
}

.hero__body {
    position: absolute;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.hero__title {
    width: var(--page-width);
    margin-left: auto;
    margin-right: auto;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 4px rgb(0, 0, 0, 60%);
    text-transform: uppercase;
}

.l-hero__img {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero__img {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: cover;
    filter: brightness(50%) blur(2px);
    /* mask-composite: intersect;
    mask-image: linear-gradient(180deg, #000 60%, transparent); */
}

/* Notice */
.main__notice {
    display: flex;
    height: 90px;
    align-items: center;
    justify-content: center;
    background-color: var(--notice-bg-color);
}

.notice__icon-close {
    position: absolute;
    width: 25px;
    height: 25px;
    top: 25px;
    right: 150px;
    font-size: 1.875rem;
    color: #fff;
    cursor: pointer;
}

.notice__text {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    color: white;
}

/* 404 */
.fourzerofour__title,
.fourzerofour__subtitle,
.fourzerofour__button {
    text-align: center;
}

.fourzerofour__title {
    font-size: 10rem;
}

.fourzerofour__subtitle {
    font-size: 2.25rem;
}

.fourzerofour__button {
    font-size: 2rem;
    font-weight: 600;
}

/* ========================================
                Components
                [END]
========================================= */




/* ========================================
            Helpers / utility
                [START]
========================================= */

.global-container {
    width: var(--page-width);
    height: 100%;
    margin-left: auto;
    margin-right: auto;
}

.message-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: var(--space-sm);
    padding-bottom: var(--space-sm);
    padding-left: var(--space-4xl);
    padding-right: var(--space-4xl);
    border-radius: var(--border-radius-sm);
}

.message-container--success {
    background-color: var(--color-success);
}

.message-container--error {
    background-color: var(--color-error);
}

.message__text {
    font-size: 1rem;
    font-style: italic;
    font-weight: normal;
}

.message__text--success {
    color: var(--color-on-sucess);
}

.message__text--error {
    color: var(--color-on-error);
}

.form {
    position: relative;
    display: flex;
    flex-direction: column;
    row-gap: var(--space-md);
}

.form__loading {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: none;
    justify-content: center;
    align-items: center;
    background-color: rgb(0, 0, 0, 30%);
}

.form__required-star {
    margin-left: var(--space-xs);
    font-weight: 300;
    color: var(--color-on-error);
}

.form__notice {
    font-size: .875rem;
    font-style: italic;
}

.form__input--error {
    outline: 2px solid var(--color-on-error);
}

.responsive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-sm);
}

.horizontal-scroll-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    column-gap: var(--space-sm);
    scroll-snap-type: x mandatory;
    overflow-x: scroll;
}

.u-full-width {
    /* Creates full-width banner inside limited width parent */
    /* https://css-tricks.com/full-width-containers-limited-width-parents/#aa-no-calc-needed */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.lazysizes-image {
    position: relative;
    padding-bottom: 66.5492958%;
    background: linear-gradient(rgb(242, 242, 242) 66%, rgba(242, 242, 242, 0));
}

.lazysizes-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.loading:before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    margin-top: -16px;
    margin-left: -16px;
    width: 64px;
    height: 64px;
    border-radius: 64px;
    animation: scale-out 1.2s infinite ease-in-out;
    mix-blend-mode: soft-light;
    background-color: rgba(0, 0, 0, .9);
}

.underline::after {
    content: '';
    display: block;
    width: 30%;
    height: 4px;
    background-color: var(--color-primary);
}

.spacer {
    width: 100%;
    height: 80px;
    background-color: transparent;
}

.u-excerpt-text {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.phone-number {
    direction: ltr;
}

.u-uppercase {
    text-transform: uppercase;
}

.scroll-animation-wrapper {
    overflow: clip; /* overflow: hidden; causes view() animations to break (https://www.bram.us/2024/02/14/scroll-driven-animations-you-want-overflow-clip-not-overflow-hidden/) */
}

.title--small {
    font-size: 1.5rem;
    font-weight: 300;
}

.title--big {
    font-size: 2rem;
    font-weight: 700;
}

.fade-out-element {
    --fade-direction: 180deg;
    --fade-position: 60%;
    mask-composite: intersect;
    mask-image: linear-gradient(var(--fade-direction), #000 var(--fade-position), transparent);
}

.u-show {
    display: block;
}

.u-hidden {
    display: none;
}

.u-clickable {
    cursor: pointer;
}

.zoom-in {
    transition: scale .4s var(--block-zoom-transition-curves);
}

.zoom-in:hover {
    scale: 1.05;
    transition: scale .4s var(--block-zoom-transition-curves);
}

.slide-right {
    transition: transform .4s var(--block-zoom-transition-curves);
}

.slide-right:hover {
    transform: translateX(5px);
    transition: transform .4s var(--block-zoom-transition-curves);
}

.emphasis-text {
    color: var(--color-primary);
}

/* ========================================
            Helpers / utility
                [END]
========================================= */


/* ========================================
                Animations
                [START]
========================================= */

@keyframes scale-out {
    0% {
        transform: scale(0); 
    }
    100% {
        transform: scale(1);
        opacity: 0; 
    } 
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 100%;
    }
}

@keyframes fade-in-right {
    from {
        opacity: 0;
        transform: translateX(200px);
    }
    to {
        opacity: 100%;
        transform: translateX(0);
    }
}

@keyframes fade-in-left {
    from {
        opacity: 0;
        transform: translateX(200px);
    }
    to {
        opacity: 100%;
        transform: translateX(0);
    }
}

@keyframes fade-in-bottom {
    from {
        opacity: 0;
        transform: translateY(200px);
    }
    to {
        opacity: 100%;
        transform: translateY(0);
    }
}

@keyframes fade-in-top {
    from {
        opacity: 0;
        transform: translateY(200px);
    }
    to {
        opacity: 100%;
        transform: translateY(0);
    }
}

@keyframes blink {
    from {
        opacity: 0;
    }
    to {
        opacity: 100%;
    }
}

@keyframes frontpage-hero-cta {
    from {
        opacity: 0;
        transform: scale(.9);
    }
    to {
        opacity: 100%;
        transform: scale(1);
    }
}


/* ========================================
                Animations
                [END]
========================================= */