/* ==========================================================================
   Shared components: section shell, section header, buttons, links, tags,
   check list, resource card. Section-specific styles live in sections/*.css.
   ========================================================================== */

/* ---------- Section shell ----------
   .axn-section sets the surface and vertical rhythm; .axn-container caps the content at 1280.
   Surfaces: default page · has-surface-sunken · has-surface-accent · is-dark (navy). */
.axn-section {
	position: relative;
	padding: var(--section-y) var(--page-margin);
	background: var(--surface-page);
	color: var(--text-primary);
}

.axn-section.is-tight { padding-block: var(--section-y-tight); }
.axn-section.has-surface-sunken { background: var(--surface-sunken); }
.axn-section.has-surface-accent { background: var(--surface-accent); }

.axn-container {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
}

/* Section header: eyebrow + H2 + lead intro, max 720. */
.axn-section-header {
	display: flex;
	flex-direction: column;
	gap: var(--space-16);
	max-width: var(--measure-max);
}

.axn-section-header.is-centred {
	align-items: center;
	margin-inline: auto;
	text-align: center;
}

/* Eyebrow: sentence case, Body/S, secondary. A quiet signpost, not a tracked-out kicker. */
.axn-eyebrow {
	font-size: var(--type-body-s-size);
	line-height: var(--type-body-s-line);
	color: var(--text-secondary);
}

/* Footer-style tracked label (Label/Eyebrow). */
.axn-label {
	font-size: var(--type-eyebrow-size);
	line-height: var(--type-eyebrow-line);
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text-secondary);
}

/* ---------- Buttons ----------
   Core button block styles (is-style-primary / secondary / tertiary) and .axn-btn for templates.
   Size M by default (44px); add .axn-btn-l on the block wrapper or .axn-btn--l for 52px.
   CTA text is navy, never white. Trailing arrow is drawn with a mask so it follows currentColor;
   add .no-arrow to drop it. */
.wp-block-buttons.wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-16);
}

.wp-block-button .wp-block-button__link,
.axn-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-8);
	min-height: var(--control-m);
	padding: 0 var(--space-20);
	border: 1px solid transparent;
	border-radius: var(--radius-8);
	background: transparent;
	color: var(--action-solid);
	font-family: var(--font-body);
	font-size: var(--type-button-m-size);
	line-height: var(--type-button-m-line);
	font-weight: 600;
	letter-spacing: 0;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.wp-block-button .wp-block-button__link::after,
.axn-btn::after {
	content: "";
	flex: none;
	width: 20px;
	height: 20px;
	background: currentColor;
	-webkit-mask: url("../icons/arrow-right.svg") center / 20px 20px no-repeat;
	mask: url("../icons/arrow-right.svg") center / 20px 20px no-repeat;
}

.wp-block-button.no-arrow .wp-block-button__link::after,
.axn-btn.no-arrow::after {
	content: none;
}

.wp-block-button.axn-btn-l .wp-block-button__link,
.axn-btn--l {
	min-height: var(--control-l);
	padding: 0 var(--space-24);
	gap: var(--space-10);
	font-size: var(--type-button-l-size);
	line-height: var(--type-button-l-line);
}

/* Primary */
.wp-block-button.is-style-primary .wp-block-button__link,
.wp-block-button:not([class*="is-style-"]) .wp-block-button__link,
.axn-btn--primary {
	background: var(--action-cta);
	border-color: var(--action-cta-edge);
	color: var(--text-on-cta);
}

.wp-block-button.is-style-primary .wp-block-button__link:hover,
.wp-block-button:not([class*="is-style-"]) .wp-block-button__link:hover,
.axn-btn--primary:hover {
	background: var(--action-cta-hover);
	color: var(--text-on-cta);
}

.wp-block-button.is-style-primary .wp-block-button__link:active,
.wp-block-button:not([class*="is-style-"]) .wp-block-button__link:active,
.axn-btn--primary:active {
	background: var(--action-cta-pressed);
}

/* Secondary (outline) */
.wp-block-button.is-style-secondary .wp-block-button__link,
.axn-btn--secondary {
	border-color: var(--action-solid);
	color: var(--action-solid);
}

.wp-block-button.is-style-secondary .wp-block-button__link:hover,
.axn-btn--secondary:hover {
	background: var(--action-solid);
	color: var(--action-solid-contrast);
}

