/*
Theme Name: Clemens Lechner – Gutenberg
Theme URI: https://example.com
Author: Clemens Lechner
Author URI: https://example.com
Description: Helles, minimalistisches Gutenberg-Theme für die Portfolio-Seite von Clemens Lechner.
Version: 4.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: clemens-lechner-gutenberg
*/

:root {
  --cl-bg: #ffffff;
  --cl-text: #393932;
  --cl-muted: #7a786f;
  --cl-soft: #d0cdc2;
  --cl-border: #acaaa3;
  --cl-highlight: #94f7f8;
  --cl-shadow: 0 30px 70px rgba(0, 0, 0, 0.08);
  --cl-radius: 0;
  --cl-max-width: 1180px;
  --cl-photo-bg: #f6f4ef;
  --cl-photo-frame: #ffffff;
  --cl-dark-bg: #23221f;
  --cl-dark-text: #f6f5ef;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  background: var(--cl-bg);
  color: var(--cl-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease;
}

a:hover {
  color: var(--cl-muted);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Raleway', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  line-height: 1.2;
  color: var(--cl-text);
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(2.5rem, 4vw, 3.75rem);
}

h2 {
  font-size: clamp(2rem, 3vw, 3rem);
}

h3 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 500;
}

h4 {
  font-size: 1.3rem;
}

p,
li {
  font-size: 1.125rem;
  line-height: 1.8;
  margin: 0 0 1.5rem;
}

ul,
ol {
  padding-left: 1.2rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 200;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1.25rem;
  background: var(--cl-text);
  color: #fff;
}

.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--cl-bg);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid rgba(57, 57, 50, 0.1);
}

.nav-inner {
  max-width: var(--cl-max-width);
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand span {
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
}

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.main-nav a {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.6rem 0.85rem 0.4rem;
  border-bottom: 2px solid transparent;
  color: var(--cl-muted);
  transition: color 140ms ease, border 140ms ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--cl-text);
  border-color: var(--cl-text);
}

.header-cta {
  margin-left: auto;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  margin-left: auto;
  border: 1px solid var(--cl-text);
  border-radius: 999px;
  background: transparent;
  color: var(--cl-text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-direction: column;
  gap: 6px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: currentColor;
  border-radius: 3px;
  transition: transform 200ms ease, opacity 200ms ease;
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.button-link,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  border-radius: 0;
  border: 1px solid var(--cl-text);
  background: var(--cl-text);
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease, border 180ms ease;
}

.button-link:hover,
.wp-block-button__link:hover {
  background: #000;
  border-color: #000;
  color: #fff;
}

.wp-block-buttons .wp-block-button__link {
  width: auto;
}

.site-main {
  flex: 1;
  width: 100%;
}

.cl-entry {
  margin: 0;
}

.entry-header {
  text-align: center;
  padding: 4rem 1.5rem 0;
}

.entry-title {
  margin-bottom: 1rem;
}

.entry-content {
  max-width: var(--cl-max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content > .alignwide {
  max-width: min(95vw, var(--cl-max-width));
  margin-left: auto;
  margin-right: auto;
}

.entry-content > .alignfull {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.entry-content figure {
  margin: 0 0 1.8rem;
}

.entry-content .wp-block-image img {
  border-radius: 0;
}

.entry-content .wp-block-columns {
  gap: clamp(1.25rem, 3vw, 3rem);
  margin-bottom: 2.5rem;
}

.entry-content .wp-block-column > *:first-child {
  margin-top: 0;
}

.entry-content .wp-block-gallery {
  gap: 1rem;
}

.cl-section {
  margin-bottom: clamp(3rem, 6vw, 6rem);
}

.cl-hero {
  background: var(--cl-soft);
  padding: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 6vw, 6rem);
  overflow: hidden;
}

.cl-hero-columns {
  align-items: stretch;
  flex-direction: row-reverse;
  gap: clamp(2rem, 6vw, 5rem) !important;
}

.cl-hero-columns > .wp-block-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cl-hero-columns > .wp-block-column:first-child {
  justify-content: center;
}

.cl-hero-columns > .wp-block-column:last-child {
  align-self: stretch;
}

.cl-hero p {
  max-width: 520px;
}

.cl-hero-image {
  width: 100%;
  height: 100%;
  display: flex;
  flex: 1;
}

.cl-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}

.cl-card {
  background: #fff;
  border-radius: var(--cl-radius);
  padding: 2.25rem;
  border: 1px solid rgba(57, 57, 50, 0.12);
  box-shadow: none;
  text-align: center;
  height: 100%;
}

.cl-card p {
  color: var(--cl-muted);
  margin: 0;
}

.cl-services .wp-block-columns {
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cl-service-grid .wp-block-column {
  display: flex;
}

.cl-service-card {
  background: transparent;
  border-radius: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0.75rem;
}

.cl-service-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0;
}

.cl-service-card h3 {
  margin-top: 0.5rem;
  font-weight: 500;
  text-align: left;
}

.cl-service-card p {
  margin-top: 0.35rem;
  color: var(--cl-muted);
  text-align: left;
}

.cl-photo-grid {
  background: var(--cl-photo-bg);
  --cl-photo-frame: #ffffff;
  padding: clamp(3rem, 7vw, 5rem) clamp(1.25rem, 6vw, 4rem);
  color: var(--cl-text);
}

.cl-photo-grid.is-dark {
  background: var(--cl-dark-bg);
  color: var(--cl-dark-text);
}

.cl-photo-grid > .wp-block-group__inner-container {
  max-width: var(--cl-max-width);
  margin: 0 auto;
}

.cl-photo-grid__intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(1.5rem, 4vw, 2.75rem);
}

.cl-photo-grid__intro p {
  color: var(--cl-muted);
}

.cl-photo-grid.is-dark .cl-photo-grid__intro p {
  color: rgba(246, 245, 239, 0.7);
}

.cl-photo-grid__grid > .wp-block-group__inner-container,
.cl-photo-grid__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: clamp(1rem, 3vw, 2.5rem);
}

