/* ============================================================
   TRZ STUDIO — Main Stylesheet
   ============================================================ */

/* --- SKIP LINK --- */
.skip-link {
  position: fixed;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--black);
  color: var(--white);
  padding: 10px 20px;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

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

:root {
  --white: #F7F7F5;
  --black: #0D0D0D;
  --gray: #717171;
  --gray-light: #D9D9D6;
  --gray-lighter: #EEECEA;
  --bg-light: #F2F1EF;
  --bg-dark: #111111;
  --bg-dark-alt: #0A0A0A;

  --sans: 'Barlow', sans-serif;
  --sans-cond: 'Barlow Condensed', sans-serif;
  --mono: 'DM Mono', monospace;

  --pad: clamp(24px, 5vw, 80px);
  --pad-sm: clamp(16px, 3vw, 40px);
  --radius: 4px;

  --nav-h: 56px;
  --ease: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-gutter: stable;
  overflow-x: hidden;
}

body {
  font-family: var(--sans);
  font-weight: 300;
  background: var(--bg-light);
  color: var(--black);
  overflow-x: hidden;
  line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* --- TYPOGRAPHY --- */
.label {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
  display: block;
  margin: 0 0 1.2rem;
  padding: 0;
}
.label--inv { color: rgba(247,247,245,0.25); }

.heading-lg {
  font-family: var(--sans-cond);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 1.2rem;
}
.heading--light { color: var(--white); }

.heading-display {
  font-family: var(--sans-cond);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin-bottom: clamp(36px, 5vw, 70px);
  color: var(--white);
}

.body-text {
  font-size: 0.9rem;
  line-height: 1.85;
  font-weight: 300;
  color: var(--gray);
}
.body-text--light { color: rgba(247,247,245,0.45); }
.founder-bio p { margin: 0 0 0.6em; }
.founder-bio p:last-child { margin-bottom: 0; }
.founder-bio strong { color: rgba(255,255,255,0.55); font-weight: 500; }
.founder-bio-more { padding-top: 0.6em; }

.btn-text {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.82rem;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(13,13,13,0.2);
  color: rgba(13,13,13,0.5);
  padding: 0.1rem 0;
  transition: color 0.3s, border-color 0.3s;
  letter-spacing: 0.02em;
}
.btn-text:hover { color: var(--black); border-color: var(--black); }

/* Inverted btn-text for dark backgrounds */
.btn-text--inv {
  border-color: rgba(247,247,245,0.25);
  color: rgba(247,247,245,0.45);
}
.btn-text--inv:hover { color: var(--white); border-color: rgba(247,247,245,0.8); }

.history-cta-wrap {
  text-align: center;
  margin-top: clamp(28px, 3.5vw, 48px);
}

/* --- PROMINENT CTA BUTTONS --- */

/* "Wszystkie projekty" — pasek pod gridem */
#btn-all-projects {
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

/* --- Secondary button — solid dark, premium hover --- */
.btn--secondary {
  display: inline-block;
  font-family: var(--sans-cond);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: white;
  background: black;
  border: 1px solid transparent;
  padding: 14px 36px;
  cursor: pointer;
  transition: opacity 0.3s var(--ease),
              border-color 0.3s var(--ease),
              transform 0.3s var(--ease);
}
.btn--secondary:hover {
  opacity: 0.85;
  border-color: rgba(255,255,255,0.25);
  transform: scale(1.02);
}

/* "Czytaj więcej" założyciela — ciemna sekcja */
#btn-founder-more {
  font-family: var(--sans-cond);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247,247,245,0.4);
  border: none;
  border-bottom: 1px solid rgba(247,247,245,0.2);
  padding: 2px 0;
  background: transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
  cursor: pointer;
}
#btn-founder-more:hover {
  color: rgba(247,247,245,0.85);
  border-color: rgba(247,247,245,0.55);
}

/* --- NAV --- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  height: var(--nav-h);
  transition: background 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  background: #ffffff;
  border-color: var(--gray-light);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  height: var(--nav-h);
}

.nav-logo-wrap {
  position: relative;
  height: 22px;
  flex-shrink: 0;
  line-height: 0;
  align-self: center;
}
.nav-logo { display: block; height: 22px; width: auto; }
.nav-logo--light { filter: brightness(0) invert(1); transition: opacity 0.3s; }
.nav-logo--dark {
  position: absolute;
  top: 0; left: 0;
  height: 22px; width: auto;
  filter: brightness(0);
  opacity: 0;
  transition: opacity 0.3s;
}
nav.scrolled .nav-logo--light { opacity: 0; }
nav.scrolled .nav-logo--dark { opacity: 1; }

.nav-name {
  font-family: var(--sans-cond);
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--white);
  font-weight: 500;
  line-height: 1;
  transition: color 0.3s;
}
nav.scrolled .nav-name { color: var(--black); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  font-weight: 400;
  font-size: 0.82rem;
  color: rgba(247,247,245,0.75);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }
nav.scrolled .nav-links a { color: rgba(13,13,13,0.65); }
nav.scrolled .nav-links a:hover { color: var(--black); }

.nav-lang {
  font-family: var(--sans-cond);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(247,247,245,0.65);
  padding-left: 1.4rem;
  position: relative;
  transition: color 0.2s;
}
.nav-lang::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 0.85em;
  background: rgba(247,247,245,0.18);
}
.nav-lang:hover { color: var(--white); }
nav.scrolled .nav-lang { color: rgba(13,13,13,0.55); }
nav.scrolled .nav-lang::before { background: rgba(13,13,13,0.15); }
nav.scrolled .nav-lang:hover { color: var(--black); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 10px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--white);
  transition: all 0.3s;
}
nav.scrolled .nav-hamburger span { background: var(--black); }
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 190;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--pad);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.mobile-menu-close {
  display: none;
}
.mobile-menu-close:hover { color: var(--white); }
.mobile-menu.open { opacity: 1; pointer-events: all; }
.mobile-menu a {
  font-family: var(--sans-cond);
  font-size: clamp(2.2rem, 8vw, 4rem);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0.5rem 0;
  transition: opacity 0.2s;
}
.mobile-menu a:hover { opacity: 0.6; }

/* --- HERO --- */
#hero {
  height: 100vh;
  height: 100svh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--black);
  will-change: padding;
}

.hero-bg {
  position: absolute;
  inset: 0;
}
.hero-bg img,
.hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  transform-origin: center bottom;
  will-change: transform;
}
/* Fallback image shown on mobile instead of video */
.hero-img { display: none; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(13,13,13,0.15) 0%, rgba(13,13,13,0.8) 100%);
}

.hero-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  pointer-events: none;
  will-change: transform, opacity;
}

