@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;1,9..144,500&family=Work+Sans:wght@400;500;600&family=Space+Mono:wght@400;700&display=swap');

:root {
  --night: #211c26;
  --night-2: #2a2330;
  --paper: #faf6ee;
  --paper-dim: #efe7d6;
  --ink: #2b2420;
  --ivory: #f3ecdf;
  --ivory-dim: #cabfae;
  --gold: #cba35c;
  --gold-bright: #e0bc7c;
  --blush: #d98fa0;
  --sage: #7c8f6c;

  --font-display: 'Fraunces', serif;
  --font-body: 'Work Sans', sans-serif;
  --font-mono: 'Space Mono', monospace;

  --radius: 3px;
  --shadow-card: 0 14px 30px -12px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--night);
  color: var(--ivory);
  font-family: var(--font-body);
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
}

/* --- Sygnaturowe, ciepłe bokeh w tle: jak rozmyte lampki na weselu --- */
.bokeh-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bokeh-bg span {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
  animation: drift 18s ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-18px) translateX(10px); }
}
@media (prefers-reduced-motion: reduce) {
  .bokeh-bg span { animation: none; }
}

a { color: inherit; }

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.site-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 8px;
}

.brand {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  color: var(--gold-bright);
  text-decoration: none;
}

.nav-links { display: flex; gap: 20px; font-size: 0.92rem; }
.nav-links a {
  text-decoration: none;
  color: var(--ivory-dim);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color .2s, border-color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-bright); border-color: var(--gold); }

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--blush);
}

h1.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  margin: 10px 0 14px;
  color: var(--ivory);
}
h1.hero-title em {
  font-style: italic;
  color: var(--gold-bright);
}

.lede {
  font-size: 1.08rem;
  color: var(--ivory-dim);
  max-width: 46ch;
  line-height: 1.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.96rem;
  padding: 14px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--gold);
  color: var(--ink);
}
.btn-primary:hover { background: var(--gold-bright); box-shadow: 0 8px 22px -8px rgba(203,163,92,.7); }

.btn-ghost {
  background: transparent;
  border-color: rgba(243,236,223,0.25);
  color: var(--ivory);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); }

.btn-danger {
  background: transparent;
  border-color: rgba(217,143,160,0.5);
  color: var(--blush);
}
.btn-danger:hover { background: rgba(217,143,160,0.15); }

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* --- Karta / formularz --- */
.card {
  background: var(--night-2);
  border: 1px solid rgba(243,236,223,0.08);
  border-radius: 10px;
  padding: 32px;
  box-shadow: var(--shadow-card);
}

label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ivory-dim);
  margin-bottom: 8px;
}

input[type="text"], textarea {
  width: 100%;
  background: rgba(250,246,238,0.05);
  border: 1px solid rgba(243,236,223,0.18);
  color: var(--ivory);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  margin-bottom: 20px;
}
input[type="text"]:focus, textarea:focus, input[type="password"]:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.field-hint { font-size: 0.8rem; color: var(--ivory-dim); margin-top: -14px; margin-bottom: 20px; }

/* --- Dropzone --- */
.dropzone {
  border: 2px dashed rgba(203,163,92,0.4);
  border-radius: 10px;
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  margin-bottom: 22px;
}
.dropzone:hover, .dropzone.drag { border-color: var(--gold-bright); background: rgba(203,163,92,0.06); }
.dropzone p { margin: 6px 0 0; color: var(--ivory-dim); font-size: 0.9rem; }
.dropzone .dz-icon { font-size: 2rem; }

#preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
#preview-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(243,236,223,0.15);
}

.status-msg { font-size: 0.9rem; margin-top: 14px; min-height: 1.2em; }
.status-msg.ok { color: var(--sage); }
.status-msg.err { color: var(--blush); }

/* --- Ściana zdjęć (galeria) --- */
.wall {
  columns: 4 260px;
  column-gap: 26px;
  margin-top: 20px;
}
@media (max-width: 720px) { .wall { columns: 2 160px; column-gap: 16px; } }

.polaroid {
  break-inside: avoid;
  margin: 0 0 26px;
  background: var(--paper);
  padding: 14px 14px 0;
  border-radius: 2px;
  box-shadow: var(--shadow-card);
  position: relative;
  transform: rotate(var(--r, -2deg));
  transition: transform .25s ease, box-shadow .25s ease;
  animation: pinIn .5s ease backwards;
}
.polaroid:hover { transform: rotate(0deg) scale(1.03); box-shadow: 0 20px 40px -14px rgba(0,0,0,.6); z-index: 2; }

@keyframes pinIn {
  from { opacity: 0; transform: translateY(14px) rotate(var(--r, -2deg)); }
  to { opacity: 1; transform: translateY(0) rotate(var(--r, -2deg)); }
}
@media (prefers-reduced-motion: reduce) {
  .polaroid { animation: none; }
}

.polaroid .tape {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 64px;
  height: 22px;
  background: rgba(203,163,92,0.55);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.polaroid img {
  width: 100%;
  display: block;
  background: #ddd;
  aspect-ratio: 1;
  object-fit: cover;
}

.polaroid .caption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink);
  padding: 12px 4px 16px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.polaroid .caption .name { font-weight: 700; }
