/* Fonts are self-hosted (SIL Open Font License, see ../fonts/OFL-*.txt). */
@font-face {
	font-family: "Alegreya Sans";
	src: url("../fonts/alegreya-sans-latin-400-normal.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Alegreya Sans";
	src: url("../fonts/alegreya-sans-latin-400-italic.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "Alegreya Sans";
	src: url("../fonts/alegreya-sans-latin-500-normal.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Alegreya Sans";
	src: url("../fonts/alegreya-sans-latin-700-normal.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Handlee";
	src: url("../fonts/handlee-latin-400-normal.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "Kalam";
	src: url("../fonts/kalam-latin-400-normal.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "Kalam";
	src: url("../fonts/kalam-latin-700-normal.woff2") format("woff2");
	font-weight: 700;
	font-display: swap;
}

@font-face {
	font-family: "Dancing Script";
	src: url("../fonts/dancing-script-latin-wght-normal.woff2") format("woff2");
	font-weight: 400 700;
	font-display: swap;
}

:root {
	--leaf: #89B02F;
	--leaf-dark: #607A26;
	--leaf-pale: #E7EFD5;
	--berry: #A80F0F;
	--berry-dark: #800000;
	--rose: #E7C8C2;
	--rose-pale: #F6E9E6;
	--sage: #F1F3EA;
	--sun: #F08A1C;
	--ink: #33302C;
	--ink-soft: #5E5A54;

	--font-body: "Alegreya Sans", "Trebuchet MS", Verdana, sans-serif;
	/* Heading font; scale evens out the different optical sizes. */
	--font-hand: "Handlee", "Bradley Hand", "Segoe Print", cursive;
	--font-hand-weight: 400;
	--font-hand-scale: 0.85;
	/* Kalam: --font-hand-weight: 400; --font-hand-scale: 0.9;
	   Dancing Script: --font-hand-weight: 600; --font-hand-scale: 1; */

	--page-width: 1120px;
	--header-width: 1240px;
	--gutter: clamp(16px, 4vw, 48px);
	--radius: 22px;
}

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

html {
	overflow-y: scroll;
	/* Never fake bold/italic for faces that only ship one style. */
	font-synthesis: none;
	-webkit-text-size-adjust: 100%;
}

html, body {
	margin: 0;
	padding: 0;
}

body {
	background: var(--leaf) url("../images/bg.gif") repeat-y top center;
	color: var(--ink);
	font: 19px/1.45 var(--font-body);
}

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

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

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

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

.klein {
	font-size: 0.8em;
}

p {
	margin: 0 0 1em 0;
}

/* Script headings take over the role of the former GIF headings. */
h1, h2 {
	font-family: var(--font-hand);
	font-weight: var(--font-hand-weight);
	color: var(--berry);
	line-height: 1.2;
	margin: 0 0 0.5em 0;
	text-wrap: balance;
	hyphens: auto;
	overflow-wrap: break-word;
}

h1 {
	font-size: calc(clamp(2.3rem, 1.6rem + 2.5vw, 3.3rem) * var(--font-hand-scale));
}

h1.first {
	margin-top: 0;
}

h2 {
	font-size: calc(1.95rem * var(--font-hand-scale));
	margin-top: 1.2em;
}

/* Text headings (e.g. privacy policy), sized like bold body text. */
h2.section {
	font-family: var(--font-body);
	font-weight: 700;
	color: var(--ink);
	font-size: 1em;
	margin: 1.4em 0 0.3em 0;
}

blockquote {
	margin: 1.5em 0;
	padding: 0.2em 0 0.2em 1.2em;
	border-left: 3px solid var(--rose);
	font-family: var(--font-hand);
	font-weight: var(--font-hand-weight);
	font-size: calc(1.4em * var(--font-hand-scale));
	line-height: 1.35;
	color: var(--berry-dark);
}

blockquote em.klein {
	font-family: var(--font-body);
	font-style: normal;
	font-size: 0.65em;
	color: var(--ink-soft);
}

.txt ul {
	margin: 0 0 1em 0;
	padding: 0;
}

.txt ul li {
	list-style: none;
	position: relative;
	margin: 0;
	padding: 0.15em 0 0.5em 1.6em;
}

.txt ul li::before {
	content: "";
	position: absolute;
	left: 0.2em;
	top: 0.65em;
	width: 0.55em;
	height: 0.55em;
	border-radius: 50%;
	background: var(--sun);
	box-shadow: 0 0 0 3px var(--rose-pale);
}

/* Photos keep their white frame, now with a slight tilt like a pinned print. */
img.foto {
	float: right;
	border: 10px solid white;
	margin: 0.4em 0 1.5em 2.5em;
	box-shadow: 0 10px 24px -12px rgba(51, 48, 44, 0.45);
	transform: rotate(1.5deg);
	max-width: 45%;
}

.clr {
	clear: both;
}

.error {
	text-align: center;
}

img.error-foto {
	border: 10px solid white;
	margin: 0 auto 1em;
	box-shadow: 0 10px 24px -12px rgba(51, 48, 44, 0.45);
}

/* Header ---------------------------------------------------------------- */

#header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: white;
	border-bottom: 4px solid var(--rose);
}

.header-inner {
	max-width: var(--header-width);
	margin: 0 auto;
	padding: 10px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.brand {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	text-decoration: none;
}

/* Variant 'bild': the original logo image. */
.brand-image {
	line-height: 0;
}

.brand-image img {
	width: 250px;
}

/* Variant 'schrift': wordmark in the heading script around the sun. */
.brand-text {
	gap: 6px;
	font-family: var(--font-hand);
	font-weight: var(--font-hand-weight);
	font-size: calc(25px * var(--font-hand-scale));
	line-height: 1;
	color: var(--berry);
	white-space: nowrap;
}

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

.brand-text img {
	width: auto;
	height: 40px;
}

#mainnav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 2px;
}

#mainnav a {
	display: block;
	padding: 6px 9px;
	border-radius: 999px;
	color: var(--berry-dark);
	font-weight: 500;
	font-size: 17px;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s ease;
}

#mainnav a:hover {
	background: var(--rose-pale);
}

#mainnav a.active {
	background: var(--rose);
	color: var(--berry-dark);
}

.nav-toggle {
	display: none;
}

/* Content --------------------------------------------------------------- */

#contentcontainer {
	max-width: var(--page-width);
	margin: clamp(20px, 5vw, 56px) auto 0;
	padding: clamp(24px, 4vw, 56px) var(--gutter);
	background: var(--sage);
	border-radius: var(--radius);
	box-shadow: 0 20px 50px -30px rgba(40, 60, 10, 0.6);
}

#contentcontainer::after {
	content: "";
	display: table;
	clear: both;
}

