/*
Theme Name: DomNotes
Theme URI: https://flake.ch
Author: flake GmbH
Author URI: https://flake.ch
Description: Ein ganz weisses, reduziertes Theme für ein Kunstprojekt. Handschriftlicher Seitentitel oder Logo, Hamburger-Menü das von rechts hereingleitet, fünf Seitenvorlagen (Lesespalte, defaultkid, Vollbild, fullscreenkid, Title less) und ein zentrierter Footer-Widget-Bereich. Schriften lokal eingebunden (keine Verbindung zu Google).
Version: 0.4.3
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: domnotes
Tags: white, minimal, one-column, custom-logo, custom-menu, widgets, full-width-template
*/

/* ---------- Schriften (lokal, DSGVO/DSG-freundlich) ---------- */
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Inter";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/inter-latin-400-italic.woff2") format("woff2");
}
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("assets/fonts/inter-latin-700-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Gochi Hand";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/gochi-hand-latin-400-normal.woff2") format("woff2");
}

/* ---------- Variablen ---------- */
:root {
	--domnotes-bg: #ffffff;
	--domnotes-text: #1a1a1a;
	--domnotes-muted: #6b6b6b;
	--domnotes-line: #e8e8e8;
	--domnotes-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--domnotes-font-hand: "Gochi Hand", "Comic Neue", "Comic Sans MS", cursive;
	--domnotes-header-h: 80px;
	--domnotes-gutter: 20px;                              /* Abstand links: Websitetitel/Logo = Vollbild-Inhalt */
	--domnotes-menu-size: 1.375rem;                       /* 22px – Schrift im Menü */
	--domnotes-h1: 2.25rem;                               /* 36px */
	--domnotes-title-size: calc(var(--domnotes-h1) * 1.22); /* Websitetitel immer etwas grösser als H1 (≈44px) */
	--domnotes-hand-offset: calc(var(--domnotes-h1) * 0.07); /* gleicht den Weissraum links in Inter aus, damit Titel und H1 exakt bündig stehen */
	--domnotes-read-w: 680px;
	--domnotes-speed: 0.35s;
}

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

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

body {
	margin: 0;
	background: var(--domnotes-bg);
	color: var(--domnotes-text);
	font-family: var(--domnotes-font);
	font-size: 1.125rem; /* 18px */
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

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

img,
video,
iframe,
svg {
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}
a:hover {
	text-decoration-thickness: 2px;
}
:focus-visible {
	outline: 2px solid var(--domnotes-text);
	outline-offset: 3px;
}

/* ---------- Typografie (gängige Standardgrössen) ---------- */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--domnotes-font);
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.01em;
	margin: 2em 0 0.6em;
}
h1 { font-size: var(--domnotes-h1); letter-spacing: -0.02em; } /* 36px */
h2 { font-size: 2rem; }      /* 32px */
h3 { font-size: 1.5rem; }    /* 24px */
h4 { font-size: 1.25rem; }   /* 20px */
h5 { font-size: 1.125rem; }  /* 18px */
h6 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; }

p, ul, ol, blockquote, figure, pre, table {
	margin: 0 0 1.25em;
}

small, .has-small-font-size { font-size: 0.875rem; }

blockquote {
	border-left: 2px solid var(--domnotes-text);
	padding-left: 1.25em;
	font-style: italic;
}

hr {
	border: 0;
	border-top: 1px solid var(--domnotes-line);
	margin: 3em 0;
}

figcaption,
.wp-element-caption {
	font-size: 0.875rem;
	color: var(--domnotes-muted);
	margin-top: 0.5em;
}

/* ---------- Header ---------- */
.site-header {
	position: relative;
	z-index: 100;
	width: 100%;
	height: var(--domnotes-header-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--domnotes-bg);
}

.site-branding {
	margin-left: var(--domnotes-gutter);
	display: flex;
	align-items: center;
	height: 100%;
	min-width: 0;
	max-width: calc(100% - var(--domnotes-gutter) - 80px);
}

.site-title {
	margin: 0 0 0 var(--domnotes-hand-offset);
	font-family: var(--domnotes-font-hand);
	font-size: var(--domnotes-title-size);
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}
.site-title a {
	text-decoration: none;
}

/* Logo statt Titel */
.custom-logo-link {
	display: flex;
	align-items: center;
	height: 100%;
}
.custom-logo {
	display: block;
	width: auto;
	height: auto;
	max-height: 50px;
	max-width: 100%;
}

/* ---------- Hamburger ---------- */
.menu-toggle {
	position: fixed;
	top: calc((var(--domnotes-header-h) - 40px) / 2); /* in der Header-Höhe zentriert */
	right: 20px;
	z-index: 300;
	width: 40px;
	height: 40px;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	color: var(--domnotes-text);
}
.admin-bar .menu-toggle {
	top: calc(32px + (var(--domnotes-header-h) - 40px) / 2);
}
@media (max-width: 782px) {
	.admin-bar .menu-toggle {
		top: calc(46px + (var(--domnotes-header-h) - 40px) / 2);
	}
}

.menu-toggle__bar {
	position: absolute;
	left: 4px;
	width: 32px;
	height: 3px;
	border-radius: 2px;
	background: currentColor;
	transition: transform var(--domnotes-speed) ease, opacity 0.2s ease, top var(--domnotes-speed) ease;
}
.menu-toggle__bar:nth-child(1) { top: 9px; }
.menu-toggle__bar:nth-child(2) { top: 18.5px; }
.menu-toggle__bar:nth-child(3) { top: 28px; }