.hero-title {
  font-family: var(--sans-cond);
  font-weight: 700;
  font-size: clamp(2.2rem, 5.5vw, 5rem);
  letter-spacing: 0.01em;
  line-height: 0.95;
  color: var(--white);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-line { overflow: hidden; display: block; line-height: 0.95; margin-bottom: -0.05em; }
.hero-text {
  display: block;
  padding: 0.02em 0;
  white-space: nowrap;
  will-change: transform;
}
.htxt-wrap { }
.htxt-layer { display: block; }
.htxt-layer-b { display: block; margin-top: 0.8rem; }

/* "Od 1960" — mała czcionka pod głównym napisem */
.hl-3 .hero-text {
  font-family: var(--sans-cond);
  font-size: clamp(0.78rem, 1.3vw, 1rem);
  font-weight: 300;
  letter-spacing: 0.24em;
  color: rgba(247,247,245,0.65);
  text-transform: uppercase;
  line-height: 1;
}

@keyframes slideUp {
  to { transform: translateY(0); }
}

/* --- HERO PARALLAX --- */

/* --- PROJECTS SECTION --- */
#projekty {
  position: relative;
  z-index: 10;
  background: var(--bg-light);
}

.projects-container {
  position: relative;
  height: 100vh;
  height: 100svh; /* iOS Safari fix: svh excludes browser chrome area */
  overflow: hidden;
  --passe: 100px;
  background: var(--bg-light);
  z-index: 10;
}

.project-slide {
  position: absolute;
  inset: var(--passe);
  display: grid;
  grid-template-columns: 55% 45%;
  opacity: 0;
  will-change: transform, opacity;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(13,13,13,0.08), 0 4px 14px rgba(13,13,13,0.05);
}
.project-slide.active { opacity: 1; }

.project-slide__image {
  position: relative;
  height: calc(100vh - var(--passe) * 2);
  overflow: hidden;
  background: var(--gray-lighter);
}
/* Gallery track inside card image area */
.slide-gallery-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.65,0,0.35,1);
  will-change: transform;
}
.slide-gallery-item {
  flex: 0 0 100%;
  min-width: 100%;
  height: 100%;
}
.project-slide__image img,
.slide-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(10%);
  transition: filter 0.6s;
  display: block;
}
.project-slide:hover .project-slide__image img,
.project-slide:hover .slide-gallery-item img { filter: grayscale(0%); }

/* Gallery nav: dots pill at bottom of image */
.slide-gallery-nav {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  z-index: 5;
  background: #0d0d0d;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 7px 12px;
  white-space: nowrap;
}
/* Side arrow buttons — appear on image hover */
.slide-gallery-prev,
.slide-gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  background: #0d0d0d;
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
  width: 42px;
  height: 64px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.2s;
  font-size: 1.05rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.slide-gallery-prev { left: 0; border-left: none; border-radius: 0 4px 4px 0; }
.slide-gallery-next { right: 0; border-right: none; border-radius: 4px 0 0 4px; }
.project-slide__image:hover .slide-gallery-prev,
.project-slide__image:hover .slide-gallery-next { opacity: 1; }
.slide-gallery-prev:hover,
.slide-gallery-next:hover { background: rgba(13,13,13,0.82); }
.slide-gallery-prev:disabled,
.slide-gallery-next:disabled { opacity: 0.15 !important; pointer-events: none; cursor: default; }
.slide-gallery-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.slide-gallery-dot {
  position: relative;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.25s;
}
/* Invisible 44px touch target */
.slide-gallery-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
}
.slide-gallery-dot.active {
  background: #fff;
  border-color: #fff;
  transform: scale(1.3);
}

.project-slide__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 4vw, 60px) clamp(28px, 4vw, 56px);
  padding-top: calc(var(--nav-h) + 20px);
  background: var(--white);
}

.project-slide__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}

.project-num {
  font-family: var(--sans-cond);
  font-weight: 300;
  font-size: clamp(3rem, 6vw, 5rem);
  color: var(--gray-light);
  line-height: 1;
  letter-spacing: -0.03em;
}

.project-year {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--gray);
}

.project-name {
  font-family: var(--sans-cond);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.5vw, 2.2rem);
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--black);
  margin-bottom: 1.5rem;
}

.project-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1.2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-lighter);
}
.project-meta dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  padding-top: 0.15rem;
}
.project-meta dd {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--black);
}

.project-desc {
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(13,13,13,0.55);
  max-width: 420px;
}

/* "Czytaj więcej" — hidden on desktop, visible on mobile */
.project-read-more { display: none; }

/* Progress dots */
.projects-progress {
  position: absolute;
  right: clamp(16px, 2vw, 32px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10;
}
.progress-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid var(--gray);
  background: transparent;
  padding: 0;
  transition: all 0.4s;
}
.progress-dot.active {
  background: var(--black);
  border-color: var(--black);
  transform: scale(1.3);
}

.all-projects-trigger {
  position: absolute;
  bottom: calc(var(--passe) / 2 - 20px);
  left: var(--passe);
  right: var(--passe);
  text-align: center;
  z-index: 20;
}

/* --- ALL PROJECTS OVERLAY --- */
.all-projects-overlay {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 500;
  overflow-y: auto;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}
