/* Adventní mapa vysílačů – CRA 2026 */
:root {
  --ground: #0b1430;
  --ground-2: #13214b;
  --ink: #ffffff;
  --ink-2: #c9d2e8;
  --accent: #f99d1c;
  --accent-ink: #1b1300;
  --anth: #283033;
  --anth-2: #364146;
  --anth-3: #1e2528;
  --red-2: #a8242d;
  --paper: #ffffff;
  --paper-2: #eef1f4;
  --paper-ink: #283033;
  --paper-ink-2: #55626a;
  --m: clamp(16px, 2.4vw, 36px);
  --small: 15px;
  --body: 18px;
  --lead: 22px;
  --h3: clamp(24px, 2.3vw, 36px);
  --h2: clamp(32px, 3.6vw, 60px);
  --h1: clamp(40px, 4.6vw, 82px);
  --font: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --r-xl: 36px;
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
  --pill: 999px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font); font-size: var(--body); line-height: 1.5; }
img { max-width: 100%; display: block; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.wrap { padding: 0 var(--m); }

/* buttons: flat pills */
.btn { appearance: none; border: 0; border-radius: var(--pill); cursor: pointer; background: var(--accent); color: var(--accent-ink);
  font: 600 18px/1 var(--font); padding: 16px 26px; transition: transform .18s var(--ease), background-color .18s; }
.btn:hover { background: #ffb347; transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn[disabled] { background: var(--ground-2); color: var(--ink-2); cursor: default; transform: none; }
.btn-big { padding: 22px 36px; }
.link { appearance: none; background: none; border: 0; padding: 4px 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.link:hover { color: var(--accent); }

/* bar */
.bar { display: flex; align-items: center; gap: 28px; padding: 18px var(--m); }
.brand img { width: 118px; height: auto; }
.bar nav { display: flex; gap: 26px; margin-left: auto; }
.bar nav a { text-decoration: none; padding: 6px 0; transition: color .18s; }
.bar nav a:hover { color: var(--accent); }

/* hero */
.hero { position: relative; display: grid; grid-template-columns: minmax(320px, 36fr) 64fr; gap: var(--m); align-items: center;
  padding: 150px var(--m) 72px; min-height: calc(100vh - 130px); overflow: hidden; }
.fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.hero-text { position: relative; z-index: 4; }
h1 { font-size: var(--h1); line-height: .96; letter-spacing: -.035em; font-weight: 700; max-width: 9.5em; }
.lead { margin-top: 28px; font-size: var(--lead); max-width: 30em; color: var(--ink); }
.count { margin-top: 40px; font-size: var(--h3); line-height: 1.1; font-weight: 600; letter-spacing: -.02em; }
.count #lit { color: var(--accent); }
.progress { margin-top: 14px; height: 10px; max-width: 360px; background: var(--ground-2); border-radius: var(--pill); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: var(--pill); transition: width .9s var(--ease); }
.today { margin-top: 12px; color: var(--ink-2); }
.auth-wait .signed-only, .auth-wait .guest-only, .is-guest .signed-only, .is-signed .guest-only { display: none !important; }
.bar > .btn.guest-only { margin-left: auto; }
.gate { margin-top: 36px; max-width: 30em; }
.gate-text { font-size: var(--body); color: var(--ink-2); }
.gate .btn-big { margin-top: 22px; }
.gate-note { margin-top: 14px; color: var(--ink-2); font-size: var(--small); min-height: 1.5em; }
.is-guest .calendar + .foot, .is-guest .foot { margin-top: 0; border-radius: 0; }
.notice { margin-top: 18px; padding: 16px 18px; background: var(--paper); color: var(--paper-ink); border-radius: var(--r-sm); max-width: 30em; }
.notice[hidden] { display: none; }
.notice a { font-weight: 600; }
.hero-text .btn-big { margin-top: 26px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 34px; font-size: var(--small); color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 8px; }
.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.dot-work { background: var(--accent); }
.dot-weekend { background: #ffffff; }
.dot-lit { background: #ffd27a; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); width: 18px; height: 18px; border-radius: 0; }

.map { position: relative; z-index: 2; width: 100%; aspect-ratio: 1.6 / 1; }
.map canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pin { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 0; padding: 0; border-radius: 50%; background: transparent; cursor: pointer;
  color: transparent; font-size: 1px; z-index: 5; transition: transform .2s var(--ease); }
.pin:hover { transform: scale(1.18); }
.pin:active { transform: scale(.94); }
.pin[disabled] { cursor: default; transform: none; }
.pin-tip { position: absolute; z-index: 6; pointer-events: none; background: var(--paper); color: var(--paper-ink); font-size: var(--small); line-height: 1.25; padding: 8px 14px; border-radius: var(--r-sm);
  transform: translate(-50%, -100%); margin-top: -26px; white-space: nowrap; opacity: 0; transition: opacity .15s; }
.pin-tip.on { opacity: 1; }
.pin-tip b { display: block; font-weight: 600; }

/* calendar */
.calendar { background: var(--anth); padding: clamp(72px, 9vw, 150px) 0 calc(clamp(72px, 9vw, 150px) + var(--r-xl)); border-radius: var(--r-xl) var(--r-xl) 0 0; margin-top: calc(var(--r-xl) * -1); position: relative; z-index: 6; }
h2 { font-size: var(--h2); line-height: 1; letter-spacing: -.03em; font-weight: 700; }
.section-lead { margin-top: 18px; font-size: var(--lead); max-width: 34em; }
.grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-top: 48px; }
.cell { appearance: none; border: 0; border-radius: var(--r-md); overflow: hidden; padding: 0; text-align: left; cursor: pointer; background: var(--anth-2); color: var(--ink); font: inherit;
  display: flex; flex-direction: column; min-width: 0; transition: transform .2s var(--ease), background-color .2s; }
.cell:hover { transform: translateY(-4px); background: #435055; }
.cell:active { transform: translateY(0) scale(.985); }
.cell[disabled] { cursor: default; background: var(--anth-3); color: #9aa6ab; transform: none; }
.cell-top { position: relative; aspect-ratio: 4 / 3; overflow: hidden; display: flex; align-items: flex-end; }
.cell-top img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.cell:hover .cell-top img { transform: scale(1.06); }
.cell-day { position: relative; font-size: var(--h2); line-height: .9; font-weight: 700; letter-spacing: -.04em; padding: 0 0 10px 12px; }
.cell.is-ready .cell-top { background: var(--accent); color: var(--accent-ink); }
.cell.is-ready.is-weekend .cell-top { background: #ffffff; color: var(--anth); }
.cell.is-open .cell-day { background: var(--anth-2); padding: 8px 14px 6px 12px; border-radius: 0 var(--r-md) 0 0; }
.cell.is-today { outline: 3px solid var(--accent); outline-offset: 3px; }
.cell.is-today .cell-top { animation: nudge 2.4s var(--ease) infinite; }
.cell-text { padding: 12px 12px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.cell-name { font-weight: 600; line-height: 1.2; }
.cell-kind { font-size: var(--small); color: #c3ccd0; }
.cell[disabled] .cell-kind { color: #8c989d; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* footer */
.foot { position: relative; z-index: 7; margin-top: calc(var(--r-xl) * -1); border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--accent); color: var(--anth); padding: clamp(64px, 8vw, 130px) 0 48px; }
.motto { font-size: clamp(40px, 8.2vw, 136px); line-height: .92; letter-spacing: -.045em; font-weight: 700; }
.foot-row { margin-top: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: var(--m); font-size: var(--small); }
.foot details summary { cursor: pointer; }
.foot details ul { margin-top: 12px; display: grid; gap: 4px; }

/* prototype preview bar */
.burst { position: absolute; right: 26px; top: 50%; width: 0; height: 0; pointer-events: none; }
.burst i { position: absolute; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--anth); animation: burst .8s var(--ease) both; }
.burst i:nth-child(odd) { background: #fff; }
@keyframes burst { from { opacity: 1; transform: translate(0, 0) scale(1); } to { opacity: 0; transform: translate(var(--x), var(--y)) scale(.3); } }

.preview { display: flex; align-items: center; gap: 16px; padding: 12px var(--m);
  background: #283033; color: #fff; font-size: var(--small); }
.preview input { flex: 1; max-width: 520px; accent-color: var(--accent); }
.preview output { min-width: 11em; }
.preview[hidden] { display: none; }

/* door dialog */
dialog { border: 0; padding: 0; background: var(--paper); color: var(--paper-ink); width: min(1060px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; border-radius: var(--r-lg); }
.door-x { position: sticky; top: 14px; float: right; margin: 14px 14px -58px 0; z-index: 3; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--paper-2); color: var(--paper-ink); cursor: pointer;
  display: grid; place-items: center; transition: transform .18s var(--ease), background-color .18s; }
.door-x:hover { background: #dfe4e8; transform: rotate(90deg); }
dialog::backdrop { background: rgba(4, 8, 22, .82); }
dialog[open] { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }
.door { display: grid; grid-template-columns: 42fr 58fr; }
.door-pic { background: var(--anth); position: relative; min-height: 100%; }
.door-pic img { width: 100%; height: 100%; min-height: 340px; object-fit: cover; }
.door-pic figcaption { position: absolute; left: 12px; bottom: 12px; right: auto; max-width: calc(100% - 24px); background: var(--paper); color: var(--paper-ink-2); font-size: var(--small); padding: 5px 12px; border-radius: var(--r-sm); }
.door-pic.no-pic img { display: none; }
.door-body { padding: clamp(24px, 3.4vw, 48px); }
.door-body h2 { font-size: var(--h2); }
.door-meta { margin-top: 10px; color: var(--paper-ink-2); font-size: var(--small); }
.door-fact { margin-top: 16px; }
.door-content { margin-top: 26px; background: var(--paper-2); padding: 26px; border-radius: var(--r-md); }
.door-content h3 { font-size: var(--lead); line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
.door-content p { margin-top: 12px; }
.door-content blockquote { margin: 14px 0 0; font-size: var(--lead); line-height: 1.35; }
.door-content .sign { font-weight: 600; }
.door-content .note { font-size: var(--small); color: var(--paper-ink-2); }
.door-content video { width: 100%; margin-top: 14px; background: #000; display: block; border-radius: var(--r-sm); }
.big-num { font-size: var(--h1); line-height: .9; font-weight: 700; letter-spacing: -.05em; margin-top: 12px; }
.big-num small { font-size: var(--lead); letter-spacing: 0; font-weight: 600; margin-left: 10px; }
.opts { display: grid; gap: 10px; margin-top: 16px; counter-reset: opt; }
.opt { position: relative; appearance: none; border: 0; border-radius: var(--r-sm); text-align: left; font: 600 18px/1.25 var(--font); padding: 14px 16px 14px 58px; min-height: 56px; background: var(--paper); color: var(--paper-ink); cursor: pointer;
  transition: transform .15s var(--ease), background-color .15s; }
.opt::before { counter-increment: opt; content: counter(opt, upper-alpha); position: absolute; left: 14px; top: 50%; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%; background: var(--paper-2); color: var(--paper-ink-2);
  display: grid; place-items: center; font-size: var(--small); font-weight: 700; }
.opt:hover { background: #ffffff; transform: translateX(4px); }
.opt.is-right::before, .opt.is-picked::before { content: "✓"; background: var(--anth); color: #fff; }
.opt.is-wrong::before { content: "✕"; background: #fff; color: var(--red-2); }
.opt[disabled]:not(.is-right):not(.is-wrong):not(.is-picked) { opacity: .6; }
.opt.is-right { background: var(--accent); color: var(--accent-ink); transform: none; }
.opt.is-wrong { background: var(--red-2); color: #fff; transform: none; }
.opt[disabled] { cursor: default; }
.opt.is-picked { background: var(--accent); color: var(--accent-ink); transform: none; }
.bars { display: grid; gap: 14px; margin-top: 16px; }
.bar-head { display: flex; justify-content: space-between; gap: 16px; font-weight: 600; }
.bar-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-track { height: 16px; background: #dfe4e8; margin-top: 6px; border-radius: var(--pill); overflow: hidden; }
.bar-track i { display: block; height: 100%; width: 0; background: var(--paper-ink-2); border-radius: var(--pill); transition: width .9s var(--ease); }
.bar-row.is-top .bar-track i { background: var(--anth); }
.bar-row.is-mine .bar-track i { background: var(--accent); }
.bar-row.is-mine .bar-head span:first-child::after { content: " (váš hlas)"; font-weight: 400; }
.guess-pic { margin-top: 14px; aspect-ratio: 16 / 9; overflow: hidden; background: var(--anth); border-radius: var(--r-sm); }
.guess-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.wishes { display: grid; gap: 18px; margin-top: 18px; }
.wishes figure { background: var(--paper); padding: 18px 20px; border-radius: var(--r-sm); }
.wishes blockquote { margin: 0; }
.wishes figcaption { margin-top: 8px; font-size: var(--small); font-weight: 600; }
.pexeso { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.px-card { position: relative; aspect-ratio: 4 / 3; border: 0; border-radius: 0; padding: 0; background: none; cursor: pointer; perspective: 600px; font: inherit; color: inherit; }
.px-back, .px-front { position: absolute; inset: 0; border-radius: var(--r-sm); backface-visibility: hidden; transition: transform .45s var(--ease); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.px-back { background: var(--anth) url("media/cra-logo.png") center / 46% auto no-repeat; }
.px-card:hover .px-back { background-color: #3a464b; }
.px-front { background: var(--paper); transform: rotateY(180deg); }
.px-front img { width: 100%; height: 100%; object-fit: cover; }
.px-name { font-size: var(--small); font-weight: 700; text-align: center; padding: 4px; line-height: 1.15; hyphens: auto; }
.px-card.is-up .px-back { transform: rotateY(180deg); }
.px-card.is-up .px-front { transform: rotateY(360deg); }
.px-card.is-done { cursor: default; }
.px-card.is-done .px-front { outline: 4px solid var(--accent); outline-offset: -4px; }
.duel { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.duel-card { position: relative; appearance: none; border: 0; border-radius: var(--r-md); overflow: hidden; padding: 0 0 14px; background: var(--paper); color: var(--paper-ink); font: inherit; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; transition: transform .18s var(--ease), background-color .18s; }
.duel-card:hover { transform: translateY(-4px); }
.duel-card[disabled] { cursor: default; transform: none; }
.duel-pic { aspect-ratio: 4 / 3; overflow: hidden; background: var(--anth); display: block; }
.duel-pic img { width: 100%; height: 100%; object-fit: cover; }
.duel-name { font-weight: 700; padding: 10px 12px 0; }
.duel-h { padding: 0 12px; font-size: var(--h3); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.duel-card.is-taller { background: var(--accent); color: var(--accent-ink); }
.duel-card.is-no { background: var(--red-2); color: #fff; }
.duel-card.is-ok { outline: 5px solid var(--anth); outline-offset: -5px; }
.steps { margin: 14px 0 0; padding-left: 1.3em; display: grid; gap: 6px; }
.tune-row .btn { padding: 12px 20px; }
.tune { margin-top: 16px; }
.tune input { width: 100%; accent-color: var(--accent); }
.tune-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 4px; }
.tune-freq { font-size: var(--h3); font-weight: 700; letter-spacing: -.02em; }
.meter { height: 16px; background: #dfe4e8; margin-top: 12px; border-radius: var(--pill); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--paper-ink-2); transition: width .12s linear, background-color .2s; }
.meter.ok i { background: var(--accent); }
.door-actions { margin-top: 26px; }

/* motion */
.rise { animation: rise .8s var(--ease) both; }
.hero-text .rise:nth-child(2) { animation-delay: .08s; }
.hero-text .rise:nth-child(3) { animation-delay: .16s; }
.hero-text .rise:nth-child(4) { animation-delay: .24s; }
.hero-text .rise:nth-child(5) { animation-delay: .32s; }
.hero-text .rise:nth-child(6) { animation-delay: .4s; }
.map.rise { animation-delay: .2s; animation-duration: 1.1s; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, dialog[open], .cell.is-today .cell-top { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .cell, .pin, .opt, .cell-top img, .guess-pic img, .bar-track i, .px-back, .px-front, .duel-card { transition: none; }
}

/* tablet + phone: their own composition */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 120px; min-height: 0; gap: 36px; }
  h1 { max-width: none; }
  .door { grid-template-columns: minmax(0, 1fr); }
  .door-body { min-width: 0; }
  .door-pic img { min-height: 0; height: auto; aspect-ratio: 16 / 9; }
  .door-x { background: var(--paper); }
  .foot-row { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid .gap { display: none; }
}
@media (max-width: 760px) {
  .bar { gap: 14px; }
  .bar nav { display: none; }
  .bar .btn { margin-left: auto; padding: 12px 14px; }
  .hero { padding-top: 96px; padding-bottom: 48px; }
  .map { aspect-ratio: 1.45 / 1; }
  .pin { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 36px; }
  .pexeso { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .door-body { padding: 22px 18px 24px; }
  .door-content { padding: 18px 16px; overflow-wrap: anywhere; }
  .opt { padding-left: 52px; }
  .opt::before { left: 12px; }
  .preview { flex-wrap: wrap; gap: 6px 12px; }
  .preview output { min-width: 0; }
}
