/* planwerkstatt – Landschaftsarchitektur
   Faithful rebuild of the original Wix site.
   Type: DIN Next Light  ->  Barlow (closest free substitute).
   Barlow is self-hosted from /fonts/ — loading it from Google's servers would send
   visitor IPs to Google and require consent (LG München I, 3 O 17493/20). */

@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('/fonts/barlow-200.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/barlow-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/barlow-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/barlow-500.woff2') format('woff2');
}

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

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

:root {
  --green:      #20814B;   /* "planwerkstatt" logo green */
  --grey-light: #9a9a9a;   /* "Landschaftsarchitektur", inactive */
  --grey-nav:   #595959;   /* nav links */
  --grey-text:  #2f2e2e;   /* body / captions */
  --cap-bg:     #ececec;   /* caption bar background */
  --rule:       #e2e2e2;   /* divider lines */
  --bg:         #ffffff;

  /* Layout widths — header, gallery, footer all share one column edge. */
  --content:    1240px;    /* single page container width */
  --measure:    900px;     /* readable text measure (long-form copy) */
  --gutter:     36px;      /* horizontal page padding (overridden on mobile) */

  /* Spacing scale — every margin/padding/gap derives from this 4px rhythm. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --font: 'Barlow', 'DIN Next', 'Helvetica Neue', Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-weight: 300;
  color: var(--grey-text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; transition: color .2s ease; }
img { max-width: 100%; height: auto; display: block; }

/* Visible keyboard focus for all interactive elements. */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ---------- Header ---------- */
.header { background: var(--bg); }

.header-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: var(--space-5) var(--gutter) 0;
}

.brand {
  display: flex;
  align-items: center;       /* centre the wordmark against the tall logo */
  justify-content: space-between;
  gap: var(--space-6);
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  flex-wrap: wrap;
  min-width: 0;              /* allow text to wrap instead of squeezing the logo */
}

.brand-text .name {
  font-size: 52px;
  font-weight: 300;
  color: var(--green);
  letter-spacing: .5px;
  line-height: 1;
}

.brand-text .sub {
  font-size: 34px;
  font-weight: 200;
  color: var(--grey-light);
  letter-spacing: .5px;
  line-height: 1;
}

.brand-right { display: flex; align-items: center; gap: var(--space-4); flex-shrink: 0; }
.brand-logo { flex-shrink: 0; }
/* max-width:none overrides the global `img { max-width:100% }` so the fixed-height
   logo keeps its aspect ratio in the flex row instead of being squeezed. */
.brand-logo img { height: 104px; width: auto; max-width: none; }

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-7);
  padding: var(--space-6) 0 var(--space-5);
}

.nav a {
  font-size: 22px;
  font-weight: 300;
  color: var(--grey-nav);
  letter-spacing: .5px;
}

.nav a:hover { color: var(--green); }
.nav a.active { color: var(--grey-light); }

.header-rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* Mobile toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: var(--space-2);
}
.menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--grey-nav);
  margin: 6px 0;
}

/* ---------- Page title (subpages) ---------- */
.page-title {
  max-width: var(--content);
  margin: 0 auto;
  padding: var(--space-7) var(--gutter) var(--space-2);
}
.page-title h1 {
  font-size: 38px;
  font-weight: 200;
  color: var(--green);
  letter-spacing: .5px;
}
.page-title p {
  margin-top: var(--space-2);
  font-size: 20px;
  color: var(--grey-light);
  font-weight: 300;
}

/* ---------- Main ---------- */
.main {
  max-width: var(--content);
  margin: 0 auto;
  padding: var(--space-7) var(--gutter) var(--space-5);
}

/* ---------- Project gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.card { display: block; }

.card .thumb {
  aspect-ratio: 318 / 222;
  overflow: hidden;
  background: var(--cap-bg);
}

.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .3s ease;
}

.card:hover .thumb img { opacity: .85; }
.card:hover .cap { color: var(--green); }

.card .cap {
  background: var(--cap-bg);
  text-align: center;
  font-size: 17px;
  font-weight: 300;
  color: var(--grey-text);
  padding: 18px var(--space-4);
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.35;
  overflow: hidden;
  transition: color .2s ease;
}

.show-more {
  text-align: center;
  margin: var(--space-6) 0 var(--space-2);
}
.show-more a {
  font-size: 15px;
  color: var(--grey-text);
  font-weight: 300;
  border-bottom: 1px solid var(--grey-light);
  padding-bottom: 2px;
}
.show-more a:hover { color: var(--green); border-color: var(--green); }

/* ---------- Content (subpages) ---------- */
.section { margin-bottom: var(--space-7); max-width: var(--measure); }

