/* ==========================================================================
   Trompet Jesper – varm messing & creme, mobil-først
   ========================================================================== */

:root {
  /* Farver (semantiske tokens) */
  --cream: #FAF7F0;        /* side-baggrund */
  --cream-tint: #F2ECDF;   /* skiftevis sektion */
  --surface: #FFFFFF;      /* kort */
  --ink: #2A241C;          /* primær tekst (varm næsten-sort) */
  --ink-soft: #5C5344;     /* sekundær tekst */
  --brass: #8C6420;        /* messing-accent (AA på creme) */
  --brass-bright: #B98A2E; /* dekorativ messing (linjer, ikoner) */
  --brass-deep: #6E4E18;   /* hover/aktiv */
  --line: #E2D9C6;

  /* Typografi */
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Rytme */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --radius: 12px;
  --shadow: 0 2px 6px rgba(42, 36, 28, 0.06), 0 10px 24px rgba(42, 36, 28, 0.07);

  --nav-h: 3.75rem;
}

/* ---------- Reset & basis ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 var(--space-2);
  text-wrap: balance;
}

p { margin: 0 0 var(--space-2); }

a { color: var(--brass); }
a:hover { color: var(--brass-deep); }

button { font: inherit; cursor: pointer; touch-action: manipulation; }
a, button { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 3px solid var(--brass-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute; left: var(--space-2); top: -3rem;
  z-index: 100;
  background: var(--ink); color: var(--cream);
  padding: 0.6rem 1rem; border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 150ms ease-out;
}
.skip-link:focus { top: 0; color: var(--cream); }

/* ---------- Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 240, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 72rem; margin-inline: auto;
  min-height: var(--nav-h);
  padding: 0 var(--space-2);
}

.nav__brand {
  font-family: var(--font-display);
  font-weight: 600; font-size: 1.35rem;
  color: var(--ink); text-decoration: none;
  letter-spacing: 0.01em;
}
.nav__brand span { color: var(--brass); }

.nav__toggle {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  background: none; border: 0; border-radius: 8px;
}

.nav__toggle-bar,
.nav__toggle-bar::before,
.nav__toggle-bar::after {
  content: ""; display: block;
  width: 22px; height: 2px; border-radius: 2px;
  background: var(--ink);
  transition: transform 200ms ease-out, opacity 150ms ease-out;
}
.nav__toggle-bar { position: relative; }
.nav__toggle-bar::before { position: absolute; top: -7px; }
.nav__toggle-bar::after { position: absolute; top: 7px; }

.nav__toggle[aria-expanded="true"] .nav__toggle-bar { transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar::before { transform: rotate(-90deg) translateX(-7px); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar::after { opacity: 0; }

.nav__menu {
  list-style: none; margin: 0; padding: 0;
  position: absolute; top: 100%; left: 0; right: 0;
  display: none;
  flex-direction: column;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.nav__menu.is-open { display: flex; }

.nav__menu a {
  display: block;
  padding: 0.85rem var(--space-3);
  color: var(--ink); text-decoration: none;
  font-weight: 500;
}
.nav__menu a:hover { background: var(--cream-tint); color: var(--brass-deep); }
.nav__menu a.is-active { color: var(--brass); }

@media (min-width: 800px) {
  .nav__toggle { display: none; }
  .nav__menu {
    position: static; display: flex !important;
    flex-direction: row; gap: var(--space-1);
    background: none; border: 0; box-shadow: none;
  }
  .nav__menu a {
    padding: 0.5rem 0.9rem; border-radius: 999px;
  }
  .nav__menu a.is-active {
    background: var(--cream-tint);
    box-shadow: inset 0 -2px 0 var(--brass-bright);
  }
  .nav__cta {
    background: var(--ink); color: var(--cream) !important;
  }
  .nav__cta:hover { background: var(--brass-deep) !important; }
}

/* ---------- Knapper ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-weight: 600; text-decoration: none;
  transition: background 150ms ease-out, color 150ms ease-out, transform 150ms ease-out;
}
.btn:active { transform: scale(0.97); }
.btn__icon { width: 1.2em; height: 1.2em; flex: none; }

.btn--primary { background: var(--ink); color: var(--cream); }
.btn--primary:hover { background: var(--brass-deep); color: var(--cream); }

.btn--ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(3px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.26); color: #fff; }

.btn--outline {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn--outline:hover { background: var(--ink); color: var(--cream); }

.btn--big { width: 100%; font-size: 1.05rem; }
@media (min-width: 640px) { .btn--big { width: auto; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(92dvh, 46rem);
  display: flex; align-items: flex-end;
  overflow: hidden;
}

.hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 65% 30%;
}

.hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(24, 19, 12, 0.82) 0%, rgba(24, 19, 12, 0.35) 45%, rgba(24, 19, 12, 0.15) 100%);
}

.hero__inner {
  position: relative;
  width: 100%;
  max-width: 72rem; margin-inline: auto;
  padding: var(--space-5) var(--space-2) var(--space-5);
  color: #fff;
}

.hero__kicker {
  font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: #E8C877;
  margin-bottom: var(--space-1);
}

.hero__title {
  font-size: clamp(2.2rem, 6.5vw, 4rem);
  color: #fff;
  margin-bottom: var(--space-2);
}

.hero__lead {
  max-width: 34rem;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: var(--space-3);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ---------- Sektioner ---------- */
