/*
 * Nettsmed Innlandet Energi — main.css
 * Portert fra prototype-v2.html med design-tokens i :root.
 */

:root {
	/* Farger */
	--c-primary:        #0D7377;
	--c-primary-light:  #14919B;
	--c-primary-subtle: #E8F4F5;
	--c-heading:        #111111;
	--c-body:           #444444;
	--c-muted:          #717171;
	--c-bg:             #FFFFFF;
	--c-bg-soft:        #F7F7F5;
	--c-border:         #E5E5E3;
	--c-white:          #FFFFFF;

	/* Typografi */
	--ff-display: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--ff-body:    'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

	/* Layout */
	--container: 1280px;
	--gutter:    48px;
	--gutter-sm: 24px;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
	font-family: var(--ff-body);
	color: var(--c-body);
	background: var(--c-bg);
	line-height: 1.7;
	font-size: 17px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }
a { color: inherit; }

/* ─── A11Y ─── */
.skip-link.screen-reader-text {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--c-heading);
	color: var(--c-white);
	padding: 0.5rem 1rem;
	z-index: 200;
	border-radius: 4px;
}
.skip-link.screen-reader-text:focus {
	left: 1rem;
	top: 1rem;
	clip: auto;
	clip-path: none;
	width: auto;
	height: auto;
}
.visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0);
	white-space: nowrap; border: 0;
}
:focus-visible {
	outline: 2px solid var(--c-primary);
	outline-offset: 2px;
	border-radius: 3px;
}

/* ─── DEV BANNER (blog_public=0) ─── */
body.is-dev::before {
	content: 'DEV — energi.nettsmed.dev (ikke offentlig)';
	display: block;
	background: #FEF3C7;
	color: #78350F;
	text-align: center;
	font-size: 0.75rem;
	padding: 0.25rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	letter-spacing: 0.5px;
}

/* ─── HEADER ─── */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255,255,255,0.92);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--c-border);
	transition: box-shadow 0.2s, border-bottom-color 0.2s;
}
.site-header.is-scrolled {
	border-bottom-color: transparent;
	box-shadow: 0 1px 12px rgba(0,0,0,0.06);
}
.header-inner {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 var(--gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 72px;
}
.logo {
	text-decoration: none;
	color: var(--c-heading);
	font-family: var(--ff-display);
	font-weight: 700;
	font-size: 1.2rem;
	letter-spacing: -0.4px;
	display: flex;
	align-items: center;
	gap: 14px;
}
.logo-dot {
	width: 10px;
	height: 10px;
	background: var(--c-primary);
	border-radius: 50%;
	flex-shrink: 0;
	display: inline-block;
}
.logo-text-faded {
	font-weight: 400;
	color: var(--c-muted);
}
.main-nav {
	display: flex;
	gap: 8px;
	align-items: center;
}
.main-nav a {
	text-decoration: none;
	color: var(--c-muted);
	font-size: 0.95rem;
	font-weight: 500;
	padding: 8px 16px;
	border-radius: 8px;
	transition: color 0.2s, background 0.2s;
	font-family: var(--ff-body);
}
.main-nav a:hover {
	color: var(--c-heading);
	background: var(--c-bg-soft);
}
.main-nav .nav-cta {
	background: var(--c-heading);
	color: var(--c-white);
	border-radius: 100px;
	padding: 8px 24px;
	font-weight: 600;
}
.main-nav .nav-cta:hover {
	background: #333;
}
.mobile-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	color: var(--c-heading);
}
.mobile-toggle svg {
	width: 24px;
	height: 24px;
	stroke: currentColor;
	stroke-width: 2;
	fill: none;
}
.mobile-menu {
	display: none;
	background: var(--c-bg);
	border-bottom: 1px solid var(--c-border);
	padding: 12px var(--gutter);
}
.mobile-menu a {
	display: block;
	padding: 12px 0;
	color: var(--c-heading);
	text-decoration: none;
	font-weight: 500;
	border-bottom: 1px solid var(--c-border);
}
.mobile-menu a:last-child {
	border-bottom: none;
}
.mobile-menu.is-open {
	display: block;
}

