@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Caveat&display=swap');

:root {
	--background-color: #fafafa;
	--text-color: #494440;
	--border-color: #494440;
	--clue-color: #5D89B0;
	--error-color: #FF2E00;
}

html, body {
	margin: 0;
	padding: 0;
}

html {
	background: var(--background-color);
	background-size: cover;

	font-family: 'Courier Prime', monospace;
	font-size: 1.125rem;
	color: var(--text-color);
	-webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	box-sizing: border-box;
}

.logo {
	margin: 0;
	border-bottom: 1px solid var(--border-color);
}
.logo img {
	display: block;
	height: 5em;
	width: auto;
	margin: -2.75em auto 0;
	background: var(--background-color);
}
.logo:after {
	content: '';
	display: block;
	border-bottom: 1px solid var(--border-color);
	margin: 1.25em 0 2px 0;
}

input {
	border: none;
	background: none;

	font: inherit;
	font-weight: normal;
	color: inherit;
}

input:focus {
	outline: none;
	box-shadow: none;
	background: rgba(0,0,0,0.02);
}

input[data-valid="false"]:not(:placeholder-shown) {
	color: var(--error-color);
/* 	text-decoration: line-through; */
}

button {
	display: block;
	background: var(--border-color);
	border: none;
	border-radius: 50px;
	margin: 1.75rem auto -1.4em;
	padding: 1em 2em 0.75em;
	
	font-family: 'Josefin Sans', sans-serif;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--background-color);
	
	cursor: pointer;
}
button:hover { background-color: var(--text-color); }

.content-body {
	min-width: 10em;
	margin-top: 8em;
	border: 1px solid var(--border-color);
	
	/*
	border-radius: 3px;
	background: #f6f6f6;
	box-shadow: 0px 0.8px 0.9px hsl(0deg 0% 0% / 0.1),
              0px 1.4px 1.6px -1.2px hsl(0deg 0% 0% / 0.1),
              0px 3.3px 3.7px -2.5px hsl(0deg 0% 0% / 0.1);
  */
}

.welcome-body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	
	font-size: 1em;
}

.welcome-body img {
	width: 4em;
	height: auto;
}

.welcome-body a {
	display: block;
	flex: 1 1 0;
	
	text-align: center;
	text-decoration: none;
	font-weight: bold;
	color: var(--text-color);
	
	transition: opacity 0.25s;
}

.welcome-body:hover a { opacity: 0.5; }
.welcome-body:hover a:hover { opacity: 1; }

.welcome-body a[lang="fr"] { order: -1; }

.welcome-body a[lang="fr"]:after, .welcome-body a[lang="en"]:before {
	content: '';
	display: block;
	width: 0;
	height: 1em;
	margin: 1em auto;
	border-left: 1px solid var(--border-color);
}

.cipher-body {
	max-width: 30em;
}

.cipher-instructions {
	margin: 1.75em 0 0;
	padding: 0 2em;
	font-size: 0.8em;
}

