/*
 * Hand-drawn accents — TRIAL (2026-10-06), inspired by userbrain.com.
 * One accent per section, used sparingly:
 *   .pc-hl.pc-hl--mark    highlighter band behind a word
 *   .pc-hl.pc-hl--under   hand-drawn double underline
 *   .pc-hl.pc-hl--circle  hand-drawn loop around a word
 *   .pc-textlink          secondary action as a text link with a drawn underline + ›
 *                         (on a core Button block: className "pc-textlink")
 * The strokes are SVG masks filled with the brand colour, so the colour stays a token.
 * accents.js draws each one in when it scrolls into view; without JS, or with reduced
 * motion, they are simply shown. Revert: remove this file + its enqueue — the <span>s
 * left in the templates are then invisible.
 */

:root {
	--pc-hl-color: var(--wp--preset--color--brand);
	/* Hand-drawn highlighter stroke (uneven edges, slanted ends, two passes). The SVG
	 * holds the brand colour (#FFBA54) — keep it in sync with the token. */
	--pc-hl-mark-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' preserveAspectRatio='none'%3E%3Cpath d='M4 10 C 30 6, 70 9, 110 5 S 170 8, 197 6 L 194 31 C 170 35, 130 31, 90 35 S 30 32, 6 34 L 2 22 Z' fill='%23FFBA54' fill-opacity='.5'/%3E%3Cpath d='M9 13 C 50 10, 100 12, 150 9 S 186 11, 192 12 L 190 27 C 150 30, 100 27, 60 30 S 20 28, 8 29 Z' fill='%23FFBA54' fill-opacity='.22'/%3E%3C/svg%3E");
	--pc-hl-under: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 200 20%27 preserveAspectRatio=%27none%27%3E%3Cpath d=%27M3 9 C 45 4, 110 3, 197 7%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%273.2%27 stroke-linecap=%27round%27 vector-effect=%27non-scaling-stroke%27/%3E%3Cpath d=%27M22 16 C 70 11, 130 10, 182 13%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%272.4%27 stroke-linecap=%27round%27 vector-effect=%27non-scaling-stroke%27/%3E%3C/svg%3E");
	--pc-hl-circle: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 240 90%27 preserveAspectRatio=%27none%27%3E%3Cpath d=%27M168 10 C 120 0, 40 6, 14 32 C -6 54, 46 86, 124 82 C 196 78, 238 58, 228 32 C 219 10, 160 2, 96 9 C 70 12, 40 18, 22 24%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%272.6%27 stroke-linecap=%27round%27 vector-effect=%27non-scaling-stroke%27/%3E%3C/svg%3E");
	--pc-hl-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 110'%3E%3Cpath d='M6 14 C 44 2, 86 10, 84 40 C 82 64, 54 68, 50 50 C 46 32, 76 28, 98 46 C 114 59, 124 72, 134 86' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M134 86 L 117 84 M134 86 L 131 69' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	--pc-hl-arrow-2: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 150'%3E%3Cpath d='M122 142 C 138 112, 132 72, 104 62 C 76 52, 62 84, 84 92 C 106 100, 116 62, 92 46 C 72 32, 42 34, 12 44' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M12 44 L 25 33 M12 44 L 26 53' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	--pc-hl-link: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 200 10%27 preserveAspectRatio=%27none%27%3E%3Cpath d=%27M2 6 C 50 2, 120 9, 198 4%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%272%27 stroke-linecap=%27round%27 vector-effect=%27non-scaling-stroke%27/%3E%3C/svg%3E");
}

.pc-hl { position: relative; white-space: nowrap; }

/* Highlighter: a band over the lower ~two thirds of the line, slightly irregular ends. */
.pc-hl--mark {
	background-image: var(--pc-hl-mark-img);
	background-repeat: no-repeat;
	background-position: 0 72%;
	background-size: 100% 62%;
	padding-inline: .22em;
	margin-inline: -.22em;
	transition: background-size .7s cubic-bezier(.3,.7,.3,1);
}

/* On the dark hero the word stays white over a softer, see-through band that covers
 * the whole word (decided 2026-10-06). */
.pc-hero .pc-hl--mark {
	background-position: 0 55%;
	background-size: 100% 88%;
}
@media (prefers-reduced-motion: no-preference) {
	html.pc-js .pc-hero .pc-hl--mark:not(.is-drawn) { background-size: 0% 88%; }
}

/* Full-height band, as on the homepage hero ("Familieejet"): softer and behind the
 * whole word — used on light backgrounds too (Priser intro line). */
.pc-hl--full {
	background-position: 0 55%;
	background-size: 100% 92%;
	white-space: normal;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}
@media (prefers-reduced-motion: no-preference) {
	html.pc-js .pc-hl--full:not(.is-drawn) { background-size: 0% 92%; }
}

/* Underline + loop: a pseudo-element painted in the brand colour through an SVG mask,
 * revealed left → right (clip-path) like a pen stroke. */
