/* Valentin Macke — shared site styles */
:root {
  --bg: #222;
  --text: #a6a6a6;
  --heading: #fff;
  --link: #d0d0d0;
  --muted: #777;
  --line: #3a3a3a;
  --max: 1200px;
  --font: "Jost", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo img { width: 64px; height: auto; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 28px;
}

.site-nav a {
  color: var(--text);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.02em;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--heading); text-decoration: none; }

.site-nav { flex: 1; }

/* ---------- Language ---------- */
/* Every text exists as lang="en" and lang="de"; only the active one shows. */
html[data-lang="en"] body [lang="de"],
html[data-lang="de"] body [lang="en"] { display: none !important; }

.lang-toggle {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-family: var(--font);
  font-size: 14px;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
}
.lang-toggle:hover { border-color: var(--muted); }
html[data-lang="de"] .lang-toggle [data-l="de"],
html[data-lang="en"] .lang-toggle [data-l="en"] { color: var(--heading); }

/* ---------- Content ---------- */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 24px 64px;
}

.text-block p { margin: 0 0 1em; }

h1, h2, h3 {
  color: var(--heading);
  font-weight: 400;
  margin: 0;
}

.show-title {
  font-size: 44px;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.show-subtitle {
  color: var(--heading);
  font-size: 24px;
  margin: 6px 0 2px;
}

.show-meta {
  font-style: italic;
  margin: 0 0 20px;
}

.section-title {
  font-size: 26px;
  margin-bottom: 16px;
}

/* ---------- Hero: title + intro next to the trailer ---------- */
.hero {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 40px;
}

.hero-text p { margin: 0 0 1em; }

.jump-dates {
  display: inline-block;
  margin-top: 4px;
  padding: 8px 18px;
  border: 1px solid var(--muted);
  border-radius: 999px;
  color: var(--heading);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.02em;
}
.jump-dates:hover { border-color: var(--heading); text-decoration: none; }

/* ---------- Video (loads the player on click) ---------- */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111;
}

.video iframe,
.video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-poster {
  padding: 0;
  background: none;
  cursor: pointer;
}
.video-poster img { width: 100%; height: 100%; object-fit: cover; }

.video-poster .play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.85);
  transition: background 0.2s;
}
.video-poster .play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -12px 0 0 -7px;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #fff;
}
.video-poster:hover .play { background: rgba(0, 0, 0, 0.85); }

/* ---------- Gallery: small thumbnails, full size on click ---------- */
.gallery {
  position: relative;
  margin: 0 0 56px;
}

/* Native horizontal scrolling with snap = swipe on touch, smooth slide on click */
.slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  background: #111;
}
.slides::-webkit-scrollbar { display: none; }

.slide {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: start;
  cursor: zoom-in;
}

.slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ---------- Loading state (slider photos, trailer) ---------- */
.slide img,
.video-poster img { transition: opacity 0.5s; }

.is-loading img,
.is-loading .play { opacity: 0; }

/* Soft shimmer across the empty frame ... */
.is-loading {
  background: linear-gradient(100deg, #1a1a1a 30%, #2c2c2c 50%, #1a1a1a 70%) #1a1a1a;
  background-size: 300% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}
/* ... with a spinner in the middle */
.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

@media (prefers-reduced-motion: reduce) {
  .is-loading { animation: none; }
  .is-loading::after { animation-duration: 2s; }
}

.slide-prev,
.slide-next {
  position: absolute;
  top: calc(50% - 16px);
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-family: var(--font);
  font-size: 32px;
  line-height: 1;
  padding: 0 0 4px;
  cursor: pointer;
  transition: background 0.2s;
}
.slide-prev:hover,
.slide-next:hover { background: rgba(0, 0, 0, 0.75); }
.slide-prev { left: 12px; }
.slide-next { right: 12px; }

.slide-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
/* Small visible dot, larger invisible tap area */
.slide-dots button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}
.slide-dots button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--muted);
  transition: background 0.2s;
}
.slide-dots button[aria-current="true"]::after { background: var(--heading); }

/* Long texts show their first paragraph until "Weiterlesen" is clicked */
.collapsible:not(.open) [lang] > p:nth-of-type(n+2) { display: none; }
.read-more {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid var(--muted);
  border-radius: 999px;
  background: none;
  color: var(--heading);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
}
.read-more:hover { border-color: var(--heading); }

/* Label next to the trailer that also starts it */
.video-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--heading);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.video-label::before {
  content: "";
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor;
}
.video-label:hover { text-decoration: underline; }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.lightbox::backdrop { background: #000; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }

.lightbox img {
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 40px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox button {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  font-family: var(--font);
  font-size: 48px;
  line-height: 1;
  padding: 12px 18px;
  cursor: pointer;
  opacity: 0.7;
}
.lightbox button:hover { opacity: 1; }
.lb-close { top: 8px; right: 8px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

/* ---------- Two text columns ---------- */
.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-bottom: 56px;
}

/* ---------- Tour dates ---------- */
.dates-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 56px;
  align-items: start;
}

.tour { margin-bottom: 32px; }

.dates-note { margin: -8px 0 24px; font-size: 15px; font-style: italic; }

.tour-name {
  font-style: italic;
  font-size: 17px;
  margin: 0;
}

.tour-host {
  font-size: 17px;
  margin: 0 0 8px;
}

.date-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.date-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 16px;
}
.date-list li:last-child { border-bottom: 1px solid var(--line); }

