/* Hånd om din familie — extracted from the WordPress site */

:root {
	--pink: #f6c7cc;
	--pink-dark: #e2a3aa;
	--ink: #3b3b3b;
	--ink-soft: #6a6a6a;
	--rule: #e6e6e6;
	--bg: #ffffff;
	--bg-soft: #faf7f7;
	--sidebar-w: 280px;
}

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

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font:
		400 17px/1.7 "Helvetica Neue",
		Helvetica,
		Arial,
		sans-serif;
}

a {
	color: #b5747d;
}
a:hover {
	color: var(--ink);
}

.skip-link {
	position: absolute;
	left: -9999px;
}
.skip-link:focus {
	left: 1rem;
	top: 1rem;
	z-index: 10;
	background: #fff;
	padding: 0.5rem 1rem;
	border: 2px solid var(--pink-dark);
}

/* ---------------------------------------------------------------- layout */

.layout {
	display: flex;
	align-items: flex-start;
	min-height: 100vh;
}

.sidebar {
	width: var(--sidebar-w);
	flex: 0 0 var(--sidebar-w);
	position: sticky;
	top: 0;
	max-height: 100vh;
	overflow-y: auto;
	padding: 2rem 1.5rem 2.5rem;
	background: var(--bg-soft);
	border-right: 1px solid var(--rule);
}

.content {
	flex: 1 1 auto;
	min-width: 0;
	padding: 3rem clamp(1.25rem, 4vw, 4rem) 4rem;
	max-width: 60rem;
}

/* ----------------------------------------------------------------- brand */

.brand {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
}

.brand-link {
	text-decoration: none;
	color: inherit;
	display: block;
}

.brand-title {
	display: block;
	font-size: 1.35rem;
	line-height: 1.25;
	font-weight: 600;
}
.brand-tagline {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.85rem;
	color: var(--ink-soft);
}
.brand::after {
	content: none;
}

/* ------------------------------------------------------------------- nav */

.sidebar-nav {
	margin-top: 2rem;
}

.nav-list,
.nav-sublist {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-item + .nav-item {
	margin-top: 0.1rem;
}

.nav-link {
	display: block;
	padding: 0.45rem 0.6rem;
	border-left: 3px solid transparent;
	color: var(--ink);
	text-decoration: none;
	font-size: 0.95rem;
	line-height: 1.35;
	border-radius: 0 3px 3px 0;
}
.nav-link:hover {
	background: #fff;
	border-left-color: var(--pink);
}

.nav-link.is-current {
	border-left-color: var(--pink-dark);
	background: #fff;
	font-weight: 600;
}

/* Collapsible parent group: <details> gives the toggle, no JS involved. */

.nav-group-details {
	margin-top: 0.5rem;
}

.nav-group {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.4rem 0.6rem 0.3rem;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-soft);
	cursor: pointer;
	list-style: none; /* Firefox */
	border-radius: 3px;
}
.nav-group::-webkit-details-marker {
	display: none;
} /* Safari */

.nav-group:hover {
	color: var(--ink);
	background: #fff;
}

.nav-group:focus-visible {
	outline: 2px solid var(--pink-dark);
	outline-offset: 1px;
}

/* Chevron, drawn rather than an icon font. Points right when closed,
   down when open. */
.nav-group::before {
	content: "";
	flex: 0 0 auto;
	width: 0.4rem;
	height: 0.4rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	transform-origin: 60% 60%;
	transition: transform 0.15s ease;
}
.nav-group-details[open] > .nav-group::before {
	transform: rotate(45deg);
}

@media (prefers-reduced-motion: reduce) {
	.nav-group::before {
		transition: none;
	}
}

.nav-sublist {
	margin-bottom: 0.4rem;
}
.nav-sublink {
	padding-left: 1.4rem;
	font-size: 0.9rem;
}

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

.sidebar-contact {
	margin-top: 2.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--rule);
	font-size: 0.85rem;
	color: var(--ink-soft);
}
.sidebar-contact p {
	margin: 0.15rem 0;
}

/* -------------------------------------------------------- page structure */

.page .row {
	display: flex;
	flex-wrap: wrap;
	gap: 0 2rem;
	margin-bottom: 1rem;
}
.page .row .row {
	margin-bottom: 0;
}

/* The image a page can put above its heading.

   The hero is toned down with a filter rather than `opacity`. The JPEG is
   opaque and was exported already flattened -- its whole tonal range is
   #424549 to #868a8e, so even its lightest pixel is mid-grey. Fading the
   element only mixes that grey with the page (0.2 opacity lands on #e1e1e2),
   painting a grey slab where the picture should dissolve into the white.
   The filter lifts the image's own levels instead: brightness puts its light
   tones on the page white so the edges disappear, the low contrast leaves the
   figures as a faint ghost, and grayscale drops the blue cast the flatten left
   behind. Raise the contrast to make the picture more present, lower it to
   fade it further. */
