/*
 * Strona zbiorcza i przyszłe podstrony realizacji klientów.
 * Każdy projekt może korzystać ze wspólnej siatki kart, galerii i metryki,
 * ale przechowuje własny dokument oraz obrazy w odrębnym katalogu.
 */
.customer-projects-page .page-intro {
  overflow:hidden;
  background:
    radial-gradient(circle at 86% 18%,rgba(185,201,156,.42),transparent 30%),
    linear-gradient(145deg,#ece9df,#f8f6ef)
}

.customer-projects-page .page-intro::before {
  content:"REALIZACJE";
  position:absolute;
  right:-.04em;
  bottom:-.28em;
  color:rgba(23,56,43,.045);
  font-family:var(--serif);
  font-size:clamp(4.5rem,14vw,11rem);
  letter-spacing:-.07em;
  line-height:1;
  pointer-events:none;
  white-space:nowrap
}

.customer-projects-page .page-intro>* { position:relative;z-index:1 }
.customer-projects-page .page-intro h1 { max-width:14ch }

.customer-projects-heading {
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:32px;
  margin-bottom:30px;
  padding-bottom:24px;
  border-bottom:1px solid var(--line)
}

.customer-projects-heading h2 { max-width:16ch }
.customer-projects-heading>p { max-width:52ch;color:var(--muted) }

.customer-projects-empty {
  position:relative;
  display:grid;
  min-height:330px;
  place-items:center;
  overflow:hidden;
  padding:clamp(34px,6vw,74px);
  border:1px dashed var(--line-strong);
  border-radius:var(--radius-lg);
  background:linear-gradient(145deg,var(--surface),#eeece3);
  text-align:center
}

.customer-projects-empty::before,
.customer-projects-empty::after {
  content:"";
  position:absolute;
  width:240px;
  height:240px;
  border:1px solid rgba(23,56,43,.08);
  border-radius:50%;
  pointer-events:none
}

.customer-projects-empty::before { top:-130px;right:-70px }
.customer-projects-empty::after { bottom:-160px;left:-80px }
.customer-projects-empty>div { position:relative;z-index:1;max-width:690px }
.customer-projects-empty-mark { display:block;margin-bottom:18px;color:var(--accent-deep);font-size:2.2rem }
.customer-projects-empty h3 { margin-bottom:14px;font-family:var(--serif);font-size:clamp(1.7rem,3vw,2.35rem) }
.customer-projects-empty p { margin-inline:auto;color:var(--muted) }
.customer-projects-empty .button { margin-top:24px }

/* Gotowe wzorce dla kart i galerii pojawią się po dodaniu pierwszego projektu. */
.customer-project-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:26px }
.customer-project-card { overflow:hidden;border:1px solid var(--line);border-radius:var(--radius-md);background:var(--surface);box-shadow:var(--shadow-sm);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease }
.customer-project-card:hover { transform:translateY(-3px);border-color:var(--line-strong);box-shadow:var(--shadow-md) }
.customer-project-card-image { display:block;overflow:hidden;background:var(--cream) }
.customer-project-card img { width:100%;aspect-ratio:4/3;object-fit:cover;background:var(--cream);transition:transform .35s ease }
.customer-project-card:hover img { transform:scale(1.02) }
.customer-project-card-content { padding:24px }
.customer-project-card-content h2,.customer-project-card-content h3 { margin-bottom:12px }
.customer-project-card-content p { color:var(--muted) }
.customer-project-card-meta { display:block;margin-bottom:12px;color:var(--accent-deep);font-size:.68rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase }
.customer-project-card-content .text-link { display:inline-flex;margin-top:18px }
.customer-project-viewer { display:grid;gap:18px }
.customer-project-viewer-stage { position:relative;display:grid;aspect-ratio:4/3;place-items:center;overflow:hidden;border-radius:var(--radius-lg);background:#10251d;box-shadow:var(--shadow-md);touch-action:pan-y }
.customer-project-viewer-main { display:grid;width:100%;height:100%;place-items:center;background:#10251d }
.customer-project-viewer-main img { width:100%;height:100%;object-fit:contain }
.customer-project-viewer-control { position:absolute;z-index:2;top:50%;display:grid;width:52px;height:52px;place-items:center;transform:translateY(-50%);border:1px solid rgba(255,255,255,.38);border-radius:50%;background:rgba(16,37,29,.78);box-shadow:0 8px 24px rgba(0,0,0,.2);color:#fff;font-size:1.65rem;line-height:1;pointer-events:auto;touch-action:manipulation;backdrop-filter:blur(6px);transition:background-color .18s ease,transform .18s ease }
.customer-project-viewer-control:hover { transform:translateY(-50%) scale(1.04);background:rgba(255,254,250,.94);color:var(--ink) }
.customer-project-viewer-control:focus-visible { outline-color:#fff }
.customer-project-viewer-control[hidden] { display:none }
.customer-project-viewer-previous { left:18px }
.customer-project-viewer-next { right:18px }
.customer-project-viewer-control-label { position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap }
.customer-project-viewer-meta { display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:18px;align-items:center;padding:0 4px }
.customer-project-viewer-count { color:var(--ink);font-size:.76rem;font-weight:800;letter-spacing:.08em;white-space:nowrap }
.customer-project-viewer-caption { min-width:0;color:var(--muted);font-size:.84rem;line-height:1.5 }
.customer-project-viewer-open { color:var(--ink);font-size:.8rem;font-weight:700;text-underline-offset:4px;white-space:nowrap }
.customer-project-gallery-thumbnails { display:grid;grid-auto-columns:112px;grid-auto-flow:column;gap:10px;max-width:100%;padding:4px 4px 12px;overflow-x:auto;scroll-padding-inline:4px;scroll-snap-type:x proximity;scrollbar-color:var(--accent-deep) var(--cream) }
.customer-project-gallery-thumbnail { position:relative;display:block;overflow:hidden;border:2px solid transparent;border-radius:12px;background:var(--cream);scroll-snap-align:center }
.customer-project-gallery-thumbnail img { width:100%;height:88px;object-fit:cover;opacity:.72;transition:opacity .18s ease,transform .18s ease }
.customer-project-gallery-thumbnail:hover img,.customer-project-gallery-thumbnail[aria-current="true"] img { opacity:1 }
.customer-project-gallery-thumbnail:hover img { transform:scale(1.03) }
.customer-project-gallery-thumbnail[aria-current="true"] { border-color:var(--ink);box-shadow:0 0 0 2px var(--paper),0 0 0 4px var(--ink) }
.customer-project-gallery-thumbnail:focus-visible { outline:3px solid #9b7236;outline-offset:2px }
.customer-project-gallery-number { position:absolute;z-index:1;right:5px;bottom:5px;display:grid;min-width:25px;height:22px;place-items:center;border-radius:999px;background:rgba(16,37,29,.82);color:#fff;font-size:.62rem;font-weight:800 }
.customer-project-facts { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--line);border-radius:var(--radius-md);background:var(--surface) }
.customer-project-facts>div { padding:22px;border-left:1px solid var(--line) }
.customer-project-facts>div:first-child { border-left:0 }
.customer-project-facts dt { margin-bottom:8px;color:var(--accent-deep);font-size:.68rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase }
.customer-project-facts dd { margin:0;color:var(--ink);font-family:var(--serif);font-size:1.25rem;line-height:1.3 }

.customer-project-detail-page .page-intro h1 { max-width:17ch }
.customer-project-back { display:inline-flex;margin-bottom:22px;color:var(--ink);font-size:.82rem;font-weight:700;text-decoration:none }
.customer-project-back:hover { text-decoration:underline;text-underline-offset:4px }
.customer-project-hero { max-width:900px;margin-bottom:clamp(44px,7vw,82px) }
.customer-project-hero figure { margin:0 }
.customer-project-hero img { width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:var(--radius-lg);background:var(--cream);box-shadow:var(--shadow-md) }
.customer-project-hero figcaption { max-width:70ch;margin:13px 6px 0;color:var(--muted);font-size:.78rem }
.customer-project-story { display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:clamp(32px,6vw,80px);align-items:start }
.customer-project-story h2 { margin-bottom:22px }
.customer-project-story-copy p { line-height:1.8 }
.customer-project-story-copy p+p { margin-top:18px }
.customer-project-story img { width:min(100%,420px);justify-self:center;object-fit:cover;border-radius:var(--radius-lg);background:var(--cream);box-shadow:var(--shadow-md) }
.customer-project-gallery-heading { max-width:760px;margin-bottom:30px }
.customer-project-gallery-heading h2 { margin-bottom:14px }
.customer-project-gallery-heading p { color:var(--muted) }
.customer-project-detail-page .customer-project-viewer { max-width:820px;margin-inline:auto }

@media(max-width:850px) {
  .customer-projects-heading { align-items:flex-start;flex-direction:column }
  .customer-projects-heading h2 { max-width:none }
  .customer-project-grid,.customer-project-story { grid-template-columns:1fr }
}

@media(max-width:620px) {
  .customer-projects-page .page-intro::before { font-size:4.3rem }
  .customer-projects-empty { min-height:300px;padding:34px 22px }
  .customer-project-facts { grid-template-columns:1fr }
  .customer-project-facts>div { border-top:1px solid var(--line);border-left:0 }
  .customer-project-facts>div:first-child { border-top:0 }
  .customer-project-viewer-stage { aspect-ratio:1/1 }
  .customer-project-viewer-control { width:44px;height:44px;font-size:1.4rem }
  .customer-project-viewer-previous { left:10px }
  .customer-project-viewer-next { right:10px }
  .customer-project-viewer-meta { grid-template-columns:auto 1fr;gap:8px 14px }
  .customer-project-viewer-open { grid-column:1/-1;width:max-content }
  .customer-project-gallery-thumbnails { grid-auto-columns:88px }
  .customer-project-gallery-thumbnail img { height:72px }
}
