/* Dotazník NZÚ Light – Česká foukaná izolace
   Navrženo pro seniory: velké písmo, vysoký kontrast, velká tlačítka,
   jedna otázka na obrazovku, žádné skryté ovládání. */

@font-face { font-family: 'Atkinson'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/ahn-latin-400.woff2') format('woff2'); 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; }
@font-face { font-family: 'Atkinson'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/ahn-latin-ext-400.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: 'Atkinson'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/ahn-latin-700.woff2') format('woff2'); 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; }
@font-face { font-family: 'Atkinson'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/ahn-latin-ext-700.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: 'Atkinson'; font-style: normal; font-weight: 800; font-display: swap; src: url('/assets/fonts/ahn-latin-800.woff2') format('woff2'); 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; }
@font-face { font-family: 'Atkinson'; font-style: normal; font-weight: 800; font-display: swap; src: url('/assets/fonts/ahn-latin-ext-800.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Číslice z písma Inter – Atkinson má nulu s lomítkem („4ØØ ØØØ Kč“), u částek to mate. */
@font-face { font-family: 'Digits'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/digits-400.woff') format('woff'); unicode-range: U+0030-0039; }
@font-face { font-family: 'Digits'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/digits-700.woff') format('woff'); unicode-range: U+0030-0039; }
@font-face { font-family: 'Digits'; font-style: normal; font-weight: 800; font-display: swap; src: url('/assets/fonts/digits-800.woff') format('woff'); unicode-range: U+0030-0039; }

:root {
  color-scheme: light;
  --bg: #f8f4ea;
  --surface: #ffffff;
  --ink: #1d221e;
  --ink-soft: #3f4741;
  --muted: #5c645e;
  --line: #d9d6cc;
  --line-strong: #8a928b;
  --brand: #4a7a1c;          /* tmavší zelená z loga – kontrast 5,1 : 1 s bílou */
  --brand-hover: #3c6516;
  --brand-bright: #639a27;   /* původní zelená z loga – jen na dekoraci */
  --brand-soft: #eef5e3;
  --brand-line: #b9d69a;
  --navy: #323843;
  --warm: #fff6e2;
  --warm-line: #f0d9a6;
  --error: #b42318;
  --error-soft: #fdecea;
  --focus: #ffbf47;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(29, 34, 30, .05), 0 8px 28px rgba(60, 70, 40, .09);
  --wrap: 680px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Digits', 'Atkinson', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 1.25rem;            /* 20 px při výchozím nastavení, roste s nastavením telefonu */
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: var(--brand-hover); }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
strong { font-weight: 800; }
[hidden] { display: none !important; }

:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link { position: absolute; left: 12px; top: -100px; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px; z-index: 50; }
.skip-link:focus { top: 12px; color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* ---------- hlavička ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; max-width: 1040px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img { width: 48px; height: 48px; flex: none; }
.brand-name { font-weight: 800; font-size: 1.05rem; line-height: 1.15; }
.brand-name small { display: block; font-weight: 400; font-size: .85rem; color: var(--muted); }
@media (max-width: 419px) {
  .brand img { width: 44px; height: 44px; }
  .brand-name { font-size: 1rem; }
  .brand-name small { display: none; }
}
.header-call {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  min-height: 48px; padding: 8px 14px; border-radius: 999px;
  border: 2px solid var(--brand); color: var(--brand); background: #fff;
  font-weight: 800; font-size: 1.05rem; text-decoration: none; white-space: nowrap;
}
.header-call:hover { background: var(--brand-soft); }
.header-call svg { width: 22px; height: 22px; flex: none; }
.header-call .long { display: none; }
@media (min-width: 560px) { .header-call .long { display: inline; } .header-call .short { display: none; } }

/* ---------- nadpis nad první otázkou (stránka začíná rovnou dotazníkem) ---------- */
.quiz-hero { padding: 2px 2px 12px; }
.quiz-hero h1 { font-size: clamp(1.55rem, 6vw, 2.4rem); font-weight: 800; margin: 0 0 .15em; }
.quiz-hero h1 .hl { color: var(--brand); white-space: nowrap; }
.hero-sub { margin: 0; color: var(--ink-soft); font-size: 1.1rem; font-weight: 700; line-height: 1.35; }
.cta-note { margin: 12px 0 0; color: var(--muted); font-size: 1.05rem; text-align: center; }

/* ---------- tlačítka ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 64px; padding: 14px 24px;
  font: inherit; font-size: 1.3rem; font-weight: 800; line-height: 1.2;
  border-radius: var(--radius-sm); border: 2px solid transparent; cursor: pointer;
  text-decoration: none; text-align: center; transition: background-color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 0 #2f5211; }
.btn-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-primary:active { box-shadow: 0 2px 0 #2f5211; transform: translateY(2px); }
.btn-primary svg { width: 26px; height: 26px; flex: none; }
.btn-secondary { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn-secondary:hover { background: var(--brand-soft); color: var(--brand-hover); }
.btn[disabled] { opacity: .75; cursor: progress; }
@media (min-width: 560px) { .btn { width: auto; min-width: 320px; } }
@media (max-width: 379px) { .btn { font-size: 1.18rem; padding: 14px 16px; gap: 8px; } }

.btn-back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 6px 12px 6px 4px;
  background: none; border: 0; color: var(--brand); font: inherit; font-size: 1.1rem; font-weight: 700; cursor: pointer;
  text-decoration: underline; text-underline-offset: .2em;
}
.btn-back svg { width: 24px; height: 24px; }
.btn-back:hover { color: var(--brand-hover); }

.spinner { width: 24px; height: 24px; border: 3px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- sekce důvěry (pod první otázkou) ---------- */
.trust { padding: 0 0 40px; }
.trust-grid { display: grid; gap: 16px; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 20px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stat strong { display: block; font-size: clamp(1.5rem, 6vw, 2rem); color: var(--brand); line-height: 1.1; }
.stat span { font-size: 1rem; color: var(--ink-soft); line-height: 1.3; display: block; margin-top: 4px; }
.quote { margin: 0; }
.quote p { font-size: 1.2rem; font-style: normal; }
.quote p::before { content: '„'; } .quote p::after { content: '“'; }
.quote footer { color: var(--muted); font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.stars { color: #c98a00; letter-spacing: 2px; font-size: 1.1rem; }
.honest h2 { font-size: 1.4rem; }
.honest ul { margin: 0; padding-left: 1.2em; }
.honest li { margin-bottom: .4em; }
@media (min-width: 900px) {
  .trust .wrap { max-width: 1040px; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .trust-grid .span-2 { grid-column: span 2; }
}

/* ---------- dotazník ---------- */
.quiz { padding: 16px 0 24px; }
.quiz-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px 26px; }
.quiz-card:focus { outline: none; }
@media (min-width: 560px) { .quiz { padding-top: 28px; } .quiz-card { padding: 22px 36px 36px; } }
.quiz-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; margin-bottom: 6px; }
.progress-text { font-size: 1.05rem; color: var(--muted); font-weight: 700; }
.progress { height: 12px; background: #ebe7dc; border-radius: 99px; overflow: hidden; margin-bottom: 22px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-bright), var(--brand)); border-radius: 99px; transition: width .45s ease; }

.q-title { font-size: clamp(1.6rem, 5.4vw, 2.1rem); font-weight: 800; margin-bottom: .35em; }
.q-title:focus { outline: none; }
.q-help { color: var(--ink-soft); font-size: 1.15rem; margin-bottom: 18px; }
.q-help strong { color: var(--ink); }

.options { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; }
.opt {
  display: flex; align-items: center; gap: 16px; width: 100%; min-height: 72px;
  padding: 14px 18px; margin: 0; background: #fff; color: var(--ink);
  border: 2px solid var(--line-strong); border-radius: var(--radius-sm);
  font: inherit; font-size: 1.25rem; font-weight: 700; line-height: 1.3; text-align: left; cursor: pointer;
  transition: border-color .12s, background-color .12s, box-shadow .12s;
  -webkit-tap-highlight-color: transparent;
}
/* Zvýraznění při najetí myší jen na zařízeních s myší – na dotykovém displeji by
   „přilepené“ zvýraznění na další otázce vypadalo jako už vybraná odpověď. */
@media (hover: hover) and (pointer: fine) {
  .opt:hover { border-color: var(--brand); background: #fbfdf8; }
}
.opt:active { background: #f3f8ec; }
.opt .mark {
  flex: none; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line-strong);
  display: grid; place-items: center; background: #fff; transition: all .12s;
}
.opt.multi .mark { border-radius: 8px; }
.opt .mark svg { width: 20px; height: 20px; opacity: 0; color: #fff; }
.opt[aria-pressed="true"], .opt[aria-checked="true"] { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.opt[aria-pressed="true"] .mark, .opt[aria-checked="true"] .mark { background: var(--brand); border-color: var(--brand); }
.opt[aria-pressed="true"] .mark svg, .opt[aria-checked="true"] .mark svg { opacity: 1; }
.opt .txt { display: block; }
.opt .sub { display: block; font-weight: 400; font-size: 1.05rem; color: var(--muted); margin-top: 2px; }

.note {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 14px 16px;
  background: var(--warm); border: 1px solid var(--warm-line); border-radius: var(--radius-sm); font-size: 1.1rem; color: var(--ink-soft);
}
.note svg { flex: none; width: 26px; height: 26px; color: #9a6a00; margin-top: 1px; }
.note p { margin: 0; }
.note p + p { margin-top: .4em; }

details.more { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
details.more summary { cursor: pointer; color: var(--brand); font-weight: 700; min-height: 44px; display: flex; align-items: center; gap: 6px; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: '+'; display: inline-grid; place-items: center; width: 26px; height: 26px; border: 2px solid currentColor; border-radius: 50%; font-size: 1rem; line-height: 1; }
details.more[open] summary::before { content: '–'; }
details.more div { font-size: 1.1rem; color: var(--ink-soft); padding: 4px 0 6px; }
details.more ul { margin: .3em 0 0; padding-left: 1.2em; }

.q-actions { margin-top: 24px; }
/* „Pokračovat“ u otázky s více možnostmi zůstává vidět u spodního okraje obrazovky,
   i když se možnosti na malý telefon celé nevejdou. */
.q-actions.sticky {
  position: sticky; bottom: var(--consent-h, 0px); z-index: 5;
  margin: 10px -18px -26px; padding: 16px 18px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(255, 255, 255, 0), #fff 16px);
  border-radius: 0 0 var(--radius) var(--radius);
}
@media (min-width: 560px) { .q-actions.sticky { margin: 16px -36px -36px; padding: 20px 36px 28px; } }
/* Při posouvání ke zvolené odpovědi (klávesnice, čtečka) ji nenechat schovanou pod „Pokračovat“ */
html { scroll-padding-bottom: 110px; }

/* Malé telefony: méně okrajů, ať je na první obrazovce vidět víc odpovědí */
@media (max-width: 479px) {
  .wrap { padding: 0 12px; }
  .site-header .wrap { min-height: 62px; }
  .header-call { min-height: 46px; padding: 6px 12px; }
  .quiz { padding-top: 12px; }
  .quiz-card { padding: 14px 14px 22px; }
  .q-title { font-size: 1.5rem; }
  .q-help { margin-bottom: 14px; }
  .options { gap: 10px; }
  .opt { gap: 12px; padding: 12px 14px; min-height: 68px; }
  .opt .mark { width: 30px; height: 30px; }
  .q-actions.sticky { margin: 10px -14px -22px; padding: 14px 14px calc(12px + env(safe-area-inset-bottom)); }
}

/* ---------- výsledek ---------- */
.result-head { text-align: center; margin-bottom: 20px; }
.result-icon { width: 84px; height: 84px; margin: 6px auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); border: 3px solid var(--brand-line); }
.result-icon svg { width: 48px; height: 48px; color: var(--brand); }
.result-icon.neutral { background: var(--warm); border-color: var(--warm-line); }
.result-icon.neutral svg { color: #9a6a00; }
.result-head h2 { font-size: clamp(1.7rem, 5.6vw, 2.2rem); }
.result-head p { color: var(--ink-soft); font-size: 1.2rem; margin: 0; }

.amounts { display: grid; gap: 10px; margin: 0 0 22px; padding: 0; list-style: none; }
.amounts li {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 12px; row-gap: 2px;
  padding: 14px 16px; border-radius: var(--radius-sm); background: var(--brand-soft); border: 1px solid var(--brand-line);
}
.amounts .a-title { font-size: 1.2rem; color: var(--ink); line-height: 1.25; }
.amounts .how { font-weight: 800; font-size: 1.35rem; color: var(--brand); white-space: nowrap; text-align: right; line-height: 1.2; }
.amounts .how small { font-size: .95rem; font-weight: 700; color: var(--ink-soft); }
.amounts .a-desc { grid-column: 1 / -1; font-size: 1.05rem; color: var(--ink-soft); line-height: 1.3; }


.divider { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.form-title { font-size: 1.5rem; margin-bottom: .3em; }
.form-intro { color: var(--ink-soft); font-size: 1.15rem; }

/* ---------- formulář ---------- */
.field { margin-bottom: 20px; }
.field label, .field legend { display: block; font-weight: 800; font-size: 1.2rem; margin-bottom: 4px; padding: 0; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"] {
  width: 100%; min-height: 60px; padding: 12px 16px;
  font: inherit; font-size: 1.3rem; color: var(--ink); background: #fff;
  border: 2px solid var(--line-strong); border-radius: 12px; appearance: none;
}
.field input:focus { border-color: var(--brand); outline: 4px solid var(--focus); outline-offset: 0; }
.field.has-error input { border-color: var(--error); background: #fffafa; }
.field .error { display: flex; gap: 8px; align-items: flex-start; color: var(--error); font-weight: 700; font-size: 1.1rem; margin-top: 8px; }
.field .error svg { flex: none; width: 24px; height: 24px; margin-top: 1px; }
fieldset.field { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }


.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-error { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--error-soft); color: #7a1a12; border: 1px solid #f3b8b1; margin-bottom: 18px; font-size: 1.1rem; }
.form-error svg { flex: none; width: 26px; height: 26px; }
.form-error p { margin: 0; }

.privacy-note { font-size: 1rem; color: var(--muted); margin-top: 14px; text-align: center; }

/* ---------- poděkování ---------- */
.callout { padding: 16px; border-radius: var(--radius-sm); background: var(--brand-soft); border: 1px solid var(--brand-line); font-size: 1.15rem; }
.callout a { font-weight: 800; white-space: nowrap; }
.house-photo { border-radius: var(--radius-sm); overflow: hidden; margin: 20px 0 0; aspect-ratio: 16 / 9; }
.house-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- patička ---------- */
.site-footer { border-top: 1px solid var(--line); background: #f1ece0; color: var(--ink-soft); font-size: 1rem; padding: 24px 0 96px; }
.site-footer .wrap { max-width: 1040px; }
.site-footer p { margin: 0 0 .4em; }
.site-footer a { color: var(--ink-soft); }

/* ---------- lišta souhlasu s cookies ---------- */
.consent {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; max-width: 640px; margin: 0 auto;
  background: #fff; border: 2px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: 0 10px 40px rgba(0,0,0,.18);
  padding: 14px 16px; font-size: 1.02rem;
}
.consent p { margin: 0 0 10px; }
.consent .row { display: flex; gap: 10px; flex-wrap: wrap; }
.consent button { flex: 1 1 140px; min-height: 52px; border-radius: 12px; font: inherit; font-weight: 800; font-size: 1.05rem; cursor: pointer; border: 2px solid var(--brand); }
.consent .yes { background: var(--brand); color: #fff; }
.consent .no { background: #fff; color: var(--brand); }

/* ---------- pomocné ---------- */
.fade-in { animation: fadeIn .28s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.center { text-align: center; }
.mt-0 { margin-top: 0; }
