/* Font Face Declarations */
@font-face {
    font-family: "Cantarell";
    font-style: normal;
    font-weight: 800;
    src: local("Cantarell Extra Bold"), local("Cantarell-ExtraBold"), url(/_spry/res/cantarell-extra-bold-latin.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+2215;
}

@font-face {
    font-family: "Cantarell";
    font-style: normal;
    font-weight: 600;
    src: local("Cantarell Bold"), local("Cantarell-Bold"), url(/_spry/res/cantarell-bold-latin.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+2215;
}

@font-face {
    font-family: "Cantarell";
    font-style: normal;
    font-weight: 400;
    src: local("Cantarell Regular"), local("Cantarell-Regular"), url(/_spry/res/cantarell-regular-latin.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+2215;
}

/* Reset */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

* {
    box-sizing: border-box;
}

/* Variables */
:root {
    --desktop-font-size: 1.2rem/1.5;
    --mobile-font-size: 1rem/1.4;
    --text-color: #fff;
    --link-color: hsl(207, 100%, 70%);
    --link-color-alt: hsl(207, 100%, 50%);
    --primary-color: hsl(200, 100%, 30%);
    --secondary-color: hsl(200, 70%, 80%);
    --tertiary-color: #2d2d2d;

    --page-baground: linear-gradient(170deg, hsla(258, 80%, 13%, 0.4) 0%, hsla(195, 100%, 30%, 0.4) 100%), url("/_spry/res/background.webp");
    --glass-color: rgba(50, 50, 50, 0.5);
    --glass-primary-color: hsla(200, 100%, 30%, 0.5);
    --glass-edge-color: rgba(100, 100, 100, 0.7);
    --content-background: #242424;
    --muted-color: #858585;

    --display-font: "Cantarell", -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto, Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji", "Segoe UI Symbol";
    --primary-font: "Cantarell", -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto, Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji", "Segoe UI Symbol";
    --secondary-font: "Georgia", serif;
    --monospace-font: monospace;

    --roundness: 0.5rem;
}

/* Typography */
body {
    color: var(--text-color);
    background: var(--page-baground);
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    display: flex;
    height: 100vh;
    flex-direction: column;
}
main {
    margin: 0 auto;
    max-width: 90ch;
    padding: 0 0.5rem;
    width: 100%;
}
body, input, button {
    font: var(--desktop-font-size) var(--primary-font);
}

h1,h2,h3,h4,h5,h6,p,blockquote,dl,img,figure {
    margin: 2rem 0;
}

h1,h2,h3,h4,h5,h6 { font-weight: bold; line-height: 1.2; font-family: var(--display-font); }
h1 { font-size: 200%; }
h2 { font-size: 150%; }
h3 { font-size: 120%; }
h4,h5,h6 { font-size: 100%; font-weight: bold;  }
h5, h6 { text-transform: uppercase; }

p { margin: 2rem 0; }

a,a:visited { color: var(--link-color); }
a:hover,a:focus { color: var(--link-color-alt); }

strong, time, b { font-weight: bold; }
em, dfn, i { font-style: italic; }
sub { font-size: 60%; vertical-align: bottom; }
small { font-size: 80%; }

blockquote, q {
    background: var(--secondary-color);
    border-left: 10px solid var(--primary-color);
    display: block;
    font-family: var(--secondary-font);
    padding: 1rem;
    border-radius: var(--roundness);
}
blockquote p:first-child { margin-top: 0; }
blockquote p:last-child { margin-bottom: 0; }
cite {
    font-family: var(--secondary-font);
    font-style: italic;
    font-weight: bold;
    margin-top: 1rem;
}

kbd,code,samp,pre,var { font-family: var(--monospace-font); }
code, pre {
    background: var(--tertiary-color);
    overflow: auto;
    padding: 0.5rem 1rem;
}
code pre , pre code { padding: 0; }

h1+h2,
h3+h4{
    margin-top: -1.2em;
    margin-bottom: 1.2em;
    color: var(--muted-color)
}

/* Elements */
hr {
    background: var(--text-color);
    border: 0;
    height: 1px;
    margin: 4rem 0;
}

img {
    display: block;
    height: auto; 
    max-width: 100%; 
}

figure {
    border: 1px solid var(--primary-color);
    display: inline-block;
    padding: 1rem;
    width: 100%;
}
figure img { margin: 0 auto; }
figure figcaption { font-size: 80%; margin-top: 0.5rem; text-align: center; }

ul, ol { margin: 2rem 0; padding: 0 0 0 4rem; }

dl dd { padding-left: 2rem; }

table {
    border: 1px solid var(--primary-color);
    border-collapse: collapse;
    table-layout: fixed;
    text-align: left;
    width: 100%;
}
table caption { margin: 2rem 0; }
table tr { border-bottom: 1px solid var(--primary-color); }
table tbody tr:nth-child(even) { background: var(--tertiary-color); }
table th { background: var(--secondary-color); font-weight: bold; }
table th, table td { padding: 1rem; }
table th:not(last-of-type), table td:not(last-of-type) { border-right: 1px solid var(--primary-color); }

form {
    margin-top: 16px;
}


input,
button { 
    border: 1px solid var(--muted-color);
    padding: 0.2em; 
    border-radius: var(--roundness);
    background-color: var(--page-background);
    color: var(--text-color);
}
input:focus,
input:active {
    background-color: var(--tertiary-color);
    border-color: var(--primary-color);
}

input[type=button],
input[type=submit],
input[type=reset],
button {
    padding: 0.2rem 0.8rem; 
    background-color: var(--tertiary-color);
    display: inline-block;
}

input[type=button]:hover,
input[type=submit]:hover,
input[type=reset]:hover,
button:hover {
    border-color: var(--primary-color);
}

input[type=button]:active,
input[type=submit]:active,
input[type=reset]:active,
button:active {
    background-color: var(--secondary-color);
    border-color: var(--primary-color);
    color: var(--tertiary-color);
}
input[type=button]:focus,
input[type=submit]:focus,
input[type=reset]:focus,
button:focus {
     border-color: var(--primary-color);
}

.error-text {
    text-align: center;
    padding: 5px;
    background-color: #800000;
    border-radius: 10px;
    margin-left: 16px;
    margin-right: 16px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); } /* Start and end at original position */
    10% { transform: translateX(-5px); }   /* Move left 5px */
    20% { transform: translateX(5px); }    /* Move right 5px */
    30% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    50% { transform: translateX(-5px); }
    60% { transform: translateX(5px); }
    70% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
    90% { transform: translateX(-5px); }
}
 

header[role=banner] {

    background-color: var(--glass-color);
    border-bottom: var(--glass-edge-color) 1px solid;
    backdrop-filter: blur(10px);

    margin-top: -32px;
    padding-top: 32px;
    margin-bottom: 32px;

    width: 100%;

    box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.38);
}