/* ─── HERO ─── */
.hero {
	max-width: var(--container);
	margin: 0 auto;
	padding: 80px var(--gutter) 0;
}
.hero h1 {
	font-family: var(--ff-display);
	font-size: clamp(3rem, 5.5vw, 4.5rem);
	font-weight: 700;
	color: var(--c-heading);
	line-height: 1.05;
	letter-spacing: -1.5px;
	max-width: 800px;
	margin-bottom: 32px;
	text-wrap: balance;
}
.hero-sub {
	font-size: 1.25rem;
	color: var(--c-muted);
	max-width: 600px;
	line-height: 1.65;
	margin-bottom: 56px;
	font-weight: 400;
}
.hero-image {
	width: 100%;
	height: 520px;
	border-radius: 20px;
	overflow: hidden;
	position: relative;
	margin: 0;
}
.hero-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 35%;
	transition: transform 8s ease-out;
}
.hero-image:hover img {
	transform: scale(1.03);
}
.hero-image-caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 40px;
	background: linear-gradient(0deg, rgba(0,0,0,0.55) 0%, transparent 100%);
	display: flex;
	gap: 48px;
	margin: 0;
	color: var(--c-white);
}
.hero-stat {
	display: flex;
	flex-direction: column;
}
.hero-stat .number {
	font-family: var(--ff-display);
	font-size: 2.5rem;
	font-weight: 700;
	letter-spacing: -1px;
	line-height: 1;
}
.hero-stat .label {
	font-size: 0.9rem;
	opacity: 0.8;
	margin-top: 6px;
	font-weight: 400;
}
.hero-image-credit {
	font-size: 0.8rem;
	color: var(--c-muted);
	margin-top: 12px;
	font-style: italic;
}

/* ─── SECTIONS ─── */
.section {
	max-width: var(--container);
	margin: 0 auto;
	padding: 120px var(--gutter);
}
.section-no-top {
	padding-top: 0;
}
.section-inner-wide {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 var(--gutter);
}
.section-label {
	font-family: var(--ff-body);
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--c-primary);
	margin-bottom: 16px;
	letter-spacing: 0.5px;
	text-transform: none;
}
.section-title {
	font-family: var(--ff-display);
	font-size: clamp(2.25rem, 4vw, 3.25rem);
	font-weight: 700;
	color: var(--c-heading);
	line-height: 1.1;
	letter-spacing: -1px;
	margin-bottom: 20px;
	text-wrap: balance;
}
.section-intro {
	font-size: 1.15rem;
	color: var(--c-muted);
	max-width: 620px;
	line-height: 1.7;
}

/* ─── ABOUT ─── */
.about-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 80px;
	align-items: start;
	margin-top: 64px;
}
.about-text p {
	font-size: 1.1rem;
	line-height: 1.8;
	color: var(--c-body);
	margin-bottom: 24px;
}
.about-diagram {
	background: var(--c-bg-soft);
	border-radius: 20px;
	padding: 48px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
}
.diagram-node {
	width: 100%;
	padding: 20px 28px;
	border-radius: 12px;
	text-align: center;
	font-family: var(--ff-display);
	font-weight: 600;
	font-size: 1.05rem;
}
.diagram-node-light {
	background: var(--c-white);
	border: 1px solid var(--c-border);
	color: var(--c-heading);
}
.diagram-node-active {
	background: var(--c-primary);
	color: var(--c-white);
}
.diagram-node small {
	display: block;
	font-weight: 400;
	font-size: 0.85rem;
	margin-top: 4px;
	opacity: 0.7;
}
.diagram-arrow {
	color: var(--c-muted);
	font-size: 1.5rem;
	line-height: 1;
}

