/* UZ-it – design bygget over logoets ringe: dyb blå flader, lyse flader og cyan som accent.
   Ingen eksterne skrifttyper eller biblioteker. */

:root {
	--navy: #0b2438;
	--blue: #146197;
	--blue-dark: #0d4770;
	--cyan: #2ac4f4;
	--ice: #eef6fb;
	--ink: #14212b;
	--muted: #576775;
	--line: #dde7ef;
	--bg: #ffffff;
	--radius: 16px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--rings-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400' fill='none' stroke-linecap='round' stroke-width='22'%3E%3Ccircle cx='200' cy='200' r='180' stroke='%23ffffff' stroke-opacity='.14' stroke-dasharray='850 1131' transform='rotate%28140 200 200%29'/%3E%3Ccircle cx='200' cy='200' r='138' stroke='%232ac4f4' stroke-opacity='.5' stroke-dasharray='640 867' transform='rotate%28-30 200 200%29'/%3E%3Ccircle cx='200' cy='200' r='96' stroke='%23ffffff' stroke-opacity='.14' stroke-dasharray='450 603' transform='rotate%28200 200 200%29'/%3E%3Ccircle cx='200' cy='200' r='54' stroke='%232ac4f4' stroke-opacity='.5' stroke-dasharray='250 339' transform='rotate%2860 200 200%29'/%3E%3C/svg%3E");
	--rings-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400' fill='none' stroke-linecap='round' stroke-width='22'%3E%3Ccircle cx='200' cy='200' r='180' stroke='%23146197' stroke-opacity='.10' stroke-dasharray='850 1131' transform='rotate%28140 200 200%29'/%3E%3Ccircle cx='200' cy='200' r='138' stroke='%232ac4f4' stroke-opacity='.35' stroke-dasharray='640 867' transform='rotate%28-30 200 200%29'/%3E%3Ccircle cx='200' cy='200' r='96' stroke='%23146197' stroke-opacity='.10' stroke-dasharray='450 603' transform='rotate%28200 200 200%29'/%3E%3Ccircle cx='200' cy='200' r='54' stroke='%232ac4f4' stroke-opacity='.35' stroke-dasharray='250 339' transform='rotate%2860 200 200%29'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.7;
	color: var(--ink);
	background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-dark); }

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

h1, h2, h3 { margin: 0 0 .5em; line-height: 1.12; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2.6rem, 1.2rem + 5.4vw, 5rem); letter-spacing: -.04em; font-weight: 750; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }
p { margin: 0 0 1.1em; }

.wrap { width: min(100% - clamp(2rem, 4vw, 4rem), 1760px); margin-inline: auto; }
.wrap-narrow { width: min(100% - clamp(2rem, 4vw, 4rem), 1760px); } /* samme kant som resten; teksten begrænses af .prose */

.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--blue); color: #fff; padding: .6rem 1rem; }
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 100px; }

.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--navy); font-weight: 750; font-size: 1.35rem; letter-spacing: -.02em; }
.brand img { width: auto; height: 82px; }

.main-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: .3rem; }
.main-nav a { display: block; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.05rem; padding: .5rem 1.05rem; border-radius: 999px; transition: background .15s ease, color .15s ease; }
.main-nav a:hover { background: var(--ice); color: var(--blue); }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .current-menu-ancestor > a,
.main-nav .current_page_ancestor > a { background: var(--blue); color: #fff; }

.nav-toggle {
	display: none; align-items: center; gap: .6rem;
	background: none; border: 0; padding: .5rem 0; font: inherit; font-weight: 650; color: var(--navy); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
	display: block; width: 20px; height: 2px; background: currentColor; content: ""; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
	.js .nav-toggle { display: inline-flex; }
	.js .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); padding: .5rem 1.5rem 1.25rem; box-shadow: 0 16px 24px rgba(11, 36, 56, .08); }
	.js .main-nav.is-open { display: block; }
	.main-nav .menu { flex-direction: column; gap: .15rem; }
	.main-nav a { padding: .8rem 1rem; }
}

/* logo i header på mobil */
@media (max-width: 860px) { .header-inner { min-height: 84px; } .brand img { height: 66px; } }

