@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@200;300;400;500;600;700;800;900&display=swap');

:root {
  --green: #084c06;
  --cream: #fffee3;
  --pink: #ff158a;
  --max-width: 640px;
  --gutter: clamp(12px, 1.85vw, 24px);
  --gig-gap: 8px;
}

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

html {
  scroll-behavior: smooth;
  /* iOS Safari erlaubt horizontales Scrollen manchmal trotzdem, wenn nur
     body overflow-x:hidden hat - hier zusätzlich setzen, um es zuverlässig
     zu verhindern. */
  overflow-x: hidden;
}

body {
  background: var(--cream);
  color: var(--green);
  font-family: 'Unbounded', sans-serif;
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header / Nav ---------- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(16px, 2.31vw, 31px) var(--gutter);
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 100;
  background: var(--cream);
}

.logo {
  width: clamp(40px, 3.09vw, 60px);
  height: auto;
}

.logo svg path {
  fill: var(--green);
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: clamp(14px, 2.62vw, 31px);
}

.main-nav a {
  font-size: clamp(12px, 1.23vw, 20px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.main-nav a:hover {
  font-style: italic;
}

.main-nav a.nav-upload-link {
  color: var(--pink);
}

/* ---------- Hamburger (mobile nav trigger) ---------- */
.main-nav-toggle {
  display: none;
  position: relative;
  z-index: 101;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.main-nav-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--green);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease, width 0.25s ease;
}

body.nav-open .main-nav-toggle span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
  width: 100%;
}
body.nav-open .main-nav-toggle span:nth-child(2) {
  opacity: 0;
}
body.nav-open .main-nav-toggle span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
  width: 100%;
}

.main-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
}

@media (max-width: 1023px) {
  .main-nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(75vw, 300px);
    background: var(--cream);
    border-left: 3px solid var(--green);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 95;
    padding: 88px 28px 28px;
    box-sizing: border-box;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }

  .main-nav a {
    font-size: 24px;
  }

  body.nav-open .main-nav {
    transform: translateX(0);
  }

  body.nav-open .main-nav-backdrop {
    pointer-events: auto;
  }

  /* Header (mit dem X-Button) beim geöffneten Menü oben fixieren, statt mit
     dem Seiteninhalt wegzuscrollen - der Inhalt bleibt dabei scrollbar. */
  body.nav-open .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }
}

/* ---------- Balkonzert button / hero ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 5.71vw, 51px);
  padding: clamp(112px, 28vw, 220px) var(--gutter) 120px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.balkonzert-link {
  position: relative;
  display: inline-block;
  width: 90%;
  max-width: 540px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
  animation: balkonzert-wiggle 2.4s ease-in-out infinite;
}

@keyframes balkonzert-wiggle {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.035);
  }
}

.balkonzert-link:hover {
  transform: scale(1.04) rotate(-2deg);
}

.balkonzert-link:active {
  transform: scale(0.97) rotate(-1deg);
}

.balkonzert-link svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Section headings ---------- */

section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(28px, 2.78vw, 46px) var(--gutter);
}

h1, h2 {
  font-size: clamp(26px, 8.33vw, 80px);
  font-weight: 700;
  margin-bottom: clamp(14px, 0.31vw, 16px);
  text-transform: uppercase;
}

p {
  font-size: clamp(14px, 2.31vw, 29px);
  line-height: 1.2;
  margin-bottom: clamp(12px, 0.62vw, 16px);
}

p:last-child {
  margin-bottom: 0;
}

/* Photo bleeds to the edge; text overlays on top, its top edge flush with the photo's top edge */
.info-media {
  position: relative;
  display: flow-root;
  margin: 0 calc(-1 * var(--gutter)) -30px;
}

.info-photo {
  width: 100%;
  display: block;
  margin-top: 96px;
}

.info-text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0 var(--gutter) 60px;
  background: linear-gradient(to bottom, var(--cream) 0%, var(--cream) 70%, rgba(255, 254, 227, 0) 100%);
}

/* ---------- Gig calendar ---------- */

.gig-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--gig-gap, 8px);
  margin: 0;
}

#past-gigs {
  margin-top: clamp(32px, 2.93vw, 51px);
}

