/* ── PAŁAC W SKALE ── */
:root {
  --ink: #1a1510;
  --parchment: #f5f0e8;
  --cream: #faf7f2;
  --gold: #8b6914;
  --gold-light: #c9a84c;
  --gold-pale: #e8d49a;
  --stone: #7a7060;
  --stone-light: #b8b0a0;
  --sepia: #5c4a2a;
  --sepia-light: #8b6d42;
  --border: rgba(139, 105, 20, 0.25);
  --shadow: rgba(26, 21, 16, 0.15);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── CUSTOM EASINGS ── */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-inout: cubic-bezier(0.77, 0, 0.175, 1);
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.75;
  overflow-x: hidden;
  font-feature-settings: "kern", "liga", "dlig", "calt", "onum", "swsh";
  font-variant-ligatures: common-ligatures discretionary-ligatures;
  font-variant-numeric: oldstyle-nums proportional-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--gold-pale); color: var(--ink); }
::-moz-selection { background: var(--gold-pale); color: var(--ink); }

/* Section labels keep tabular lining figures for steady tracking */
.section-label, .nav-links a, .nav-logo, .gallery-tab,
.t-year, .arch-feature-num, .f-card-num, .guest-era,
.btn-gold, .btn-outline, .hero-cta, .hero-eyebrow,
.contact-form button, .contact-form label, .c-label,
.footer-links a, .footer-logo {
  font-feature-settings: "kern", "liga";
  font-variant-numeric: lining-nums;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--parchment); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 100px;
  background: rgba(18, 14, 9, 0.97);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(139, 105, 20, 0.35);
  transition: height 0.5s var(--ease-out), background 0.5s var(--ease-out);
}
nav.scrolled {
  height: 88px;
  background: rgba(12, 9, 5, 0.99);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.nav-logo-img {
  height: 78px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(212, 178, 90, 0.25));
  transition: height 0.5s var(--ease-out);
}
nav.scrolled .nav-logo-img {
  height: 62px;
}
.nav-logo span {
  color: var(--gold-light);
  display: block;
  font-size: 10px;
  letter-spacing: 0.35em;
  font-weight: 400;
  margin-top: 3px;
  opacity: 0.85;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}
.nav-links a {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: rgba(245, 240, 232, 0.82);
  text-decoration: none;
  text-transform: uppercase;
  padding: 8px 18px;
  transition: color 0.25s var(--ease-out);
  position: relative;
}
.nav-links a:hover { color: #fff; }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 18px; right: 18px;
  height: 1px;
  background: var(--gold-light);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.35s var(--ease-out);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left center; }

/* Dropdown */
.nav-dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 16, 10, 0.98);
  border: 1px solid var(--border);
  min-width: 240px;
  padding: 12px 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease-out), transform 0.22s var(--ease-out);
  transform: translateX(-50%) translateY(-6px) scale(0.97);
  transform-origin: top center;
}
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}
.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0) scale(1);
}
.dropdown-menu a {
  display: block;
  padding: 8px 24px;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: rgba(245, 240, 232, 0.55);
  white-space: nowrap;
}
.dropdown-menu a:hover { color: var(--gold-light); background: rgba(139, 105, 20, 0.08); }
.dropdown-menu a::after { display: none; }

.nav-lang {
  display: flex;
  gap: 8px;
  align-items: center;
}
.nav-lang a {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: rgba(245, 240, 232, 0.55);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.25s var(--ease-out);
  padding: 4px 8px;
}
.nav-lang a:hover { color: #fff; }
.nav-lang a.active { color: var(--gold-pale); }
.nav-lang-sep { color: rgba(245, 240, 232, 0.25); font-size: 10px; }

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  width: 24px; height: 1px;
  background: var(--gold-light);
  transition: all 0.3s;
  display: block;
}

