/*
Theme Name: NIMM OS
Author: NIMM
Description: Mørkt og personlig block theme for tanker, prosjekter og reiser på nimm.no
Version: 1.1.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: nimm-os
*/

html {
	scroll-behavior: smooth;
}

body {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

a {
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
}

:where(a, button, input, textarea, select):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent-light);
	outline-offset: 4px;
}

.nimm-site-header {
	background: color-mix(in srgb, var(--wp--preset--color--background) 92%, transparent);
	border-bottom: 1px solid var(--wp--preset--color--border);
	position: relative;
	z-index: 10;
}

.nimm-brand .wp-block-site-logo img {
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: 999px;
	box-shadow: 0 0 0 4px rgba(183, 139, 74, 0.08);
}

.nimm-brand .wp-block-site-title a {
	text-decoration: none;
}

.wp-block-navigation a {
	text-decoration: none;
}

.wp-block-navigation a:hover,
.wp-block-navigation a:focus-visible {
	color: var(--wp--preset--color--accent-light);
}

.nimm-hero {
	background:
		radial-gradient(circle at 50% 10%, rgba(212, 177, 110, 0.14), transparent 34rem),
		linear-gradient(180deg, var(--wp--preset--color--surface), var(--wp--preset--color--background));
	border-bottom: 1px solid var(--wp--preset--color--border);
	overflow: hidden;
	position: relative;
}

.nimm-hero::before {
	background: radial-gradient(circle, rgba(212, 177, 110, 0.22) 0 1px, transparent 1.5px);
	background-size: 34px 34px;
	content: "";
	inset: 0;
	mask-image: linear-gradient(to bottom, black, transparent 75%);
	opacity: 0.25;
	pointer-events: none;
	position: absolute;
}

.nimm-hero > * {
	position: relative;
}

.nimm-eyebrow {
	color: var(--wp--preset--color--accent-light);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.nimm-topic-card,
.nimm-post-card {
	background: linear-gradient(145deg, var(--wp--preset--color--surface), var(--wp--preset--color--surface-alt));
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 18px;
	height: 100%;
	transition: border-color 180ms ease, transform 180ms ease;
}

.nimm-topic-card:hover,
.nimm-post-card:hover {
	border-color: var(--wp--preset--color--accent);
	transform: translateY(-3px);
}

.nimm-post-card .wp-block-post-featured-image img {
	aspect-ratio: 16 / 10;
	border-radius: 14px;
	object-fit: cover;
}

.nimm-post-card .wp-block-post-title a {
	text-decoration: none;
}

.nimm-meta,
.wp-block-post-date,
.wp-block-post-terms {
	color: var(--wp--preset--color--muted);
	font-size: 0.875rem;
}

.nimm-entry-content > * + * {
	margin-block-start: var(--wp--preset--spacing--50);
}

.nimm-entry-content :where(img, video) {
	border-radius: 14px;
}

.nimm-site-footer {
	border-top: 1px solid var(--wp--preset--color--border);
}

@media (max-width: 781px) {
	.nimm-site-header .wp-block-group.is-layout-flex {
		gap: 1rem;
	}

	.nimm-hero {
		min-height: auto !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
