/* ===============================
   Reset & basis
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

:root {
  --bg-dark: #020617;
  --accent: #ffd500;
  --accent-soft: rgba(255,213,0,0.15);
  --glass: rgba(255,255,255,0.08);
}

/* ===============================
   Body & baggrund
================================ */
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #e5e7eb;
  background:
    radial-gradient(circle at 20% 20%, #003049 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, #005f73 0%, transparent 45%),
    linear-gradient(180deg, #020617, #000);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ===============================
   Header & navigation
================================ */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.6),
    rgba(0,0,0,0.2)
  );
  backdrop-filter: blur(10px);
}

header h1 {
  font-size: 1.4rem;
  letter-spacing: 0.05em;
}

#burger {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.2rem;
}

nav a {
  text-decoration: none;
  color: #e5e7eb;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

/* ===============================
   Main layout
================================ */
main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

/* ===============================
   Artikler
================================ */
article {
  margin-bottom: 4rem;
  padding: 2.5rem;
  background: var(--glass);
  border-radius: 20px;
  backdrop-filter: blur(14px);
  box-shadow:
    0 10px 40px rgba(0,0,0,0.4),
    inset 0 0 0 1px rgba(255,255,255,0.05);
}

article h2 {
  margin-bottom: 1rem;
  font-size: 1.6rem;
  color: var(--accent);
}

article p,
article ul {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: #d1d5db;
}

article ul {
  padding-left: 1.2rem;
}

/* ===============================
   Links (ingen blå)
================================ */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.25s ease;
}

article a {
  text-shadow: 0 0 8px var(--accent-soft);
}

a:hover {
  color: #fff;
}

a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-soft);
  border-radius: 4px;
}

/* ===============================
   Billedgalleri
================================ */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin: 2.5rem 0;
}

.image-grid a {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  transition: transform 0.35s ease;
}

.image-grid a:hover {
  transform: scale(1.05);
}

.image-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===============================
   Footer
================================ */
footer {
  padding: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: #9ca3af;
  opacity: 0.8;
}

/* ===============================
   Scroll reveal – fallback først
================================ */
/* Standard: alt er synligt */
article,
article h2,
article p,
article ul,
.image-grid {
  opacity: 1;
  transform: none;
}

/* Kun hvis browseren understøtter scroll-timeline */
@supports (animation-timeline: view()) {

  @keyframes reveal {
    from {
      opacity: 0;
      transform: translateY(40px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  article,
  article h2,
  article p,
  article ul,
  .image-grid {
    opacity: 0;
    animation: reveal linear forwards;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }
}

/* ===============================
   Mobil
================================ */
@media (max-width: 768px) {

  body {
    background-color: #003049 !important;  /* solid blå baggrund */
    background-image: none !important;      /* fjerner alle gradient-lag */
    background-repeat: no-repeat;
    background-attachment: fixed;
  }

  main {
    background: none !important;   /* fjern overlays */
  }

  article {
    background: rgba(0, 48, 73, 0.95) !important; /* mørk baggrund for læsbarhed */
  }

  body::after {
    display: none !important;  /* fjern pseudo-element overlay midlertidigt */
  }

  #burger {
    display: block;
    z-index: 1002;
  }
  
  nav ul {
    position: fixed;
    top: 0;
    right: -260px;
    width: 260px;
    height: 100vh;

    background-color: #020617; /* HELT uigennemsigtig */
    opacity: 1;

    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;

    flex-direction: column;
    padding-top: 5rem;

    transition: right 0.3s ease;
    z-index: 2001;

    box-shadow: -30px 0 60px rgba(0,0,0,0.9);
  }

  nav ul.open {
    right: 0;
  }

  nav a {
    color: #e5e7eb;
    padding: 1.3rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 1.05rem;
  }

  body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 2000;
  }

  body.menu-open::after {
    opacity: 1;
    pointer-events: auto;
  }
  
  /* Main fylder hele skærmen og har ingen baggrund */
  main {
    max-width: 100%;
    padding: 2.2rem 1rem;
    background: none;
    box-shadow: none;
  }

  /* Artikler uden glas-kort eller skygger */
  article {
    background: none;
    box-shadow: none;
    border-radius: 0;
    padding: 1rem 0;  /* lidt luft, men ingen containerfølelse */
    margin-bottom: 3rem;
  }

  article h2 {
    font-size: 1.45rem;
    margin-bottom: 0.8rem;
    color: var(--accent);
  }

  article p,
  article ul {
    font-size: 1.03rem;
    line-height: 1.85;
    color: #e5e7eb;
  }

  article ul {
    padding-left: 1rem;
  }

  /* Billedgalleri fylder næsten hele bredden */
  /* Behold flere kolonner, men mindre end desktop */
  .image-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin: 2rem 0;
  }

  .image-grid a {
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  }

  .image-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: +15px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}
}