/* =========================
   RESET / BASE
   ========================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 400;
}

h1, h2, h3,
.site-nav,
.sub-nav {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* =========================
   THEME + VARIABLES
   (hier kannst du Farben testen)
   ========================= */
:root {
  /* Farben */
  /*--page-bg: #d2dadd;         hell mit petrol-stich */
  --page-bg: #cbd4d7;
  --panel-bg: #e7eff0;       /* Panel */
  --panel-bg-2: #dde7e8;     /* Panel-Abstufung */
  --text-color: #14121b;
  --text-muted: rgba(20, 18, 27, 0.72);

  --accent: #785e85;         /* gedecktes Lila */
  --petrol: #0b839d;

    --purple-grad: linear-gradient( /*dunkles lila*/
    180deg,
    #857293,   /* minimal heller */
    #6f557c    /* minimal dunkler */
  );
  
  /* NEU: helles Lila für SubNav */
  --purple-grad-soft: linear-gradient(
    180deg,
    #b0a7c6,
    #a299b8
  );

  --line: rgba(20, 18, 27, 0.14);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.12);
  


  /* Layout */
  --site-max: 1000px;
  --site-pad-desktop: 3rem;
  --site-pad-mobile: 1rem;

  --header-height: 80px; /* Fallback, wird per JS überschrieben */

  --section-pad-y: 1.75rem; /* kompakter als vorher */
  --panel-pad: 1.5rem;

  /* Gallery */
  --gallery-gap: 1rem;
  --gallery-h-desktop: 300px;
  --gallery-h-mobile: 200px;

  --hint-width: 4.5rem;
  --hint-arrow-size: 2.25rem;
  --hint-arrow-size-mobile: 1.75rem;
}

body {
  font-family: system-ui, sans-serif;
  line-height: 1.5;
  background: var(--page-bg);
  color: var(--text-color);
}

/* Nur lazy Bilder bekommen Fade – und nur wenn JS "loaded" setzt */
img[loading="lazy"] {
  opacity: 1;                 /* Default sichtbar */
  transition: opacity 0.35s ease;
}

img[loading="lazy"].is-loading {
  opacity: 0;                 /* Nur wenn JS es aktiv setzt */
}

img[loading="lazy"].loaded {
  opacity: 1;
}


/* =========================
   GLOBAL LINK STYLES (Content)
   ========================= */
a {
  color: var(--accent);          /* Lila */
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: var(--petrol);          /* Petrol */
}

a:active {
  color: var(--petrol);
}


/* =========================
   LAYOUT
   ========================= */
.site-wrapper {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 var(--site-pad-desktop);
}

@media (max-width: 768px) {
  .site-wrapper {
    max-width: 100%;
    padding: 0 var(--site-pad-mobile);
  }
}

/* =========================
   HEADER (ganzer Header unterlegt)
   ========================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--purple-grad);
  color: rgba(255, 255, 255, 0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;

  width: 100%;
  padding: 0 var(--site-pad-desktop); /* nur seitlich */
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0 var(--site-pad-mobile);
  }
}

/* Desktop Navigation */
.site-nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
}

/* =========================
   MAIN NAV LINKS
   ========================= */
.site-nav a {
  color: rgba(255,255,255,0.95);
  text-decoration: none;
  font-weight: 700;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--petrol);          /* Petrol statt Unterstrich */
  text-decoration: none;
}


/* Main */
.site-main {
  padding-top: var(--header-height);
}

/* =========================
   SECTIONS + PANEL LOOK
   ========================= */
.content-section {
  min-height: 100vh;
  padding: var(--section-pad-y) 0;
}

.content-section > .content-inner > h2 {
  background: var(--purple-grad);
}


.content-inner {
  width: 100%;
  margin: 0 auto;

  background: linear-gradient(180deg, var(--panel-bg), var(--panel-bg-2));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: var(--panel-pad);
}

/* H2 Balken bündig oben/seitlich im Panel */
.content-section > .content-inner > h2 {
  display: block;
  margin: calc(var(--panel-pad) * -1) calc(var(--panel-pad) * -1) 1.1rem;
  padding: 0.65rem var(--panel-pad);
  background: var(--purple-grad);
  color: rgba(255, 255, 255, 0.95);
  font-weight: 800;
  letter-spacing: 0.2px;
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  text-align: center;
}

/* Kleine Textsektionen: keine Vollbild-Höhe */
#about,
#contact {
  min-height: auto;
}

/* =========================
   SUB NAV (Desktop + Mobile Scroll)
   ========================= */