.all-projects-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.all-projects-close {
  position: fixed;
  top: 20px;
  right: 28px;
  z-index: 510;
  font-family: var(--mono);
  font-size: 0.73rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  background: #0d0d0d;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 10px 18px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.all-projects-close:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}

/* Expand effect: dim overlay + wrapper that grows from card to full */
.ap-expand-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 515;
  opacity: 0;
  pointer-events: none;
  display: none;
}
.ap-expand-overlay.is-open {
  display: block;
  pointer-events: all;
}
.ap-expanded-wrapper {
  position: fixed;
  z-index: 516;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.5);
  display: none;
}
.ap-expanded-wrapper.is-open {
  display: block;
}
/* Clone fills wrapper — image covers, info bar at bottom */
.ap-expanded-wrapper .ap-card,
.ap-expanded-wrapper .founder-work {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
}
.ap-expanded-wrapper .ap-card img,
.ap-expanded-wrapper .ap-card:hover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: none;
  transform: none;
  transition: none;
}
.ap-expanded-wrapper .founder-work img,
.ap-expanded-wrapper .founder-work:hover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
  /* filter animated by JS — do not override here */
}
/* Info panel: image flexes to fill, panel takes only what it needs */
.ap-expanded-wrapper .ap-card.has-info-panel,
.ap-expanded-wrapper .founder-work.has-info-panel {
  display: flex;
  flex-direction: column;
}
.ap-expanded-wrapper .ap-card.has-info-panel > img,
.ap-expanded-wrapper .founder-work.has-info-panel > img {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  object-fit: cover;
  object-position: center;
  position: relative;
  z-index: 1;
}
.ap-expanded-wrapper .ap-card.has-info-panel > .exp-gallery,
.ap-expanded-wrapper .founder-work.has-info-panel > .exp-gallery {
  flex: 1 1 0;
  min-height: 0;
  position: relative;
  z-index: 1;
}
.ap-expanded-wrapper .founder-work .founder-work-name {
  display: none;
}
.ap-expanded-info {
  flex: 0 0 auto;
  position: relative;
  z-index: 0;
  background: #0d0d0d;
  padding: clamp(16px, 2.5vw, 28px) clamp(20px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vw, 10px);
  border-radius: 0;
}
/* Hide info panel's own close button in landscape */
.exp-landscape-overlay .ap-expanded-info .ap-new-detail__close {
  display: none;
}
/* Standalone landscape close button — positioned over info panel area */
.exp-landscape-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 520;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 0;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.exp-landscape-close svg {
  flex-shrink: 0;
}
.exp-landscape-close:hover {
  background: rgba(0,0,0,0.7);
  border-color: rgba(255,255,255,0.35);
}
/* Landscape mobile: side-by-side layout */
.exp-landscape-overlay .ap-expanded-info {
  border-radius: 0 15px 15px 0;
  padding: clamp(14px, 3vw, 24px) clamp(16px, 3vw, 28px);
  padding-top: 48px;
  padding-right: 16px;
  -webkit-overflow-scrolling: touch;
  background: #0d0d0d;
}
.exp-landscape-overlay .exp-gallery,
.exp-landscape-overlay > picture,
.exp-landscape-overlay > img {
  border-radius: 15px 0 0 15px;
  overflow: hidden;
}
.exp-landscape-overlay .exp-gallery img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.exp-landscape-overlay .ap-expanded-info__top {
  padding-right: 36px;
}
.exp-landscape-overlay .ap-expanded-info__title {
  font-size: clamp(0.95rem, 2.5vw, 1.4rem);
}
.exp-landscape-overlay .ap-expanded-info__desc {
  font-size: clamp(0.7rem, 1.5vw, 0.82rem);
}
.exp-landscape-overlay .ap-expanded-info__desc-wrap {
  max-height: 50%;
  overflow-y: auto;
}
.ap-expanded-info__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ap-expanded-info__label {
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}
.ap-expanded-info__title {
  font-family: var(--sans-cond);
  font-size: clamp(1.1rem, 2.2vw, 2rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
}
.ap-expanded-info__meta {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}
.ap-expanded-info__meta span {
  font-size: 0.75rem;
  font-weight: 300;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.04em;
  padding-right: clamp(8px, 1.2vw, 14px);
  margin-right: clamp(8px, 1.2vw, 14px);
  border-right: 1px solid rgba(255,255,255,0.12);
}
.ap-expanded-info__meta span:last-child { border-right: none; padding-right: 0; margin-right: 0; }
.ap-expanded-info__desc-wrap { overflow: hidden; }
.ap-expanded-info__desc {
  font-size: clamp(0.78rem, 1vw, 0.9rem);
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255,255,255,0.75);
  margin: 0;
}
.ap-expanded-info__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(8px, 1.2vw, 14px);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.3s;
  text-decoration: none;
}
.ap-expanded-info__cta:hover {
  color: rgba(255,255,255,0.85);
}
.ap-expanded-info__cta svg {
  opacity: 0.4;
  transition: transform 0.3s, opacity 0.3s;
}
.ap-expanded-info__cta:hover svg {
  transform: translateX(3px);
  opacity: 0.7;
}

/* ── Expanded card gallery ── */
.exp-gallery {
  position: relative;
  overflow: hidden;
  width: 100%;
  z-index: 1;
}
.exp-gallery-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  height: 100%;
}
.exp-gallery-slide {
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
}
.exp-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* Arrows */
.exp-gallery-prev,
.exp-gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s, background 0.2s, transform 0.2s;
  padding: 0;
}
.exp-gallery-prev { left: 12px; }
.exp-gallery-next { right: 12px; }
.exp-gallery:hover .exp-gallery-prev,
.exp-gallery:hover .exp-gallery-next { opacity: 1; }
.exp-gallery:hover .exp-gallery-prev[style*="opacity: 0"] { opacity: 0 !important; }
.exp-gallery:hover .exp-gallery-next[style*="opacity: 0"] { opacity: 0 !important; }
.exp-gallery-prev:hover,
.exp-gallery-next:hover {
  background: rgba(0,0,0,0.65);
  transform: translateY(-50%) scale(1.08);
}
.exp-gallery-prev:active,
.exp-gallery-next:active { transform: translateY(-50%) scale(0.95); }
/* Nav row: dots + counter */
.exp-gallery-nav {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
}
.exp-gallery-dots {
  display: flex;
  gap: 6px;
  pointer-events: auto;
}
.exp-gallery-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s;
}
/* Invisible 44px touch target */
.exp-gallery-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
}
.exp-gallery-dot.active {
  background: #fff;
  transform: scale(1.35);
}
.exp-gallery-counter {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
  pointer-events: none;
}
.exp-gallery-counter .exp-cur { color: rgba(255,255,255,0.9); }
/* Mobile: always show arrows (smaller) */
@media (max-width: 768px) {
  .exp-gallery-prev,
  .exp-gallery-next {
    width: 32px;
    height: 32px;
    opacity: 1;
  }
  .exp-gallery-prev { left: 8px; }
  .exp-gallery-next { right: 8px; }
}

/* New detail layout inside expanded wrapper (screen 2): image + bottom text with gradient */
.ap-new-detail {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: inherit;
}
.ap-new-detail__image {
  position: absolute;
  inset: 0;
}
.ap-new-detail__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ap-new-detail__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: clamp(24px, 4vw, 48px) clamp(20px, 3vw, 40px);
  /* Większy zasięg gradientu + mocniejszy cień dla czytelności na jasnym tle */
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.75) 25%,
    rgba(0, 0, 0, 0.4) 55%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.35rem;
}
/* Start niewidoczne — animacja wjedzie od dołu bez migania */
.ap-new-detail__overlay > * {
  opacity: 0;
  transform: translateY(28px);
}
.ap-new-detail__label {
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 0, 0, 0.4);
}
.ap-new-detail__title {
  font-family: var(--sans-cond);
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 24px rgba(0, 0, 0, 0.35);
}
.ap-new-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  font-size: 0.8rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.02em;
  margin-top: 0.25rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5), 0 0 16px rgba(0, 0, 0, 0.3);
}
.ap-new-detail__meta span + span::before {
  content: " · ";
  color: rgba(255, 255, 255, 0.6);
}
.ap-new-detail__desc {
  font-size: clamp(0.8rem, 1.1vw, 0.95rem);
  font-weight: 300;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
  margin: clamp(12px, 2vw, 20px) 0 0;
  max-width: 75vw;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5), 0 0 14px rgba(0, 0, 0, 0.25);
}
.ap-new-detail__close {
  position: absolute;
  top: clamp(16px, 2.5vw, 24px);
  right: clamp(16px, 2.5vw, 24px);
  z-index: 10;
  font-family: var(--mono);
  font-size: 0.73rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(13, 13, 13, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 18px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.ap-new-detail__close:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(13, 13, 13, 0.85);
}

/* ── FEATURED PROJECTS GRID (full-width, white bg) ── */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  width: 100%;
  grid-auto-flow: dense; /* fill gaps left by irregular spans */
}
/* Reset global mosaic rules, set base card */
.featured-grid .ap-card { grid-column: auto; grid-row: auto; min-height: 260px; }

/* Mosaic spans applied via inline styles from settings.json (editable in admin) */

