/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

/* ─── FONTS (self-hosted, no external requests) ─── */
@font-face {
  font-family: 'Josefin Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/josefin-sans.woff2') format('woff2');
}
@font-face {
  font-family: 'Josefin Sans';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/josefin-sans-italic.woff2') format('woff2');
}

/* ─── TOKENS ─── */
:root {
  --red:      #e7490f;
  --black:    #000001;
  --beige:    #e5dfca;
  --blue:     #3660a4;
  --nav-h:    72px;

  --font-display: 'Josefin Sans', sans-serif;
  --font-body: 'Josefin Sans', sans-serif;

  /* Typography scale — rem-based, root 16px standard */
  --text-xs:   0.875rem;   /* 14px */
  --text-sm:   1rem;       /* 16px */
  --text-base: 1.125rem;   /* 18px */
  --text-md:   1.25rem;    /* 20px */
  --text-lg:   1.5rem;     /* 24px */
  --text-xl:   2rem;       /* 32px */
  --text-2xl:  2.5rem;     /* 40px */
  --text-3xl:  3rem;       /* 48px */
}

/* Root font size: browser default (16px) so user accessibility settings work */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--black);
  line-height: 1.7;
  background-image:
    url('images/bg-side-elements.svg'),
    url('images/bg-red-noise.png');
  background-size: 100%, 100%;
  background-repeat: repeat, repeat;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background-color: var(--beige);
  background-image: url('images/bg-grey-noise-overlay.png');
  background-size: 960px;
  z-index: 200;
  display: flex;
  align-items: center;
  padding: 0 5%;
}
.nav-inner {
  display: grid;
  grid-template-columns: 0.375fr 1fr 0.375fr;
  align-items: center;
  width: 100%;
}
.nav-logo img { height: 44px; }
.nav-links { display: flex; justify-content: center; list-style: none; }
.nav-links a {
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  color: var(--black);
  transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--blue); }
.nav-right { display: flex; justify-content: flex-end; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  padding: 0.75rem 1.75rem;
  border-radius: 2rem;
  border: 1.5px solid var(--black);
  cursor: pointer;
  text-align: center;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
  line-height: 1;
  white-space: nowrap;
}
.btn-black  { background: var(--black); color: #fff; border-color: var(--black); }
.btn-black:hover { opacity: 0.75; }
.btn-outline { background: transparent; color: var(--black); }
.btn-outline:hover { background: var(--black); color: #fff; }

.nav-toggle {
  display: none; flex-direction: column; gap: 6px;
  cursor: pointer; background: none; border: none; padding: 4px; margin-left: auto;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--black); }

/* ─── PAGE WRAPPER ─── */
.page-wrapper { padding-top: var(--nav-h); }

/* ─── HERO ─── */
/*
  hero-outer height drives the scroll animation.
  We scale it with viewport height so it feels the same on all screen sizes:
  on desktop: 220vh, on tablet: 200vh, on mobile: 180vh.
  This is set via JS on load and resize.
*/
.hero-outer { position: relative; }
.hero-sticky {
  position: sticky; top: 0;
  /* svh = smallest viewport size, i.e. assumes the browser's address bar/toolbar
     is showing. Stops the sticky area from resizing as that bar hides/shows while
     scrolling on mobile, which is what caused the page to visibly jump. Falls
     back to 100vh on older browsers that don't support svh. */
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: transparent;
}

/* ─── INSTRUMENTS ─── */
.hero-instruments {
  position: absolute; inset: 0;
  pointer-events: none; overflow: hidden;
}
.instr {
  position: absolute;
  will-change: transform;
  transform-origin: center center;
}
.instr img { width: 100%; object-fit: contain; display: block; }

/*
  Desktop layout: 5 instruments in one row across full width
  Sizes calibrated per SVG aspect ratio, all ~visually equal weight
*/
.instr-1 { left: 6%;  width: clamp(100px, 13vw, 200px); } /* trombone */
.instr-2 { left: 25%; width: clamp( 90px, 11vw, 170px); } /* bass+hand */
.instr-3 { left: 50%; width: clamp(120px, 17vw, 260px); } /* cymbal — center */
.instr-4 { left: 70%; width: clamp(130px, 19vw, 290px); } /* keyboard */
.instr-5 { left: 88%; width: clamp(105px, 14vw, 215px); } /* guitar */

/* Hero center content */
.hero-content {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  z-index: 2;
  width: 90%;
}
.hero-logo { margin-bottom: 1.5rem; will-change: transform; }
.hero-logo img { width: 60vw; max-width: 860px; min-width: 200px; }
.hero-tagline {
  font-size: var(--text-md);
  letter-spacing: 0.03em;
  margin-bottom: 2rem;
  color: var(--black);
}
.hero-actions { display: flex; gap: 0.875rem; flex-wrap: wrap; justify-content: center; }

/* ─── SECTIONS ─── */
section {
  background: transparent;
  color: var(--black);
  padding: 6rem 5%;
}
.container { width: 100%; max-width: 80rem; margin: 0 auto; }

/* ─── HEADINGS ─── */
h2 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--black);
}
h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--black);
}

