/* Sorø Bueskyttelaug – designsystem og fælles komponenter */
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-wght-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-wght-normal.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --crimson: #e51250;
  --crimson-deep: #b50c3f;
  --crimson-soft: #fde7ee;
  --gold: #f6c33b;
  --gold-deep: #d99a0b;
  --forest: #12241a;
  --forest-2: #1b3325;
  --moss: #3c5b37;
  --sage: #dfe7d6;
  --paper: #fbf8f1;
  --paper-2: #f3ede1;
  --ink: #15191a;
  --ink-2: #4a5350;
  --line: rgba(21, 25, 26, .12);
  --white: #fff;

  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-sm: 10px; --r-md: 18px; --r-lg: 28px; --r-xl: 40px;
  --shadow-1: 0 1px 2px rgba(18, 36, 26, .06), 0 4px 14px rgba(18, 36, 26, .06);
  --shadow-2: 0 2px 6px rgba(18, 36, 26, .08), 0 24px 60px -12px rgba(18, 36, 26, .28);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --wrap: min(1180px, calc(100vw - 2.5rem));
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--f-body); font-size: clamp(1rem, .96rem + .2vw, 1.0625rem); line-height: 1.6;
  color: var(--ink); background: var(--forest);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.08; letter-spacing: -.015em; margin: 0 0 .5em; font-variation-settings: "SOFT" 50, "WONK" 0; }
h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); }
h3 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.75rem); }
p { margin: 0 0 1em; }
em.accent, h1 em, h2 em { font-style: italic; color: var(--crimson); font-weight: 500; }
.lead { font-size: clamp(1.1rem, 1rem + .45vw, 1.3rem); color: var(--ink-2); max-width: 62ch; }
.eyebrow { display: inline-flex; align-items: center; gap: .6em; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--crimson); margin-bottom: 1rem; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; border-radius: 2px; }
.muted { color: var(--ink-2); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: var(--wrap); margin-inline: auto; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: fixed; left: 1rem; top: -100px; z-index: 100; background: var(--gold); color: var(--ink); padding: .8rem 1.2rem; border-radius: var(--r-sm); font-weight: 700; text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 1rem; }