/* Clip grid to 100vh — bar reveals the rest */
.featured-grid-wrap {
  height: 100vh;
  overflow: hidden;
  padding: 4px 4px 0;
}
@media (max-width: 640px) {
  .featured-grid-wrap { padding: 3px; }
}

/* Overlay hidden — no gradient on hover */
.featured-grid .ap-overlay {
  opacity: 0;
  pointer-events: none;
}

/* Mosaic hover: desaturated default, zoom + full colour on hover */
.featured-grid .ap-card img {
  filter: grayscale(35%);
  transition: filter 0.55s var(--ease), transform 0.7s var(--ease);
}
.featured-grid .ap-card:hover img {
  filter: grayscale(0%);
  transform: scale(1.06);
}

/* Disable hover effects when a card is expanded */
body.card-expanded .featured-grid .ap-card img,
body.card-expanded .featured-grid .ap-card:hover img {
  filter: grayscale(35%);
  transform: none;
  transition: none;
}

/* Full-width expand bar */
.featured-more-bar {
  position: relative;
  z-index: 2;
  margin-top: -68px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 4vw, 48px);
  width: 100%;
  height: 77px;
  padding: 0 var(--pad);
  background: #0d0d0d;
  color: rgba(255,255,255,0.55);
  font-family: var(--sans);
  cursor: pointer;
  border: none;
  transition: color 0.45s var(--ease), background 0.45s var(--ease);
}
.featured-more-bar:hover {
  background: var(--white);
  color: rgba(13,13,13,0.85);
}
.featured-more-bar__label {
  font-family: var(--sans-cond);
  font-weight: 600;
  font-size: clamp(1.08rem, 1.69vw, 1.54rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  transition: letter-spacing 0.45s var(--ease);
}
.featured-more-bar:hover .featured-more-bar__label {
  letter-spacing: 0.04em;
}
.featured-more-bar__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border: 1px solid currentColor;
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform 0.45s var(--ease);
}
.featured-more-bar:hover .featured-more-bar__arrow {
  transform: translateY(3px);
}
.featured-more-bar.is-expanded .featured-more-bar__arrow {
  transform: rotate(180deg);
}
.featured-more-bar.is-expanded:hover .featured-more-bar__arrow {
  transform: rotate(180deg) translateY(3px);
}

.all-projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  width: 100%;
  min-height: 100vh;
}

/* Mosaic: varied sizes for visual interest (scoped to overlay grid only) */
.all-projects-grid .ap-card:nth-child(1)  { grid-column: span 2; grid-row: span 2; }
.all-projects-grid .ap-card:nth-child(4)  { grid-column: span 2; }
.all-projects-grid .ap-card:nth-child(6)  { grid-row: span 2; }
.all-projects-grid .ap-card:nth-child(7)  { grid-column: span 2; }

.ap-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  cursor: pointer;
  touch-action: manipulation;
}
.ap-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
  filter: grayscale(20%) brightness(0.85);
  transition: filter 0.6s, transform 0.8s var(--ease);
}
.ap-card:hover img {
  filter: grayscale(0%) brightness(1);
  transform: scale(1.06);
}
.ap-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(13,13,13,0.85) 0%,
    rgba(13,13,13,0.3) 40%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(16px, 2vw, 28px);
  transition: background 0.4s;
}
.ap-card:hover .ap-overlay {
  background: linear-gradient(
    to top,
    rgba(13,13,13,0.9) 0%,
    rgba(13,13,13,0.15) 50%,
    transparent 100%
  );
}

.ap-label {
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.4rem;
}
.ap-title {
  font-family: var(--sans-cond);
  font-size: clamp(1rem, 1.8vw, 1.5rem);
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
/* Bigger title on large cards */
.ap-card:nth-child(1) .ap-title {
  font-size: clamp(1.3rem, 2.5vw, 2.2rem);
}
.ap-details {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}
.ap-details span {
  font-size: 0.75rem;
  font-weight: 300;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.04em;
  padding-right: clamp(8px, 1.2vw, 14px);
  margin-right: clamp(8px, 1.2vw, 14px);
  border-right: 1px solid rgba(255,255,255,0.12);
}
.ap-details span:last-child { border-right: none; padding-right: 0; margin-right: 0; }

/* Details hidden by default, slide up on hover */
.ap-details {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.ap-card:hover .ap-details {
  opacity: 1;
  transform: translateY(0);
}

/* ── PROJECT DETAIL VIEW — mirrors project-slide, dark palette ── */
.ap-detail {
  position: fixed;           /* covers viewport regardless of overlay scroll */
  inset: 0;
  z-index: 520;              /* above overlay (500) and close btn (510) */
  display: flex;
  flex-direction: column;
  background: var(--black);
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}
.ap-detail.open {
  opacity: 1;
  pointer-events: all;
}

/* Gallery — full viewport, image centered */
.ap-detail-gallery {
  position: relative;
  overflow: hidden;
  background: var(--black);
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ap-detail-slides {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  transition: transform 0.55s cubic-bezier(0.65,0,0.35,1);
}
.ap-detail-slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ap-detail-slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
/* Slider arrows */
.ap-detail-prev,
.ap-detail-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #0d0d0d;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.75);
  font-family: var(--mono);
  font-size: 1rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  z-index: 5;
  padding: 0;
}
.ap-detail-prev { left: 16px; }
.ap-detail-next { right: 16px; }
.ap-detail-prev:hover,
.ap-detail-next:hover { background: rgba(13,13,13,0.9); color: #fff; }
.ap-detail-prev:disabled,
.ap-detail-next:disabled { opacity: 0.25; pointer-events: none; }
.ap-detail-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}
.ap-detail-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s;
}
/* Invisible 44px touch target */
.ap-detail-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
}
.ap-detail-dot.active {
  background: #fff;
  border-color: #fff;
  transform: scale(1.4);
}

/* Info panel — bottom bar overlaying gallery */
.ap-detail-info {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  padding: 24px clamp(28px, 4vw, 56px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 40vh;
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.07);
}
/* Back button — fixed top-left over gallery */
.ap-detail-back {
  position: fixed;
  top: max(20px, env(safe-area-inset-top, 0px));
  left: max(20px, env(safe-area-inset-left, 0px));
  z-index: 525;
  font-family: var(--mono);
  font-size: 0.73rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  background: #0d0d0d;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 10px 18px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.ap-detail-back:hover { color: #fff; border-color: rgba(255,255,255,0.3); }
/* Header row: big year + function label (mirrors project-slide__header) */
.ap-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}
.ap-detail-num {
  font-family: var(--sans-cond);
  font-weight: 300;
  font-size: clamp(3rem, 6vw, 5rem);
  color: rgba(255,255,255,0.1);
  line-height: 1;
  letter-spacing: -0.03em;
}
.ap-detail-year {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.28);
}
.ap-detail-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  display: block;
  margin-bottom: 0.4rem;
}
.ap-detail-title {
  font-family: var(--sans-cond);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.5vw, 2.2rem);
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 1.5rem;
}
.ap-detail-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1.2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.ap-detail-meta dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  padding-top: 0.15rem;
}
.ap-detail-meta dd {
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255,255,255,0.75);
}
.ap-detail-desc {
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(255,255,255,0.45);
  max-width: 420px;
  margin: 0;
}