.cipher-body label {
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

.cipher-field {
	display: flex;
	flex-direction: column;
	position: relative;
	margin-top: 1.25em
}
h1 + .cipher-field {
	margin-top: 2px;
	border-top: 1px solid;
}

.cipher-field img {
	position: absolute;
	top: -0.5em;
	height: 4.5em;
	width: auto;
	border-radius: 2px;
	box-shadow: 0px 0.8px 0.9px hsl(0deg 0% 0% / 0.1),
              0px 1.4px 1.6px -1.2px hsl(0deg 0% 0% / 0.1),
              0px 3.3px 3.7px -2.5px hsl(0deg 0% 0% / 0.1);
  transform: rotate(-8deg);
}
.cipher-field:nth-child(odd) img {
	right: 100%;
	margin-right: -0.5em;
}
.cipher-field:nth-child(even) img {
	left: 100%;
	margin-left: -0.5em;
}

.cipher-field:nth-child(4) img { 
	transform: rotate(4deg); 
	height: 6em;
}
.cipher-field:nth-child(5) img { 
	margin-right: -1em;
	transform: rotate(-2deg); 
}
.cipher-field:nth-child(6) img { 
	margin-left: -1em;
	transform: rotate(-12deg); 
}
.cipher-field:nth-child(7) img { 
	height: 6em;
	transform: rotate(6deg);
}

.cipher-field-entry {
	display: flex;
	flex-direction: row;
	border-bottom: 1px solid var(--border-color);
}
.cipher-field-entry > * {
	width: 50%;
	flex: 0 0 50%;

	display: block;
	box-sizing: border-box;
	padding: 0.5em 1em 0.5em 1em;
}
.cipher-field-entry > *:first-child {
	padding-left: 2em;
}

.cipher-field-entry > label {
	border-right: 1px solid var(--border-color);
}

.cipher-field-entry > .cipher-field-coord-groups {
	padding: 0;
}

.cipher-field-coord-group {
	display: flex;
	position: relative;
	border-bottom: 1px solid var(--border-color);
}
.cipher-field-coord-group + .cipher-field-coord-group { padding-top: 1.25em; }
.cipher-field-coord-group:last-child { border-bottom: none }

.cipher-field-coord-group input {
	width: 33%;
	flex: 1 1 33%;
	padding: 0.5em 0.25em 0.5em 0;
	text-align: right;
}

.cipher-field-coord-group .cipher-unit-label,
.cipher-field-coord-group .cipher-axis-label {
	padding: 0.5em 0 0.5em 0;
	letter-spacing: 0;
}

.cipher-field-coord-group .cipher-unit-label {
	display: block;
	position: relative;
}
.cipher-field-coord-group .cipher-unit-label:after {
	content: '';
	display: block;
	height: 0.5em;
	position: absolute;
		right: 50%;
		bottom: 0;
	border-left: 1px solid var(--border-color);
}

.cipher-field-coord-group .cipher-axis-label {
	width: 3em;
	flex-shrink: 0;

	text-align: center;
}

.cipher-field-clue {
	padding: 0.75em 2em 0.5em;
	border-bottom: 1px dashed var(--border-color);
}

.cipher-field-clue summary {
	cursor: pointer;

	font-family: 'Josefin Sans', sans-serif;
	font-size: 0.556em;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}
.cipher-field-clue[open] summary {
	opacity: 0.6;
}

.cipher-field-clue p {
	margin: 0 ;
	transform: rotate(-0.5deg);

	font-family: 'Caveat', 'Courier Prime', monospace;
	font-size: 1.25em;
	color: var(--clue-color);
}

.manifesto-body {
	max-width: 40em;
}

.manifesto-text {
	padding: 3em;
	
	line-height: 1.25;
}

.manifesto-text h1 { margin-bottom: 0; }
.manifesto-text .subtitle {
	margin-top: 0;
	margin-bottom: 3em;
	font-weight: bold;
}

.manifesto-text hr {
	display: block;
	border: none;
	text-align: center;
}
.manifesto-text hr:before {
	content: '*';
	display: block;
	margin: 0 auto;
	opacity: 0.5;
}

.join-form {
	border-top: 1px solid var(--border-color);
	padding-top: 2em;
}

.join-form label {
	display: block;
/* 	border-bottom: 1px solid var(--border-color); */
	padding: 0 3em;
	font-weight: bold;
}
.join-form input {
	box-sizing: border-box;
	display: block;
	padding: 0.5em 0;
	margin: 1em 0 0;
	border-bottom: 1px dashed var(--border-color);
/* 	border-width: 0 1px; */
	width: 100%;
}

footer {
	max-width: 50em;
	margin: 8em 2em 2em;
	text-align: center;
	line-height: 1.15;
	color: var(--border-color);
}

.credits { font-size: 0.65em; }

.credits dl > * {display: inline; }

.credits dt {
	font-family: 'Josefin Sans', sans-serif;
	font-size: 0.75em;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}
.credits dd + dt:before {
	content: '/ ';
	opacity: 0.5;
}

.credits dd { 
	margin: 0;
}

@media (max-width: 37.5rem) {
	html, body { overflow-x: hidden; }

	.cipher-field-entry {
		flex-direction: column;	
	}
	.cipher-field-entry > *, .cipher-field-entry > *:first-child {
		width: 100%;
		padding-left: 3em;
		padding-right: 3em;
	}
	.cipher-field-entry > label { border-right: none; }
	.cipher-field-coord-group .cipher-axis-label { padding-right: 3em; }
	
	.cipher-field:nth-child(odd) img { margin-right: -2em; }
	.cipher-field:nth-child(even) img { margin-left: -2em; }

	.cipher-field:nth-child(4) img { margin-right: -2.5em; }
	.cipher-field:nth-child(5) img { margin-left: -2.5em; }
	
	.cipher-field-clue {
		padding-left: 3em;
		padding-right: 3em;
	}
}

@media (max-width: 35rem) {
	.content-body {
		border-left: 0;
		border-right: 0;
		margin-top: 4.25em;
	}
	
	.manifesto-text, .join-form label {
		padding-left: 2em;
		padding-right: 2em;
	}
	.manifesto-text {
		font-size: 0.85rem;
	}
	
	footer { margin-top: 4em; }
}