* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

button {
  font: inherit;
  color: inherit;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden; /* Ægte onepage uden scroll */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #f8fafc;
}

/* Fuldskærms herobillede */
.hero-background {
  position: fixed;
  inset: 0;
  background-image: url('/images/hero.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 1;
}

/* Let vignette i toppen så logo og hamburger-ikon altid står skarpt */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 25, 47, 0.72) 0%,
    rgba(10, 25, 47, 0.15) 30%,
    rgba(10, 25, 47, 0.25) 100%
  );
}

/* Topbar */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2.5rem;
}

/* Logo styling */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: #ffffff;
}

.logo-svg {
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 4px 12px rgba(56, 189, 248, 0.35));
  transition: transform 0.3s ease;
}

.brand-logo:hover .logo-svg {
  transform: scale(1.05);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.brand-tagline {
  font-size: 0.78rem;
  color: #7dd3fc;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.tagline-term + .tagline-term::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 0.7em;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
}

/* Hamburger knap i øverste højre hjørne */
.hamburger-btn {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(125, 211, 252, 0.3);
  border-radius: 10px;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #f8fafc;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.hamburger-btn:hover {
  background: rgba(15, 23, 42, 0.85);
  border-color: #38bdf8;
}

.hamburger-btn .icon {
  width: 26px;
  height: 26px;
}

/* Menu Drawer (Glassmorphism panel under hamburger) */
.nav-drawer {
  position: fixed;
  top: 5.5rem;
  right: 2.5rem;
  width: 380px;
  max-width: calc(100vw - 3rem);
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(125, 211, 252, 0.25);
  border-radius: 16px;
  padding: 1rem;
  z-index: 15;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  
  /* Skjult som standard */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}

.nav-drawer.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition-delay: 0s;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-trigger {
  width: 100%;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  padding: 0.9rem 1.1rem;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-trigger:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
}

.nav-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #38bdf8;
}

.nav-trigger .chevron {
  width: 1.1rem;
  height: 1.1rem;
  color: #38bdf8;
  transition: transform 0.25s ease;
}

.nav-trigger.expanded .chevron {
  transform: rotate(180deg);
}

/* Undermenuer */
.submenu-panel {
  display: none;
  padding: 1rem;
  margin-top: 0.35rem;
  background: rgba(15, 23, 42, 0.55);
  border-radius: 10px;
  border-left: 3px solid #38bdf8;
  font-size: 0.92rem;
  line-height: 1.55;
}

.submenu-panel.open {
  display: block;
}

.panel-message {
  color: #cbd5e1;
}

/* Info-panel (fx "Om") */
.info-subtitle {
  color: #7dd3fc;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.info-desc {
  color: #cbd5e1;
  margin-bottom: 0.75rem;
}

.info-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.info-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.info-highlights .icon {
  width: 1rem;
  height: 1rem;
  margin-top: 0.3em;
  color: #38bdf8;
}

/* Liste-panel (fx "Projekter" og "Kontakt") */
.entry-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.entry {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.entry-link {
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.entry-link:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  transform: translateX(4px);
}

.entry-icon {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  color: #38bdf8;
}

.entry-body {
  flex: 1;
  min-width: 0;
}

.entry-name {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  color: #f8fafc;
  font-weight: 600;
  margin-bottom: 0.25rem;
  overflow-wrap: anywhere;
}

.entry-link .entry-name {
  color: #38bdf8;
}

.entry-external {
  width: 1rem;
  height: 1rem;
}

.entry-desc {
  color: #cbd5e1;
  font-size: 0.84rem;
}

/* Sprogvælger i bunden af menuen */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.85rem;
  padding: 0.85rem 0.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lang-icon {
  width: 1.15rem;
  height: 1.15rem;
  margin-right: 0.35rem;
  color: #38bdf8;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.25rem;
  padding: 0 0.75rem;
  color: #f8fafc;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lang-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
}

.lang-btn.active {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
}

/* Flag: farverne ligger i selve SVG'en, så streg fra .icon slås fra */
.flag {
  width: 1.5rem;
  height: 1.125rem;
  stroke: none;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.lang-btn:not(.active) .flag {
  opacity: 0.7;
}

.lang-btn:hover .flag {
  opacity: 1;
}

/* Inline SVG-ikoner (stregtegninger i currentColor) */
.icon {
  flex: none;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid #7dd3fc;
  outline-offset: 2px;
}

/* Topbaren vises først når tekst og ikoner er indlæst fra json */
body:not(.ready) .top-bar {
  visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

@media (max-width: 600px) {
  .top-bar {
    padding: 1rem 1.25rem;
  }
  .brand-title {
    font-size: 1rem;
  }
  .brand-tagline {
    font-size: 0.66rem;
    letter-spacing: 0.04em;
  }
  .nav-drawer {
    right: 1.25rem;
    top: 5.75rem;
    max-height: calc(100vh - 7rem);
  }
}