.with-subnav {
	display: grid;
	grid-template-columns: 230px minmax(0, 1fr);
	gap: 48px;
	align-items: start;
}

.txt {
	max-width: 70ch;
}

.with-subnav .txt {
	max-width: none;
}

.txt p, .txt ul, .txt blockquote {
	max-width: 68ch;
}

#subnav {
	position: sticky;
	top: 110px;
}

#subnav ul {
	list-style: none;
	margin: 0;
	padding: 0 0 0 14px;
	border-left: 2px solid var(--rose);
}

#subnav li {
	margin: 0;
}

#subnav a {
	display: block;
	position: relative;
	padding: 7px 0;
	color: var(--ink-soft);
	font-size: 17px;
	font-weight: 500;
	line-height: 1.35;
	text-decoration: none;
}

#subnav a:hover {
	color: var(--berry);
}

#subnav a.active {
	color: var(--berry);
}

#subnav a.active::before {
	content: "";
	position: absolute;
	left: -21px;
	top: 50%;
	width: 12px;
	height: 12px;
	margin-top: -6px;
	border-radius: 50%;
	background: var(--sun);
	border: 2px solid var(--sage);
}

/* Start page ------------------------------------------------------------ */

.page-index .txt {
	max-width: none;
}

.hero {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: 48px;
	align-items: center;
}

