:root {
  --bg: #f9f3f0;
  --paper: #efe6e1;
  --ink: #4f3127;
  --muted: #a08678;
  --line: #e6d8d0;
  --velvet: #22356b;
  --velvet-deep: #070d24;
  --champagne: #e8d6bd;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 84px;
  --ease-curtain: cubic-bezier(.72, 0, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; width: 100%; }
img { height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.wrap { padding-inline: var(--gutter); }

.act, .eyebrow {
  font-family: var(--sans);
  font-size: 11px; letter-spacing: .26em; text-transform: uppercase;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--gutter);
  background: var(--bg);
  transition: background .4s, color .4s;
}
.site-header.is-overlay {
  position: fixed; inset: 0 0 auto 0; background: transparent; color: #fff;
}
.site-header.is-overlay::before {
  content: ""; position: absolute; inset: 0 0 -40px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(20, 14, 10, .35), transparent);
  transition: opacity .4s;
}
.site-header.is-overlay.is-solid { background: var(--bg); color: var(--ink); }
.site-header.is-solid::before { opacity: 0; }

.logo { font-family: var(--serif); font-size: 23px; letter-spacing: .03em; font-weight: 400; line-height: 1.15; }
.logo span { display: block; font-family: var(--sans); font-size: 9px; letter-spacing: .24em; text-transform: uppercase; margin-top: 3px; opacity: .8; }

.site-nav { display: flex; gap: clamp(20px, 3vw, 44px); }
.site-nav a, .site-footer nav a {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  position: relative; padding-block: 4px;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: currentColor; transition: right .35s ease;
}
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { right: 0; }

.menu-toggle { display: none; background: none; border: 0; width: 28px; height: 28px; cursor: pointer; }
.menu-toggle span { display: block; height: 1px; background: currentColor; margin: 7px 0; transition: transform .3s; }

@media (max-width: 760px) {
  :root { --header-h: 68px; }
  .logo { font-size: 19px; }
  .logo span { font-size: 7.5px; letter-spacing: .18em; }
  .menu-toggle { display: block; z-index: 2; }
  .site-nav {
    position: fixed; inset: 0; background: var(--bg); color: var(--ink);
    flex-direction: column; justify-content: center; align-items: center; gap: 28px;
    opacity: 0; pointer-events: none; transition: opacity .35s;
  }
  .site-nav a { font-family: var(--serif); font-size: 30px; letter-spacing: .02em; text-transform: none; }
  .menu-open .site-nav { opacity: 1; pointer-events: auto; }
  .site-header.menu-open { color: var(--ink); }
  .menu-open .logo { position: relative; z-index: 2; }
  .menu-open .menu-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-open .menu-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
}

/* ---------- Home: scena z aktami ---------- */
.stage { position: relative; height: 100svh; min-height: 540px; overflow: hidden; background: #120c09; color: #fff; }
.scene {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1.8s ease; will-change: opacity;
}
.scene img { transform: scale(1.08); will-change: transform; }
.scene.is-active { opacity: 1; }
.stage.is-playing .scene.is-active img { animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1); } }
.stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(18, 12, 9, .62), rgba(18, 12, 9, 0) 48%),
    radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,.28));
}

.stage-text, .stage-bottom { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); }
.stage-text { bottom: clamp(120px, 20vh, 190px); }
.stage-text h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(44px, 7vw, 108px); line-height: 1; margin-top: 14px; max-width: 12ch;
}
.stage-text > * { opacity: 0; transform: translateY(14px); transition: opacity 1.4s ease, transform 1.4s ease; }
.stage-text h1 { transition-delay: .25s; }
.stage.is-playing .stage-text > * { opacity: 1; transform: none; }

.stage-bottom {
  bottom: clamp(28px, 5vh, 48px);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  border-top: 1px solid rgba(255, 255, 255, .28); padding-top: 18px;
}
.act-caption { opacity: 0; transform: translateY(8px); transition: opacity .6s ease, transform .6s ease; }
.act-caption.in { opacity: 1; transform: none; }
.act-caption a { display: flex; align-items: baseline; gap: 18px; margin-top: 4px; }
.act-caption .t { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 30px); }
.act-caption .go { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; opacity: .8; border-bottom: 1px solid rgba(255,255,255,.5); }
.act-caption a:hover .t { font-style: italic; }

