/* =========================================================
   ppdesign — Piotr Nowak
   ========================================================= */

:root {
  --bg: #f4f1ec;
  --surface: #ebe6de;
  --ink: #1d1c1a;
  --ink-soft: #3a3833;
  --muted: #6e685f;
  --line: #d9d2c6;
  --accent: #9a6b4f;
  --accent-soft: #c49a7c;
  --dark: #1b1a18;
  --dark-line: #3a3833;
  --light: #f4f1ec;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(72px, 11vw, 160px);
  --radius: 2px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --intro: 1.5s;
}
.no-intro { --intro: .15s; }

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
  overflow-x: hidden;
}
body.menu-open, body.modal-open { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }
em { font-style: italic; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--light); padding: 10px 16px; text-decoration: none;
}
.skip:focus { top: 16px; }

.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }

.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 18px;
  display: flex; align-items: center; gap: 14px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.eyebrow--light { color: var(--accent-soft); }

.section-title {
  font-family: var(--serif);
  font-size: clamp(42px, 6vw, 84px);
  line-height: 1;
  letter-spacing: -.01em;
}
.section-title em { color: var(--accent); }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px;
  flex-wrap: wrap; margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head--stack { display: block; }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 30px; border: 1px solid transparent; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; transition: background .3s, color .3s, border-color .3s;
}
.btn--light { background: var(--light); color: var(--ink); }
.btn--light:hover { background: var(--accent-soft); }
.btn--ghost-light { border-color: rgba(244,241,236,.5); color: var(--light); }
.btn--ghost-light:hover { background: rgba(244,241,236,.12); border-color: var(--light); }
.btn--dark { background: var(--ink); color: var(--light); }
.btn--dark:hover { background: var(--accent); }
.btn--block { width: 100%; }

/* ---------- Nagłówek ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  color: var(--light);
  transition: background .35s, color .35s, box-shadow .35s, transform .45s var(--ease);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header.is-solid {
  background: rgba(244,241,236,.94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 84px; }

.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; position: relative; z-index: 2; }
.logo-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid currentColor;
  font-family: var(--serif); font-size: 22px; font-style: italic; line-height: 1;
  padding-bottom: 4px;
}
.logo-text { font-family: var(--serif); font-size: 24px; line-height: 1; display: flex; flex-direction: column; }
.logo-text small {
  font-family: var(--sans); font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  margin-top: 5px; opacity: .75;
}

.nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); }
.nav a {
  font-size: 13px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; position: relative; padding: 6px 0;
}
.nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease);
}
.nav a:not(.nav-cta):hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { border: 1px solid currentColor; padding: 10px 18px !important; transition: background .3s, color .3s; }
.nav-cta:hover { background: var(--ink); color: var(--light); border-color: var(--ink); }
.site-header:not(.is-solid) .nav-cta:hover { background: var(--light); color: var(--ink); border-color: var(--light); }

.nav-toggle {
  display: none; width: 44px; height: 44px; background: none; border: 0; position: relative; z-index: 2;
}
.nav-toggle span {
  position: absolute; left: 10px; right: 10px; height: 1.5px; background: currentColor;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 26px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 28px;
    background: var(--dark); color: var(--light);
    opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
  }
  .nav a { font-family: var(--serif); font-size: 34px; letter-spacing: 0; text-transform: none; }
  .nav-cta { font-family: var(--sans) !important; font-size: 13px !important; letter-spacing: .12em !important; text-transform: uppercase !important; margin-top: 12px; }
  .menu-open .nav { opacity: 1; visibility: visible; }
  .menu-open .site-header { color: var(--light); background: transparent; box-shadow: none; }
  .menu-open .nav-toggle span:first-child { top: 21px; transform: rotate(45deg); }
  .menu-open .nav-toggle span:last-child { top: 21px; transform: rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  color: var(--light); background: var(--dark); overflow: hidden;
}
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  animation: heroZoom 12s var(--ease) calc(var(--intro) - .4s) both;
}
@keyframes heroZoom { from { scale: 1.14; } to { scale: 1; } }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,19,17,.55) 0%, rgba(20,19,17,0) 28%),
    linear-gradient(90deg, rgba(20,19,17,.7) 0%, rgba(20,19,17,.25) 55%, rgba(20,19,17,0) 75%),
    linear-gradient(0deg, rgba(20,19,17,.85) 0%, rgba(20,19,17,.3) 50%, rgba(20,19,17,.1) 80%);
}
.hero-content { position: relative; padding-top: 120px; padding-bottom: clamp(56px, 9vw, 110px); }
.hero-title {
  font-family: var(--serif);
  font-size: clamp(44px, min(8.4vw, 12.5vh), 132px);
  line-height: .95; letter-spacing: -.02em;
}
.hero-title em { color: #e6cdb6; }
.hero-bottom {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap;
  margin-top: clamp(28px, 4vw, 48px);
  animation: rise 1.1s var(--ease) calc(var(--intro) + .5s) both;
}
.hero-lead { max-width: 46ch; margin: 0; color: rgba(244,241,236,.85); font-size: clamp(15px, 1.3vw, 17px); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .eyebrow { animation: rise 1s var(--ease) var(--intro) both; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

.scroll-cue {
  position: absolute; left: 50%; bottom: 22px; width: 22px; height: 36px; margin-left: -11px;
  border: 1px solid rgba(244,241,236,.5); border-radius: 12px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 7px; width: 2px; height: 7px; margin-left: -1px;
  background: var(--light); border-radius: 2px; animation: cue 1.8s infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
@media (max-width: 700px) { .scroll-cue { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .hero-img, .hero-title, .hero-bottom, .hero .eyebrow, .scroll-cue span { animation: none; }
}

/* ---------- Manifest ---------- */
.manifest { padding: var(--section) 0 calc(var(--section) * .7); border-bottom: 1px solid var(--line); }
.manifest-text {
  font-family: var(--serif);
  font-size: clamp(28px, 3.6vw, 52px);
  line-height: 1.2; max-width: 30ch; margin: 0;
}
.manifest-text em { color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border-top: 1px solid var(--line); }
.stat { padding: 28px 24px 0 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat dt { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stat dd { order: -1; margin: 0 0 6px; font-family: var(--serif); font-size: clamp(44px, 5vw, 72px); line-height: 1; }
.stat { display: flex; flex-direction: column; }
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 28px; }
}

