/* ========================================
                CSS variables
                [START]
========================================= */

:root {

    /* Global properties */
    --page-width: 90%;
    --page-width-padding: calc( (100% - var(--page-width)) / 2 );
    --font-family: raleway, 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: 80px;
    --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: #1f201d; /* #243c57 */
        --color-primary-darker: #141513; /* #1b2e44 */
        --color-on-primary: #f5faff; /* #f5faff */
        --color-on-primary-darker: #ffffff; /* #ffffff */
        --color-primary-12pc: rgba(85, 126, 172, 12%); /* rgba(85, 126, 172, 12%) */

        /* Secondary */
        --color-secondary: #EF0F0C; /* #948b4c */
        --color-on-secondary: #f5faff; /* #f5faff */
        --color-secondary-darker: #d30e0b; /* #80783c */
        --color-on-secondary-darker: #ffffff; /* #ffffff */

        /* Surface */
        --color-surface: #f4f4f4;
        --color-on-surface: #000;
        --color-surface-darker: #e8e8e8;
        --color-on-surface-darker: #000;

        /* Background */
        --color-background: #fafafa;
        --color-on-background: #000;

        /* Error */
        --color-error: #fff;
        --color-on-error: #fff;

        /* 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-hover-text-color: var(--color-on-primary-darker);
    --button-font-size: 1rem;
    --button-border-radius: .25rem;

    /* 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;

    /* Animation */
    --animation-blink: fade-in 1s infinite;
}

@media (min-width: 1200px) {

    :root {
        --page-width: 80%;
        --header-height: 70.58px;
    }

}

/* ========================================
                CSS variables
                [END]
========================================= */




/* ========================================
            Initial setup & page layout
                [START]
========================================= */

@font-face {
    font-family: raleway;
    font-style: normal;
    font-weight: 300;
    src: url('../../fonts/Raleway/static/Raleway-Light.ttf');
    font-display: swap;
}


@font-face {
    font-family: raleway;
    font-style: normal;
    font-weight: 400;
    src: url('../../fonts/Raleway/static/Raleway-Regular.ttf');
    font-display: swap;
}

@font-face {
    font-family: raleway;
    font-style: normal;
    font-weight: 500;
    src: url('../../fonts/Raleway/static/Raleway-Medium.ttf');
    font-display: swap;
}

@font-face {
    font-family: raleway;
    font-style: normal;
    font-weight: 600;
    src: url('../../fonts/Raleway/static/Raleway-SemiBold.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: var(--header-height);
}

body {
    min-height: 100vh;
    font-family: var(--font-family);
    font-weight: 400;
    line-height: var(--line-height);
    color: var(--color-on-background);
    -webkit-font-smoothing: antialiased;
    accent-color: var(--color-primary);
    background-color: var(--color-background);
}

body.page--disabled-scroll {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.page__main {
    width: 100%;
    min-height: calc(100vh - var(--header-height));
}

body: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);
}

/* ========================================
            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]
========================================= */

#chmn-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 {
    /* 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([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 {
    color: var(--button-hover-text-color);
    background-color: var(--button-hover-bg-color);
}

.button--secondary {
    color: var(--color-on-secondary);
    background-color: var(--color-secondary);
}

.button--secondary:hover {
    color: var(--color-on-secondary-darker);
    background-color: var(--color-secondary-darker);
}

.button--scroll-up {
    display: none; /* Hides button by default */

    /* Creates circel with slight shadow */
    width: 65px;
    height: 65px;
    padding: var(--space-xl);
    border: none;
    border-radius: var(--border-radius-full);
    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: 100px;
    right: 50px;    
    z-index: var(--under-top-z-index);

    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);
}

.chmn-wp-post__title {
    display: none;
}

/* ========================================
                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);
}

.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: 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/) */
}

.prettify-text {
    line-height: 1.9;
    word-spacing: 1px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 400;
    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: 400;
}

.title--big {
    font-size: 2rem;
    font-weight: 500;
}

.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);
}

/* ========================================
            Helpers / utility
                [END]
========================================= */