.sub-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;

  /* angedockt an H2 */
  margin: -1.1rem calc(var(--panel-pad) * -1) 1.75rem;
  padding: 0.6rem var(--panel-pad) 0.7rem;

  background: var(--purple-grad-soft);
}

/* Links: inaktiv schwarz, aktiv/hover petrol */
.sub-nav a {
  color: #14121B;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}

.sub-nav a:hover,
.sub-nav a:focus,
.sub-nav a.is-active {
  color: var(--petrol);
  font-weight: 700;
}

/* Mobile: NICHT umbrechen, horizontal scrollen */
@media (max-width: 768px) {
  .sub-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;

    /* optional, damit’s sich “schiebbarer” anfühlt */
    gap: 1rem;
    padding-bottom: 0.85rem;

    scrollbar-width: none; /* Firefox */
  }

  .sub-nav::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }

  .sub-nav a {
    flex: 0 0 auto;
  }
}


/* =========================
   MOBILE NAV LINKS
   ========================= */
.mobile-nav__link,
.mobile-nav__links a {
  color: var(--accent);
  text-decoration: none;
}

.mobile-nav__link:hover,
.mobile-nav__links a:hover {
  color: var(--petrol);
}


/* =========================
   GALLERY
   ========================= */
.gallery-shell {
  position: relative;
  margin-bottom: 2.25rem; /* klarer Abschnittswechsel */
}

.gallery-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  margin-top: 2rem;
  padding-bottom: 1rem;
  -webkit-overflow-scrolling: touch;

  scrollbar-width: none; /* Firefox */

  cursor: grab;
  user-select: none;
}

.gallery-wrapper::-webkit-scrollbar {
  display: none;
}

.gallery-wrapper.is-dragging {
  cursor: grabbing;
}

.gallery {
  display: flex;
  gap: var(--gallery-gap);
}

.gallery-item {
  flex: 0 0 auto;
}

.gallery-item img {
  display: block;
  height: var(--gallery-h-desktop);
  width: auto;
  object-fit: cover;

  border-radius: 0; /* kantig */
  border: 1px solid rgba(20, 18, 27, 0.14);

  user-select: none;
  -webkit-user-drag: none;
}

/* =========================
   OVERLAY HINTS (Fade + Pfeile)
   ========================= */
.gallery-left-fade,
.gallery-right-fade,
.gallery-hint {
  position: absolute;
  top: 0;
  height: 100%;
  pointer-events: none;
  z-index: 3;

  opacity: 0;
  transition:
    opacity 0.35s cubic-bezier(0.4, 0.0, 0.2, 1),
    transform 0.35s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Fade-Flächen */
.gallery-left-fade,
.gallery-right-fade {
  width: var(--hint-width);
  z-index: 2;
}

.gallery-left-fade {
  left: 0;
  background: linear-gradient(to right, var(--panel-bg), rgba(0, 0, 0, 0));
  transform: translateX(-8px);
}

.gallery-right-fade {
  right: 0;
  background: linear-gradient(to left, var(--panel-bg), rgba(0, 0, 0, 0));
  transform: translateX(8px);
}

/* Pfeile */
.gallery-hint {
  top: 50%;
  height: auto;
  transform: translateY(-50%);
  font-size: var(--hint-arrow-size);
  line-height: 1;
  color: rgba(20, 18, 27, 0.75);
}

.gallery-hint.left {
  left: 1rem;
  transform: translateY(-50%) translateX(-6px);
}

.gallery-hint.right {
  right: 1rem;
  transform: translateY(-50%) translateX(6px);
}

/* Sichtbarkeit abhängig von JS-Klassen */
.gallery-shell.hint-left .gallery-left-fade,
.gallery-shell.hint-left .gallery-hint.left,
.gallery-shell.hint-right .gallery-right-fade,
.gallery-shell.hint-right .gallery-hint.right {
  opacity: 0.35;
  transform: translateX(0);
}

.gallery-shell:hover.hint-left .gallery-left-fade,
.gallery-shell:hover.hint-left .gallery-hint.left,
.gallery-shell:hover.hint-right .gallery-right-fade,
.gallery-shell:hover.hint-right .gallery-hint.right {
  opacity: 0.75;
}

/* Mobile Gallery */
@media (max-width: 768px) {
  .gallery-item img {
    height: var(--gallery-h-mobile);
  }

  .gallery-hint {
    font-size: var(--hint-arrow-size-mobile);
  }

  .gallery-hint.left { left: 0.75rem; }
  .gallery-hint.right { right: 0.75rem; }

  .gallery-shell.hint-left .gallery-left-fade,
  .gallery-shell.hint-left .gallery-hint.left,
  .gallery-shell.hint-right .gallery-right-fade,
  .gallery-shell.hint-right .gallery-hint.right {
    opacity: 0.55;
  }
}

/* =========================
   LIGHTBOX
   ========================= */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.lightbox.active {
  display: flex;
}

.lightbox-figure {
  text-align: center;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-caption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  padding: 1rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    font-size: 2.2rem;
  }
}

