/* Page frame: containers, the two-column split, and the fixed furniture. */

/* CENTRED SECTION */
.content_section {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: var(--block_space) var(--edge);
}

.content_section .content {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
}

.content_section .content.vertical {
    flex-direction: column;
}

/* SPLIT
   Two columns that bleed to the window edge. .lead carries the text and lines
   its left edge up with centred sections; .aside is the image or sidebar. */
.split {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.split > .col {
    display: flex;
    flex: 1 0 var(--col_min);
    width: 100%;
}

.split.uneven > .col:first-child {
    flex-grow: 4;
}

.split.uneven > .col:last-child {
    flex-grow: 3;
}

.split > .lead {
    padding: var(--block_space) var(--edge) var(--block_space) var(--gutter);
}

/* Headline block inside a lead column. */
.text_container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--gap);
    height: 100%;
    max-width: 800px;
    margin-right: var(--edge);
}

/* Long-form prose. Spacing is per element so a heading binds to its paragraph. */
.article {
    max-width: 700px;
}

.article h2 {
    margin-bottom: 20px;
}

.article h3:nth-child(1) {
    margin-top: 10px;
}

.article h3 {
    margin-top: 56px;
    margin-bottom: 12px;
}

.article p + p {
    margin-top: 16px;
}

.article .button {
    width: fit-content;
    margin-top: 28px;
}

.article > *:last-child {
    margin-bottom: 0;
}

/* Markdown from the locale files lands in here, so everything it can emit is
   styled once, in one place. The global rule makes every `a` a block, which is
   right for a card and wrong for a link in the middle of a sentence. */
.article p a:not(.button),
.article li a:not(.button) {
    display: inline;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Markdown wraps a button in a paragraph of its own; the paragraph should not
   add space on top of the margin the button already carries. */
.article p:has(> a.button:only-child) {
    margin-top: 0;
}

.article ul,
.article ol {
    margin-top: 16px;
    padding-left: 22px;
}

.article ul + p,
.article ol + p {
    margin-top: 16px;
}

.article li {
    font-size: var(--default_font_size);
    letter-spacing: -.32px;
    line-height: 1.5em;
}

.article li + li {
    margin-top: 6px;
}

.article li > p {
    display: inline;
}

.article blockquote p + p {
    margin-top: 16px;
}

/* A picture in the prose. The global rule stretches an image to fill its box,
   which is right for a card and wrong here: this one sets its own height. */
.article img {
    height: auto;
    border-radius: var(--radius);
}

.article p:has(> img:only-child) {
    margin-top: 28px;
    margin-bottom: 28px;
}

/* NAVIGATION */
header {
    position: fixed;
    top: 0;
    z-index: 998;
    width: 100%;
    height: fit-content;
    padding: 16px 16px 8px 16px;
    transition: background 200ms ease-in-out, color 200ms ease-in-out;
}

header p,
header strong {
    font-size: calc(var(--default_font_size) - 2px) !important;
    text-transform: uppercase
}

header.has_scrolled {
    background: var(--accent);
    color: white !important;
}

header[data-light="true"] {
    color: white;
}

header.has_scrolled img,
header[data-light="true"] img {
    filter: invert(100%) sepia(100%) saturate(100%) hue-rotate(320deg) brightness(200%) contrast(100%);
}

.header_content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
}

.header_content span {
    display: flex;
    gap: 32px;
    align-items: center;
}

/* HERO */
.hero {
    height: 100lvh;
    gap: 20px;
}

.hero > .col {
    height: 100%;
    align-items: center;
}

.hero > .lead {
    padding-block: 0;
}

.hero .text_container {
    gap: 40px;
}

.hero .sub_heading_text {
    padding-right: 10%;
}

.hero .web_name {
    margin-bottom: 16px;
}

.hero .disclaimer {
    color: var(--sub_text_color);
}

.landing_link_container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.landing_link_container strong {
    color: var(--sub_text_color);
}

/* PAGE HEADER */
.page_header {
    gap: 20px;
    background: var(--foreground);
}

.page_header > .col {
    align-items: center;
}

.page_header > .aside {
    position: relative;
    overflow: hidden;
}

.page_header > .aside > img {
    position: absolute;
    inset: 0;
}

.page_header img,
.page_banner img {
    user-select: none;
    -webkit-user-drag: none;
}

/* PAGE BANNER (image behind a centred title) */
.page_banner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: fit-content;
    padding: 150px var(--edge);
}

