/*!
Theme Name: Funkologie
Theme URI: http://maillard.dev/themes/funkologie.html
Author: Michel Maillard
Author URI: http://maillard.dev/
Description: Description
Version: 1.0.0
Tested up to: 6.6
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: funkologie
Tags: custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.

*/

:root {
	color-scheme: light dark;
	/* Color Variables */
	--accent-color: #e26d5c;
	--text-color: #101720;
	--decent-color: #777;
	--light-color: #d0d0d0;
	--neutral-color: #fff;
	--background-color: var(--neutral-color);
	--hover-bg-color: var(--accent-color);
	--menu-background-color: #212427;

	/* Size Variables */
	--font-default: 1rem;
	--font-size: clamp(1.055rem, 0.95rem + 0.52vw, 1.35rem);
	--font-small: clamp(0.833125rem, 0.79rem + 0.19vw, 0.9375rem);
	--font-medium: clamp(1.501875rem, 1.2rem + 1.48vw, 2.3325rem);
	--font-large: clamp(1.689375rem, 1.28rem + 1.97vw, 2.799375rem);
	--line-height: 1.5;
	--line-height-calc: calc(1em + 0.5rem);
	--row: clamp(1rem, 6vw, 3rem);
	--content-width: min(80ch, 100% - var(--row) * 2);
	--full-width: min(1280px, 100% - var(--row) * 2);
	--content-top-padding: 80px;
	--aside-padding: 32px 2.5rem 2.5rem;
	--aside-max-width: 320px;
	--negative-margin: 90px;
	--small-radius: 3px;

	/* Font Variables */
	--font-family:
		"Montserrat",
		avenirnext,
		avenir,
		-apple-system,
		blinkmacsystemfont,
		roboto slab,
		"Droid Serif",
		"Segoe UI",
		"Oxygen-Sans",
		"Ubuntu",
		cantarell,
		georgia,
		serif;
	--font-weight-normal: 400;
	--font-weight-bold: 700;

	/* Transition Variables */
	--transition-duration: 0.2s;
	--transition-ease: ease;

	/* Hamburger Variables */
	--hamburger-stroke-height: 4;
	--hamburger-transition:
		stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1),
		stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

* {
	line-height: var(--line-height);
	line-height: var(--line-height-calc);
}

html,
body {
	height: 100%;
}

html {
	-webkit-text-size-adjust: none;
	font-weight: var(--font-weight-normal);
	scrollbar-color: var(--accent-color) #0000;
}

body {
	background-color: light-dark(var(--neutral-color), var(--text-color));
	color: light-dark(var(--text-color), var(--neutral-color));
	font-family: var(--font-family);
	font-size: var(--font-size);
	-webkit-font-smoothing: antialiased;
	font-weight: var(--font-weight-normal);
	margin: 0;
	overflow-y: scroll;
	overflow-x: hidden;
}

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

p:empty {
	margin: 0;
}

/*
.button:hover {
	filter: brightness(90%);
}

.button:active {
	transform: scale(99%);
}
*/

:is(h1,h2,h3) {
	margin-block-end: 0;
}

a:not(.post-thumbnail) {
	color: var(--accent-color);
	text-decoration: none;
	&:hover {
		filter: brightness(90%);
	}
}

main {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

header,
footer {
	flex-shrink: 0;
}

footer {
	/* margin-block-start: 4rem;*/
	/* border-top: 1px solid var(--light-color);*/
	
	.footer-info {
		padding-block: 4rem;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 1rem;
	}
}

.footer-tagline {
	text-align: center;
	text-wrap: balance;
}

.footer-social-links {
	font-weight: var(--font-weight-normal);
	display: flex;
	justify-content: center;
	column-gap: 1.5ch;
	flex-wrap: wrap;
}

.footer-copyright,
.footer-social {
	margin-block-start: 1rem;
	text-align: center;
	font-weight: var(--font-weight-bold);
}

@media (width < 48rem) {
	#site-navigation {
		display: none;
	}

	.mobile-hide {
		border: 0;
		clip: rect(0 0 0 0);
		height: 0;
		margin: 0;
		overflow: hidden;
		padding: 0;
		position: absolute;
		width: 1px;
		white-space: nowrap;
	}
}

/* Content Layout */
.theme-wrapper {
	position: relative;
	transform: translate(0, 0);
	transition: transform var(--transition-duration) var(--transition-ease);
	min-height: 100vh;
	z-index: 2;
}

