@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,500&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #f4f7fa;
  --bg-deep: #eef3f8;
  --surface: #ffffff;
  --ink: #16222e;
  --muted: #5a6b7b;
  --brand: #0c6291;
  --brand-dark: #073b5a;
  --brand-deep: #052a40;
  --accent: #18a999;
  --accent-warm: #e6b566;
  --line: #e4ebf2;
  --shadow-sm: 0 1px 2px rgba(8,32,52,.06), 0 2px 8px rgba(8,32,52,.05);
  --shadow: 0 4px 12px rgba(8,32,52,.07), 0 18px 40px rgba(8,32,52,.09);
  --shadow-lg: 0 12px 28px rgba(8,32,52,.12), 0 30px 60px rgba(8,32,52,.14);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(24,169,153,.07), transparent 60%),
    radial-gradient(1000px 500px at -10% 10%, rgba(12,98,145,.08), transparent 55%),
    var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--accent); }

h1, h2, h3, .display { font-family: 'Fraunces', Georgia, 'Times New Roman', serif; }

/* ============ HERO ============ */
header.site {
  position: relative;
  color: #fff;
  text-align: center;
  padding: clamp(4rem, 12vh, 8rem) 1.5rem clamp(3rem, 9vh, 6rem);
  overflow: hidden;
  isolation: isolate;
}
header.site::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url('images/strand/pano-nk.jpg');
  background-size: cover;
  background-position: center 60%;
  transform: scale(1.05);
  filter: saturate(1.05);
}
header.site::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(5,42,64,.45) 0%, rgba(5,42,64,.35) 40%, rgba(7,59,90,.78) 100%),
    linear-gradient(115deg, rgba(12,98,145,.4), rgba(24,169,153,.28));
}
/* Inner hero (subpages) — slimmer */
header.site.compact { padding: clamp(2.5rem, 8vh, 4.5rem) 1.5rem clamp(2rem, 6vh, 3.5rem); }

header.site .eyebrow {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: .8rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  padding: .4rem 1rem;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 100px;
  backdrop-filter: blur(4px);
  margin-bottom: 1.4rem;
}
header.site h1 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 5rem);
  letter-spacing: -.01em;
  line-height: 1.02;
  text-shadow: 0 2px 30px rgba(0,0,0,.3);
}
header.site h1 a { color: #fff; }
header.site h1 a:hover { color: #fff; }
header.site p.slogan {
  margin: 1rem auto 0;
  max-width: 36ch;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  color: rgba(255,255,255,.92);
}
.hero-divider {
  display: block;
  width: 64px;
  height: 3px;
  margin: 1.6rem auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
}

/* ============ NAV ============ */
nav.main {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(228,235,242,.9);
  box-shadow: 0 4px 20px rgba(8,32,52,.05);
}
nav.main ul {
  list-style: none;
  margin: 0 auto;
  padding: 0 1rem;
  max-width: var(--maxw);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
nav.main li { position: relative; }
nav.main > ul > li > a,
nav.main > ul > li > span.label {
  display: block;
  padding: 1rem 1.05rem;
  font-size: .94rem;
  font-weight: 600;
  color: var(--ink);
  cursor: default;
  position: relative;
}
nav.main > ul > li > a { cursor: pointer; }
nav.main > ul > li > a::after {
  content: "";
  position: absolute;
  left: 1.05rem; right: 1.05rem; bottom: .6rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}
nav.main > ul > li > a:hover,
nav.main > ul > li > a.active { color: var(--brand-dark); }
nav.main > ul > li > a:hover::after,
nav.main > ul > li > a.active::after { transform: scaleX(1); }
nav.main .has-children > span.label::after { content: " ⌄"; opacity: .5; font-weight: 400; }

nav.main ul ul {
  display: block;
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, 8px);
  min-width: 210px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: .4rem;
  opacity: 0;
  visibility: hidden;
  transition: .18s ease;
}
nav.main li:hover > ul,
nav.main li:focus-within > ul { opacity: 1; visibility: visible; transform: translate(-50%, 4px); }
nav.main ul ul li a {
  display: block;
  padding: .6rem .85rem;
  border-radius: 9px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
}
nav.main ul ul li a:hover { color: var(--brand-dark); background: var(--bg-deep); }

/* Mobil-menuknap (skjult på desktop) */
.nav-toggle { display: none; }
.nav-toggle .menu-label { margin-right: auto; font-weight: 600; font-size: .98rem; letter-spacing: .01em; }
.nav-toggle .burger { display: inline-flex; flex-direction: column; gap: 5px; width: 24px; }
.nav-toggle .burger span {
  height: 2px; width: 100%; border-radius: 2px;
  background: var(--brand-dark);
  transition: transform .25s ease, opacity .2s ease;
}

/* ============ MOBIL-MENU ============ */
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem 1.3rem;
    background: none;
    border: none;
    color: var(--brand-dark);
    font-family: inherit;
    cursor: pointer;
  }
  nav.main.open .nav-toggle .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  nav.main.open .nav-toggle .burger span:nth-child(2) { opacity: 0; }
  nav.main.open .nav-toggle .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  nav.main > ul {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .32s ease;
  }
  nav.main.open > ul {
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    border-top: 1px solid var(--line);
    padding-bottom: .5rem;
  }
  nav.main > ul > li { width: 100%; }
  nav.main > ul > li > a,
  nav.main > ul > li > span.label {
    padding: .95rem 1.3rem;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }
  nav.main > ul > li > a::after { display: none; }
  nav.main .has-children > span.label {
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .8rem;
    font-weight: 700;
  }
  nav.main .has-children > span.label::after { content: ""; }

  /* Undermenuer: altid foldet ud, indrykket, stablet lodret */
  nav.main ul ul {
    display: block;
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    padding: 0;
    margin: 0;
    background: var(--bg-deep);
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  /* Undgå at tap/hover på en sektion (fx Div.) rykker undermenuen ud af skærmen */
  nav.main li:hover > ul,
  nav.main li:focus-within > ul { transform: none; }
  nav.main ul ul li { width: 100%; }
  nav.main ul ul li a {
    padding: .85rem 1.3rem;
    text-align: center;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    font-size: .98rem;
  }
}

/* ============ LAYOUT ============ */
.wrap {
  max-width: var(--maxw);
  margin: clamp(2rem, 6vh, 4rem) auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
  align-items: start;
}
.wrap.single { grid-template-columns: 1fr; max-width: 880px; }
@media (max-width: 900px) { .wrap { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.6rem, 4vw, 2.8rem);
}
.card.lift { transition: transform .25s ease, box-shadow .25s ease; }
.card.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.card h2.title {
  margin: 0 0 .4rem;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--brand-dark);
}
.card h2.title strong { color: var(--brand); font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.lead { font-size: 1.1rem; color: var(--muted); margin-top: .4rem; }

/* ============ ARTICLE ============ */
.article h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--brand-dark);
  margin: 0 0 .6rem;
}
.article h2 {
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--brand);
  margin: 2.4rem 0 .6rem;
  padding-left: .85rem;
  border-left: 4px solid var(--accent);
}
.article p { margin: 1.1rem 0; color: #2a3845; }
.article hr { border: none; border-top: 1px solid var(--line); margin: 2.4rem 0; }
.article figure { margin: 2rem 0; text-align: center; }
.article figure img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  cursor: zoom-in;
  transition: transform .25s ease, box-shadow .25s ease;
}
.article figure img:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.article figure figcaption {
  margin-top: .7rem;
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--muted);
  font-size: .95rem;
}
.breadcrumb { color: var(--muted); font-size: .88rem; margin-bottom: 1.2rem; letter-spacing: .01em; }