/* ---------- Projekty ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  background: none; border: 1px solid var(--line); border-radius: 40px;
  padding: 9px 18px; font-size: 13px; font-weight: 500; letter-spacing: .04em; color: var(--ink-soft);
  transition: background .25s, color .25s, border-color .25s;
}
.filter:hover { border-color: var(--ink); }
.filter.is-active { background: var(--ink); color: var(--light); border-color: var(--ink); }

.project-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(40px, 5vw, 72px) clamp(20px, 3vw, 40px);
}
.project-card--wide { grid-column: 1 / -1; }
.project-grid.is-filtered .project-card--wide { grid-column: auto; }
.project-card[hidden] { display: none; }
.project-card { animation: fadeIn .5s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.project-link { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; }
.project-img { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface); }
.project-card--wide .project-img { aspect-ratio: 21 / 9; }
.project-grid.is-filtered .project-card--wide .project-img { aspect-ratio: 4 / 3; }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.project-more {
  position: absolute; left: 20px; bottom: 20px;
  background: var(--light); color: var(--ink);
  padding: 10px 16px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  opacity: 0; transform: translateY(10px); transition: opacity .4s, transform .4s var(--ease);
}
.project-link:hover .project-img img, .project-link:focus-visible .project-img img { transform: scale(1.05); }
.project-link:hover .project-more, .project-link:focus-visible .project-more { opacity: 1; transform: none; }

.project-caption { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 18px; flex-wrap: wrap; }
.project-caption h3 { font-family: var(--serif); font-size: clamp(26px, 2.6vw, 36px); line-height: 1.1; }
.project-caption p { margin: 0; font-size: 13px; color: var(--muted); letter-spacing: .04em; }

@media (max-width: 700px) {
  .project-grid { grid-template-columns: 1fr; }
  .project-card--wide .project-img { aspect-ratio: 4 / 3; }
  .project-more { opacity: 1; transform: none; }
}

/* ---------- O mnie ---------- */
.about { background: var(--surface); }
.about-inner { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 7vw, 120px); align-items: center; }
.about-media { margin: 0; position: relative; }
.about-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about-media figcaption {
  position: absolute; right: -1px; bottom: -1px; background: var(--surface);
  padding: 12px 18px 0 18px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.about-text .section-title { margin-bottom: 32px; }
.about-text > p { max-width: 56ch; color: var(--ink-soft); }
.about-points { list-style: none; padding: 0; margin: 32px 0; border-top: 1px solid var(--line); }
.about-points li { padding: 16px 0 16px 34px; border-bottom: 1px solid var(--line); position: relative; color: var(--ink-soft); }
.about-points li::before {
  content: ""; position: absolute; left: 0; top: 28px; width: 18px; height: 1px; background: var(--accent);
}
.about-points strong { color: var(--ink); font-weight: 600; }
.signature { font-family: var(--serif); font-style: italic; font-size: 38px; color: var(--accent); margin: 0; }
@media (max-width: 900px) {
  .about-inner { grid-template-columns: 1fr; }
  .about-media img { aspect-ratio: 4 / 3; }
}

/* ---------- Usługi ---------- */
.service-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.service {
  padding: 40px 32px 48px 0; border-bottom: 1px solid var(--line);
  transition: background .4s;
}
.service:not(:nth-child(3n+1)) { padding-left: 32px; border-left: 1px solid var(--line); }
.service-num { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--accent); }
.service h3 { font-family: var(--serif); font-size: clamp(26px, 2.4vw, 34px); line-height: 1.1; margin: 20px 0 14px; }
.service p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 960px) {
  .service-list { grid-template-columns: 1fr 1fr; }
  .service:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .service:nth-child(even) { padding-left: 32px; border-left: 1px solid var(--line); }
}
@media (max-width: 620px) {
  .service-list { grid-template-columns: 1fr; }
  .service:nth-child(even) { padding-left: 0; border-left: 0; }
  .service { padding: 32px 0; }
}