/* ---------- Knapper ---------- */
.btn {
	display: inline-block; padding: .85rem 1.6rem; border-radius: 999px;
	font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
	border: 2px solid var(--blue); background: var(--blue); color: #fff;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn-light { background: #fff; border-color: #fff; color: var(--blue-dark); }
.btn-light:hover { background: var(--ice); border-color: var(--ice); color: var(--blue-dark); }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); border-color: #fff; color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Forside: introduktion ---------- */
.hero {
	position: relative; overflow: hidden; color: #fff;
	background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
	padding: clamp(4rem, 9vw, 7.5rem) 0;
}
.hero-inner { position: relative; }
.hero h1 { color: #fff; max-width: 14ch; }
.lead { font-size: 1.35rem; line-height: 1.55; color: var(--muted); max-width: 36em; margin-bottom: 2rem; }
.hero .lead { color: #d3e8f6; }

@media (max-width: 860px) {
	.hero-rings { right: -38%; width: 120vw; opacity: .5; }
}

/* Ringene i hero: samme fire buer som i logoet. Tegnes ind (trim-path), driver så langsomt. */
.hero-rings { position: absolute; right: -4%; top: 50%; width: clamp(380px, 52vw, 740px); height: auto; transform: translateY(-50%); pointer-events: none; }
.hero-rings .ring-a { stroke: rgba(255, 255, 255, .14); }
.hero-rings .ring-b { stroke: rgba(42, 196, 244, .42); }
.hero-rings .ring { stroke-dasharray: 270 360; animation: ring-in 1.5s cubic-bezier(.65, 0, .35, 1) both; }
.hero-rings .spin { transform-origin: 0 0; animation: ring-drift 70s linear infinite; }
.hero-rings .spin-1 { animation-delay: 1.6s; }
.hero-rings .spin-2 { animation-direction: reverse; animation-duration: 55s; animation-delay: 1.6s; }
.hero-rings .spin-3 { animation-duration: 45s; animation-delay: 1.6s; }
.hero-rings .spin-4 { animation-direction: reverse; animation-duration: 38s; animation-delay: 1.6s; }
.hero-rings .spin-1 .ring { animation-delay: .1s; }
.hero-rings .spin-2 .ring { animation-delay: .25s; }
.hero-rings .spin-3 .ring { animation-delay: .4s; }
.hero-rings .spin-4 .ring { animation-delay: .55s; }
/* Under sideovergangen venter vi, til overlayet er væk */
.is-arriving .hero-rings .ring, .is-arriving .hero-rings .spin { animation-play-state: paused; }
@keyframes ring-in {
	0% { stroke-dashoffset: 270; opacity: 0; rotate: 40deg; }
	6% { opacity: 1; }
	100% { stroke-dashoffset: 0; opacity: 1; rotate: 0deg; }
}
@keyframes ring-drift { to { transform: rotate(360deg); } }

/* ---------- Sektioner ---------- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-alt { background: var(--ice); }
.section-title { margin-bottom: 2rem; }

.page-head {
	position: relative; overflow: hidden; background: var(--ice);
	padding: clamp(2.5rem, 6vw, 4.5rem) 0; margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.page-head::before {
	content: ""; position: absolute; right: -4%; top: 50%; width: min(460px, 60vw); aspect-ratio: 1;
	transform: translateY(-50%); background: var(--rings-dark) center / contain no-repeat; pointer-events: none;
}
.page-head .wrap { position: relative; }
.page-head h1 { font-size: clamp(2.2rem, 1.2rem + 3.6vw, 3.6rem); margin-bottom: .25em; color: var(--navy); }
.page-head .lead { margin-bottom: 0; }
.back { font-size: .95rem; margin-bottom: 1rem; }
.back a { text-decoration: none; font-weight: 600; }
.back a:hover { text-decoration: underline; }
.page-head + .section { padding-top: 0; }
.meta { color: var(--muted); margin: 0; }

/* ---------- Services: enkle kolonner ---------- */
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 5vw, 5rem); }
.service-icon { display: block; width: 40px; height: 40px; margin-bottom: 1rem; color: var(--blue); }
.service-icon svg { width: 100%; height: 100%; }
.service h3 { margin: 0 0 .5rem; font-size: 1.4rem; }
.service h3 a { color: var(--navy); text-decoration: none; }
.service h3 a:hover { color: var(--blue); }
.service p { margin: 0 0 1rem; color: var(--muted); font-size: 1.08rem; }
.service .go { font-weight: 650; text-decoration: none; }
.service .go:hover { text-decoration: underline; }
@media (max-width: 900px) { .services { grid-template-columns: 1fr; gap: 2.5rem; } }