/* ---------- Knapper ---------- */
.btn {
  --bg: var(--crimson); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: .85rem 1.5rem; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--bg); color: var(--fg); font-weight: 700; font-size: 1rem; text-decoration: none; letter-spacing: .01em;
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--bg) 80%, transparent);
  transition: transform .35s var(--ease-spring), box-shadow .35s var(--ease-out), background .25s;
  position: relative; overflow: hidden; isolation: isolate;
}
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.35), transparent 60%); opacity: 0; transition: opacity .3s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px color-mix(in srgb, var(--bg) 90%, transparent); }
.btn:hover::after { opacity: 1; }
.btn:active { transform: translateY(0) scale(.98); }
.btn svg { width: 1.15em; height: 1.15em; transition: transform .35s var(--ease-spring); }
.btn:hover svg { transform: translateX(3px); }
.btn--ghost { --bg: rgba(255,255,255,.12); --fg: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn--ghost:hover { --bg: rgba(255,255,255,.22); }
.btn--light { --bg: var(--paper); --fg: var(--ink); }
.btn--dark { --bg: var(--forest); --fg: #fff; }
.btn--outline { --bg: transparent; --fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--outline:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--sm { min-height: 42px; padding: .55rem 1.1rem; font-size: .92rem; }

.chip { display: inline-flex; align-items: center; gap: .4em; padding: .3rem .75rem; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--paper-2); color: var(--ink-2); }
.chip--crimson { background: var(--crimson-soft); color: var(--crimson-deep); }
.chip--gold { background: #fff3cf; color: #7a5600; }
.chip--green { background: var(--sage); color: #29452a; }

/* ---------- Header ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; transition: background .4s, box-shadow .4s, transform .5s var(--ease-out);
}
.topbar.is-solid { background: rgba(18, 36, 26, .78); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.topbar.is-hidden { transform: translateY(-100%); }
.topbar .wrap { display: flex; align-items: center; gap: 1.25rem; }
.brand { display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; margin-right: auto; }
.brand img { width: 38px; height: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.3)); }
.brand span { font-family: var(--f-display); font-weight: 600; font-size: 1.15rem; line-height: 1.05; letter-spacing: -.01em; }
.brand small { display: block; font-family: var(--f-body); font-weight: 600; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; opacity: .7; }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a { color: rgba(255,255,255,.86); text-decoration: none; font-weight: 600; font-size: .95rem; padding: .55rem .8rem; border-radius: 999px; transition: color .2s, background .2s; }
.nav a:hover, .nav a[aria-current="true"] { color: #fff; background: rgba(255,255,255,.12); }
.menu-btn { display: none; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; place-items: center; }
.menu-btn span { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .3s var(--ease-out), background .2s; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease-out), top .3s; }
.menu-btn span::before { top: -6px; } .menu-btn span::after { top: 6px; }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { top: 0; transform: rotate(45deg); }
.menu-open .menu-btn span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 1040px) {
  .nav { position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; gap: .4rem; background: rgba(18, 36, 26, .97); opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s; }
  .nav a { font-family: var(--f-display); font-size: 1.9rem; padding: .4rem 1.2rem; }
  .menu-open .nav { opacity: 1; visibility: visible; }
  .menu-btn { display: grid; }
  .topbar .btn--header { display: none; }
}

/* ---------- Afslør-animationer ---------- */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
[data-reveal="left"] { transform: translateX(-36px); }
[data-reveal="right"] { transform: translateX(36px); }
[data-reveal="zoom"] { transform: scale(.94); }
.is-in[data-reveal], .is-in [data-reveal] { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* ---------- Footer ---------- */
.footer { position: relative; z-index: 2; background: #0c1912; color: rgba(255,255,255,.78); padding: 5rem 0 2.5rem; }
.footer a { color: #fff; text-decoration-color: rgba(255,255,255,.3); text-underline-offset: 3px; }
.footer a:hover { text-decoration-color: var(--gold); }
.footer h2 { color: #fff; font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); }
.footer h3 { color: #fff; font-family: var(--f-body); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; margin-bottom: 1rem; opacity: .7; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 3rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer-docs details { border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-docs summary { cursor: pointer; padding: .8rem 0; font-weight: 600; color: #fff; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.footer-docs summary::-webkit-details-marker { display: none; }
.footer-docs summary::after { content: "+"; font-size: 1.3rem; transition: transform .3s; }
.footer-docs details[open] summary::after { transform: rotate(45deg); }
.footer-docs ul { padding: 0 0 1rem; font-size: .92rem; }
.footer-docs .doc-type { font-size: .68rem; font-weight: 800; letter-spacing: .08em; padding: .1rem .4rem; border-radius: 4px; background: rgba(255,255,255,.1); margin-left: .4rem; }
.partners { display: flex; gap: 1rem; align-items: center; margin-top: 1.5rem; flex-wrap: wrap; }
.partners a { background: #fff; border-radius: var(--r-sm); padding: .5rem .8rem; display: block; }
.partners img { height: 44px; width: auto; }
.footer-bottom { margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; opacity: .7; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; } }

/* ---------- Lightbox / dialog ---------- */
dialog.sheet { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 92vh; width: 100%; color: var(--ink); }
dialog.sheet::backdrop { background: rgba(8, 16, 11, .82); backdrop-filter: blur(6px); }
dialog.sheet[open] { animation: sheet-in .5s var(--ease-out); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.sheet-close { position: absolute; top: .75rem; right: .75rem; z-index: 3; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); cursor: pointer; font-size: 1.5rem; line-height: 1; box-shadow: var(--shadow-1); }
.lightbox figure { margin: 0; position: relative; }
.lightbox img { width: 100%; max-height: 82vh; object-fit: contain; border-radius: var(--r-md); background: #000; }
.lightbox figcaption { color: #fff; text-align: center; padding: .9rem 1rem 0; font-size: .95rem; }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); cursor: pointer; font-size: 1.4rem; }
.lightbox .lb-prev { left: .75rem; } .lightbox .lb-next { right: .75rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
