/* =============================================
   GLOBAL RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Palette — bordeaux on soft blush & sage */
  --color-bg: #faf7f4;
  --color-bg-alt: #f3ebe5;
  --color-bordeaux: #4d0707;
  --color-bordeaux-deep: #3a0505;
  --color-blush: #d8a7a0;
  --color-blush-deep: #bd857d;
  --color-blush-soft: #efd6d0;
  --color-sage: #9caa92;
  --color-sage-deep: #6f7e66;
  --color-espresso: #2e2a28;
  --color-text: #45403c;
  --color-muted: #8d837d;
  --color-line: rgba(46, 42, 40, 0.12);
  --color-white: #ffffff;
  --color-ecru: #f4ecda; /* ciepła, masełkowa biel dla tekstu na ciemnym tle */

  /* Type */
  --font-script: 'Luxurious Script', cursive;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  /* Type sizes */
  --fz-eyebrow: clamp(1.25rem, 3.2vw, 1.9rem);

  /* Shape & depth */
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-soft: 0 22px 60px rgba(46, 42, 40, 0.10);
  --shadow-card: 0 12px 36px rgba(46, 42, 40, 0.07);
  --shadow-deep: 0 30px 80px rgba(46, 42, 40, 0.28);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-serif);
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--color-blush-soft);
  color: var(--color-espresso);
}

/* Shared eyebrow label */
.eyebrow,
.hero__invite,
.location__lead,
.location__transport-title,
.gifts__lead,
.gallery__lead,
.contact__lead {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--fz-eyebrow);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--color-bordeaux);
}

/* =============================================
   REVEAL ON SCROLL
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   ORNAMENT DIVIDER
   ============================================= */
.ornament {
  display: flex;
  align-items: center;
  gap: 0;
  width: min(240px, 70%);
}

.ornament span:first-child,
.ornament span:last-child {
  flex: 1;
  height: 1px;
  background: var(--color-bordeaux);
}

.ornament--light span:first-child,
.ornament--light span:last-child {
  background: var(--color-sage);
}

.ornament__diamond {
  display: none;
}

/* =============================================
   NAWIGACJA
   ============================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 2.4rem;
  background: rgba(250, 247, 244, 0);
  backdrop-filter: blur(0px);
  transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

.nav.is-scrolled {
  background: rgba(250, 247, 244, 0.85);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--color-line), 0 8px 30px rgba(46, 42, 40, 0.05);
  padding: 0.75rem 2.4rem;
}

.nav__brand {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--color-bordeaux);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.3s ease, transform 0.3s ease;
}

.nav__brand:hover {
  transform: scale(1.05);
  color: var(--color-bordeaux-deep);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav__links a {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-espresso);
  text-decoration: none;
  padding: 0.25rem 0;
  position: relative;
  transition: color 0.3s ease;
}

.nav__links a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 0;
  height: 1.5px;
  background: var(--color-bordeaux);
  border-radius: 2px;
  transition: width 0.35s ease, left 0.35s ease;
}

.nav__links a:hover {
  color: var(--color-bordeaux);
}

.nav__links a:hover::after {
  width: 100%;
  left: 0;
}

.nav__toggle {
  display: none;
  width: 36px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
}

.nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-espresso);
  margin: 6px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  border-radius: 2px;
}

.nav__toggle.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav__toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav__toggle.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* =============================================
   SEKCJA 1: HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: -20px;
  background-image: url('fotos/bg2.jpg');
  background-size: cover;
  background-position: center 20%;
  background-repeat: no-repeat;
  transform: scale(1.05);
  animation: slowZoom 22s ease-in-out infinite alternate;
}

@keyframes slowZoom {
  from { transform: scale(1.05); }
  to { transform: scale(1.14); }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(250, 247, 244, 0.5), transparent 60%),
    linear-gradient(
      to bottom,
      rgba(250, 247, 244, 0.82) 0%,
      rgba(250, 247, 244, 0.62) 40%,
      rgba(239, 214, 208, 0.35) 100%
    );
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}

.hero__invite {
  text-shadow: 0 1px 10px rgba(250, 247, 244, 0.9);
}

.hero__names {
  font-family: var(--font-script);
  font-size: clamp(5rem, 17vw, 13rem);
  font-weight: 400;
  color: var(--color-bordeaux);
  line-height: 0.95;
  text-shadow: 0 4px 30px rgba(250, 247, 244, 0.8);
}

.hero__date {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-sans);
  font-size: var(--fz-eyebrow);
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--color-ecru);
  text-transform: uppercase;
  text-shadow: 0 2px 14px rgba(46, 42, 40, 0.5);
}

.hero__date-sep {
  color: var(--color-ecru);
  font-weight: 400;
}

.hero__time {
  font-family: var(--font-sans);
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-ecru);
  text-shadow: 0 2px 14px rgba(46, 42, 40, 0.5);
}

/* Countdown — minimalist cards */
.hero__countdown {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.countdown__block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 1rem 0.75rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
}

