/*
Theme Name: Torben Fotografie
Theme URI: https://tlilje.de
Author: Torben Lilje
Description: Minimalistisches Full-Site-Editing-Theme für ein Fotografieportfolio.
Version: 1.0.24
Requires at least: 6.7
Requires PHP: 8.1
Text Domain: torben-fotografie
*/

:root { --tl-ease: cubic-bezier(.2,.8,.2,1); }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
a { text-underline-offset: .2em; }
.tl-site-header {
  align-items: center !important;
  box-sizing: border-box;
  display: flex;
  min-height: clamp(5.5rem, 7vw, 6.75rem);
  padding-block: 0 !important;
  position: relative;
  z-index: 20;
}
.tl-site-header .wp-block-navigation-item__content { text-decoration: none; }
.tl-site-header .wp-block-navigation-item__content::after {
  background: currentColor; content: ""; display: block; height: 1px; transform: scaleX(0);
  transform-origin: right; transition: transform .3s var(--tl-ease);
}
.tl-site-header .wp-block-navigation-item__content:hover::after { transform: scaleX(1); transform-origin: left; }
.tl-eyebrow { font-size: .75rem; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; }
.tl-hero { min-height: 70vh; display: flex; align-items: flex-end; }
.tl-hero-title { letter-spacing: -.075em; line-height: .82; max-width: 1120px; }
.tl-hero-cover {
  color: #fff;
  min-height: clamp(34rem, 66vw, 58rem);
  overflow: hidden;
  position: relative;
}
.tl-hero-cover .wp-block-cover__image-background {
  filter: blur(var(--tl-hero-blur, 0));
  transform: scale(var(--tl-hero-blur-scale, 1));
}
.tl-hero-cover .wp-block-cover__background {
  background: linear-gradient(90deg, rgba(0,0,0,.58) 0%, rgba(0,0,0,.2) 48%, rgba(0,0,0,.04) 78%) !important;
  opacity: 1 !important;
}
.tl-hero-cover .wp-block-cover__inner-container {
  align-items: flex-start;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.5rem, 5vw, 5rem);
}
.tl-hero-cover .tl-hero-logo {
  height: auto;
  left: var(--tl-hero-logo-x, 52%);
  margin: 0;
  max-width: none;
  position: absolute;
  top: var(--tl-hero-logo-y, 2.5%);
  transform: translateX(-50%);
  width: min(var(--tl-hero-logo-width, 150px), 32vw);
  z-index: 2;
}
.tl-hero-cover .wp-block-cover__inner-container > p:first-child {
  font-size: clamp(.7rem, 1vw, .9rem) !important;
  font-weight: 650;
  letter-spacing: .14em;
  line-height: 1.5;
  margin: 0 0 1.25rem;
  text-transform: uppercase;
}
.tl-hero-cover .wp-block-cover__inner-container > h2 {
  color: #fff;
  font-size: clamp(4.5rem, 12vw, 11rem);
  letter-spacing: -.075em;
  line-height: .82;
  margin: 0;
}
.tl-hero-cover .wp-block-cover__inner-container > h2 + p {
  font-size: clamp(.9rem, 1.4vw, 1.25rem);
  margin: 1.5rem 0 0;
}
.tl-hero-cover .wp-block-cover__inner-container > h2 + p a {
  border-bottom: 1px solid rgba(255,255,255,.72);
  color: #fff;
  display: inline-block;
  font-size: clamp(.8rem, 1vw, .95rem) !important;
  font-weight: 650;
  letter-spacing: .04em;
  margin-top: clamp(1.5rem, 2.5vw, 2.5rem);
  padding-bottom: .2rem;
  text-decoration: none;
  transition: border-color .25s var(--tl-ease), opacity .25s var(--tl-ease);
}
.tl-hero-cover .wp-block-cover__inner-container > h2 + p a:hover {
  border-color: transparent;
  opacity: .68;
}
.tl-filter a { border: 1px solid #cacac6; border-radius: 999px; padding: .55rem .9rem; text-decoration: none; transition: .2s; }
.tl-filter a:hover { background: #111; border-color: #111; color: #fff; }
.tl-portfolio-query .wp-block-post-template { display: grid; gap: clamp(12px, 1.4vw, 24px); grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.tl-project-card { overflow: hidden; position: relative; }
.tl-project-card .wp-block-post-featured-image { aspect-ratio: 4 / 5; margin: 0; overflow: hidden; }
.tl-project-card:nth-child(3n + 2) .wp-block-post-featured-image { aspect-ratio: 4 / 3; }
.tl-project-card:nth-child(3n + 3) .wp-block-post-featured-image { aspect-ratio: 3 / 4; }
.tl-project-card img { height: 100%; object-fit: cover; transition: transform .7s var(--tl-ease), filter .5s; width: 100%; }
.tl-project-card:hover img { filter: saturate(.75); transform: scale(1.035); }
.tl-project-card .wp-block-post-title a { text-decoration: none; }
.tl-project-card .taxonomy-portfolio_category { color: #717171; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
#ueber-mich > .wp-block-column:first-child,
#ueber-mich > .wp-block-columns > .wp-block-column:first-child,
.tl-hero-cover + .wp-block-columns > .wp-block-column:first-child,
body.home .wp-block-columns > .wp-block-column:first-child {
  box-sizing: border-box;
  padding-inline: clamp(1.75rem, 4vw, 4.5rem);
}
body.home .wp-block-columns > .wp-block-column:first-child > .tl-eyebrow {
  margin-bottom: clamp(1.4rem, 2vw, 2.25rem);
}
body.home .wp-block-columns > .wp-block-column:first-child > .wp-block-heading {
  font-size: clamp(3rem, 4.25vw, 5.15rem) !important;
  letter-spacing: -.055em;
  line-height: .95;
  margin-bottom: clamp(2rem, 3vw, 3.5rem);
}
/* Give About the same standalone section-title treatment as Portfolio. */
body.home #ueber-mich {
  align-items: flex-start !important;
  padding-top: clamp(8rem, 10vw, 11rem);
  position: relative;
}
body.home #ueber-mich > .wp-block-column {
  align-self: flex-start !important;
}
body.home #ueber-mich > .wp-block-column:first-child {
  position: static;
}
body.home #ueber-mich > .wp-block-column:first-child > .wp-block-heading:first-child {
  font-size: var(--wp--preset--font-size--large) !important;
  left: clamp(1.75rem, 4vw, 4.5rem);
  letter-spacing: normal;
  line-height: 1.2;
  margin: 0;
  position: absolute;
  right: clamp(1.75rem, 4vw, 4.5rem);
  top: clamp(2.75rem, 4vw, 4rem);
}
body.home #ueber-mich > .wp-block-column:first-child > .wp-block-separator:first-of-type {
  display: none;
}
body.home .wp-block-columns > .wp-block-column:first-child > .wp-block-heading + p {
  font-size: clamp(1.6rem, 2.25vw, 2.85rem) !important;
  letter-spacing: -.035em;
  line-height: 1.16;
  max-width: 22ch;
}
body.home .wp-block-columns > .wp-block-column:first-child > .wp-block-heading + p + p {
  font-size: clamp(1.05rem, 1.2vw, 1.35rem) !important;
  line-height: 1.6;
  margin-top: clamp(1.75rem, 2.5vw, 3rem);
  max-width: 46rem;
}
body.home .wp-block-columns > .wp-block-column:first-child > .wp-block-buttons {
  margin-top: clamp(2rem, 3vw, 3.5rem);
}
body.home .wp-block-columns > .wp-block-column:first-child .wp-block-button__link {
  font-size: .95rem;
  padding: .85rem 1.35rem;
}
body.home .wp-block-gallery {
  box-sizing: border-box;
  column-count: 2;
  column-gap: clamp(1rem, 1.75vw, 2rem);
  display: block !important;
  margin-left: 50% !important;
  max-width: 1120px !important;
  padding-inline: clamp(1.25rem, 3vw, 3rem);
  transform: translateX(-50%);
  width: calc(100vw - clamp(3rem, 10vw, 9rem));
}
body.home .wp-block-gallery > .wp-block-image {
  break-inside: avoid;
  cursor: zoom-in;
  display: block;
  height: auto;
  margin: 0 0 clamp(.75rem, 1.25vw, 1.5rem) !important;
  overflow: hidden;
  width: 100% !important;
}
body.home .wp-block-gallery > .wp-block-image img {
  aspect-ratio: auto !important;
  height: auto !important;
  object-fit: contain !important;
  transition: filter .45s var(--tl-ease), transform .7s var(--tl-ease);
  width: 100% !important;
}
body.home .wp-block-gallery > .wp-block-image:hover img {
  filter: contrast(1.025) saturate(.9);
  transform: scale(1.025);
}
body.home #portfolio > .wp-block-heading:not(:first-child) {
  font-size: clamp(2.7rem, 4.2vw, 5.25rem) !important;
  letter-spacing: -.055em;
  line-height: .95;
  margin: clamp(2.5rem, 4vw, 4.75rem) 0 1.75rem;
  max-width: 15ch;
}
body.home #portfolio > .wp-block-heading:not(:first-child) + p {
  font-size: clamp(1.1rem, 1.55vw, 1.45rem) !important;
  line-height: 1.55;
  margin: 0;
  max-width: 48rem;
}
body.home #portfolio > .wp-block-heading:not(:first-child) + p + p {
  color: #6f6f6a;
  font-size: .75rem !important;
  font-weight: 650;
  letter-spacing: .14em;
  line-height: 1.6;
  margin: 2.25rem 0 clamp(2.5rem, 4vw, 4.5rem);
  text-transform: uppercase;
}
body.home #portfolio { padding-bottom: clamp(3rem, 4vw, 5rem) !important; }
body.home #portfolio + .wp-block-group:empty { display: none; }
.tl-lightbox {
  align-items: center;
  background: rgba(8, 8, 8, .94);
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: clamp(1rem, 3vw, 3rem);
  position: fixed;
  transition: opacity .22s var(--tl-ease), visibility .22s;
  visibility: hidden;
  z-index: 99999;
}
.tl-lightbox.is-open { opacity: 1; visibility: visible; }
.tl-lightbox__image { box-shadow: 0 1.5rem 5rem rgba(0,0,0,.35); max-height: calc(100svh - 4rem); max-width: min(92vw, 1500px); object-fit: contain; }
.tl-lightbox__button {
  align-items: center;
  appearance: none;
  background: rgba(255,255,255,.1);
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: grid;
  font: inherit;
  height: 3rem;
  justify-content: center;
  line-height: 1;
  position: absolute;
  transition: background .2s var(--tl-ease), transform .2s var(--tl-ease);
  width: 3rem;
}
.tl-lightbox__button:hover, .tl-lightbox__button:focus-visible { background: rgba(255,255,255,.22); transform: scale(1.05); }
.tl-lightbox__close { right: clamp(1rem, 2vw, 2.25rem); top: clamp(1rem, 2vw, 2.25rem); }
.tl-lightbox__previous { left: clamp(.5rem, 2vw, 2.25rem); top: 50%; transform: translateY(-50%); }
.tl-lightbox__next { right: clamp(.5rem, 2vw, 2.25rem); top: 50%; transform: translateY(-50%); }
.tl-lightbox__previous:hover, .tl-lightbox__previous:focus-visible, .tl-lightbox__next:hover, .tl-lightbox__next:focus-visible { transform: translateY(-50%) scale(1.05); }
body.tl-lightbox-open { overflow: hidden; }
.tl-about-image img { filter: grayscale(1); height: 100%; object-fit: cover; transition: filter .55s var(--tl-ease); width: 100%; }
.tl-about-image:hover img { filter: grayscale(.15); }
.tl-service-row { border-top: 1px solid #cececa; transition: padding-left .25s var(--tl-ease); }
.tl-service-row:last-child { border-bottom: 1px solid #cececa; }
.tl-service-row:hover { padding-left: 1rem !important; }
.tl-contact a, .tl-site-footer a { color: inherit; }

/* Ablauf und Kontakt: kompakte Dramaturgie mit klarer Abschlussgeste. */
body.home #kontakt {
  min-height: 0 !important;
  padding-block: clamp(4rem, 5vw, 6rem) !important;
}
body.home #kontakt > .wp-block-group:first-child {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(2rem, 4vw, 5rem);
  row-gap: 1.25rem;
  margin-inline: auto;
  max-width: 1320px;
  width: 100%;
}
body.home #kontakt > .wp-block-group:first-child > .wp-block-heading {
  font-size: clamp(3rem, 4.2vw, 5rem) !important;
  grid-column: 1 / -1;
  margin: 0;
}
body.home #kontakt > .wp-block-group:first-child > p:nth-of-type(1) {
  color: #a9a9a5;
  font-size: clamp(1.1rem, 1.45vw, 1.4rem) !important;
  grid-column: 1 / -1;
  margin: 0 0 1rem;
}
body.home #kontakt > .wp-block-group:first-child > .wp-block-separator {
  grid-column: 1 / -1;
  margin: .5rem 0 clamp(1.5rem, 3vw, 3rem);
  width: 100%;
}
body.home #kontakt > .wp-block-group:first-child > p:nth-of-type(2) { grid-column: 1; grid-row: 4; }
body.home #kontakt > .wp-block-group:first-child > p:nth-of-type(3) { grid-column: 1; grid-row: 5; }
body.home #kontakt > .wp-block-group:first-child > p:nth-of-type(4) { grid-column: 2; grid-row: 4; }
body.home #kontakt > .wp-block-group:first-child > p:nth-of-type(5) { grid-column: 2; grid-row: 5; }
body.home #kontakt > .wp-block-group:first-child > p:nth-of-type(7) { grid-column: 3; grid-row: 4; }
body.home #kontakt > .wp-block-group:first-child > p:nth-of-type(8) { grid-column: 3; grid-row: 5; }
body.home #kontakt > .wp-block-group:first-child > p:nth-of-type(2),
body.home #kontakt > .wp-block-group:first-child > p:nth-of-type(4),
body.home #kontakt > .wp-block-group:first-child > p:nth-of-type(7) {
  color: #aaa;
  font-size: .78rem !important;
  font-style: normal !important;
  font-weight: 700;
  letter-spacing: .12em;
  margin: 0;
  text-transform: uppercase;
}
body.home #kontakt > .wp-block-group:first-child > p:nth-of-type(3),
body.home #kontakt > .wp-block-group:first-child > p:nth-of-type(5),
body.home #kontakt > .wp-block-group:first-child > p:nth-of-type(8) {
  font-size: clamp(1.1rem, 1.35vw, 1.35rem) !important;
  line-height: 1.55;
  margin: 0;
  max-width: 32ch;
}
body.home #kontakt > .wp-block-group:first-child > p:nth-of-type(6) {
  border-left: 2px solid #fff;
  color: #d0d0cc;
  font-size: clamp(1rem, 1.2vw, 1.2rem) !important;
  grid-column: 1 / -1;
  grid-row: 6;
  line-height: 1.55;
  margin: clamp(1.75rem, 3vw, 3rem) 0 0;
  max-width: 70ch;
  padding: .25rem 0 .25rem 1.25rem;
}
body.home #kontakt > .wp-block-group:last-child {
  align-items: flex-start;
  border-top: 1px solid #4d4d4a;
  display: flex;
  flex-direction: column;
  margin: clamp(5rem, 9vw, 10rem) auto 0;
  max-width: 1320px;
  padding-top: clamp(4rem, 7vw, 8rem);
  width: 100%;
}
body.home #kontakt > .wp-block-group:last-child > .wp-block-heading {
  font-size: clamp(5rem, 11vw, 11rem) !important;
  margin: 0;
  order: 1;
}
body.home #kontakt > .wp-block-group:last-child > .wp-block-group {
  margin-top: clamp(2rem, 4vw, 4rem);
  order: 2;
}
body.home #kontakt > .wp-block-group:last-child > .wp-block-group p {
  margin: 0;
}
body.home #kontakt > .wp-block-group:last-child > .wp-block-group a {
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  overflow-wrap: anywhere;
  text-underline-offset: .25em;
}
.tl-single-cover img { max-height: 82vh; object-fit: cover; width: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tl-project-card img, .tl-about-image img, .tl-service-row,
  body.home .wp-block-gallery > .wp-block-image img { transition: none; }
}
@media (min-width: 1600px) {
  body.home .wp-block-gallery {
    column-count: 3;
    max-width: 1800px !important;
    width: calc(100vw - clamp(4rem, 8vw, 10rem));
  }
}
@media (min-width: 782px) and (max-width: 1100px) {
  body.home .wp-block-gallery { column-count: 2; }
}
@media (max-width: 781px) {
  #portfolio, #ueber-mich, #kontakt { scroll-margin-top: 1rem; }
  .tl-site-header {
    min-height: 4.75rem;
    padding-inline: 1rem !important;
  }
  .tl-site-header .wp-block-site-title {
    font-size: clamp(.8rem, 4.2vw, 1rem) !important;
    letter-spacing: .015em;
    line-height: 1.15;
    max-width: calc(100% - 4rem);
  }
  .tl-site-header .wp-block-navigation__responsive-container-open {
    align-items: center;
    display: flex;
    height: 2.75rem;
    justify-content: center;
    width: 2.75rem;
  }
  .tl-hero { min-height: 62vh; }
  .tl-hero-title { font-size: clamp(4.5rem, 22vw, 8rem) !important; }
  .tl-hero-cover { min-height: calc(100svh - 4.75rem); }
  .tl-hero-cover .wp-block-cover__background {
    background: linear-gradient(0deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.18) 55%, rgba(0,0,0,.03) 80%) !important;
  }
  .tl-hero-cover .wp-block-cover__inner-container {
    padding: 1.25rem 1.25rem max(1.75rem, env(safe-area-inset-bottom));
  }
  .tl-hero-cover .tl-hero-logo {
    width: min(var(--tl-hero-logo-width, 150px), 34vw);
  }
  .tl-hero-cover .wp-block-cover__inner-container > p:first-child {
    font-size: .68rem;
    margin-bottom: 1rem;
  }
  .tl-hero-cover .wp-block-cover__inner-container > h2 { font-size: clamp(4rem, 23vw, 5.75rem); }
  .tl-hero-cover .wp-block-cover__inner-container > h2 + p {
    line-height: 1.45;
    margin-top: 1.15rem;
  }
  .tl-hero-cover .wp-block-cover__inner-container > h2 + p a {
    margin-top: 1.25rem;
    padding-block: .25rem .35rem;
  }
  .tl-portfolio-query .wp-block-post-template { grid-template-columns: 1fr !important; }
  .tl-project-card .wp-block-post-featured-image { aspect-ratio: 4 / 5 !important; }
  #ueber-mich > .wp-block-column:first-child,
  #ueber-mich > .wp-block-columns > .wp-block-column:first-child,
  .tl-hero-cover + .wp-block-columns > .wp-block-column:first-child,
  body.home .wp-block-columns > .wp-block-column:first-child { padding-inline: 1.25rem; }
  body.home #ueber-mich {
    padding-top: 6.75rem;
  }
  body.home #ueber-mich > .wp-block-column:first-child > .wp-block-heading:first-child {
    left: 1.25rem;
    right: 1.25rem;
    top: 2.5rem;
  }
  body.home #ueber-mich.wp-block-columns {
    gap: 2.75rem;
  }
  body.home .wp-block-columns > .wp-block-column:first-child > .wp-block-heading {
    font-size: clamp(2.8rem, 13vw, 4.5rem) !important;
    margin-bottom: 1.75rem;
  }
  body.home .wp-block-columns > .wp-block-column:first-child > .wp-block-heading + p {
    font-size: clamp(1.45rem, 7vw, 2.2rem) !important;
  }
  body.home .wp-block-columns > .wp-block-column:first-child > .wp-block-heading + p + p {
    font-size: 1.05rem !important;
    line-height: 1.55;
    margin-top: 1.5rem;
  }
  body.home .wp-block-columns > .wp-block-column:first-child > .wp-block-buttons {
    margin-top: 1.75rem;
  }
  body.home .tl-about-image img {
    max-height: 78svh;
    object-position: center 28%;
  }
  body.home #portfolio {
    padding-bottom: 3.5rem !important;
    padding-top: 4.5rem !important;
  }
  body.home #portfolio > .wp-block-heading:not(:first-child) {
    font-size: clamp(2.65rem, 12vw, 4rem) !important;
    margin: 2rem 0 1.25rem;
  }
  body.home #portfolio > .wp-block-heading:not(:first-child) + p {
    font-size: 1.05rem !important;
    line-height: 1.5;
  }
  body.home #portfolio > .wp-block-heading:not(:first-child) + p + p {
    margin: 1.75rem 0 2.5rem;
  }
  body.home .wp-block-gallery {
    column-count: 1;
    column-gap: 0;
    margin-left: 0 !important;
    max-width: none !important;
    padding-inline: 1.25rem;
    transform: none;
    width: auto;
  }
  body.home .wp-block-gallery > .wp-block-image { margin-bottom: .85rem !important; }
  body.home .wp-block-gallery > .wp-block-image img { height: auto !important; }
  body.home #kontakt {
    padding-block: 4rem !important;
  }
  body.home #kontakt > .wp-block-group:first-child {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  body.home #kontakt > .wp-block-group:first-child > .wp-block-separator {
    margin: 1.75rem 0 2.5rem;
  }
  body.home #kontakt > .wp-block-group:first-child > p:nth-of-type(2),
  body.home #kontakt > .wp-block-group:first-child > p:nth-of-type(4),
  body.home #kontakt > .wp-block-group:first-child > p:nth-of-type(7) {
    margin-top: 2.25rem;
  }
  body.home #kontakt > .wp-block-group:first-child > p:nth-of-type(3),
  body.home #kontakt > .wp-block-group:first-child > p:nth-of-type(5),
  body.home #kontakt > .wp-block-group:first-child > p:nth-of-type(8) {
    margin-top: .65rem;
    max-width: none;
  }
  body.home #kontakt > .wp-block-group:first-child > p:nth-of-type(6) {
    margin-top: 2.5rem;
    order: 9;
  }
  body.home #kontakt > .wp-block-group:last-child {
    margin-top: 4.5rem;
    padding-top: 3.5rem;
  }
  body.home #kontakt > .wp-block-group:last-child > .wp-block-heading {
    font-size: clamp(4rem, 20vw, 6.5rem) !important;
  }
  body.home #kontakt > .wp-block-group:last-child > .wp-block-group a {
    font-size: clamp(1.15rem, 5.6vw, 1.6rem);
  }
  .tl-lightbox { padding: 1rem .5rem; }
  .tl-lightbox__image { max-height: calc(100svh - 5rem); max-width: calc(100vw - 1rem); }
  .tl-lightbox__button { height: 2.75rem; width: 2.75rem; }
  .tl-lightbox__previous { left: .5rem; }
  .tl-lightbox__next { right: .5rem; }
  .tl-service-price { display: none; }
}
@media (hover: none) {
  .tl-project-card:hover img,
  body.home .wp-block-gallery > .wp-block-image:hover img {
    filter: none;
    transform: none;
  }
}
