/* Fpr.Blazor.Shared – fælles FPR-design: farver ("FPR farver 2026"), typografi, layout, header/footer, knapper og formularer.
   Linkes fra sitet som _content/Fpr.Blazor.Shared/fpr.css */
@font-face { font-family: "Google Sans"; font-weight: 400; font-display: swap; src: url("fonts/GoogleSans-Regular.ttf") format("truetype"); }
@font-face { font-family: "Google Sans"; font-weight: 600; font-display: swap; src: url("fonts/GoogleSans-SemiBold.ttf") format("truetype"); }

:root {
    /* Primære */
    --navy: #003144;
    --petrol: #005D80;
    --blue: #8DB1D1;
    /* Kontrast */
    --pink: #EC627E;
    --orange: #E69300;
    /* Sekundære toner */
    --steel: #7B99AC;
    --blue-200: #B6CBD8;
    --blue-100: #C7D8E2;
    --blue-50: #ECF2F6;
    --sand: #EEEAE1;
    --sand-dark: #DDD5B1;
    --sage: #87A8A2;
    --sage-light: #CDD7D0;
    --green: #8DA184;

    --font-body: "Google Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-display: "Sofia Sans Extra Condensed", "Arial Narrow", sans-serif;
    --font-cond: "Sofia Sans Condensed", "Arial Narrow", sans-serif;
    --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; font-family: var(--font-body); font-size: 17px; line-height: 1.55; color: var(--navy); background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--petrol); }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
h1:focus { outline: none; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* Layout */
.container { max-width: var(--container); margin: 0 auto; padding-inline: 24px; }
.section { padding-block: 88px; }
.stack { display: flex; flex-direction: column; gap: 36px; }
.band { background: var(--blue-100); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px 64px; }
.split--end { align-items: end; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: 12px 16px; z-index: 110; }
.skip-link:focus { left: 0; }

/* Typografi */
.eyebrow { margin: 0 0 8px; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--petrol); }
.display { margin: 0; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; line-height: .92; font-size: clamp(44px, 5vw, 72px); }
.display--xl { font-size: clamp(52px, 7vw, 96px); }
.cond { font-family: var(--font-cond); font-weight: 700; text-transform: uppercase; }
.label { margin: 0; font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.prose { font-size: 16px; }
.prose .lead { font-weight: 600; font-size: 19px; }

/* Knapper */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 28px; border: 0; font: inherit; font-weight: 600; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.btn--light { background: var(--blue); color: var(--navy); }
.btn--light:hover { background: var(--blue-200); color: var(--navy); }
.btn--dark { background: var(--navy); color: #fff; }
.btn--dark:hover { background: var(--petrol); color: #fff; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--blue-50); transition: box-shadow .25s ease; }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; transition: padding-block .25s ease; }
.site-header__logo { height: 52px; width: auto; transition: height .25s ease; }
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(0, 49, 68, .12); }
.site-header.is-scrolled .site-header__inner { padding-block: 8px; }
.site-header.is-scrolled .site-header__logo { height: 38px; }
@media (prefers-reduced-motion: reduce) { .site-header, .site-header__inner, .site-header__logo { transition: none; } }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; font-size: 16px; }
.site-nav a:not(.btn) { color: var(--navy); text-decoration: none; padding-block: 10px; }
.site-nav a:not(.btn):hover, .site-nav a.active { color: var(--petrol); text-decoration: underline; text-underline-offset: 6px; }
.site-nav .btn { min-height: 44px; padding: 8px 22px; text-transform: none; letter-spacing: 0; font-size: 16px; }
@media (max-width: 600px) {    .site-header__inner { gap: 6px 16px; padding-block: 10px; }    .site-header__logo { height: 40px; }    .site-nav { width: 100%; gap: 4px 18px; font-size: 15px; }    .site-nav .btn { margin-left: auto; min-height: 40px; padding: 6px 14px; font-size: 15px; }    .site-header.is-scrolled .site-header__inner { padding-block: 4px; gap: 0 16px; }    .site-header.is-scrolled .site-header__logo { height: 28px; }}

/* Footer */
.site-footer { background: var(--blue-200); font-size: 15px; line-height: 1.35; }
.site-footer__grid { display: grid; grid-template-columns: 1.1fr 1.4fr .8fr 2fr; gap: 32px 40px; align-items: start; padding-block: 64px 96px; }
.site-footer .site-footer__label { margin: 0; font-family: var(--font-cond); font-weight: 700; font-size: 17px; text-transform: uppercase; }
.site-footer p { margin: 0 0 1.35em; }
.site-footer a { color: var(--navy); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__social { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: var(--blue-200) !important; }
.site-footer__social:hover { background: var(--petrol); }
.site-footer__logo { width: 100%; max-width: 560px; justify-self: end; }
@media (max-width: 1000px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__logo { grid-column: 1 / -1; justify-self: start; } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; padding-block: 48px 64px; } }

/* Kontakt – holdet (Pages/Kontakt.razor) */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; }
.contact-box { background: var(--blue-50); padding: 24px 28px; font-size: 15px; display: flex; flex-direction: column; gap: 4px; }
.contact-box strong { font-weight: 600; }
.team-group { display: flex; flex-direction: column; gap: 20px; }
.team-group h2 { margin: 0; font-size: 15px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--petrol); border-bottom: 1px solid var(--blue-100); padding-bottom: 10px; }
.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 32px 20px; }
.person { display: flex; flex-direction: column; gap: 12px; font-size: 14px; line-height: 1.4; }
.person__photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; background: var(--steel); }
.person__photo--empty { background: var(--navy); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 56px; color: var(--steel); }
.person__name { display: block; font-family: var(--font-cond); font-weight: 700; font-size: 19px; }
.person span { display: block; }

