/* Dopis Ježíškovi – vzhled podle aplikace (zimní noc, zlatá, vánoční červená) */
:root {
  --night: #0a1430;
  --night-mid: #16244f;
  --night-warm: #3b1631;
  --gold: #f2c14e;
  --gold-light: #fff1b8;
  --gold-deep: #c8922a;
  --red: #d7263d;
  --red-deep: #8e1022;
  --pine: #1e6b45;
  --pine-light: #4fb477;
  --snow: #f8f6f0;
  --paper: #fbf3e2;
  --ink: #2b2118;
  --text: rgba(255, 255, 255, 0.86);
  --muted: rgba(255, 255, 255, 0.62);
  --card: rgba(255, 255, 255, 0.07);
  --card-line: rgba(255, 255, 255, 0.16);
  --serif: "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --script: "Snell Roundhand", "Apple Chancery", "Segoe Script", "Brush Script MT", cursive;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font: 17px/1.6 var(--sans);
  color: var(--text);
  background-color: var(--night);
  background-image:
    radial-gradient(ellipse 80% 50% at 80% 0%, rgba(242, 193, 78, 0.10), transparent 60%),
    radial-gradient(ellipse 70% 60% at 10% 15%, rgba(79, 180, 119, 0.10), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, var(--night-mid) 55%, var(--night-warm) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-light); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* Hvězdy a sníh (kreslí script.js) */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

/* Řetěz světýlek nahoře */
.garland {
  position: relative; z-index: 2; height: 34px; overflow: hidden;
  display: flex; justify-content: space-around; padding: 0 8px;
}
.garland::before {
  content: ""; position: absolute; left: -5%; right: -5%; top: -18px; height: 36px;
  border-bottom: 2px solid #1a3a2a; border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
.garland i {
  position: relative; top: 12px; width: 10px; height: 16px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: var(--c); box-shadow: 0 0 10px 2px var(--c);
  animation: twinkle 2.4s ease-in-out infinite; animation-delay: var(--d);
}
.garland i::before {
  content: ""; position: absolute; top: -4px; left: 2px; width: 6px; height: 5px; border-radius: 1px; background: #2c3b33;
}
.garland i:nth-child(4n+1) { --c: #ff5a6e; --d: 0s; }
.garland i:nth-child(4n+2) { --c: #ffd25e; --d: .6s; }
.garland i:nth-child(4n+3) { --c: #6be08f; --d: 1.2s; }
.garland i:nth-child(4n+4) { --c: #6ec8ff; --d: 1.8s; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .45; box-shadow: none; } }

/* Hlavička */
.wrap { position: relative; z-index: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 0 20px; }
header.top { position: relative; z-index: 2; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--snow); }
.brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.brand span { font-family: var(--script); font-size: 26px; font-weight: 700; color: var(--gold-light); line-height: 1; }
nav.menu { display: flex; gap: 4px; flex-wrap: wrap; }
nav.menu a {
  color: var(--text); text-decoration: none; font-size: 15px; font-weight: 600;
  padding: 7px 12px; border-radius: 999px; border: 1px solid transparent;
}
nav.menu a:hover { border-color: rgba(242, 193, 78, .45); color: var(--gold-light); }
nav.menu a[aria-current="page"] { background: rgba(242, 193, 78, .14); border-color: rgba(242, 193, 78, .5); color: var(--gold-light); }

/* Úvod */
.hero { text-align: center; padding: 40px 0 24px; }
.hero .icon {
  width: 148px; height: 148px; border-radius: 34px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 18px 50px rgba(0,0,0,.55), 0 0 80px rgba(242,193,78,.25);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
h1, h2, h3 { font-family: var(--serif); color: var(--snow); line-height: 1.2; }
.hero h1 {
  font-family: var(--script); font-weight: 700; font-size: clamp(48px, 10vw, 84px); margin: 22px 0 6px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 60%, var(--gold-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 12px rgba(242, 193, 78, .25));
}
.hero .lead { font-family: var(--serif); font-size: clamp(19px, 3vw, 23px); color: var(--snow); max-width: 640px; margin: 0 auto 8px; }
.hero .sub { color: var(--muted); max-width: 600px; margin: 0 auto; }

.badges { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 26px 0 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  font-size: 15px; font-weight: 600; border: 1px solid rgba(242, 193, 78, .5); background: rgba(255,255,255,.06); color: var(--gold-light);
}

/* Tlačítka */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 17px; text-decoration: none;
  color: #fff; background: linear-gradient(180deg, var(--red), var(--red-deep));
  border: 1px solid rgba(242, 193, 78, .7); box-shadow: 0 8px 24px rgba(215, 38, 61, .45);
  transition: transform .15s ease;
}
.btn:hover { color: #fff; transform: translateY(-1px); }
.btn.secondary { background: rgba(255,255,255,.06); color: var(--gold); box-shadow: none; border-color: rgba(242,193,78,.5); }

/* Skleněné karty se sněhovou čepicí */
.card {
  position: relative; background: var(--card); border: 1px solid var(--card-line); border-radius: 24px;
  padding: 24px; box-shadow: 0 16px 40px rgba(0,0,0,.35);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.card.snowcap::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: -7px; height: 14px; border-radius: 10px 10px 14px 14px;
  background:
    radial-gradient(circle at 12% 100%, var(--snow) 5px, transparent 6px),
    radial-gradient(circle at 37% 100%, var(--snow) 4px, transparent 5px),
    radial-gradient(circle at 68% 100%, var(--snow) 6px, transparent 7px),
    radial-gradient(circle at 90% 100%, var(--snow) 4px, transparent 5px),
    linear-gradient(var(--snow), #e6ecf5);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 60%;
  background-repeat: no-repeat;
  opacity: .92; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25));
}
.card h3 { margin: 4px 0 8px; font-size: 21px; }
.card p { margin: 0 0 8px; }
.card .emoji { font-size: 30px; line-height: 1; }

.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
section { padding: 34px 0; }
section > h2, .section-title { font-size: clamp(26px, 4vw, 34px); text-align: center; margin: 0 0 8px; }
.section-sub { text-align: center; color: var(--muted); margin: 0 auto 28px; max-width: 620px; }

/* Odpočet */
.countdown { display: flex; align-items: center; justify-content: center; gap: 18px; text-align: left; max-width: 520px; margin: 0 auto; }
.countdown .num {
  font-family: var(--serif); font-weight: 700; font-size: 56px; line-height: 1;
  background: linear-gradient(180deg, var(--gold-light), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.countdown .label { color: var(--muted); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.countdown .unit { font-family: var(--serif); font-size: 22px; color: var(--snow); }

/* Kroky */
.steps { counter-reset: step; }
.steps .card { padding-top: 30px; }
.steps .card::after {
  counter-increment: step; content: counter(step);
  position: absolute; top: -16px; left: 22px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font: 700 17px var(--serif); color: var(--ink);
  background: radial-gradient(circle at 35% 30%, var(--gold-light), var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 4px 14px rgba(242, 193, 78, .45);
}

/* Dopis – papír */
.paper {
  background: var(--paper); color: var(--ink); border-radius: 18px; padding: 26px 26px 22px;
  background-image: repeating-linear-gradient(transparent 0 31px, rgba(217, 199, 163, .7) 31px 32px);
  box-shadow: 0 20px 50px rgba(0,0,0,.5); transform: rotate(-1.2deg); max-width: 460px; margin: 0 auto;
  font-family: var(--serif); line-height: 32px;
}
.paper .hello { font-family: var(--script); font-size: 32px; color: #a3161a; font-weight: 700; }
.paper ul { margin: 6px 0; padding-left: 22px; }
.paper .sign { text-align: right; font-family: var(--script); font-size: 26px; font-weight: 700; }

.split { display: grid; gap: 34px; grid-template-columns: 1fr 1fr; align-items: center; }
.split img.puzzle { width: 100%; max-width: 420px; border-radius: 22px; display: block; margin: 0 auto; box-shadow: 0 18px 50px rgba(0,0,0,.5); }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* Textové stránky (podpora, podmínky, soukromí) */
.doc { max-width: 780px; margin: 0 auto; padding: 30px 0 20px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); margin: 0 0 6px; }
.doc .meta { color: var(--muted); margin: 0 0 26px; font-size: 15px; }
.doc .card { margin-bottom: 22px; }
.doc h2 { font-size: 23px; margin: 30px 0 8px; color: var(--gold-light); }
.doc h2:first-child { margin-top: 0; }
.doc li { margin: 4px 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--card-line); }
.doc th { color: var(--gold-light); font-weight: 600; }
.table-scroll { overflow-x: auto; }

details { border-bottom: 1px solid var(--card-line); padding: 12px 0; }
details:last-child { border-bottom: 0; }
summary { cursor: pointer; font-weight: 700; color: var(--snow); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "＋"; color: var(--gold); flex: none; }
details[open] summary::after { content: "－"; }
details > div { padding-top: 8px; }

.contact { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.contact .mail { font-family: var(--serif); font-size: 24px; word-break: break-all; }

/* Krajina dole */
.landscape { position: relative; z-index: 1; display: block; width: 100%; height: auto; margin-top: 30px; }
footer { position: relative; z-index: 1; background: #070d20; color: var(--muted); font-size: 14px; padding: 22px 0 30px; margin-top: -2px; }
footer .wrap { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
footer a { color: var(--text); }
footer nav { display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .brand span { font-size: 22px; }
  nav.menu a { padding: 6px 9px; font-size: 14px; }
  .card { padding: 20px; }
  .countdown .num { font-size: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