/* ============ SECTION LIST (home) ============ */
.section-list { margin: 2rem 0 0; }
.section-list h3 {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 2rem 0 .5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--brand-dark);
}
.section-list h3::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  flex: none;
}
.section-list > p { margin: .2rem 0 0 1.6rem; color: var(--muted); }
.section-list dl { margin: .4rem 0 0 1.6rem; }
.section-list dt { font-weight: 600; margin-top: .7rem; color: var(--ink); }
.section-list dd { margin: 0; color: var(--muted); }

/* ============ GALLERY GRID ============ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.1rem;
  margin-top: 1.6rem;
}
.gallery-grid a {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 3 / 2;
  position: relative;
  cursor: zoom-in;
}
.gallery-grid a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(5,42,64,.35));
  opacity: 0;
  transition: opacity .25s ease;
}
.gallery-grid img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.gallery-grid a:hover { box-shadow: var(--shadow); }
.gallery-grid a:hover img { transform: scale(1.08); }
.gallery-grid a:hover::after { opacity: 1; }

/* ============ SIDEBAR FEED ============ */
aside .card { padding: 1.6rem; }
aside h2.feed-title { margin: 0; font-size: 1.25rem; font-weight: 600; line-height: 1.25; }
aside .feed-tag {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: 'Inter', sans-serif;
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 600; color: var(--accent);
  margin-bottom: .6rem;
}
aside .feed-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(24,169,153,.18); }
aside .feed-date { color: var(--muted); font-size: .85rem; margin: .3rem 0 1.2rem; }
.news { list-style: none; margin: 0; padding: 0; }
.news li { padding: 1rem 0; border-top: 1px solid var(--line); }
.news li:first-child { border-top: none; padding-top: 0; }
.news a { font-weight: 600; font-size: .98rem; line-height: 1.35; display: inline-block; }
.news p { margin: .4rem 0 0; font-size: .88rem; color: var(--muted); }

/* ============ FOOTER ============ */
footer.site {
  margin-top: 3rem;
  background: linear-gradient(180deg, var(--brand-dark), var(--brand-deep));
  color: rgba(255,255,255,.82);
  text-align: center;
  padding: 2.6rem 1.5rem;
}
footer.site p { margin: .3rem 0; font-size: .9rem; }
footer.site .footer-mark {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: .04em;
  margin-bottom: .6rem;
}
footer.site a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
footer.site a:hover { color: var(--accent-warm); }

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vmin;
  background: rgba(5,20,32,.88);
  backdrop-filter: blur(8px);
  cursor: zoom-out;
  opacity: 0;
  transition: opacity .25s ease;
}
.lightbox.open { display: flex; opacity: 1; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  animation: lb-in .3s cubic-bezier(.2,.7,.2,1);
}
.lightbox .lb-close {
  position: absolute;
  top: 2vmin; right: 2.4vmin;
  font-size: 2.4rem;
  line-height: 1;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  background: none; border: none;
}
.lightbox .lb-close:hover { color: #fff; }
@keyframes lb-in { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ============ ENTRANCE ANIMATION ============ */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
}