.content {
	position: relative;
	margin-inline: auto;
	width: var(--full-width);
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.slide-left {
	transform: translate(calc(-1 * var(--aside-max-width)), 0);
}

.custom-logo-link {
	margin-inline: auto;
	max-width: 240px;
	@media (width > 48rem) {
		max-width: 320px;
	}
	/* TODO Make it just for me */
	@media (prefers-color-scheme: dark) {
		filter:  brightness(0) invert(1);
	}
}

/* Hamburger Menu */
.hamburger-menu {
	color: inherit;
	font-size: var(--font-default);
	display: flex;
	align-items: center;
	cursor: pointer;
	padding: 2rem 0;
	gap: 0.25rem;
	position: absolute;
	top: 0;
	right: 0;
	background-color: transparent;
	border: none;
	outline: none;

	.line {
		fill: none;
		stroke: light-dark(var(--text-color), var(--neutral-color));
		transition: var(--hamburger-transition);
		stroke-width: var(--hamburger-stroke-height);

		&.line1 {
			stroke-dasharray: 20 207;
		}

		&.line2 {
			stroke-dasharray: 40 60;
		}

		&.line3 {
			stroke-dasharray: 60 207;
		}
	}

	&.opened {

		.line1 {
			stroke-dasharray: 90 207;
			stroke-dashoffset: -134;
		}

		.line2 {
			stroke-dasharray: 1 60;
			stroke-dashoffset: -30;
		}

		.line3 {
			stroke-dasharray: 90 207;
			stroke-dashoffset: -134;
		}
	}
}

.hamburger-menu__aside {
	padding: 0;
	position: relative;
	justify-content: flex-end;
}

/* Navigation Separators */
.nav-sep {
	display: inline-block;
	font-weight: var(--font-weight-normal);
	padding: 0 6px;
}

.mobile-hide {
	display: none;

	@media (width > 48rem) {
		display: block;
	}
}

.page-title {
	text-wrap: balance;
	font-size: var(--font-medium);
	margin: 0;
	text-align: center;
	color: inherit;
	text-decoration: none;
}

.site-header {	
	padding-block-start: var(--content-top-padding);
	padding-block-end: 36px;
	@media (width > 48rem) {
		padding-block-end: var(--content-top-padding);
	}
}

.site-navigation {
	margin-block: 1rem;
}

#primary-menu {
	list-style: none;
	margin: 0 auto;
	padding: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	flex-wrap: wrap;
	text-transform: uppercase;
	font-weight: var(--font-weight-bold);
	font-size: var(--font-default);

	@media (width > 48rem) {
		flex-direction: row;
		li ~ li::before {
			content: '-';
			padding-inline: 0.35rem;
		}
	}

	a {
		color: light-dark(var(--text-color), var(--neutral-color));
		&:hover {
			color: var(--accent-color);
			filter: brightness(90%);
		}
	}
}

.site-description {
	margin-block-start: 1rem;
	margin-block-end: 0;
	text-align: center;
	font-size: 0.85rem;
	font-weight: var(--font-weight-normal);
	color: light-dark(var(--decent-color), var(--light-color));
	text-transform: uppercase;
}

/* :is(.post-container, .posts-navigation),*/
:is(.post-container) {
	position: relative;
	margin-inline: auto;
	display: flex;
	flex-direction: column;

	@media (width > 48rem) {
		width: var(--content-width);
		padding: 0 3rem;
	}

	@media (width > 64rem) {
		padding: 0 4rem;
	}
}

.post-container {
	z-index: 1;

	.entry-title {
		text-wrap: balance;
		font-size: var(--font-large);
		margin: 0;
		text-transform: uppercase;
		text-align: center;
		color: inherit;
		text-decoration: none;

		a {
			color: light-dark(var(--text-color), var(--neutral-color));
			text-decoration: none;
			&:hover {
				color: var(--accent-color);
				filter: brightness(90%);
			}
		}
	}

	.archive-title {
		font-size: var(--font-medium);
	}
}

.post-thumb {
	@media (width > 48rem) {
		min-height: var(--negative-margin);
		display:block;
	}
}

/* Entry Meta */
.entry-meta {
	background-color: light-dark(var(--neutral-color), var(--text-color));
	text-transform: uppercase;
	width: 100%;
	padding-block-start: 1.5rem;
	padding-block-end: 1rem;
	padding-inline: 0.75rem;

	ul,
	li {
		padding: 0;
		list-style: none;
		display: flex;
		color: light-dark(var(--decent-color), var(--light-color));
		font-size: var(--font-small);
		justify-content: center;

		a {
			color: light-dark(var(--decent-color), var(--light-color));
			text-decoration: none;
			&:hover {
				filter: brightness(90%);
			}
			
			&:active {
				transform: scale(99%);
			}
		}
	}


	@media (width > 80rem) {
		padding-block-start: 2rem;
		padding-block-end: 1rem;
		padding-inline: 2rem;
	}
}

