/* ============================================================
   MUSTERHAUS GMBH — Global Stylesheet
   Edit this file to change the look of the entire site.
   ============================================================ */

/* --- CUSTOM FONT (upload your font file to /css/fonts/ and uncomment below) ---
@font-face {
  font-family: 'YourFont';
  src: url('../css/fonts/yourfont.woff2') format('woff2'),
       url('../css/fonts/yourfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}
*/

/* --- COLOUR PALETTE --- */
:root {
  --color-bg:           #FAFAF7;       /* page background */
  --color-text:         #1a1a18;       /* main body text */
  --color-text-light:   #5a5a54;       /* secondary text */
  --color-accent:       #2D5016;       /* dark green (matches footer) */
  --color-accent-mid:   #3D6B20;       /* mid green for hover states */
  --color-rule:         #d8d8d2;       /* horizontal rules, borders */
  --color-footer-bg:    #1E3A0F;       /* footer background — dark green */
  --color-footer-text:  #FFFFFF;       /* footer text */
  --color-hero-overlay: rgba(0,0,0,0.38); /* darkens hero bg image */
}

/* --- TYPOGRAPHY --- */
:root {
  --font-heading: 'Poppins', , sans-serif;  /* swap to your font */
  --font-body:    'Poppins', Helvetica, Arial, sans-serif;   /* swap to your font */
  --font-size-base: 17px;
  --line-height:    1.7;
}

/* --- SPACING & LAYOUT --- */
:root {
  --max-width:    1100px;
  --gutter:       clamp(1.2rem, 4vw, 2.5rem);
  --header-h:     72px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  background: var(--color-bg);
  color: var(--color-text);
}

body {
  font-family: var(--font-body);
  line-height: var(--line-height);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

/* ============================================================
   GOOGLE FONTS —  uploaded font
   ============================================================ */
@font-face {
  font-family: 'Poppins';
  src: url('fonts/poppins-v24-latin-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('fonts/poppins-v24-latin-300italic.woff2') format('woff2');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('fonts/poppins-v24-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('fonts/poppins-v24-latin-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('fonts/poppins-v24-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('fonts/poppins-v24-latin-500italic.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('fonts/poppins-v24-latin-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('fonts/poppins-v24-latin-600italic.woff2') format('woff2');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
/* poppins-100 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 100;
  src: url('fonts/poppins-v24-latin-100.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* poppins-100italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Poppins';
  font-style: italic;
  font-weight: 100;
  src: url('fonts/poppins-v24-latin-100italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* poppins-200 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 200;
  src: url('fonts/poppins-v24-latin-200.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* poppins-200italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Poppins';
  font-style: italic;
  font-weight: 200;
  src: url('fonts/poppins-v24-latin-200italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-rule);
  height: var(--header-h);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Logo area */
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  text-decoration: none;
}

.site-logo img {
  height: 42px;
  width: auto;
}

/* If using text logo instead of image, uncomment this and remove/comment the img tag */
.site-logo .logo-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-text);
  /* display: none; */ /* uncomment to hide text when using image logo */
}

/* Main nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.2rem);
  margin-left: auto;
}

.site-nav a {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.site-nav a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* Active page — underlined */
.site-nav a.active {
  border-bottom: 2px solid var(--color-text);
}

/* Language switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 1.5rem;
  padding-left: 1.5rem;
  border-left: 1px solid var(--color-rule);
  flex-shrink: 0;
}

.lang-switch a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-light);
  padding: 0.2rem 0.3rem;
  transition: color 0.2s;
}

.lang-switch a:hover,
.lang-switch a.active-lang {
  color: var(--color-accent);
  font-weight: 700;
}

.lang-switch span {
  color: var(--color-rule);
  font-size: 0.7rem;
}

/* ============================================================
   MOBILE NAV
   ============================================================ */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: all 0.3s;
}

@media (max-width: 700px) {
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.2rem var(--gutter) 1.5rem;
    gap: 1.1rem;
    border-bottom: 1px solid var(--color-rule);
    box-shadow: 0 6px 20px rgba(0,0,0,0.07);
  }

  .site-nav.open { display: flex; }

  .lang-switch {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    border-top: 1px solid var(--color-rule);
    padding-top: 0.8rem;
    width: 100%;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  margin-top: auto;
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 2.2rem var(--gutter);
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-copy { margin-top: 0.5rem; }
}

/* ============================================================
   MAIN CONTENT WRAPPER
   ============================================================ */
.page-content {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) var(--gutter);
}

/* Page title shown below header */
.page-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--color-text);
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-rule);
}

/* ============================================================
   HERO (Index page)
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;

  /* --- BACKGROUND IMAGE ---
     Replace 'your-hero-image.jpg' with your image filename.
     Put the image in /images/
  background-image: url('../images/hero.jpg');
  background-size: cover;
  background-position: center;
  */
  background-color: #c8d4be; /* placeholder colour, remove once image is set */
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--color-hero-overlay);
  /* Remove this element if not using a background image */
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: var(--gutter);
  color: var(--color-text); /* switches to white automatically when overlay is active */
}