/* ─── TERMINE ─── */
.termine-heading { text-align: center; margin-bottom: 3rem; }
.termine-heading h2 { margin-bottom: 0.75rem; }
.termine-heading p { font-size: var(--text-base); color: var(--black); }

.termine-list { display: flex; flex-direction: column; gap: 1rem; }

/* ══ TERMIN — copy this block for a new concert date ══ */
.termin {
  display: flex; align-items: center; gap: 2rem;
  padding: 1.75rem 2rem; border-radius: 2rem;
  background: var(--beige); flex-wrap: wrap;
  color: var(--black);
}
.termin-datum {
  font-size: var(--text-md);
  font-weight: 700; white-space: nowrap;
  min-width: 140px; color: var(--black);
}
.termin-name {
  font-weight: 700; font-size: var(--text-base);
  flex: 1; letter-spacing: 0.02em; color: var(--black);
}
.termin-meta {
  display: flex; align-items: center;
  gap: 1.5rem; flex-wrap: wrap;
  font-size: var(--text-sm); color: var(--black);
}
.termin-meta-item { display: flex; align-items: center; gap: 0.5rem; }
.termin-meta-item svg { flex-shrink: 0; }
.termin-action { margin-left: auto; }
/* ══ END TERMIN ══ */

/* ─── CALENDAR DROPDOWN ─── */
.cal-wrapper { position: relative; display: inline-block; }
.cal-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--beige);
  border: 1.5px solid var(--black);
  border-radius: 1rem;
  overflow: hidden;
  min-width: 200px;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.cal-dropdown.open { display: block; }
.cal-dropdown a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--black);
  letter-spacing: 0.03em;
  transition: background 0.1s;
}
.cal-dropdown a:hover { background: rgba(0,0,0,0.06); }
.cal-dropdown a + a { border-top: 1px solid rgba(0,0,0,0.1); }
.cal-dropdown svg { flex-shrink: 0; }

/* ─── ÜBER UNS ─── */
.ueber-photo { display: flex; justify-content: center; margin-bottom: 3rem; }
.ueber-photo img { width: 100%; max-width: 900px; border-radius: 1rem; }
.ueber-text-block { text-align: center; max-width: 680px; margin: 0 auto; }
.ueber-heading { margin-bottom: 0.75rem; }
.ueber-body {
  font-size: var(--text-md);
  line-height: 1.8;
  margin-bottom: 2rem;
  color: var(--black);
}

/* ─── MUSIKER ─── */
.musiker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 2rem; row-gap: 3rem;
}
.musiker-card img {
  width: 100%; aspect-ratio: 2/3; object-fit: cover;
  border-radius: 1rem; margin-bottom: 1rem;
}
.musiker-card h3 { font-size: var(--text-base); margin-bottom: 0.2rem; }
.musiker-card .instrument {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--black);
}