/* ── HERO ── */
#hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('/pliki/zdjecia/hero.png');
  background-size: cover;
  background-position: center 30%;
  filter: sepia(20%) brightness(0.55);
  transform: scale(1.05);
  animation: heroZoom 20s ease-in-out infinite alternate;
}
@keyframes heroZoom {
  from { transform: scale(1.05); }
  to   { transform: scale(1.12); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 8, 5, 0.2) 0%,
    rgba(10, 8, 5, 0.3) 50%,
    rgba(10, 8, 5, 0.85) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  animation: fadeUp 1.4s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--gold-light);
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 1s ease 0.3s both;
}
.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(56px, 9vw, 110px);
  line-height: 0.95;
  color: var(--parchment);
  letter-spacing: -0.01em;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 1s ease 0.5s both;
}
.hero-title em {
  font-style: italic;
  color: var(--gold-pale);
  font-weight: 300;
}
.hero-subtitle {
  font-family: 'EB Garamond', serif;
  font-size: 18px;
  color: rgba(245, 240, 232, 0.7);
  font-style: italic;
  letter-spacing: 0.03em;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 1s ease 0.7s both;
}
.hero-divider {
  width: 120px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin: 0 auto 48px;
  opacity: 0;
  animation: fadeUp 1s ease 0.9s both;
}
.hero-cta {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-pale);
  text-decoration: none;
  padding: 14px 36px;
  border: 1px solid rgba(201, 168, 76, 0.5);
  position: relative;
  overflow: hidden;
  transition: transform 0.16s var(--ease-out), color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
  opacity: 0;
  animation: fadeUp 1s ease 1.1s both;
}
.hero-cta span { position: relative; z-index: 1; }
.hero-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold-light);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.5s var(--ease-out);
}
.hero-cta:hover::after { clip-path: inset(0 0 0 0); }
.hero-cta:hover {
  border-color: var(--gold-light);
  color: var(--ink);
}
.hero-cta:active { transform: scale(0.97); }
.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeUp 1s ease 1.5s both;
}
.hero-scroll span {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: rgba(245, 240, 232, 0.4);
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(201, 168, 76, 0.6), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ── SECTION BASE ── */
section { position: relative; }

.ornament {
  text-align: center;
  margin: 0 auto 40px;
  color: var(--gold);
  font-size: 20px;
  letter-spacing: 12px;
  opacity: 0.6;
}
.section-label {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 16px;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 24px;
  letter-spacing: -0.015em;
}
.section-title em { font-style: italic; color: var(--sepia-light); font-weight: 400; }
.divider-gold {
  width: 64px;
  height: 1px;
  background: var(--gold);
  margin: 24px 0 32px;
}
.divider-gold.centered { margin-left: auto; margin-right: auto; }

/* ── INTRO ── */
#intro {
  background: var(--ink);
  padding: 100px 48px;
  text-align: center;
  overflow: hidden;
}
#intro::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(139, 105, 20, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(139, 105, 20, 0.06) 0%, transparent 60%);
  pointer-events: none;
}
.intro-inner {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}
#intro .section-label { color: var(--gold-light); }
#intro .section-title { color: var(--parchment); }
#intro .section-title em { color: var(--gold-pale); }
#intro .divider-gold { background: var(--gold-light); }
.intro-text {
  font-size: 20px;
  line-height: 1.8;
  color: rgba(245, 240, 232, 0.7);
  font-style: italic;
}
.intro-year {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 72px;
  font-weight: 600;
  color: rgba(139, 105, 20, 0.15);
  position: absolute;
  right: -40px;
  top: -20px;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

/* ── TIMELINE ── */
#timeline {
  background: var(--parchment);
  padding: 100px 48px;
  position: relative;
}
#timeline::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%238b6914' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.timeline-header {
  text-align: center;
  margin-bottom: 80px;
}
.timeline-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}
.timeline-spine {
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--gold) 10%, var(--gold) 90%, transparent);
  transform: translateX(-50%);
}
.timeline-item {
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  align-items: start;
  margin-bottom: 64px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.timeline-item.visible { opacity: 1; transform: translateY(0); }
.timeline-item:nth-child(odd) .t-content { grid-column: 1; text-align: right; }
.timeline-item:nth-child(odd) .t-empty { grid-column: 3; }
.timeline-item:nth-child(even) .t-content { grid-column: 3; text-align: left; }
.timeline-item:nth-child(even) .t-empty { grid-column: 1; }
.t-dot {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
}
.t-dot-inner {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--parchment);
  position: relative;
  z-index: 1;
  transition: background 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.timeline-item:hover .t-dot-inner { background: var(--gold); transform: scale(1.3); }
.t-year {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gold);
  white-space: nowrap;
}
.t-content h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.3;
}
.t-content p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--stone);
}
.t-content .t-person {
  display: inline-block;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

/* ── ARCHITECTURE ── */
#architecture {
  background: var(--cream);
  padding: 100px 48px;
}
.arch-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.arch-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.arch-img {
  aspect-ratio: 3/4;
  overflow: hidden;
  position: relative;
}
.arch-img:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16/9;
}
.arch-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: sepia(8%) brightness(0.95);
  transition: transform 1.2s var(--ease-out), filter 0.6s var(--ease-out);
}
.arch-img:hover img { transform: scale(1.06); filter: sepia(0%) brightness(1); }
.arch-img::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(139, 105, 20, 0.15);
  pointer-events: none;
}
.arch-text p {
  color: var(--stone);
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 20px;
}
.arch-feature {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  transition: padding-left 0.35s var(--ease-out);
}
.arch-feature:hover { padding-left: 8px; }
.arch-feature-num {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  color: var(--gold);
  min-width: 20px;
  padding-top: 2px;
}
.arch-feature p {
  font-size: 15px;
  color: var(--stone);
  margin: 0;
  line-height: 1.6;
}

/* ── GALLERY ── */
#gallery {
  background: var(--ink);
  padding: 100px 0;
  overflow: hidden;
}
.gallery-header {
  text-align: center;
  padding: 0 48px;
  margin-bottom: 60px;
}
.gallery-header .section-label { color: var(--gold-light); }
.gallery-header .section-title { color: var(--parchment); }
.gallery-header .section-title em { color: var(--gold-pale); }
.gallery-header .divider-gold { background: var(--gold-light); }

.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 48px;
  padding: 0 48px;
}
.gallery-tab {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.4);
  padding: 10px 24px;
  border: 1px solid rgba(139, 105, 20, 0.2);
  cursor: pointer;
  transition: transform 0.16s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), background 0.25s var(--ease-out);
  background: none;
  margin-left: -1px;
}
.gallery-tab:hover { color: var(--gold-light); border-color: var(--gold); }
.gallery-tab:active { transform: scale(0.97); }
.gallery-tab.active {
  color: var(--gold-pale);
  border-color: var(--gold);
  background: rgba(139, 105, 20, 0.1);
}

/* Gallery slider */
.gallery-slider {
  display: none;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 14px;
  padding: 0 48px 20px;
  scrollbar-width: none;
  cursor: grab;
}
.gallery-slider:active { cursor: grabbing; }
.gallery-slider::-webkit-scrollbar { display: none; }
.gallery-slider.active { display: flex; }
.gallery-thumb {
  flex: 0 0 auto;
  width: 380px;
  height: 280px;
  scroll-snap-align: start;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 1px solid rgba(139, 105, 20, 0.15);
}
.gallery-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: sepia(20%) brightness(0.8);
  transition: transform 1s var(--ease-out), filter 0.6s var(--ease-out);
  pointer-events: none;
}
.gallery-thumb:hover img { transform: scale(1.06); filter: sepia(0%) brightness(1); }
.gallery-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 8, 5, 0.4) 0%, transparent 50%);
  transition: opacity 0.35s var(--ease-out);
  pointer-events: none;
}
.gallery-thumb:hover::after { opacity: 0; }