.acts { display: flex; gap: 18px; }
.act-dot { background: none; border: 0; cursor: pointer; display: grid; gap: 6px; justify-items: start; opacity: .55; transition: opacity .3s; }
.act-dot span { font-family: var(--serif); font-size: 15px; }
.act-dot i { display: block; width: 44px; height: 1px; background: rgba(255,255,255,.35); position: relative; overflow: hidden; }
.act-dot i::after { content: ""; position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
.act-dot.is-active { opacity: 1; }
.stage.is-playing .act-dot.is-active i::after { animation: progress 6.5s linear forwards; }
@keyframes progress { to { transform: scaleX(1); } }
@media (max-width: 560px) {
  .act-caption .go { display: none; }
  .act-dot i { width: 26px; }
}

.statement {
  max-width: 920px; margin: 0 auto;
  padding: clamp(80px, 14vw, 180px) var(--gutter);
  text-align: center;
}
.statement p { font-family: var(--serif); font-size: clamp(24px, 3vw, 38px); line-height: 1.35; }

.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-inline: var(--gutter); margin-bottom: 28px;
}
.section-head h2 { font-family: var(--sans); font-weight: 400; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; }
.link-arrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* ---------- Siatka projektów (od krawędzi do krawędzi, jak w galerii) ---------- */
.grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(40px, 5vw, 72px) 2px;
}
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.card { display: block; text-align: center; }
.card-media { aspect-ratio: 39 / 50; overflow: hidden; background: var(--paper); }
.card-media img { transition: transform 1.6s cubic-bezier(.2, .7, .2, 1), filter .6s ease; }
.card:hover .card-media img { transform: scale(1.035); }
.card .act { color: var(--muted); margin-top: 22px; font-size: 10px; }
.card h3 {
  font-family: var(--sans); font-weight: 400;
  font-size: 13px; letter-spacing: .16em; text-transform: uppercase; line-height: 1.5;
  margin-top: 6px; padding-inline: 12px;
}
.card h3::after {
  content: ""; display: block; width: 0; height: 1px; margin: 8px auto 0;
  background: currentColor; transition: width .4s ease;
}
a.card:hover h3::after { width: 36px; }

.velvet {
  width: 100%; height: 100%; display: grid; place-items: center;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.4), rgba(0,0,0,0) 30%, rgba(0,0,0,0) 70%, rgba(0,0,0,.5)),
    repeating-linear-gradient(90deg, #070d24 0px, #0e1a3d 12px, #1a2c5e 26px, #2a4180 33px, #33508f 36px, #213669 44px, #111e45 60px, #070d24 74px);
}
.velvet span { color: var(--champagne); font-size: 11px; letter-spacing: .26em; text-transform: uppercase; }

.page-title { padding: clamp(48px, 8vw, 110px) var(--gutter) clamp(32px, 5vw, 64px); }
.page-title h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5.5vw, 76px); line-height: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.closing {
  text-align: center; display: grid; justify-items: center; gap: 18px;
  padding: clamp(90px, 13vw, 180px) var(--gutter) clamp(20px, 4vw, 60px);
}
.closing .act { color: var(--muted); }
.closing-line { font-family: var(--serif); font-size: clamp(30px, 4vw, 54px); line-height: 1.15; }

