/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Variables */
:root {
  --bg: #f4f9fd;
  --text: #0d2b45;
  --accent-red: #3aa9e0;          /* nav resting (light sky) */
  --accent-gold: #1689cf;         /* brand: borders, underline bar, hover, gradients */
  --accent-link: #0f73b8;         /* readable link/label text (passes AA on --bg) */
  --text-muted: #5d7488;
  --hairline: rgba(13, 43, 69, 0.1);
  --header-bg: rgba(244, 249, 253, 0.9);
  --max-width: 980px;
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Jost', 'Futura', 'Century Gothic', sans-serif;
  --font-small: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Base */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--accent-link); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--text); }
img { max-width: 100%; height: auto; display: block; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.site-logo {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--text);
}
.site-logo:hover { color: var(--accent-gold); }
.site-nav { display: flex; gap: 2rem; margin-left: auto; }
.nav-link {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--accent-red);
  position: relative;
}
.nav-link:hover { color: var(--accent-gold); }
.nav-link.active { color: var(--accent-gold); }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-gold);
  transition: width 0.3s;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.site-nav:hover .nav-link.active { color: var(--accent-red); }
.site-nav:hover .nav-link.active::after { width: 0; }
.site-nav:hover .nav-link.active:hover { color: var(--accent-gold); }
.site-nav:hover .nav-link.active:hover::after { width: 100%; }

/* Language switcher (DE / EN). Current = white, other = muted link, gold on hover.
   No nav-style underline so it reads as a distinct utility control. */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.lang-current,
.lang-link {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem;
}
.lang-current { color: var(--text); }
.lang-link { color: var(--text-muted); }
.lang-link:hover { color: var(--accent-gold); }
.lang-link:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}
.lang-sep { color: var(--text-muted); opacity: 0.5; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero (Home) */
/* Masthead — title sits ABOVE the photo, on the page background. */
.hero-heading {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem 1.75rem;
  text-align: center;
}
.hero {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  /* Native 16:9 + cover shows the whole frame — no crop. Photo only, no overlay text. */
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-title {
  font-family: var(--font-heading);
  font-size: 72px;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.05;
  color: var(--text);
}
.hero-description-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem;
  text-align: center;
}
.hero-description {
  font-family: var(--font-body);
  font-size: 20px;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.55;
}
.hero-description + .hero-description {
  margin-top: 0.6rem;
}
/* Performer names: a centered row with " | " separators. When the row would
   overflow, JS adds .stacked → each musician on its own line, "|" hidden. */
.hero-performers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  column-gap: 0.6rem;
  row-gap: 0.15rem;
}
.performer { white-space: nowrap; }
.performer-sep { color: var(--text-muted); opacity: 0.6; }
.hero-performers.stacked {
  flex-direction: column;
  align-items: center;
}
.hero-performers.stacked .performer-sep { display: none; }

/* About page */
.page-about {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}
/* Intro lede — open editorial, no box; shares the home page's centered voice
   and flows straight into the alternating musician rows below. */
.about-intro {
  max-width: 720px;
  margin: 0 auto 4.5rem;
  text-align: center;
}
.about-intro h1 {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.125;
  margin-bottom: 1.75rem;
}
/* Short on-brand accent under centered page headings — anchors the heading
   without reintroducing a card. Shared by the About intro and Recordings. */
.about-intro h1::after,
.page-recordings h1::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  margin: 1rem auto 0;
  background: var(--accent-gold);
}
.about-lede p {
  font-family: var(--font-body);
  margin-bottom: 1.2rem;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.6;
}
.about-lede p:last-child { margin-bottom: 0; }

/* About — duo members (one photo/bio row per musician, alternating sides) */
.musicians {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-top: 0;
}
.musician {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}
.musician--reverse { flex-direction: row-reverse; }
.musician-photo {
  flex: 0 0 320px;
  overflow: hidden;
  border-radius: 2px;
}
.musician-photo img {
  width: 100%;
  height: auto;
  display: block;
}
.musician-info { flex: 1; }
.musician-info h2 {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1.1;
}
.musician-instrument {
  font-family: var(--font-body);
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-link);
  margin: 0.3rem 0 1rem;
}
.musician-bio p {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}
.musician-bio p:last-child { margin-bottom: 0; }
/* Name links to the musician's own page; keep it text-colored, gold on hover. */
.musician-info h2 a { color: inherit; }
.musician-info h2 a:hover { color: var(--accent-gold); }
.musician-photo a { display: block; }
/* "More about <name>" link under each teaser bio */
.read-more { margin-top: 0.9rem; }
.read-more a {
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--accent-link);
}
.read-more a:hover { color: var(--accent-gold); }

