/* =========================================================
   Typologie kvíz — styl
   Paleta osobního webu Katky Halenkové (sea / lagoon / palm), písmo Catamaran.
   Vše přes CSS proměnné → snadno přebarvitelné.
   Design dle zásad pro ADHD: klid, jedna otázka na obrazovku, velké cíle.
   ========================================================= */
:root {
  /* Brand — HSL složky (jako na katkahalenka.cz) */
  --ink: 189 47% 17%;         /* tmavě teal — text, nadpisy */
  --ink-soft: 188 22% 33%;    /* ztlumený text */
  --lagoon: 177 42% 52%;      /* laguna — akcent */
  --lagoon-deep: 185 50% 39%; /* hlubší laguna — primární akce */
  --palm: 148 39% 30%;        /* palmová zeleň — kicker/eyebrow */
  --sand: 127 23% 92%;        /* světlá plocha */
  --foam: 137 41% 97%;        /* skoro bílá se zeleným nádechem */
  --bg-base: 145 33% 93%;     /* pozadí */
  --sun: 44 100% 58%;         /* teplá žlutá — hvězdičky / pop */

  --bg: hsl(var(--bg-base));
  --text: hsl(var(--ink));
  --muted: hsl(var(--ink-soft));
  --card: #ffffff;
  --border: hsl(185 24% 85%);
  --primary: hsl(var(--lagoon-deep));
  --primary-hover: hsl(185 55% 32%);
  --accent: hsl(var(--palm));
  --radius: 20px;
  --shadow: 0 12px 40px hsl(var(--ink) / 0.12);
  --shadow-sm: 0 4px 16px hsl(var(--ink) / 0.10);
  --maxw: 640px;
  --font: 'Catamaran', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 520px at 100% -10%, hsl(var(--lagoon) / 0.20) 0%, transparent 55%),
    radial-gradient(1100px 520px at -10% 110%, hsl(var(--palm) / 0.14) 0%, transparent 55%),
    var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

.app {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(16px, 4vw, 40px);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.loading { text-align: center; color: var(--muted); padding: 60px 0; }

/* ---- Progress ---- */
.progress-wrap { margin-bottom: 26px; }
.progress-top {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.82rem; color: var(--muted); font-weight: 600; margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.progress-bar { height: 8px; background: hsl(var(--palm) / 0.15); border-radius: 999px; overflow: hidden; }
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, hsl(var(--lagoon)), hsl(var(--palm)));
  border-radius: 999px; transition: width .35s cubic-bezier(.4,0,.2,1);
}