@media (max-width: 900px) {
  .ap-detail-desc { max-width: none; }
}

/* Responsive mosaic */
@media (max-width: 1024px) {
  .all-projects-grid { grid-template-columns: repeat(3, 1fr); }
  .all-projects-grid .ap-card:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .all-projects-grid .ap-card:nth-child(4) { grid-column: span 1; }
  .all-projects-grid .ap-card:nth-child(6) { grid-row: span 1; }
  .all-projects-grid .ap-card:nth-child(7) { grid-column: span 1; }

  .featured-grid { grid-template-columns: repeat(3, 1fr); }
  .featured-grid .ap-card { min-height: 220px; }
  .featured-grid .ap-card:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .featured-grid .ap-card:nth-child(5) { grid-column: span 1; }
  .featured-grid .ap-card:nth-child(7) { grid-row: span 1; }
  .featured-grid .ap-card:nth-child(9) { grid-column: span 1; }
  .featured-grid .ap-card:nth-child(11) { grid-column: span 1; }
  .featured-grid .ap-card:nth-child(13) { grid-row: span 1; }
}
@media (max-width: 640px) {
  .all-projects-grid { grid-template-columns: repeat(2, 1fr); gap: 3px; }
  .all-projects-grid .ap-card:nth-child(1) { grid-column: span 2; grid-row: span 1; }
  .all-projects-grid .ap-card { min-height: 160px; }

  .featured-grid { grid-template-columns: 1fr 1fr; gap: 3px; }
  .featured-grid .ap-card { min-height: 150px; }
  .featured-grid .ap-card:nth-child(1) { grid-column: span 2; grid-row: span 1; min-height: 200px; }
  .featured-grid .ap-card:nth-child(5) { grid-column: span 1; }
  .featured-grid .ap-card:nth-child(7) { grid-row: span 1; }
  .featured-grid .ap-card:nth-child(9),
  .featured-grid .ap-card:nth-child(11),
  .featured-grid .ap-card:nth-child(13) { grid-column: span 1; grid-row: span 1; }
}

/* --- SECTIONS --- */
.section {
  position: relative;
  z-index: 10;
}
#o-pracowni {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-start;
}
/* GPU-composited scrub targets */
.about-text > *,
.about-year,
.team-card__photo,
.team-card__info,
.service-item,
.history-cta-wrap {
  will-change: transform, opacity;
  backface-visibility: hidden;
}
.section--light { background: var(--white); }
.section--dark { background: var(--bg-dark); color: var(--white); }
/* ── DZIEDZICTWO: full-screen panel that slides in from left ── */
#dziedzictwo {
  position: fixed;
  inset: 0;
  z-index: 300;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  background-color: var(--bg-dark);
  background-image:
    linear-gradient(rgba(13,13,13,0.88), rgba(13,13,13,0.88)),
    url('/assets/img/zajazd-sadecki-szkic.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  /* starts hidden to the left, JS animates in/out */
  transform: translateX(-100%);
  visibility: hidden;
}
#dziedzictwo .section__inner {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: clamp(40px, 8vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1400px;
}

/* Back button inside the panel */
.founder-back {
  position: fixed;
  top: clamp(20px, 3vw, 32px);
  left: clamp(20px, 3vw, 40px);
  z-index: 302;
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  color: rgba(247,247,245,0.5);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.25s;
}
.founder-back:hover { color: rgba(247,247,245,0.95); }
.founder-back svg { flex-shrink: 0; }
.section--dark-alt { background: var(--bg-dark-alt); color: var(--white); }
#kontakt {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  width: 100%;
  overflow: visible;
}
#kontakt .section__inner {
  max-width: none;
  width: 100%;
  padding: clamp(60px, 9vw, 120px) 15vw;
}

.section__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(60px, 9vw, 120px) var(--pad);
}
/* o-pracowni — comfortable padding for natural scroll */
#o-pracowni .section__inner {
  padding-top: calc(var(--nav-h) + clamp(32px, 4vw, 60px));
  padding-bottom: clamp(40px, 5vw, 80px);
  width: 100%;
}

/* --- ABOUT --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  margin-bottom: clamp(20px, 3vw, 40px);
  position: relative;
  overflow: hidden;
  min-height: clamp(200px, 22vw, 300px);
}
.about-text {
  max-width: 560px;
  position: relative;
  z-index: 1;
  padding-bottom: clamp(24px, 4vw, 48px);
}

/* About tagline — quote style */
.about-tagline {
  font-family: var(--sans-cond);
  font-weight: 700;
  font-size: clamp(1.05rem, 4.2vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--black);
  padding-left: 1.1em;
  border-left: 3px solid var(--black);
  margin-bottom: 1.6rem;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .about-tagline { white-space: normal; }
}

/* About stats row */
.about-stats {
  display: flex;
  gap: clamp(16px, 5vw, 56px);
  margin-top: clamp(20px, 3vw, 32px);
  flex-wrap: nowrap;
  align-items: flex-end;
}
@media (max-width: 768px) {
  .about-stats { justify-content: center; }
}
.about-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
}
.about-stat__value {
  font-family: var(--sans-cond);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--dark);
}
.about-stat--bim .about-stat__value {
  font-family: var(--sans-cond);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
}
.about-stat__label {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* 1960 watermark — in background, behind intro text */
.about-year {
  position: absolute;
  bottom: -0.1em;
  right: -0.03em;
  z-index: 0;
  pointer-events: none;
  line-height: 1;
}
.year-big {
  font-family: var(--sans-cond);
  font-size: clamp(10rem, 26vw, 24rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgba(13, 13, 13, 0.038);
  line-height: 0.88;
  user-select: none;
}

/* --- TEAM --- */
.team-section { margin-top: clamp(40px, 6vw, 80px); }

.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  margin-top: 1.5rem;
}

.team-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: clamp(16px, 2vw, 28px);
  align-items: start;
}

.team-card__photo {
  overflow: hidden;
}
.team-card__photo img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  filter: grayscale(20%);
  transition: filter 0.5s;
}
.team-card {
  transition: transform 0.4s var(--ease);
}
.team-card:hover {
  transform: translateY(-4px);
}
.team-card:hover .team-card__photo img { filter: grayscale(0%); }

/* Mirosław — wyrównanie do lewej + przycięcie z prawej */
.team-card:first-child .team-card__photo img {
  object-position: top left;
}

.team-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}
.team-role {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  display: block;
  margin-bottom: 0.8rem;
}
.team-bio {
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--gray);
}

/* --- FOUNDER --- */
.founder-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: clamp(24px, 4vw, 60px);
  align-items: start;
  max-width: 1400px;
  margin: 0 auto clamp(48px, 6vw, 80px);
}

.founder-photo {
  position: relative;
}
.founder-photo img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  filter: grayscale(50%);
  transition: filter 0.5s;
}
.founder-photo:hover img { filter: grayscale(0%); }
.founder-years {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(247,247,245,0.4);
  display: block;
  margin-top: 0.6rem;
}