.countdown__value {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 400;
  color: var(--color-bordeaux);
  line-height: 1;
}

.countdown__label {
  font-family: var(--font-sans);
  font-size: clamp(0.58rem, 1.2vw, 0.7rem);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 0.5rem;
}

.countdown__sep {
  display: none;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 40px;
  border: 1.5px solid var(--color-espresso);
  border-radius: 12px;
  z-index: 1;
  opacity: 0.45;
}

.hero__scroll span {
  display: block;
  width: 3px;
  height: 8px;
  background: var(--color-espresso);
  border-radius: 2px;
  margin: 6px auto 0;
  animation: scrollDot 1.8s ease-in-out infinite;
}

@keyframes scrollDot {
  0%, 20% { transform: translateY(0); opacity: 1; }
  80%, 100% { transform: translateY(14px); opacity: 0; }
}

/* =============================================
   SEKCJA 2: LOKALIZACJA
   ============================================= */
.location {
  background: var(--color-bordeaux);
  color: var(--color-ecru);
  padding: 7rem 1.5rem;
  text-align: center;
  position: relative;
}

.location::before,
.location::after {
  content: none;
}

/* Akcenty na bordowym tle */
.location__lead {
  color: var(--color-ecru);
  white-space: nowrap;
  letter-spacing: 0.22em;
  font-size: clamp(0.72rem, 3.5vw, 1.9rem);
}

.location .ornament--light span:first-child,
.location .ornament--light span:last-child {
  background: rgba(255, 255, 255, 0.6);
}

.location__inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

.location__title {
  font-family: var(--font-script);
  font-size: clamp(2.6rem, 6.8vw, 4.6rem);
  font-weight: 400;
  line-height: 0.9;
  color: var(--color-ecru);
}

.location__map {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 7;
  box-shadow: var(--shadow-deep);
  margin-top: 0.5rem;
}

.location__map iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.location__transport {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  margin-top: 1rem;
}

.location__transport-title {
  color: var(--color-ecru);
}

.location__transport-text {
  font-family: var(--font-sans);
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  font-weight: 300;
  line-height: 1.45;
  color: var(--color-ecru);
}

/* =============================================
   PRZERWA: ZDJĘCIE (parallax)
   ============================================= */
.photo-break {
  position: relative;
}

.photo-break__image {
  width: 100%;
  min-height: 55vh;
  background-image: url('fotos/galeria/ (128).jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* =============================================
   SEKCJA 3: ZDJĘCIE B&W + RSVP
   ============================================= */
.bw-photo {
  position: relative;
}

.bw-photo__image {
  width: 100%;
  min-height: 62vh;
  background-image: url('fotos/IMG_1633.JPG');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  filter: grayscale(100%) contrast(1.04);
}

.bw-photo__banner {
  background: var(--color-ecru);
  text-align: center;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}

.bw-photo__banner p {
  font-family: var(--font-sans);
  font-size: var(--fz-eyebrow);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-bordeaux);
}

.bw-photo__banner strong {
  font-weight: 500;
  color: var(--color-bordeaux);
}

/* =============================================
   SEKCJA: PREZENTY
   ============================================= */
.gifts {
  background: var(--color-ecru);
  padding: 7rem 1.5rem;
  text-align: center;
}

.gifts__inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
}

.gifts__icon {
  color: var(--color-bordeaux);
  line-height: 0;
  width: clamp(26px, 5vw, 34px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gifts__icon svg {
  width: 100%;
  height: auto;
}

.gifts__poem {
  font-family: var(--font-script);
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  font-weight: 400;
  font-style: normal;
  line-height: 1.2;
  color: var(--color-bordeaux);
}

/* =============================================
   SEKCJA 4: GALERIA
   ============================================= */
.gallery {
  background: var(--color-bordeaux);
  padding: 7rem 1.5rem 6rem;
  position: relative;
}

.gallery__header {
  max-width: 900px;
  margin: 0 auto 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.gallery__title {
  font-family: var(--font-script);
  font-size: clamp(3.5rem, 9vw, 6rem);
  font-weight: 400;
  color: var(--color-bordeaux);
  line-height: 1;
}

.gallery__sub {
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  font-style: italic;
  color: var(--color-muted);
}

.gallery__grid {
  max-width: 1400px;
  margin: 0 auto;
  column-count: 4;
  column-gap: 16px;
}

.gallery__item {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  break-inside: avoid;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--color-bg-alt);
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(34px) scale(0.96);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.5s ease;
}

.gallery__item.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.gallery__item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}

.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(110, 19, 32, 0.42), transparent 55%);
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.gallery__item:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(46, 42, 40, 0.18);
}

.gallery__item:hover img {
  transform: scale(1.07);
}

.gallery__item:hover::after {
  opacity: 1;
}

@media (max-width: 1100px) {
  .gallery__grid { column-count: 3; }
}