/* ---------- Strona projektu ---------- */
.project-hero { position: relative; height: calc(100svh - var(--header-h)); min-height: 420px; color: #fff; overflow: hidden; }
.project-hero img { animation: kenburns 9s ease-out both; }
.project-hero::after { content: ""; position: absolute; inset: 0; background: rgba(24, 14, 10, .2); }
.project-hero-text {
  position: absolute; z-index: 1; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center;
  padding-inline: var(--gutter);
}
.project-hero-text h1 {
  font-family: var(--sans); font-weight: 400;
  font-size: clamp(14px, 1.3vw, 17px); letter-spacing: .3em; text-transform: uppercase;
  animation: rise 1.4s ease .5s both;
}
.project-hero-text .act { font-size: 10px; opacity: .85; animation: rise 1.2s ease .3s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.project-tagline { max-width: 980px; margin: 0 auto; text-align: center; padding-block: clamp(64px, 9vw, 130px); }
.project-tagline p { font-family: var(--serif); font-size: clamp(28px, 3.4vw, 48px); line-height: 1.2; }
.project-tagline .press-line { font-family: var(--sans); font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); margin-top: 28px; }
.press-line a, .meta dd a { border-bottom: 1px solid currentColor; }

.gallery { display: grid; gap: 2px; }
.g-full img { height: auto; }
.g-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.g-pair figure { aspect-ratio: 4 / 5; overflow: hidden; }

.project-info {
  display: grid; grid-template-columns: 7fr 4fr; gap: 40px clamp(40px, 8vw, 140px);
  padding-block: clamp(72px, 10vw, 150px); align-items: start;
}
.info-text { max-width: 640px; }
.info-text h2 {
  font-family: var(--sans); font-weight: 400; font-size: 13px; letter-spacing: .18em; text-transform: uppercase;
  margin-bottom: 28px;
}
.info-text p { font-family: var(--serif); font-size: clamp(18px, 1.45vw, 21px); line-height: 1.6; margin-bottom: 1.1em; }
.meta { display: grid; gap: 12px; }
.meta div { border-top: 1px solid var(--line); padding-top: 12px; }
.meta dt { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.meta dd { font-family: var(--serif); font-size: 19px; }
@media (max-width: 760px) { .project-info { grid-template-columns: 1fr; } }

.press {
  max-width: 860px; margin: 0 auto clamp(72px, 10vw, 150px); text-align: center;
  border-block: 1px solid var(--line); padding-block: clamp(48px, 7vw, 96px);
  display: grid; justify-items: center; gap: 14px;
}
.press .act { color: var(--muted); }
.press h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.5vw, 60px); letter-spacing: .08em; text-transform: uppercase; line-height: 1.1; }
.press-title { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2vw, 26px); line-height: 1.35; max-width: 640px; }
.press-by { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.press-text { max-width: 640px; margin-block: 14px 18px; }
.press-text p { font-family: var(--serif); font-size: clamp(18px, 1.45vw, 21px); line-height: 1.6; margin-bottom: 1em; }
.film-head { margin-bottom: 24px; }
.film-head .act { color: var(--muted); }
.film-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.6vw, 50px); line-height: 1.1; }
.film video { background: #000; aspect-ratio: 16 / 9; }
.film.is-vertical {
  display: grid; grid-template-columns: 1fr minmax(260px, 400px); gap: 48px; align-items: end;
}
.film.is-vertical video { aspect-ratio: 9 / 16; }
@media (max-width: 760px) {
  .film.is-vertical { grid-template-columns: 1fr; gap: 0; }
  .film.is-vertical video { max-width: 400px; justify-self: center; }
}

.next-project { padding-block: clamp(90px, 12vw, 170px); text-align: center; }
.next-project a { font-family: var(--serif); font-size: clamp(36px, 5.5vw, 76px); line-height: 1.1; }
.next-project span {
  display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .26em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.next-project a:hover { font-style: italic; }
/* ---------- About & Contact ---------- */
.split {
  display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 96px);
  padding: 0 var(--gutter) clamp(80px, 10vw, 140px); align-items: start;
}
.split .portrait { aspect-ratio: 2 / 3; overflow: hidden; }
.person { margin-bottom: clamp(28px, 4vw, 48px); padding-bottom: clamp(24px, 3vw, 36px); border-bottom: 1px solid var(--line); }
.person h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4vw, 54px); line-height: 1.1; margin-bottom: 14px; }
.prose .person p { margin-bottom: 4px; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; }
.prose .person .based { color: var(--muted); margin-top: 12px; }
.prose { max-width: 560px; }
.prose p { margin-bottom: 1.2em; }
.prose .lead-p { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 32px); line-height: 1.35; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

.contact-list { display: grid; gap: 22px; margin-top: 8px; }
.contact-list div { border-top: 1px solid var(--line); padding-top: 12px; }
.contact-list dt { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.contact-list dd { font-family: var(--serif); font-size: clamp(20px, 2.2vw, 28px); overflow-wrap: anywhere; }
.contact-list a:hover { font-style: italic; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: clamp(80px, 10vw, 140px);
  border-top: 1px solid var(--line);
  padding: 48px var(--gutter);
  display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between;
}
.site-footer nav { display: flex; gap: 28px; flex-wrap: wrap; }
.site-footer p { font-size: 12px; color: var(--muted); width: 100%; }
main:has(.next-project) + .site-footer { margin-top: 0; }

/* ---------- Animacje wejścia ---------- */
.card, .g-full, .g-pair, .g-text, .film, .credits, .reveal {
  opacity: 0; transform: translateY(24px); transition: opacity 1.1s ease, transform 1.1s ease;
}
.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card, .g-full, .g-pair, .g-text, .film, .credits, .reveal, .stage-text > *, .act-caption { opacity: 1; transform: none; }
}

/* Miasto i kraj pod nazwą projektu */
.card .loc { color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; margin-top: 8px; padding-inline: 12px; }
.project-hero-text .loc { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; opacity: .9; animation: rise 1.4s ease .7s both; }
.act-caption .loc { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; opacity: .85; }
@media (max-width: 640px) { .act-caption a { flex-wrap: wrap; gap: 4px 14px; } }