/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  --color-bg: #faf7f2;
  --color-bg-alt: #f2ebe0;
  --color-text: #2e2a25;
  --color-text-soft: #6b6259;
  --color-accent: #a85c32;
  --color-accent-soft: #c9a389;
  --color-olive: #77896a;
  --color-line: #ddd2c1;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Jost', -apple-system, BlinkMacSystemFont, sans-serif;

  --container-max: 1100px;
  --container-narrow: 720px;
  --section-pad: clamp(4rem, 8vw, 8rem);
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 1rem;
  color: var(--color-text);
}

h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; margin-bottom: 0.35rem; }

p { margin: 0 0 1rem; }

a {
  color: var(--color-accent);
  text-decoration: none;
}

.overline {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: var(--color-accent);
  margin: 0 0 0.75rem;
}

.center { text-align: center; }
.center-col { display: flex; flex-direction: column; align-items: center; }
.lead { max-width: 620px; color: var(--color-text-soft); }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding: var(--section-pad) 0; }
.section--alt { background: var(--color-bg-alt); }

.link-underline {
  display: inline-block;
  border-bottom: 1px solid var(--color-accent);
  padding-bottom: 2px;
  font-size: 0.9rem;
}

.btn {
  display: inline-block;
  border: 1px solid var(--color-text);
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 0.9rem 2.2rem;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.btn:hover { background: var(--color-text); color: var(--color-bg); }

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}
.nav__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: #fff;
  transition: color 0.3s ease;
}
.nav__links {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}
.nav__links a {
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.9;
  transition: opacity 0.2s ease, color 0.3s ease;
}
.nav__links a:hover { opacity: 1; }
.nav__cta {
  border: 1px solid #fff;
  padding: 0.5rem 1.1rem;
}

.nav.is-scrolled {
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--color-line);
  padding: 0.85rem 0;
}
.nav.is-scrolled .nav__logo,
.nav.is-scrolled .nav__links a { color: var(--color-text); }
.nav.is-scrolled .nav__cta { border-color: var(--color-text); }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav__toggle span {
  width: 22px;
  height: 1.5px;
  background: #fff;
  transition: background 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}
.nav.is-scrolled .nav__toggle span { background: var(--color-text); }

/* Otevřené mobilní menu leží na světlém panelu — křížek musí být vždy tmavý a čitelný */
.nav__toggle.is-open span { background: var(--color-text); }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,16,12,0.35), rgba(20,16,12,0.55));
}
.hero__content {
  position: relative;
  text-align: center;
  color: #fff;
  padding: 0 1.5rem;
}
.hero__content .overline { color: var(--color-accent-soft); }
.hero__names {
  font-size: clamp(3rem, 9vw, 6.5rem);
  color: #fff;
  margin-bottom: 0.5rem;
}
.hero__names span { color: var(--color-accent-soft); font-style: italic; }
.hero__date {
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  margin-bottom: 2.5rem;
  color: #f1e9dd;
}

.countdown {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
  justify-content: center;
}
.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
}
.countdown__num {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
}
.countdown__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.8;
  margin-top: 0.4rem;
}

.hero__scroll {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
}
.hero__scroll span {
  display: block;
  width: 1px;
  height: 46px;
  background: rgba(255,255,255,0.7);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(0.6); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ==========================================================================
   Náš příběh
   ========================================================================== */
.story {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.story__text { max-width: 460px; }
.story__gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.story__gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}
.story__gallery img:not(:first-child) { aspect-ratio: 2/3; }
.story__gallery img:first-child { grid-row: span 2; }

/* ==========================================================================
   Kdy a kde
   ========================================================================== */
.venues {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 3rem;
}
.venue-card { background: var(--color-bg); }
.venue-card img { aspect-ratio: 4/3; object-fit: cover; }
.venue-card__map {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--color-bg-alt);
}
.venue-card__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.venue-card__body { padding: 1.75rem 0.25rem; }
.venue-card__time {
  color: var(--color-accent);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   Program dne — timeline
   ========================================================================== */
.timeline {
  list-style: none;
  margin: 3rem auto 0;
  padding: 0;
  max-width: 640px;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 90px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--color-line);
}
.timeline__item {
  display: grid;
  grid-template-columns: 70px 20px 1fr;
  align-items: start;
  gap: 1.25rem;
  margin-bottom: 2.25rem;
  position: relative;
}
.timeline__time {
  text-align: right;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--color-accent);
  padding-top: 2px;
}
.timeline__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-accent);
  margin-top: 8px;
  justify-self: center;
  position: relative;
  z-index: 1;
}
.timeline__content h4 { margin-bottom: 0.2rem; }
.timeline__content p { color: var(--color-text-soft); margin: 0; font-size: 0.95rem; }

/* ==========================================================================
   Dress code
   ========================================================================== */
.palette {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2rem;
}
.palette__row {
  display: flex;
  gap: 1rem;
}
.palette__swatch {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

/* ==========================================================================
   Fotogalerie
   ========================================================================== */
.gallery {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.gallery img {
  aspect-ratio: 1/1;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery img:hover { transform: scale(1.03); }

/* ==========================================================================
   RSVP
   ========================================================================== */
.rsvp-form {
  width: 100%;
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form-row { display: flex; flex-direction: column; gap: 0.4rem; text-align: left; }
.form-row label, .form-row legend {
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--color-text-soft);
  padding: 0;
}
.form-row input, .form-row textarea {
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-line);
  background: #fff;
  color: var(--color-text);
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}
.form-row--radio { border: none; margin: 0; display: flex; flex-direction: row; gap: 1.5rem; align-items: center; }
.form-row--radio legend { width: 100%; }
.radio { display: flex; align-items: center; gap: 0.4rem; font-size: 0.95rem; color: var(--color-text); flex-direction: row; }
.rsvp-form .btn { align-self: center; margin-top: 0.5rem; }
.rsvp-success {
  text-align: center;
  color: var(--color-olive);
  font-family: var(--font-serif);
  font-size: 1.1rem;
}
.rsvp-error {
  text-align: center;
  color: var(--color-accent);
  font-size: 0.95rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  text-align: center;
  padding: 5rem 1.5rem 3rem;
  background: var(--color-text);
  color: #f1ece3;
}
.footer__ornament { color: var(--color-accent-soft); font-size: 1.2rem; margin-bottom: 0.5rem; }
.footer h3 { font-family: var(--font-serif); color: #fff; font-size: 2rem; margin-bottom: 0.25rem; }
.footer p { margin: 0.15rem 0; color: #cfc6b8; }
.footer__thanks { margin-top: 1rem; }
.footer__copy { margin-top: 2rem; font-size: 0.75rem; opacity: 0.6; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .nav__links {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background: var(--color-bg);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 6rem 2rem 2rem;
    gap: 1.35rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    box-shadow: -6px 0 24px rgba(0,0,0,0.08);
  }
  .nav__links a { color: var(--color-text); }
  .nav__links.is-open { transform: translateX(0); }
  .nav__toggle { display: flex; }

  .story { grid-template-columns: 1fr; }
  .story__gallery { order: -1; }

  .venues { grid-template-columns: 1fr; }

  .timeline::before { left: 6px; }
  .timeline__item { grid-template-columns: 14px 1fr; }
  .timeline__time { grid-column: 1 / -1; text-align: left; order: -1; margin-bottom: 0.35rem; }
  .timeline__dot { margin-top: 6px; }

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

  .form-row--radio { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
}