.gig-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(14px, 4.94vw, 46px);
  padding: clamp(10px, 0.62vw, 14px) var(--gutter);
  border-radius: clamp(10px, 1.23vw, 18px);
}

.gig-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border: clamp(2px, 0.15vw, 3px) solid var(--green);
  border-radius: inherit;
  pointer-events: none;
  z-index: 5;
}

.gig-item.has-link {
  z-index: 2;
}

.gig-date {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: auto;
  flex-shrink: 0;
  text-align: center;
}

.gig-date .month {
  font-size: clamp(11px, 3.09vw, 31px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.05em;
}

.gig-date .day {
  font-size: clamp(20px, 4.17vw, 47px);
  font-weight: 700;
  line-height: 1;
}

.gig-item.is-balkonzert .gig-date {
  color: var(--pink);
}

.gig-item.is-balkonzert .gig-date::before {
  content: '';
  position: absolute;
  left: calc(50% + 3px);
  top: calc(50% + 1px);
  transform: translate(-50%, -50%);
  width: 85px;
  height: 85px;
  background: url('../assets/svg/Balkonzert_Shape.svg') center / contain no-repeat;
  z-index: 0;
  opacity: 1;
}

.gig-item.is-balkonzert .gig-date .month,
.gig-item.is-balkonzert .gig-date .day {
  position: relative;
  z-index: 1;
  color: #e4fd05;
}

.gig-info {
  flex: 1;
  min-width: 0;
  margin-left: clamp(8px, 3.4vw, 30px);
}

.gig-title {
  font-size: clamp(15px, 3.86vw, 40px);
  font-weight: 600;
  line-height: 1.05;
  margin-bottom: 4px;
}

.gig-venue {
  font-size: clamp(12px, 1.23vw, 20px);
  font-weight: 200;
  opacity: 0.75;
  line-height: 1.1;
}

.gig-time {
  align-self: flex-start;
  font-size: clamp(12px, 2.16vw, 26px);
  font-weight: 600;
  flex-shrink: 0;
  text-align: right;
}

.gig-item.is-past {
  opacity: 0.45;
}

.gig-item.is-link {
  cursor: pointer;
}

.gig-item.is-link:hover .gig-title {
  font-style: italic;
}

.gig-empty {
  font-size: 14px;
  opacity: 0.6;
  padding: 12px var(--gutter);
}

/* ---------- Merch grid ---------- */

.merch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0px;
  margin: 0 calc(-1 * var(--gutter));
}

.merch-card:not(:first-child) {
  margin-top: -16px;
}

.merch-card {
  perspective: 1200px;
  aspect-ratio: 1 / 1;
  touch-action: manipulation;
  width: 86%;
  justify-self: center;
}

.merch-card:nth-child(1) { transform: rotate(-7deg); }
.merch-card:nth-child(2) { transform: rotate(5deg); }
.merch-card:nth-child(3) { transform: rotate(6deg); order: 4; }
.merch-card:nth-child(4) { transform: rotate(-4deg); order: 3; }

.merch-flip {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.28s cubic-bezier(0.3, 0.1, 0.2, 1);
  will-change: transform;
}

.merch-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.merch-face img {
  width: 75%;
  height: 75%;
  object-fit: contain;
  pointer-events: none;
}

.merch-face.merch-back {
  transform: rotateY(180deg);
}

.merch-note {
  margin-top: 20px;
  opacity: 0.85;
}

/* ---------- Contact ---------- */

.contact-email {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-size: clamp(22px, 4.48vw, 51px);
  font-weight: 700;
  margin-top: clamp(36px, 7.1vw, 82px);
}

.contact-email a {
  word-break: break-word;
}

.contact-email a:hover {
  font-style: italic;
}

#kontakt p a:hover {
  font-style: italic;
}

.contact-hint {
  display: none;
  font-size: clamp(15px, 0.46vw, 18px);
  font-weight: 500;
}

/* ---------- Footer ---------- */

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px var(--gutter) 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.site-footer a:hover {
  font-style: italic;
}

/* ---------- Page transition overlay ---------- */