.section h2 {
  font-size: 28px;
  font-weight: 300;
  color: var(--green);
  letter-spacing: .5px;
  margin-bottom: var(--space-4);
}

.section h3 {
  font-size: 20px;
  font-weight: 500;
  color: var(--grey-text);
  margin: var(--space-5) 0 var(--space-2);
}

.section p { margin-bottom: var(--space-4); }
.section strong { font-weight: 500; }

/* Office profile */
.profile {
  max-width: var(--content);
}
.profile-heading,
.profile-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
}
.profile-heading { align-items: baseline; }
.profile-heading h2,
.profile-heading p { margin-bottom: var(--space-4); }
.profile-photo img {
  width: 100%;
  height: auto;
}
.profile-content { max-width: var(--measure); }

.section ul { list-style: none; margin-bottom: var(--space-4); }
.section ul li {
  position: relative;
  padding: var(--space-1) 0 var(--space-1) var(--space-5);
}
.section ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--green);
}

.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tags span {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  font-size: 15px;
  font-weight: 300;
  color: var(--grey-text);
}

.philosophy { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.philosophy div {
  border-left: 3px solid var(--green);
  padding: var(--space-4);
  font-size: 15px;
}

.credentials {
  margin-top: var(--space-4);
  background: var(--cap-bg);
  padding: var(--space-4);
  font-size: 15px;
  color: var(--grey-nav);
}

/* Team */
.team {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.team-section { max-width: var(--content); }
.team .member {
  background: var(--cap-bg);
  padding: 28px var(--space-5);
  text-align: center;
}
.team .member .avatar {
  width: 86px; height: 86px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 26px;
  font-weight: 300;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-4);
  overflow: hidden;
}
.team .member .avatar.avatar-photo { background: none; }
.team .member .avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.team .member h3 { font-size: 16px; font-weight: 500; margin: 0 0 var(--space-1); }
.team .member .role { font-size: 14px; color: var(--grey-light); font-weight: 300; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: stretch;
  max-width: none;
}
.contact-info .company { font-size: 22px; font-weight: 500; color: var(--grey-text); }
.contact-info .company-sub { font-size: 17px; color: var(--grey-light); margin-bottom: var(--space-5); }
.contact-details .row {
  display: flex; gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--rule);
}
.contact-details .row:last-child { border-bottom: 0; }
.contact-details .lab {
  min-width: 78px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--grey-light);
}
.contact-details .val a:hover { color: var(--green); }
.map {
  height: 100%;
  background: var(--cap-bg);
}
.map iframe { width: 100%; height: 100%; border: 0; }
.map-consent {
  height: 100%;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-5);
  text-align: center;
}
.map-consent p { font-size: 14px; color: var(--grey-nav); max-width: 42ch; }
.map-consent a { color: var(--green); }
.map-consent .map-load {
  font: inherit;
  font-size: 15px;
  padding: var(--space-2) var(--space-5);
  background: var(--green);
  color: #fff;
  border: 0;
  cursor: pointer;
}
.map-consent .map-load:hover { opacity: .9; }

/* Legal */
.legal { max-width: var(--measure); }
.legal h2 {
  font-size: 19px; font-weight: 400; color: var(--grey-text);
  margin: var(--space-6) 0 var(--space-2);
}
.legal h2:first-child { margin-top: 0; }
.legal p { margin-bottom: var(--space-3); font-size: 15px; }

/* ---------- Footer ---------- */
.footer { margin-top: var(--space-8); }
.footer-rule { border: 0; border-top: 1px solid var(--rule); }
.footer-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: var(--space-7) var(--gutter);
  text-align: center;
}
.footer-cols {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: var(--space-7);
  flex-wrap: wrap;
}
.footer-cols .logo img { height: 58px; width: auto; opacity: .9; }
.footer-cols .col {
  font-size: 15px;
  color: var(--grey-nav);
  font-weight: 300;
  line-height: 1.7;
  text-align: left;
}
.footer-cols .col a:hover { color: var(--green); }
.footer-links {
  margin-top: var(--space-5);
  font-size: 14px;
  color: var(--grey-light);
}
.footer-links a { color: var(--grey-nav); margin: 0 6px; }
.footer-links a:hover { color: var(--green); }
.footer-links .sep { color: var(--grey-light); }