.page_banner * {
    z-index: 2;
}

.page_banner h1 {
    color: white;
    text-align: center;
}

.page_banner img {
    position: absolute;
    inset: 0;
    z-index: 1 !important;
    filter: brightness(0.9);
}

/* CTA */
.cta {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    padding: 72px 16px;
    border-radius: var(--radius);
    color: white;
    text-align: center;
}

.cta > * {
    z-index: 2;
}

.cta > img {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 1;
    filter: brightness(0.75);
}

/* FOOTER */
footer {
    padding: var(--block_space) var(--edge);
    background: var(--foreground);
}

.footer_content {
    display: grid;
    gap: 10vh;
    max-width: var(--max-width);
    margin-inline: auto;
}

.footer_top,
.footer_bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
}

.footer_bottom {
    flex-wrap: wrap-reverse;
}

.footer_call_to_action {
    font-size: 20px;
    font-weight: var(--weight);
    color: var(--sub_text_color);
}

.big_email_link {
    color: var(--accent);
    font-size: calc(1.4rem + 2.6vw);
    text-decoration: underline;
    text-underline-offset: 8px;
    text-decoration-thickness: 4px;
}

.big_email_link:hover {
    color: black !important;
}

.footer_copyright {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.footer_copyright img {
    height: 50px;
    object-fit: contain;
    width: auto;
    object-position: left;
}

.footer_site_map {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 50px;
    font-size: var(--default_font_size);
}

.sitemap_branch {
    display: grid;
    gap: 8px;
}

.sitemap_branch strong {
    margin-bottom: 4px;
}

.sitemap_branch a,
.sitemap_branch div[data-animated-anchor="true"] {
    color: var(--sub_text_color);
    text-decoration: none;
}

.locale_modal_container {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100lvh;
    width: 100vw;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
}

.locale_modal {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 300px;
    margin: var(--edge);
    padding: 32px;
    border-radius: var(--radius);
    background: var(--background);
}

@media (max-width: 719px) {
    .hero > .col,
    .page_header > .col {
        height: 40%;
    }

    .hero > .lead {
        min-height: calc(60% - 20px);
    }

    .page_header > .aside {
        min-height: 300px;
    }

    .hero .sub_heading_text {
        padding: 0;
    }
}


/* MOBILE NAVIGATION */
.mobile-header {
    display: none !important;
}

/* The panel is a sibling inside .header_content, so the bar itself is lifted above it. */
.header_content > span,
.mobile_menu_toggle {
    position: relative;
    z-index: 2;
}

header[data-menu-open="true"] {
    background: var(--accent);
    color: white !important;
}

header[data-menu-open="true"] img {
    filter: invert(100%) sepia(100%) saturate(100%) hue-rotate(320deg) brightness(200%) contrast(100%);
}

.mobile_menu_toggle {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.mobile_menu_toggle span {
    position: absolute;
    left: 5px;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 200ms ease-in-out, opacity 200ms ease-in-out;
}

.mobile_menu_toggle span:first-child {
    top: 12px;
}

.mobile_menu_toggle span:last-child {
    top: 19px;
}

.mobile_menu_toggle[aria-expanded="true"] span:first-child {
    transform: translateY(3.5px) rotate(45deg);
}

.mobile_menu_toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
}

.mobile_menu {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100dvh;
    padding: 80px 16px 40px 16px;
    background: var(--accent);
    color: white;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 200ms ease-in-out, transform 200ms ease-in-out, visibility 200ms;
}

.mobile_menu[data-open="true"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile_menu_links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile_menu_links a {
    padding-block: 14px;
    border-bottom: 1px solid color-mix(in srgb, white 20%, transparent);
    text-decoration: none;
}

.mobile_menu_links a:hover,
.mobile_menu_links a strong {
    color: white !important;
}

/* Overrides the compact uppercase sizing the header gives every strong. */
.mobile_menu_links strong {
    font-size: 24px !important;
    letter-spacing: -.4px;
    line-height: 1.3;
}

.mobile_menu_language {
    display: flex !important;
    gap: 8px;
    align-items: center;
    text-decoration: none;
    color: white !important;
    text-transform: uppercase;
}

.mobile_menu_language p {
    font-size: calc(var(--default_font_size) - 2px);
}

@media (max-width: 720px) {
    .desktop-header {
        display: none !important;
    }

    .mobile-header {
        display: block !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile_menu,
    .mobile_menu_toggle span {
        transition: none;
    }
}