/*
Theme Name: Corandus Books
Description: Block-Theme für den Verlag Corandus Books.
Version: 0.4.0
Requires at least: 6.5
Requires PHP: 8.1
Author: Corandus Books
Text Domain: corandus-books
License: GPL-2.0-or-later
*/

/* Grundlagen */

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	overflow-wrap: break-word;
}

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

:focus-visible {
	outline: 2px solid var(--wp--preset--color--ink);
	outline-offset: 2px;
}

.cb-mono {
	font-family: var(--wp--preset--font-family--roboto-mono);
	font-weight: 500;
}

/* Seitengerüst: Balken oben, Inhaltsbreite, Seitenrand */

.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.wp-site-blocks > * {
	margin-block-start: 0;
}

.wp-site-blocks > main {
	flex: 1 0 auto;
}

.cb-bar {
	height: 6px;
	background: var(--wp--preset--color--iceblue);
}

.cb-wrap {
	box-sizing: border-box;
	width: 100%;
	max-width: 1280px;
	margin-inline: auto;
	padding-inline: clamp(16px, 4vw, 40px);
}

/* Header */

.cb-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 4px 40px;
	padding: 20px 0;
	border-bottom: 1px solid var(--wp--preset--color--ink);
}

.cb-brand {
	display: inline-flex;
	align-items: baseline;
	gap: 10px;
	padding: 9px 0;
	text-decoration: none;
}

.cb-brand img {
	display: block;
	height: 26px;
	width: auto;
}

.cb-brand span {
	font-family: var(--wp--preset--font-family--roboto-mono);
	font-weight: 500;
	font-size: 13px;
	line-height: 1;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.cb-header__nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 40px;
}

.cb-menu,
.cb-footer__menu {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cb-menu {
	gap: 0 32px;
	font-size: 16px;
}

.cb-menu a {
	display: inline-block;
	padding: 10px 0;
	text-decoration: none;
}

.cb-menu a[aria-current],
.cb-menu .current-menu-item > a,
.cb-menu .current-menu-ancestor > a {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--iceblue);
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
}

.cb-lang {
	display: flex;
	align-items: center;
	gap: 2px;
	font-family: var(--wp--preset--font-family--roboto-mono);
	font-weight: 500;
	font-size: 14px;
}

.cb-lang a,
.cb-lang .cb-lang__off {
	display: inline-block;
	min-width: 44px;
	padding: 12px 0;
	text-align: center;
	text-decoration: none;
	color: var(--wp--preset--color--slate);
}

.cb-lang a:hover {
	color: var(--wp--preset--color--link-hover);
}

.cb-lang a[aria-current] {
	color: var(--wp--preset--color--ink);
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--iceblue);
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
}

.cb-lang__sep {
	color: var(--wp--preset--color--slate);
}

/* Inhaltsbereich */

.cb-main {
	padding-top: 56px;
	padding-bottom: 96px;
}

.cb-main--tight {
	padding-top: 28px;
}

.cb-page-title {
	margin: 0 0 36px;
}

.cb-page-title--list {
	margin-bottom: 32px;
}

.cb-prose {
	max-width: 64ch;
	font-size: 19px;
	line-height: 1.55;
}

.cb-prose > * {
	margin-block: 0;
}

.cb-prose > * + * {
	margin-block-start: 20px;
}

.cb-prose > h2:not(:first-child),
.cb-prose > h3:not(:first-child) {
	margin-block-start: 40px;
}

.cb-prose h2 {
	font-size: 24px;
	line-height: 1.2;
}

.cb-prose ul,
.cb-prose ol {
	padding-left: 1.2em;
}

/* Breite Seiten (Kontakt, Widerruf): Inhalt ohne Textspalten-Begrenzung */

.cb-content > * {
	margin-block: 0;
}

.cb-content > * + * {
	margin-block-start: 20px;
}

/* Kontakt: Anschrift links, Formular rechts, auf dem Telefon untereinander */

.cb-split {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 40px 64px;
}

.cb-split__aside {
	flex: 1 1 260px;
	min-width: 0;
	max-width: 420px;
}

.cb-split__aside > * {
	margin-block: 0;
}

.cb-split__aside > * + * {
	margin-block-start: 12px;
}

/* Widerruf: Freitext und Formular untereinander, max. 720 px */

.cb-stack {
	display: flex;
	flex-direction: column;
	gap: 56px;
	max-width: 720px;
}

.cb-stack > * {
	margin-block: 0;
}

.cb-stack .cb-prose h2 {
	font-size: 30px;
	line-height: 1.15;
}

/* Footer */

.cb-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 4px 40px;
	padding: 20px 0 36px;
	border-top: 1px solid var(--wp--preset--color--ink);
	font-size: 15px;
}

.cb-footer__menu {
	gap: 0 28px;
}

.cb-footer__menu a {
	display: inline-block;
	padding: 11px 0;
	text-decoration: none;
}

.cb-footer__menu a[aria-current],
.cb-footer__menu .current-menu-item > a {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--iceblue);
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
}