/* ─── PURPOSE CARDS ─── */
.purpose-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-top: 40px;
}
.purpose-card {
	padding: 36px;
	border-radius: 16px;
	border: 1px solid var(--c-border);
	transition: border-color 0.2s, box-shadow 0.25s, transform 0.25s;
}
.purpose-card:hover {
	border-color: var(--c-primary-light);
	box-shadow: 0 8px 30px rgba(13, 115, 119, 0.06);
	transform: translateY(-3px);
}
.purpose-card h3 {
	font-family: var(--ff-display);
	font-size: 1.2rem;
	font-weight: 600;
	color: var(--c-heading);
	margin-bottom: 10px;
}
.purpose-card p {
	color: var(--c-muted);
	line-height: 1.65;
	font-size: 1rem;
}
.purpose-icon {
	width: 48px;
	height: 48px;
	background: var(--c-primary-subtle);
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 20px;
}
.purpose-icon svg {
	width: 24px;
	height: 24px;
	stroke: var(--c-primary);
	fill: none;
	stroke-width: 1.75;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ─── LANDSCAPE BREAK ─── */
.landscape-break {
	position: relative;
	width: 100%;
	height: 420px;
	overflow: hidden;
	margin: 0;
}
.landscape-break img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 60%;
}
.landscape-break-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 15%, rgba(255,255,255,0) 85%, rgba(247,247,245,1) 100%);
}
.landscape-break-caption {
	position: absolute;
	bottom: 16px;
	right: 24px;
	background: rgba(255,255,255,0.85);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	padding: 6px 14px;
	border-radius: 100px;
	font-size: 0.8rem;
	color: var(--c-heading);
	font-weight: 500;
}

/* ─── OWNERS ─── */
.owners-bg {
	background: var(--c-bg-soft);
	padding: 120px 0;
}
.owner-layout {
	display: grid;
	grid-template-columns: 0.4fr 0.6fr;
	gap: 80px;
	align-items: start;
	margin-top: 64px;
}
.owner-sidebar {
	position: sticky;
	top: 100px;
}
.owner-big-number {
	font-family: var(--ff-display);
	font-size: clamp(4rem, 8vw, 6rem);
	font-weight: 800;
	color: var(--c-heading);
	line-height: 0.9;
	letter-spacing: -3px;
	margin-bottom: 8px;
}
.owner-big-label {
	font-size: 1.15rem;
	color: var(--c-muted);
	margin-bottom: 32px;
	font-weight: 400;
}
.owner-sidebar p {
	font-size: 1.05rem;
	color: var(--c-body);
	line-height: 1.75;
}
.owner-table-wrap {
	border-radius: 16px;
	overflow: hidden;
	background: var(--c-white);
	border: 1px solid var(--c-border);
}
.owner-table {
	width: 100%;
	border-collapse: collapse;
}
.owner-table th {
	padding: 16px 28px;
	text-align: left;
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: var(--c-muted);
	border-bottom: 1px solid var(--c-border);
	background: var(--c-white);
}
.owner-table th:last-child {
	text-align: right;
}
.owner-table td {
	padding: 14px 28px;
	border-bottom: 1px solid var(--c-border);
	font-size: 0.95rem;
}
.owner-table .owner-share {
	text-align: right;
	font-variant-numeric: tabular-nums;
	font-weight: 500;
	color: var(--c-heading);
}
.owner-table tbody tr:last-child td {
	border-bottom: none;
}
.owner-table tbody tr:hover {
	background: var(--c-bg-soft);
}
.owner-table .major,
.owner-table .row-major .owner-name {
	font-weight: 600;
	color: var(--c-heading);
}
.owner-table a {
	color: var(--c-heading);
	text-decoration: none;
	border-bottom: 1px dashed transparent;
	transition: border-color 0.15s;
}
.owner-table a:hover,
.owner-table a:focus-visible {
	border-bottom-color: var(--c-primary);
}

