/* lumo.studios – Stylesheet
   Layout nach den PDF-Vorlagen: Navigation links, Inhalt ab ~21 % der Breite. */

@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/dm-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #000;
  --paper: #fff;
  --muted: #737373;          /* aktiver Menüpunkt, 4.7:1 auf Weiß */
  --placeholder: #e4e4e4;
  --focus: #000;

  --font: "DM Sans", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* Raster aus der Vorlage */
  --edge: 3vw;               /* linker Rand der Navigation */
  --content-left: 20.75vw;   /* Beginn des Inhalts */
  --content-right: 7vw;
  --col-gap: 8.4vw;
  --photo-w: 30vw;           /* Breite des Portraits = Breite des Logos */          /* Abstand der drei Bildspalten */
  --tile-gap: 8vw;           /* vertikaler Abstand zwischen Bildern */

  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; transition: color .2s var(--ease); }
@media (hover: hover) { a:hover { color: var(--muted); } }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.skip-link {
  position: absolute; left: var(--edge); top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .5rem .9rem;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Logo ---------- */

.logo {
  display: inline-block;
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1;
  white-space: nowrap;
}
.logo__b { font-weight: 100; }
.logo:hover { color: inherit; }

.logo--big {
  display: block;
  width: fit-content;
  /* Schriftgröße so, dass die Buchstaben genau so breit sind wie das Portrait:
     sichtbare Breite von „lumo.studios“ = 5.203 × Schriftgröße (DM Sans 400/100),
     das „l“ hat links 0.07em Luft – die wird mit dem negativen Rand ausgeglichen. */
  font-size: calc(var(--photo-w) / 5.203);
  margin: 9vw 0 3.2vw -.07em;
}

/* ---------- Seitenleiste ---------- */

.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--content-left);
  padding: 11vw 1.5rem 0 var(--edge);
  z-index: 10;
}

.logo--mini {
  font-size: clamp(1.25rem, 1.9vw, 2rem);
  margin-bottom: 3.5vw;
  opacity: 0;
  transform: translateY(-.35rem);
  visibility: hidden;
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  pointer-events: none;
}
.is-scrolled .logo--mini,
.page--compact .logo--mini { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }

/* Menü-Knöpfe gibt es nur auf Tablet und Handy */
.menu-toggle, .menu-close, .menu-backdrop { display: none; }
.page--compact main { padding-top: 11vw; }

.nav ul { list-style: none; margin: 0; padding: 0; }
.nav li + li { margin-top: .9rem; }
.nav a,
.nav__toggle {
  display: inline-block;
  padding: .15rem 0;
  font: inherit;
  font-size: clamp(.95rem, 1.15vw, 1.2rem);
  text-transform: uppercase;
  letter-spacing: .01em;
  color: var(--ink);
}
.nav__toggle {
  background: none; border: 0; cursor: pointer; text-align: left;
  transition: color .2s var(--ease);
}
@media (hover: hover) {
  .nav a:hover,
  .nav__toggle:hover { color: var(--muted); }
}
.nav a[aria-current="page"],
.nav__group.is-active > .nav__toggle { color: var(--muted); }
.nav__toggle { display: inline-flex; align-items: center; gap: .4em; }
.nav__chevron { width: .7em; height: .7em; transition: transform .2s var(--ease); }
.nav__toggle[aria-expanded="true"] .nav__chevron { transform: rotate(180deg); }
/* gleicher Abstand wie zwischen allen anderen Menüpunkten */
.nav .nav__sub { list-style: none; margin: .9rem 0 0; padding: 0; }
.nav__sub[hidden] { display: none; }
.nav__group:has(.nav__sub:not([hidden])) { margin-bottom: 2.2rem; }

/* ---------- Hauptbereich ---------- */

main {
  margin-left: var(--content-left);
  margin-right: var(--content-right);
  min-height: 70vh;
}

/* Startseite: Portrait + Text */
.intro {
  display: grid;
  grid-template-columns: var(--photo-w) minmax(0, 34rem);
  column-gap: 3vw;
  align-items: start;
}
.intro__photo { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--placeholder); }
.intro__text { font-size: clamp(1rem, 1.05vw, 1.125rem); max-width: 34rem; }
.intro__text p { margin: 0 0 1.4em; }
.intro__text p:first-child { margin-bottom: 1em; }
.intro__contact { margin-top: 3.5em; }

.section-gap { height: 18vw; }

/* ---------- Galerie (3 Spalten wie in der Vorlage) ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-items: start;
}
.tile {
  display: block;
  break-inside: avoid;
  margin: 0 0 var(--tile-gap);
  background: var(--placeholder);
  cursor: pointer;
}
.js .gallery[data-shuffle]:not(.is-shuffled) { visibility: hidden; }
.js .project__img[data-covers]:not(.is-ready) { opacity: 0; }
html:not(.js) .project__img[data-covers] { display: none; }

.js .gallery[data-shuffle]:not(.is-shuffled) { visibility: hidden; }
.js .project__img[data-covers]:not(.is-ready) { opacity: 0; }
html:not(.js) .project__img[data-covers] { display: none; }

.tile img {
  width: 100%;
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.tile img.is-loaded { opacity: 1; }
@media (hover: hover) { .tile:hover img { opacity: .88; } }
.tile--placeholder { cursor: default; }

/* ---------- Seitentitel ---------- */

