:root {
	--primary-color: #4556a4;
	--primary-color-dk: #364176;
	--primary-color-xdk: #232b4c;
	--accent-color: #814a95;
	--accent-color-dk: #482f52;
	--accent-color-xdk: #261c2a;
	--text-color: #2c3e50;
	--text-light: #6c7a89;
	--text-lighter: #fafafe;
	--bg-color: #f1f3fb;
	--bg-color-light: #f8f8fa;
	--bg-color-dark: #ccced7;
	--border-color: #e0e0e0;
	--shadow-sm: 2px 2px 4px rgba(70, 81, 131, 0.15);
	--shadow-md: 2px 4px 4px rgba(70, 81, 131, 0.3);
	--shadow-lg: 4px 4px 8px rgba(70, 81, 131, 0.5);
	--transition-fast: 0.2s ease;
	--transition-normal: 0.3s ease;
	--transition-slow: 0.5s ease;
	--font-family: 'Lato', sans-serif;
	--line-height: 1.4;
	--border-radius-sm: 0.6rem;
	--border-radius-md: 0.8rem;
	--border-radius-lg: 1rem;
	--max-width: 1200px;
	--content-padding: 8vw;
	--negative-content-padding: calc(20px + (8vw * -1));
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: var(--line-height);
	padding-top: 60px;
	min-height: 1vh;
	background-color: #e2e5eb;
    color: var(--text-color);
	overflow-x: hidden;
}

@view-transition {
	navigation: auto;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.navbar {
    background: #25326bd6;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 500;

    box-shadow: var(--shadow-md);
	height: 120px;
    backdrop-filter: blur(16px);
    mask-image: linear-gradient(
      to bottom,
      black 0% 50%,
      transparent 50% 100%
    );
}

.nav-container {
	max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

#logo {
	position: fixed;
	left: 20px;
	top: 10px;
	height: 60px;
	z-index: 600;
	filter: drop-shadow(0 2px 4px #232b4cdd);
}

/* Nav menu */
.nav-menu {
	flex-basis: 500px;
    display: flex;
	height: 100%;
	align-items: stretch;
	justify-items: stretch;
}

.nav-menu > a {
	flex-basis: 100px;
	display: flex;
	align-items: center;
	justify-content: space-around;
    text-decoration: none;
    color: #fcfcfc;
    font-weight: 400;
    transition: color 0.3s ease;
}

.nav-menu > a:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

.nav-menu a:hover {
    color: #fff;
}


subheader {
	width: 100%;
    position: fixed;
    width: 100%;
    top: 60px;
    z-index: 500;
}


.subnav {
	display: flex;
	justify-content: space-between;
	width: 100%;
	max-width: var(--max-width);
	margin: 0 auto;
	z-index: 800;
}

.submenu-content {
	display: none;
	max-width: var(--max-width);

	a {
		background: rgba(37, 50, 107, 0.8);
		border-bottom: 1px solid rgba(37, 50, 107, 0.8);
		padding: 10px 20px;
		vertical-align: baseline;
		backdrop-filter: blur(16px);
		-webkit-backdrop-filter: blur(16px);
		color: #fcfcfc;
		text-decoration: none;
	}
}

.submenu-content.over {
	display: flex;
	flex-direction: column;
	justify-content: stretch;
}

.submenu-content {
	a:hover {
		background: rgba(37, 50, 107, 0.9);
		border: 1px solid rgba(37, 50, 107, 1);
	}
}

.nav-features-content {
	flex-basis: 500px;
}

.nav-articles-content {
	flex-basis: 400px;
}

.nav-documentation-content {
	flex-basis: 300px;
}

.nav-about-content {
	flex-basis: 200px;
}

ul {
	padding-left: 2rem;
	margin-bottom: 1rem;
}


/* Hero Section */
.hero {
    background: linear-gradient(180deg, #0d0f18 0%, var(--primary-color-dk) 100%);
    color: var(--text-lighter);
    min-height: 100vh;
	width: 100vw;
	max-width: 100vw;
    display: flex;
	margin-bottom: 20px;
}

.hero-content {
	width: 100vw;
	margin: 0 auto;
}

.hero h1 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.hero h2 {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 1.2rem auto;
}

.hero-text {
	position: absolute;
	inset-inline-start: 20px;
	inset-block-start: 80px;
	padding: 10px;

	background: rgba(255, 255, 255, 0.2);
	border-radius: 16px;
	box-shadow: var(--shadow-lg);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.4);
}




/* homepage animation  */
#container {
    position: absolute;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}


#hidden {
	opacity: 0;
	height: 0px;
	max-height: 0px;
	width: 0px;
	max-width: 0px;
	overflow: hidden;
}