/* Slider nav arrows */
.gallery-nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
  padding: 0 48px;
}
.gallery-arrow {
  width: 48px; height: 48px;
  background: none;
  border: 1px solid rgba(139, 105, 20, 0.4);
  color: var(--gold-pale);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.16s var(--ease-out), border-color 0.25s var(--ease-out), background 0.25s var(--ease-out);
}
.gallery-arrow:hover { border-color: var(--gold-light); background: rgba(139, 105, 20, 0.15); }
.gallery-arrow:active { transform: scale(0.95); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 8, 5, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out);
  backdrop-filter: blur(6px);
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  box-shadow: 0 0 60px rgba(0,0,0,0.5);
  transform: scale(0.95);
  transition: transform 0.5s var(--ease-out);
}
.lightbox.open img { transform: scale(1); }
.lightbox-close {
  position: absolute;
  top: 24px; right: 32px;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: rgba(245, 240, 232, 0.5);
  cursor: pointer;
  text-transform: uppercase;
  transition: color 0.3s;
}
.lightbox-close:hover { color: var(--gold-light); }
.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid rgba(201, 168, 76, 0.4);
  color: var(--gold-pale);
  width: 52px; height: 52px;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.16s var(--ease-out), border-color 0.25s var(--ease-out), background 0.25s var(--ease-out);
  z-index: 2;
}
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
.lightbox-prev:hover, .lightbox-next:hover { border-color: var(--gold-light); background: rgba(139, 105, 20, 0.2); }
.lightbox-prev:active, .lightbox-next:active { transform: translateY(-50%) scale(0.95); }
.lightbox-counter {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: rgba(245, 240, 232, 0.5);
}

/* ── GUESTS ── */
#guests {
  background: var(--parchment);
  padding: 100px 48px;
  position: relative;
  overflow: hidden;
}
#guests::before {
  content: '"';
  position: absolute;
  font-family: 'Cormorant Garamond', serif;
  font-size: 600px;
  line-height: 0.8;
  color: rgba(139, 105, 20, 0.04);
  top: -40px;
  left: -30px;
  pointer-events: none;
  user-select: none;
}
.guests-header { text-align: center; margin-bottom: 72px; }
.guests-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  max-width: 960px;
  margin: 0 auto 72px;
}
.guest-card {
  padding: 40px 32px;
  background: var(--cream);
  text-align: center;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}
.guest-card:nth-child(1) { transition-delay: 0ms; }
.guest-card:nth-child(2) { transition-delay: 50ms; }
.guest-card:nth-child(3) { transition-delay: 100ms; }
.guest-card:nth-child(4) { transition-delay: 150ms; }
.guest-card:nth-child(5) { transition-delay: 200ms; }
.guest-card:nth-child(6) { transition-delay: 250ms; }
.guest-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  transform: scaleX(0);
  transition: transform 0.5s var(--ease-out);
}
.guest-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px var(--shadow); }
.guest-card:hover::before { transform: scaleX(1); }
.guest-era {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.35em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.guest-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.2;
}
.guest-title {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--stone);
  margin-bottom: 16px;
}
.guest-desc {
  font-size: 14px;
  color: var(--stone-light);
  line-height: 1.6;
}
.guest-icon {
  font-size: 28px;
  margin-bottom: 16px;
  filter: sepia(1) hue-rotate(5deg) brightness(0.7);
}

/* ── FOUNDATION ── */
#fundacja {
  background: #0f0d09;
  padding: 100px 48px;
  position: relative;
  overflow: hidden;
}
#fundacja::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/pliki/zdjecia/hero.png');
  background-size: cover;
  background-position: center;
  opacity: 0.08;
  filter: sepia(1);
}
.fundacja-inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}
#fundacja .section-label { color: var(--gold-light); }
#fundacja .section-title { color: var(--parchment); }
#fundacja .divider-gold { background: var(--gold-light); }
.fundacja-text {
  color: rgba(245, 240, 232, 0.65);
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 48px;
}
.fundacja-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  margin-bottom: 48px;
  text-align: left;
}
.f-card {
  padding: 32px 28px;
  background: rgba(245, 240, 232, 0.03);
  border: 1px solid rgba(139, 105, 20, 0.2);
  transition: background 0.4s var(--ease-out), border-color 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  text-decoration: none;
  display: block;
  position: relative;
}
.f-card::after {
  content: '\2192';
  position: absolute;
  bottom: 28px; right: 28px;
  font-size: 18px;
  color: var(--gold-light);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.f-card:hover {
  background: rgba(139, 105, 20, 0.08);
  border-color: rgba(201, 168, 76, 0.4);
  transform: translateY(-3px);
}
.f-card:hover::after { opacity: 1; transform: translateX(0); }
.f-card:active { transform: scale(0.98); }
.f-card-num {
  font-family: 'Cinzel', serif;
  font-size: 32px;
  font-weight: 600;
  color: rgba(139, 105, 20, 0.25);
  margin-bottom: 8px;
  line-height: 1;
}
.f-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: var(--parchment);
  margin-bottom: 8px;
  font-weight: 400;
}
.f-card p {
  font-size: 14px;
  color: rgba(245, 240, 232, 0.45);
  line-height: 1.6;
}
.btn-gold, .btn-outline {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 16px 40px;
  position: relative;
  overflow: hidden;
  transition: transform 0.16s var(--ease-out), color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}
.btn-gold span, .btn-outline span { position: relative; z-index: 1; }
.btn-gold {
  color: var(--ink);
  background: var(--gold-light);
  border: 1px solid var(--gold-light);
}
.btn-gold::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ink);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.5s var(--ease-out);
}
.btn-gold:hover { color: var(--gold-pale); }
.btn-gold:hover::after { clip-path: inset(0 0 0 0); }
.btn-gold:active { transform: scale(0.97); }
.btn-outline {
  color: var(--gold-pale);
  border: 1px solid rgba(201, 168, 76, 0.4);
  background: transparent;
}
.fundacja-btns {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.btn-outline::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold-light);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.5s var(--ease-out);
}
.btn-outline:hover { border-color: var(--gold-light); color: var(--ink); }
.btn-outline:hover::after { clip-path: inset(0 0 0 0); }
.btn-outline:active { transform: scale(0.97); }