/* ─── LEGAL / RICHTEXT PAGES ─── */
.legal-container { max-width: 760px; margin: 0 auto; }
.legal-container h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--black);
  margin-bottom: 0.75rem;
}
.legal-updated { font-size: var(--text-sm); margin-bottom: 3rem; }
.legal-container h2 { margin-top: 2.5rem; margin-bottom: 0.75rem; }
.legal-container h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; font-size: var(--text-base); }
.legal-container p { font-size: var(--text-base); line-height: 1.8; margin-bottom: 1rem; }
.legal-container ul { padding-left: 1.25rem; margin-bottom: 1rem; }
.legal-container li { font-size: var(--text-base); line-height: 1.8; margin-bottom: 0.4rem; }
.legal-container a { text-decoration: underline; }

/* ─── FOOTER ─── */
footer {
  background-color: var(--beige);
  background-image: url('images/bg-grey-noise-overlay.png');
  background-size: 960px;
  padding: 3rem 5%;
}
.footer-top {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 2rem; margin-bottom: 2rem;
}
.footer-links { display: flex; justify-content: center; gap: 2rem; list-style: none; }
.footer-links a { font-weight: 600; font-size: var(--text-sm); color: var(--black); }
.footer-links a:hover { opacity: 0.6; }
.footer-social { display: flex; gap: 1rem; align-items: center; }
.footer-divider { height: 1px; background: rgba(0,0,0,0.15); margin-bottom: 1.5rem; }
.footer-bottom {
  display: flex; justify-content: center;
  gap: 2rem; font-size: var(--text-sm);
  color: var(--black); flex-wrap: wrap;
}
.footer-bottom a { text-decoration: underline; color: var(--black); }

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */

/* Tablet: 768px–1024px
   Instruments: row of 3 top, row of 2 bottom, vertically stacked in hero */
@media (max-width: 1024px) and (min-width: 768px) {
  :root {
    --text-base: 1.0625rem; /* 17px */
    --text-md:   1.125rem;
    --text-lg:   1.375rem;
    --text-xl:   1.75rem;
    --text-2xl:  2.125rem;
    --text-3xl:  2.5rem;
  }

  .instr-1 { left: 12%;  width: clamp(90px, 18vw, 160px); top: auto; }
  .instr-2 { left: 20%;  width: clamp(80px, 16vw, 140px); }
  .instr-3 { left: 50%;  width: clamp(110px, 22vw, 190px); top: auto; }
  .instr-4 { left: 65%;  width: clamp(120px, 24vw, 210px); }
  .instr-5 { left: 80%;  width: clamp(95px, 19vw, 170px); top: auto; }
}

/* Mobile: < 768px
   Instruments: 2-2-1 stacked layout */
@media (max-width: 767px) {
  :root {
    --text-xs:   0.875rem;
    --text-sm:   1rem;
    --text-base: 1rem;
    --text-md:   1.0625rem;
    --text-lg:   1.25rem;
    --text-xl:   1.5rem;
    --text-2xl:  1.875rem;
    --text-3xl:  2.125rem;
  }

  section { padding: 4rem 5%; }

  .instr-1 { left: 18%;  width: clamp(75px, 22vw, 120px); }
  .instr-2 { left: 60%;  width: clamp(65px, 18vw, 105px); }
  .instr-3 { left: 18%;  width: clamp(85px, 25vw, 135px); }
  .instr-4 { left: 60%;  width: clamp(90px, 27vw, 150px); }
  .instr-5 { left: 50%;  width: clamp(75px, 22vw, 120px); }

  .termin { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .termin-action { margin-left: 0; }
  .termin-meta { flex-direction: column; gap: 0.5rem; }
  .cal-dropdown { right: auto; left: 0; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--beige); padding: 1.5rem 5%; gap: 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1); z-index: 199;
  }
  .nav-toggle { display: flex; }
  .nav-inner { display: flex; }
  .nav-right { display: none; }

  .musiker-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .footer-top { grid-template-columns: 1fr; justify-items: center; }
  .hero-logo img { width: 80vw; }
  .ueber-body { font-size: var(--text-base); }
}

@media (max-width: 479px) {
  .musiker-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .instr { display: none; }
}