.founder-works {
  margin-top: 1.5rem;
  overflow: visible;
  width: calc(100% + 2 * var(--pad));
  margin-left: calc(-1 * var(--pad));
  padding: 0 70px;
  box-sizing: border-box;
}
.founder-works-track {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  overflow: visible;
}
.founder-works-prev,
.founder-works-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.2s, opacity 0.4s;
  padding: 0;
  outline: none;
  user-select: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.founder-works-prev svg,
.founder-works-next svg { transition: transform 0.2s ease; }
.founder-works-prev { left: -58px; }
.founder-works-next { right: -58px; }
.founder-works-prev:hover,
.founder-works-next:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
  transform: scale(1.08);
}
.founder-works-prev:hover svg { transform: translateX(-2px); }
.founder-works-next:hover svg { transform: translateX(2px); }
.founder-works-prev:active,
.founder-works-next:active { transform: scale(0.95); }
.founder-works-prev:disabled,
.founder-works-next:disabled {
  opacity: 0.2 !important;
  pointer-events: none;
  cursor: default;
  pointer-events: none;
  transform: scale(0.8);
}
.founder-works-dots {
  display: none;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
}
.founder-works-counter {
  display: none;
}
.founder-works-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s;
}
/* Invisible 44px touch target */
.founder-works-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
}
.founder-works-dot.active {
  background: #fff;
  border-color: #fff;
  transform: scale(1.4);
}
.founder-works-grid {
  width: 100%;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.founder-works-grid::-webkit-scrollbar { display: none; }
.founder-work {
  flex: 0 0 calc(33.333% - 7px);
  scroll-snap-align: start;
  touch-action: manipulation;
}
.founder-work img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.6s;
}
.founder-work:hover img { filter: grayscale(80%); }
.founder-work-name {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(247,247,245,0.45);
  padding: 0.5rem 0 0.2rem;
}
.founder-work-location {
  color: rgba(247,247,245,0.25);
  font-weight: 400;
}