/* ── CONTACT ── */
#kontakt {
  background: var(--cream);
  padding: 100px 48px;
  text-align: center;
}
.contact-inner { max-width: 640px; margin: 0 auto; }
.contact-details {
  display: flex;
  justify-content: center;
  gap: 64px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.contact-item { text-align: center; }
.contact-item .c-label {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 8px;
}
.contact-item .c-value {
  font-family: 'EB Garamond', serif;
  font-size: 18px;
  color: var(--ink);
}
.contact-item a.c-value {
  text-decoration: none;
  color: var(--sepia-light);
  transition: color 0.3s;
}
.contact-item a.c-value:hover { color: var(--gold); }

/* Contact Form */
.contact-form {
  max-width: 520px;
  margin: 56px auto 0;
  text-align: left;
}
.contact-form .form-group {
  margin-bottom: 24px;
}
.contact-form label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  font-family: 'EB Garamond', serif;
  font-size: 17px;
  color: var(--ink);
  background: var(--parchment);
  border: 1px solid var(--border);
  outline: none;
  transition: border-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
  line-height: 1.6;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--stone-light);
  font-style: italic;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(139, 105, 20, 0.1);
}
.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}
.contact-form button {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 16px 48px;
  background: var(--gold-light);
  border: 1px solid var(--gold-light);
  cursor: pointer;
  width: 100%;
  position: relative;
  overflow: hidden;
  transition: transform 0.16s var(--ease-out), color 0.35s var(--ease-out);
}
.contact-form button span { position: relative; z-index: 1; }
.contact-form button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ink);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.5s var(--ease-out);
}
.contact-form button:hover { color: var(--gold-pale); }
.contact-form button:hover::after { clip-path: inset(0 0 0 0); }
.contact-form button:active { transform: scale(0.98); }
.contact-form-success {
  text-align: center;
  padding: 32px;
  border: 1px solid var(--border);
  background: var(--parchment);
  display: none;
}
.contact-form-success p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: var(--ink);
  margin: 0;
}

/* ── FOOTER ── */
footer {
  background: var(--ink);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(139, 105, 20, 0.2);
  flex-wrap: wrap;
  gap: 24px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: 'Cinzel', serif;
  font-size: 18px;
  letter-spacing: 0.2em;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.footer-logo-img {
  height: 224px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.3s;
}
.footer-logo:hover .footer-logo-img {
  opacity: 0.8;
}
.footer-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.footer-links a {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.25s var(--ease-out);
}
.footer-links a:hover { color: var(--gold-light); }
.footer-copy {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Cinzel', serif;
  letter-spacing: 0.15em;
  line-height: 1.8;
}
.footer-copy a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.25s var(--ease-out);
}
.footer-copy a:hover { color: var(--gold-light); }

/* ── SUBPAGE STYLES ── */
.subpage-hero {
  background: var(--ink);
  padding: 160px 48px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.subpage-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/pliki/zdjecia/hero.png');
  background-size: cover;
  background-position: center 30%;
  filter: sepia(30%) brightness(0.3);
  opacity: 0.5;
}
.subpage-hero .hero-content {
  position: relative;
  z-index: 2;
  animation: none;
  opacity: 1;
}
.subpage-hero .section-label { color: var(--gold-light); }
.subpage-hero .section-title {
  color: var(--parchment);
  margin-bottom: 0;
}
.subpage-hero .section-title em { color: var(--gold-pale); }

.subpage-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 80px 48px;
}
.subpage-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 400;
  color: var(--ink);
  margin: 48px 0 16px;
  line-height: 1.2;
}
.subpage-content h2:first-child { margin-top: 0; }
/* nagłówek nie chowa się pod stałą nawigacją przy skoku do kotwicy */
.subpage-content h2[id] { scroll-margin-top: 130px; }
.subpage-content h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--sepia);
  margin: 32px 0 12px;
  line-height: 1.3;
}
.subpage-content p {
  color: var(--stone);
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 16px;
}
.subpage-content ul, .subpage-content ol {
  color: var(--stone);
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 16px;
  padding-left: 24px;
}
.subpage-content li { margin-bottom: 8px; }

/* Document download cards */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 32px 0;
}
.doc-card {
  padding: 28px 24px;
  background: var(--parchment);
  border: 1px solid var(--border);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.doc-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--shadow);
  border-color: var(--gold);
}
.doc-card .doc-icon {
  font-size: 28px;
  filter: sepia(1) brightness(0.6);
}
.doc-card h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}
.doc-card p {
  font-size: 13px;
  color: var(--stone-light);
  line-height: 1.5;
  margin: 0;
}
.doc-card .doc-dl {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: auto;
}