.page-title {
  font-size: clamp(1.5rem, 2vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.2;
  margin: 0 0 4vw;
}
.project-intro { max-width: 40rem; margin: -2vw 0 5vw; }
.project-intro p { margin: 0 0 1em; }
.project-intro__lead { font-weight: 500; }

.back-link { display: inline-block; margin-bottom: 1.5rem; color: var(--muted); }

/* ---------- Projekte ---------- */

.projects {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: var(--tile-gap);
}
.project a { display: block; }
.project a:hover { text-decoration: none; }
.project__media { display: block; background: var(--placeholder); position: relative; }
.project__img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: opacity .3s var(--ease); }
@media (hover: hover) { .project a:hover .project__img { opacity: .88; } }
.project__count { position: absolute; left: -9999px; }
.project__title { display: block; margin-top: .9rem; font-size: 1.25rem; }
.project__meta { color: var(--muted); }

/* ---------- Kontakt ---------- */

.contact {
  display: grid;
  grid-template-columns: var(--photo-w) minmax(0, 30vw);
  column-gap: 3vw;
  align-items: start;
}
.contact__box {
  border: 1.5px solid var(--ink);
  padding: clamp(1.5rem, 2.3vw, 2.5rem);
}
.contact__box h1 {
  font-size: clamp(1.4rem, 1.6vw, 1.75rem);
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 2.4em;
  max-width: 16em;
}
.contact__box p { margin: 0 0 .9rem; font-size: clamp(1rem, 1.2vw, 1.2rem); }
.contact__box .social { margin-top: 1.6rem; }

/* ---------- Textseiten ---------- */

.prose { max-width: 42rem; }
.prose h2 { font-size: 1.125rem; font-weight: 500; margin: 2.2em 0 .5em; }
.prose p { margin: 0 0 1em; }
.prose address { font-style: normal; margin-bottom: 1em; }

/* ---------- Telefon / Mail mit Symbol ---------- */

.contact-link { display: inline-flex; align-items: center; gap: .55em; }
.contact-link .icon { width: 1.05em; height: 1.05em; flex: none; }

/* ---------- Instagram-Icon ---------- */

.social {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-left: -8px;
}
.social svg { width: 28px; height: 28px; }

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