.section { padding: var(--space-6) 0; }
.section--tinted { background: var(--cream-tint); }

.section__inner {
  max-width: 72rem; margin-inline: auto;
  padding-inline: var(--space-2);
}
.section__inner--narrow { max-width: 56rem; }

.section__title {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  position: relative;
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-3);
}
.section__title::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 3.5rem; height: 3px; border-radius: 2px;
  background: var(--brass-bright);
}

.section__lead {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 44rem;
  margin-bottom: var(--space-4);
}

/* mål for anker-navigation under sticky header */
section[id] { scroll-margin-top: var(--nav-h); }

/* ---------- Om Jesper ---------- */
.section__inner--split {
  display: grid; gap: var(--space-4);
}
.om__media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
@media (min-width: 900px) {
  .section__inner--split {
    grid-template-columns: 5fr 7fr;
    align-items: center;
    gap: var(--space-5);
  }
}

/* ---------- Musik-kort ---------- */
.musik__grid { display: grid; gap: var(--space-2); }
@media (min-width: 720px) {
  .musik__grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: var(--shadow);
}
.card__title {
  font-size: 1.15rem;
  margin-bottom: var(--space-1);
}
.card p { margin-bottom: 0; color: var(--ink-soft); }

/* ---------- Afspiller ---------- */
.playlist {
  list-style: none;
  margin: 0; padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.track {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "btn title time" "btn bar bar";
  align-items: center;
  column-gap: var(--space-2);
  padding: 0.65rem var(--space-2);
  border-bottom: 1px solid var(--line);
}
.track:last-child { border-bottom: 0; }
.track.is-playing { background: #FCF6E8; }

.track__btn {
  grid-area: btn;
  width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  background: var(--ink);
  position: relative;
  transition: background 150ms ease-out, transform 150ms ease-out;
}
.track__btn:hover { background: var(--brass-deep); }
.track__btn:active { transform: scale(0.94); }

/* play-trekant / pause-streger tegnet i CSS */
.track__btn::before {
  content: "";
  position: absolute; inset: 0; margin: auto;
  width: 0; height: 0;
  border-left: 12px solid var(--cream);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  translate: 2px 0;
}
.track.is-playing .track__btn::before {
  width: 12px; height: 14px;
  border: 0;
  translate: 0 0;
  background:
    linear-gradient(var(--cream), var(--cream)) left/4px 100% no-repeat,
    linear-gradient(var(--cream), var(--cream)) right/4px 100% no-repeat;
}

.track__title { grid-area: title; font-weight: 500; }
.track__title em { font-style: normal; color: var(--ink-soft); font-size: 0.9em; }

.track__time {
  grid-area: time;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.track__bar {
  grid-area: bar;
  display: none;
  height: 5px; border-radius: 3px;
  background: var(--line);
  margin-top: 0.45rem;
  overflow: hidden;
}
.track.is-playing .track__bar,
.track.is-paused .track__bar { display: block; }

.track__progress {
  display: block; height: 100%;
  width: 0%;
  background: var(--brass-bright);
  border-radius: 3px;
}

/* ---------- Sangblade ---------- */
.sangblade__grid { display: grid; gap: var(--space-2); }
@media (min-width: 720px) {
  .sangblade__grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
}

.dl-list { list-style: none; margin: 0; padding: 0; }
.dl-list li + li { margin-top: 0.4rem; }

.dl {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--line);
  transition: background 150ms ease-out, border-color 150ms ease-out;
}
.dl:hover { background: #FCF6E8; border-color: var(--brass-bright); color: var(--brass-deep); }
.dl span { font-size: 0.82rem; font-weight: 400; color: var(--ink-soft); white-space: nowrap; }

.sangblade__note {
  margin-top: var(--space-4);
  padding: var(--space-2) var(--space-3);
  border-left: 3px solid var(--brass-bright);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-soft);
}

/* ---------- Kontakt ---------- */
.section--contact { text-align: center; }
.section--contact .section__title { padding-bottom: 0; }
.section--contact .section__title::after { display: none; }
.section--contact .section__lead { margin-inline: auto; }

.kontakt__actions {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
@media (min-width: 640px) {
  .kontakt__actions { flex-direction: row; justify-content: center; }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: var(--space-4) var(--space-2);
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
  background: var(--ink);
  color: #CFC6B8;
}
.site-footer p { margin: 0.2rem 0; }
.site-footer a { color: #E8C877; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Bevægelse ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