/* Support page specific */
.support-box {
  background: var(--parchment);
  border: 1px solid var(--border);
  padding: 40px;
  margin: 32px 0;
  text-align: center;
}
.support-box h3 {
  margin-top: 0;
}
.bank-details {
  background: var(--parchment);
  border: 1px solid var(--border);
  padding: 32px;
  margin: 24px 0;
  font-family: 'EB Garamond', serif;
}
.bank-details p {
  margin-bottom: 8px;
  font-size: 16px;
}
.bank-details strong {
  color: var(--ink);
  font-weight: 500;
}
.bank-details .account-number {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  letter-spacing: 0.1em;
  color: var(--gold);
  display: block;
  margin: 12px 0;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  margin-bottom: 40px;
  transition: color 0.3s;
}
.back-link:hover { color: var(--gold-light); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav { padding: 0 24px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    bottom: auto;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    background: rgba(15, 13, 9, 0.98);
    padding: 24px 24px 32px;
    gap: 0;
    border-bottom: 1px solid rgba(139, 105, 20, 0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,.5);
  }
  .nav-links.open li {
    border-bottom: 1px solid rgba(255,255,255,.05);
  }
  .nav-links.open li:last-child { border-bottom: none; }
  .nav-links a { font-size: 14px; padding: 16px 0; display: block; }
  .dropdown-menu {
    position: static;
    transform: none !important;
    opacity: 1;
    pointer-events: all;
    background: rgba(255,255,255,0.03);
    border: none;
    padding-left: 16px;
    display: none;
  }
  .nav-dropdown.open .dropdown-menu {
    display: block;
  }
  .hamburger { display: flex; }
  .nav-lang { display: none; }

  section, #gallery { padding: 72px 24px; }
  #gallery { padding: 72px 0; }
  .gallery-slider { padding: 0 24px 16px; gap: 10px; }
  .gallery-thumb { width: 280px; height: 210px; }
  .gallery-nav { padding: 0 24px; }

  .arch-grid { grid-template-columns: 1fr; gap: 48px; }
  .arch-images { order: -1; }
  .guests-grid { grid-template-columns: 1fr; gap: 2px; }
  .fundacja-cards { grid-template-columns: 1fr; }
  .timeline-spine { left: 20px; }
  .timeline-container { padding-left: 0; }
  .timeline-item {
    display: grid;
    grid-template-columns: 40px 1fr;
    grid-template-rows: auto auto;
    gap: 0 16px;
    padding-left: 0;
    position: relative;
    margin-bottom: 0;
    padding-bottom: 48px;
  }
  .timeline-item:last-child { padding-bottom: 0; }
  .timeline-item::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 14px;
    bottom: 0;
    width: 1px;
    background: var(--gold);
  }
  .timeline-item:last-child::before { display: none; }
  .t-dot {
    grid-column: 1;
    grid-row: 1 / 3;
    position: static;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-top: 0;
  }
  .t-year {
    font-size: 13px;
    letter-spacing: 0.06em;
    writing-mode: horizontal-tb;
    white-space: nowrap;
  }
  .timeline-item:nth-child(odd) .t-content,
  .timeline-item:nth-child(even) .t-content {
    grid-column: 2;
    grid-row: 1 / 3;
    text-align: left;
  }
  .t-empty { display: none; }
  .contact-details { gap: 40px; }
  footer { flex-direction: column; align-items: flex-start; }
  .footer-logo { margin-left: 0; }
  .footer-links { flex-wrap: wrap; gap: 20px; }

  .subpage-hero { padding: 120px 24px 60px; }
  .subpage-content { padding: 60px 24px; }
  .doc-grid { grid-template-columns: 1fr; }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .timeline-item { opacity: 1; transform: none; }
}

/* ── OBSERVE ANIMATION ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }


/* ── COOKIE CONSENT BANNER ── */
#pws-cookie-banner {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 10000;
  max-width: 720px;
  margin: 0 auto;
  background: var(--ink);
  color: var(--cream);
  border: 1px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  font-family: 'EB Garamond', Georgia, serif;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
#pws-cookie-banner.visible { opacity: 1; transform: translateY(0); }
.pws-cookie-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 28px;
}
.pws-cookie-text strong {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 8px;
}
.pws-cookie-text p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--parchment);
  margin: 0;
}
.pws-cookie-text a {
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pws-cookie-text a:hover { color: var(--gold-pale); }
.pws-cookie-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.pws-cookie-btn {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-light);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.pws-cookie-btn:hover { background: var(--gold); color: var(--ink); }
.pws-cookie-accept { background: var(--gold); color: var(--ink); }
.pws-cookie-accept:hover { background: var(--gold-light); border-color: var(--gold-light); }
@media (min-width: 720px) {
  .pws-cookie-inner { flex-direction: row; align-items: center; }
  .pws-cookie-text { flex: 1; }
  .pws-cookie-buttons { justify-content: flex-end; flex-shrink: 0; }
}
@media (max-width: 540px) {
  #pws-cookie-banner { left: 12px; right: 12px; bottom: 12px; }
  .pws-cookie-inner { padding: 20px; }
  .pws-cookie-buttons { justify-content: stretch; }
  .pws-cookie-btn { flex: 1; }
}


/* ────────────────────────────────────────────────
   POLISH · ADAPT · DELIGHT
   ──────────────────────────────────────────────── */

/* Scroll progress ribbon */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--gold), var(--gold-light), var(--gold-pale));
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 200;
  pointer-events: none;
  box-shadow: 0 1px 8px rgba(201, 168, 76, 0.5);
  transition: transform 0.08s linear;
}

/* Hero — film grain + vignette + letterpress title */
.hero-bg {
  will-change: transform;
  transition: transform 0.05s linear;
}
.hero-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(8, 6, 3, 0.55) 100%),
    radial-gradient(ellipse 80% 60% at 50% 35%, transparent 60%, rgba(8, 6, 3, 0.35) 100%);
  z-index: 1;
}
.hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.6' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
  animation: grainShift 7s steps(6) infinite;
}
@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -2%); }
  80%  { transform: translate(3%, 1%); }
  100% { transform: translate(0, 0); }
}
.hero-title {
  text-shadow:
    0 1px 0 rgba(0,0,0,0.4),
    0 2px 14px rgba(0,0,0,0.55),
    0 0 80px rgba(201, 168, 76, 0.08);
}
.hero-eyebrow {
  font-variant-numeric: lining-nums;
}

/* Hero divider — fleuron */
.hero-divider {
  width: 220px;
  height: auto;
  background: none !important;
  margin: 0 auto 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  position: relative;
}
.hero-divider::before,
.hero-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-light));
}
.hero-divider::after {
  background: linear-gradient(to left, transparent, var(--gold-light));
}
.hero-divider .fleuron {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: var(--gold-pale);
  line-height: 1;
  text-shadow: 0 0 12px rgba(201, 168, 76, 0.4);
}