/* ─── ORG ─── */
.org-header {
	margin-bottom: 64px;
}
.org-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
.org-card {
	border: 1px solid var(--c-border);
	border-radius: 16px;
	overflow: hidden;
	transition: box-shadow 0.25s, border-color 0.2s;
}
.org-card:hover {
	box-shadow: 0 4px 24px rgba(0,0,0,0.04);
	border-color: #ccc;
}
.org-card-header {
	padding: 28px 28px 20px;
	border-bottom: 1px solid var(--c-border);
}
.org-card-header h3 {
	font-family: var(--ff-display);
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--c-heading);
}
.org-card-header .meta {
	font-size: 0.85rem;
	color: var(--c-muted);
	margin-top: 4px;
}
.org-card-body {
	padding: 8px 28px 28px;
}
.org-person {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 0;
	border-bottom: 1px solid var(--c-border);
	gap: 16px;
}
.org-person:last-child {
	border-bottom: none;
}
.org-person .name {
	font-weight: 500;
	color: var(--c-heading);
	font-size: 0.95rem;
}
.org-person .role {
	font-size: 0.8rem;
	color: var(--c-muted);
}
.org-person .role-leader {
	color: var(--c-primary);
	font-weight: 600;
}
.dl-card {
	margin-top: 24px;
	padding: 36px;
	border-radius: 16px;
	background: var(--c-bg-soft);
	display: flex;
	gap: 24px;
	align-items: center;
}
.dl-label {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--c-primary);
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 4px;
}
.dl-card h3 {
	font-family: var(--ff-display);
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--c-heading);
}
.dl-card p {
	font-size: 0.95rem;
	color: var(--c-muted);
	margin-top: 4px;
}

/* ─── DOKUMENTER + FINANS ─── */
.docs-intro {
	max-width: 720px;
}
.docs-intro-lead {
	font-size: 1.1rem;
	color: var(--c-body);
	line-height: 1.75;
	margin-top: 12px;
}
.docs-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 40px;
	margin-top: 64px;
}
.info-block h3 {
	font-family: var(--ff-display);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--c-heading);
	margin-bottom: 16px;
}
.info-note {
	color: var(--c-muted);
	font-size: 0.95rem;
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--c-border);
}
.doc-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.doc-list a {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 18px;
	background: var(--c-bg-soft);
	border-radius: 12px;
	text-decoration: none;
	color: var(--c-heading);
	font-weight: 500;
	transition: background 0.2s, box-shadow 0.2s;
}
.doc-list a:hover,
.doc-list a:focus-visible {
	background: var(--c-primary-subtle);
	box-shadow: 0 2px 12px rgba(13, 115, 119, 0.06);
}
.doc-list a svg {
	width: 20px;
	height: 20px;
	stroke: var(--c-primary);
	fill: none;
	stroke-width: 1.75;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex-shrink: 0;
}
.doc-list .doc-title {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
	line-height: 1.3;
	font-size: 0.95rem;
}
.doc-list .doc-meta {
	font-size: 0.78rem;
	font-weight: 400;
	color: var(--c-muted);
	letter-spacing: 0.1px;
}
.doc-list .tag {
	font-size: 0.7rem;
	color: var(--c-muted);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	flex-shrink: 0;
}