.hero-photos {
	position: relative;
	margin: 0;
	padding: 0 0 70px 0;
}

.hero-photos img.foto {
	float: none;
	display: block;
	margin: 0;
	max-width: 100%;
	width: 100%;
	transform: rotate(2deg);
}

.hero-photos img.foto-small {
	position: absolute;
	left: -28px;
	bottom: 0;
	width: 52%;
	transform: rotate(-4deg);
}

.weg {
	margin-top: 56px;
}

.weg h2 {
	margin-top: 0;
}

.weg ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	counter-reset: weg;
	position: relative;
}

/* The three offers follow each other in time; the line connects them. */
.weg ol::before {
	content: "";
	position: absolute;
	left: 16px;
	right: 16px;
	top: 16px;
	border-top: 2px dashed var(--rose);
}

.weg li {
	position: relative;
	padding-top: 44px;
}

.weg li::before {
	content: "";
	position: absolute;
	left: 8px;
	top: 8px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--sun);
	box-shadow: 0 0 0 5px var(--sage);
}

.weg a {
	display: block;
	height: 100%;
	padding: 18px 20px 20px;
	background: white;
	border-radius: 16px;
	color: var(--ink);
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.weg a:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 24px -16px rgba(51, 48, 44, 0.5);
}

.weg-title {
	display: block;
	font-family: var(--font-hand);
	font-weight: var(--font-hand-weight);
	font-size: calc(1.8rem * var(--font-hand-scale));
	line-height: 1.2;
	color: var(--berry);
	margin-bottom: 4px;
}

.weg-text {
	display: block;
	font-size: 17px;
	color: var(--ink-soft);
}

.quote-big {
	margin: 56px auto 0;
	max-width: none;
	padding: 0;
	border: none;
	text-align: center;
	font-size: calc(1.5em * var(--font-hand-scale));
}

/* Footer ---------------------------------------------------------------- */

#footer {
	max-width: var(--page-width);
	margin: 0 auto;
	padding: 18px var(--gutter) 40px;
	text-align: right;
	color: var(--leaf-pale);
	font-size: 16px;
}

#footer a {
	color: var(--leaf-pale);
	margin-left: 14px;
	text-decoration: none;
}

#footer a:hover {
	text-decoration: underline;
}

/* Baby gallery ---------------------------------------------------------- */

.txt ul.galerie {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 32px 24px;
	max-width: none;
}

.txt ul.galerie li {
	padding: 0;
	text-align: center;
}

.txt ul.galerie li::before {
	display: none;
}

.txt ul.galerie img {
	border: 8px solid white;
	box-shadow: 0 10px 24px -14px rgba(51, 48, 44, 0.5);
}

.txt ul.galerie .caption {
	display: block;
	margin-top: 6px;
	font-size: 17px;
	color: var(--ink-soft);
}

.txt ul.galerie .caption strong {
	display: block;
	font-family: var(--font-hand);
	font-weight: var(--font-hand-weight);
	font-size: calc(1.55rem * var(--font-hand-scale));
	color: var(--berry);
}

/* Forms ----------------------------------------------------------------- */

div.box-holder {
	text-align: center;
}

.flash-box-error {
	font-size: 17px;
	color: #F9F9F9;
	background-color: #B40202;
	border-radius: 10px;
	display: inline-block;
	padding: 10px 14px;
	text-align: center;
}

.input {
	padding: 10px 12px;
	font: inherit;
	color: var(--ink);
	background-color: white;
	border: 1px solid #CFCFC4;
	border-radius: 10px;
}

.input:focus {
	border-color: var(--berry);
}

.btn {
	display: inline-block;
	border: 1px solid transparent;
	border-radius: 999px;
	padding: 8px 20px;
	text-align: center;
	text-decoration: none;
	font: 500 17px/1.3 var(--font-body);
	cursor: pointer;
	/* Raised look: a soft neutral edge that the button sinks into on press. */
	--btn-edge: rgba(51, 48, 44, 0.28);
	box-shadow: 0 1.5px 0 var(--btn-edge);
	transition: background-color 0.2s ease, transform 0.08s ease, box-shadow 0.08s ease;
}