header[role=banner] > * {
    padding-left: calc(max(18px, (100% - 90ch)/2 + 18px));
    padding-right: calc(max(18px, (100% - 90ch)/2 + 18px));
}

header[role=banner] h1 {
    margin-bottom: 8px;
}

footer {

    mask-image: linear-gradient(transparent 0%, rgb(0 0 0 / 100%) 128px);

    background-color: var(--glass-color);
    backdrop-filter: blur(10px);

    padding-top: 128px;
    padding-bottom: 8px;

    width: 100%;
    padding-left: calc(max(8px, (100% - 90ch)/2 + 8px));
    padding-right: calc(max(8px, (100% - 90ch)/2 + 8px));

    margin-top: auto;
}

article,
section {
    background-color: var(--content-background);
    border-radius: var(--roundness);
    
    margin: 0 0 1em;
    width: 100%;
    
    page-break-inside: avoid;
    break-inside: avoid-column; 

    box-sizing: border-box;
    padding: 8px 18px 18px 18px;
    border: 1px solid var(--tertiary-color);

    box-shadow: 0 0px 80px 0 rgba(0, 0, 0, 0.4), 0 6px 20px 0 rgba(0, 0, 0, 0.38);

}

details summary {
    cursor: pointer;
}

/* Classes */
.muted {
    color: var(--muted-color);
}

.border-primary {
    border-color: var(--primary-color);
}
.border-secondary {
    border-color: var(--secondary-color);
}
.border-tertiary {
    border-color: var(--tertiary-color);
}

.background-primary {
    background-color: var(--primary-color);
}
.background-secondary {
    background-color: var(--secondary-color);
}
.background-tertiary {
    background-color: var(--tertiary-color);
}

