/*
 * beratungspraxis-oldenburg.de -- plain CSS, no build step.
 *
 * Colours, fonts and spacing live in the :root block below. Everything else
 * derives from those variables, so changing --accent recolours buttons,
 * links, list markers, hover states and tints in one go.
 *
 * The Caddyfile sends a strict Content-Security-Policy, and collectstatic
 * would try to rewrite any file reference in here:
 *   - this file must not load anything (no url-functions, imports, font-face)
 *   - no style="" or <style> in the HTML; add a class here instead
 *
 * The favicons (favicon.svg/.ico, apple-touch-icon.png) have the accent
 * baked in and do not follow a change here.
 */

:root {
	/* Palette: warm -- cream, berry, dark brown */
	--bg: #fbf7f1; /* page background */
	--surface: #fffdf9; /* cards */
	--surface-alt: #f3e9dc; /* every other section */
	--text: #33261e; /* text, headings, footer background */
	--text-muted: #6b5646;
	--accent: #8e3a59; /* links, buttons, markers */
	/* Alternative accents on the same cream (fallbacks below: strong / soft):
	   terracotta #a4482a (#80371f / #f5e8e0), sage #4f6b45 (#3e5336 / #eaebe3),
	   ochre #8a5a12 (#6c460e / #f1e9dd) */
	--on-accent: #fff; /* text on --accent */

	/* Alternative: blue, taken from the old site (www.beratungspraxis-oldenburg.de).
	   Paste over the block above; also swap the favicons and theme-color.
	--bg: #f7f9fb;
	--surface: #fff;
	--surface-alt: #e6eef5;
	--text: #1f2a33;
	--text-muted: #4f5e6a;
	--accent: #176f9b;
	--on-accent: #fff;
	*/

	/* WCAG AA: --text-muted and --accent reach at least 4.5:1 on --bg,
	   --surface and --surface-alt, --on-accent at least 4.5:1 on --accent.
	   Re-check contrast after changing any of them. */

	/* Derived -- follow the palette */
	--accent-strong: color-mix(in oklab, var(--accent) 78%, black);
	--accent-soft: color-mix(in oklab, var(--accent) 12%, var(--surface));
	--border: color-mix(in oklab, var(--text) 14%, transparent);
	--shadow:
		0 1px 2px color-mix(in oklab, var(--text) 6%, transparent),
		0 12px 32px -16px color-mix(in oklab, var(--text) 24%, transparent);

	/* Type: system fonts only, nothing is downloaded */
	--font-body:
		system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial,
		sans-serif;
	--font-heading:
		Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, "Noto Serif", serif;

	/* Layout */
	--container: 70rem;
	--measure: 42rem;
	--gutter: clamp(1rem, 4vw, 2rem);
	--radius: 1rem;
	--section-space: clamp(3.5rem, 8vw, 6rem);
}

/* Browsers without color-mix() (before 2023): fixed values for the warm palette */
@supports not (color: color-mix(in oklab, red, red)) {
	:root {
		--accent-strong: #6f2d45;
		--accent-soft: #f1e6e6;
		--border: rgb(51 38 30 / 0.14);
		--shadow: 0 12px 32px -16px rgb(51 38 30 / 0.24);
	}
}

/* ------------------------------------------------------------------ base */

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

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

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* Column layout keeps the footer at the bottom on short pages */
body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
	line-height: 1.65;
}

main {
	flex: 1;
}