.btn:active:not(:disabled) {
	transform: translateY(1px);
	box-shadow: 0 0.5px 0 var(--btn-edge);
}

.btn-green {
	background-color: var(--leaf-dark);
	color: white;
}

.btn-green:hover {
	background-color: #4E6420;
	color: white;
}

.btn-plain {
	background-color: white;
	border-color: var(--rose);
	color: var(--berry-dark);
}

.btn-plain:hover {
	background-color: var(--rose-pale);
	color: var(--berry-dark);
}

/* Small screens --------------------------------------------------------- */

/* Too narrow for logo and navigation side by side: navigation moves to its
   own row below the logo. */
@media (max-width: 1120px) {
	.header-inner {
		flex-wrap: wrap;
		justify-content: center;
		gap: 4px 24px;
	}

	#mainnav {
		flex-basis: 100%;
	}

	#mainnav ul {
		justify-content: center;
	}

	#subnav {
		top: 130px;
	}
}

/* Too narrow for the navigation row: collapse it behind the menu button. */
@media (max-width: 840px) {
	.header-inner {
		justify-content: space-between;
		gap: 8px;
	}

	.brand-image img {
		width: 220px;
	}

	.brand-text {
		font-size: calc(26px * var(--font-hand-scale));
	}

	.brand-text img {
		height: 40px;
	}

	.nav-toggle {
		display: block;
		padding: 8px 18px;
		border: 2px solid var(--rose);
		border-radius: 999px;
		background: white;
		color: var(--berry-dark);
		font: 700 17px var(--font-body);
		cursor: pointer;
	}

	.nav-toggle[aria-expanded="true"] {
		background: var(--rose);
	}

	#mainnav {
		display: none;
	}

	#header.nav-open #mainnav {
		display: block;
	}

	#mainnav ul {
		justify-content: flex-start;
		padding: 6px 0 4px;
	}

	#mainnav a {
		font-size: 18px;
		padding: 8px 14px;
	}

}

@media (max-width: 820px) {
	.with-subnav {
		display: block;
	}

	#subnav {
		position: static;
		margin: 0 0 24px 0;
	}

	/* One swipeable row instead of a wall of chips (e.g. 18 gallery years). */
	#subnav ul {
		display: flex;
		gap: 8px;
		padding: 0 0 6px;
		border: none;
		overflow-x: auto;
		scrollbar-width: thin;
	}

	#subnav li {
		flex: 0 0 auto;
	}

	#subnav a {
		padding: 5px 12px;
		border-radius: 999px;
		white-space: nowrap;
		background: white;
	}

	#subnav a.active {
		background: var(--rose);
		color: var(--berry-dark);
	}

	#subnav a.active::before {
		display: none;
	}

	.hero {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.hero-photos {
		max-width: 420px;
		margin: 0 auto;
		padding-left: 20px;
	}

	.weg ol {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.weg ol::before {
		left: 16px;
		right: auto;
		top: 16px;
		bottom: 16px;
		border-top: none;
		border-left: 2px dashed var(--rose);
	}

	.weg li {
		padding: 0 0 0 44px;
	}

	.weg li::before {
		top: 22px;
	}

	.quote-big {
		font-size: calc(1.25em * var(--font-hand-scale));
	}
}

@media (max-width: 560px) {
	.brand-text {
		font-size: calc(21px * var(--font-hand-scale));
		gap: 4px;
	}

	.brand-text img {
		height: 32px;
	}

	.nav-toggle {
		padding: 6px 14px;
	}

	body {
		font-size: 18px;
	}

	#contentcontainer {
		border-radius: 0;
		margin-top: 0;
	}

	img.foto {
		float: none;
		display: block;
		max-width: 100%;
		margin: 0.5em auto 1.5em;
		transform: none;
	}

	.hero-photos img.foto {
		transform: rotate(2deg);
	}

	.hero-photos img.foto-small {
		transform: rotate(-4deg);
		left: -12px;
	}

	#footer {
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
	}
}
