@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Italiana&family=Space+Mono:wght@400;700&display=swap');

:root {
  --plum: #372c46;
  --plum-deep: #241d31;
  --iris: #766d9a;
  --rose: #d89aa5;
  --blush: #f4d8d8;
  --mist: #eef0f6;
  --paper: #fffdfb;
  --ink: #25212b;
  --muted: #746f7b;
  --line: rgba(55, 44, 70, .14);
  --shadow: 0 24px 70px rgba(48, 35, 63, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 7%, rgba(216,154,165,.22), transparent 29rem),
    radial-gradient(circle at 90% 22%, rgba(118,109,154,.15), transparent 30rem),
    var(--mist);
  font-family: "DM Sans", sans-serif;
  min-height: 100vh;
}
a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }

.site-header {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--plum);
  text-decoration: none;
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--plum);
  border-radius: 50% 50% 45% 55%;
  font-family: "Italiana", serif;
  font-size: 1.35rem;
}
main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
footer {
  max-width: 720px;
  margin: 80px auto 24px;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: .82rem;
}
.petal {
  position: fixed;
  z-index: -1;
  width: 220px;
  aspect-ratio: 1;
  border: 1px solid rgba(118,109,154,.14);
  border-radius: 70% 30% 60% 40%;
  transform: rotate(22deg);
}
.petal-a { left: -100px; top: 36%; }
.petal-b { right: -120px; bottom: 4%; transform: rotate(70deg); }

h1, h2, p { margin-top: 0; }
h1 {
  font-family: "Italiana", serif;
  font-weight: 400;
  color: var(--plum-deep);
  line-height: .98;
}
h1 em { color: var(--rose); font-style: italic; }
h2 { color: var(--plum); }
.eyebrow {
  color: var(--iris);
  font-family: "Space Mono", monospace;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.lead { color: var(--muted); font-size: 1.08rem; line-height: 1.75; }

.hero {
  min-height: 70vh;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 8vw;
}
.hero h1 { font-size: clamp(3.4rem, 7vw, 7.2rem); margin: 20px 0 28px; }
.hero-copy { max-width: 700px; }
.hero-frame {
  position: relative;
  min-height: 520px;
  border-radius: 48% 48% 20px 20px;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(255,255,255,.18), rgba(36,29,49,.15)),
    repeating-linear-gradient(118deg, transparent 0 18px, rgba(255,255,255,.08) 19px 20px),
    linear-gradient(135deg, var(--rose), var(--iris));
  box-shadow: var(--shadow);
}
.hero-frame::before, .hero-frame::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 50%;
  inset: 12%;
}
.hero-frame::after { inset: 20%; }
.frame-date {
  position: absolute;
  left: 36px;
  bottom: 34px;
  color: white;
  font-family: "Space Mono", monospace;
  font-size: .8rem;
  letter-spacing: .22em;
  line-height: 1.7;
}
.frame-ring {
  position: absolute;
  width: 86px;
  height: 86px;
  right: 34px;
  top: 34px;
  border: 10px double rgba(255,255,255,.72);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.center-panel { min-height: 68vh; display: grid; place-items: center; }
.paper-card {
  background: rgba(255,253,251,.9);
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.narrow { width: min(440px, 100%); padding: 42px; }
.narrow h1 { font-size: 3rem; }
.stack { display: grid; gap: 20px; }
label { display: grid; gap: 8px; color: var(--plum); font-weight: 600; }
input[type="text"], input[type="password"] {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 15px;
  background: white;
  color: var(--ink);
  outline: none;
}
input:focus { border-color: var(--iris); box-shadow: 0 0 0 4px rgba(118,109,154,.14); }

.button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
}
.button:focus-visible, .tabs a:focus-visible, .text-button:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 3px;
}
.button.primary { color: white; background: var(--plum); box-shadow: 0 10px 26px rgba(55,44,70,.24); }
.button.primary:hover { background: var(--iris); }
.button.quiet { color: var(--plum); background: var(--blush); }
.button.wide { width: 100%; }
.button:disabled { opacity: .55; cursor: wait; }
.text-button { border: 0; background: transparent; cursor: pointer; color: var(--plum); padding: 7px; }
.text-button.danger { color: #a53f55; }
.alert, .toast {
  border-radius: 12px;
  padding: 12px 15px;
  margin-bottom: 18px;
  background: #ffe2e6;
  color: #8d2941;
}
.toast { background: #e2f2e9; color: #326347; margin-top: 16px; }

.guest-hero { max-width: 760px; margin: 42px auto 32px; text-align: center; }
.guest-hero h1 { font-size: clamp(3rem, 8vw, 5.8rem); margin-bottom: 34px; }
.upload-card {
  background: rgba(255,253,251,.94);
  padding: 18px;
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.upload-zone {
  min-height: 220px;
  border: 2px dashed rgba(118,109,154,.35);
  border-radius: 18px;
  place-items: center;
  align-content: center;
  cursor: pointer;
  padding: 26px;
}
.upload-zone:hover { background: rgba(244,216,216,.25); border-color: var(--rose); }
.upload-zone input { position: absolute; opacity: 0; pointer-events: none; }
.upload-zone strong { font-size: 1.15rem; }
.upload-zone small { color: var(--muted); font-weight: 400; }
.upload-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--rose);
  font-size: 2rem;
  font-weight: 300;
}
.file-summary { min-height: 30px; padding: 8px; color: var(--iris); font-size: .9rem; }

.tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 42px auto 24px;
  padding: 5px;
  width: fit-content;
  background: rgba(255,255,255,.6);
  border-radius: 999px;
}
.tabs a {
  min-width: 120px;
  padding: 11px 18px;
  border-radius: 999px;
  text-decoration: none;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}