/* Hero CTA — gold sweep on hover */
.hero-cta { position: relative; overflow: hidden; isolation: isolate; }
.hero-cta span { position: relative; z-index: 2; }
.hero-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(201, 168, 76, 0.25) 50%, transparent 60%);
  transform: translateX(-110%);
  transition: transform 0.7s ease;
  z-index: 1;
}
.hero-cta:hover::before { transform: translateX(110%); }

/* Section title em — animated gold underline */
.section-title em {
  position: relative;
  display: inline-block;
}
.section-title em::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -0.05em;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 1.4s cubic-bezier(.2,.7,.2,1) 0.2s;
}
.reveal.visible .section-title em::after,
.timeline-header.visible .section-title em::after,
.gallery-header.visible .section-title em::after,
.guests-header.visible .section-title em::after { transform: scaleX(1); }
.section-title.in-view em::after { transform: scaleX(1); }

/* Ornament break between sections */
.ornament-break {
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 24px;
  position: relative;
}
.ornament-break::before,
.ornament-break::after {
  content: '';
  width: 90px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold) 50%, transparent);
}
.ornament-break span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: var(--gold);
  margin: 0 22px;
  letter-spacing: 0.3em;
  opacity: 0.9;
  display: inline-block;
  transform: translateY(-2px);
}

/* Refined guest icons — unicode glyphs */
.guest-icon {
  font-family: 'Cormorant Garamond', 'EB Garamond', 'Apple Symbols', serif;
  font-size: 38px !important;
  line-height: 1;
  margin-bottom: 18px !important;
  color: var(--gold) !important;
  filter: none !important;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6), 0 2px 6px rgba(139, 105, 20, 0.15);
  transition: transform 0.5s cubic-bezier(.2,.7,.2,1), color 0.4s;
}
.guest-card:hover .guest-icon {
  transform: scale(1.12) rotate(-3deg);
  color: var(--gold-light) !important;
}

/* Guest cards — gold corner accents */
.guest-card::after {
  content: '';
  position: absolute;
  top: 12px; left: 12px; right: 12px; bottom: 12px;
  border: 1px solid transparent;
  pointer-events: none;
  transition: border-color 0.5s ease;
}
.guest-card:hover::after {
  border-color: rgba(201, 168, 76, 0.18);
}

/* F-cards — animated gold corner brackets */
.f-card { position: relative; overflow: hidden; }
.f-card::before,
.f-card::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid var(--gold-light);
  opacity: 0;
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.f-card::before {
  top: 10px; left: 10px;
  border-right: none;
  border-bottom: none;
  transform: translate(6px, 6px);
}
.f-card::after {
  bottom: 10px; right: 10px;
  border-left: none;
  border-top: none;
  transform: translate(-6px, -6px);
}
.f-card:hover::before,
.f-card:hover::after {
  opacity: 0.75;
  transform: translate(0, 0);
}
.f-card h3 { transition: color 0.3s; }
.f-card:hover h3 { color: var(--gold-pale); }

/* Timeline — soften the dot pulse on visible */
.timeline-item.visible .t-dot-inner {
  box-shadow: 0 0 0 0 rgba(139, 105, 20, 0.4);
  animation: dotPulse 2.4s ease-out 0.4s 1;
}
@keyframes dotPulse {
  0%   { box-shadow: 0 0 0 0 rgba(139, 105, 20, 0.5); }
  100% { box-shadow: 0 0 0 14px rgba(139, 105, 20, 0); }
}

/* Gallery thumbs — refined caption hint */
.gallery-thumb {
  outline: 1px solid rgba(201, 168, 76, 0);
  outline-offset: -1px;
  transition: outline-color 0.4s ease;
}
.gallery-thumb:hover { outline-color: rgba(201, 168, 76, 0.4); }

/* Refine intro-year — slow drift */
.intro-year {
  animation: yearDrift 18s ease-in-out infinite alternate;
}
@keyframes yearDrift {
  from { transform: translateY(-4px); }
  to   { transform: translateY(4px); }
}

/* Footer logo subtle glow on hover */
footer { position: relative; }
footer::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  width: 120px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  transform: translateX(-50%);
  opacity: 0.5;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-bg, .hero-grain, .intro-year { animation: none !important; }
  .hero-cta::before { display: none; }
  * { transition-duration: 0.001s !important; }
}

/* Mobile fine-tuning */
@media (max-width: 900px) {
  .ornament-break { padding: 28px 16px; }
  .ornament-break::before, .ornament-break::after { width: 50px; }
  .scroll-progress { height: 2px; }
  .hero-divider { width: 180px; }
}

/* ═══════════════════════════════════════════════════════════
   EUROPEJSKIE DNI DZIEDZICTWA 2026 — TOP BAR + PLAKAT
   Wydarzenie: 26 września 2026. Po tej dacie skrypt
   /edd-2026.js sam ukrywa pasek i popup.
   ═══════════════════════════════════════════════════════════ */

:root { --topbar-h: 0px; }
body.has-topbar { --topbar-h: 46px; }

/* Nav i pasek postępu ustępują miejsca beleczce */
body.has-topbar nav { top: var(--topbar-h); }
body.has-topbar .scroll-progress { top: var(--topbar-h); }

/* ── BELECZKA ── */
.edd-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 150;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  overflow: hidden;
  text-decoration: none;
  background:
    linear-gradient(90deg, rgba(139,105,20,0) 0%, rgba(139,105,20,0.28) 50%, rgba(139,105,20,0) 100%),
    linear-gradient(180deg, #2b2216 0%, #16110a 100%);
  border-bottom: 1px solid rgba(201, 168, 76, 0.3);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
  -webkit-tap-highlight-color: transparent;
}
/* Złoty włos u góry */
.edd-topbar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light) 25%, var(--gold-pale) 50%, var(--gold-light) 75%, transparent);
  opacity: 0.75;
  z-index: 3;
}
/* Miękkie wygaszenie treści na krawędziach */
.edd-topbar::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(90deg, #191309 0%, rgba(25,19,9,0) 7%, rgba(25,19,9,0) 93%, #191309 100%);
}