.cl-photo-grid__cell {
  margin: 0;
  background: var(--cl-photo-frame);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.35rem, 1vw, 0.85rem);
  aspect-ratio: 3 / 2;
  border-radius: 0;
}

.cl-photo-grid__cell.is-portrait {
  aspect-ratio: 2 / 3;
}

.cl-photo-grid__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.cl-photo-grid.is-dark {
  --cl-photo-frame: #2f2d29;
}

.wp-block-gallery.is-style-cl-hqqh,
.wp-block-gallery.is-style-cl-hqqh-dark,
.wp-block-gallery.is-style-cl-qhhq,
.wp-block-gallery.is-style-cl-qhhq-dark {
  --cl-photo-frame: #ffffff;
  width: 100%;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 5vw, 3rem);
  background: var(--cl-photo-bg);
  color: var(--cl-text);
  margin: 0 auto clamp(3rem, 6vw, 6rem);
  max-width: min(95vw, var(--cl-max-width));
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: clamp(1rem, 3vw, 2.5rem);
}

.wp-block-gallery.is-style-cl-hqqh-dark,
.wp-block-gallery.is-style-cl-qhhq-dark {
  background: var(--cl-dark-bg);
  color: var(--cl-dark-text);
  --cl-photo-frame: #2f2d29;
}

.wp-block-gallery.is-style-cl-hqqh > figcaption,
.wp-block-gallery.is-style-cl-hqqh-dark > figcaption,
.wp-block-gallery.is-style-cl-qhhq > figcaption,
.wp-block-gallery.is-style-cl-qhhq-dark > figcaption {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
  color: inherit;
}

.wp-block-gallery[class*="is-style-cl-"] .blocks-gallery-grid,
.wp-block-gallery[class*="is-style-cl-"] .wp-block-gallery__wrapper {
  display: contents;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wp-block-gallery[class*="is-style-cl-"] .blocks-gallery-grid .blocks-gallery-item,
.wp-block-gallery[class*="is-style-cl-"] > figure.wp-block-image,
.wp-block-gallery[class*="is-style-cl-"] .wp-block-gallery__wrapper > figure {
  margin: 0;
  background: var(--cl-photo-frame);
  padding: clamp(0.35rem, 1vw, 0.85rem);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
}

.wp-block-gallery[class*="is-style-cl-"] .blocks-gallery-item figure,
.wp-block-gallery[class*="is-style-cl-"] > figure.wp-block-image figure {
  width: 100%;
  height: 100%;
}

.wp-block-gallery[class*="is-style-cl-"] img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wp-block-gallery[class*="is-style-cl-"] .blocks-gallery-item figcaption,
.wp-block-gallery[class*="is-style-cl-"] > figure.wp-block-image figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1.3;
  text-align: center;
}