/* When a real image + overlay is used, uncomment: */
/*
.hero-overlay ~ .hero-content,
.hero:has(.hero-overlay) .hero-content {
  color: #fff;
}
*/

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.hero-content p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  max-width: 520px;
  margin: 0 auto 2rem;
  font-weight: 300;
  opacity: 0.9;
}

.btn {
  display: inline-block;
  padding: 0.8rem 2.2rem;
  border: 1.5px solid currentColor;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.25s, color 0.25s;
  cursor: pointer;
}

.btn:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* ============================================================
   PROJECTS LIST PAGE  -- vertical list
   ============================================================ */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

.project-card {
  display: flex;
  flex-direction: row;
  text-decoration: none;
  color: var(--color-text);
  border: 1px solid var(--color-rule);
  transition: box-shadow 0.25s, transform 0.25s;
  overflow: hidden;
}

.project-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  transform: translateY(-3px);
}

.project-card-img {
  width: 280px;
  flex-shrink: 0;
  aspect-ratio: 4/3;
  background: #dde5d6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dde5d6;
  color: var(--color-text-light);
  font-size: 2rem;
  font-weight: 200;
}

.project-card-body {
  padding: 1.4rem 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-card-body h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 0.4rem;
}

.project-card-body p {
  font-size: 0.88rem;
  color: var(--color-text-light);
}

/* Mobile: stack image above text */
@media (max-width: 600px) {
  .project-card { flex-direction: column; }
  .project-card-img { width: 100%; aspect-ratio: 16/9; }
}

/* ============================================================
   SINGLE PROJECT PAGE
   ============================================================ */

/* --- Top image pair (two images side by side with gap) --- */
.project-top-images {
  display: grid;
  grid-template-columns: 1fr; /*OR:  grid-template-columns: 1fr 1fr; */
  gap: 1rem;               /* white space between the two top images */
  margin-bottom: 2.5rem;
}

.project-top-images figure {
  margin: 0;
}

.project-top-images figure img,
.project-top-images figure .img-placeholder {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

/* --- Text + float image section --- */
.project-body {
  /* clearfix so float doesn't bleed out */
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.project-body p {
  margin-bottom: 1.2rem;
  color: var(--color-text-light);
}

/* The image that floats to the right of the text */
.project-float-img {
  float: right;
  width: 38%;
  margin: 0 0 1.2rem 2rem;   /* space between image and text */
}

.project-float-img img,
.project-float-img .img-placeholder {
  width: 100%;
  aspect-ratio: 3/6;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

/* --- Shared figure / caption styles --- */
figure {
  margin: 0;
}

figcaption {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-top: 0.4rem;
  font-style: italic;
  /* If no caption text is added, the element is hidden */
}

figcaption:empty {
  display: none;
}

/* --- Bottom gallery grid --- */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
  clear: both;   /* clears float from text section */
}

.project-gallery figure img,
.project-gallery figure .img-placeholder {
  width: 100%;
  aspect-ratio: 4/4;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

/* Mobile: stack top pair vertically */
@media (max-width: 600px) {
  .project-top-images {
    grid-template-columns: 1fr;
  }
  .project-float-img {
    float: none;
    width: 100%;
    margin: 0 0 1.5rem 0;
  }
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.75);
  align-items: center;
  justify-content: center;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-img-wrap {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img-wrap img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-caption {
  color: rgba(255,255,255,0.7);
  font-size: 0.82rem;
  margin-top: 0.7rem;
  font-style: italic;
  text-align: center;
}

.lightbox-close {
  position: fixed;
  top: 1.2rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  padding: 1rem;
  opacity: 0.65;
  transition: opacity 0.2s;
  line-height: 1;
}
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }
.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-body {
  max-width: 720px;
}

.about-body p {
  margin-bottom: 1.4rem;
}

.about-image {
  width: 100%;
  aspect-ratio: 16/7;
  background: #dde5d6;
  overflow: hidden;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-body {
  max-width: 560px;
}

.contact-body p {
  margin-bottom: 1rem;
}

.contact-body a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-form {
  margin-top: 1.5rem;
  max-width: 520px;
}

.form-group {
  margin-bottom: 1.4rem;
  display: flex;
  flex-direction: column;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
  color: var(--color-text);
}

.required { color: var(--color-accent); }

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-rule);
  background: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  border-radius: 0;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-btn { margin-top: 0.5rem; }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form-success {
  background: #edf5e8;
  border-left: 3px solid var(--color-accent);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--color-accent);
  font-size: 0.95rem;
}

.form-error {
  background: #fdf0f0;
  border-left: 3px solid #c0392b;

/* ============================================================
   PLAIN TEXT PAGES (Impressum, Datenschutz, etc.)
   ============================================================ */
.text-page {
  max-width: 720px;
}

.text-page h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 2rem 0 0.8rem;
}

.text-page p {
  margin-bottom: 1rem;
  color: var(--color-text-light);
}

/* ============================================================
   UTILITY
   ============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
