@font-face {
  font-family: "Corpulent";
  src: url("/corpulent.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #111613;
  --bg-2: #161D19;
  --surface: #1B231F;
  --surface-2: #222C27;
  --line: rgba(255, 255, 255, .09);
  --text: #F6F1E7;
  --muted: #A7B1AA;
  --yellow: #FFCE5E;
  --red: #EF5658;
  --green: #33A16C;
  --radius: 22px;
  --display: "Corpulent", "Arial Black", Impact, sans-serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(255, 206, 94, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(51, 161, 108, .10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--yellow); }
b { font-weight: 700; color: #fff; }

#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
main, .nav, .footer { position: relative; z-index: 1; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(17, 22, 19, .72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--yellow); }
.brand-icon {
  width: 30px; height: 26px; background: var(--yellow);
  -webkit-mask: url(/icon.svg) center / contain no-repeat; mask: url(/icon.svg) center / contain no-repeat;
}
.brand-word { font-family: var(--display); font-size: 26px; line-height: 1; letter-spacing: .02em; color: var(--yellow); }
.brand-word.small { font-size: 20px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav-links a:hover { color: var(--text); }
.nav-links .nav-santa { color: var(--yellow); }
.user { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.user a { color: var(--text); text-decoration: none; border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; font-weight: 600; }
.user a:hover { border-color: rgba(255, 255, 255, .3); }
.user a.admin-link { color: var(--bg); background: var(--yellow); border-color: var(--yellow); }

/* ---------- typografie ---------- */
.eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); }
.display { font-family: var(--display); font-weight: 400; margin: 0; line-height: .86; letter-spacing: .01em; }
.h2 { font-family: var(--display); font-weight: 400; font-size: clamp(44px, 7vw, 84px); line-height: .95; margin: 0; }
.accent { color: var(--yellow); }
.section-lead { color: var(--muted); max-width: 640px; margin: 18px 0 0; font-size: 18px; }
.center { text-align: center; }
.center .section-lead { margin-inline: auto; }

/* ---------- hero ---------- */
.hero {
  min-height: calc(100svh - 64px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px clamp(16px, 6vw, 96px) 64px;
  max-width: 1280px; margin: 0 auto;
}
.hero .display { font-size: clamp(84px, 19vw, 260px); }
.hero .display .line { display: block; }
.hero .display .accent { text-shadow: 0 0 60px rgba(255, 206, 94, .25); }
.lead { font-size: clamp(19px, 2.2vw, 24px); color: var(--text); max-width: 620px; margin: 28px 0 0; }
.facts { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.facts li { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .04); color: var(--muted); font-size: 15px; }
.countdown { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.countdown div {
  min-width: 86px; padding: 12px 14px 10px; border-radius: 16px; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
}
.countdown span { display: block; font-family: var(--display); font-size: 40px; line-height: 1; color: var(--yellow); font-variant-numeric: tabular-nums; }
.countdown small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.countdown.live span { color: var(--green); }
.hero-cta { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 14px 24px; border-radius: 999px; font: 700 16px/1 var(--body); text-decoration: none;
  border: 1px solid transparent; transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--yellow); color: #1a1a1a; }
.btn-ghost { color: var(--text); border-color: rgba(255, 255, 255, .2); background: transparent; }
.btn-google { background: #fff; color: #1f1f1f; }
.btn-google svg { width: 18px; height: 18px; }

/* ---------- sekce ---------- */
.section { max-width: 1180px; margin: 0 auto; padding: 96px clamp(16px, 5vw, 48px); }
.section-head { margin-bottom: 48px; }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 150px; top: 12px; bottom: 12px; width: 2px; background: linear-gradient(var(--yellow), rgba(255, 206, 94, .1)); }
.timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 40px; padding: 18px 0; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: 144px; top: 30px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--yellow);
}
.timeline time { font-family: var(--display); font-size: 34px; line-height: 1.1; color: var(--yellow); text-align: right; padding-right: 8px; }
.timeline time.word { font-size: 22px; padding-top: 6px; }
.tl-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; }
.tl-body h3 { margin: 0 0 6px; font-size: 21px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tl-body p { margin: 0; color: var(--muted); }
.pill { font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px; background: rgba(255, 206, 94, .14); color: var(--yellow); }
.timeline .talk .tl-body { border-color: rgba(255, 206, 94, .25); }
.timeline .gift .tl-body { background: linear-gradient(135deg, rgba(239, 86, 88, .18), var(--surface) 60%); border-color: rgba(239, 86, 88, .35); }
.timeline .gift::before { border-color: var(--red); }
.timeline .big .tl-body { background: var(--yellow); border-color: var(--yellow); }
.timeline .big .tl-body h3, .timeline .big .tl-body p, .timeline .big .tl-body b { color: #1a1a1a; }
.timeline .big::before { background: var(--yellow); }

/* ---------- hackathon ---------- */
.theme-title { font-size: clamp(56px, 11vw, 140px); }
.ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.idea {
  position: relative; overflow: hidden; min-height: 250px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px; border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--c) 55%, transparent), transparent 65%),
    linear-gradient(160deg, color-mix(in srgb, var(--c) 30%, var(--surface)), var(--surface) 70%);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  transition: transform .25s ease;
}
.idea:hover { transform: translateY(-4px) rotate(-.4deg); }
.idea-tag {
  position: absolute; top: 20px; left: 24px;
  font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: #fff; background: rgba(0, 0, 0, .35); padding: 5px 10px; border-radius: 999px;
}
.idea-emoji { position: absolute; top: 4px; right: 14px; font-size: 92px; line-height: 1; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .35)); transform: rotate(8deg); }
.idea h3 { font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1; margin: 0 0 10px; color: #fff; }
.idea p { margin: 0; color: rgba(255, 255, 255, .78); font-size: 15.5px; }
.idea-own { --c: #FFCE5E; border-style: dashed; border-color: rgba(255, 206, 94, .5); background: var(--surface); }
.idea-own h3 { color: var(--yellow); }

.rules-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 18px; margin-top: 18px; }
.rules {
  margin: 0; padding: 28px 28px 28px 64px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); counter-reset: r; list-style: none;
}
.rules li { position: relative; padding: 9px 0; color: var(--muted); counter-increment: r; }
.rules li + li { border-top: 1px solid var(--line); }
.rules li::before {
  content: counter(r); position: absolute; left: -40px; top: 8px;
  font-family: var(--display); font-size: 24px; line-height: 1; color: var(--yellow);
}
.prize {
  border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; justify-content: center;
  background: radial-gradient(120% 100% at 0% 0%, #FFE39A, var(--yellow) 55%, #E8A93A);
  color: #1a1a1a; text-align: center; position: relative; overflow: hidden;
}
.prize::after { content: "🏆"; position: absolute; right: -10px; bottom: -14px; font-size: 110px; opacity: .22; transform: rotate(-12deg); }
.prize-label { margin: 0; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; font-size: 13px; }
.prize-amount { margin: 6px 0; font-family: var(--display); font-size: clamp(56px, 6vw, 76px); line-height: 1; white-space: nowrap; }
.prize-note { margin: 0; font-weight: 600; }

/* ---------- info ---------- */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.info { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.info-ico { font-size: 34px; }
.info h3 { font-family: var(--display); font-weight: 400; font-size: 28px; margin: 10px 0 6px; color: var(--yellow); }
.info p { margin: 0; color: var(--muted); }

/* ---------- santa ---------- */
.santa-section { padding-bottom: 140px; }
.santa-stage { position: relative; display: flex; flex-direction: column; align-items: center; padding-top: 40px; }
.santa {
  position: relative; border: 0; padding: 0; background: none; cursor: pointer;
  width: min(360px, 80vw); -webkit-tap-highlight-color: transparent;
}
.santa:focus-visible { outline: 3px solid var(--yellow); outline-offset: 8px; border-radius: 40px; }
.santa::before {
  content: ""; position: absolute; inset: 10% 0 -4% 0; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 206, 94, .28), transparent);
  z-index: -1; animation: glow 3s ease-in-out infinite;
}
.santa-svg { width: 100%; height: auto; display: block; overflow: visible; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .45)); }
.santa .head { transform-box: fill-box; transform-origin: 50% 90%; animation: sway 5s ease-in-out infinite; }
.santa:hover .head { animation-duration: 1.6s; }
.pompom { transform-box: fill-box; transform-origin: 0% 0%; animation: bob 2.4s ease-in-out infinite; }
.eye { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.eye-r { animation-delay: .02s; }
.wheel { opacity: 0; transform-box: fill-box; transform-origin: center; }
.pupil { transition: opacity .2s ease; }
.mouth { transform-box: fill-box; transform-origin: center; transition: transform .3s ease; }
.santa-hint {
  position: absolute; right: -10px; top: 46%; transform: rotate(8deg);
  font-family: var(--display); font-size: 22px; color: var(--yellow); pointer-events: none;
  animation: nudge 1.8s ease-in-out infinite;
}
.santa-hint::before { content: "← "; }

.santa.spinning { cursor: progress; }
.santa.spinning .head { animation: shake .18s linear infinite; }
.santa.spinning .eye { animation: none; }
.santa.spinning .wheel { opacity: 1; }
.santa.spinning .pupil { opacity: 0; }
.santa.spinning .mouth { transform: scale(1.1, 2.6); }
.santa.spinning .santa-hint, .santa.done .santa-hint { display: none; }
.santa.done .eye-r { animation: wink .5s ease .1s 1 both; }
.santa.done .mouth { transform: scale(1.5, 1.6); }

.bubble {
  position: relative; min-height: 0; max-width: 560px; width: 100%;
  background: #fff; color: #1a1a1a; border-radius: 26px; padding: 0 26px;
  text-align: center; opacity: 0; transform: translateY(10px) scale(.96);
  transition: opacity .25s ease, transform .25s ease; margin-bottom: 22px;
}
.bubble.show { opacity: 1; transform: none; padding: 22px 26px; }
.bubble.show::after {
  content: ""; position: absolute; left: 50%; bottom: -14px; margin-left: -14px;
  border: 14px solid transparent; border-bottom: 0; border-top-color: #fff;
}
.bubble p { margin: 0; }
.bubble .small { font-size: 15px; color: #555; margin-top: 8px; }
.bubble .reel { font-family: var(--display); font-size: clamp(34px, 7vw, 54px); line-height: 1.05; color: #B4232A; min-height: 1.1em; }
.bubble .reel.final { animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.bubble .kicker { font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; color: #8a8a8a; margin-bottom: 4px; }
.bubble .btn { margin-top: 14px; }
.santa-actions { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; min-height: 52px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  background: var(--red); color: #fff; padding: 12px 20px; border-radius: 14px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4); max-width: calc(100vw - 32px);
}

/* ---------- konfety ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i {
  position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px;
  animation: fall var(--d, 2.6s) cubic-bezier(.25, .6, .4, 1) forwards;
}

.footer {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 28px clamp(16px, 5vw, 48px); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px;
}

/* ---------- animace ---------- */
@keyframes sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes bob { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(2px, 6px); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }
@keyframes wink { 0% { transform: scaleY(1); } 40%, 70% { transform: scaleY(.08); } 100% { transform: scaleY(1); } }
@keyframes shake { 0% { transform: rotate(-1.5deg) translateX(-1px); } 50% { transform: rotate(1.5deg) translateX(1px); } 100% { transform: rotate(-1.5deg) translateX(-1px); } }
@keyframes glow { 0%, 100% { opacity: .7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes nudge { 0%, 100% { transform: rotate(8deg) translateX(0); } 50% { transform: rotate(8deg) translateX(8px); } }
@keyframes pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
@keyframes fall {
  to { transform: translate(var(--x, 0), 110vh) rotate(var(--r, 720deg)); }
}

/* ---------- responsivita ---------- */
@media (max-width: 900px) {
  .rules-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav { gap: 12px; }
  .nav-links { display: none; }
  .user { margin-left: auto; }
  .user .user-name { display: none; }
  .timeline::before { left: 7px; }
  .timeline li { grid-template-columns: 1fr; gap: 8px; padding-left: 34px; }
  .timeline li::before { left: 1px; top: 24px; }
  .timeline time, .timeline time.word { text-align: left; font-size: 26px; padding-top: 0; }
  .section { padding-block: 72px; }
  .countdown div { min-width: 0; flex: 1; }
  .countdown span { font-size: 32px; }
  .rules { padding-left: 56px; }
  .santa-hint { right: -4px; top: 6%; font-size: 18px; }
  .ideas { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .santa .head, .pompom, .eye, .santa::before, .santa-hint { animation: none !important; }
}
