:root {
  --wine: #49020f;
  --wine-2: #36010b;
  --wine-3: #5f0d1c;
  --cream: #f6efe6;
  --paper: #fbf7f1;
  --ink: #2a1410;
  --muted: rgba(42, 20, 16, .66);
  --line: rgba(73, 2, 15, .14);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --sans: "Jost", system-ui, -apple-system, sans-serif;
  --gutter: max(16px, env(safe-area-inset-left));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { touch-action: manipulation; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: 760px; }

.eyebrow {
  font-size: 12px; font-weight: 400; letter-spacing: .32em; text-transform: uppercase;
  margin: 0 0 14px; opacity: .75;
}
h2 {
  font-weight: 200; text-transform: uppercase; letter-spacing: .18em;
  font-size: clamp(28px, 5vw, 46px); line-height: 1.15; margin: 0 0 clamp(20px, 3vw, 32px);
  text-wrap: balance;
}
h3 { font-weight: 400; font-size: 17px; letter-spacing: .04em; margin: 0 0 6px; }
.lead { font-size: clamp(17px, 2.1vw, 20px); max-width: 62ch; margin: 0 0 clamp(20px, 3vw, 32px); text-wrap: pretty; }
.lead.small { font-size: 17px; margin-bottom: 20px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) var(--gutter) 14px;
  color: #fff;
  background: rgba(73, 2, 15, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transform: translateY(-100%); opacity: 0; pointer-events: none;
  transition: transform 420ms var(--ease-out), opacity 300ms ease, box-shadow 300ms ease;
}
.nav.scrolled, .nav.open { transform: none; opacity: 1; pointer-events: auto; }
.nav.scrolled { background: rgba(73, 2, 15, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.nav-mark { display: block; text-decoration: none; line-height: 0; padding: 0; margin: -4px 0; }
.nav-mark img { display: block; height: 46px; width: auto; }
@media (max-width: 600px) { .nav-mark img { height: 38px; } }
@media (prefers-reduced-motion: reduce) { .nav { transition: opacity 200ms ease; transform: none; } }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-links a {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase; text-decoration: none;
  opacity: .82; transition: opacity 200ms ease;
}
.nav-cta { border: 1px solid rgba(255,255,255,.55); padding: 9px 16px; opacity: 1 !important; }
.nav-toggle { display: none; }

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { opacity: 1; }
  .nav-cta:hover { background: #fff; color: var(--wine); }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: grid; place-content: center; gap: 6px; width: 44px; height: 44px;
    background: none; border: 0; cursor: pointer; position: relative; z-index: 2;
  }
  .nav-toggle span { display: block; width: 24px; height: 1px; background: currentColor; transition: transform 300ms var(--ease-out); }
  .nav.open .nav-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav.open .nav-toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .nav-links {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 26px;
    background: var(--wine);
    opacity: 0; visibility: hidden;
    transition: opacity 260ms ease, visibility 0s linear 260ms;
  }
  .nav.open .nav-links { opacity: 1; visibility: visible; transition: opacity 260ms ease; }
  .nav-links li { transform: translateY(8px); opacity: 0; transition: transform 400ms var(--ease-out), opacity 300ms ease; }
  .nav.open .nav-links li { transform: none; opacity: 1; }
  .nav.open .nav-links li:nth-child(2) { transition-delay: 30ms; }
  .nav.open .nav-links li:nth-child(3) { transition-delay: 60ms; }
  .nav.open .nav-links li:nth-child(4) { transition-delay: 90ms; }
  .nav.open .nav-links li:nth-child(5) { transition-delay: 120ms; }
  .nav.open .nav-links li:nth-child(6) { transition-delay: 150ms; }
  .nav-links a { font-size: 15px; padding: 8px 0; display: block; }
  .nav-cta { padding: 12px 22px !important; }
}

/* ---------- Hero (podle save-the-date) ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  background: var(--wine); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: clamp(16px, 3vh, 32px);
  padding: calc(24px + env(safe-area-inset-top)) var(--gutter) calc(56px + env(safe-area-inset-bottom));
  overflow: hidden;
}
.std { width: 100%; max-width: min(620px, calc((100svh - 330px) * .87)); min-width: min(100%, 280px); display: grid; gap: clamp(12px, 2.5vh, 28px); }
.std-top, .std-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0;
  font-weight: 300; text-transform: uppercase; letter-spacing: .14em; white-space: nowrap;
  font-size: clamp(11px, min(2.2vw, 2.4vh), 20px);
}
.std-bottom span:first-child { letter-spacing: .2em; font-variant-numeric: tabular-nums; }
.std-art { margin: 0; }
.std-art img { width: 100%; height: auto; }
.hero-after { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.hero .countdown { justify-content: center; margin: 0; }
.hero .btn { font-size: 11px; }
.hero::before { /* jemné filmové zrno */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.countdown { display: flex; gap: clamp(20px, 6vw, 44px); margin-bottom: 36px; }
.countdown div { display: flex; flex-direction: column; align-items: center; min-width: 56px; }
.countdown b { font-weight: 200; font-size: clamp(28px, 6vw, 40px); line-height: 1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; opacity: .7; margin-top: 6px; }

.scroll-hint {
  position: absolute; bottom: calc(22px + env(safe-area-inset-bottom)); left: 50%; width: 1px; height: 42px;
  background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.8));
  transform: translateX(-50%);
  animation: hint 2.4s var(--ease-in-out) infinite;
}
@keyframes hint { 0%, 100% { transform: translateX(-50%) scaleY(.4); transform-origin: top; opacity: .4; } 50% { transform: translateX(-50%) scaleY(1); transform-origin: top; opacity: 1; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 28px;
  font-size: 12px; font-weight: 400; letter-spacing: .24em; text-transform: uppercase; text-decoration: none;
  border: 1px solid var(--wine); color: var(--wine); background: transparent; cursor: pointer;
  border-radius: 0;
  transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out), opacity 200ms ease;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn-light { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-primary { background: var(--wine); color: #fff; width: 100%; min-height: 56px; }
.btn-primary[disabled] { opacity: .6; cursor: progress; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--wine); color: #fff; }
  .btn-light:hover { background: #fff; color: var(--wine); }
  .btn-primary:hover { background: var(--wine-3); }
}
.dark .btn { border-color: rgba(255,255,255,.6); color: #fff; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section.cream { background: var(--cream); }
.section.light { background: var(--paper); }
.section.dark { background: var(--wine); color: #fff; }
.section.dark .lead, .section.dark p { color: rgba(255,255,255,.86); }

/* Story */
.story { display: grid; gap: 0; border-top: 1px solid var(--line); }
.story-item { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.story-item p { margin: 0; color: var(--muted); }
.story-year { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--wine); padding-top: 3px; font-weight: 400; }
@media (max-width: 600px) { .story-item { grid-template-columns: 1fr; gap: 6px; } }

/* Poznámka k programu */
.draft-note { border: 1px dashed rgba(255,255,255,.35); padding: 16px 20px; margin: 0; font-size: 15px; max-width: 62ch; }
.draft-badge { display: inline-block; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; background: #fff; color: var(--wine); padding: 3px 10px; margin-right: 12px; transform: rotate(-2deg); font-weight: 500; }

/* Timeline */
.timeline { list-style: none; margin: 0 0 64px; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 88px; top: 8px; bottom: 8px; width: 1px; background: rgba(255,255,255,.22); }
.timeline li { display: grid; grid-template-columns: 88px 1fr; gap: 32px; padding: 14px 0; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 85px; top: 24px; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.timeline time { font-weight: 200; font-size: 22px; letter-spacing: .06em; font-variant-numeric: tabular-nums; text-align: right; padding-right: 8px; line-height: 1.5; }
.timeline h3 { text-transform: uppercase; letter-spacing: .16em; font-size: 14px; margin: 6px 0 4px; }
.timeline p { margin: 0; font-size: 15px; }
@media (max-width: 520px) {
  .timeline::before { left: 70px; }
  .timeline li { grid-template-columns: 70px 1fr; gap: 24px; }
  .timeline li::before { left: 67px; }
  .timeline time { font-size: 18px; }
}
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.18); }
.info { background: var(--wine); padding: 26px 24px; }
.info h3 { text-transform: uppercase; letter-spacing: .16em; font-size: 13px; margin-bottom: 10px; }
.info p { margin: 0; font-size: 15px; }

/* Galerie a mapy */
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; margin: 0; height: clamp(320px, 50vw, 520px); }
.gallery + .map-card, .map-card + .gallery { margin-top: 12px; }
.gallery figure { margin: 0; position: relative; overflow: hidden; background: linear-gradient(150deg, #cdb19a, #8a5a45 70%, #5a2b1e); }
.gallery .g1 { grid-row: span 2; }
.gallery .g2 { background: linear-gradient(150deg, #b9b08c, #6f6a46 80%); }
.gallery .g3 { background: linear-gradient(150deg, #a0705a, #511308); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figure:has(img) figcaption { display: none; }
.gallery figcaption { position: absolute; left: 16px; bottom: 12px; color: #fff; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; line-height: 1; }
@media (max-width: 600px) { .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 2fr 1fr; } .gallery .g1 { grid-column: span 2; grid-row: auto; } }

.map-card { display: grid; grid-template-columns: 1.25fr 1fr; background: var(--paper); box-shadow: 0 20px 40px -28px rgba(54,1,11,.4); }
.map-card.reverse { background: var(--paper); grid-template-columns: 1fr 1.25fr; }
.map-card.reverse iframe, .map-card.reverse .map-multi { order: 2; }
.map-multi { width: 100%; height: 100%; min-height: 380px; z-index: 0; }
.map-multi .leaflet-tile-pane { filter: sepia(.25) saturate(.85); }
.map-label { font-family: inherit; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--wine); border: 0; border-radius: 0; box-shadow: 0 4px 12px -6px rgba(54,1,11,.5); padding: 4px 8px; }
.map-label::before { display: none; }
.map-card iframe { width: 100%; height: 100%; min-height: 380px; border: 0; filter: sepia(.25) saturate(.85); }
.map-info { padding: clamp(24px, 4vw, 44px); }
.map-info ul { padding: 0; list-style: none; margin: 0 0 24px; }
.map-info li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.map-info li b { color: var(--ink); font-weight: 400; }
@media (max-width: 800px) {
  .map-card, .map-card.reverse { grid-template-columns: 1fr; }
  .map-card.reverse iframe, .map-card.reverse .map-multi { order: 0; }
  .map-multi { min-height: 320px; }
  .map-card iframe { min-height: 280px; }
}

/* Tips */
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.16); }
.tip { background: var(--wine); padding: 30px 26px; transition: background-color 250ms ease; }
.tip p { margin: 0; font-size: 15px; }
.tip h3 { font-size: 19px; margin: 12px 0 8px; }
.tip-tag { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; opacity: .7; }
@media (hover: hover) and (pointer: fine) { .tip:hover { background: var(--wine-3); } }

/* ---------- RSVP ---------- */
.rsvp { display: grid; gap: 26px; }
.field { display: grid; gap: 10px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend {
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 400; padding: 0; margin-bottom: 0;
}
legend { margin-bottom: 10px !important; }
.field small { text-transform: none; letter-spacing: 0; opacity: .6; font-size: 13px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }

input:not([type=radio]):not([type=checkbox]), textarea {
  width: 100%; font-size: 16px; /* bez zoomu na iOS */
  padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  -webkit-appearance: none; appearance: none;
}
input::placeholder, textarea::placeholder { color: rgba(42,20,16,.35); }
input:focus, textarea:focus { outline: none; border-color: var(--wine); box-shadow: 0 0 0 3px rgba(73,2,15,.1); }
textarea { resize: vertical; min-height: 96px; }
.mt { margin-top: 10px; }
.field-note { margin: -4px 0 12px; font-size: 14px; color: var(--muted); }
#ubytovani .gallery { margin-bottom: 0; }

.choices { display: grid; gap: 10px; }
.choices.three { grid-template-columns: repeat(3, 1fr); }
.choices.two { grid-template-columns: repeat(2, 1fr); }
.choices.chips { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 520px) { .choices.three { gap: 6px; } .choices.three .choice span { padding: 10px 6px; font-size: 14px; } }
@media (max-width: 330px) { .choices.three { grid-template-columns: 1fr; } }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  min-height: 52px; padding: 10px 16px; background: #fff; border: 1px solid var(--line);
  font-size: 15px; line-height: 1.3;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms var(--ease-out);
}
.chips .choice span { min-height: 42px; border-radius: 99px; padding: 8px 18px; }
.choice span small { font-size: 12px; opacity: .65; margin-top: 2px; }
.choice:active span { transform: scale(0.97); }
.choice input:checked + span { background: var(--wine); border-color: var(--wine); color: #fff; }
.choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(73,2,15,.25); }
@media (hover: hover) and (pointer: fine) { .choice:hover input:not(:checked) + span { border-color: var(--wine); } }

.stepper { display: grid; grid-template-columns: 52px 1fr 52px; }
.stepper input { text-align: center; -moz-appearance: textfield; border-left: 0 !important; border-right: 0 !important; font-variant-numeric: tabular-nums; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper button { background: #fff; border: 1px solid var(--line); font-size: 20px; cursor: pointer; transition: background-color 150ms ease, transform 120ms var(--ease-out); }
.stepper button:active { background: var(--cream); transform: scale(0.95); }

.when-coming { display: grid; gap: 26px; }
.when-coming.hidden, .collapse.hidden { display: none; }
.when-coming.appear, .collapse.appear { animation: appear 320ms var(--ease-out); }
@keyframes appear { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.form-error { color: #a3271a; margin: 0; min-height: 0; font-size: 15px; }
.form-error:empty { display: none; }
.form-error.shake { animation: shake 360ms var(--ease-out); }
@keyframes shake { 20% { transform: translateX(-6px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } 100% { transform: none; } }

.thanks { text-align: center; padding: 40px 0; animation: pop 500ms var(--ease-out); }
.thanks .thanks-title { color: var(--wine); font-weight: 200; text-transform: uppercase; letter-spacing: .18em; font-size: clamp(30px, 6vw, 44px); line-height: 1.1; margin-bottom: 14px; }
.thanks p { font-size: 18px; margin: 0 0 28px; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Footer ---------- */
.footer { background: var(--wine-2); color: #fff; text-align: center; padding: 64px var(--gutter) calc(48px + env(safe-area-inset-bottom)); }
.footer p { margin: 0 0 6px; letter-spacing: .3em; text-transform: uppercase; font-size: 12px; opacity: .8; }
.footer-mark { display: block; width: min(340px, 78vw); margin: 0 auto 22px; }
.footer-mark img { width: 100%; height: auto; }
.footer .small { letter-spacing: .1em; text-transform: none; font-size: 14px; opacity: .6; margin-top: 16px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
.intro { animation: intro 900ms var(--ease-out) both; }
.std-art.intro { animation-name: intro-photo; animation-delay: 120ms; }
.std-bottom.intro { animation-delay: 260ms; }
.hero-after.intro { animation-delay: 380ms; }
@keyframes intro { from { opacity: 0; transform: translateY(14px); } }
@keyframes intro-photo { from { opacity: 0; transform: translateY(18px) scale(.97); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { transform: none !important; transition: opacity 300ms ease; }
  .intro { animation: fade 400ms ease both !important; }
  @keyframes fade { from { opacity: 0; } }
  .scroll-hint { animation: none; }
  .form-error.shake { animation: none; }
}
[hidden] { display: none !important; }

/* Past na boty – skryté pole */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.privacy-note { font-size: 13px; color: var(--muted); margin: 0; text-align: center; }
/* lišta se ukáže i při ovládání klávesnicí */
.nav:focus-within { transform: none; opacity: 1; pointer-events: auto; }