.page-transition {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

.page-transition svg {
  position: absolute;
  width: 100%;
  height: 100%;
}

.page-transition circle {
  transform-origin: var(--ox, 50%) var(--oy, 50%);
}

/* ---------- Desktop (matches the source design at 1920px) ---------- */

@media (min-width: 1024px) {
  :root {
    --gutter: clamp(24px, 2vw, 40px);
    --max-width: 1920px;
    --gig-gap: clamp(10px, 1.2vw, 20px);
  }

  .site-header {
    padding-top: clamp(24px, 3vw, 40px);
    padding-bottom: clamp(24px, 3vw, 40px);
  }

  .logo {
    width: clamp(60px, 5.7vw, 110px);
  }

  .info-photo {
    margin-top: 0;
  }

  .main-nav ul {
    gap: clamp(20px, 3vw, 40px);
  }

  .main-nav a {
    font-size: clamp(18px, 2vw, 40px);
  }

  .hero {
    justify-content: center;
    padding-top: 4px;
    padding-bottom: clamp(40px, 6vw, 72px);
    transform: translateX(clamp(-360px, calc(52px - 20.8vw), -150px));
  }

  .balkonzert-link {
    width: 46%;
    max-width: clamp(650px, 62.5vw, 1200px);
    animation: none;
  }

  h1, h2 {
    font-size: clamp(64px, 7.8vw, 150px);
    margin-bottom: clamp(16px, 1.5vw, 28px);
  }

  section {
    padding-top: clamp(40px, 4.5vw, 72px);
    padding-bottom: clamp(40px, 4.5vw, 72px);
  }

  p {
    font-size: clamp(18px, 2.87vw, 55px);
    line-height: 1.2;
    margin-bottom: clamp(16px, 1.6vw, 28px);
  }

  .gig-list {
    margin: 0;
  }

  #past-gigs {
    margin-top: clamp(40px, 5vw, 96px);
  }

  .gig-item {
    position: relative;
    gap: clamp(30px, 4.5vw, 84px);
    padding: clamp(12px, 1.4vw, 22px) clamp(20px, 2.5vw, 40px);
    border-radius: clamp(16px, 1.8vw, 32px);
  }

  .gig-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 3px solid var(--green);
    border-radius: inherit;
    pointer-events: none;
    z-index: 5;
  }

  .gig-item.has-link {
    z-index: 2;
  }

  .gig-info {
    margin-left: 30px;
  }

  .gig-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: auto;
    text-align: center;
  }

  .gig-date .month {
    font-size: clamp(28px, 3vw, 55px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.05em;
  }

  .gig-date .day {
    font-size: clamp(45px, 4.6vw, 86px);
    font-weight: 700;
    line-height: 1;
  }

  .gig-item.is-balkonzert .gig-date::before {
    left: calc(50% + 8px);
    top: calc(50% + 3px);
    transform: translate(-50%, -50%);
    width: clamp(260px, 13.4vw, 290px);
    height: clamp(260px, 13.4vw, 290px);
  }

  .gig-title {
    font-size: clamp(30px, 3.9vw, 65px);
    line-height: 1.05;
    margin-bottom: 0;
  }

  .gig-venue {
    font-size: clamp(20px, 2vw, 38px);
    font-weight: 200;
    line-height: 1.1;
  }

  .venue-break {
    display: none;
  }

  .gig-time {
    align-self: flex-start;
    font-size: clamp(26px, 2.23vw, 46px);
  }

  .merch-grid {
    grid-template-columns: 1fr 1fr;
    gap: clamp(0px, 0.5vw, 10px);
  }

  .merch-card {
    width: 100%;
    justify-self: stretch;
  }

  .merch-card:not(:first-child) {
    margin-top: 0;
  }

  .merch-card:nth-child(3),
  .merch-card:nth-child(4) {
    order: 0;
  }

  .merch-note {
    font-size: clamp(18px, 2vw, 32px);
  }

  .contact-email {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: clamp(28px, 5vw, 96px);
    gap: clamp(10px, 1.2vw, 22px);
    margin-top: clamp(60px, 8vw, 150px);
  }

  .contact-hint {
    display: block;
    font-size: clamp(18px, 1.5vw, 28px);
  }

  .site-footer {
    font-size: clamp(12px, 0.8vw, 15px);
  }
}
