:root {
  --brand: #253848;
  --brand-2: #34536b;
  --bg: #ffffff;
  --bg-soft: #eef2f5;
  --tint: #e3eff9;
  --ink: #1a2731;
  --muted: #55636f;
  --line: #7d8c99;
  --err: #c0392b;
  --radius: 12px;
  --radius-sm: 8px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #9cc2e4;
    --brand-2: #c4dbef;
    --bg: #0f1a23;
    --bg-soft: #16242f;
    --tint: #1c3244;
    --ink: #e8eef3;
    --muted: #a9b7c3;
    --line: #6a8499;
    --err: #ff8a7a;
  }
  .logo img { filter: brightness(0) invert(1); }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
img { display: block; max-width: 100%; height: auto; }
a, button, label, input { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; }

.topbar { padding: 14px 20px; max-width: 1200px; margin: 0 auto; }
.logo img { height: 30px; width: auto; }

/* ---------- Hero ---------- */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.hero-media { margin: 0; }
.hero-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-body { padding: 24px 20px 40px; }

h1 {
  font-size: clamp(30px, 7.4vw, 50px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--ink);
  text-wrap: balance;
}
.lead { margin: 0 0 22px; color: var(--muted); max-width: 44ch; }

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: start;
    gap: 48px;
    padding: 8px 20px 24px;
  }
  .hero-media { position: sticky; top: 16px; }
  .hero-media img { aspect-ratio: 4 / 5; border-radius: var(--radius); }
  .hero-body { padding: 24px 0 40px; }
}

/* ---------- Formulář ---------- */
form { display: grid; gap: 16px; max-width: 460px; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
label, legend { font-weight: 600; font-size: 15px; padding: 0; }
input[type="text"], input[type="email"] {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  width: 100%;
  transition: border-color .15s ease;
}
input[type="text"]:focus, input[type="email"]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--tint); }
input[aria-invalid="true"] { border-color: var(--err); }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 2px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: block;
  text-align: center;
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.seg input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--bg); }
.seg input:focus-visible + span { outline: 3px solid var(--brand-2); outline-offset: 2px; }

.consent { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-weight: 400; font-size: 14.5px; color: var(--muted); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); }

.err { color: var(--err); font-size: 14px; margin: 0; }
.form-err { font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  font: inherit;
  font-weight: 700;
  font-size: 18px;
  color: var(--bg);
  background: var(--brand);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 15px 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s ease, opacity .15s ease;
}
.btn:hover { opacity: .92; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Poděkování ---------- */
#step-thanks:focus { outline: none; }
.ticket {
  background: var(--tint);
  border: 2px dashed var(--brand-2);
  border-radius: var(--radius);
  padding: 22px 20px;
}
.ticket-kicker { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.ticket h2 { margin: 0 0 10px; font-size: clamp(24px, 5.6vw, 32px); line-height: 1.12; font-weight: 800; text-wrap: balance; }
.ticket p { margin: 0 0 14px; }
.ticket-meta { display: flex; gap: 28px; margin: 0; }
.ticket-meta dt { font-size: 13px; color: var(--muted); }
.ticket-meta dd { margin: 0; font-weight: 700; }
.next { margin: 20px 0 16px; }

.cities { display: grid; gap: 12px; }
@media (min-width: 560px) { .cities { grid-template-columns: 1fr 1fr; } }
.city {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background: var(--brand);
}
.city img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .4s cubic-bezier(.16, 1, .3, 1); }
.city::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(15, 26, 35, .82) 0%, rgba(15, 26, 35, 0) 58%); }
.city span { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; font-weight: 800; font-size: 20px; line-height: 1.2; }
.city span::after { content: " \2192"; }
.city:hover img { transform: scale(1.04); }
.city.is-picked { outline: 3px solid var(--brand); outline-offset: 3px; }

/* ---------- Galerie ---------- */
.gallery { background: var(--bg-soft); padding: 48px 20px 56px; }
.gallery-inner { max-width: 1200px; margin: 0 auto; }
.gallery h2 { font-size: clamp(26px, 5vw, 38px); line-height: 1.1; margin-top: 0; margin-bottom: 8px; font-weight: 800; letter-spacing: -0.01em; }
.g-lead { color: var(--muted); margin-top: 0; margin-bottom: 24px; max-width: 60ch; }
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bento img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); aspect-ratio: 3 / 2; }
.bento .b-big { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .bento { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; }
  .bento .b-big { grid-column: 1; grid-row: 1 / span 2; aspect-ratio: auto; }
}

.foot { padding: 24px 20px 40px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- Pohyb ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise .5s cubic-bezier(.16, 1, .3, 1) both; }
  .hero-body > #step-form { animation: rise .6s cubic-bezier(.16, 1, .3, 1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