/* Musician detail page (/musicians/<name>/) — full bio, same row design as About */
.page-musician {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}
.back-link {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}
.back-link:hover { color: var(--accent-gold); }
/* Long bio: top-align the photo with the start of the text, not the middle. */
.musician--feature { align-items: flex-start; }
.musician--feature .musician-info h1 {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.1;
  color: var(--text);
}

/* Recordings */
.page-recordings {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}
.page-recordings h1 {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.125;
  margin-bottom: 2rem;
  text-align: center;
}
.recordings-list {
  display: flex;
  flex-direction: column;
}
.recording-row {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  padding: 2.5rem 0;
  color: var(--text);
}
.recording-row:hover { color: var(--text); }
.recording-row--reverse {
  flex-direction: row-reverse;
}
.recording-image {
  flex: 0 0 380px;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}
.recording-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s;
}
.recording-row:hover .recording-image img { transform: scale(1.03); }
.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  transition: background 0.3s;
}
.recording-row:hover .play-overlay { background: rgba(0, 0, 0, 0.4); }
.recording-info {
  flex: 1;
}
.recording-info h3 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1.08;
}
.recording-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 300;
  margin-top: 0.1rem;
  line-height: 1.08;
}
.recording-venue {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 1rem;
  font-style: italic;
}
.recording-divider {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 0;
}

/* Photos */
.page-photos {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}
.page-photos h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}
/* CSS grid gallery: each photo keeps its native aspect ratio (no cropping), but
   landscape shots (`wide: true` in data/photos.yaml) span two columns so they
   don't read as small next to the tall portraits. grid-auto-flow: dense backfills
   the gaps left by the wider items. Columns auto-fill ~240px each. */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  grid-auto-flow: dense;
  align-items: start;
  gap: 0.5rem;
}
.photo-item {
  overflow: hidden;
  cursor: pointer;
}
.photo-item.wide { grid-column: span 2; }
.photo-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s;
}
.photo-item:hover img { transform: scale(1.03); }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.active { display: flex; }
.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.lightbox-figure img {
  max-width: 90vw;
  max-height: 85vh;            /* leave room for the credit line */
  object-fit: contain;
}
#lightbox-credit {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-align: center;
}
#lightbox-credit[hidden] { display: none; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 2rem;
  text-align: center;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.site-footer a {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-muted);
}
.site-footer a:hover { color: var(--accent-gold); }
.site-footer p {
  font-family: var(--font-small);
  font-size: 14px;
  font-weight: 300;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Concerts */
.page-concerts {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}
.page-concerts h1,
.page-repertoire h1 {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.125;
  margin-bottom: 2rem;
  text-align: center;
}
.page-concerts h1::after,
.page-repertoire h1::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  margin: 1rem auto 0;
  background: var(--accent-gold);
}
.concerts-list .concert {
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--hairline);
}
.concerts-list .concert:last-child { border-bottom: none; }
.concerts-divider {
  display: flex;
  align-items: center;
  margin: 2rem 0 1rem;
  font-family: var(--font-heading);
  font-size: 18px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-gold);
}
.concerts-divider::before,
.concerts-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--accent-gold);
  opacity: 0.4;
}
.concerts-divider span { padding: 0 1.5rem; }
.concert-header {
  font-family: var(--font-body);
  font-size: 22px;
  line-height: 1.3;
}
.concert-date { font-weight: 400; color: var(--accent-gold); }
.concert-venue { color: var(--text); margin-left: 0.3rem; }
.concert-venue a { color: var(--text); }
.concert-venue a:hover { color: var(--accent-gold); }
.concert-performers {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.3;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.2rem;
}

/* Repertoire */
.page-repertoire {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}
.repertoire-intro {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  text-align: center;
}
.repertoire-intro p {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
}
/* Selections: tab bar + swipeable panels */
.repertoire {
  max-width: 720px;
  margin: 0 auto;
}
.repertoire-nav {
  position: sticky;
  top: var(--rep-sticky-top, 72px);
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.25rem;
  margin: 0 auto 2.25rem;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
}
.repertoire-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}
.repertoire-arrow {
  flex: 0 0 auto;
  appearance: none;
  background: none;
  border: 0;
  padding: 0 0.4rem 0.7rem;
  font-family: var(--font-heading);
  font-size: 26px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, opacity 0.2s;
}
.repertoire-arrow:hover { color: var(--accent-gold); }
.repertoire-arrow:disabled {
  opacity: 0.25;
  cursor: default;
  color: var(--text-muted);
}
.repertoire-tab {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 0 0.85rem;
  margin-bottom: -1px;
  position: relative;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s;
}
.repertoire-tab:hover { color: var(--text); }
.repertoire-tab.active { color: var(--accent-gold); }
.repertoire-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent-gold);
}
.repertoire-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;          /* Firefox */
}
.repertoire-track::-webkit-scrollbar { display: none; }  /* WebKit */
.repertoire-panel {
  flex: 0 0 100%;
  min-width: 100%;
  scroll-snap-align: start;
}
.repertoire-list {
  list-style: none;
  max-width: 720px;
  margin: 0 auto;
}
.repertoire-item {
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--hairline);
}
.repertoire-item:last-child { border-bottom: none; }
.repertoire-composer {
  flex: 0 0 40%;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text);
}
.repertoire-works {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.repertoire-work {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--text-muted);
}