.menu-open .menu-toggle__bar:nth-child(1) { top: 18.5px; transform: rotate(45deg); }
.menu-open .menu-toggle__bar:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle__bar:nth-child(3) { top: 18.5px; transform: rotate(-45deg); }

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Slide-in-Menü (nur so gross wie sein Inhalt) ---------- */
.main-navigation {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 200;
	width: max-content;
	max-width: calc(100vw - 40px);
	max-height: 100vh;
	overflow-y: auto;
	padding: calc(var(--domnotes-header-h) + 10px) 40px 40px 40px;
	background: var(--domnotes-bg);
	box-shadow: 0 0 40px rgba(0, 0, 0, 0.06);
	transform: translateX(100%);
	visibility: hidden;
	transition: transform var(--domnotes-speed) ease, visibility 0s linear var(--domnotes-speed);
}
.admin-bar .main-navigation {
	top: 32px;
	max-height: calc(100vh - 32px);
}
@media (max-width: 782px) {
	.admin-bar .main-navigation {
		top: 46px;
		max-height: calc(100vh - 46px);
	}
}
.menu-open .main-navigation {
	transform: translateX(0);
	visibility: visible;
	transition: transform var(--domnotes-speed) ease, visibility 0s;
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.main-navigation li {
	margin: 0;
}
.main-navigation a {
	display: block;
	padding: 0.35em 0;
	font-size: var(--domnotes-menu-size);
	font-weight: 400;
	text-decoration: none;
	white-space: nowrap;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.25em;
}
.main-navigation .sub-menu,
.main-navigation .children {
	padding-left: 1em;
}
.main-navigation .sub-menu a,
.main-navigation .children a {
	font-size: 1.0625rem;
	color: var(--domnotes-muted);
}

.menu-backdrop {
	position: fixed;
	inset: 0;
	z-index: 150;
	background: transparent;
	display: none;
}
.menu-open .menu-backdrop {
	display: block;
}

@media (prefers-reduced-motion: reduce) {
	.main-navigation,
	.menu-toggle__bar {
		transition: none !important;
	}
}

/* ---------- Inhalt: Standardvorlage (Lesespalte) ---------- */
.content-default {
	max-width: var(--domnotes-read-w);
	margin: 0 auto;
	padding: 40px 20px 0;
}

/* ---------- Inhalt: defaultkid / fullscreenkid (Headings in Handschrift) ---------- */
.content-kid h1,
.content-kid h2,
.content-kid h3,
.content-kid h4,
.content-kid h5,
.content-kid h6 {
	font-family: var(--domnotes-font-hand);
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.15;
	padding-left: calc(var(--domnotes-hand-offset) * 2); /* optisch bündig mit Websitetitel und Laufschrift */
}
.content-kid h6 {
	text-transform: none;
}

/* ---------- Inhalt: Vollbild (20px links/rechts) ---------- */
.content-fullscreen {
	width: 100%;
	padding: 20px var(--domnotes-gutter) 0;
}

.entry-header .entry-title {
	margin-top: 0;
}
.entry-content > *:first-child {
	margin-top: 0;
}
.entry-content > *:last-child {
	margin-bottom: 0;
}
.entry-meta {
	font-size: 0.875rem;
	color: var(--domnotes-muted);
	margin: -0.25em 0 1.5em;
}

/* Gutenberg-Ausrichtungen in der Lesespalte */
.content-default .alignwide {
	width: min(1100px, calc(100vw - 40px));
	max-width: none;
	margin-left: 50%;
	transform: translateX(-50%);
}
.content-default .alignfull {
	width: 100vw;
	max-width: none;
	margin-left: 50%;
	transform: translateX(-50%);
}
.content-fullscreen .alignfull {
	margin-left: calc(-1 * var(--domnotes-gutter));
	margin-right: calc(-1 * var(--domnotes-gutter));
	width: calc(100% + 2 * var(--domnotes-gutter));
	max-width: none;
}
.alignleft { float: left; margin: 0.3em 1.5em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

/* Beitragsliste */
.post-list article + article {
	margin-top: 3.5em;
	padding-top: 3.5em;
	border-top: 1px solid var(--domnotes-line);
}
.post-list .entry-title {
	font-size: 2rem;
}
.post-list .entry-title a {
	text-decoration: none;
}
.pagination,
.nav-links {
	display: flex;
	justify-content: space-between;
	gap: 1em;
	margin-top: 3em;
	font-size: 1rem;
}

/* ---------- Footer ---------- */
.site-footer {
	width: 100%;
	margin-top: 50px;
	padding: 30px 20px;
	text-align: center;
	font-size: 0.875rem;
	color: var(--domnotes-muted);
}
.site-footer .widget {
	margin: 0 auto;
}
.site-footer .widget + .widget {
	margin-top: 1em;
}
.site-footer p:last-child {
	margin-bottom: 0;
}
.site-footer .widget-title {
	font-size: 1rem;
	margin: 0 0 0.5em;
	color: var(--domnotes-text);
}

/* ---------- Mobil ---------- */
@media (max-width: 600px) {
	:root {
		--domnotes-h1: 1.875rem; /* 30px – Titel wird automatisch ≈37px */
	}
	h2 { font-size: 1.625rem; }
	h3 { font-size: 1.3125rem; }
	.custom-logo {
		max-height: 44px;
	}
	body { font-size: 1.0625rem; }
	.main-navigation {
		padding-left: 30px;
		padding-right: 30px;
	}
}
