/* Outfit is linked directly from <head> (fonts/outfit.css), not @import'd
   here — @import would block font discovery behind this file's own fetch. */

:root {
  --bg: #F5F6F7;
  --accent: #7186A0;
  --text: #000000;
  --muted: #666666;
  --placeholder: #D9D9D9;
  --border: #000000;
  --max-width: 90vw;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-weight: 300;
  line-height: 1.3;
  padding-top: var(--header-height, 88px);
}

body.nav-open {
  overflow: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 52px;
}

/* Header */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 900;
  background-color: var(--bg);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 52px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 300;
  color: var(--text);
}

.logo-mark {
  width: 15px;
  height: 15px;
  background: var(--accent);
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.main-nav a {
  font-size: 20px;
  font-weight: 300;
  color: var(--accent);
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  width: 30px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--text);
  transition: transform 0.35s ease, background 0.2s ease;
  transform-origin: center;
}

.nav-toggle.active span {
  background: var(--bg);
}

.nav-toggle.active span:first-child {
  transform: translateY(5.5px) rotate(45deg);
}

.nav-toggle.active span:last-child {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 47px;
  padding: 0 24px;
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn-primary::after,
.reference-body .btn::after {
  content: "→";
  transition: transform 0.2s ease;
}

.btn-primary:hover::after,
.reference-body .btn:hover::after {
  transform: translateX(4px);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border: 2px solid var(--accent);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn:hover {
  opacity: 0.85;
}

.btn-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

/* Hero / split sections */

.split {
  display: flex;
  align-items: center;
  gap: 70px;
  padding: 80px 52px;
  max-width: var(--max-width);
  margin: 0 auto;
  /* Fill exactly the viewport below the fixed header so the flex-centered
     content above sits centered in the visible fold, not the full document. */
  min-height: calc(100vh - var(--header-height, 88px));
}

.split.reverse {
  flex-direction: row-reverse;
  align-items: flex-start;
}

.split-text {
  flex: 1;
  min-width: 280px;
}

.split-media {
  flex: 1;
  min-width: 280px;
  display: flex;
  justify-content: center;
}

.placeholder-box {
  display: block;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 3 / 4;
  max-height: 80vh;
  background: var(--placeholder);
  object-fit: cover;
}

h1 {
  font-size: 45px;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 24px;
}

h2.page-title {
  font-size: 45px;
  font-weight: 400;
  line-height: 1.1;
  margin: 60px 0 24px;
}

.lead {
  font-size: 20px;
  font-weight: 300;
  line-height: 1.3;
  color: var(--text);
  max-width: 599px;
}

.lead a {
  color: var(--accent);
  text-decoration: underline;
}

.split-text p + p {
  margin-top: 20px;
}

.split-text .lead {
  margin-bottom: 32px;
}

/* Page intro (Referenzen, Kontakt, Impressum, Datenschutz) */

.page-intro {
  padding: 60px 52px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-intro .lead {
  margin-top: 20px;
}

/* Referenzen list */

.reference-list {
  padding: 20px 52px 80px;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.reference-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}

.reference-gallery {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 0;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--muted) transparent;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.gallery-item {
  flex: 0 0 auto;
  width: 260px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  scroll-snap-align: start;
}

.reference-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--placeholder);
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.reference-gallery::-webkit-scrollbar {
  height: 6px;
}

.reference-gallery::-webkit-scrollbar-track {
  background: transparent;
}

.reference-gallery::-webkit-scrollbar-thumb {
  background: var(--muted);
  border-radius: 0;
}

.reference-body {
  padding: 32px;
}

.reference-card h3 {
  max-width: 65%;
  font-size: 30px;
  font-weight: 400;
  margin-bottom: 16px;
}

.tag-list {
  max-width: 65%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin-top: 8px;
  margin-bottom: 24px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  font-size: 16px;
  font-weight: 500;
  background-color: var(--accent);
  color: var(--bg);
}

.reference-text {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  max-width: 640px;
  margin-bottom: 24px;
}

/* Contact form */

.contact-section {
  padding: 20px 52px 100px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.contact-form {
  max-width: 428px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-note {
  max-width: 428px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.5;
}

.form-note a {
  color: var(--muted);
  text-decoration: underline;
}

.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;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: transparent;
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 300;
  color: var(--text);
  padding: 0 16px;
  height: 46px;
}

.form-field textarea {
  height: 126px;
  padding: 14px 16px;
  resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--muted);
  font-weight: 300;
  font-family: 'Outfit', sans-serif;
}

.contact-form .btn {
  align-self: flex-start;
  border: none;
  margin-top: 10px;
}

/* Legal pages (Impressum, Datenschutz) */

.legal-content {
  padding: 20px 52px 100px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.legal-content h2 {
  font-size: 24px;
  font-weight: 400;
  margin: 40px 0 12px;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p,
.legal-content li {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  max-width: 720px;
}

.legal-content p + p {
  margin-top: 12px;
}

.legal-content ul {
  margin-top: 8px;
  padding-left: 20px;
}

.legal-content a {
  color: var(--accent);
  text-decoration: underline;
}

/* Lightbox */

body.lightbox-open {
  overflow: hidden;
}

.gallery-item {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

.lightbox-close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 1px;
  background: #fff;
  transform-origin: center;
  transition: opacity 0.2s ease;
}

.lightbox-close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.lightbox-close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.lightbox-close:hover span {
  opacity: 0.7;
}

/* Footer */

.site-footer {
  padding: 40px 52px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.site-footer .footer-links {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.site-footer .footer-links a {
  color: var(--muted);
  text-decoration: underline;
}

.site-footer .footer-links a:hover {
  color: var(--text);
}

/* Responsive */

@media (max-width: 900px) {
  .split {
    flex-direction: column;
    padding: 50px 24px;
    gap: 40px;
    min-height: 0;
  }

  .split.reverse {
    flex-direction: column;
    align-items: center;
  }

  .split-media {
    order: -1;
  }
}

@media (max-width: 768px) {
  :root {
    --max-width: 95vw;
  }

  .header-inner {
    padding: 24px;
    max-width: var(--max-width);
  }

  .lightbox {
    padding: 24px;
  }

  .lightbox-close {
    top: 16px;
    right: 16px;
  }

  .main-nav {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0;
    background: var(--accent);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    padding: 24px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
  }

  .main-nav a {
    font-size: 32px;
    font-weight: 400;
    color: var(--bg);
  }

  .main-nav a:hover,
  .main-nav a[aria-current="page"] {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 6px;
  }

  .nav-toggle {
    display: flex;
  }

  h1,
  h2.page-title {
    font-size: 34px;
  }

  .page-intro,
  .reference-list,
  .contact-section,
  .legal-content {
    padding-left: 24px;
    padding-right: 24px;
  }

  .reference-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .reference-body {
    padding: 20px;
  }

  .reference-card h3,
  .tag-list {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .btn-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
