/* Scherr dich fort Unhold! */
/* Die Mediaquery sind ganz unten zu finden. */

:root {
	--primary-color: #f5a7ff;
	--text-color: #333;
	--secondary-color: #fd52ff;
}

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

html {
	scroll-behavior: smooth;
}

body {
	font-family: Verdana;
	font: 400 16px/1 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

/* Sektionen und Container */
header,
footer {
	padding: 24px;
	width: 100%;
}
section {
	padding: 48px 24px;
	width: 100%;
}
header > .container,
footer > .container,
section > .container {
	max-width: 900px;
	margin: 0 auto;
}


/* Typografie */
pre {
	--background-color: var(--primary-color);
	padding: 9px;
	background-repeat: no-repeat;
	background:
		linear-gradient(90deg, var(--background-color), var(--background-color) 3px,
				transparent 3px, transparent calc(100% - 3px),
				var(--background-color) calc(100% - 3px)),
		/*Horizontale Linien (Schwarz)*/
		linear-gradient(var(--background-color), var(--background-color) 3px,
				black 3px, black 6px,
				transparent 6px, transparent calc(24px + 6px),
				black calc(24px + 6px), black calc(24px + 9px), 
				transparent calc(24px + 9px), transparent calc(100% - 6px),
				black calc(100% - 6px), black calc(100% - 3px), 
				var(--background-color) calc(100% - 3px)),
		/*Vertikale Linien (Schwarz)*/
		linear-gradient(90deg, transparent, transparent 3px,
				black 3px, black 6px,
				transparent 6px, transparent calc(100% - 6px),
				black calc(100% - 6px), black calc(100% - 3px), 
				transparent calc(100% - 3px)),
		linear-gradient(var(--primary-color));
}

pre::before {
	content: '>_';
	font-family: monospace;
	font-size: 18px;
	font-weight: 600;
	display: block;
	width: 100%;
	height: 18px;
	line-height: .7;
}

code {
	display: block;
	overflow-x: scroll;
	padding: 1em;
}

p {
	margin-bottom: 1rem;
	line-height: 1.6;
	color: var(--text-color);
}

h1,
h2,
h3,
h4 {
	display: inline-block;
	color: color-mix(in oklch, black 30%, var(--text-color));
	font-weight: 600;
	margin-bottom: 0.75rem;
	line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

a {
	color: var(--secondary-color);
	text-decoration: none;
	touch-action: manipulation;
}

a:hover {
	text-decoration: underline;
	color: color-mix(in oklch, black 30%, var(--primary-color));
}

strong {
	color: color-mix(in oklch, black 70%, var(--text-color));
}

small {
	display: block;
	margin-top: 0.5rem;
	color: color-mix(in oklch, white 30%, var(--text-color));
	font-size: 0.85rem;
}

/* Listen-Stile */
ul,
ol {
	color: var(--text-color);
	padding-left: 1.5rem;
	line-height: 1.6;
}
:is(ul, ol):not(:last-child) {
	margin-bottom: 1rem;
}

li:not(:last-child) {
	margin-bottom: 0.5rem;
}

/* Button Stile */
.button {
	outline-offset: 6px;
	display: inline-block;
	color: black;
	background: #fff0f0;
	border: 2px solid #b18597;
	padding: 6px 24px;
	border-radius: 1em;
	font-weight: bold;
	font-size: 1.1rem;
	line-height: 1.5;
	position: relative;
	transform-style: preserve-3d;
	margin-bottom: 0.5em;
	transition: transform 150ms cubic-bezier(0, 0, 0.58, 1),
		box-shadow 150ms cubic-bezier(0, 0, 0.58, 1);	
}
.button::after {
	position: absolute;
	content: "";
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: #f9c4d2;
	border-radius: inherit;
	box-shadow: 0 0 0 2px #b18597;
	transform: translate3d(0, 0.5em, -1em);
	transition: transform 150ms cubic-bezier(0, 0, 0.58, 1),
		box-shadow 150ms cubic-bezier(0, 0, 0.58, 1);	
}
.button:hover {
	text-decoration: none;
	color: black;
	transform: translate(0, 0.25em);
}
.button:hover::after {
	transform: translate3d(0, 0.25em, -1em);
}
.button:active {
	text-decoration: none;
	transform: translate(0, 0.5em);
}
.button:active::after {
	transform: translate3d(0, 0, -1em);
}

/* Header & Branding oder Branding & Header */
.branding {
	text-align: center;
}
.branding > a > span {
	font-family: "Courier New";
	font-size: 1.2rem;
	font-weight: 600;
	color: black;
}

header {
	background: var(--primary-color);
	position: sticky;
	top: 0;
	z-index: 50;
}
header > .container {
	display: grid;
	align-items: stretch;
	grid-template-columns: 1fr;
	grid-template-rows: 1fr auto;
}

/* Footer */
footer {
    background: var(--primary-color);
    padding: 48px 24px 24px;
    text-align: center;
    color: white;
}
.footer-links {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.2s ease;
}
.footer-links a:hover {
    opacity: 0.8;
}

/* Navigation -~-
Das Burgermenü wird nur mobil und auch
nur wenn JavaScript aktiv ist angezeigt.
*/
#menu-toggle {
	display: none;
}

#menu {
	border-top: 2px var(--secondary-color) solid;
	padding-top: 24px;
	margin-top: 24px;
}

#menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

#menu ul > li:not(:last-child) {
	margin-bottom: 24px;
}

#menu a {
	width: 100%;
}

html.js #menu-toggle {
	display: block;
	width: 72px;
	height: 72px;
	position: absolute;
	top: 48px;
	right: 48px;
    	background-repeat: no-repeat;
	background: linear-gradient(black, black 20%, transparent 20%, transparent 40%, black 40%, black 60%, transparent 60%, transparent 80%, black 80%);
	/* TODO: Boah, das muss ich echt noch überarbeiten. */
}

html.js #menu-toggle[aria-expanded="true"] {
	background: linear-gradient(45deg, black, black 20%, transparent 20%, transparent 40%, black 40%, black 60%, transparent 60%, transparent 80%, black 80%);
}

html.js #menu-toggle > span {
	position: absolute;
	overflow: hidden;
	top: auto;
	left: -10000px;
	width: 1px;
	height: 1px;
}

html.js #menu {
	display: none;
}

html.js #menu.open {
	display: block;
}

/* Media Query
 - 585px: Das Mobilmenü-Toggle ist entfernt,
	die Navigation ist immer Sichtbar,
	die Menüpunkte sind nebeneinander. 
 - 900px: Die Navigation ist rechtsbündig neben dem Logo,
	das Logo hat 1/3 der Breite,
	die Navigation hat 2/3 der Breite.
*/
@media (min-width: 585px) {
        html.js #menu-toggle {
                display: none;
        }

        html.js #menu {
		display: block;
        }

	#menu ul {
		display: flex;
		flex-wrap: wrap;
		gap: 24px;
		justify-content: center;
	}

	#menu ul > li:not(:last-child) {
		margin: 0;
	}

	#menu a {
		width: unset;
	}
}

@media (min-width: 900px) {
	header > .container {
		grid-template-columns: 1fr 2fr;
		grid-template-rows: 1fr;
	}

	#menu {
		height: 100%;
		border-top: unset;
		padding-top: 0;
		margin-top: 0;
		border-left: 2px var(--secondary-color) solid;
	}

	#menu ul {
		height: 100%;
		align-items: center;
		justify-content: end;
	}
}

/* Entwickler sind wie Hunde. Gerne schnüffeln sie im Code der anderen herum. Eklig :P */