.reg-rules {
	max-width: 1028px;
}


.conversion-blur {
	background-color: rgba(69, 86, 164, 0.95);
	filter: blur(5px);
}

.regulation {
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 1);
    color: rgba(0, 0, 8, 1);

	position: absolute;
	top: 0;
	left: 0;
	padding: -10px;
}

.regulation .el {
	padding: 6px 0 0 60px;
	max-width: 600px;
	font-size: 1rem;
}

.el.Section {
	font-size: 1.6rem;
	padding-top: 20px;
}
.el.SubSection {
	font-size: 1.4rem;
	padding-top: 10px;
}
.el.SubSubSection {
	font-size: 1.2rem;
	padding-top: 10px;
}

.el.Paragraph, el.SubParagraph, el.SubSubParagraph, el.SubSubSubParagraph, el.Text, el.Penalty {
	font-size: 1rem;
}

.el.Penalty, el.Note {
	font-size: 1rem;
	font-style: italic;
}

.rules.pane {
	background-color: rgba(69, 86, 164, 0.9);
	border: rgba(69, 86, 164, 1);
	color: rgba(255, 255, 255, 0.8);

	position: absolute;
	top: 0;
	left: 0;
	padding: 10px;
}

.rule {
	margin-bottom: 10px;
	max-width: 1024px;
	background-color: rgba(250, 250, 250, 0.05);
	padding: 10px;
}

.expression {
	padding: 0 10px;
}

ul {
	padding-left: 40px;
}

.operator {
	margin-right: 4px;
	font-weight: 700;
	color: rgba(255, 255, 255, 1);
}

.rule-container {
	display: flex;
	align-items: stretch;
	padding: 10px;
}

.comment {
	border-top: rgba(255, 255, 255, 0.9);
	border-bottom: 1px solid rgba(255, 255, 255, 0.9);
	margin-top: 20px;
	padding: 5px 0;
}

.foreach-indent {
	flex-grow: 0;
	border-left: 2px solid 4px;
	margin-right: 10px;
	margin-bottom: 10px;
}

.foreach-list {
	flex-grow: 1;
}

.property-type {
	font-style: italic;
}

.in {
	margin: 0 4px;
	color: rgba(255, 255, 255, 1);
}

.modality {
	padding: 0 6px;
}

.permitted {
	color: #6cd76cfa;
}

.forbidden {
	color: #ee3737fa;
}

.obligated {
	color: #ffaf3afa;
}

.excused {
	color: #88e9edfa;
}


/* Aticles and pages */

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: white;
    color: #4556a4;
}

.btn-primary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #4556a4;
}


/* Adjust absolute positioned elements when size exceeds max-width */
@media screen and (width >= 1200px) {
	#logo {
		left: calc((100vw - var(--max-width)) / 2);
	}

	.hero-text {
		inset-inline-start: calc((100vw - var(--max-width)) / 2);
	}

}


/* Home index sections */

.home.index {
	width: 100%;
	max-width: var(--max-width);
	margin: 0 auto;
	background-color: #fcfcfc;
}

.index {
	min-height: calc(100vh - 150px);
}

.index > section {
	margin: 0 auto;
	width: 99%;
	padding: 20px;
}

.index > .primary-on-white, .index > .accent-on-white {
	color: var(--text-color);
}

.index-grid {
	width: 100%;
	max-width: 1200px;
    margin: 2rem auto;
    display: grid;
	justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(250px, 350px));
    gap: 2rem;
}