img,
svg {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

h1,
h2,
h3 {
	margin: 0 0 0.5em;
	color: var(--text);
	font-family: var(--font-heading);
	font-weight: 400;
	line-height: 1.2;
	text-wrap: balance;
}

h1 {
	font-size: clamp(2.25rem, 1.6rem + 3vw, 3.75rem);
	letter-spacing: -0.01em;
}

h2 {
	font-size: clamp(1.75rem, 1.45rem + 1.4vw, 2.5rem);
}

h3 {
	font-size: 1.25rem;
	font-weight: 700;
}

p,
ul,
address {
	margin: 0 0 1em;
}

p,
li {
	text-wrap: pretty;
}

/* Long German compounds overflow narrow screens; wider ones do without */
@media (max-width: 40rem) {
	h1,
	h2,
	h3,
	p,
	li {
		-webkit-hyphens: auto;
		hyphens: auto;
		hyphenate-limit-chars: 10 4 4;
		overflow-wrap: break-word;
	}
}

address {
	font-style: normal;
}

a {
	color: var(--accent);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

a:hover {
	color: var(--accent-strong);
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 3px;
	border-radius: 2px;
}

[id] {
	scroll-margin-top: 1.5rem;
}

.container {
	width: min(100% - 2 * var(--gutter), var(--container));
	margin-inline: auto;
}

.skip-link {
	position: absolute;
	top: 0;
	left: var(--gutter);
	z-index: 10;
	padding: 0.6rem 1rem;
	border-radius: 0 0 0.5rem 0.5rem;
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 600;
	transform: translateY(-120%);
}

.skip-link:focus {
	color: var(--on-accent);
	transform: none;
}

.icon {
	width: 1.25em;
	height: 1.25em;
	flex: none;
}

.icon-badge {
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	background: var(--accent-soft);
	color: var(--accent);
}

.icon-badge .icon {
	width: 1.5rem;
	height: 1.5rem;
}

/* ---------------------------------------------------------------- header */

.site-header {
	border-bottom: 1px solid var(--border);
}

.site-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 2rem;
	padding-block: 1rem;
}

.brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: var(--text);
	line-height: 1.3;
	text-decoration: none;
}

.brand__text {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
}

.brand:hover {
	color: var(--text);
}

/* The person comes first: 1.25rem on small phones, up to 1.625rem on wide screens */
.brand__person {
	font-family: var(--font-heading);
	font-size: clamp(1.25rem, 1rem + 1.1vw, 1.625rem);
	line-height: 1.15;
}

.brand:hover .brand__person {
	color: var(--accent-strong);
}

.brand__name {
	color: var(--text-muted);
	font-size: 0.9375rem;
	letter-spacing: 0.01em;
}

.nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav a {
	display: inline-block;
	padding-block: 0.5rem;
	color: var(--text);
	font-weight: 500;
	text-decoration: none;
}

.nav a:hover {
	color: var(--accent);
	text-decoration: underline;
}

/* ------------------------------------------------------------------ hero */

.hero {
	padding-block: clamp(2.5rem, 7vw, 5rem) var(--section-space);
}

.hero__inner {
	display: grid;
	align-items: center;
	gap: clamp(2.5rem, 6vw, 4.5rem);
}

@media (min-width: 52rem) {
	.hero__inner {
		grid-template-columns: 1.15fr 0.85fr;
	}
}

.lead {
	max-width: 34em;
	color: var(--text-muted);
	font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
	line-height: 1.55;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 2rem;
}

.portrait {
	--offset: 0.75rem;
	position: relative;
	isolation: isolate;
	justify-self: center;
	width: min(100% - var(--offset), 28rem);
}

@media (min-width: 52rem) {
	.portrait {
		--offset: 1.25rem;
		justify-self: end;
	}
}

.portrait::before {
	content: "";
	position: absolute;
	inset: calc(var(--offset) * 1.5) calc(var(--offset) * -1) calc(var(--offset) * -1)
		calc(var(--offset) * 1.5);
	z-index: -1;
	border-radius: calc(var(--radius) * 1.5);
	background: var(--accent-soft);
}

.portrait img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: calc(var(--radius) * 1.5);
	box-shadow: var(--shadow);
}

/* --------------------------------------------------------------- buttons */

.button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.4rem;
	border: 2px solid var(--accent);
	border-radius: 999px;
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
}

.button:hover {
	border-color: var(--accent-strong);
	background: var(--accent-strong);
	color: var(--on-accent);
}

.button--ghost {
	background: transparent;
	color: var(--accent);
}

.button--ghost:hover {
	background: var(--accent-soft);
	color: var(--accent-strong);
}

@media (prefers-reduced-motion: no-preference) {
	.button,
	.nav a,
	.brand__person {
		transition:
			background-color 0.15s,
			border-color 0.15s,
			color 0.15s;
	}
}

/* -------------------------------------------------------------- sections */