/* =========================
   CONCEPTS
   ========================= */
.concept-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 5rem;
  align-items: start;
}

/* Alternierende Reihenfolge (Desktop) */
.concept-text-left  { grid-template-areas: "text media"; }
.concept-text-right { grid-template-areas: "media text"; }

.concept-text-left  .concept-text  { grid-area: text; }
.concept-text-left  .concept-media { grid-area: media; }
.concept-text-right .concept-text  { grid-area: text; }
.concept-text-right .concept-media { grid-area: media; }

/* Bilder im Concept-Bereich */
.concept-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.concept-item.is-hero {
  grid-column: 1 / -1;
}

.concept-item img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
  border: 1px solid rgba(20, 18, 27, 0.14);
  cursor: pointer;
}

/* Mobile */
@media (max-width: 768px) {
  .concept-block {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .concept-media { order: 1; }
  .concept-text  { order: 2; }

  .concept-text,
  .concept-media { grid-area: auto; }

  .concept-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .concept-item.is-hero {
    grid-column: 1 / -1;
  }
}

/* =========================
   MOBILE NAV (Overlay)
   ========================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.8rem;
  cursor: pointer;
}

.mobile-nav { display: none; }

@media (max-width: 768px) {
  .site-nav { display: none; }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    margin-right: 0.25rem;
  }

  .mobile-nav {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 3000;
  }

  .mobile-nav.active {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-nav__panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(85vw, 320px);
    background: linear-gradient(180deg, #b0a7c6, #a299b8); /* helles Lila */
    color: #14121B;
    padding: 1.25rem;
    transform: translateX(100%);
    transition: transform 0.2s ease;
  }

  .mobile-nav.active .mobile-nav__panel {
    transform: translateX(0);
  }

  .mobile-nav__close {
    background: none;
    border: 0;
    font-size: 2rem;
    cursor: pointer;
    margin-left: auto;
    display: block;
  }

  .mobile-nav__links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
  }

  .mobile-nav__links a {
    text-decoration: none;
    color: #000;
    font-size: 1.1rem;
  }
}

.mobile-nav__item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem;
}

.mobile-nav__link {
  text-decoration: none;
  color: #000;
  font-size: 1.1rem;
}

.mobile-nav__toggle {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-size: 1.1rem;
  opacity: 0.75;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-nav__item.is-open .mobile-nav__toggle {
  transform: rotate(180deg);
  opacity: 1;
}

.mobile-nav__sub {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem 0 0.25rem 1rem;
}

.mobile-nav__sub[hidden] {
  display: none !important;
}

/* =========================
   ABOUT
   ========================= */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: 3rem;
  align-items: start;
}

.about-media {
  justify-self: end;
  min-width: 0;
}

.about-media img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 300px;
  border-radius: 0;
  border: 1px solid rgba(20, 18, 27, 0.14);
}

.about-text > :first-child { margin-top: 0; }
.about-text > :last-child  { margin-bottom: 0; }
.about-text p + p { margin-top: 0.75rem; }

@media (max-width: 768px) {
  .about {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .about-text  { order: 1; }
  .about-media { order: 2; justify-self: center; }

  .about-media img {
    max-width: 300px;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: 50% 25%;
  }
}

/* =========================
   CONTACT
   ========================= */
.contact {
  max-width: 42rem;
}

/* =========================
   CONCEPT PROJECT DIVIDER
   ========================= */

/*.concept-divider {
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(20,18,27,0),
    rgba(20,18,27,0.25),
    rgba(20,18,27,0)
  );
  margin: 3rem 0;
}*/

.concept-divider {
  height: 1px;
  background: var(--line);
  opacity: 0.6;
  margin: 3rem 0;
}

/* =========================
   MOBILE: weniger Abstand zwischen Panels (nur außen)
   ========================= */
@media (max-width: 768px) {
  :root {
    --section-pad-y: 0.7rem;   /* deutlich kompakter, innen bleibt unberührt */
  }
}

/* =========================
   MOBILE: Sections nicht auf 100vh zwingen
   ========================= */
@media (max-width: 768px) {
  .content-section {
    min-height: auto;
  }
}