.date-list .place .city { color: #ddd; font-weight: 400; display: block; }
.date-list .place a { font-size: 14px; }
.date-list .when { white-space: nowrap; }

.date-list .tickets {
  padding: 6px 12px;
  border: 1px solid var(--muted);
  border-radius: 999px;
  color: var(--heading);
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.date-list .tickets:hover { border-color: var(--heading); text-decoration: none; }

.date-list li.past { opacity: 0.35; }

/* ---------- Portfolio overviews (Film, Animation) ---------- */
.page-intro { max-width: 760px; margin: 8px 0 32px; }
.page-intro p { margin: 8px 0 0; }

.page-title {
  font-size: 40px;
  letter-spacing: 0.06em;
  line-height: 1.15;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 24px;
}

.tile { display: block; color: var(--text); }
.tile:hover { text-decoration: none; }

.tile img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #111;
  margin-bottom: 10px;
  transition: opacity 0.3s;
}
.tile:hover img { opacity: 0.8; }

.tile-title { display: block; color: var(--heading); font-size: 19px; font-weight: 400; }
.tile-sub { display: block; font-size: 15px; }

/* ---------- Project pages ---------- */
.project { max-width: 960px; margin: 0 auto; }

.back-link { display: inline-block; margin: 8px 0 20px; font-size: 16px; }

.project-head { max-width: 760px; margin-bottom: 36px; }
.project-head p { margin: 0 0 1em; }

.project-meta { font-style: italic; margin: 6px 0 18px !important; }

.muted { color: var(--muted); }

.media { margin: 0 0 40px; }
.caption { margin: 10px 0 0; max-width: 760px; }

.project-text { max-width: 760px; margin: 0 0 24px; }

.stills,
.loops {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 0 0 40px;
}
.stills.single,
.loops.single { grid-template-columns: minmax(0, 760px); }

.stills a { display: block; background: #111; cursor: zoom-in; }
.stills img,
.loops video {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.3s;
}
.stills a:hover img { opacity: 0.85; }
.loops video { background: #111; }

/* ---------- About & Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
  margin-top: 8px;
}
.contact-text p { margin: 0 0 1em; }
.contact-text .page-title { margin-bottom: 20px; }
.contact-direct { margin-top: 24px !important; }

.contact-form { display: grid; gap: 16px; }
.contact-form label { display: grid; gap: 6px; color: var(--heading); font-size: 16px; font-weight: 400; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #1a1a1a;
  color: var(--heading);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 300;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--muted); }
.contact-form textarea { resize: vertical; }
.form-submit {
  justify-self: start;
  padding: 10px 22px;
  border: 1px solid var(--muted);
  border-radius: 999px;
  background: none;
  color: var(--heading);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
}
.form-submit:hover { border-color: var(--heading); }
.form-submit:disabled { opacity: 0.5; cursor: wait; }

/* Only the message for the current state is shown */
.form-status { margin: 0; font-size: 15px; }
.form-status > [data-state] { display: none; }
.form-status[data-state="sending"] > [data-state="sending"],
.form-status[data-state="sent"] > [data-state="sent"],
.form-status[data-state="error"] > [data-state="error"] { display: inline; }
.form-status[data-state="sent"] { color: var(--heading); }

/* Spam trap: invisible to people, bots fill it in */
.botcheck { display: none; }

/* ---------- Footer ---------- */
.back-to-top {
  display: block;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  padding: 0 16px 40px;
}

/* ---------- Responsive ---------- */
/* Desktop: photo slider comes first, above the title */
@media (min-width: 901px) {
  main { display: flex; flex-direction: column; }
  main > .gallery { order: -1; margin-bottom: 48px; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .columns,
  .dates-cols { grid-template-columns: 1fr; gap: 0; }
  .columns .text-block + .text-block { margin-top: 24px; }
}

@media (max-width: 540px) {
  body { font-size: 16px; }
  .site-header { flex-direction: column; gap: 12px; padding: 16px 16px 8px; position: relative; }
  .lang-toggle { position: absolute; top: 16px; right: 16px; }
  .contact { grid-template-columns: 1fr; gap: 32px; }
  .logo img { width: 56px; }
  .site-nav ul { justify-content: center; gap: 4px 18px; }
  .site-nav a { font-size: 15px; }
  main { padding: 8px 16px 48px; }
  .show-title { font-size: 32px; }
  .show-subtitle { font-size: 20px; }
  .section-title { font-size: 22px; }
  .gallery { margin: 0 -16px 40px; }
  .slide-prev, .slide-next { width: 40px; height: 40px; font-size: 26px; }
  .slide-prev { left: 8px; }
  .slide-next { right: 8px; }
  .slide-dots { gap: 0; }
  .slide-dots button { width: 20px; height: 20px; }
  .hero { margin-top: 24px; }
  .page-intro { margin-top: 24px; }
  .page-title { font-size: 30px; }
  .tiles { grid-template-columns: 1fr; gap: 28px; }
  .stills, .loops { gap: 4px; }
  .lightbox img { max-width: 100vw; max-height: calc(100vh - 120px); }
  .lb-prev, .lb-next { top: auto; bottom: 12px; transform: none; }

  /* Stack city, date and host on the left, ticket button on the right */
  .date-list li {
    grid-template-columns: 1fr auto;
    grid-template-areas: "city tickets" "when tickets" "host tickets";
    gap: 0 14px;
    padding: 12px 0;
  }
  .date-list .place { display: contents; }
  .date-list .place .city { grid-area: city; }
  .date-list .place a { grid-area: host; }
  .date-list .when { grid-area: when; }
  .date-list .tickets { grid-area: tickets; padding: 10px 14px; }
}