.section {
	padding-block: var(--section-space);
}

.section--alt {
	background: var(--surface-alt);
}

.section__head {
	max-width: var(--measure);
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section__head h2::after {
	content: "";
	display: block;
	width: 3rem;
	height: 3px;
	margin-top: 0.75rem;
	border-radius: 2px;
	background: var(--accent);
}

.section__head p {
	color: var(--text-muted);
	font-size: 1.125rem;
}

/* ---------------------------------------------------------------- lists */

.list {
	padding-left: 1.25em;
}

.list li + li {
	margin-top: 0.35em;
}

.list li::marker {
	color: var(--accent);
}

.list-label {
	margin-bottom: 0.5em;
	font-weight: 600;
}

.tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tags li {
	padding: 0.3rem 0.85rem;
	border-radius: 999px;
	background: var(--accent-soft);
	font-size: 0.9375rem;
	-webkit-hyphens: manual;
	hyphens: manual;
}

/* ----------------------------------------------------------------- cards */

.cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
	gap: 1.5rem;
}

.card {
	padding: clamp(1.5rem, 3vw, 2rem);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow);
}

.card .icon-badge {
	margin-bottom: 1.25rem;
}

.card h3 {
	margin-bottom: 0.75rem;
}

.card__sub {
	margin-top: -0.25rem;
	color: var(--text-muted);
	font-style: italic;
}

.card > :last-child {
	margin-bottom: 0;
}

/* ----------------------------------------------------------------- about */

.about {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
	gap: 2rem 3rem;
}

/* Berufserfahrung on its own, Qualifikation + Kooperationspartner stacked
   next to it, so both columns end up about the same height */
.about__stack {
	display: grid;
	align-content: start;
	gap: 2rem; /* same as the row gap of .about, so the mobile stack stays even */
}

.about h3 {
	margin-bottom: 0.9rem;
	font-size: 1.125rem;
}

/* same accent bar as under the h2 (.section__head h2::after), a size smaller */
.about h3::after {
	content: "";
	display: block;
	width: 2rem;
	height: 2px;
	margin-top: 0.5rem;
	border-radius: 2px;
	background: var(--accent);
}

/* --------------------------------------------------------------- contact */

.contact {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.contact li {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 0.1rem 1rem;
	padding: 1.25rem 1.5rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow);
	-webkit-hyphens: manual;
	hyphens: manual;
}

.contact .icon-badge {
	grid-row: span 2;
}

.contact__label {
	align-self: end;
	color: var(--text-muted);
	font-size: 0.875rem;
}

.contact a {
	align-self: start;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.4;
	overflow-wrap: break-word;
}

/* ----------------------------------------------------------- text pages */

.page {
	padding-block: clamp(2rem, 5vw, 3.5rem) var(--section-space);
}

.prose {
	max-width: var(--measure);
}

.prose h2 {
	margin-top: 2em;
	font-size: 1.5rem;
}

.prose h3 {
	margin-top: 1.5em;
	font-size: 1.125rem;
}

.back-link {
	display: inline-block;
	margin-bottom: 1.5rem;
	font-size: 0.9375rem;
}

.eyebrow {
	margin-bottom: 0.5rem;
	color: var(--accent);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.small {
	color: var(--text-muted);
	font-size: 0.875rem;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
	padding-block: 2rem;
	background: var(--text);
	color: var(--bg);
	font-size: 0.9375rem;
}

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 2rem;
}

.site-footer p {
	margin: 0;
}

.site-footer a,
.site-footer a:hover {
	color: var(--bg);
}

.site-footer :focus-visible {
	outline-color: var(--bg);
}

.footer-nav {
	display: flex;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-nav a {
	display: inline-block;
	padding-block: 0.25rem;
}

/* ----------------------------------------------------------------- print */

@media print {
	.skip-link,
	.site-header nav,
	.actions,
	.portrait::before {
		display: none;
	}

	.section--alt,
	.site-footer {
		background: none;
		color: inherit;
	}

	.site-footer a {
		color: inherit;
	}

	.card,
	.contact li,
	.portrait img {
		box-shadow: none;
		break-inside: avoid;
	}
}
