/* Vyřeš dárek – vzhled.
   Princip: kvíz je aplikace na celou obrazovku. Každá otázka má vlastní barvu
   balicího papíru (kobalt, smrk, brusinka, hořčice). To je jediný výrazný prvek,
   všechno ostatní je tiché: bílá, inkoust, jedno písmo. */

@font-face {
  font-family: "Bricolage";
  src: url("/assets/fonts/bricolage-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage";
  src: url("/assets/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --kobalt: #2A3CD1;
  --smrk: #0D5C4A;
  --brusinka: #B3134D;
  --horcice: #F2B32A;
  --ink: #14162B;
  --white: #FFFFFF;
  --mlha: #F1F2F6;
  --line: #DADCE6;
  --muted: #5A5D73;
  --font: "Bricolage", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  font-optical-sizing: auto;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.1; font-weight: 700; letter-spacing: -.015em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--horcice); outline-offset: 3px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: var(--white); padding: .6rem 1rem; border-radius: 8px; z-index: 10; }
.skip:focus { top: 1rem; }
.wrap { width: min(100% - 2.5rem, 72rem); margin-inline: auto; }

/* ---------- Kvíz jako aplikace ---------- */
.app {
  --bg: var(--kobalt);
  --fg: var(--white);
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  display: flex;
  flex-direction: column;
  transition: background-color .45s ease, color .45s ease;
}
.app[data-step="2"] { --bg: var(--smrk); }
.app[data-step="3"] { --bg: var(--brusinka); }
.app[data-step="4"] { --bg: var(--horcice); --fg: var(--ink); }

.app__bar {
  width: min(100% - 2.5rem, 40rem);
  margin: 0 auto;
  padding-top: 1.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.6rem;
}
.app__brand { font-weight: 700; text-decoration: none; font-size: 1.05rem; }
.app__back {
  background: none; border: 0; padding: .4rem .2rem; cursor: pointer;
  font-weight: 600; display: inline-flex; align-items: center; gap: .4rem;
}
.app__back::before { content: ""; width: .55rem; height: .55rem; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.app__progress { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; gap: .3rem; }
.app__progress li { width: 1.6rem; height: 4px; border-radius: 2px; background: currentColor; opacity: .28; transition: opacity .3s; }
.app__progress li.is-done { opacity: 1; }
.app[data-step="0"] .app__progress { visibility: hidden; }

.app__stage {
  flex: 1;
  width: min(100% - 2.5rem, 40rem);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 2rem 0 2.5rem;
}

.screen--start { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 1.25rem; }
.screen--start h1 {
  font-size: clamp(3.6rem, 17vw, 7.5rem);
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.04em;
  font-variation-settings: "opsz" 96;
}
.screen__lede { font-size: 1.25rem; line-height: 1.4; max-width: 26ch; }
.screen__note { font-size: .95rem; opacity: .8; }

.go {
  margin-top: .75rem;
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--white);
  color: var(--kobalt);
  cursor: pointer;
}
.go:hover { background: #E8EAFF; }
.go--ink { background: var(--ink); color: var(--white); }
.go--ink:hover { background: #2A2D4A; }

.quiz { flex: 1; display: flex; flex-direction: column; }
.step { flex: 1; display: flex; flex-direction: column; }
.step h2 {
  font-size: clamp(2.6rem, 11vw, 4.75rem);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.035em;
  font-variation-settings: "opsz" 96;
  max-width: 11ch;
  margin-bottom: auto;
  padding-bottom: 2rem;
}
.step h2:focus { outline: none; }
.step__hint { margin: -1rem 0 1rem; opacity: .85; }

.opts { display: grid; gap: .6rem; }
.opts--two { grid-template-columns: 1fr 1fr; }
.opt {
  text-align: left;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  padding: 1rem 1.1rem;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  min-height: 3.6rem;
}
.opt small { display: block; font-size: .92rem; font-weight: 400; color: var(--muted); margin-top: .2rem; }
.opt:hover { border-color: var(--ink); }
.opt[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.opt[aria-pressed="true"] small { color: #C9CBE0; }
.app[data-step="4"] .opt { background: rgba(255, 255, 255, .55); }
.app[data-step="4"] .opt[aria-pressed="true"] { background: var(--ink); }

/* Jediný pohyb: nová otázka přijede zprava, jen po akci uživatele */
.quiz.is-moving .step:not([hidden]) { animation: enter .32s cubic-bezier(.2, .7, .2, 1); }
@keyframes enter { from { opacity: 0; transform: translateX(1.5rem); } }

@media (min-width: 48rem) {
  .app__stage { padding-bottom: 4rem; }
  .screen--start { justify-content: center; }
  .step h2 { padding-bottom: 3rem; }
  .opts--two { gap: .75rem; }
}

/* ---------- Výsledky ---------- */
.results { padding: 0 0 4rem; }
.results__top { margin-bottom: 2rem; }
.results__top a:last-child { font-weight: 600; }
.results__head { padding-bottom: 1.5rem; }
.results__head h2 { font-size: clamp(2.2rem, 8vw, 3.5rem); font-weight: 800; letter-spacing: -.03em; }
.results__head h2:focus { outline: none; }
.results__summary { color: var(--muted); margin-top: .5rem; font-size: 1.1rem; }
.textbtn { background: none; border: 0; padding: 0; margin-top: .6rem; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; font-weight: 600; }
.results__note { background: var(--mlha); border-radius: var(--radius); padding: .9rem 1.1rem; margin-bottom: 1.25rem; }

.deck {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(86%, 22rem);
  gap: .9rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: .75rem;
  margin-inline: -1.25rem;
  padding-inline: 1.25rem;
  scroll-padding-inline: 1.25rem;
}
@media (min-width: 60rem) {
  .deck { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 0; }
}
.pick {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--ink);
  border-radius: 20px;
  padding: 1.35rem;
  background: var(--white);
}
.pick__img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; margin: -.35rem -.35rem 1.1rem; width: calc(100% + .7rem); max-width: none; background: var(--mlha); }
.pick__rank { font-size: .95rem; color: var(--muted); margin-bottom: .9rem; }
.pick h3 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.pick__price { font-size: 1.15rem; font-weight: 600; margin-top: .45rem; }
.pick__price span { font-weight: 400; color: var(--muted); }
.pick__desc { margin-top: .75rem; color: #33364D; }
.pick__foot { margin-top: auto; padding-top: 1.25rem; }
.when { display: inline-flex; align-items: center; gap: .45rem; font-size: .95rem; font-weight: 600; }
.when::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; }
.when--digital { color: var(--smrk); }
.when--ok { color: var(--ink); }
.when--soon { color: var(--brusinka); }
.when--late { color: var(--muted); }
.cta {
  display: block;
  margin-top: .9rem;
  text-align: center;
  text-decoration: none;
  background: var(--kobalt);
  color: var(--white);
  border-radius: var(--radius);
  padding: .95rem 1rem;
  font-weight: 700;
}
.cta:hover { background: #1E2DB0; }
.sample { display: inline-block; margin-left: .4rem; font-size: .8rem; font-weight: 600; vertical-align: middle; padding: .1rem .45rem; border-radius: 6px; background: var(--mlha); color: var(--muted); letter-spacing: 0; }

.disclosure { font-size: .92rem; color: var(--muted); max-width: 60ch; margin-top: 1.5rem; }
.results__more { margin-top: 2.75rem; }
.results__more h3 { font-size: 1.5rem; margin-bottom: .5rem; }
.results__actions { margin-top: 2rem; font-weight: 600; }

/* ---------- Seznam tipů (výsledky i kategorie) ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1.25rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.row__img { grid-row: span 3; width: 5.5rem; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.row h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.row__link { text-decoration: none; }
.row__link:hover { text-decoration: underline; }
.row__price { font-weight: 600; white-space: nowrap; text-align: right; }
.row__desc { grid-column: 1 / -1; color: #33364D; max-width: 62ch; }
.row .when { grid-column: 1 / -1; margin-top: .2rem; }
.row--late { opacity: .6; }

/* ---------- Podstránky ---------- */
.top { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { font-weight: 800; text-decoration: none; font-size: 1.2rem; letter-spacing: -.02em; }
.top nav a { font-weight: 600; }
.page-head { padding: 2.5rem 0 1.5rem; max-width: 46rem; }
.page-head h1 { font-size: clamp(2.4rem, 8vw, 4rem); font-weight: 800; letter-spacing: -.035em; line-height: .98; margin-top: .6rem; }
.crumbs { color: var(--muted); font-size: .95rem; }
.lede { font-size: 1.15rem; margin-top: 1rem; max-width: 60ch; }
.list-tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; padding: 1rem 0; border-bottom: 2px solid var(--ink); }
.toggle { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; cursor: pointer; }
.toggle input { width: 1.2rem; height: 1.2rem; accent-color: var(--kobalt); }

.section { padding: 3.5rem 0; }
.home .section { background: var(--white); }
.section h2 { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: .5rem; }
.section h2 + p { color: var(--muted); }
.section .chips + h2 { margin-top: 2.5rem; }
.chips { list-style: none; margin: 1.1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips a { display: inline-block; text-decoration: none; padding: .6rem 1rem; border: 2px solid var(--ink); border-radius: 999px; font-weight: 600; }
.chips a:hover, .chips a[aria-current] { background: var(--ink); color: var(--white); }

.remind { background: var(--smrk); color: var(--white); padding: 3.5rem 0; }
.remind .wrap { display: grid; gap: 1.5rem 3rem; }
@media (min-width: 52rem) { .remind .wrap { grid-template-columns: 1fr 1fr; align-items: start; } }
.remind h2 { font-size: clamp(1.9rem, 5vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; }
.remind p { margin-top: .75rem; max-width: 40ch; }
.remind form { display: grid; gap: 1rem; }
.remind label { display: grid; gap: .35rem; font-weight: 600; }
.remind label span { font-weight: 400; opacity: .8; }
.remind input { font: inherit; padding: .85rem 1rem; border-radius: var(--radius); border: 0; color: var(--ink); width: 100%; }
.btn { border: 0; border-radius: var(--radius); padding: .95rem 1.25rem; font-weight: 700; background: var(--horcice); color: var(--ink); cursor: pointer; justify-self: start; }
.btn:hover { background: #FFC94D; }
.fine { font-size: .88rem; opacity: .85; }
.fine a { color: inherit; }
.hp { position: absolute; left: -9999px; }

.foot { padding: 3rem 0 2.5rem; background: var(--mlha); }
.foot .wrap { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.foot h2 { font-size: 1.05rem; margin-bottom: .6rem; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.foot .disclosure, .foot .copy { grid-column: 1 / -1; margin: 0; }
.copy { font-size: .9rem; color: var(--muted); }

.prose { padding: 1rem 0 3rem; max-width: 42rem; }
.prose h2 { font-size: 1.5rem; margin: 2rem 0 .6rem; }
.prose p, .prose ul { margin: 0 0 1rem; }
.review { border: 2px dashed var(--brusinka); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1rem 0 1.5rem; }

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