/* Persondatapolitik og andre lange tekstsider (Pages/Persondatapolitik.razor) */
.legal { max-width: 820px; font-size: 16px; }
.legal h2 { margin: 40px 0 10px; font-size: 24px; line-height: 1.15; }
.legal h2:first-child { margin-top: 0; }
.legal ul { margin: 0 0 1em; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.legal .lead { font-weight: 600; font-size: 19px; }
.complaints-officer { display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: flex-start; margin: 8px 0 1em; padding: 24px; background: var(--blue-50); }
.complaints-officer img { width: 150px; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; background: var(--steel); }
.complaints-officer p { margin: 0 0 8px; }
.complaints-officer__name { font-family: var(--font-cond); font-weight: 700; font-size: 24px; }
.site-footer__links { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

/* Formularer */
.form-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px 12px; }
.field { display: flex; flex-direction: column; gap: 4px; grid-column: span 6; }
.field--3 { grid-column: span 3; }
.field--4 { grid-column: span 4; }
.field--2 { grid-column: span 2; }
.field label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.field input, .field textarea { font: inherit; color: var(--navy); background: #fff; border: 1px solid var(--blue-200); padding: 10px 12px; min-height: 44px; width: 100%; }
.field textarea { min-height: 150px; resize: vertical; }
.field input.invalid, .field textarea.invalid { border-color: #B3261E; outline: none; }
.validation-message { color: #B3261E; font-size: 13px; }

/* Formular under afsendelse (data-busy, se Fpr.Blazor.Shared.lib.module.js): overlay med spinner, ingen klik */
form[data-busy] { position: relative; }
form.is-busy::after { content: ""; position: absolute; inset: -8px; z-index: 2; background: rgba(236, 242, 246, .7); cursor: progress; }
form.is-busy::before {
    content: ""; position: absolute; z-index: 3; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px;
    border: 5px solid var(--blue-200); border-top-color: var(--petrol); border-radius: 50%; animation: fpr-spin .8s linear infinite;
}
form.is-busy [type="submit"] { opacity: .85; }
@keyframes fpr-spin { to { transform: rotate(360deg); } }
.busy-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { form.is-busy::before { animation-duration: 2.4s; } }

@media (max-width: 800px) {
    .split { grid-template-columns: minmax(0, 1fr); }
    .section { padding-block: 56px; }
}
@media (max-width: 520px) { .field--2, .field--3, .field--4 { grid-column: span 6; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.blazor-error-boundary { background: #B3261E; padding: 1rem; color: #fff; }
.blazor-error-boundary::after { content: "Der opstod en fejl."; }

/* Animationer – indgangseffekter (se Fpr.Blazor.Shared.lib.module.js) */
:root {
    --reveal-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --reveal-dur: .9s;
    --reveal-step: 70ms;
}

/* Ved scroll: scriptet sætter .reveal-on + .is-pending på elementer under det synlige område */
.reveal-line { display: block; }
.reveal-on {
    transition: opacity var(--reveal-dur) var(--reveal-ease), transform var(--reveal-dur) var(--reveal-ease), clip-path 1.2s var(--reveal-ease);
    transition-delay: calc(var(--reveal-i, 0) * var(--reveal-step));
}
.reveal-on.is-pending { opacity: 0; transform: translateY(40px); }
.reveal-line.reveal-on.is-pending { transform: translateY(60%); }
[data-reveal="clip"].reveal-on.is-pending { opacity: 1; transform: none; clip-path: inset(100% 0 0); }

/* Ved indlæsning (ren CSS): data-reveal-load, evt. forskudt med style="--reveal-i: 1" */
@keyframes fpr-rise { from { opacity: 0; transform: translateY(40px); } }
@keyframes fpr-unclip { from { clip-path: inset(100% 0 0); } to { clip-path: inset(0); } }
[data-reveal-load] { animation: fpr-rise var(--reveal-dur) var(--reveal-ease) both; animation-delay: calc(var(--reveal-i, 0) * 120ms); }
[data-reveal-load="clip"] { animation-name: fpr-unclip; animation-duration: 1.2s; }

@media (prefers-reduced-motion: reduce) {
    [data-reveal-load] { animation: none; }
    .reveal-on { transition: none; }
    .reveal-on.is-pending { opacity: 1; transform: none; clip-path: none; }
}