/* ─── KONTAKT ─── */
.contact-section {
	position: relative;
	overflow: hidden;
}
.contact-bg-image {
	position: absolute;
	inset: 0;
	z-index: 0;
}
.contact-bg-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 50%;
}
.contact-bg-image::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg,
		rgba(247,247,245,1) 0%,
		rgba(247,247,245,0.92) 20%,
		rgba(247,247,245,0.85) 50%,
		rgba(247,247,245,0.95) 100%
	);
}
.contact-content {
	position: relative;
	z-index: 1;
	padding: 120px 0;
}
.contact-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 80px;
	align-items: start;
}
.contact-info h3 {
	font-family: var(--ff-display);
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--c-heading);
	margin-bottom: 4px;
}
.contact-role {
	font-size: 0.85rem;
	color: var(--c-primary);
	font-weight: 600;
	margin-bottom: 24px;
}
.contact-detail {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 0;
	font-size: 1.05rem;
}
.contact-detail svg {
	width: 20px;
	height: 20px;
	stroke: var(--c-primary);
	fill: none;
	stroke-width: 1.75;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex-shrink: 0;
}
.contact-detail a {
	color: var(--c-heading);
	text-decoration: none;
	font-weight: 500;
}
.contact-detail a:hover,
.contact-detail a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}
.contact-message {
	padding: 48px;
	background: rgba(255,255,255,0.85);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-radius: 20px;
	border: 1px solid var(--c-border);
}
.contact-message h3 {
	font-family: var(--ff-display);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--c-heading);
	margin-bottom: 16px;
}
.contact-message p {
	color: var(--c-muted);
	line-height: 1.7;
	margin-bottom: 28px;
}
.btn-primary {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: var(--c-heading);
	color: var(--c-white);
	padding: 14px 32px;
	border-radius: 100px;
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	font-family: var(--ff-body);
	transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover,
.btn-primary:focus-visible {
	background: #333;
	transform: translateY(-1px);
}
.btn-primary svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ─── FOOTER ─── */
.site-footer {
	border-top: 1px solid var(--c-border);
	padding: 64px var(--gutter);
	max-width: var(--container);
	margin: 0 auto;
}
.footer-inner {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr;
	gap: 64px;
}
.footer-brand {
	font-family: var(--ff-display);
	font-weight: 700;
	font-size: 1.1rem;
	color: var(--c-heading);
	margin-bottom: 16px;
}
.footer-brand span {
	font-weight: 400;
	color: var(--c-muted);
}
.footer-desc {
	font-size: 0.95rem;
	color: var(--c-muted);
	line-height: 1.6;
	max-width: 340px;
}
.footer-orgnr {
	font-size: 0.85rem;
	color: var(--c-muted);
	margin-top: 12px;
	font-variant-numeric: tabular-nums;
}
.footer-col h4 {
	font-family: var(--ff-display);
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--c-heading);
	margin-bottom: 16px;
}
.footer-col ul {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.footer-col a {
	color: var(--c-muted);
	text-decoration: none;
	font-size: 0.95rem;
	transition: color 0.2s;
}
.footer-col a:hover,
.footer-col a:focus-visible {
	color: var(--c-heading);
}
.footer-bottom {
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--c-border);
	font-size: 0.85rem;
	color: var(--c-muted);
}

/* ─── REVEAL ─── */
@media (prefers-reduced-motion: no-preference) {
	.reveal {
		opacity: 0;
		transform: translateY(24px);
		transition: opacity 0.7s ease, transform 0.7s ease;
	}
	.reveal.is-visible {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ─── RESPONSIVE ─── */
@media (max-width: 960px) {
	.hero { padding: 48px var(--gutter-sm) 0; }
	.section { padding: 80px var(--gutter-sm); }
	.header-inner { padding: 0 var(--gutter-sm); }
	.section-inner-wide { padding: 0 var(--gutter-sm); }
	.about-layout,
	.owner-layout,
	.org-grid,
	.docs-grid,
	.contact-layout,
	.footer-inner,
	.purpose-grid {
		grid-template-columns: 1fr;
		gap: 48px;
	}
	.docs-grid { gap: 32px; }
	.org-grid { gap: 24px; }
	.owner-sidebar { position: static; }
	.main-nav { display: none; }
	.mobile-toggle { display: block; }
	.hero-image { height: 320px; border-radius: 16px; }
	.hero h1 { letter-spacing: -0.5px; }
	.hero-image-caption { gap: 24px; padding: 24px; }
	.hero-stat .number { font-size: 1.75rem; }
	.landscape-break { height: 280px; }
	.site-footer { padding: 48px var(--gutter-sm); }
	.contact-message { padding: 32px; }
	.about-diagram { padding: 32px; }
}

@media (max-width: 600px) {
	.hero-image-caption { flex-wrap: wrap; gap: 16px; padding: 20px; }
	.hero-image { height: 260px; }
	.landscape-break { height: 200px; }
	.owner-table th,
	.owner-table td { padding: 12px 16px; }
	.dl-card { padding: 24px; }
}