/* Tertiary (text) */
.wp-block-button.is-style-tertiary .wp-block-button__link,
.axn-btn--tertiary {
	color: var(--text-link);
}

.wp-block-button.is-style-tertiary .wp-block-button__link:hover,
.axn-btn--tertiary:hover {
	background: var(--action-tertiary-hover);
}

.wp-block-button .wp-block-button__link:focus-visible,
.axn-btn:focus-visible {
	outline: 2px solid var(--border-focus);
	outline-offset: 2px;
}

@media (max-width: 767px) {
	/* Long English/Swedish labels wrap rather than overflow on a phone. */
	.wp-block-button .wp-block-button__link,
	.axn-btn {
		white-space: normal;
		text-align: center;
		padding-block: var(--space-10);
	}

	.axn-stack-mobile.wp-block-buttons,
	.axn-stack-mobile .wp-block-buttons {
		flex-direction: column;
		gap: var(--space-12);
	}

	.axn-stack-mobile .wp-block-button,
	.axn-stack-mobile .wp-block-button__link {
		width: 100%;
	}
}

/* ---------- Links ---------- */

/* Link with trailing arrow (Label/Button M, text/link). Works on <a>, on a span inside a card,
   and as the "Link med pil" paragraph style. */
.axn-arrow-link,
.is-style-arrow-link a {
	display: inline-flex;
	align-items: center;
	gap: var(--space-8);
	color: var(--text-link);
	font-size: var(--type-button-m-size);
	line-height: var(--type-button-m-line);
	font-weight: 600;
	text-decoration: none;
	text-underline-offset: 4px;
}

.axn-arrow-link::after,
.is-style-arrow-link a::after {
	content: "";
	width: 20px;
	height: 20px;
	background: currentColor;
	-webkit-mask: url("../icons/arrow-right.svg") center / 20px 20px no-repeat;
	mask: url("../icons/arrow-right.svg") center / 20px 20px no-repeat;
	transition: transform var(--dur) var(--ease);
}

a.axn-arrow-link:hover,
.is-style-arrow-link a:hover {
	text-decoration: underline;
	text-decoration-thickness: 1px;
}

a.axn-arrow-link:hover::after,
.is-style-arrow-link a:hover::after {
	transform: translateX(2px);
}

/* Inline text link (Body, underlined). */
.axn-text-link,
.axn-prose a {
	color: var(--text-link);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.axn-text-link:hover,
.axn-prose a:hover {
	text-decoration-color: var(--accent-rule);
	text-decoration-thickness: 2px;
}

/* ---------- Tag (pill) ---------- */
.axn-tag {
	display: inline-flex;
	align-items: center;
	gap: var(--space-6);
	height: 28px;
	padding: 0 var(--space-12);
	border-radius: var(--radius-pill);
	background: var(--surface-accent);
	color: var(--text-link);
	font-size: var(--type-meta-size);
	line-height: var(--type-meta-line);
	font-weight: 500;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.is-dark .axn-tag {
	background: var(--c-dark-blue);
}

/* ---------- Check list (core/list "Flueben" style) ---------- */
.is-style-check,
.axn-checklist {
	display: flex;
	flex-direction: column;
	gap: var(--space-12);
	margin: 0;
	padding: 0;
	list-style: none;
}

.is-style-check li,
.axn-checklist li {
	position: relative;
	padding-left: 32px;
	font-size: var(--type-body-m-size);
	line-height: var(--type-body-m-line);
	color: var(--text-primary);
}

.is-style-check li::before,
.axn-checklist li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 3px;
	width: 20px;
	height: 20px;
	background: var(--text-accent);
	-webkit-mask: url("../icons/check.svg") center / 20px 20px no-repeat;
	mask: url("../icons/check.svg") center / 20px 20px no-repeat;
}

/* ---------- Icon slot ----------
   Lucide icon drawn as a mask so it takes currentColor. In patterns: an empty group with
   class "axn-ico axn-ico--{name}". Size M (20px) with .axn-ico--m. */
.axn-ico {
	display: block;
	flex: none;
	width: 24px;
	height: 24px;
	background: currentColor;
	-webkit-mask: var(--axn-ico) center / contain no-repeat;
	mask: var(--axn-ico) center / contain no-repeat;
}

.axn-ico.axn-ico--m { width: 20px; height: 20px; }

/* Inline-SVG form of the slot (Elementor widgets, axn_icon()): the SVG draws itself. */
svg.axn-ico {
	background: none;
	-webkit-mask: none;
	mask: none;
}
.axn-ico--mic { --axn-ico: url("../icons/mic.svg"); }
.axn-ico--chart-column { --axn-ico: url("../icons/chart-column.svg"); }
.axn-ico--headphones { --axn-ico: url("../icons/headphones.svg"); }
.axn-ico--shield-check { --axn-ico: url("../icons/shield-check.svg"); }
.axn-ico--file-text { --axn-ico: url("../icons/file-text.svg"); }
.axn-ico--check { --axn-ico: url("../icons/check.svg"); }
.axn-ico--globe { --axn-ico: url("../icons/globe.svg"); }
.axn-ico--linkedin { --axn-ico: url("../icons/linkedin.svg"); }
.axn-ico--arrow-right { --axn-ico: url("../icons/arrow-right-24.svg"); }

/* ---------- Divider ---------- */
.axn-divider,
.wp-block-separator.axn-divider {
	width: 100%;
	height: 1px;
	margin: 0;
	border: 0;
	background: var(--border-subtle);
	opacity: 1;
}

/* ---------- Media placeholder ----------
   Grey slot where client imagery will land. Replace with an image block; images inside
   .axn-media fill the slot with object-fit: cover. */
.axn-media {
	position: relative;
	overflow: hidden;
	border-radius: var(--radius-16);
	background: var(--c-neutral-200);
}

.axn-media img,
.axn-media .wp-block-image,
.axn-media .wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
}