.site-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 2vw;
  align-items: end;
  padding: 14vw var(--edge) 2.5rem calc(var(--edge) + 1vw);
  font-size: .95rem;
  line-height: 1.45;
}
.site-footer__avatar { width: 88px; height: 88px; object-fit: cover; filter: grayscale(1); }
.site-footer__brand .logo { font-size: 1.15rem; margin-bottom: 1.4rem; }
.site-footer__brand .logo:hover { color: inherit; }
.site-footer p { margin: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer__social { justify-self: start; }

/* ---------- Lightbox ---------- */

.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--paper);
  color: var(--ink);
}
.lightbox::backdrop { background: var(--paper); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox__bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem var(--edge);
}
.lightbox__stage {
  display: flex; align-items: center; justify-content: center;
  min-height: 0; padding: 0 5rem;
}
.lightbox__img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox__nav {
  display: flex; justify-content: center; gap: 1rem; padding: 1rem;
}
.lightbox button {
  font: inherit; color: inherit; background: none; border: 0; cursor: pointer;
  min-width: 44px; min-height: 44px; padding: .5rem .9rem;
}
@media (hover: hover) { .lightbox button:hover { color: var(--muted); } }
.lightbox__count { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Tablet & Mobil ---------- */

/* ---------- Tablet & Handy (nach den Vorlagen im Ordner „Handy“) ---------- */

@media (max-width: 1024px) {
  :root {
    --edge: clamp(16px, 8vw, 64px);
    --col-gap: clamp(16px, 7vw, 40px);
    --tile-gap: clamp(32px, 14vw, 72px);
    --photo-w: calc(100vw - 2 * var(--edge));
    --header-logo: min(46vw, 22rem);   /* Logo in der Kopfzeile, wie in der Vorlage */
    /* Höhe der Kopfzeile (oben + Logo bzw. Menüknopf + unten) */
    --header-pt: clamp(2.5rem, 13vw, 4rem);
    --header-h: calc(var(--header-pt) + max(44px, var(--header-logo) / 5.203) + 1.5rem);
  }

  /* Kopfzeile: Logo links, drei Striche rechts – bleibt beim Scrollen oben */
  .sidebar {
    position: sticky; top: 0; z-index: 50;
    width: auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--header-pt) var(--edge) 1.5rem;
    background: var(--paper);
    transition: padding .3s var(--ease);
  }
  .is-scrolled-header .sidebar { padding-top: 1rem; padding-bottom: 1rem; }

  .logo--mini,
  .page--compact .logo--mini {
    display: inline-block;
    font-size: calc(var(--header-logo) / 5.203);
    margin: 0 0 0 -.07em;
    opacity: 1; transform: none; visibility: visible; pointer-events: auto;
  }
  .logo--big { display: none; }

  /* Drei Striche */
  .menu-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 7px;
    width: 44px; height: 44px; margin-right: -10px; padding: 0 10px;
    background: none; border: 0; cursor: pointer; color: var(--ink);
  }
  .menu-toggle span { display: block; height: 1.2px; background: currentColor; }

  /* Heller Schleier über der Seite */
  .menu-backdrop {
    display: block;
    position: fixed; inset: 0; z-index: 60;
    background: rgba(255, 255, 255, .72);
    opacity: 0;
    transition: opacity .35s var(--ease);
  }
  .menu-backdrop[hidden] { display: none; }
  .menu-backdrop { pointer-events: none; }
  .menu-open .menu-backdrop { opacity: 1; pointer-events: auto; }

  /* Weißes Menüfenster, fährt von rechts herein */
  .nav {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 70;
    width: min(73vw, 26rem);
    padding: 25vh 2rem 2rem clamp(1.75rem, 8vw, 3rem);
    background: var(--paper);
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .4s var(--ease), visibility .4s;
  }
  .menu-open .nav { transform: none; visibility: visible; }
  .nav a, .nav__toggle { font-size: 1.05rem; padding: .3rem 0; }
  .nav li + li { margin-top: .75rem; }
  .nav .nav__sub { margin-top: .75rem; }

  /* Feines X an der Stelle der drei Striche */
  .menu-close {
    display: block;
    position: absolute; top: var(--header-pt); right: calc(var(--edge) - 10px);
    width: 44px; height: 44px;
    margin-top: calc((var(--header-logo) / 5.203 - 44px) / 2);
    background: none; border: 0; cursor: pointer; color: var(--ink);
  }
  .is-scrolled-header .menu-close { top: 1rem; }
  .menu-close::before, .menu-close::after {
    content: ""; position: absolute; left: 10px; right: 10px; top: 50%;
    height: 1.2px; background: currentColor;
  }
  .menu-close::before { transform: rotate(45deg); }
  .menu-close::after { transform: rotate(-45deg); }

  main { margin: 0 var(--edge); padding-top: .5rem; }
  .page--compact main { padding-top: 1rem; }

  .intro { grid-template-columns: 1fr; row-gap: 2rem; }
  .intro__photo { width: 100%; }
  .intro__text { font-size: 1rem; }

  /* Kontakt: Foto + Kontaktdaten auf einen Blick, ohne Scrollen.
     Das Foto füllt die Höhe zwischen Kopfzeile und Box, der Ausschnitt sitzt am Gesicht. */
  .contact {
    display: flex; flex-direction: column; align-items: stretch; gap: 1rem;
    min-height: calc(100svh - var(--header-h) - 1.5rem);
  }
  .contact .intro__photo {
    flex: 1 1 0;
    min-height: 15rem;                       /* Gesicht bleibt immer vollständig sichtbar */
    max-height: calc(var(--photo-w) * 1.15);
    aspect-ratio: auto;
    object-fit: cover;
    object-position: 50% 18%;
  }
  .contact__box { flex: none; padding: 1.5rem; }
  .contact__box h1 { margin-bottom: 1.25em; }
  .contact__box p { margin-bottom: .6rem; }
  .contact__box .social { margin-top: .6rem; }

  /* Projekttext: mehr Luft bis zu den Bildern */
  .project-intro { margin: 0 0 3.5rem; }
  .section-gap { height: 4.5rem; }

  /* Tablet: immer drei Spalten */
  .gallery { display: block; columns: 3; column-gap: var(--col-gap); }
  .gallery__col { display: contents; }
  .projects { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .site-footer {
    grid-template-columns: auto 1fr;
    row-gap: 1.75rem;
    padding: 6rem var(--edge) 2rem;
  }
  .site-footer__links { grid-column: 1 / -1; }
  .site-footer__social { grid-column: 1 / -1; }
  .lightbox__stage { padding: 0 var(--edge); }
}

/* Niedrige Bildschirme (z. B. iPhone SE mit Safari-Leisten): Kontakt kompakter */
@media (max-width: 1024px) and (max-height: 720px) {
  :root { --header-pt: 1.25rem; }
  .contact .intro__photo { min-height: 12.5rem; }
  .contact__box { position: relative; padding: 1.25rem; }
  .contact__box h1 { font-size: 1.3rem; margin-bottom: 1em; }
  .contact__box .social { position: absolute; right: 1rem; bottom: .9rem; margin: 0; }
  .contact__box p:last-of-type { margin-bottom: 0; }
}

/* Handy: zwei Spalten, Text etwas kleiner wie in der Vorlage */
@media (max-width: 640px) {
  .intro__text { font-size: .875rem; }
  .gallery { columns: 2; }
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .tile img { opacity: 1; }
}
