:root {
	--uia-red: #a6192e;
	--uia-red-dark: #7f1322;
	--bg: #ffffff;
	--bg-alt: #f6f4f3;
	--text: #1f1f1f;
	--text-muted: #595959;
	--border: #e6e6e6;
	--shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
	--shadow-hover: 0 10px 28px rgba(0, 0, 0, 0.1);
	--radius: 16px;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

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

body {
	margin: 0;
	font-family: "Inter", system-ui, -apple-system, sans-serif;
	color: var(--text);
	background: var(--bg);
}

a:focus-visible {
	outline: 3px solid var(--uia-red);
	outline-offset: 3px;
	border-radius: 4px;
}

header {
	position: sticky;
	top: 0;
	z-index: 10;
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}

nav ul {
	list-style: none;
	max-width: 1120px;
	margin: 0 auto;
	padding: 1rem 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

nav a {
	color: var(--uia-red);
	font-weight: 800;
	font-size: 1.25rem;
	text-decoration: none;
	letter-spacing: -0.02em;
}

.nav-links {
	display: flex;
	gap: 1.5rem;
}

.nav-links a {
	position: relative;
	padding: 0.25rem 0;
	color: var(--text);
	font-size: 1rem;
	font-weight: 600;
	transition: color 0.2s ease;
}

.nav-links a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -2px;
	height: 2px;
	border-radius: 999px;
	background: var(--uia-red);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.2s ease;
}

.nav-links a:hover {
	color: var(--uia-red);
}

.nav-links a:hover::after {
	transform: scaleX(1);
}

@media (max-width: 480px) {
	nav ul {
		padding: 0.85rem 1rem;
	}

	nav a {
		font-size: 1.1rem;
	}

	.nav-links {
		gap: 1rem;
	}

	.nav-links a {
		font-size: 0.9rem;
	}
}

.video,
.ambisjon,
.medlemmer {
	scroll-margin-top: 80px;
}

.video {
	max-width: 1120px;
	margin: 0 auto;
	padding: 4.5rem 1.5rem 5rem;
	text-align: center;
}

.video-ramme {
	width: 100%;
	max-width: 1120px;
	margin: 3rem auto 0;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 12px;
	box-shadow: var(--shadow);
}

h2 {
	margin: 0;
	font-size: 2rem;
	font-weight: 800;
	letter-spacing: -0.02em;
}

h2::after {
	content: "";
	display: block;
	width: 56px;
	height: 4px;
	margin: 0.9rem auto 0;
	border-radius: 999px;
	background: var(--uia-red);
}

.video-ramme iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.hero {
	width: 100%;
	color: #ffffff;
	background:
		radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 / 22px 22px,
		radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.16), transparent 45%),
		radial-gradient(circle at 90% 100%, rgba(0, 0, 0, 0.25), transparent 55%),
		linear-gradient(135deg, #b81d34 0%, var(--uia-red) 40%, #5c0d18 100%);
}

.hero-inner {
	max-width: 1120px;
	margin: 0 auto;
	padding: 3rem 1.5rem 3.5rem;
	display: grid;
	gap: 2.5rem;
	align-items: center;
}

.hero-content {
	text-align: center;
}

.hero-content h1 {
	margin: 0;
	font-size: clamp(2.5rem, 6vw, 4.25rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.05;
}

.hero-content h1::after {
	content: "";
	display: block;
	width: 64px;
	height: 5px;
	margin: 1.1rem auto 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.85);
}

.hero-slagord {
	margin: 1.25rem auto 0;
	font-size: clamp(1.25rem, 2.5vw, 1.6rem);
	font-weight: 700;
	letter-spacing: -0.01em;
}

.hero-tekst {
	margin: 0.75rem auto 0;
	max-width: 520px;
	font-size: 1.1rem;
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.85);
}

