/* Shared by all three designs: reset, a11y, BUTTON SYSTEM, mobile action dock, dialog, reveal. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font-family: var(--font-body, "Nunito Sans", system-ui, sans-serif);
  font-size: 1.0625rem; line-height: 1.65; -webkit-font-smoothing: antialiased;
  transition: background-color .4s;
}
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; margin: 0; padding: 0; }
p { margin: 0 0 1em; }
a { color: var(--primary); }
h1, h2, h3 { margin: 0 0 .5em; color: var(--ink); line-height: 1.12; font-family: var(--font-head, Georgia, serif); }
.wrap { width: min(1160px, 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: #0c2a44; padding: 10px 16px; border-radius: 10px; z-index: 200; }
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- BUTTON SYSTEM ----------
   .btn            solid (default colours = the palette's call-to-action colour, for dark/gradient backgrounds)
   .btn--primary   solid blue/green-deep, for light backgrounds
   .btn--soft      tinted, for secondary actions on light backgrounds
   .btn--outline   outline, takes the text colour of its section
   .btn--stack     two lines: label + small sub-label
   .btn--lg        taller; .btn--icon round icon-only; .btn--block full width
   States: hover lift + arrow nudge, pressed, keyboard focus ring (two-tone), 48px+ tap target. */
.btn {
  --b-bg: var(--cta-bg); --b-ink: var(--cta-ink);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .7em;
  min-height: 52px; padding: 0 1.55em; border-radius: var(--btn-radius, 999px);
  border: 2px solid var(--b-bg); background: var(--b-bg); color: var(--b-ink);
  font: 800 1rem/1.1 var(--font-ui, var(--font-body, "Nunito Sans", sans-serif)); letter-spacing: .01em;
  text-decoration: none; text-align: left; white-space: nowrap; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 20px -10px rgba(7, 30, 55, .55);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s, background-color .2s, color .2s, border-color .2s;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
}
.btn::before { /* light sweep on hover */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .55s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 16px 26px -12px rgba(7, 30, 55, .6); }
.btn:hover::before { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(.97); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .18); transition-duration: .08s; }
.btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.btn svg { flex: none; }
.btn .arrow { transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
.btn:hover .arrow { transform: translateX(5px); }
.btn--lg { min-height: 60px; padding: 0 1.9em; font-size: 1.05rem; }
.btn--block { display: flex; width: 100%; }
.btn--primary { --b-bg: var(--primary); --b-ink: #fff; }
.btn--soft { --b-bg: var(--tint-1); --b-ink: var(--primary-deep); border-color: var(--tint-1); box-shadow: none; }
.btn--soft:hover { --b-bg: #fff; border-color: var(--primary); box-shadow: 0 10px 22px -12px rgba(7, 30, 55, .35); }
.btn--outline { --b-ink: #fff; background: transparent; border-color: currentColor; box-shadow: none; }
.btn--outline:hover { background: color-mix(in srgb, currentColor 14%, transparent); box-shadow: none; }
.btn--outline.btn--dark { --b-ink: var(--primary-deep); }
.btn--icon { width: 52px; padding: 0; }
.btn--stack { gap: .8em; padding-block: 0; }
.btn__text { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.btn__sub { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .78; }
.btn__ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .28); flex: none; margin-left: -.55em; }
.btn--outline .btn__ico { background: rgba(255, 255, 255, .16); }

/* text link with arrow (in cards) */
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--primary);
  text-decoration: none; padding: 8px 0; min-height: 44px;
}
.link-arrow .arrow { transition: transform .2s; }
.link-arrow:hover .arrow, .link-arrow:focus-visible .arrow { transform: translateX(5px); }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Mobile action dock (Ring / Skriv / Find vej) ---------- */
.dock { display: none; }
@media (max-width: 960px) {
  body { padding-bottom: 92px; }
  .dock {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 80;
    display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 8px; padding: 8px;
    border-radius: var(--dock-radius, 24px); background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(7, 30, 55, .3);
  }
  .dock a {
    min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: calc(var(--dock-radius, 24px) - 8px); text-decoration: none;
    font-weight: 800; font-size: .95rem; color: var(--primary-deep); background: var(--tint-1);
    transition: transform .15s; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  }
  .dock a:first-child { background: var(--hdr-cta-bg); color: var(--hdr-cta-ink); }
  .dock a:active { transform: scale(.96); }
  .dock a:focus-visible { outline-color: var(--ink); }
  body.menu-open .dock { display: none; }
}
@media (max-width: 400px) { .dock a span { font-size: .85rem; } .dock { grid-template-columns: 1.4fr 1fr 1fr; gap: 6px; } }

/* ---------- Diploma dialog ---------- */
.diploma { border: 0; padding: 0; background: none; max-width: min(560px, 92vw); max-height: 92vh; overflow: visible; }
.diploma::backdrop { background: rgba(7, 30, 55, .72); }
.diploma img { max-height: 88vh; width: auto; margin: 0 auto; border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.diploma__close {
  position: absolute; top: -14px; right: -14px; width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: #fff; color: #0c2a44; font-size: 1.7rem; line-height: 1; cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
}

/* ---------- Reveal on scroll (only when JS is on) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