.polaroid .caption .stamp { color: #8a7f6d; letter-spacing: 0.02em; }
.polaroid .note {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.86rem;
  color: var(--ink);
  padding: 0 4px 4px;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--ivory-dim);
}
.empty-state .dz-icon { font-size: 2.4rem; display: block; margin-bottom: 10px; }

/* --- Admin --- */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.admin-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ivory-dim);
  padding: 10px 8px;
  border-bottom: 1px solid rgba(243,236,223,0.15);
}
.admin-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(243,236,223,0.08);
  font-size: 0.9rem;
  vertical-align: middle;
}
.thumb {
  width: 56px; height: 56px; object-fit: cover; border-radius: 4px;
  border: 1px solid rgba(243,236,223,0.2);
}
.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
}
.pill.ok { background: rgba(124,143,108,0.2); color: var(--sage); }
.pill.hidden { background: rgba(217,143,160,0.2); color: var(--blush); }

.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-actions button {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid rgba(243,236,223,0.2);
  background: transparent;
  color: var(--ivory);
  cursor: pointer;
}
.admin-actions button:hover { border-color: var(--gold); color: var(--gold-bright); }
.admin-actions button.danger:hover { border-color: var(--blush); color: var(--blush); }

.login-box { max-width: 360px; margin: 80px auto; }

.qr-box {
  background: var(--paper);
  color: var(--ink);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  max-width: 320px;
}
.qr-box img { width: 100%; height: auto; }

/* --- Tryb rzutnika / kiosk (slideshow.html) --- */
.kiosk-body { overflow: hidden; height: 100vh; }
.kiosk-header {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: center;
  padding: 26px 40px 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ivory-dim);
}
.kiosk-header .kiosk-brand {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--gold-bright);
}
.kiosk-stage {
  position: relative;
  z-index: 1;
  height: calc(100vh - 90px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.kiosk-polaroid {
  background: var(--paper);
  padding: 26px 26px 0;
  border-radius: 3px;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.7);
  width: min(60vw, 78vh);
  opacity: 0;
  transform: scale(0.96) rotate(var(--r, -1.5deg));
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.kiosk-polaroid.show {
  opacity: 1;
  transform: scale(1) rotate(var(--r, -1.5deg));
}
.kiosk-polaroid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: #ddd;
}
.kiosk-polaroid .caption {
  font-family: var(--font-mono);
  color: var(--ink);
  padding: 18px 6px 26px;
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
}
.kiosk-polaroid .note {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink);
  padding: 0 6px 6px;
  font-size: 1.05rem;
}
.kiosk-empty {
  position: relative; z-index: 1;
  text-align: center;
  color: var(--ivory-dim);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.6rem;
}

footer.site-footer {
  position: relative; z-index: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ivory-dim);
  padding: 30px 20px 40px;
}

/* --- Duze przyciski CTA na stronie glownej --- */
.hero-actions { gap: 22px; }
.hero-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 190px;
  height: 150px;
  border-radius: 14px;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ivory);
  border: 1px solid rgba(243, 236, 223, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.hero-btn-icon { font-size: 2.3rem; }
.hero-btn-primary {
  background: linear-gradient(160deg, rgba(203, 163, 92, 0.22), rgba(203, 163, 92, 0.05));
  border-color: rgba(203, 163, 92, 0.45);
}
.hero-btn-primary:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 44px -16px rgba(203, 163, 92, 0.55);
  border-color: var(--gold-bright);
}
.hero-btn-ghost {
  background: rgba(250, 246, 238, 0.03);
}
.hero-btn-ghost:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 44px -16px rgba(0, 0, 0, 0.5);
  border-color: var(--gold);
}

/* --- Biegnacy jamnik obok kodu QR --- */
.dog-runner {
  position: relative;
  width: 100%;
  max-width: 340px;
  height: 130px;
  overflow: hidden;
  align-self: center;
}
.dog-runner-svg {
  position: absolute;
  bottom: 14px;
  width: 90px;
  height: auto;
  animation: dog-run-across 6s linear infinite;
}
@keyframes dog-run-across {
  0%   { left: -100px; }
  100% { left: 100%; }
}
.dog-runner .body-bounce {
  transform-box: fill-box;
  transform-origin: center;
  animation: dog-bounce 0.32s ease-in-out infinite;
}
@keyframes dog-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.dog-runner .leg {
  transform-box: fill-box;
  transform-origin: top center;
  fill: var(--gold);
  animation: dog-leg-swing 0.32s ease-in-out infinite;
}
.dog-runner .leg-front-2, .dog-runner .leg-back-1 { animation-delay: 0.16s; }
@keyframes dog-leg-swing {
  0%, 100% { transform: rotate(24deg); }
  50% { transform: rotate(-24deg); }
}
.dog-runner .body-shape,
.dog-runner .ear,
.dog-runner .head,
.dog-runner .snout {
  fill: var(--gold-bright);
  stroke: var(--ink);
  stroke-width: 1;
}
.dog-runner .tail { stroke: var(--gold-bright); }
.dog-runner .eye { fill: var(--ink); stroke: none; }
@media (prefers-reduced-motion: reduce) {
  .dog-runner-svg, .dog-runner .body-bounce, .dog-runner .leg { animation: none; left: 40%; }
}
