:root {
  --bg: #f5f7f1;
  --bg-alt: #e7ece0;
  --ink: #353d31;
  --muted: #7c8472;
  --accent: #95a587;        /* bazowa szałwiowa zieleń */
  --accent-dark: #6c7c5e;   /* ciemniejszy wariant dla linków/nagłówków */
  --line: #d8dfcf;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;
  --maxw: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; }

a { color: inherit; }

/* ===== Nawigacja ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem;
  transition: background .4s ease, box-shadow .4s ease, padding .4s ease;
}
.nav--scrolled {
  background: rgba(251, 249, 245, .92);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--line);
  padding: .6rem 2rem;
}
.nav__brand { font-family: var(--serif); font-size: 1.5rem; letter-spacing: .15em; color: var(--ink); text-decoration: none; }
.nav__links { display: flex; gap: 1.8rem; }
.nav__links a {
  color: var(--ink); text-decoration: none; font-size: .82rem;
  letter-spacing: .12em; text-transform: uppercase; position: relative;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 1px;
  background: var(--accent); transition: width .3s ease;
}
.nav__links a:hover::after { width: 100%; }
.nav__toggle { display: none; background: none; border: none; font-size: 1.5rem; color: var(--ink); cursor: pointer; }

/* ===== Hero (styl zaproszenia: jasne tło, ciemny tekst, gałązki) ===== */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--ink); overflow: hidden;
  background: #f8f9f4;            /* kremowa biel jak zaproszenie */
  padding: 6rem 1.5rem;
}
.hero__branch {
  position: absolute; z-index: 1; height: clamp(280px, 56vh, 620px); width: auto;
  opacity: .96; pointer-events: none; user-select: none;
}
.hero__branch--tr {
  top: -30px; right: -40px; transform: rotate(135deg);
  animation: swayTR 8s ease-in-out infinite;
}
.hero__branch--bl {
  bottom: -30px; left: -40px; transform: rotate(-45deg);
  animation: swayBL 9s ease-in-out infinite;
}

.hero__content { position: relative; z-index: 2; animation: fadeUp 1.2s ease both; }
.hero__names {
  display: flex; flex-direction: column; align-items: center; gap: .05em;
  font-size: clamp(2.8rem, 10vw, 6rem); font-weight: 500; line-height: 1.04;
  text-transform: uppercase; letter-spacing: .12em; color: var(--ink);
  margin-bottom: 1.6rem;
}
.hero__amp { font-size: .62em; font-style: italic; color: var(--accent); text-transform: none; letter-spacing: 0; }
.hero__eyebrow { letter-spacing: .34em; text-transform: uppercase; font-size: .8rem; color: var(--accent-dark); margin-bottom: .9rem; }
.hero__date { font-size: 1rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-bottom: 2.2rem; }
.hero__sep { color: var(--accent); margin: 0 .35em; }
.hero__scroll {
  position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  font-size: 2rem; z-index: 2; animation: bounce 2s infinite; color: var(--accent); opacity: .85;
}

/* ===== Przyciski ===== */
.btn {
  display: inline-block; padding: .85rem 2.2rem;
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  text-decoration: none; letter-spacing: .18em; text-transform: uppercase; font-size: .78rem;
  transition: background .3s ease, color .3s ease, transform .2s ease;
}
.btn:hover { background: transparent; color: #fff; transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--accent-dark); border-color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: #fff; }

/* ===== Odliczanie ===== */
.countdown {
  display: flex; flex-direction: column; align-items: center; gap: 2.5rem;
  padding: 3rem 1rem; background: var(--bg-alt); border-bottom: 1px solid var(--line);
}
.countdown__intro { max-width: 620px; text-align: center; }
.countdown__title { font-family: var(--serif); font-size: clamp(1.8rem, 5vw, 2.6rem); color: var(--accent-dark); margin-bottom: .6rem; }
.countdown__intro p { font-size: 1.05rem; color: var(--muted); line-height: 1.7; }
.countdown__intro p + p { margin-top: 1rem; }
.countdown__timer { display: flex; justify-content: center; gap: clamp(1rem, 5vw, 3.5rem); }
.countdown__item { text-align: center; min-width: 56px; }
.countdown__num { display: block; font-family: var(--serif); font-size: clamp(2rem, 6vw, 3.2rem); color: var(--accent-dark); }
.countdown__label { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }

/* ===== Sekcje ===== */
.section { max-width: var(--maxw); margin: 0 auto; padding: 6rem 1.5rem; }
.section--alt { max-width: none; background: var(--bg-alt); }
.section--alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section__head { text-align: center; margin-bottom: 3.5rem; }
.section__eyebrow { letter-spacing: .3em; text-transform: uppercase; font-size: .78rem; color: var(--accent); margin-bottom: .6rem; }
.section__title { font-size: clamp(2rem, 6vw, 3.2rem); position: relative; display: inline-block; }
.section__title::after {
  content: ""; display: block; width: 56px; height: 1px; background: var(--accent);
  margin: 1rem auto 0;
}

/* ===== Historia — piktogramy / oś czasu ===== */
.milestones {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem;
  max-width: 940px; margin: 0 auto;
}
.milestone { text-align: center; padding: 0 .4rem; }
.milestone__icon {
  width: 72px; height: 72px; margin: 0 auto 1.1rem;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--accent); border-radius: 50%;
  color: var(--accent-dark); background: #fff;
  transition: transform .4s ease, color .4s ease, background .4s ease, border-color .4s ease;
}
.milestone:hover .milestone__icon {
  transform: translateY(-6px); background: var(--accent);
  border-color: var(--accent); color: #fff;
}
/* Kaskadowe pojawianie się piktogramów po kolei */
.milestone.reveal:nth-child(1) { transition-delay: 0s; }
.milestone.reveal:nth-child(2) { transition-delay: .12s; }
.milestone.reveal:nth-child(3) { transition-delay: .24s; }
.milestone.reveal:nth-child(4) { transition-delay: .36s; }
.section--alt .milestone__icon { background: var(--bg); }
.milestone__icon svg { width: 32px; height: 32px; }
.milestone__when {
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .3rem;
}
.milestone__title { font-size: 1.45rem; margin-bottom: .4rem; }
.milestone__text { color: var(--muted); font-size: .95rem; }
.milestone__text--todo { font-style: italic; opacity: .8; }