.edd-topbar-track {
  display: flex;
  flex: none;
  align-items: center;
  white-space: nowrap;
  padding-left: 24px;
}
.edd-topbar-track.edd-running {
  padding-left: 0;
  will-change: transform;
  animation: eddMarquee var(--edd-dur, 44s) linear infinite;
}
@keyframes eddMarquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
.edd-topbar:hover .edd-topbar-track.edd-running,
.edd-topbar:focus-visible .edd-topbar-track.edd-running {
  animation-play-state: paused;
}

.edd-seq { display: flex; align-items: center; flex: none; }

.edd-i {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-pale);
  padding: 0 22px;
  font-feature-settings: "kern", "liga";
  font-variant-numeric: lining-nums;
  transition: color 0.4s var(--ease-out);
}
.edd-i-lead { color: #f4ead0; }
.edd-i-date { color: var(--gold-light); }
.edd-i-cta {
  color: var(--ink);
  background: var(--gold-light);
  padding: 4px 18px;
  letter-spacing: 0.22em;
  margin: 0 22px;
}
.edd-f {
  font-style: normal;
  font-size: 12px;
  color: var(--gold);
  opacity: 0.8;
  line-height: 1;
}
.edd-topbar:hover .edd-i { color: #fff6e0; }
.edd-topbar:hover .edd-i-cta { color: var(--ink); background: var(--gold-pale); }

@media (max-width: 900px) {
  body.has-topbar { --topbar-h: 40px; }
  .edd-i { font-size: 9.5px; letter-spacing: 0.22em; padding: 0 16px; }
  .edd-i-cta { padding: 3px 14px; margin: 0 16px; }
  /* Menu mobilne startuje pod beleczką */
  body.has-topbar .nav-links.open {
    top: calc(100px + var(--topbar-h));
    max-height: calc(100vh - 100px - var(--topbar-h));
  }
}

@media (prefers-reduced-motion: reduce) {
  .edd-topbar-track.edd-running { animation: none !important; }
}

/* ── PLAKAT (MODAL) ── */
.edd-modal {
  position: fixed;
  inset: 0;
  /* Poniżej banera cookies (10000) — zgoda zawsze ma pierwszeństwo. */
  z-index: 9000;
  display: none;
  /* Panel centruje się przez margin:auto na .edd-modal-panel —
     przy niskim oknie treść się przewija, zamiast obcinać górę. */
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 40px 20px;
}
.edd-modal.open { display: flex; }

.edd-modal-backdrop {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(24, 18, 10, 0.82) 0%, rgba(7, 5, 3, 0.96) 100%);
  backdrop-filter: blur(7px) saturate(120%);
  -webkit-backdrop-filter: blur(7px) saturate(120%);
  animation: eddFade 0.55s var(--ease-out) both;
  border: 0;
  cursor: pointer;
}
@keyframes eddFade { from { opacity: 0; } to { opacity: 1; } }

.edd-modal-panel {
  position: relative;
  z-index: 2;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  padding: 10px;
  background: var(--parchment);
  border: 1px solid rgba(201, 168, 76, 0.55);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(0, 0, 0, 0.4);
  animation: eddRise 0.75s var(--ease-out) both;
  animation-delay: 0.08s;
}
/* Passe-partout — podwójna listwa jak w ramie rytowniczej */
.edd-modal-panel::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(139, 105, 20, 0.3);
  pointer-events: none;
  z-index: 3;
}
@keyframes eddRise {
  from { opacity: 0; transform: translateY(26px) scale(0.965); }
  to   { opacity: 1; transform: none; }
}

.edd-poster {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(78vh, 1000px);
  object-fit: contain;
}

.edd-modal-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 18px 12px 8px;
}
.edd-modal-cta {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 34px;
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background: var(--gold-light);
  border: 1px solid var(--gold-light);
  transition: transform 0.16s var(--ease-out), color 0.35s var(--ease-out);
  font-variant-numeric: lining-nums;
}
.edd-modal-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ink);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.5s var(--ease-out);
}
.edd-modal-cta span { position: relative; z-index: 1; }
.edd-modal-cta:hover { color: var(--gold-pale); }
.edd-modal-cta:hover::after { clip-path: inset(0 0 0 0); }
.edd-modal-cta:active { transform: scale(0.97); }

.edd-modal-later {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(122, 112, 96, 0.35);
  padding: 4px 2px;
  cursor: pointer;
  transition: color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}
.edd-modal-later:hover { color: var(--sepia); border-color: var(--gold); }

.edd-modal-close {
  position: absolute;
  top: -18px;
  right: -18px;
  z-index: 4;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  line-height: 1;
  color: var(--gold-pale);
  background: rgba(18, 14, 9, 0.97);
  border: 1px solid rgba(201, 168, 76, 0.45);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.35s var(--ease-out), background 0.35s var(--ease-out),
              transform 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}
.edd-modal-close:hover {
  color: var(--ink);
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: rotate(90deg);
}

@media (max-width: 900px) {
  .edd-modal { padding: 28px 16px; }
  .edd-poster { max-height: 64vh; }
  .edd-modal-close { top: -14px; right: -8px; width: 40px; height: 40px; font-size: 23px; }
  .edd-modal-foot { gap: 14px; padding: 14px 8px 6px; }
  .edd-modal-cta { padding: 13px 26px; font-size: 10px; letter-spacing: 0.2em; }
}