/* ---------- Projektliste (project reference list) ---------- */
.pl-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.pl-intro {
  max-width: var(--measure);
  font-size: 17px;
  color: var(--grey-nav);
}
.pl-head .pl-intro { margin-bottom: 0; }

/* Layout switch: single-column list vs. two-column tiles. */
.layout-toggle {
  display: inline-flex;
  flex: none;
  border: 1px solid var(--rule);
  background: #fff;
}
.layout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--grey-light);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.layout-btn + .layout-btn { border-left: 1px solid var(--rule); }
.layout-btn:hover { color: var(--grey-text); }
.layout-btn[aria-pressed="true"] {
  background: var(--green);
  color: #fff;
}

.projektliste {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.ref-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  background: #ededed;
  transition: background .2s ease;
}
.ref-card:hover { background: #f5f5f5; }

/* One project per row: image beside content, every row the same fixed size. */
.projektliste--rows {
  grid-template-columns: 1fr;
}
.projektliste--rows .ref-card {
  flex-direction: row;
  height: 240px;
}
.projektliste--rows .ref-card .thumb {
  flex: 0 0 360px;
  aspect-ratio: auto;
  height: 100%;
}
.projektliste--rows .ref-card .body {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

/* Clickable affordance: minimalist arrow in the card's bottom-right corner. */
.ref-arrow {
  position: absolute;
  right: 20px;
  bottom: 18px;
  color: var(--grey-light);
  transition: color .2s ease, transform .2s ease;
  pointer-events: none;
}
.ref-card:hover .ref-arrow {
  color: var(--green);
  transform: translateX(3px);
}

/* Non-clickable cards: no hover colour change, no pointer cursor. */
.ref-card--static { cursor: default; }
.ref-card--static:hover { background: #ededed; }
.card--static { cursor: default; }
.card--static:hover .thumb img { opacity: 1; }
.card--static:hover .cap { color: inherit; }

.ref-card .thumb {
  aspect-ratio: 820 / 285;
  overflow: hidden;
  background: var(--grey-light);
}
.ref-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ref-card .body { padding: 20px; display: flex; flex-direction: column; flex: 1; position: relative; }

.ref-card h3 {
  font-size: 19px;
  font-weight: 500;
  color: var(--green);
  line-height: 1.3;
  margin: 0 0 2px;
  min-height: calc(1.3em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ref-card .loc {
  font-size: 15px;
  color: var(--grey-light);
  min-height: 1.4em;
  margin-bottom: var(--space-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ref-card .desc {
  font-size: 15px;
  color: var(--grey-text);
  line-height: 1.55;
  margin-bottom: var(--space-3);
  min-height: calc(1.55em * 3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ref-card .ref-facts {
  font-size: 14px;
  color: var(--grey-nav);
  line-height: 1.4;
  border-top: 1px solid var(--rule);
  padding-top: var(--space-3);
  margin-top: auto;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 4px var(--space-2);
}
.ref-card .ref-facts dt {
  color: var(--grey-light);
  min-height: calc(1.4em * 2);
}
.ref-card .ref-facts dt::after { content: ":"; }
.ref-card .ref-facts dd {
  margin: 0;
  min-height: calc(1.4em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Responsive ---------- */
/* Larger logo on wide screens to balance the big wordmark. */
@media (min-width: 1000px) {
  .brand-logo img { height: 136px; }
}

@media (max-width: 820px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .projektliste { grid-template-columns: 1fr; }
  .projektliste--rows .ref-card { flex-direction: column; }
  .projektliste--rows .ref-card .thumb { flex-basis: auto; aspect-ratio: 820 / 285; }
  .contact-grid { grid-template-columns: 1fr; }
  .map { height: auto; aspect-ratio: 4 / 3; }
  .philosophy { grid-template-columns: 1fr; }
  .team { grid-template-columns: repeat(2, 1fr); }
  .profile-heading,
  .profile-layout { grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); }
  .brand-text .name { font-size: 36px; }
  .brand-text .sub { font-size: 24px; }
}

@media (max-width: 600px) {
  :root { --gutter: 24px; }   /* tighter page padding on small screens */

  body { font-size: 16px; }
  .header-inner { padding-top: var(--space-5); }
  .brand { gap: var(--space-3); }
  .brand-logo img { height: 56px; }
  .brand-text .name { font-size: 26px; }
  .brand-text .sub { font-size: 15px; }

  .menu-toggle { display: block; }
  .nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-4) 0;
  }
  .nav.open { display: flex; }

  .pl-head { flex-direction: column; }
  .gallery { grid-template-columns: 1fr; }
  .team { grid-template-columns: 1fr; }
  .profile-heading,
  .profile-layout { grid-template-columns: 1fr; gap: 0; }
  .profile-layout { gap: var(--space-5); }
  .profile-photo { max-width: 320px; }
  .footer-cols { flex-direction: column; align-items: center; gap: var(--space-4); }
  .footer-cols .col { text-align: center; }
}

/* ---------- Linked cards (picture wrappers + anchors) ---------- */
.ref-card a.thumb { display: block; }
.ref-card .thumb picture,
.card .thumb picture { display: block; width: 100%; height: 100%; }
.ref-card h3 a { color: inherit; }
.ref-card h3 a:hover { color: var(--grey-text); }

/* ---------- Project detail page ---------- */
.projekt { max-width: 1120px; }

.projekt-hero { margin-bottom: var(--space-5); background: var(--cap-bg); }
.projekt-hero picture { display: block; }
.projekt-hero img { width: 100%; height: auto; cursor: zoom-in; }

.projekt-lead {
  font-size: 20px;
  color: var(--grey-text);
  margin-bottom: var(--space-4);
  max-width: var(--measure);
}
.projekt-text { max-width: var(--measure); margin-bottom: var(--space-5); }
.projekt-text p { margin-bottom: var(--space-4); }

.projekt-galerie {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-2);
  overflow: hidden;
  margin: var(--space-2) 0 var(--space-6);
}
.projekt-galerie .g-item {
  display: block;
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  overflow: hidden;
  background: var(--cap-bg);
  cursor: zoom-in;
}
.projekt-galerie .g-item img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s ease; }
.projekt-galerie .g-item:hover img { opacity: .85; }

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: var(--space-2) 0 var(--space-6);
  max-width: var(--measure);
  background: #000;
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.projekt-fakten {
  max-width: var(--measure);
  border-top: 1px solid var(--rule);
  padding-top: var(--space-4);
  margin-bottom: var(--space-5);
  font-size: 16px;
}
.projekt-fakten dt {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--grey-light);
  margin-top: var(--space-3);
}
.projekt-fakten dt:first-child { margin-top: 0; }
.projekt-fakten dd { color: var(--grey-nav); }

.projekt-downloads { max-width: var(--measure); margin-bottom: var(--space-5); }
.projekt-downloads h2 { font-size: 18px; font-weight: 500; color: var(--green); margin-bottom: var(--space-2); }
.projekt-downloads ul { list-style: none; }
.projekt-downloads li { padding: var(--space-1) 0 var(--space-1) var(--space-5); position: relative; }
.projekt-downloads li::before { content: '↓'; position: absolute; left: 0; color: var(--green); }
.projekt-downloads a:hover { color: var(--green); }

.projekt-back { margin-top: var(--space-4); }
.projekt-back a { color: var(--grey-nav); }
.projekt-back a:hover { color: var(--green); }

@media (max-width: 600px) {
  .projekt-galerie .g-item { width: 64px; height: 64px; }
}

/* ---------- Lightbox (project galleries) ----------
   Matches the live planwerkstatt.berlin Wix "expand" viewer:
   solid white full-screen background, dark-grey controls and caption. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 7vw;
  background: #fff;
}
.lightbox[hidden] { display: none; }

.lb-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  max-height: 92vh;
  overflow: hidden;
}
.lb-img {
  max-width: 86vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
  transform: scale(var(--lb-scale, 1));
  transform-origin: center center;
  transition: transform .22s ease;
  will-change: transform;
}
.lightbox.is-zoomed .lb-img { cursor: zoom-out; }
.lb-cap {
  color: #303030;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 400;
  margin-top: var(--space-3);
  text-align: center;
}
.lb-cap[hidden] { display: none; }

.lightbox button {
  background: none;
  border: 0;
  color: #303030;
  cursor: pointer;
  line-height: 1;
  transition: color .2s ease, opacity .2s ease;
}
.lb-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-5);
  font-size: 34px;
  opacity: .85;
}
.lb-prev, .lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 60px;
  font-weight: 300;
  padding: var(--space-2);
  opacity: .7;
}
.lb-prev { left: max(var(--space-2), 1vw); }
.lb-next { right: max(var(--space-2), 1vw); }
.lb-prev:hover, .lb-next:hover, .lb-close:hover { color: var(--green); opacity: 1; }

@media (max-width: 600px) {
  .lightbox { padding: 6vh 2vw; }
  .lb-img { max-width: 94vw; }
  .lb-prev, .lb-next { font-size: 42px; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