.index-grid .index-card {
    padding: 1rem;
    border-radius: 0.6rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.index-grid .index-card:hover {
    transform: translateY(-5px);
	cursor: pointer;
}

.index h1, .index h2, .index h3  {
    text-align: center;
	margin: 0.6rem 0 0.5rem 0;
	line-height: 1.3;
}

.index .index-card {
    background: white;
}

.index .index-card p {
    color: #666;
    line-height: 1.6;
}

.index h1 {
	font-size: 2.2rem;
	font-weight: 400;
}

.index h2 {
    font-size: 1.8rem;
    font-weight: 300;
}

.index h3 {
    font-size: 1.4rem;
    font-weight: 400;
}


/* colourings */
.primary-on-white h1, .primary-on-white h2, .primary-on-white h3 {
    color: var(--primary-color);
}

.accent-on-white h1, .accent-on-white h2, .accent-on-white h3 {
    color: var(--accent-color);
}



/* Content/articles */
.content {
	min-height: calc(100vh - 150px);
	width: 100%;
	max-width: var(--max-width);
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	row-gap: 10px;
}

@media screen and (width >= 600px) {
	.content {
		flex-direction: row;
		column-gap: 4px;
	}
	.content .main {
		flex: 2 0;
	}
	.content .sidebar {
		flex: 1 0;
	}
}

@media screen and (width >= 800px) {
	.content {
		flex-direction: row;
		column-gap: 8px;
	}
	.content .main {
		flex: 3 0;
	}
	.content .sidebar {
		flex: 1 0;
	}
}


.content section {
	margin: 10px 20px;
	padding: 10px var(--content-padding);
	box-shadow: var(--shadow-sm);
	border-radius: 10px;
}

.content section .wide {
	margin: 20px calc(10px + var(--negative-content-padding));
	padding: 20px 0;
	border-top: 1px solid #99999933;
	border-bottom: 1px solid #99999933;
}


.content p {
	margin: 0.85rem 0 1.2rem 0;
}

.content h1, .content h2, .content h3 {
	line-height: 1.2;
}

.content h1 {
	font-size: 2rem;
	font-weight: 300;
    margin: 2rem 0 1rem 0;
}

.content h2 {
    font-size: 1.6rem;
    font-weight: 300;
    margin: 1.8rem 0 0.5rem 0;
}

.content h3 {
    font-size: 1.3rem;
    font-weight: 400;
    margin: 1.6rem 0 0.5rem 0;
}

.sidebar h2 {
	color: var(--text-color);
}

.sidebar-entry h3 {
	font-weight: 300;
}

.sidebar-entry a, .sidebar-entry a:hover, .sidebar-entry a:visited {
	color: var(--primary-color);
	text-decoration-thickness: 1px;
	font-weight: 300;
}

.content section {
	background: white;
	color: var(--text-color);
}

.content time {
	margin: 2rem 0;
	display: block;
	font-size: 0.9rem;
}



.primary-on-white a, .primary-on-white a:visited, .primary-on-white a:active, .primary-on-white a:hover  {
    color: var(--primary-color);
}

.accent-on-white a, .accent-on-white a:visited, .accent-on-white:active, .accent-on-white a:hover  {
    color: var(--accent-color);
}

.more-info {
	margin-top: 1.5rem;
}




/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: var(--shadow-sm);
        display: none;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero h2 {
        font-size: 1.2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .index-grid {
        grid-template-columns: 1fr;
    }
}


.center {
	display: flex;
	justify-content: center;
}

.float-left {
	float: left;
	margin: 0 4rem 2rem 0;
	max-width: 60%;
}

.float-right {
	float: right;
	margin: 0 0 2rem 4rem;
	max-width: 60%;
}

img {
	max-width: 100%;
}

img.img-border {
	border: 1px solid var(--primary-color);
}

figure {
	border: 1px solid #99999933;
	text-align: center;
	padding: 0.5rem;
	box-shadow: var(--shadow-md);
	border-radius: 0.5rem;
	margin: 2rem 0;
}

figcaption, .caption {
	font-size: 0.9rem;
	color: var(--text-light);
}
