@font-face {
  font-family: 'Saonara';
  src: url('fonts/MADE SAONARA PERSONAL USE.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Saonara 2';
  src: url('fonts/MADE SAONARA 2 PERSONAL USE.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}


:root {
  /* falls du später globale Farben willst */
}

* {
  box-sizing: border-box;
}

/* Standard-Mauszeiger ausblenden */
body, a, button, .card, .gallery-item {
  cursor: none !important;
}

body {
  margin: 0;
  background: #fff;
  color: #222;
  /* font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; */
    font-family: 'Saonara', serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Wrapper für das Grid */
.grid-wrapper {
  flex: 1;
  display: flex;
  align-items: stretch;
}

/* 3x3-Grid über die Seite */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* genau 3 Spalten */
  grid-auto-rows: 340px; /* behält die gleichmäßige Höhe */
  width: 100%;
  height: auto;
  gap: 0; /* optional, wenn du keinen Abstand willst */
}

/* einzelne Kachel */
.card {
  position: relative;
  display: block;
  background: #fff;
  border: none;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
}

/* farbige Fläche komplett */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* knallige Farben je Kachel */
.card--color1::before { background: #0290ac; }
.card--color2::before { background: #FE53BB; }
.card--color3::before { background: #09FBD3; }
.card--color4::before { background: #feff12; }
.card--color5::before { background: #9b59b6; }
.card--color6::before { background: #e67e22; }
.card--color7::before { background: #a42742; }
.card--color8::before { background: #e74c3c; }
.card--color9::before { background: #02a57f; }
.card--color10::before { background: #47cbff; }
.card--color11::before { background: #a5006b; }
.card--color12::before { background: #efff89; }

/* das Bild kleiner und zentriert */
.card-img {
  position: relative;
  z-index: 0;
  width: 88%;
  height: 88%;
  object-fit: cover;
  display: block;
  margin: 6% auto 0;
  background: #fff;
  transition: transform 0.2s ease;
}

/* Overlay mit Text – standard: versteckt */
.card-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
  color: #000;
}

.card-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: rgba(0,0,0,0.6);
}

.card h2 {
  margin: 0.35rem 0 0.1rem;
  font-size: 2rem;
  line-height: 1.3;
  color: #111;
  font-weight: 700;
}

.card p {
  margin: 0;
  font-size: 0.75rem;
  color: #333;
}

/* Hover-Effekte */
.card:hover {
  transform: scale(1.04);
  transition: transform 0.3s ease;
}

.card:hover .card-img {
  transform: scale(1.03);
}

.card:hover .card-info {
  opacity: 1;
}

/* White overlay effect between image and text on hover */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.3s ease;
  z-index: 1;
}

.card:hover::after {
  background: rgba(255,255,255,0.7);
}

/* Footer wie gehabt */
.footer {
  text-align: center;
  font-size: 0.75rem;
  color: #777;
  padding: 1rem 0 1.3rem;
  border-top: 1px solid rgba(0,0,0,0.04);
}

.footer a {
  color: #222;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none; /* wird per JS auf flex gesetzt */
  align-items: center;
  justify-content: center;
  z-index: 999; /* über alles drüber, auch über den Titel unten */
}

.lightbox.open {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.lightbox-close {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 2.3rem;
  line-height: 1;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.35);
}

/* auf Mobile das Bild etwas kleiner */
@media (max-width: 600px) {
  .lightbox-img {
    max-width: 95vw;
    max-height: 80vh;
  }
}

/* responsive */
@media (max-width: 960px) {
  .grid {
    grid-template-columns: repeat(2, 1fr); /* 2 Spalten bei Tablets */
  }
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr; /* 1 Spalte bei Handyansicht */
  }
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr; /* eine Spalte */
    grid-auto-rows: 240px;      /* gleich hohe Kacheln */
    height: auto;
  }
  .card { min-height: 240px; }
  .card-img { width: 90%; height: auto; margin-top: 1.5rem; }
}

@media (max-width: 600px) {
  /* Overlay auf Mobile immer sichtbar */
  .card-info {
    opacity: 1;
  }
  /* kein weisser Overlay-Filter auf Mobile */
  .card::after {
    background: none;
  }
  /* Abstand zwischen Bild und Text */
  .card-img {
    margin-top: 3rem;
  }
}

@media (max-width: 420px) {
  .card {
    min-height: 200px;
  }
  .card h2 {
    font-size: 1.5rem;
  }
}

/* ===== Detail / Portfolio-Seite ===== */
body.detail-page {
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.detail-header {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 2rem; /* grösserer Abstand zwischen Button und Titel */
  padding: 1.5rem 2rem;
  z-index: 10;
  background: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.6rem 1rem;
  border-radius: 30px;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.back-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-3px);
}

.detail-meta {
  color: #fff;
}

.detail-meta h1 {
  margin: 0;
  font-size: 2.4rem;
  line-height: 1.1;
}

.detail-meta p {
  margin: 0.3rem 0 0;
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
}

/* ===== Detail / Portfolio-Seite ===== */
.detail-gallery {
  flex: 1;
  column-count: 3;
  column-gap: 0;
  width: 100%;
  line-height: 0; /* entfernt vertikalen Weissraum zwischen Bildern */
}

.gallery-item {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  -moz-column-break-inside: avoid;
  margin: 0;
  padding: 0;
  width: 100%;
  display: inline-block;
  margin-bottom: 0; /* entfernt mögliche Restabstände */
  padding-bottom: 0;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: bottom; /* verhindert minimale Lücken */
  object-fit: cover;
  filter: brightness(0.9);
  border: none;
}

.gallery-item.portrait-auto {
  background: #fff;
}

@media (max-width: 1000px) {
  .detail-gallery {
    column-count: 3;
  }
}

@media (max-width: 700px) {
  .detail-gallery {
    column-count: 2;
  }
}

@media (max-width: 480px) {
  .detail-gallery {
    column-count: 1;
  }
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #000; /* Farbe des Punkts */
  pointer-events: none; /* soll nicht anklickbar sein */
  transform: translate(-50%, -50%);
  z-index: 9999;
}