@media (prefers-reduced-motion: reduce) {
  .edd-modal-panel, .edd-modal-backdrop { animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   PROGRAM WYDARZENIA — podstrona Wieńcowin
   ═══════════════════════════════════════════════════════════ */

/* Nadtytuł nad tytułem podstrony */
.evt-badge {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--gold-light);
  padding: 7px 20px;
  margin-bottom: 22px;
  font-variant-numeric: lining-nums;
}
.subpage-hero .evt-date {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(19px, 2.6vw, 25px);
  font-weight: 300;
  color: var(--gold-pale);
  margin-top: 18px;
  letter-spacing: 0.02em;
  font-variant-numeric: lining-nums;
}

/* Pasek faktów: data · miejsce · wstęp · telefon */
.evt-facts {
  display: grid;
  /* jawne kolumny — auto-fit zostawiał pustą komórkę w drugim rzędzie */
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin: 0 0 56px;
}
.evt-fact {
  background: var(--parchment);
  padding: 24px 26px;
}
.evt-fact dt {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 9px;
}
.evt-fact dd {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  line-height: 1.35;
  color: var(--ink);
  margin: 0;
  font-variant-numeric: lining-nums;
}
.evt-fact dd a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--gold); }
.evt-fact dd a:hover { color: var(--gold); }
.evt-fact dd small {
  display: block;
  font-family: 'EB Garamond', serif;
  font-size: 14px;
  color: var(--stone);
  margin-top: 4px;
}

/* Harmonogram — godzina, złota oś, treść */
.evt-schedule {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
}
.evt-slot {
  position: relative;
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 0 40px;
  padding-bottom: 48px;
  margin-bottom: 0;
}
.evt-slot:last-child { padding-bottom: 0; }
/* oś biegnie w przerwie między kolumnami */
.evt-slot::before {
  content: '';
  position: absolute;
  left: 138px;
  top: 14px;
  bottom: -4px;
  width: 1px;
  background: rgba(139, 105, 20, 0.28);
}
.evt-slot:last-child::before { display: none; }
.evt-slot::after {
  content: '';
  position: absolute;
  left: 135px;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px var(--cream);
}
.evt-time {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--gold);
  text-align: right;
  padding-top: 5px;
  white-space: nowrap;
  font-variant-numeric: lining-nums;
}
.evt-body h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 25px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 10px;
  line-height: 1.25;
}
.evt-body p {
  color: var(--stone);
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 12px;
}
.evt-body p:last-child { margin-bottom: 0; }
.evt-who {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-style: italic;
  color: var(--sepia);
  margin-bottom: 8px !important;
}

/* Zespoły i artystki — kartoniki */
.evt-tags {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.evt-tags li {
  font-family: 'EB Garamond', serif;
  font-size: 15px;
  line-height: 1.4;
  color: var(--sepia);
  background: rgba(139, 105, 20, 0.06);
  border: 1px solid var(--border);
  padding: 7px 15px;
  margin: 0;
}

/* Blok „przez cały dzień" */
.evt-allday {
  position: relative;
  margin: 8px 0 0;
  padding: 34px 38px;
  background: var(--parchment);
  border: 1px solid var(--border);
}
.evt-allday::before {
  content: '\275E';
  position: absolute;
  top: 18px;
  right: 24px;
  font-size: 15px;
  color: var(--gold);
  opacity: 0.5;
}
.evt-allday h3 {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
}
.evt-allday ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.evt-allday li {
  color: var(--stone);
  font-size: 17px;
  line-height: 1.7;
  padding: 12px 0 12px 22px;
  border-top: 1px solid rgba(139, 105, 20, 0.16);
  position: relative;
  margin: 0;
}
.evt-allday li:first-child { border-top: 0; padding-top: 0; }
.evt-allday li::before {
  content: '\2014';
  position: absolute;
  left: 0;
  color: var(--gold);
  opacity: 0.6;
}
.evt-allday li strong { color: var(--sepia); font-weight: 500; }

/* Organizatorzy */
.evt-partners {
  display: grid;
  /* 4 pozycje w układzie 2x2 — auto-fit zostawiał pustą komórkę */
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin: 32px 0 0;
}
.evt-partner {
  background: var(--cream);
  padding: 22px 24px;
}
.evt-partner dt {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.evt-partner dd {
  font-family: 'EB Garamond', serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--sepia);
  margin: 0;
}

/* Podgląd plakatu */
.evt-poster-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 8px 0 0;
}
.evt-poster-thumb {
  display: block;
  width: 132px;
  flex: none;
  border: 1px solid var(--border);
  padding: 6px;
  background: var(--parchment);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out),
              border-color 0.35s var(--ease-out);
}
.evt-poster-thumb img { display: block; width: 100%; height: auto; }
.evt-poster-thumb:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px var(--shadow);
  border-color: var(--gold);
}

/* Archiwum poprzedniej edycji */
.evt-past {
  margin-top: 24px;
  padding: 32px 36px;
  background: rgba(139, 105, 20, 0.04);
  border-left: 2px solid var(--gold-pale);
}
.evt-past p:last-child { margin-bottom: 0; }

@media (max-width: 900px) {
  .evt-facts { grid-template-columns: repeat(2, 1fr); margin-bottom: 44px; }
  .evt-fact { padding: 20px 22px; }
  .evt-slot {
    grid-template-columns: 1fr;
    gap: 0;
    padding-left: 26px;
    padding-bottom: 38px;
  }
  .evt-slot::before { left: 3px; top: 16px; bottom: -2px; }
  .evt-slot::after { left: 0; top: 12px; }
  .evt-time { text-align: left; padding-top: 0; margin-bottom: 10px; }
  .evt-body h3 { font-size: 22px; }
  .evt-allday { padding: 26px 24px; }
  .evt-past { padding: 24px 22px; }
  .evt-poster-row { gap: 16px; }
}

@media (max-width: 460px) {
  .evt-facts { grid-template-columns: 1fr; }
  .evt-partners { grid-template-columns: 1fr; }
}