.hero-image {
	width: 100%;
	aspect-ratio: 1368 / 900;
	overflow: hidden;
	border-radius: 16px;
	border: 4px solid rgba(255, 255, 255, 0.15);
	box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.hero-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

@media (min-width: 900px) {
	.hero-inner {
		grid-template-columns: 1fr 1.25fr;
		gap: 3.5rem;
		padding: 4.5rem 1.5rem 5rem;
	}

	.hero-content {
		text-align: left;
	}

	.hero-content h1::after {
		margin-left: 0;
	}

	.hero-slagord,
	.hero-tekst {
		margin-left: 0;
	}
}

.ambisjon {
	max-width: 1120px;
	margin: 0 auto;
	padding: 4.5rem 1.5rem 5rem;
	text-align: center;
}

.ambisjon > p {
	margin: 3rem auto 0;
	max-width: 720px;
	text-align: left;
	color: var(--text-muted);
	font-size: 1rem;
	line-height: 1.7;
}

.ambisjon-grid {
	margin-top: 3rem;
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

.ambisjon-kort {
	padding: 2rem 1.5rem;
	background: #ffffff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	transition:
		box-shadow 0.25s ease,
		transform 0.25s ease;
}

.ambisjon-kort:hover {
	box-shadow: var(--shadow-hover);
	transform: translateY(-4px);
}

.ambisjon-ikon {
	width: 56px;
	height: 56px;
	margin: 0 auto 1.25rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--uia-red), #5c0d18);
	box-shadow: 0 8px 18px rgba(166, 25, 46, 0.25);
}

.ambisjon-ikon svg {
	width: 26px;
	height: 26px;
	fill: #ffffff;
}

.ambisjon-kort h3 {
	margin: 0 0 0.6rem;
	font-size: 1.15rem;
	font-weight: 800;
}

.ambisjon-kort p {
	margin: 0;
	color: var(--text-muted);
	font-size: 0.95rem;
	line-height: 1.6;
}

@media (min-width: 760px) {
	.ambisjon-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.medlemmer {
	max-width: 1120px;
	margin: 0 auto;
	padding: 4.5rem 1.5rem 5rem;
	text-align: center;
	/* Bakgrunnen strekkes ut til hele skjermbredden, selv om innholdet er maks 1120px */
	background: var(--bg-alt);
	box-shadow: 0 0 0 100vmax var(--bg-alt);
	clip-path: inset(0 -100vmax);
}

.medlem-grid {
	margin-top: 3rem;
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	text-align: left;
}

.medlem {
	position: relative;
	overflow: hidden;
	display: grid;
	grid-template-columns: 150px 1fr;
	gap: 1.75rem;
	padding: 2rem 1.75rem 1.75rem;
	background: #ffffff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	transition:
		box-shadow 0.25s ease,
		transform 0.25s ease,
		border-color 0.25s ease;
}

.medlem::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--uia-red), #5c0d18);
}

.medlem:hover {
	box-shadow: var(--shadow-hover);
	border-color: rgba(166, 25, 46, 0.25);
	transform: translateY(-4px);
}

.medlem-bilde img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 12px;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
	display: block;
}

.medlem-info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.medlem-info h3 {
	margin: 0 0 0.75rem;
	font-size: 1.3rem;
	font-weight: 800;
	letter-spacing: -0.01em;
}

.medlem-info p {
	margin: 0 0 1.1rem;
	color: var(--text-muted);
	font-size: 0.9rem;
	line-height: 1.55;
}

.medlem-lenker {
	margin-top: auto;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.4rem 0.75rem;
	border: 1.5px solid var(--uia-red);
	border-radius: 999px;
	color: var(--uia-red);
	background: transparent;
	font-size: 0.8rem;
	font-weight: 600;
	text-decoration: none;
	transition:
		background 0.15s ease,
		color 0.15s ease;
}

.btn svg {
	width: 14px;
	height: 14px;
	fill: currentColor;
	flex-shrink: 0;
}

.btn:hover {
	background: var(--uia-red);
	color: #ffffff;
}

@media (max-width: 480px) {
	.medlem {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.medlem-bilde img {
		max-width: 160px;
		margin: 0 auto;
	}

	.medlem-lenker {
		justify-content: center;
	}
}

.bunntekst {
	padding: 2rem 1.5rem;
	text-align: center;
	color: rgba(255, 255, 255, 0.85);
	background: linear-gradient(135deg, var(--uia-red), #5c0d18);
}

.bunntekst p {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

/* "Til toppen"-knapp: vises av scripts/til-toppen.js */
.til-toppen {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 20;
	width: 48px;
	height: 48px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 2px solid rgba(255, 255, 255, 0.7);
	border-radius: 50%;
	background: linear-gradient(135deg, var(--uia-red), #5c0d18);
	box-shadow: 0 8px 20px rgba(166, 25, 46, 0.35);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition:
		opacity 0.25s ease,
		transform 0.25s ease,
		visibility 0.25s;
}

.til-toppen.vis {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.til-toppen:hover {
	transform: translateY(-3px);
}

.til-toppen:focus-visible {
	outline: 3px solid var(--uia-red);
	outline-offset: 3px;
}

.til-toppen svg {
	width: 26px;
	height: 26px;
	fill: #ffffff;
}

/* Scroll-animasjon: klassene settes av scripts/animasjon.js */
.reveal {
	opacity: 0;
	transform: translateY(24px);
	transition:
		opacity 0.6s ease,
		transform 0.6s ease;
}

.reveal.synlig {
	opacity: 1;
	transform: none;
}