.tabs a.active { color: white; background: var(--plum); }

.gallery-wrap { min-height: 240px; }
.gallery { columns: 4 230px; column-gap: 16px; }
.photo-card {
  break-inside: avoid;
  margin: 0 0 16px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 10px 30px rgba(48,35,63,.08);
}
.photo-card img { width: 100%; height: auto; transition: transform .35s ease; }
.photo-card a:hover img { transform: scale(1.025); }
.photo-meta {
  min-height: 48px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: .82rem;
}
.empty-state, .empty-compact {
  text-align: center;
  padding: 64px 22px;
  color: var(--muted);
  border: 1px dashed rgba(118,109,154,.3);
  border-radius: 22px;
}
.empty-state span { font-size: 3rem; color: var(--rose); }
.empty-state h2 { margin: 12px 0 8px; }

.admin-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 42px 0 28px;
}
.admin-heading h1 { font-size: clamp(3rem, 6vw, 5rem); margin-bottom: 0; }
.stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
}
.stat strong { font-family: "Italiana", serif; color: var(--rose); font-size: 4rem; font-weight: 400; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.inline-form { display: flex; gap: 10px; }
.inline-form input { flex: 1; }
.toggle-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; }
.toggle-row p { margin: 0; color: var(--muted); }
.switch input { position: absolute; opacity: 0; }
.switch span {
  display: block;
  width: 48px;
  height: 28px;
  padding: 3px;
  border-radius: 99px;
  background: #cbc7d0;
  cursor: pointer;
}
.switch span::after {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  transition: transform .2s;
}
.switch input:checked + span { background: var(--iris); }
.switch input:checked + span::after { transform: translateX(20px); }
.admin-section { margin-top: 38px; }
.section-title { display: flex; align-items: center; gap: 10px; }
.section-title h2 { margin: 0; }
.section-title span {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blush);
  color: var(--plum);
  font-size: .75rem;
}
.guest-list { margin-top: 15px; display: grid; gap: 9px; }
.guest-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,253,251,.82);
}
.guest-initial {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blush);
  color: var(--plum);
  font-family: "Italiana", serif;
  font-size: 1.4rem;
}
.guest-data { min-width: 0; display: grid; gap: 4px; }
.guest-data code { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.photo-count { color: var(--muted); font-size: .84rem; }
.admin-gallery { margin-top: 16px; }

.print-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.qr-card {
  width: min(520px, 100%);
  padding: 50px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.qr-card h1 { font-size: 3.2rem; margin-bottom: 15px; }
.qr-card img { width: 280px; margin: 0 auto 20px; }
.qr-card p { color: var(--muted); line-height: 1.6; }
.qr-card code { display: block; word-break: break-all; color: var(--iris); font-size: .72rem; }
.no-print { position: fixed; right: 24px; bottom: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

@media (max-width: 760px) {
  main { width: min(100% - 22px, 1180px); }
  .site-header { width: calc(100% - 24px); padding: 16px 0; }
  .brand span:last-child { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-frame { min-height: 360px; }
  .guest-hero { margin-top: 24px; }
  .upload-card { padding: 12px; }
  .upload-zone { min-height: 180px; }
  .admin-heading { align-items: start; }
  .admin-grid { grid-template-columns: 1fr; }
  .inline-form { flex-direction: column; }
  .toggle-row { grid-template-columns: auto 1fr; }
  .toggle-row .button { grid-column: 1 / -1; }
  .guest-row { grid-template-columns: auto 1fr auto; }
  .guest-row .photo-count { display: none; }
  .guest-row .button { grid-column: 2 / -1; justify-self: start; }
  .gallery { columns: 2 145px; gap: 10px; }
  .photo-card { margin-bottom: 10px; border-radius: 14px; }
  .photo-meta { font-size: .74rem; padding: 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media print {
  body { background: white; }
  .no-print { display: none; }
  .qr-card { box-shadow: none; border: 2px solid var(--plum); }
}


/* Motyw inspirowany zaproszeniem Mai i Mikołaja */
@import url('https://fonts.googleapis.com/css2?family=Allura&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,500&family=Montserrat:wght@500;600&display=swap');

:root {
  --plum: #34402b;
  --plum-deep: #25281f;
  --iris: #7a8059;
  --rose: #c7807e;
  --blush: #ead1c7;
  --mist: #eee7d5;
  --paper: #f8f1df;
  --ink: #292820;
  --muted: #726b5e;
  --line: rgba(72, 69, 49, .2);
  --shadow: 0 20px 55px rgba(69, 58, 35, .15);
}

body {
  background:
    linear-gradient(rgba(248,241,223,.91), rgba(248,241,223,.91)),
    url('/static/zaproszenie.jpg') center / cover fixed;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.08rem;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  background: url('/static/zaproszenie.jpg') no-repeat;
  filter: saturate(.9);
}

body::before {
  left: -70px;
  bottom: -35px;
  width: min(47vw, 720px);
  height: min(48vw, 620px);
  background-size: 200% auto;
  background-position: left center;
  opacity: .24;
  mask-image: radial-gradient(ellipse at 30% 65%, black 15%, transparent 72%);
}

body::after {
  right: -120px;
  top: -110px;
  width: min(44vw, 660px);
  height: 360px;
  background-size: 190% auto;
  background-position: right top;
  opacity: .2;
  mask-image: linear-gradient(145deg, black, transparent 72%);
}

.site-header {
  padding-top: 28px;
  border-bottom: 1px solid rgba(95, 91, 62, .17);
}

.brand {
  color: var(--ink);
  font-family: "Montserrat", sans-serif;
  font-size: .68rem;
  letter-spacing: .24em;
}

.brand-mark {
  border-color: var(--rose);
  color: var(--rose);
  font-family: "Allura", cursive;
  font-size: 1.8rem;
}

.petal {
  display: none;
}

h1 {
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: -.025em;
  line-height: .96;
}

h1 em {
  color: var(--rose);
  font-family: "Allura", cursive;
  font-size: 1.2em;
  font-weight: 400;
}

h2 {
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.65rem;
  font-weight: 600;
}

.eyebrow {
  color: var(--ink);
  font-family: "Montserrat", sans-serif;
  font-size: .66rem;
  letter-spacing: .28em;
}

.lead {
  color: var(--muted);
  font-size: 1.22rem;
}

.hero-frame {
  min-height: 560px;
  border: 1px solid rgba(88, 83, 55, .18);
  border-radius: 260px 260px 8px 8px;
  background:
    linear-gradient(to top, rgba(41,40,32,.35), transparent 52%),
    url('/static/zaproszenie.jpg') left center / 205% auto no-repeat;
  box-shadow: var(--shadow);
}

.hero-frame::before {
  inset: 16px;
  border: 1px solid rgba(255,248,228,.72);
  border-radius: 245px 245px 4px 4px;
}

.hero-frame::after {
  display: none;
}

.frame-ring {
  border-color: rgba(248,241,223,.75);
}

.frame-date {
  font-family: "Montserrat", sans-serif;
  font-size: .66rem;
  letter-spacing: .3em;
}

.paper-card,
.upload-card,
.guest-row,
.photo-card {
  background:
    linear-gradient(rgba(248,241,223,.95), rgba(248,241,223,.95)),
    url('/static/zaproszenie.jpg') center / cover;
  border: 1px solid rgba(92, 84, 56, .16);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.button {
  border-radius: 2px;
  font-family: "Montserrat", sans-serif;
  font-size: .72rem;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.button.primary {
  background: #465238;
  box-shadow: 0 10px 24px rgba(52,64,43,.2);
}

.button.primary:hover {
  background: #697452;
}

.button.quiet {
  color: #485139;
  background: #e5d6bd;
}

input[type="text"],
input[type="password"] {
  border-radius: 2px;
  background: rgba(255,252,242,.82);
}

input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(199,128,126,.14);
}

.upload-zone {
  border-color: rgba(90,104,68,.38);
  border-radius: 2px;
}

.upload-zone:hover {
  background: rgba(231,211,180,.28);
  border-color: var(--rose);
}

.upload-icon {
  color: #fffaf0;
  background: var(--rose);
  font-family: "Cormorant Garamond", serif;
}

.tabs {
  border: 1px solid rgba(82, 81, 52, .14);
  border-radius: 2px;
  background: rgba(248,241,223,.72);
}

.tabs a {
  border-radius: 1px;
  font-family: "Montserrat", sans-serif;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tabs a.active {
  background: #465238;
}

.photo-card {
  border-radius: 3px;
  padding: 7px 7px 0;
}

.photo-meta {
  font-style: italic;
}

.empty-state,
.empty-compact {
  border-color: rgba(89,99,66,.32);
  border-radius: 3px;
  background: rgba(248,241,223,.45);
}

.guest-initial,
.section-title span {
  color: #fffaf0;
  background: var(--rose);
  font-family: "Cormorant Garamond", serif;
}

.switch input:checked + span {
  background: #657052;
}

.qr-card {
  position: relative;
  background:
    linear-gradient(rgba(248,241,223,.9), rgba(248,241,223,.9)),
    url('/static/zaproszenie.jpg') center / cover;
  border: 1px solid rgba(72,69,49,.28);
}

.qr-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(199,128,126,.4);
  pointer-events: none;
}

footer {
  color: #65604f;
  font-style: italic;
}

@media (max-width: 760px) {
  body::before {
    width: 95vw;
    height: 62vw;
    left: -34vw;
    opacity: .14;
  }

  body::after {
    width: 100vw;
    height: 240px;
    right: -48vw;
    opacity: .12;
  }

  .hero-frame {
    min-height: 390px;
    background-size: 220% auto;
  }

  .guest-hero h1 {
    font-size: clamp(2.7rem, 14vw, 4.8rem);
  }
}

@media print {
  body {
    background: #f8f1df;
  }

  .qr-card {
    border-color: #4f563e;
  }
}


/* Zewnętrzna okładka zaproszenia */
.hero-frame {
  background:
    linear-gradient(to top, rgba(41,40,32,.2), transparent 42%),
    url('/static/zaproszenie.jpg') center / cover no-repeat;
}

body::before {
  background-size: cover;
  background-position: left bottom;
}

body::after {
  background-size: cover;
  background-position: right top;
}

@media (max-width: 760px) {
  .hero-frame {
    background-size: cover;
    background-position: center;
  }
}


.admin-entry {
  color: var(--muted);
  font-family: "Montserrat", sans-serif;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-decoration: none;
  text-transform: uppercase;
  opacity: .62;
  transition: color .2s ease, opacity .2s ease;
}

.admin-entry:hover,
.admin-entry:focus-visible {
  color: var(--rose);
  opacity: 1;
}

.admin-entry:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 5px;
}


.upload-progress {
  margin: 5px 8px 18px;
  text-align: left;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  border: 1px solid rgba(70, 82, 56, .22);
  background: rgba(255, 252, 242, .8);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #7a8059, #c7807e);
  transition: width .15s ease;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 7px;
  color: var(--muted);
  font-size: .84rem;
}

.video-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.video-card {
  padding-top: 7px;
}

.video-card video {
  display: block;
  width: 100%;
  max-height: 520px;
  background: #171813;
  border-radius: 2px;
}

[hidden] {
  display: none !important;
}


.media-filter {
  margin-top: 38px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.media-filter h2,
.media-filter .eyebrow {
  margin-bottom: 0;
}

.filter-form {
  display: flex;
  align-items: end;
  gap: 10px;
}

.filter-form label {
  min-width: min(320px, 36vw);
}

.filter-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0 42px 0 14px;
  background: rgba(255,252,242,.9);
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.05rem;
}

.filter-form select:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(199,128,126,.14);
  outline: none;
}

@media (max-width: 760px) {
  .media-filter,
  .filter-form {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-form label {
    min-width: 0;
  }
}