.page-hero {
	display: block;

	/* Full width of the content column, but never scaled past the file's own
	   resolution. A page states that with `hero_width` in its front matter;
	   without one there is no cap beyond the column. (`max-content` looks like
	   the tidy way to say this, but with a max-height in play it resolves to
	   the ratio-derived width and shrinks the picture instead of cropping it.) */
	width: 100%;
	max-width: min(100%, var(--hero-max-width, 100%));

	/* Never more than half the browser window's height. dvh follows the
	   visible viewport as mobile toolbars slide away; vh is the fallback for
	   browsers without it. When the cap bites the picture is cropped rather
	   than shrunk, so it keeps the column's full width. */
	height: auto;
	max-height: 50vh;
	max-height: 50dvh;
	object-fit: cover;
	object-position: center;

	margin: 0 auto 2.5rem;

	filter: grayscale(1) contrast(0.51) brightness(2);

	/* Dissolve all four edges into the page. Two gradients, one per axis,
	   combined so a pixel is only drawn where both keep it -- that fades the
	   borders without darkening the middle, which a single radial vignette
	   would. `cover` leaves no empty margin in the box, so the fade lands on
	   the picture itself. The -webkit- pair is for Safari before 15.4. */
	-webkit-mask-image:
		linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%),
		linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
	mask-image:
		linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%),
		linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
	-webkit-mask-composite: source-in;
	mask-composite: intersect;
}

/* On Markdown pages a second section is an <h2> among its siblings rather than
   a new wrapper row, so the row's margin-bottom has to come from the heading.
   1rem (the row) + 1.1rem (the preceding paragraph, whose margin would
   otherwise collapse away) on top of the usual 2.5rem. */
.page-md h2.section-heading {
	margin-top: 4.6rem;
}

.col {
	flex: 1 1 100%;
	min-width: 0;
}
.col-1-2 {
	flex-basis: calc(50% - 1rem);
}
.col-1-3 {
	flex-basis: calc(33.333% - 1.34rem);
}
.col-2-3 {
	flex-basis: calc(66.666% - 0.67rem);
}
.col-1-4 {
	flex-basis: calc(25% - 1.5rem);
}

.spacer {
	height: 1.5rem;
	width: 100%;
}

hr {
	border: 0;
	border-top: 1px solid var(--rule);
	margin: 2rem 0;
}

/* ---------------------------------------------------------------- typography */

h1,
h2,
h3,
h4 {
	color: var(--ink);
	font-weight: 600;
}

h1 {
	font-size: clamp(1.9rem, 4vw, 2.75rem);
	line-height: 1.2;
	margin: 0 0 1.5rem;
}
h2 {
	font-size: 1.5rem;
	line-height: 1.3;
	margin: 2.5rem 0 1rem;
}
h3 {
	font-size: 1.2rem;
	margin: 2rem 0 0.75rem;
}
h4 {
	font-size: 1.05rem;
	margin: 0.35rem 0;
}

/* Alignment utilities. WordPress carried these as inline styles; the
   extractor rewrites them to classes so the page markup stays style-free. */
.align-left {
	text-align: left;
}
.align-center {
	text-align: center;
}
.align-right {
	text-align: right;
}

/* the pink rule the WordPress theme drew under the main page heading */
h1.section-heading::after {
	content: "";
	display: block;
	width: 80px;
	height: 4px;
	background: var(--pink);
	margin: 1.25rem 0 0;
}
h1.section-heading.align-center::after {
	margin-left: auto;
	margin-right: auto;
}

p {
	margin: 0 0 1.1rem;
}

.text ul {
	padding-left: 1.25rem;
}
.text li {
	margin-bottom: 0.5rem;
}

.checklist ul,
ul.checklist {
	list-style: none;
	padding-left: 0;
}
.checklist li {
	position: relative;
	padding-left: 1.75rem;
	margin-bottom: 0.75rem;
}
.checklist li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.6em;
	width: 0.55rem;
	height: 0.55rem;
	background: var(--pink);
	border-radius: 50%;
}

/* -------------------------------------------------------------- tables */

.pricetable {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.5rem;
}
.pricetable td {
	padding: 0.7rem 0.9rem;
	border-bottom: 1px solid var(--rule);
	vertical-align: top;
}
.pricetable tr:nth-child(odd) td {
	background: var(--bg-soft);
}
.pricetable td.amount {
	text-align: right;
	white-space: nowrap;
	font-weight: 600;
}

.table-wrap {
	overflow-x: auto;
}

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

.contactform {
	background: var(--bg-soft);
	border: 1px solid var(--rule);
	border-left: 3px solid var(--pink);
	padding: 1.25rem 1.5rem;
}
.contactform p:last-child {
	margin-bottom: 0;
}

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

.site-footer {
	margin-top: 4rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--rule);
	font-size: 0.85rem;
	color: var(--ink-soft);
}
.site-footer p {
	margin: 0;
}

/* ------------------------------------------------------- mobile / toggle */

.nav-toggle-label {
	display: none;
}

@media (max-width: 800px) {
	.layout {
		display: block;
	}

	.sidebar {
		width: auto;
		flex: none;
		position: static;
		max-height: none;
		border-right: 0;
		border-bottom: 1px solid var(--rule);
		padding: 1.25rem 1.25rem 1rem;
	}

	.nav-toggle-label {
		display: block;
		cursor: pointer;
		padding: 0.5rem;
		flex: 0 0 auto;
	}
	.nav-toggle-label span {
		display: block;
		width: 24px;
		height: 2px;
		background: var(--ink);
		margin: 5px 0;
	}

	.sidebar-nav,
	.sidebar-contact {
		display: none;
	}
	.nav-toggle:checked ~ .layout .sidebar-nav,
	.nav-toggle:checked ~ .layout .sidebar-contact {
		display: block;
	}

	.content {
		padding: 2rem 1.25rem 3rem;
	}

	.page .row {
		gap: 0;
	}
	.col-1-2,
	.col-1-3,
	.col-2-3,
	.col-1-4 {
		flex-basis: 100%;
	}
}