/* ---------- Detal ---------- */
.details { padding-top: 0; }
.details-inner { display: grid; grid-template-columns: 4fr 7fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.details-text .section-title { margin-bottom: 28px; }
.details-text > p { color: var(--ink-soft); max-width: 44ch; }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.details-grid figure { margin: 0; background: #e2e0dc; overflow: hidden; }
.details-grid figure:nth-child(even) { transform: translateY(40px); }
.details-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 1s var(--ease); }
.details-grid figure:hover img { transform: scale(1.05); }
.details-grid figcaption {
  padding: 12px 16px; background: var(--bg); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.js-reveal .details-grid figure:nth-child(even).reveal { transform: translateY(72px); }
.js-reveal .details-grid figure:nth-child(even).reveal.is-visible { transform: translateY(40px); }
@media (max-width: 900px) {
  .details-inner { grid-template-columns: 1fr; }
  .details-grid { padding-bottom: 40px; }
}

/* ---------- Proces ---------- */
.process { background: var(--dark); color: var(--light); }
.process .eyebrow { color: var(--accent-soft); }
.process .section-title em { color: #e6cdb6; }
.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
  counter-reset: step;
}
.step { padding: 0 24px 0 0; position: relative; display: flex; flex-direction: column; }
.step::before {
  content: ""; display: block; height: 1px; background: var(--dark-line); margin: 0 -24px 28px 0;
}
.step:last-child::before { margin-right: 0; }
.step-num {
  position: absolute; top: -18px; left: 0;
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--dark); border: 1px solid var(--accent-soft); border-radius: 50%;
  font-family: var(--serif); font-size: 18px; color: var(--accent-soft);
}
.step h3 { font-family: var(--serif); font-size: 28px; line-height: 1.15; margin: 20px 0 12px; }
.step p { color: rgba(244,241,236,.68); font-size: 15px; flex: 1; }
.step-time { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-soft); }
@media (max-width: 1000px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .step { padding: 0 0 36px 64px; }
  .step::before { position: absolute; left: 17px; top: 0; bottom: 0; width: 1px; height: auto; margin: 0; }
  .step:last-child::before { display: none; }
  .step-num { top: 0; }
  .step h3 { margin-top: 0; }
}