/* Contact */
.page-contact {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  text-align: center;
}
.contact-intro h1 {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.125;
  margin-bottom: 1.75rem;
}
.contact-intro h1::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  margin: 1rem auto 0;
  background: var(--accent-gold);
}
.contact-lede p {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}
.contact-lede p:last-child { margin-bottom: 0; }
.contact-details { margin-top: 2.5rem; }
.contact-email {
  font-family: var(--font-heading);
  font-size: 26px;
  letter-spacing: 0.03em;
  color: var(--accent-link);
}
.contact-email:hover { color: var(--accent-gold); }
.contact-performers {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* Impressum — narrow legal document: centered heading (shared bar), then
   label/value sections separated by hairlines, echoing the concerts list. */
.page-impressum {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}
.page-impressum h1 {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.125;
  margin-bottom: 2.5rem;
  text-align: center;
}
.page-impressum h1::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  margin: 1rem auto 0;
  background: var(--accent-gold);
}
.impressum-body h2 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-link);
  margin-top: 2.25rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--hairline);
}
.impressum-body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.impressum-body p {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  margin-top: 0.5rem;
}

/* Responsive */

/* Collapse the nav to the hamburger early (900px, not 768px) so the 3-zone
   header (logo · nav · switcher) never crowds at tablet widths. The DE/EN
   switcher stays in the bar at every width — never inside the menu. */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .lang-switcher { margin-left: auto; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(244, 249, 253, 0.98);
    flex-direction: column;
    padding: 1rem 2rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid var(--hairline);
    margin-left: 0;
  }
  .site-nav.open { display: flex; }
  /* 44px minimum tap target for the switcher on touch. */
  .lang-link, .lang-current { min-height: 44px; }
}

@media (max-width: 768px) {
  /* keep the native 16:9 hero on mobile too, so the sides are never cropped */
  .hero-title { font-size: 3rem; }
  .hero-description { font-size: 20px; }
  .about-intro { margin-bottom: 3rem; }
  .about-intro h1 { font-size: 32px; }
  .musician, .musician--reverse { flex-direction: column; }
  .musician-photo { flex: 0 0 auto; width: 100%; }
  .musician-info h2 { font-size: 28px; }
  .musician--feature .musician-info h1 { font-size: 30px; }
  .musician-bio p { font-size: 18px; }
  .recording-row, .recording-row--reverse {
    flex-direction: column;
  }
  .recording-image { flex: 0 0 auto; width: 100%; }
  .recording-info h3 { font-size: 26px; }
  .recording-title { font-size: 26px; }
  .recording-venue { font-size: 18px; }
  .nav-link { font-size: 18px; }
  .site-logo { font-size: 22px; }
  .site-footer a { font-size: 18px; }
  .site-footer p { font-size: 15px; }
  /* Two fixed columns on mobile so a wide (span-2) photo is exactly full width
     and never overflows when fewer columns would otherwise auto-fill. */
  .photo-gallery { grid-template-columns: repeat(2, 1fr); }
  .page-concerts h1, .page-repertoire h1 { font-size: 32px; }
  .concert-header { font-size: 20px; }
  .concert-performers { font-size: 17px; }
  .repertoire-item { flex-direction: column; gap: 0.25rem; }
  .repertoire-composer { flex: 0 0 auto; }
  /* Keep arrows + both tab labels on one line on narrow screens. */
  .repertoire-tabs { gap: 0.5rem 1.25rem; }
  .repertoire-tab { font-size: 12.5px; letter-spacing: 0.06em; }
  .repertoire-arrow { font-size: 22px; padding: 0 0.15rem 0.7rem; }
  .contact-intro h1 { font-size: 32px; }
  .contact-email { font-size: 22px; }
  .page-impressum h1 { font-size: 32px; }
}