/* --- FOUNDER PORTFOLIO (full list) --- */
.founder-portfolio {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: clamp(2rem, 4vw, 3rem);
}
.founder-portfolio__heading {
  font-family: var(--font-heading);
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.35);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.founder-portfolio__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem) clamp(2.5rem, 5vw, 5rem);
}
.fp-category {
  padding-bottom: 1.5rem;
  overflow: hidden;
  min-width: 0;
}
.fp-category__name {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fp-category__count {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 400;
  color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  padding: 1px 7px;
  border-radius: 10px;
}
.fp-category__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.fp-category__list li {
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.fp-category__list li:last-child {
  border-bottom: none;
}
.fp-item__name {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}
/* No dotted leader — clean two-column layout */
.fp-category__list li::after {
  display: none;
}
.fp-item__meta {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.22);
  white-space: nowrap;
  margin-left: auto;
  padding-left: 12px;
  transition: color 0.2s;
  text-align: right;
}
.fp-category__list li:hover .fp-item__name {
  color: rgba(255,255,255,0.85);
}
.fp-category__list li:hover .fp-item__meta {
  color: rgba(255,255,255,0.4);
}
.fp-item--linked {
  cursor: pointer;
}
.fp-item--linked .fp-item__name {
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.fp-item--linked:hover .fp-item__name {
  color: #fff;
  border-bottom-color: rgba(255,255,255,0.3);
}
.fp-item--linked:hover .fp-item__meta {
  color: rgba(255,255,255,0.5);
}

@media (max-width: 1200px) {
  .founder-portfolio__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .founder-portfolio__grid {
    grid-template-columns: 1fr;
  }
  .fp-category__list li {
    flex-wrap: wrap;
  }
  .fp-category__list li::after {
    display: none;
  }
  .fp-item__meta {
    width: 100%;
    font-size: 0.62rem;
    margin-top: -2px;
  }
}

/* --- CONTACT --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 70px);
  align-items: start;
  margin-bottom: clamp(40px, 5vw, 60px);
}

.contact-item { margin-bottom: 1.3rem; }
.contact-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(247,247,245,0.25);
  display: block;
  margin-bottom: 0.25rem;
}
.contact-value {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--white);
  transition: opacity 0.2s;
}
a.contact-value:hover { opacity: 0.6; }

.contact-companies {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(247,247,245,0.08);
}
.contact-company { }
.contact-company-name {
  font-family: var(--sans-cond);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(247,247,245,0.55);
  margin-bottom: 1rem;
}
.contact-company .contact-item { margin-bottom: 0.8rem; }
.contact-company .contact-legal {
  margin-top: 0.8rem;
  padding-top: 0;
  border-top: none;
}
.contact-legal {
  margin-top: 1.6rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(247,247,245,0.08);
}
.contact-legal-item {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(247,247,245,0.35);
  display: block;
  line-height: 1.75;
}

/* Contact form */
.form-field {
  position: relative;
  border-bottom: 1px solid rgba(247,247,245,0.12);
  margin-bottom: 0.2rem;
}
.form-field label {
  position: absolute;
  top: 0.95rem;
  left: 0;
  font-family: var(--mono);
  font-size: 0.54rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(247,247,245,0.3);
  transition: all 0.2s;
  pointer-events: none;
}
.form-field input,
.form-field textarea {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  padding: 1.55rem 0 0.5rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 300;
  color: var(--white);
  resize: none;
  -webkit-appearance: none;
  -webkit-border-radius: 0;
}
.form-field textarea { min-height: 80px; }
.form-field input:focus ~ label,
.form-field input:not(:placeholder-shown) ~ label,
.form-field textarea:focus ~ label,
.form-field textarea:not(:placeholder-shown) ~ label {
  top: 0.3rem;
  font-size: 0.54rem;
  opacity: 0.6;
}

.btn-submit {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  background: none;
  border: 1px solid rgba(247,247,245,0.2);
  padding: 0.8rem 2rem;
  margin-top: 1.5rem;
  transition: all 0.3s;
}
.btn-submit:hover {
  background: var(--white);
  color: var(--black);
}
.btn-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.form-status {
  margin-top: 1rem;
  font-size: 0.78rem;
  font-weight: 300;
  min-height: 1.2rem;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s, transform 0.3s;
}
.form-status.success,
.form-status.error {
  opacity: 1;
  transform: translateY(0);
}
.form-status.success { color: #6dbb6d; }
.form-status.error { color: #c75050; }

/* Submit button loading state */
.btn-submit {
  position: relative;
  transition: background 0.3s, opacity 0.3s, color 0.3s;
}
.btn-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.contact-map {
  margin-top: 1rem;
  overflow: hidden;
  border-radius: var(--radius);
}
.contact-map iframe { display: block; filter: grayscale(50%); }

/* --- FOOTER --- */
footer {
  background: var(--black);
  border-top: 1px solid rgba(247,247,245,0.06);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 32px) var(--pad);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.footer-logo {
  height: 18px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.3;
  flex-shrink: 0;
}
.footer-data {
  display: flex;
  gap: 0;
  align-items: center;
  flex-shrink: 1;
  overflow: hidden;
}
.footer-item {
  font-size: 0.72rem;
  font-weight: 300;
  color: rgba(247,247,245,0.3);
  padding: 0 clamp(10px, 1.5vw, 20px);
  border-left: 1px solid rgba(247,247,245,0.08);
  white-space: nowrap;
}
.footer-item:first-child { border-left: none; padding-left: 0; }

.footer-copy {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(247,247,245,0.35);
  white-space: nowrap;
}

/* --- PROJECT DESCRIPTION MODAL (mobile bottom-sheet) --- */
.desc-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13,13,13,0.7);
  z-index: 600;
  align-items: flex-end;
}
.desc-modal-overlay.open { display: flex; }
.desc-modal {
  background: var(--white);
  width: 100%;
  max-height: 72vh;
  overflow-y: auto;
  padding: 20px var(--pad-sm) 40px;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -8px 40px rgba(13,13,13,0.18);
}
.desc-modal__handle {
  display: block;
  width: 40px;
  height: 4px;
  background: var(--gray-light);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  margin: 0 auto 24px;
  padding: 0;
  background-color: var(--gray-light);
}
.desc-modal__title {
  font-family: var(--sans-cond);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--black);
  margin-bottom: 1rem;
}
.desc-modal__text {
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(13,13,13,0.6);
}

/* Description overlay: hidden on desktop, shown by media query below */
.project-slide__desc-overlay { display: none; }

/* --- REVEAL ANIMATIONS (base state, animated by GSAP) --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
}

/* --- 2K+ screens: larger passe-partout --- */
@media (min-width: 2000px) {
  .projects-container { --passe: 200px; }
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .projects-container { --passe: 60px; }

  /* Image fills most of card, info strip at bottom */
  .project-slide {
    display: flex;
    flex-direction: column;
  }
  .project-slide__image {
    flex: 1;
    min-height: 0;
    cursor: pointer;
    overflow: hidden;
    background: var(--black);
  }
  .project-slide__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(10%);
  }
  .project-slide__info {
    flex: none;
    position: static;
    transform: none;
    transition: none;
    background: var(--white);
    padding: 14px var(--pad-sm) 16px;
    overflow-y: hidden;
    color: var(--black);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .project-slide__info .project-num  { font-size: 1.8rem; }
  .project-slide__info .project-name { font-size: 0.95rem; margin-bottom: 0.5rem; }
  .project-slide__info .project-meta { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
  .project-slide__info .project-desc,
  .project-slide__info .project-read-more { display: none; }

  /* Description overlay — appears on image when tapped */
  .project-slide__desc-overlay {
    display: flex;
    flex-direction: column;
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    padding: 28px;
    z-index: 4;
    opacity: 0;
    pointer-events: none;
    transition: background 0.4s ease, opacity 0.35s ease;
    overflow-y: auto;
  }
  .project-slide--info-open .project-slide__desc-overlay {
    background: rgba(0,0,0,0.72);
    opacity: 1;
    pointer-events: auto;
  }
  .project-slide__desc-text {
    margin: auto;
    color: rgba(255,255,255,0.92);
    font-size: 0.88rem;
    line-height: 1.8;
    font-weight: 300;
    font-family: var(--sans);
  }
  .project-read-more { display: none; }

  /* Wskazówka "dotknij po opis" na obrazie projektu */
  .project-slide__image::after {
    content: 'i';
    position: absolute;
    top: 14px;
    right: 14px;
    width: 22px;
    height: 22px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(0,0,0,0.28);
    color: rgba(255,255,255,0.55);
    font-family: var(--sans);
    font-size: 0.72rem;
    font-style: italic;
    pointer-events: none;
    z-index: 4;
  }
  .project-slide--info-open .project-slide__image::after { display: none; }

  .team-card {
    grid-template-columns: 120px 1fr;
  }
  .founder-grid { grid-template-columns: 120px 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .projects-container { --passe: 0px; touch-action: none; }
  /* touch-action does NOT inherit — set explicitly on cards and image area */
  .project-slide,
  .project-slide__image,
  .slide-gallery-track { touch-action: none; }

  /* Card inset: trigger occupies bottom 72px — card ends exactly at trigger top, zero overlap */
  .project-slide {
    top: calc(var(--nav-h) + 12px);
    left: 12px;
    right: 12px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  /* Trigger fills bottom 72px of container; button is vertically centered in visible area */
  .all-projects-trigger {
    position: absolute;
    bottom: env(safe-area-inset-bottom, 0px);
    left: 0;
    right: 0;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    pointer-events: none; /* touch passes through to container → e.preventDefault() works */
  }
  #btn-all-projects {        /* smaller on mobile */
    padding: 8px 20px;
    font-size: 0.68rem;
    pointer-events: auto; /* button itself stays clickable */
  }

  /* Hero: ukryj video, pokaż statyczny obraz */
  .hero-bg video { display: none; }
  .hero-img { display: block; }

  /* Image fills the entire card — overlay layout */
  .project-slide__image {
    position: absolute !important;
    inset: 0;
    height: 100% !important;
    flex: none !important;
    background: var(--black);
  }
  .project-slide__image img { width: 100%; height: 100%; object-fit: cover; }

  /* Info panel: gradient overlay pinned to bottom of card */
  .project-slide__info {
    position: absolute !important;
    bottom: 0; left: 0; right: 0;
    flex: none !important;
    background: linear-gradient(to top, rgba(13,13,13,0.92) 0%, rgba(13,13,13,0.55) 50%, transparent 100%);
    padding: 52px 20px 22px;
    justify-content: flex-end;
    color: var(--white);
    overflow: visible;
  }
  .project-slide__info .project-num  { color: rgba(255,255,255,0.38); font-size: 1.35rem; }
  .project-slide__info .project-name { color: #fff; font-size: 1.05rem; margin-bottom: 0.2rem; }
  .project-slide__info .project-meta { display: none; }

  /* Gallery arrows: always visible on touch (no hover state on mobile) */
  .slide-gallery-prev,
  .slide-gallery-next { opacity: 0.72; }

  /* Swipe up/down hint chevrons — pulse 3× then fade */
  .project-slide::before,
  .project-slide::after {
    content: '';
    position: absolute;
    right: 18px;
    width: 10px; height: 10px;
    border-right: 2px solid rgba(255,255,255,0.7);
    z-index: 20;
    pointer-events: none;
    animation: cardSwipeHint 2s ease-in-out 3 forwards;
  }
  .project-slide::before {
    top: calc(50% - 22px);
    border-top: 2px solid rgba(255,255,255,0.7);
    transform: rotate(-45deg); /* ↑ */
    animation-delay: 0s;
  }
  .project-slide::after {
    top: calc(50% + 10px);
    border-bottom: 2px solid rgba(255,255,255,0.7);
    transform: rotate(45deg); /* ↓ */
    animation-delay: 0.15s;
  }
  @keyframes cardSwipeHint {
    0%, 75%, 100% { opacity: 0; }
    37%           { opacity: 0.8; }
  }

  /* Content at top, not vertically centered */
  #o-pracowni { align-items: flex-start; }

  /* "Od 1960" closer to main title on mobile */
  .htxt-layer-b { margin-top: 0.35rem; }

  .projects-progress { display: none; }

  .about-year { display: none; }

  .team-grid { grid-template-columns: 1fr; }
  .team-card { grid-template-columns: 100px 1fr; }

  .founder-grid {
    grid-template-columns: 100px 1fr;
  }
  .founder-photo {
    grid-column: 1;
    grid-row: 1;
  }
  .founder-info {
    display: contents;
  }
  .founder-info .heading-lg {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }
  .founder-info .founder-bio,
  .founder-info .founder-bio-more,
  .founder-info .btn-text {
    grid-column: 1 / -1;
  }
  .founder-info .label { display: none; }
  /* Extra breathing room under nav bar when Zenon section opens */
  #dziedzictwo .section__inner { padding-top: calc(var(--nav-h) + 28px); }
  /* Karuzela realizacji Zenona: swipe + kropki na mobile */
  .founder-works {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    padding: 0;
  }
  .founder-works-prev,
  .founder-works-next { display: none; }
  .founder-works-track {
    gap: 0;
  }
  .founder-works-grid {
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0;
    gap: 0;
    overflow-x: scroll;
  }
  .founder-work {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
  .founder-works-dots {
    display: flex;
  }
  .founder-works-counter {
    display: flex;
    justify-content: center;
    margin-top: 12px;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.4);
  }
  .founder-works-counter .fw-current {
    color: rgba(255,255,255,0.85);
  }

  #kontakt { align-items: flex-start; }
  #kontakt .section__inner {
    padding: calc(var(--nav-h) + 32px) var(--pad) clamp(40px, 6vw, 80px);
  }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-companies { grid-template-columns: 1fr; }

  .all-projects-grid { grid-template-columns: 1fr 1fr; }

  /* All projects overlay: scrollable on iOS + hide close button (swipe to close instead) */
  .all-projects-overlay { overflow-y: scroll; -webkit-overflow-scrolling: touch; }
  .all-projects-close { display: none; }

  /* Expanded card: close button → compact circle over image */
  .ap-expanded-wrapper .ap-expanded-info__top .ap-new-detail__close {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 520;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 0;
    letter-spacing: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
  }
  .ap-expanded-wrapper .close-label { display: none; }
  .ap-expanded-info__top {
    justify-content: flex-start;
  }
  .ap-expanded-info {
    padding: 14px 16px;
    gap: 4px;
  }
  .ap-expanded-info__title {
    font-size: 1.05rem;
  }
  .ap-expanded-info__desc {
    font-size: 0.75rem;
    line-height: 1.5;
  }

  /* Detail view: stacked on mobile */
  .ap-detail {
    overflow-y: auto;
  }
  .ap-detail-gallery {
    min-height: 40vh;
    background: var(--black);
  }
  .ap-detail-info {
    justify-content: flex-start;
    padding: 20px var(--pad) 52px;
    max-height: none;
  }
  .ap-detail-desc { max-width: none; }
  /* Back button hidden on mobile — swipe left to close */
  .ap-detail-back { display: none; }

  .footer-data { display: none; }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(1.8rem, 8vw, 3rem);
  }
  .all-projects-grid { grid-template-columns: 1fr; }
}

/* --- HERO SCROLL --- */
.hero-scroll {
  position: absolute;
  bottom: clamp(28px, 5vh, 52px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 3;
  color: rgba(247,247,245,0.45);
  text-decoration: none;
  transition: color 0.3s;
  pointer-events: auto;
}
.hero-scroll:hover { color: rgba(247,247,245,0.85); }
.hero-scroll-label {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero-scroll-arrow {
  display: block;
  width: 10px;
  height: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  animation: scrollBounce 2.4s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translate(-3px, -3px); opacity: 0.35; }
  50%       { transform: rotate(45deg) translate(3px, 3px);  opacity: 1;    }
}

/* --- SERVICES ACCORDION (wewnątrz sekcji o pracowni) --- */
.services-block {
  margin-top: clamp(10px, 1.2vw, 16px);
  padding-top: clamp(8px, 1vw, 12px);
}
.services-list {
  margin-top: clamp(12px, 1.6vw, 20px);
  display: flex;
  gap: clamp(20px, 4vw, 56px);
}
.services-col {
  flex: 1;
  min-width: 0;
}
@media (max-width: 560px) {
  .services-list { flex-direction: column; gap: 0; }
}
.service-item {
  border-top: 1px solid var(--gray-light);
}
.services-col .service-item:last-child { border-bottom: 1px solid var(--gray-light); }
/* Trigger button */
.service-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: clamp(10px, 1.2vw, 14px) 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: inherit;
  outline: none;
  transition: color 0.25s;
}
.service-trigger:disabled { cursor: default; }
.service-trigger:hover:not(:disabled) .service-name { color: var(--gray); }
.service-trigger:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: -2px;
}
.service-icon {
  width: 1.6rem; height: 1.6rem;
  object-fit: contain; flex-shrink: 0;
  filter: grayscale(100%); opacity: 0.6;
  transition: all 0.25s;
}
.service-trigger:hover .service-icon { filter: grayscale(0%); opacity: 1; }
.service-num {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--gray);
  letter-spacing: 0.06em;
  flex-shrink: 0;
  width: 1.6rem;
  padding-top: 0.15em;
}
.service-name {
  flex: 1;
  font-family: var(--sans-cond);
  font-size: clamp(0.82rem, 1.15vw, 1.05rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--black);
  transition: color 0.25s;
  margin: 0;
}
/* Arrow */
.service-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  color: var(--gray);
  transition: transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94), color 0.25s;
}
.service-item.is-open .service-arrow {
  transform: rotate(180deg);
  color: var(--black);
}
/* Body (collapsed by default) */
.service-body {
  overflow: hidden;
  height: 0;
}
.service-body p {
  padding: 0 0 clamp(12px, 1.4vw, 18px) calc(1.6rem + 10px);
  margin: 0;
  font-size: clamp(0.78rem, 0.95vw, 0.88rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--gray);
}

/* --- Facebook w kontakcie --- */
.contact-social-icon {
  display: flex;
  align-items: center;
  color: var(--white);
  opacity: 0.7;
  transition: opacity 0.2s;
  margin-top: 2px;
}
.contact-social-icon:hover { opacity: 1; }

/* --- FOCUS STYLES (keyboard navigation) --- */
:focus:not(:focus-visible) { outline: none; }
*:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 2px;
}
nav.scrolled *:focus-visible {
  outline-color: var(--black);
}
/* Dark-background contexts: white outline */
.section--dark *:focus-visible,
.section--dark-alt *:focus-visible,
#hero *:focus-visible,
.mobile-menu *:focus-visible,
.all-projects-overlay *:focus-visible,
.ap-detail *:focus-visible {
  outline-color: var(--white);
}

/* --- SCREEN READER ONLY --- */
.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;
}

/* --- PREFERS-REDUCED-MOTION --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-bg video { display: none; }
  .hero-bg img { display: block !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
