:root {
  --bg: #faf7f2;
  --paper: #ffffff;
  --ink: #3a332d;
  --muted: #8c8178;
  --gold: #b8976a;
  --line: #e7dfd3;
  --gap: 4px;
  --pad: 20px;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 300 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }

.hero {
  text-align: center;
  padding: calc(56px + env(safe-area-inset-top)) var(--pad) 40px;
}
.eyebrow {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
}
h1 {
  margin: 0;
  font: 400 clamp(44px, 12vw, 84px)/1.05 var(--serif);
  letter-spacing: .01em;
}
.date {
  margin: 10px 0 0;
  font-size: 12px;
  letter-spacing: .28em;
  color: var(--muted);
}
.date:empty { display: none; }
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 22px auto;
}
.ornament span { width: 48px; height: 1px; background: var(--gold); opacity: .6; }
.ornament i { width: 6px; height: 6px; border: 1px solid var(--gold); transform: rotate(45deg); }

main { max-width: 1200px; margin: 0 auto; }
.section { padding: 24px 0 40px; }
h2 {
  margin: 0 0 20px;
  text-align: center;
  font: 400 30px/1.2 var(--serif);
  letter-spacing: .04em;
}
.muted { color: var(--muted); font-size: 14px; }
.center { text-align: center; padding: 40px var(--pad); }
#count { text-align: center; margin: -12px 0 20px; }

/* Film */
#videos { display: grid; gap: 16px; padding: 0 var(--pad); }
.yt {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.yt img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s ease, filter .8s ease; }
.yt iframe { width: 100%; height: 100%; border: 0; display: block; }
.yt-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(250, 247, 242, .92);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5);
  transition: transform .3s ease;
  animation: pulse 2.6s ease-in-out infinite;
}
.yt-play svg { width: 30px; height: 30px; fill: currentColor; stroke: none; margin-left: 4px; }
@media (hover: hover) {
  .yt:not(.playing):hover img { transform: scale(1.03); filter: brightness(.92); }
  .yt:not(.playing):hover .yt-play { transform: scale(1.08); animation: none; }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5), 0 0 0 0 rgba(250, 247, 242, .5); }
  50% { box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5), 0 0 0 14px rgba(250, 247, 242, 0); }
}
.yt-box { display: grid; gap: 10px; justify-items: center; }
.yt-link { color: var(--gold); font-size: 14px; letter-spacing: .04em; text-decoration: none; }
.yt-link:hover { text-decoration: underline; }
video, .yt {
  display: block;
  width: 100%;
  max-height: 80vh;
  background: #000;
  border-radius: 4px;
  box-shadow: 0 12px 40px -18px rgba(58, 51, 45, .45);
}

/* Galeria */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  padding: 0 var(--gap);
}
@media (min-width: 700px) { .grid { grid-template-columns: repeat(4, 1fr); padding: 0 var(--pad); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(5, 1fr); } }

.tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--line);
  border: 0;
  padding: 0;
  cursor: pointer;
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity .7s ease var(--d, 0ms), transform .9s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms);
}
.tile img.loaded { opacity: 1; transform: none; }
@media (hover: hover) { .tile:hover img.loaded { transform: scale(1.04); transition-delay: 0ms; } }

.tile .del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .92);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.tile .del svg { width: 18px; height: 18px; stroke: #9b3b2f; }

.admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 var(--gap) 12px;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 13px;
}

svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.link {
  background: none;
  border: 0;
  padding: 6px 0;
  color: var(--gold);
  cursor: pointer;
  font-size: 14px;
}
.primary {
  background: var(--ink);
  color: var(--bg);
  border: 0;
  border-radius: 3px;
  padding: 10px 22px;
  cursor: pointer;
}

.footer {
  text-align: center;
  padding: 24px var(--pad) calc(40px + env(safe-area-inset-bottom));
  font: italic 400 20px/1.4 var(--serif);
  color: var(--muted);
}
.footer p { margin: 0; }

/* Podglad */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(20, 17, 15, .97);
  color: #f4efe8;
  display: flex;
  flex-direction: column;
  touch-action: none;
  animation: fade .3s ease;
}
.lb-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(8px + env(safe-area-inset-top)) 8px 8px 20px;
  font-size: 14px;
  letter-spacing: .08em;
}
.lb-actions { display: flex; gap: 4px; }
.lb-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  border-radius: 50%;
}
.lb-btn svg { width: 22px; height: 22px; }
.lb-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 calc(16px + env(safe-area-inset-bottom));
}
.lb-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform .2s ease, opacity .2s ease;
}
.lb-stage img:not(.ready) { opacity: 0 !important; }
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 0;
  background: rgba(255, 255, 255, .08);
  color: inherit;
  border-radius: 50%;
  display: none;
  place-items: center;
  cursor: pointer;
}
.lb-nav svg { width: 24px; height: 24px; }
.lb-nav.prev { left: 20px; }
.lb-nav.next { right: 20px; }
@media (hover: hover) and (min-width: 700px) { .lb-nav { display: grid; } }

.login {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px;
  width: min(340px, calc(100vw - 40px));
  background: var(--paper);
  color: var(--ink);
}
.login::backdrop { background: rgba(58, 51, 45, .35); }
.login h3 { margin: 0 0 16px; font: 400 24px/1.2 var(--serif); text-align: center; }
.login input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font: inherit;
  font-size: 16px;
  background: var(--bg);
}
.login .row { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.error { color: #9b3b2f; font-size: 13px; margin: 8px 0 0; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
  animation: toast-in .35s cubic-bezier(.2, .7, .2, 1);
}
.toast .link { color: #e6cfa6; }

/* Animacje */
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 16px); } }
.hero > * { animation: rise 1s cubic-bezier(.2, .7, .2, 1) both; }
.hero .eyebrow { animation-delay: .1s; }
.hero h1 { animation-delay: .25s; }
.hero .ornament { animation-delay: .5s; }
.hero .ornament span { animation: grow 1.1s cubic-bezier(.2, .7, .2, 1) .6s both; }
.hero .date { animation-delay: .7s; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s ease, transform 1s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .tile img { opacity: 1; transform: none; }
}