/* ---------- Opinie ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }
.quote { margin: 0; padding: 40px 32px; background: var(--surface); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.quote blockquote { margin: 0; font-family: var(--serif); font-size: clamp(21px, 1.9vw, 25px); line-height: 1.35; }
.quote figcaption { display: flex; flex-direction: column; font-size: 14px; }
.quote figcaption strong { font-weight: 600; }
.quote figcaption span { color: var(--muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
@media (max-width: 900px) { .quotes { grid-template-columns: 1fr; } }

/* ---------- Kontakt ---------- */
.contact { background: var(--dark); color: var(--light); }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 8vw, 128px); }
.contact .section-title { margin-bottom: 28px; }
.contact .section-title em { color: #e6cdb6; }
.contact-info > p { color: rgba(244,241,236,.72); max-width: 44ch; }
.contact-list { list-style: none; padding: 0; margin: 40px 0 0; }
.contact-list li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--dark-line); }
.contact-list span { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-soft); padding-top: 3px; }
.contact-list a { text-decoration: none; font-size: 17px; }
.contact-list a:hover { color: var(--accent-soft); }
.contact-list p { margin: 0; color: rgba(244,241,236,.72); }

.contact-form { display: flex; flex-direction: column; gap: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(244,241,236,.72); }
.field label small { text-transform: none; letter-spacing: 0; opacity: .7; }
.field input, .field select, .field textarea {
  width: 100%; background: transparent; color: var(--light);
  border: 0; border-bottom: 1px solid var(--dark-line); border-radius: 0;
  padding: 10px 0; font: inherit; font-size: 17px;
  transition: border-color .25s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field select { padding-right: 24px; text-overflow: ellipsis; }
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 10px) 52%, calc(100% - 5px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: rgba(244,241,236,.35); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent-soft); }
.field [aria-invalid="true"] { border-color: #e08a6d; }
.field-error { font-size: 13px; color: #f0a48a; min-height: 0; }
.field-error:empty { display: none; }
.form-status { margin: 0; color: var(--accent-soft); min-height: 1.5em; }
@media (max-width: 900px) { .contact-inner { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
  .contact-list li { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- Stopka ---------- */
.site-footer { background: var(--dark); color: rgba(244,241,236,.7); border-top: 1px solid var(--dark-line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 36px; padding-bottom: 36px; flex-wrap: wrap; }
.logo--footer { color: var(--light); }
.footer-nav { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-nav a { text-decoration: none; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.footer-nav a:hover { color: var(--light); }
.copyright { margin: 0; font-size: 13px; }

/* ---------- Okno projektu ---------- */
.modal {
  width: min(1240px, calc(100% - 32px)); max-height: calc(100% - 32px);
  padding: 0; border: 0; background: var(--bg); color: var(--ink);
  overflow: auto;
}
.modal::backdrop { background: rgba(20,19,17,.82); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal[open] { animation: modalIn .45s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.modal-close {
  position: sticky; top: 0; float: right; z-index: 3;
  width: 52px; height: 52px; border: 0; background: var(--ink); color: var(--light);
  font-size: 28px; line-height: 1;
}
.modal-close:hover { background: var(--accent); }
.modal-body { display: grid; grid-template-columns: 3fr 2fr; }
.modal-gallery { background: var(--dark); min-width: 0; display: flex; flex-direction: column; }
.modal-stage { position: relative; flex: 1; min-height: 360px; }
.modal-stage img { position: absolute; inset: 0; }
.modal-stage img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(244,241,236,.9); color: var(--ink); font-size: 20px;
  transition: background .25s;
}
.gallery-nav:hover { background: var(--light); }
.gallery-nav--prev { left: 16px; }
.gallery-nav--next { right: 16px; }
.modal-thumbs { display: flex; gap: 8px; padding: 8px; overflow-x: auto; }
.modal-thumbs button { flex: 0 0 96px; padding: 0; border: 2px solid transparent; background: none; opacity: .55; transition: opacity .25s, border-color .25s; }
.modal-thumbs button:hover { opacity: .9; }
.modal-thumbs button[aria-current="true"] { opacity: 1; border-color: var(--accent-soft); }
.modal-thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.modal-info { padding: clamp(28px, 4vw, 52px); }
.modal-info h2 { font-family: var(--serif); font-size: clamp(36px, 4vw, 54px); line-height: 1; margin-bottom: 28px; }
.modal-meta { display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 0 0 28px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.modal-meta dt { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.modal-meta dd { margin: 0; font-family: var(--serif); font-size: 22px; }
.modal-info > p { color: var(--ink-soft); }
.modal-scope { list-style: none; padding: 0; margin: 24px 0 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.modal-scope li { border: 1px solid var(--line); border-radius: 40px; padding: 6px 14px; font-size: 13px; }
@media (max-width: 900px) {
  .modal-body { grid-template-columns: 1fr; }
  .modal-stage { flex: none; min-height: 0; aspect-ratio: 4 / 3; }
  .modal-close { position: fixed; top: 16px; right: 16px; float: none; }
}
@media (max-width: 520px) {
  .modal-thumbs button { flex-basis: 72px; }
  .gallery-nav { width: 40px; height: 40px; }
}

/* ---------- Pojawianie się ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(32px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }
.js-reveal .stat.reveal:nth-child(2), .js-reveal .service.reveal:nth-child(3n+2), .js-reveal .step.reveal:nth-child(2), .js-reveal .quote.reveal:nth-child(2) { transition-delay: .1s; }
.js-reveal .stat.reveal:nth-child(3), .js-reveal .service.reveal:nth-child(3n+3), .js-reveal .step.reveal:nth-child(3), .js-reveal .quote.reveal:nth-child(3) { transition-delay: .2s; }
.js-reveal .stat.reveal:nth-child(4), .js-reveal .step.reveal:nth-child(4) { transition-delay: .3s; }
.js-reveal .step.reveal:nth-child(5) { transition-delay: .4s; }


/* =========================================================
   Animacje i efekty
   ========================================================= */

/* ---------- Intro ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: var(--dark); color: var(--light);
  animation: loaderOut 1s cubic-bezier(.7, 0, .2, 1) 1.35s forwards;
}
.loader-inner { display: flex; align-items: center; gap: 16px; animation: loaderFade .5s ease 1.2s forwards; }
.loader-mark { position: relative; width: 64px; height: 64px; display: grid; place-items: center; }
.loader-mark svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  fill: none; stroke: var(--accent-soft); stroke-width: 1.5;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 1s var(--ease) .1s forwards;
}
.loader-mark > span {
  font-family: var(--serif); font-style: italic; font-size: 32px; line-height: 1; padding-bottom: 6px;
  opacity: 0; animation: fadeIn .6s var(--ease) .45s forwards;
}
.loader-word {
  font-family: var(--serif); font-size: 36px; line-height: 1;
  clip-path: inset(0 100% 0 0); animation: wipe .7s var(--ease) .7s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes loaderFade { to { opacity: 0; transform: translateY(-16px); } }
@keyframes loaderOut { to { transform: translateY(-100%); visibility: hidden; } }
.no-intro .loader { display: none; }

/* ---------- Pasek postępu ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  pointer-events: none;
}

/* ---------- Słowa wysuwane spod maski ---------- */
.split .w {
  display: inline-block; overflow: hidden; vertical-align: top;
  padding: 0 .06em .14em 0; margin: 0 -.06em -.14em 0;
}
.split .w > span {
  display: inline-block; transform: translateY(110%);
  transition: transform 1.1s var(--ease);
  transition-delay: calc(var(--i) * 60ms);
}
.split.is-visible .w > span { transform: none; }
.hero-title.split .w > span { transition-duration: 1.3s; transition-delay: calc(var(--intro) + var(--i) * 80ms); }

/* ---------- Zdjęcia odsłaniane kurtyną ---------- */
.reveal-img { transition: clip-path 1.3s cubic-bezier(.7, 0, .2, 1); }
.reveal-img img { transition: transform 1.6s var(--ease); }
.js-reveal .reveal-img:not(.is-visible) { clip-path: inset(100% 0 0 0); }
.js-reveal .reveal-img:not(.is-visible) img { transform: scale(1.25); }
.js-reveal .project-card:nth-child(even) .reveal-img { transition-delay: .12s; }
.about-media { overflow: hidden; }
.about-media img[data-parallax] { scale: 1.16; }

/* ---------- Elewacja ---------- */
.manifest-top {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center;
  margin-bottom: clamp(56px, 8vw, 100px);
}
.blueprint { margin: 0; }
.blueprint svg { width: 100%; height: auto; overflow: visible; }
.bp-grid path { stroke: var(--line); stroke-width: .6; stroke-dasharray: 2 4; }
.bp-line { stroke: var(--ink); stroke-width: 1.3; stroke-linecap: square; stroke-linejoin: miter; }
.bp-line--bold { stroke-width: 2; }
.bp-line--thin { stroke-width: .7; stroke: var(--muted); }
.bp-dim { stroke: var(--accent); stroke-width: .9; }
.bp-text { fill: var(--accent); font-family: var(--sans); font-size: 11px; letter-spacing: .08em; }
.bp-caption { fill: var(--muted); font-size: 9px; letter-spacing: .2em; }
.blueprint.is-animated .bp-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.blueprint.is-animated .bp-text { opacity: 0; }
@media (max-width: 860px) {
  .manifest-top { grid-template-columns: 1fr; }
  .blueprint { max-width: 520px; }
}

/* ---------- Pasek usług ---------- */
.marquee {
  overflow: hidden; padding: clamp(20px, 3vw, 36px) 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-bottom: var(--section);
}
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee-group { display: flex; flex-shrink: 0; }
.marquee-group span {
  display: inline-flex; align-items: center; white-space: nowrap;
  font-family: var(--serif); font-style: italic; line-height: 1.1;
  font-size: clamp(44px, 7vw, 104px); padding-right: .5em;
}
.marquee-group span:nth-child(even) { color: transparent; -webkit-text-stroke: 1px var(--ink); }
.marquee-group span::after {
  content: "✦"; font-style: normal; font-size: .3em; color: var(--accent);
  -webkit-text-stroke: 0; margin-left: .9em;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Koncepcja / realizacja ---------- */
.compare-inner { display: grid; grid-template-columns: 4fr 7fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.compare-text .section-title { margin-bottom: 28px; }
.compare-text > p { color: var(--ink-soft); max-width: 44ch; }
.compare-facts { list-style: none; padding: 0; margin: 32px 0 0; display: flex; gap: 40px; }
.compare-facts li { display: flex; flex-direction: column; }
.compare-facts strong { font-family: var(--serif); font-weight: 400; font-size: 48px; line-height: 1; }
.compare-facts span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); max-width: 18ch; margin-top: 6px; }

.ba {
  --pos: 50%;
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface);
  user-select: none; -webkit-user-select: none;
}
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-sketch { filter: grayscale(1) contrast(.82) brightness(1.22); }
.ba-before::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(29, 28, 26, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 28, 26, .09) 1px, transparent 1px);
  background-size: 32px 32px;
  mix-blend-mode: multiply;
}
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 1px; margin-left: -.5px;
  background: var(--light); pointer-events: none;
}
.ba-handle > span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--light); color: var(--ink); font-size: 15px; letter-spacing: .1em;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
}
.ba-label {
  position: absolute; top: 20px; padding: 8px 14px; pointer-events: none;
  background: rgba(244, 241, 236, .92); color: var(--ink);
  font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
}
.ba-label--before { left: 20px; }
.ba-label--after { right: 20px; }
.ba-range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none;
  touch-action: pan-y;
}
.ba:has(.ba-range:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; }
@media (max-width: 900px) { .compare-inner { grid-template-columns: 1fr; } }

/* ---------- Kursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 150; pointer-events: none;
  opacity: 0; transition: opacity .3s;
}
.cursor.is-active { opacity: 1; }
.cursor-ring {
  position: absolute; left: -18px; top: -18px; width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--accent); border-radius: 50%;
  transition: transform .35s var(--ease), background .35s, border-color .35s;
}
.cursor-label {
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
  opacity: 0; transform: scale(.4); transition: opacity .25s, transform .35s var(--ease);
}
.cursor.is-link .cursor-ring { transform: scale(.45); background: var(--accent); }
.cursor.is-view .cursor-ring { transform: scale(2.6); background: rgba(244, 241, 236, .94); border-color: transparent; }
.cursor.is-view .cursor-label { opacity: 1; transform: scale(.385); }
.has-cursor [data-cursor] { cursor: none; }
.has-cursor .project-more { display: none; }
.ba-handle > span { transition: opacity .3s, transform .3s var(--ease); }
.has-cursor .ba:hover .ba-handle > span { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- Ograniczony ruch ---------- */
@media (prefers-reduced-motion: reduce) {
  .loader, .cursor { display: none; }
  .marquee-track { animation: none; }
}