@media (max-width: 760px) {
  .milestones { grid-template-columns: repeat(2, 1fr); gap: 2.2rem 1rem; }
}

/* ===== Uroczystości (trzy kafelki: Ceremonia / Przyjęcie / Poprawiny) ===== */
.events { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; max-width: 980px; margin: 0 auto; }
.event {
  text-align: center; padding: 2.6rem 1.5rem; background: #fff;
  border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center;
}
.event__icon { color: var(--accent-dark); display: inline-flex; margin-bottom: 1rem; }
.event__icon svg { width: 36px; height: 36px; }
.event__title { font-size: 1.6rem; margin-bottom: .5rem; }
.event__place { color: var(--muted); }
.event__meta { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: .7rem 0 .9rem; }
.event__note { color: var(--muted); font-size: .92rem; font-style: italic; margin-bottom: 1.1rem; }
.event .link { margin-top: auto; }

@media (max-width: 820px) {
  .events { grid-template-columns: 1fr; max-width: 440px; }
}

/* Plan sali: na tabletach 2 stoły w rzędzie zamiast 4 */
@media (max-width: 1100px) {
  .plan { grid-template-columns: 1fr 1fr; gap: 1.4rem; }
}

/* ===== Miejsce ===== */
.venue__note { max-width: 720px; margin: 0 auto 2.5rem; text-align: center; }
.venue__note p { color: var(--ink); font-size: 1.08rem; }
.venue__note p + p { margin-top: .9rem; }
.venue { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2.5rem; }
.venue__card { background: var(--bg); border: 1px solid var(--line); padding: 2rem; text-align: center; }
.section--alt .venue__card { background: #fff; }
.venue__card h3 { font-size: 1.6rem; margin-bottom: .8rem; }
.venue__card p { color: var(--muted); margin-bottom: 1rem; }
.venue__card .link { display: inline-block; }
.venue__card .link + .link { margin-top: .6rem; }
.link { color: var(--accent-dark); text-decoration: none; letter-spacing: .06em; font-size: .9rem; border-bottom: 1px solid transparent; transition: border-color .3s; }
.link:hover { border-color: var(--accent-dark); }
.map { border: 1px solid var(--line); overflow: hidden; }
.map iframe { width: 100%; height: 360px; border: 0; display: block; filter: grayscale(.2) sepia(.1); }

/* ===== Transport / busik ===== */
.transport { max-width: 720px; margin: 3rem auto 0; text-align: center; }
.bus-scene {
  position: relative; height: 86px; margin-bottom: 1.4rem; overflow: hidden;
  border-bottom: 3px dashed var(--line);
}
.bus {
  position: absolute; bottom: 6px; left: -150px; width: 118px; height: auto;
  animation: drive 9s linear infinite;
}
.bus__wheel { transform-box: fill-box; transform-origin: center; animation: wheelSpin 1.1s linear infinite; }
.transport__info p { color: var(--ink); font-size: 1.08rem; }
.transport__info p + p { margin-top: .9rem; }

@keyframes drive { 0% { left: -150px; } 100% { left: calc(100% + 30px); } }
@keyframes wheelSpin { to { transform: rotate(360deg); } }

/* ===== Taksówki ===== */
.taxi { max-width: 960px; margin: 2.6rem auto 0; }
.taxi__lead { text-align: center; color: var(--muted); font-size: 1.02rem; margin-bottom: 1.4rem; }
.taxi__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.taxi__card {
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  padding: 1.4rem; text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.taxi__card h4 { font-size: 1.1rem; margin-bottom: .5rem; }
.taxi__meta { color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }
.taxi__phone {
  color: var(--accent-dark); text-decoration: none; font-size: 1.05rem;
  letter-spacing: .02em; margin-top: auto;
}
.taxi__phone + .taxi__phone { margin-top: .4rem; }

/* ===== Plan stołów ===== */
.seats { max-width: 960px; margin: 0 auto; text-align: center; }
.seats__lead { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.6rem; }
.seats__search { position: relative; max-width: 460px; margin: 0 auto 1rem; }
.seats__input {
  width: 100%; padding: .95rem 1.2rem; font-family: var(--sans); font-size: 1.05rem;
  color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 6px;
  outline: none; transition: border-color .25s, box-shadow .25s;
}
.seats__input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(149, 165, 135, .2); }
.seats__input::placeholder { color: #aab09e; }
.seats__suggest {
  position: absolute; top: calc(100% + .35rem); left: 0; right: 0; z-index: 20;
  list-style: none; margin: 0; padding: .3rem;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 12px 30px rgba(53, 61, 49, .15); text-align: left;
  max-height: 280px; overflow-y: auto;
}
.seats__suggest[hidden] { display: none; }
.seats__suggest-item {
  display: flex; align-items: baseline; justify-content: space-between; gap: .8rem;
  padding: .6rem .8rem; border-radius: 6px; cursor: pointer;
  transition: background .15s;
}
.seats__suggest-item:hover { background: var(--bg-alt); }
.seats__suggest-name { color: var(--ink); font-size: 1rem; }
.seats__suggest-table {
  color: var(--accent-dark); font-size: .85rem; letter-spacing: .03em; white-space: nowrap;
}
.seats__status { min-height: 1.5rem; margin-bottom: 1.8rem; font-size: 1.05rem; }
.seats__status--found { color: var(--accent-dark); font-weight: 500; }
.seats__status--empty { color: var(--muted); }

.plan {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem;
  align-items: start;
}
.plan__table {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 1.2rem 1rem;
  transition: box-shadow .3s, border-color .3s, transform .3s, opacity .3s;
}
.plan__table--head { grid-column: 1 / -1; }

.ptable { display: flex; flex-direction: column; align-items: center; gap: .7rem; }
.ptable__row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem;
  max-width: 100%;
}
.ptable__surface {
  display: flex; align-items: center; gap: .55rem;
  background: var(--accent); color: #fff; border-radius: 10px;
  padding: .55rem 1.4rem; min-width: 60%;
  justify-content: center;
}

/* Stoły gości — domyślnie MAŁE: tylko etykieta, bez krzeseł (czytelne na
   telefonie). Rozwijają się dopiero po wyszukaniu nazwiska, gdy stół dostaje
   klasę .plan__table--active — wtedy pojawiają się krzesła i pionowa płyta. */
.ptable--long {
  flex-direction: row; align-items: center; justify-content: center; gap: .55rem;
}
/* Domyślnie żaden stół (w tym Pary Młodej) nie pokazuje krzeseł — pojawiają
   się dopiero po wyszukaniu, gdy stół dostaje klasę .plan__table--active. */
.plan__table:not(.plan__table--active) .ptable__row { display: none; }
.ptable--long .ptable__surface { min-width: 60%; padding: .7rem 1.4rem; }
.ptable--long .ptable__name { font-size: 1.2rem; text-align: center; }
.chair--empty { visibility: hidden; }

/* Stan rozwinięty (po znalezieniu miejsca): krzesła + długa pionowa płyta.
   Wszystkie strony mają tę samą wysokość, krzesła rozłożone równomiernie
   (space-between), więc mniej osób = większe odstępy. */
.plan__table--active .ptable--long { align-items: stretch; }
.plan__table--active .ptable--long .ptable__row {
  display: flex; flex-direction: column; flex-wrap: nowrap;
  justify-content: space-between; min-height: 800px;
}
.plan__table--active .ptable--long .ptable__surface {
  flex-direction: column; gap: .5rem; min-width: 0; width: 64px;
  padding: 1rem .4rem; align-self: stretch;
}
.ptable__surface svg { width: 24px; height: 24px; }
.ptable__name {
  font-family: var(--serif); font-size: 1.3rem; font-weight: 600; letter-spacing: .03em;
}
.chair {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; color: var(--accent); border-radius: 7px;
  border: 1px solid transparent; background: transparent;
  transition: color .25s, background .25s, border-color .25s, transform .25s;
}
.chair svg { width: 22px; height: 22px; }

/* Podświetlenie po wyszukaniu */
.plan--searching .plan__table { opacity: .4; filter: saturate(.55); }
.plan--searching .plan__table--active {
  opacity: 1; filter: none; border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(108, 124, 94, .22); transform: translateY(-2px);
}
.chair--found {
  color: #b8860b; background: #fff4cf; border-color: #e6cf7a;
  transform: scale(1.18); animation: chairPulse 1.2s ease-in-out 3;
}
@keyframes chairPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(230, 207, 122, .9); }
  50% { box-shadow: 0 0 0 7px rgba(230, 207, 122, 0); }
}