.pc-hl--under::after,
.pc-hl--circle::after {
	content: "";
	position: absolute;
	pointer-events: none;
	background: var(--pc-hl-color);
	-webkit-mask: var(--mask) no-repeat center / 100% 100%;
	mask: var(--mask) no-repeat center / 100% 100%;
	clip-path: inset(0 0 0 0);
	transition: clip-path .8s cubic-bezier(.3,.7,.3,1);
}
.pc-hl--under::after { --mask: var(--pc-hl-under); left: -.04em; right: -.06em; bottom: -.24em; height: .3em; }
.pc-hl--circle::after { --mask: var(--pc-hl-circle); inset: -.3em -.42em -.24em -.46em; transition-duration: 1s; }

/* Not yet drawn (JS adds .is-drawn when the word scrolls into view). */
@media (prefers-reduced-motion: no-preference) {
	html.pc-js .pc-hl--mark:not(.is-drawn) { background-size: 0% 62%; }
	html.pc-js .pc-hl--under:not(.is-drawn)::after,
	html.pc-js .pc-hl--circle:not(.is-drawn)::after { clip-path: inset(0 100% 0 0); }
}

/* Secondary action as a text link. */
.wp-block-button.pc-textlink .wp-element-button,
a.pc-textlink {
	position: relative;
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	padding: 6px 2px 8px !important;
	color: var(--wp--preset--color--ink);
	text-transform: none;
	letter-spacing: 0;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	gap: .4em;
}
.wp-block-button.pc-textlink .wp-element-button::after,
a.pc-textlink::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 7px;
	background: var(--pc-hl-color);
	-webkit-mask: var(--pc-hl-link) no-repeat center / 100% 100%;
	mask: var(--pc-hl-link) no-repeat center / 100% 100%;
	transition: transform .25s ease;
	transform-origin: left;
}
/* A text link keeps its own width (mobile stacks buttons full-width) and one line. */
.wp-block-button.pc-textlink { width: auto !important; flex-basis: auto !important; }
.wp-block-button.pc-textlink .wp-element-button { width: auto !important; white-space: nowrap; }
/* Two text links side by side need more air than two buttons. */
.wp-block-buttons:has(> .pc-textlink + .pc-textlink) { column-gap: 32px; }
.wp-block-button.pc-textlink .wp-element-button i { font-size: .75em; transition: transform .2s ease; }
.wp-block-button.pc-textlink .wp-element-button:hover i { transform: translateX(3px); }
.wp-block-button.pc-textlink .wp-element-button:hover::after { transform: scaleX(1.04); }
/* Text links outside the button block (price cards): navy text, brand stroke. */
a.pc-textlink { color: var(--wp--preset--color--ink); text-decoration: none; }
a.pc-textlink i { font-size: .75em; transition: transform .2s ease; }
a.pc-textlink:hover { text-decoration: none; }
a.pc-textlink:hover i { transform: translateX(3px); }
a.pc-textlink:hover::after { transform: scaleX(1.04); }
.pc-plan__textcta { align-self: flex-start; }

/* On the dark hero the link is white; the stroke stays brand. */
.pc-hero .wp-block-button.pc-textlink .wp-element-button { color: var(--wp--preset--color--white); }

/* Hand-drawn looping arrows pointing at an input (".pc-hl-arrows" on its wrapper;
 * the coverage check). Wide screens only (≥1180px) — narrower, there's no room beside
 * the field, and the heading's loop (".pc-hl--narrow-only") is shown instead. */
.pc-hl-arrows { position: relative; }
@media (min-width: 1180px) {   /* the big arrows need ~260px beside the field */
	.pc-hl-arrows::before,
	.pc-hl-arrows::after {
		content: "";
		position: absolute;
		pointer-events: none;
		background: var(--pc-hl-color);
		-webkit-mask: var(--pc-hl-arrow) no-repeat center / contain;
		mask: var(--pc-hl-arrow) no-repeat center / contain;
		clip-path: inset(0 0 0 0);
		transition: clip-path 1.1s cubic-bezier(.3,.7,.3,1);
	}
	/* Two different strokes, sizes and angles — not mirror images — so they read as
	 * drawn by hand: a big sweep from above on the left, a loop rising from below on
	 * the right. Each tip lands just beside the field, at its middle. */
	.pc-hl-arrows::before {
		top: -140px;
		left: -262px;
		width: 280px;
		height: 205px;
		transform: rotate(-6deg);
	}
	.pc-hl-arrows::after {
		top: -52px;
		right: -242px;
		width: 252px;
		height: 270px;
		-webkit-mask-image: var(--pc-hl-arrow-2);
		mask-image: var(--pc-hl-arrow-2);
		transform: rotate(5deg);
	}
	.pc-hl--narrow-only::after { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
	html.pc-js .pc-hl-arrows:not(.is-drawn)::before { clip-path: inset(0 100% 0 0); }
	html.pc-js .pc-hl-arrows:not(.is-drawn)::after { clip-path: inset(100% 0 0 0); }   /* drawn upwards */
}