@media (max-width: 760px) {
  .gallery__grid { column-count: 2; column-gap: 12px; }
  .gallery__item { margin-bottom: 12px; }
}

@media (max-width: 440px) {
  .gallery__grid { column-count: 1; }
}

/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(46, 42, 40, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 2rem;
  animation: lightboxIn 0.3s ease;
  backdrop-filter: blur(4px);
}

.lightbox.is-open {
  display: flex;
}

@keyframes lightboxIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox__img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  animation: imgIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes imgIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--color-bg);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  font-family: var(--font-serif);
  backdrop-filter: blur(6px);
}

.lightbox__close {
  top: 1.5rem;
  right: 1.5rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 0; /* ukrywa znak &times; — krzyżyk rysujemy liniami */
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__close::before,
.lightbox__close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 17px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
}

.lightbox__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.lightbox__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__nav--prev { left: 1.5rem; }
.lightbox__nav--next { right: 1.5rem; }

.lightbox__close:hover,
.lightbox__nav:hover {
  background: var(--color-bordeaux);
  border-color: var(--color-bordeaux);
  color: var(--color-white);
}

.lightbox__nav:hover {
  transform: translateY(-50%) scale(1.08);
}

.lightbox__counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  color: var(--color-bg);
  opacity: 0.75;
  text-transform: uppercase;
}

/* =============================================
   SEKCJA 5: KONTAKT
   ============================================= */
.contact {
  background: var(--color-bordeaux);
  color: var(--color-ecru);
  padding: 7rem 1.5rem;
  position: relative;
}

.contact__rsvp {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 1.5rem;
  text-align: center;
  font-family: var(--font-sans);
  font-size: clamp(0.72rem, 3.2vw, 1.9rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.5;
  color: var(--color-ecru);
}

.contact__rsvp strong {
  font-weight: 500;
}

.contact__inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
}

.contact__illustration {
  flex: 0 0 auto;
}

.contact__illustration img {
  width: clamp(160px, 25vw, 280px);
  height: auto;
  display: block;
  filter: drop-shadow(0 16px 32px rgba(46, 42, 40, 0.22));
  transform: rotate(-45deg);
  transition: transform 0.5s ease;
}

.contact__illustration:hover img {
  transform: rotate(-40deg) scale(1.04);
}

.contact__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.3rem;
}

.contact__lead {
  color: var(--color-ecru);
}

.contact__people {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  flex-wrap: wrap;
}

.contact__person {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact__name {
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 400;
  color: var(--color-ecru);
  line-height: 1;
}

.contact__phone {
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 2.2vw, 1.2rem);
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--color-ecru);
}

.contact__divider {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  opacity: 0.5;
  align-self: center;
  color: var(--color-ecru);
}

.contact .ornament--light span:first-child,
.contact .ornament--light span:last-child {
  background: rgba(244, 236, 218, 0.6);
}

/* =============================================
   BANER: NIE MOŻE WAS ZABRAKNĄĆ
   ============================================= */
.cta-banner {
  background: var(--color-ecru);
  padding: 5rem 1.5rem;
  text-align: center;
}

.cta-banner__text {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 3vw, 1.8rem);
  font-weight: 500;
  letter-spacing: 0.3em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--color-bordeaux);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 860px) {
  .nav { padding: 1rem 1.4rem; }
  .nav.is-scrolled { padding: 0.7rem 1.4rem; }
  .nav__toggle { display: block; z-index: 52; }

  .nav__links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(80vw, 320px);
    background: rgba(250, 247, 244, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    gap: 2.2rem;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: -8px 0 40px rgba(46, 42, 40, 0.12);
  }

  .nav__links.is-open {
    transform: translateX(0);
  }

  .nav__links a {
    font-size: 0.95rem;
  }
}

@media (max-width: 640px) {
  .hero__countdown {
    gap: 0.4rem;
  }

  .countdown__block {
    min-width: 3.4rem;
    padding: 0.8rem 0.4rem;
  }

  .contact__inner {
    flex-direction: column;
    gap: 2.5rem;
    align-items: center;
    text-align: center;
  }

  .contact__info {
    align-items: center;
  }

  .contact__people {
    justify-content: center;
  }

  .location__map {
    aspect-ratio: 4 / 3;
  }

  /* Długie napisy w spacji muszą się zawijać, inaczej ucina je na wąskich ekranach */
  .contact__rsvp,
  .location__lead {
    white-space: normal;
    letter-spacing: 0.14em;
  }

  .bw-photo__image,
  .photo-break__image {
    background-attachment: scroll;
  }

  .lightbox__close { top: 0.75rem; right: 0.75rem; width: 40px; height: 40px; font-size: 1.5rem; }
  .lightbox__nav { width: 44px; height: 44px; font-size: 1.2rem; }
  .lightbox__nav--prev { left: 0.5rem; }
  .lightbox__nav--next { right: 0.5rem; }
}