section ul.compressed {
    margin-top: auto;
}
ul.compressed {
    list-style: none;
    padding-left: 0px;
    margin: 0px;
}
ul.compressed li {
    display: inline-block;
    margin-right: 18px;
    margin-bottom: 8px;
}

ul.compressed li:last-of-type {
    margin-right: 0px;
}

.larger {
    width: 130%;
    margin-left: -15%;
}

section.subtle {
    background-color: transparent;
    border-color: transparent;
}

.tight {
    margin-bottom: 0px;
    margin-top: 0px;
}

span.icon {
    text-decoration: none !important;
    display: inline-block;
    margin-right: 1ch;
}

section.glass {
    background-color: var(--glass-color);
    backdrop-filter: blur(10px);
}

section.glass.background-primary {
    background-color: var(--glass-primary-color);
}

/* Cards Layout */
.cards {
    margin-top: 40px;
    column-count: 2;
    column-gap: 1em;
    margin-bottom: 40px;
}

.cards > section {
    background-color: var(--content-background);
    border-radius: 0.5rem;
    overflow: hidden;
    
    margin: 0 0 1em;
    width: 100%;
    
    page-break-inside: avoid;
    break-inside: avoid-column; 

    box-sizing: border-box;
    padding: 8px 18px 18px 18px;
    border: 1px solid var(--glass-edge-color);
    display: flex;
    flex-direction: column;

}

.cards > section.feature {
    background-color: var(--primary-color);
    text-align: center;
}

.cards h3 {
    margin-top: 8px;
    margin-bottom: 0px;
}

.cards h4 {
    margin-bottom: 0px;
    margin-top: 4px;
    color: var(--muted-color)
}

.cards h4,
.cards img {
    filter: saturate(0.3);
    transition: filter 0.2s;
}

.cards section {
    margin-bottom: 2rem;
}

.cards section > img {
    margin: -8px -18px 8px -18px;
    max-width: calc(100% + 36px);
}

.cards section > div.icon-header {
    display: flex;
    align-items: center;
    margin-top: 10px;
    margin-bottom: -14px;
}

.cards section > div.icon-header h3 {
    margin-top: 4px;
}
.cards section > div.icon-header h4 {
    margin-bottom: 0px;
}

.cards section > div.icon-header > img {
    max-width: 64px;
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 18px;
    margin-bottom: 0px;
}

.cards > section:hover h4,
.cards > section:hover img {
    filter: saturate(1);
}

.cards ul.links {
    margin-top: auto;
}

/* Footer Styles */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer > p {
    flex: 1;
}

footer img {
    height: 100px;
}

footer > div a {
    margin-left: 24px;
}

footer div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Navigation */
nav {
    background-color: rgba(0,0,0,0.1);
    padding-bottom: 10px;
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
}

/* Primary Section */
section.primary {
    border: var(--primary-color) 2px solid;
}

section.primary p:first-of-type {
    margin: 8px 0px 0px 0px;
}

section.primary p {
    margin: 1rem 0px 0px 0px;
}

section p {
    margin-top: 1rem;
    margin-bottom: 0px;
}

section ul.compressed {
    margin-top: 1rem;
}

section ul.compressed li {
    margin-bottom: 0px;
}

ul li a.current {
    color: var(--secondary-color);
}

/* Header Logo Link - extracted from inline styles */
header[role=banner] h1 a {
    color: var(--text-color);
    text-decoration: none;
}

header[role=banner] h1 a .logo-img {
    height: 80px;
    display: inline;
    margin: 0px;
}

.event {
    margin-top: .5em;
    margin-bottom: 1em;
    border-bottom: 1px solid var(--secondary-color);
}

.event pre {
    white-space: pre-wrap;   
}

.event-header-text {
    flex: 1;
}

.event-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.event-title {
    display: flex;
    justify-content: space-between;
}

.event-heading .icon {
    font-size: 2em;
}

/* Mobile Styling */
@media screen and (max-width: 90ch) {
    body, input {
        font: var(--mobile-font-size) var(--primary-font);
    }
    table { table-layout: auto; }

    .cards {
        column-count: 1;
    }

    footer {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
    }

    footer > p {
        flex: 1;
        text-align: center;
    }

    footer a:first-of-type {
        margin-left: 0px;
    }
}