.site-search :is(.entry-meta, .post) {
	margin-top: 0;
	padding-bottom: 0;
}


.entry-meta-after {
	margin-block: 0;
	color: light-dark(var(--decent-color), var(--light-color));
	list-style: none;
	padding: 0;
	margin-block: 1rem;
	margin-inline: 0;
	font-size: 1.15rem;
	gap: 0.5ch;
}

.edit-link,
.entry-meta-after__item {
	display: flex;
	gap: 0.5ch;
	align-items: center;
	text-decoration: none;

	a {
		color: light-dark(var(--decent-color), var(--light-color));
		&:hover {
			color: var(--accent-color);
			filter: brightness(90%);
		}
	}
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 2rem;
}

.nav-previous a,
.nav-next a {
	display: flex;
	gap: 1ch;
}

.nav-previous a::before {
	content: "← ";
}

.nav-next a::after {
	content: " →";
}

:is(.posts-navigation, .post-navigation) {
	width: var(--content-width);
	margin-inline: auto;

	&::before,
	&::after {
		display: block;
		margin-block: 1.5rem;
		content:'';
		background-color: transparent !important;
		background-image: linear-gradient( -45deg, var(--light-color) 25%, transparent 25%, transparent 50%, var(--light-color) 50%, var(--light-color) 75%, transparent 75%, transparent );
		background-size: 3px 3px;
		border: none;
		height: 10px !important;
		width: 100%;
	}
}

/* Negative Logic & Cosmetics */
.post {
	@media (width > 48rem) {
		padding-bottom: calc(var(--negative-margin) / 2);
	}
}

.site-main {
	@media (width > 48rem) {
		.entry-meta{
			margin-top: calc(-1 * var(--negative-margin));
			width: var(--content-width);
		}
	}	
}

.single-page .post {
	padding-bottom: 0;
}


/* Widget */
.widget {
	ul {
		margin: 0;
		padding: 0;
		list-style: none;
	}

	li {
		font-size: var(--font-default);
		margin-bottom: 0.375rem;
	}

	a {
		font-size: inherit;
	}

	p {
		margin: 0;
	}
}

/* Aside Menu */
.aside-menu {
	z-index: 3;
	font-size: var(--font-default);
	margin: 0;
	height: 100%;
	overflow-y: auto;
	position: fixed;
	right: 0;
	top: 0;
	width: 100%;
	padding: var(--aside-padding);
	max-width: var(--aside-max-width);
	background-color: var(--menu-background-color);
	color: var(--neutral-color);
	transition: right var(--transition-duration) var(--transition-ease);
	display: grid;
	gap: 2rem;
	align-content: flex-start;
	opacity: 0;

	.wp-block-search__button {
		border: 0;
		clip: rect(0 0 0 0);
		height: 0;
		margin: 0;
		overflow: hidden;
		padding: 0;
		position: absolute;
		width: 1px;
		white-space: nowrap;
	}

	.line {
		stroke: var(--neutral-color);
	}

	.menu {
		color: var(--neutral-color);
	}

	.widget-title,
	.wp-block-heading,
	.wp-block-search__label {
		font-weight: var(--font-weight-bold);
		text-transform: uppercase;
		font-size: var(--font-small);
		margin-bottom: 0.5rem;
	}

	&.open {
		opacity: 1;
	}

	.aside-primary-menu {
		display: none;
		@media (width < 48rem) {
			display: block;
		}
	}

	.widget {

		a {
			color: var(--neutral-color);
			&:hover {
				filter: brightness(90%);
			}
			
			&:active {
				transform: scale(99%);
			}
		}
	
		p {
			color: var(--neutral-color);
		}
	}
}

.admin-bar .aside-menu {
	padding-top: 77px;
	@media (width > 48rem) {
		padding-top: 64px;
	}
	
}

/* Tag Cloud */
.tagcloud {
	display: flex;
	flex-wrap: wrap;
	gap: 0.188rem;

	a {
		margin: 0;
		font-weight: var(--font-weight-bold);
		font-size: 0.75rem !important;
		line-height: normal;
		color: var(--neutral-color);
		background-color: var(--accent-color);
		border-radius: var(--small-radius);
		display: inline-flex;
		padding: 9px 11px;
		text-transform: uppercase;
		cursor: pointer;
		text-align: center;
		text-decoration: none;

		&:hover {
			filter: brightness(90%);
		}

		&:active {
			transform: scale(99%);
		}
	}
}