/* ---- Karta / obrazovka ---- */
.screen {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(22px, 5vw, 40px);
  animation: fadeUp .35s ease both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .screen, .progress-fill { animation: none; transition: none; }
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
h1.title { font-size: clamp(1.7rem, 5vw, 2.5rem); line-height: 1.1; margin: 0 0 14px; font-weight: 800; color: hsl(var(--ink)); }
.subtitle { color: var(--muted); font-size: 1.06rem; margin: 0 0 28px; }
.qhint { font-size: 0.85rem; color: var(--muted); font-weight: 600; margin: 0 0 18px; }
h2.question { font-size: clamp(1.35rem, 4vw, 1.85rem); line-height: 1.2; margin: 6px 0 24px; font-weight: 700; color: hsl(var(--ink)); }

/* ---- Tlačítka voleb ---- */
.choices { display: flex; flex-direction: column; gap: 14px; }
.choice {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  background: #fff; border: 2px solid var(--border); border-radius: 14px;
  padding: 18px 18px; font-family: inherit; font-size: 1.08rem; font-weight: 600; color: hsl(var(--ink));
  cursor: pointer; transition: border-color .15s, background .15s, transform .08s;
}
.choice:hover { border-color: hsl(var(--lagoon-deep)); background: hsl(var(--foam)); }
.choice:active { transform: scale(.99); }
.choice:focus-visible { outline: 3px solid hsl(var(--lagoon)); outline-offset: 2px; }
.choice .key {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; font-weight: 800; font-size: 0.95rem;
  background: hsl(var(--sand)); color: hsl(var(--ink));
}
.choice.selected { border-color: hsl(var(--lagoon-deep)); background: hsl(var(--lagoon) / 0.14); }
.choice.selected .key { background: hsl(var(--lagoon-deep)); color: #fff; }

/* ---- Formulář (lead) ---- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 0.95rem; }
.field input {
  width: 100%; padding: 15px 16px; font-family: inherit; font-size: 1.05rem;
  border: 2px solid var(--border); border-radius: 12px; color: hsl(var(--ink)); background: #fff;
}
.field input:focus { outline: none; border-color: hsl(var(--lagoon-deep)); }
.field input.invalid { border-color: hsl(353 77% 48%); }
.consent { font-size: 0.82rem; color: var(--muted); margin: 6px 0 22px; }
.err-msg { color: hsl(353 77% 48%); font-size: 0.88rem; margin-top: 6px; min-height: 1em; }

/* ---- CTA / primární tlačítka ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: inherit; font-weight: 800; font-size: 1.08rem;
  padding: 16px 26px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform .08s, box-shadow .15s, background .15s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid hsl(var(--lagoon)); outline-offset: 3px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px hsl(var(--lagoon-deep) / 0.35); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: hsl(var(--lagoon-deep)); font-weight: 700; padding: 10px 12px; font-size: 0.98rem; }
.btn-ghost:hover { color: hsl(var(--palm)); }

.actions { margin-top: 26px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.actions.center { justify-content: center; }

/* ---- Výsledek ---- */
.result-eyebrow { text-align: center; }
.result-name {
  text-align: center; font-size: clamp(2rem, 7vw, 3rem); font-weight: 800; color: hsl(var(--ink));
  margin: 4px 0 18px; line-height: 1.05;
}
.result-badge {
  width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; font-size: 2.4rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, hsl(var(--lagoon-deep)), hsl(var(--palm)));
  box-shadow: var(--shadow-sm);
}
.result-motto {
  text-align: center; font-size: 1.12rem; color: hsl(var(--ink)); font-weight: 600;
  background: hsl(var(--lagoon) / 0.14); border-radius: 14px; padding: 16px 18px; margin: 0 0 24px;
}
.result-block { margin: 0 0 18px; }
.result-block h3 {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent);
  margin: 0 0 6px; font-weight: 800;
}
.result-block p { margin: 0; color: hsl(var(--ink)); }
.result-refs { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0 6px; }
.ref-chip {
  flex: 1 1 160px; background: hsl(var(--sand)); border-radius: 12px; padding: 12px 14px;
}
.ref-chip .ref-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 800; }
.ref-chip .ref-val { font-size: 1.05rem; font-weight: 700; color: hsl(var(--ink)); }

.cta-card {
  margin: 26px 0 6px; padding: 24px; border-radius: 16px; text-align: center;
  background: linear-gradient(135deg, hsl(var(--ink)), hsl(var(--lagoon-deep)));
  color: #fff;
}
.cta-card h3 { margin: 0 0 10px; font-size: 1.3rem; font-weight: 800; color: #fff; }
.cta-card p { margin: 0 0 18px; color: hsl(var(--foam)); }
.cta-card .btn-primary { background: hsl(var(--sun)); color: hsl(var(--ink)); box-shadow: 0 8px 20px hsl(var(--sun) / 0.35); }
.cta-card .btn-primary:hover { background: hsl(44 100% 52%); }

/* ---- Hodnocení hvězdami ---- */
.feedback { text-align: center; margin: 28px 0 6px; }
.feedback .fb-title { font-weight: 700; margin-bottom: 10px; }
.stars { display: inline-flex; gap: 6px; }
.star {
  font-size: 2rem; line-height: 1; background: none; border: 0; cursor: pointer; color: hsl(185 20% 82%); padding: 2px;
  transition: transform .1s, color .1s;
}
.star:hover { transform: scale(1.15); }
.star.on { color: hsl(var(--sun)); }
.fb-thanks { color: var(--muted); font-weight: 600; margin-top: 8px; min-height: 1.2em; }

.center-text { text-align: center; }
.mt { margin-top: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
