:root {
  --paper: #fbfaf7;
  --ink: #26231f;
  --muted: #6e6961;
  --line: #ddd7cc;
  --sage: #6f7f65;
  --sage-dark: #43523d;
  --rose: #b56b66;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(38, 35, 31, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 54px);
  background: rgba(251, 250, 247, 0.9);
  border-bottom: 1px solid rgba(221, 215, 204, 0.7);
  backdrop-filter: blur(14px);
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

.nav-cta {
  color: var(--sage-dark);
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 92svh;
  display: grid;
  align-items: center;
  overflow: hidden;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  background-image: url("assets/dwor-wierzenica-2022-18.jpg");
  background-size: cover;
  background-position: center;
  transform: scale(1.01);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(28, 25, 22, 0.62), rgba(28, 25, 22, 0.24) 46%, rgba(28, 25, 22, 0.04)),
    linear-gradient(0deg, rgba(251, 250, 247, 0.2), rgba(251, 250, 247, 0));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 36px));
  margin-left: clamp(18px, 7vw, 96px);
  padding-top: 74px;
  color: var(--white);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f2d0c8;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.04;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.9rem);
  font-weight: 700;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.hero-date {
  margin: 22px 0 0;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--sage);
  color: var(--white);
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--white);
}

.section {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(54px, 8vw, 96px) 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.intro-grid,
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.intro-grid > p,
.split p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.countdown div,
.detail-card,
.contact-list a,
.rsvp-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.countdown div {
  min-height: 116px;
  display: grid;
  place-items: center;
  padding: 14px 8px;
  text-align: center;
}

.countdown strong {
  display: block;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1;
  color: var(--sage-dark);
}

.countdown span {
  color: var(--muted);
  font-size: 0.86rem;
}

.gallery {
  padding-top: 26px;
}

.carousel {
  display: grid;
  gap: 18px;
}

.carousel-stage {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #1f211d;
  box-shadow: var(--shadow);
}

.carousel-slides {
  position: relative;
  aspect-ratio: 16 / 10;
  min-height: 360px;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.carousel-slide img[data-crop="lower"] {
  object-fit: cover;
  object-position: center bottom;
}

.carousel-caption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  max-width: min(520px, calc(100% - 36px));
  border-radius: 8px;
  padding: 9px 12px;
  background: rgba(31, 33, 29, 0.72);
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 700;
}

.carousel-button {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 46px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(251, 250, 247, 0.88);
  color: var(--ink);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.carousel-button.prev {
  left: 14px;
}

.carousel-button.next {
  right: 14px;
}

.carousel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.carousel-count {
  min-width: 64px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.carousel-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border: 1px solid var(--sage);
  border-radius: 999px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.carousel-dot.is-active {
  background: var(--sage);
}

.details {
  width: 100%;
  max-width: none;
  padding-inline: max(18px, calc((100% - 1120px) / 2));
  background: #f0f3eb;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.detail-card {
  padding: 24px;
  box-shadow: none;
}

.detail-card p {
  margin: 0 0 8px;
}

.muted {
  color: var(--muted);
}

.venue-photos {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr 0.85fr;
  gap: 12px;
  margin-top: 18px;
}

.venue-photos img {
  width: 100%;
  height: 260px;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.venue-photos img:first-child {
  height: 340px;
  grid-row: span 2;
}

.map-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 18px;
  margin-top: 18px;
  align-items: stretch;
}

.map-panel iframe {
  width: 100%;
  min-height: 360px;
  border: 0;
  border-radius: 8px;
}

.route {
  padding: 26px;
  border: 1px solid rgba(67, 82, 61, 0.22);
  border-radius: 8px;
  background: var(--sage-dark);
  color: var(--white);
}

.route p {
  color: rgba(255, 255, 255, 0.82);
}

.route a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  margin-top: 8px;
  color: var(--white);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.contact-list {
  display: grid;
  gap: 12px;
}

.contact-list a {
  display: grid;
  gap: 2px;
  padding: 18px 20px;
  box-shadow: none;
}

.contact-list span {
  color: var(--muted);
  font-size: 0.88rem;
}

.rsvp {
  padding-top: 40px;
}

.rsvp-form {
  max-width: 720px;
  padding: clamp(22px, 4vw, 38px);
}

.form-row,
fieldset {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}

label,
legend {
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fffefd;
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

fieldset {
  border: 0;
  padding: 0;
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.choice input {
  width: 18px;
  height: 18px;
}

.form-note {
  min-height: 26px;
  margin: 14px 0 0;
  color: var(--sage-dark);
  font-weight: 700;
}

.footer {
  padding: 26px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 820px) {
  .site-header {
    position: absolute;
    align-items: flex-start;
  }

  .nav {
    max-width: 220px;
    justify-content: flex-end;
    flex-wrap: wrap;
    font-size: 0.86rem;
  }

  .hero {
    min-height: 88svh;
  }

  .hero-overlay {
    background: linear-gradient(90deg, rgba(28, 25, 22, 0.7), rgba(28, 25, 22, 0.2));
  }

  .intro-grid,
  .split,
  .map-panel {
    grid-template-columns: 1fr;
  }

  .details-grid,
  .venue-photos {
    grid-template-columns: 1fr;
  }

  .venue-photos img,
  .venue-photos img:first-child {
    height: 260px;
    grid-row: auto;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 14px 16px;
  }

  .nav a:not(.nav-cta) {
    display: none;
  }

  .hero-content {
    width: calc(100% - 32px);
    margin-inline: 16px;
  }

  .countdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .carousel-slides {
    aspect-ratio: 4 / 3;
    min-height: 260px;
  }

  .carousel-button {
    width: 40px;
    height: 52px;
  }

  .carousel-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .carousel-dots {
    justify-content: flex-start;
  }

  .hero-actions .button {
    width: 100%;
  }
}