/* ---------- Rækker (undersider) ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 1fr 1.6fr; gap: 1rem 3rem; padding: 1.5rem 0; border-top: 1px solid var(--line); align-items: baseline; text-decoration: none; color: var(--ink); }
.rows > li:last-child .row { border-bottom: 1px solid var(--line); }
.row h3 { margin: 0; color: var(--navy); }
.row p { margin: 0; color: var(--muted); max-width: 40em; }
a.row:hover h3 { color: var(--blue); }
@media (max-width: 700px) { .row { grid-template-columns: 1fr; gap: .4rem; } }
.subpages { margin-top: 3.5rem; }

/* ---------- Portfolio: billede, titel, tekst, link ---------- */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 4vw, 4rem); }
.tile { display: flex; flex-direction: column; }
.tile-img { display: grid; place-items: center; aspect-ratio: 16 / 10; padding: 1.25rem; margin-bottom: 1.25rem; border-radius: 10px; background: #fff; text-decoration: none; }
.tile-img img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.tile-img.is-empty { background: #fff url("img/logo-mark.png") center / 48px no-repeat; }
.tile-img .tile-fallback { width: 48px; height: 48px; opacity: .45; }
.tile-name { margin: 0 0 .35rem; font-size: 1.4rem; font-weight: 700; letter-spacing: -.01em; }
.tile-name a { color: var(--navy); text-decoration: none; }
.tile-name a:hover { color: var(--blue); }
.tile-text { color: var(--muted); font-size: 1.05rem; margin: 0 0 .75rem; }
.tile-visit { font-weight: 650; text-decoration: none; }
.tile-visit:hover { text-decoration: underline; }
@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .tiles { grid-template-columns: 1fr; } }
.more-link { margin: 2.5rem 0 0; }

/* ---------- Certificeringer ---------- */
.certs-band { background: var(--navy); color: #fff; padding: clamp(3rem, 7vw, 4.5rem) 0; }
.certs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.certs img { width: 100%; max-width: 320px; height: auto; }
@media (max-width: 800px) { .certs { grid-template-columns: 1fr; } .certs img { max-width: 280px; } }

/* ---------- Afslutning ---------- */
.cta-band {
	position: relative; overflow: hidden; color: #fff;
	background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
	padding: clamp(3rem, 7vw, 4.5rem) 0;
}
.cta-band::before {
	content: ""; position: absolute; left: -8%; top: 50%; width: min(520px, 70vw); aspect-ratio: 1;
	transform: translateY(-50%) scaleX(-1); background: var(--rings-light) center / contain no-repeat; pointer-events: none;
}
.cta-inner { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.cta-inner > div { margin-left: clamp(0rem, 12vw, 9rem); }
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { margin: 0; color: #d3e8f6; font-size: 1.15rem; }
@media (max-width: 800px) { .cta-inner > div { margin-left: 0; } }

/* ---------- Indhold ---------- */
.prose { max-width: 64ch; }
.prose h2, .prose h3 { margin-top: 1.8em; }
.prose img { border-radius: 8px; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: .4em; }
.prose .btn { margin-bottom: .5rem; }
.project-hero { margin: 0 0 2rem; }
.project-hero img { width: 100%; max-width: 640px; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; background: #fff; }

.list-item { padding: 1.25rem 0; border-top: 1px solid var(--line); }
.list-item h2 { font-size: 1.4rem; margin-bottom: .3em; }
.list-item a { text-decoration: none; }

.pagination { margin-top: 2.5rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.pagination .screen-reader-text { position: absolute; left: -9999px; }
.pagination .page-numbers { padding: .4rem .9rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; }
.pagination .page-numbers.current { background: var(--blue); border-color: var(--blue); color: #fff; }

.notice { background: #fff8e1; border: 1px solid #f1d98a; border-radius: 10px; padding: 1rem 1.25rem; }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }

.form p { margin-bottom: 1.1rem; }
.form label { display: block; font-weight: 650; margin-bottom: .35rem; }
.form .optional { font-weight: 400; color: var(--muted); }
.form input[type="text"], .form input[type="email"], .form textarea {
	width: 100%; font: inherit; color: inherit; background: #fff;
	border: 1px solid #b4c3cf; border-radius: 10px; padding: .75rem 1rem;
}
.form input:focus, .form textarea:focus { outline: 3px solid rgba(42, 196, 244, .45); border-color: var(--blue); }
.form textarea { resize: vertical; min-height: 9rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.alert ul { margin: 0; padding-left: 1.1rem; }
.alert-ok { background: #e8f7ee; border: 1px solid #9ad6b0; color: #14532d; }
.alert-error { background: #fdecec; border: 1px solid #f0aaaa; color: #7f1d1d; }

.contact-side { background: var(--ice); border-radius: var(--radius); padding: 1.75rem; }
.side-title { font-size: 1.2rem; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { padding: .9rem 0; border-top: 1px solid var(--line); }
.contact-list li:first-child { border-top: 0; }
.contact-list span { display: block; font-size: .9rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--line); color: var(--muted); font-size: .97rem; }
.footer-main { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 3rem; padding: 2.75rem 0 1.5rem; }
.footer-main p { margin: 0; }
.footer-main strong { color: var(--navy); font-size: 1.1rem; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--blue); text-decoration: underline; }
.footer-bottom { padding: 1rem 0 2rem; font-size: .9rem; }

/* ---------- Sideovergang (logo-animation) ---------- */
.tt {
	position: fixed; inset: 0; z-index: 1000; background: #fff;
	display: grid; place-items: center;
	opacity: 0; visibility: hidden; pointer-events: none;
	transition: opacity .22s ease, visibility 0s linear .22s;
	--base: 0s;
}
.tt.is-active, .is-arriving .tt { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .2s ease; }
.is-arriving .tt { transition: none; }
.tt-logo { grid-area: 1 / 1; width: clamp(72px, 9vw, 92px); height: auto; }
.tt-ring { stroke-dasharray: 270 360; stroke-dashoffset: 0; transform-origin: 0 0; }

/* Ind: ringene tegnes én ad gangen udefra og ind */
.tt.is-in .tt-logo { animation: tt-pop .55s cubic-bezier(.22, 1, .36, 1) both; }
.tt.is-in .tt-ring { animation: tt-draw-in .52s cubic-bezier(.65, 0, .35, 1) both; }
/* Ud: logoet står et øjeblik og tegnes så ud igen */
.tt.is-out { --base: .14s; }
.tt.is-out .tt-logo { animation: tt-leave .5s cubic-bezier(.5, 0, .75, 0) calc(var(--base) + .1s) both; }
.tt.is-out .tt-ring { animation: tt-draw-out .48s cubic-bezier(.65, 0, .35, 1) both; }
.tt .tt-ring:nth-child(1) { animation-delay: calc(var(--base) + 0s); }
.tt .tt-ring:nth-child(2) { animation-delay: calc(var(--base) + .05s); }
.tt .tt-ring:nth-child(3) { animation-delay: calc(var(--base) + .1s); }
.tt .tt-ring:nth-child(4) { animation-delay: calc(var(--base) + .15s); }

@keyframes tt-draw-in {
	0% { stroke-dashoffset: 270; opacity: 0; rotate: 70deg; }
	8% { opacity: 1; }
	100% { stroke-dashoffset: 0; opacity: 1; rotate: 0deg; }
}
/* Ud: buen trækkes tilbage til sin ende. Dash-længden skrumper i takt med forskydningen (længde = 270 - forskydning),
   så der ikke bliver en rest af buen tilbage. */
@keyframes tt-draw-out {
	0% { stroke-dasharray: 270 360; stroke-dashoffset: 0; opacity: 1; rotate: 0deg; }
	94% { opacity: 1; }
	100% { stroke-dasharray: .01 360; stroke-dashoffset: -270; opacity: 0; rotate: -70deg; }
}
@keyframes tt-pop { from { transform: scale(.86); } to { transform: scale(1); } }
@keyframes tt-leave { from { transform: scale(1); } to { transform: scale(.9); } }

/* ---------- Bevægelse ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	html:not(.motion-ok) *, html:not(.motion-ok) *::before, html:not(.motion-ok) *::after { transition: none !important; animation: none !important; }
}