.axn-media .axn-tag {
	position: absolute;
	left: var(--space-24);
	bottom: var(--space-24);
}

/* ---------- Card / Resource (newsletter + case card) ---------- */
.axn-resource-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: auto;
	overflow: hidden;
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-12);
	background: var(--c-white);
	color: var(--c-navy);
}

.axn-resource-card__media {
	position: relative;
	height: 225px;
	overflow: hidden;
	background: var(--c-neutral-200);
}

.axn-resource-card__img,
.axn-resource-card__media > * {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 400ms var(--ease);
}

.axn-resource-card:hover .axn-resource-card__media > * {
	transform: scale(1.03);
}

.axn-cover-plate {
	display: grid;
	place-items: center;
	background: var(--c-navy);
}

.axn-cover-plate .axn-logo {
	width: 236px;
	height: auto;
}

.axn-resource-card__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-12);
	padding: var(--space-24);
}

/* "Dansk" marker on an issue shown in the English or Swedish archive. */
.axn-resource-card__lang {
	height: 24px;
	padding: 0 var(--space-10);
	background: var(--c-pale-blue);
	color: var(--c-dark-blue);
}

.axn-resource-card__meta {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: var(--space-8);
	width: 100%;
	font-size: var(--type-meta-size);
	line-height: var(--type-meta-line);
	font-weight: 500;
	letter-spacing: 0.02em;
	color: var(--c-neutral-700);
}

.axn-dot {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: var(--c-neutral-300);
}

.axn-resource-card__title {
	font-family: var(--font-display);
	font-size: var(--type-h5-size);
	line-height: var(--type-h5-line);
	font-weight: 600;
	letter-spacing: -0.005em;
	color: var(--c-navy);
}

.axn-resource-card__title a {
	color: inherit;
	text-decoration: none;
}

/* The whole card is the link target. */
.axn-resource-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.axn-resource-card__title a:focus-visible {
	outline: none;
}

.axn-resource-card__title a:focus-visible::after {
	outline: 2px solid var(--c-navy);
	outline-offset: -2px;
}

.axn-resource-card__excerpt {
	font-size: var(--type-body-s-size);
	line-height: var(--type-body-s-line);
	color: var(--c-neutral-700);
}

.axn-resource-card .axn-arrow-link {
	color: var(--c-dark-blue);
}

.axn-resource-card:hover .axn-arrow-link::after {
	transform: translateX(2px);
}

/* Reveal-on-scroll hook used by site.js (respects reduced motion). */
@media (prefers-reduced-motion: no-preference) {
	.js .axn-reveal {
		opacity: 0;
		transform: translateY(16px);
		transition: opacity 600ms var(--ease), transform 600ms var(--ease);
	}

	.js .axn-reveal.is-visible {
		opacity: 1;
		transform: none;
	}
}