/* ===== RSVP ===== */
.rsvp__body { max-width: 620px; margin: 0 auto; text-align: center; font-size: 1.1rem; }
.contacts { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin: 2rem 0 .5rem; }
.contact {
  background: #fff; border: 1px solid var(--line); padding: 1.4rem 2rem;
  min-width: 240px; display: flex; flex-direction: column; gap: .35rem;
  align-items: center; text-align: center;
}
.contact h3 { font-size: 1.4rem; margin-bottom: .2rem; }
.contact .link { font-size: .95rem; }
.rsvp__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin: 2rem 0 1rem; }
.rsvp__note { color: var(--muted); font-size: .9rem; font-style: italic; }

/* ===== FAQ ===== */
.faq { max-width: 680px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq summary {
  cursor: pointer; font-family: var(--serif); font-size: 1.35rem; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.5rem; transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-top: .7rem; }

/* ===== Prezenty (piktogramy) ===== */
.gifts { max-width: 640px; margin: 0 auto; text-align: center; }
.gifts__lead { color: var(--ink); font-size: 1.2rem; line-height: 1.6; }
.gifts__note { color: var(--muted); margin-top: 1.2rem; font-size: 1.02rem; line-height: 1.6; }

/* ===== Stopka ===== */
.footer { text-align: center; padding: 4rem 1.5rem; background: var(--ink); color: #e9e1d5; }
.footer__names { font-family: var(--serif); font-size: 2.4rem; }
.footer__date { letter-spacing: .4em; margin: .6rem 0; font-size: .9rem; }
.footer__tag { color: var(--accent); letter-spacing: .1em; font-size: .9rem; }

/* ===== Animacje reveal ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }
/* Delikatne kołysanie gałązek (jak na lekkim wietrze) */
@keyframes swayTR { 0%, 100% { transform: rotate(135deg); } 50% { transform: rotate(131.5deg); } }
@keyframes swayBL { 0%, 100% { transform: rotate(-45deg); } 50% { transform: rotate(-41.5deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll { animation: none; }
  .hero__branch--tr { animation: none; transform: rotate(135deg); }
  .hero__branch--bl { animation: none; transform: rotate(-45deg); }
  .bus { animation: none; left: 50%; transform: translateX(-50%); }
  .bus__wheel { animation: none; }
}

/* ===== Responsywność ===== */
@media (max-width: 720px) {
  .nav__links {
    position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column; gap: 0; background: rgba(251,249,245,.98);
    padding: 1rem 2rem; box-shadow: 0 8px 20px rgba(0,0,0,.08);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .3s;
  }
  .nav__links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { color: var(--ink); padding: .7rem 0; }
  .nav__toggle { display: block; }
  .venue { grid-template-columns: 1fr; }
  .taxi__grid { grid-template-columns: 1fr; }
  /* Na telefonie zwinięte stoły stoją obok siebie w jednym rzędzie (4 w poprzek
     ekranu), kompaktowo; rozwinięty po wyszukaniu zajmuje całą szerokość. */
  .plan { grid-template-columns: repeat(4, 1fr); gap: .5rem; }
  .plan__table--active { grid-column: 1 / -1; }
  /* Kompaktowe, zwinięte kafelki — mniejszy padding, mniejsza etykieta,
     bez ikonki stołu, żeby „Stół 1–4" zmieściły się w wąskiej kolumnie. */
  .plan__table:not(.plan__table--active) { padding: .55rem .25rem; }
  .plan__table:not(.plan__table--active) .ptable--long .ptable__surface {
    min-width: 0; width: 100%; padding: .5rem .2rem;
  }
  .plan__table:not(.plan__table--active) .ptable--long .ptable__surface svg { display: none; }
  .plan__table:not(.plan__table--active) .ptable__name { font-size: .92rem; }
  .timeline::before { left: 70px; }
  .timeline__item::before { left: 66px; }
  .timeline__time { width: 54px; font-size: 1.2rem; }
}