/* MARK: VARIABLES */

:root {
	color-scheme: light dark;

	--light-background: whitesmoke;
	--light-color: #343231;
	--light-border: #343231;

	--dark-background: #343231;
	--dark-color: whitesmoke;
	--dark-border: whitesmoke;

	--info: gold;
	--success: green;
	--error: orangered;
	--shadow: rgba(0, 0, 0, 0.452);
}

* {
	background-color: light-dark(var(--light-background), var(--dark-background));
	border-color: light-dark(var(--light-border), var(--dark-border));
	color: light-dark(var(--light-color), var(--dark-color));
}



/* MARK: FONTS */

@font-face {
	font-family: "RobotoCondensedSemiBold";
	src: url("RobotoCondensed-SemiBold.woff");
}

@font-face {
	font-family: "RobotoCondensedRegular";
	src: url("RobotoCondensed-Regular.woff");
}

@font-face {
	font-family: "RobotoCondensedThin";
	src: url("RobotoCondensed-Thin.woff");
}



/* MARK: KEYFRAMES */

@keyframes animateProcessing {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes animateDetails {
	from {
		opacity: 0;
		translate: 0 -5rem;
	}
	to {
		opacity: 1;
		translate: 0 0;
	}
}



/* MARK: LAYOUT SEMANTIC */

html {
	font-size: 16px;
	scroll-behavior: smooth;
}

*, *:before, *:after {
	box-sizing: border-box;
}

body {
	margin: 0;
	display: grid;
	min-height: 100vh;
	font-family: "RobotoCondensedRegular";
}

nav {
	display: flex;
	padding: 2rem;
	grid-area: nav;
	column-gap: 1rem;
	justify-content: end;
}

header {
	grid-area: header;
	text-align: end;
	padding: 2rem;
}

aside {
	grid-area: aside;
	padding: 2rem;
}

main {
	grid-area: main;
}

section {
	margin: 0;
	padding: 0;
}

footer {
	padding: 2rem;
	display: flex;
	column-gap: 1rem;
	row-gap: 0.5rem;
	grid-area: footer;
	font-size: 0.7rem;
	justify-content: end;

	p {
		line-height: 1.2;
	}
	address {
 		font-style: normal;
	}
}

hr {
	border: 1px solid dimgray;
}



/* MARK: LAYOUT NON-SEMANTIC */

.sectionPadded {
	padding: 2rem;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.flexDashboard {
	flex-wrap: wrap;
	display: flex;
	gap: 3rem;
}

.right {
	text-align: end;
}

.authenticateKey {
	box-shadow: 2px 2px 4px var(--shadow) inset;
	background-color: var(--light-background);
	color: var(--light-color);
	border-radius: 1rem;
	font-size: 0.8rem;
	text-align: center;
	margin-top: 1rem;
	padding: 1rem;
}



/* MARK: CALLIGRAPHY */

p {
	line-height: 1.5rem;
	margin: 0;
}

h1 {
	font-family: "RobotoCondensedThin";
	font-size: 4rem;
	margin: 0;
}

h2 {
	font-size: 2.5rem;
	margin: 0;
}

h3 {
	font-size: 1.75rem;
	margin: 0;
}

h4 {
	font-size: 1.2rem;
	margin: 0 0 0.5rem 0;
}

.small {
	font-size: 0.7rem;
	line-height: 1rem;
}



/* MARK: FLASH */

.flashMessage {
	padding: 2rem;
	color: black;
	border-radius: 1rem;
	text-align: center;
	font-family: "RobotoCondensedSemiBold";
	box-shadow: 2px 2px 6px var(--shadow);
}

.flashInfo {
	background-color: var(--info);
}

.flashSuccess {
	background-color: var(--success);
}

.flashError {
	background-color: var(--error);
}



/* MARK: LINKS */

a:link {
	color: inherit;
	text-decoration: none;
}

a:visited {
	color: inherit;
}

a:hover {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

a:active {
	color: inherit;
}



/* MARK: FORMS */

form {
	gap: 1.5rem;
	display: grid;
	align-items: start;
}



/* MARK: INPUTS */

input {
	border: 0;
	padding: 1rem;
	display: block;
	font-size: 1rem;
	border-radius: 1rem;
	font-family: inherit;
	color: var(--light-color);
	background-color: var(--light-background);
	box-shadow: 2px 2px 4px var(--shadow) inset;
}

::placeholder {
	font-size: 0.8rem;
}

button {
	/* color: inherit; */
	cursor: pointer;
	box-shadow: none;
	background: none;
	border: 2px solid;
	font-size: inherit;
	border-radius: 1rem;
	height: max-content;
	padding: 1rem 2rem 1rem 2rem;
	font-family: "RobotoCondensedSemiBold";
}

button:hover {
	outline: 2px solid;
	outline-offset: 2px;
	outline-color: Highlight;
  	outline-color: -webkit-focus-ring-color;
}

label {
	line-height: 1.5;
}

#processing {
	display: none;
	font-weight: bold;
	width: fit-content;
	animation-duration: 1s;
	padding: 1rem 2rem 1rem 2rem;
	border: 2px solid transparent;
	animation-direction: alternate;
	animation-name: animateProcessing;
	animation-iteration-count: infinite;
}



/* MARK: DETAILS */

details {	
	box-shadow: 2px 2px 6px var(--shadow);
	border-radius: 1rem;
}

details::details-content {
	background-color: var(--background);
	border-radius: 0 0 1rem 1rem;
}

details[open] > *:not(summary) {
	animation: animateDetails 200ms ease-in-out;
	backdrop-filter: brightness(95%);
	border-radius: inherit;
	padding: 2rem;
}

summary {
	border-radius: 1rem;
	position: relative;
	cursor: pointer;
	display: flex;
	padding: 1rem;
}

summary::before, summary::after {
	transform: translateY(-50%);
	border-bottom: 2px solid;
	top: calc(50% - 1px);
	transition: 200ms;
	position: absolute;
	right: 1.5rem;
	content: '';
	width: 1rem;
}

summary::after {
	transform: rotate(90deg);
	transform-origin: 50% 50%;
}

[open] summary::after {
	transform: rotate(0deg);
}



/* MARK: FIGURES AND IMAGES */

figure {
	margin: 0;
	padding: 0;
}

.imagelanding {
	background-image: url("/static/landing.webp");
	box-shadow: 4px 4px 12px var(--shadow);
	background-position: center bottom;
	background-repeat: no-repeat;
	background-size: cover;
	height: 90%;
	width: 100%;
	margin-bottom: 1rem;
}

.imageQrcode {
	max-width: 100%;
	border-radius: 1rem;
}



/* MARK: MEDIA QUERIES */

@media (max-width: 800px) {
	body {
		grid-template-rows: min-content min-content min-content auto min-content;
		grid-template-columns: 1fr;
		grid-template-areas:
			"nav"
			"header"
			"aside"
			"main"
			"footer";
	}

	header {
		padding: 0 2rem 0 2rem;
	}

	footer {
		flex-direction: column-reverse;
	}

	hr {
		width: 100%;
	}

}

@media (min-width: 801px) {
	body {
		grid-template-rows: min-content min-content auto min-content;
		grid-template-columns: 30% auto;
		grid-template-areas:
			"nav nav"
			"header ."
			"aside main"
			"footer footer";
	}

	aside {
		justify-self: end;
	}

	article {
		flex: 1;
	}

	button {
		width: fit-content;
	}

	hr {
		margin: 0;
	}

	.sectionAuthenticate {
		max-width: 400px;
	}

	.flashMessage {
		width: fit-content;
	}

	.imagelanding {
		border-radius: 1rem 0 0 1rem;
	}
}