/* inputs */
:focus-visible {
    /* outline: 2px solid var(--focus-color, currentColor);*/
    outline-offset: var(--focus-offset, 0.2lh);

	outline: 1px dotted var(--focus-color, var(--decent-color));
}

button {
	font-family: var(--font-family);
	font-weight: var(--font-weight-bold);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="week"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="color"],
textarea {
	appearance: none;
	font-family: var(--font-family);
	color: var(--text-color);
	background-color: var(--neutral-color);
	border-radius: 3px;
	border-style: solid;
	border-width: 0.1rem;
	border-color: var(--light-color);
	box-shadow: none;
	display: block;
	font-size: var(--font-default);
	line-height: normal;
	margin: 0;
	max-width: 100%;
	padding: 0.5rem;
	width: 100%;
}

input[type="number"] {
	padding-right: 0.5rem;
}

select {
	font-size: var(--font-size);
}

textarea {
	height: 12rem;
	line-height: 1.5;
	width: 100%;
}

input::-webkit-input-placeholder {
	line-height: normal;
}

input:-ms-input-placeholder {
	line-height: normal;
}

input::-moz-placeholder {
	line-height: revert; /* Reset to the value from the user-agent stylesheet. */
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
	display: none;
}

input[type="button"],
input[type="reset"],
input[type="submit"] {
	appearance: none;
	border: none;
	cursor: pointer;
	display: inline-block;
	margin: 0;
	opacity: 1;
	text-align: center;
	text-decoration: none;
	transition: opacity 0.15s linear;
}

:disabled {
	filter: grayscale(100%);
}

/* More Link */
.cta-button {
	display: flex;
	justify-content: center;

	@media (prefers-reduced-motion: no-preference) {
		@supports (animation-timeline: view()) {
			animation: slide-fade-in both;
			animation-timeline: view();
			animation-range: 0 50vh;
		}
	}
}

.cta-button a,
input[type="submit"],
input[type="button"] {
	background-color: var(--accent-color);
	border: none;
	border-radius: var(--small-radius);
	color: var(--neutral-color);
	cursor: pointer;
	display: inline-block;
	font-weight: var(--font-weight-bold);
	font-size: var(--font-size);
	outline: 0;
	padding: 0.75rem 1.25rem;
	text-align: center;
	text-decoration: none;

	&:hover {
		text-decoration: none;
		filter: brightness(90%);
	}
	
	&:active {
		text-decoration: none;
		transform: scale(99%);
	}
}

/*
.wp-block-button .wp-block-button__link:focus,
.wp-block-button .wp-block-button__link:hover,
.wp-block-file .wp-block-file__button:focus,
.wp-block-file .wp-block-file__button:hover,
input[type="button"]:focus,
input[type="button"]:hover,
input[type="reset"]:focus,
input[type="reset"]:hover,
input[type="submit"]:focus,
input[type="submit"]:hover {
	text-decoration: underline;
}
*/

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="range"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
input[type="time"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="color"]:focus,
textarea:focus {
	border-color: currentColor;
}

input[type="search"]:focus {
	outline: thin dotted;
	outline-offset: -4px;
}

.searchform {
	margin-top: 2rem;
	input {
		color: var(--decent-color);
		text-align: center;
		font-size: var(--font-medium);
		border: none;
		border-radius: 0;
		border-bottom: 1px solid var(--light-color);
		&:focus {
			color: var(--text-color);
		}
		&:focus-visible {
			outline: 1px dotted var(--focus-color, var(--decent-color));
		}
	}
}

@keyframes slide-fade-in {

	from {
		opacity: 0;
		box-shadow: none;
		transform: scale(0.8) translateY(10vh);
	}
}

/* helper */
.text-center {
	text-align: center;
	text-wrap: balance;
}


.visually-hidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 0;
    margin: 0;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    white-space: nowrap;
}

.icon {
	width: 24px;
	height: 1lh;
}


/* Theme Support */
.theme-luther {
	/* Color Variables */
	--accent-color: #725160;
	--text-color: #191919;
	--neutral-color: #e4e4de;
	--background-color: var(--neutral-color);
	--hover-bg-color: var(--accent-color);
}

.theme-wilson {
	/* Color Variables */
	--accent-color: #0086b2;
	--text-color: #11181C;
	--neutral-color: #f5f3f4;
	--background-color: var(--neutral-color);
	--hover-bg-color: var(--accent-color);
}

/* Block Pattern */
.wp-post-image {
	aspect-ratio: 1280/850;
	color: var(--light-color);
}
.wp-block-heading + .wp-block-columns  {
	margin-top: 3rem;
}