.wp-block-gallery.is-style-cl-hqqh .blocks-gallery-item:nth-child(1),
.wp-block-gallery.is-style-cl-hqqh .wp-block-image:nth-child(1),
.wp-block-gallery.is-style-cl-hqqh-dark .blocks-gallery-item:nth-child(1),
.wp-block-gallery.is-style-cl-hqqh-dark .wp-block-image:nth-child(1),
.wp-block-gallery.is-style-cl-hqqh .blocks-gallery-item:nth-child(4),
.wp-block-gallery.is-style-cl-hqqh .wp-block-image:nth-child(4),
.wp-block-gallery.is-style-cl-hqqh-dark .blocks-gallery-item:nth-child(4),
.wp-block-gallery.is-style-cl-hqqh-dark .wp-block-image:nth-child(4) {
  aspect-ratio: 2 / 3;
}

.wp-block-gallery.is-style-cl-qhhq .blocks-gallery-item:nth-child(2),
.wp-block-gallery.is-style-cl-qhhq .blocks-gallery-item:nth-child(3),
.wp-block-gallery.is-style-cl-qhhq .wp-block-image:nth-child(2),
.wp-block-gallery.is-style-cl-qhhq .wp-block-image:nth-child(3),
.wp-block-gallery.is-style-cl-qhhq-dark .blocks-gallery-item:nth-child(2),
.wp-block-gallery.is-style-cl-qhhq-dark .blocks-gallery-item:nth-child(3),
.wp-block-gallery.is-style-cl-qhhq-dark .wp-block-image:nth-child(2),
.wp-block-gallery.is-style-cl-qhhq-dark .wp-block-image:nth-child(3) {
  aspect-ratio: 2 / 3;
}

.wp-block-cover.cl-banner {
  min-height: 420px;
  padding: clamp(2.5rem, 7vw, 4.5rem);
  align-items: center;
  text-align: center;
}

.wp-block-cover.cl-banner .wp-block-cover__inner-container {
  max-width: 760px;
}

.wp-block-cover.cl-banner h3 {
  font-weight: 500;
}

.wp-block-cover.cl-banner p {
  color: var(--cl-text);
}

.site-footer {
  background: #fff;
  border-top: 1px solid rgba(57, 57, 50, 0.12);
  color: var(--cl-muted);
  padding: 1.5rem clamp(1.5rem, 4vw, 3rem);
  font-size: 0.85rem;
}

.footer-inner {
  max-width: var(--cl-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}

.footer-links a {
  color: inherit;
}

.wp-block-quote {
  border-left: 4px solid var(--cl-text);
  padding-left: 1.5rem;
  margin: 0 0 2rem;
  color: var(--cl-muted);
}

.wp-block-separator {
  border: none;
  height: 1px;
  background: rgba(57, 57, 50, 0.15);
  margin: 3rem auto;
  max-width: 300px;
}

@media (max-width: 960px) {
  .nav-inner {
    flex-wrap: wrap;
    justify-content: flex-start;
    row-gap: 1rem;
  }
  .cl-hero-columns {
    flex-direction: column;
  }

  .has-nav-toggle .nav-toggle {
    display: flex;
  }

  .has-nav-toggle .main-nav {
    order: 3;
    width: 100%;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid rgba(57, 57, 50, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 220ms ease;
  }

  .has-nav-toggle .main-nav.is-open {
    max-height: 480px;
  }

  .main-nav a {
    width: 100%;
    border-bottom: 1px solid rgba(57, 57, 50, 0.12);
    padding: 0.9rem 0;
  }

  .has-nav-toggle .header-cta {
    order: 4;
    width: 100%;
    text-align: left;
    max-height: 0;
    overflow: hidden;
    transition: max-height 220ms ease;
  }

  .has-nav-toggle .header-cta.is-open {
    max-height: 160px;
  }

  .has-nav-toggle .header-cta .button-link {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .nav-inner {
    padding: 1rem 1.25rem;
  }

  .entry-content {
    padding: 3rem 1.25rem 4rem;
  }

  .cl-photo-grid__grid,
  .cl-photo-grid__grid > .wp-block-group__inner-container,
  .wp-block-gallery.is-style-cl-hqqh,
  .wp-block-gallery.is-style-cl-hqqh-dark,
  .wp-block-gallery.is-style-cl-qhhq,
  .wp-block-gallery.is-style-cl-qhhq-dark {
    grid-template-columns: 1fr;
  }
}
