/* ========================================
                CSS variables
                [START]
========================================= */

:root {

    /* Global properties */
    --page-width: 92.5%;
    --page-width-padding: calc( (100% - var(--page-width)) / 2 );
    --font-family: poppins, arial, sans-serif;
    --line-height: 1.6;
    --block-zoom-transition-curves: cubic-bezier(0.06, 0.62, 0.22, 0.88);
    --soft-border: 1px solid rgb(0, 0, 0, 8%);
    --soft-shadow: 0 0 8px 0 rgb(0, 0, 0, 6%);
    --soft-text-shadow: 1px 1px 4px rgb(0, 0, 0, 40%);
    --scroll-bar-width: var(--space-sm);
    --header-height: 65.59px;
    --header-margin-top: 1rem;
    --min-screen-width: 320px;
    --top-z-index: 999999999;
    --under-top-z-index: 999999998;
    --border-radius: 1.25rem;

    /* 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-lighter: #599597;
        --color-primary: #016066;
        --color-primary-darker: #025a60;
        --color-on-primary-lighter: #e8f9fa;
        --color-on-primary: #e2edee;
        --color-on-primary-darker: #ddebec;

        /* Secondary */
        --color-secondary-lighter: #229ea6;
        --color-secondary: #019099;
        --color-secondary-darker: #008790;
        --color-on-secondary-lighter: #f1fbfb;
        --color-on-secondary: #f4fbfc;
        --color-on-secondary-darker: #d5f2f3;
        
        /* Surface */
        --color-surface-lighter: #f8fafa;
        --color-surface: #ecf2f0;
        --color-surface-darker: #d9e7e5;
        --color-on-surface-lighter: #366062;
        --color-on-surface: #285d5f;
        --color-on-surface-darker: #18484b;
        
        /* Background */
        --color-background: #fafbfb;
        --color-on-background: #2b4243;
        --color-on-background-lighter: #354c4d;

        /* Error */
        --color-error: #7e1616;
        --color-on-error: #f6e7e7;

        /* Success */
        --color-success: #fff;
        --color-on-success: #fff;

    /* 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);
}

@media (min-width: 1200px) {

    :root {
        --page-width: 80%;
        --header-height: 116.39px;
        --header-margin-top: 2.5rem;
    }

}

@media (min-width: 1500px) {

    :root {
        --page-width: 70%;
        --header-height: 116.39px;
    }

}

/* ========================================
                CSS variables
                [END]
========================================= */




/* ========================================
            Initial setup & page layout
                [START]
========================================= */

@font-face {
    font-family: poppins;
    font-style: normal;
    font-weight: 300;
    src: url('../../fonts/Poppins/Poppins-Light.ttf');
    font-display: swap;
}

@font-face {
    font-family: poppins;
    font-style: normal;
    font-weight: 400;
    src: url('../../fonts/Poppins/Poppins-Regular.ttf');
    font-display: swap;
}

@font-face {
    font-family: poppins;
    font-style: normal;
    font-weight: 500;
    src: url('../../fonts/Poppins/Poppins-Medium.ttf');
    font-display: swap;
}

@font-face {
    font-family: poppins;
    font-style: normal;
    font-weight: 600;
    src: url('../../fonts/Poppins/Poppins-SemiBold.ttf');
    font-display: swap;
}

@font-face {
    font-family: poppins;
    font-style: normal;
    font-weight: 700;
    src: url('../../fonts/Poppins/Poppins-Bold.ttf');
    font-display: swap;
}

@font-face {
    font-family: poppins;
    font-style: normal;
    font-weight: 900;
    src: url('../../fonts/Poppins/Poppins-Black.ttf');
    font-display: swap;
}

*,
*::after,
*::before { 
    box-sizing: border-box;
}

* {
    margin: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--space-md);
}

html:has(.page__header--sticky) {
    scroll-padding-top: calc(var(--header-height) + 1.5rem);
}

body {
    min-height: 100vh;
    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);
}

.page__main {
    width: 100%;
    min-height: calc(100vh - var(--header-height));
}

body.home:has(.page__header--sticky) .page__main {
    padding-top: var(--header-height);
}

:focus-visible {
    outline-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]
========================================= */

#sa20-debug {
    width: 90%;
    height: 500px;
    margin-left: auto;
    margin-right: auto;
    padding: 12px;
    border: 1px solid rgb(0, 0, 0, 30%);
    border-radius: 4px;
    font-size: 1rem;
    color: #3e0000;
    background-color: #f5f0e6;
    overflow: scroll;
}

input:not([type="submit"], [type="checkbox"], [type="radio"]),
textarea, 
select {
    /* 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-top: .25rem;
    padding-bottom: .25rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    box-shadow: 0 0 2px 1px #01909929;
    border: none;
    color: var(--color-on-surface);
    background-color: var(--color-surface);
}

input:not([type="submit"], [type="checkbox"], [type="radio"]),
textarea {
    border-radius: var(--border-radius);
}

select {
    border-radius: .25rem;
}

input:not([type="submit"]):hover,
textarea:hover,
select: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;
    padding-top: .5rem !important;
    padding-bottom: .5rem !important;
}

/* Button */
.button, 
input[type="submit"] {
    display: flex;
    flex-direction: row;
    column-gap: .5rem;
    align-items: center;
    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 svg,
input[type="submit"] svg {
    fill: currentColor;
}

.button:hover, 
input[type="submit"]:hover {
    background-color: var(--button-hover-bg-color);
}

.button--scroll-up {
    display: flex;
    flex-direction: row;
    align-items: center;
    column-gap: 4px;
    width: fit-content;
    padding: 0;
    appearance: none;
    border: none;
    font-size: .875rem;
    font-weight: 300;
    color: var(--color-primary);
    background-color: transparent;
    cursor: pointer;
}

.button--scroll-up svg {
    fill: var(--color-primary)
}

.app__button {
    display: flex;
    flex-direction: row;
    align-items: center;
    column-gap: .75rem;
    width: fit-content;
    max-width: 18.75rem;
    margin: 0;
    padding-top: .5rem;
    padding-bottom: .5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    appearance: none;
    box-shadow: 0 0 2px 1px var(--color-surface-darker);
    border: none;
    border-radius: .75rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    background-color: var(--color-surface-lighter);
    cursor: pointer;
}

/* ========================================
                Components
                [END]
========================================= */




/* ========================================
            Helpers / utility
                [START]
========================================= */

.global-container {
    width: var(--page-width);
    height: 100%;
    margin-left: auto;
    margin-right: auto;
}

.global-container.global-container--sidebar {
    display: flex;
    flex-direction: column;
    row-gap: 2.5rem;
}

@media (min-width: 1200px) {
    
    .global-container.global-container--sidebar {
        flex-direction: row;
        justify-content: space-between;
        column-gap: 5rem;
    }

}

.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);
}

.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;
}

.underline::after {
    content: '';
    display: block;
    width: 30%;
    height: 4px;
    background-color: var(--color-primary);
}

.spacer {
    width: 100%;
    height: 7.5rem;
    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/) */
}

.prettify-text {
    line-height: 1.9;
    word-spacing: 1px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 300;
    text-transform: none;
    color: var(--color-on-background);
}

@media (min-width: 1200px) {

    .section-title {
        font-size: 1.75rem;
    }

}

.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;
}

.green-color {
    color: #00723b;
}

.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);
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 100%;
    }
}

/* ========================================
            Helpers / utility
                [END]
========================================= */