/* Komponenty webu. Hodnoty jen z tokens.css, kontroluje scripts/check-site.py. */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--space-5xl); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-black);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }

a { color: var(--color-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid transparent; box-shadow: var(--shadow-focus); border-radius: var(--radius-control); }

.wrap { width: 100%; max-width: var(--layout-page); margin-inline: auto; padding-inline: var(--layout-gutter); }
.narrow { max-width: var(--layout-text); }

.section { padding-block: var(--space-5xl); }
.section-flush { padding-bottom: 0; }
.section-head { max-width: 880px; margin: 0 auto var(--space-4xl); text-align: center; }
.section-head p { margin-top: var(--space-l); color: var(--color-text-muted); font-size: var(--text-lead); line-height: var(--leading-snug); }

.display, .title, .panel-title {
  color: var(--color-white);
  font-weight: var(--weight-bold);
  text-wrap: balance;
}
.display { font-size: var(--text-display); line-height: var(--leading-tight); letter-spacing: var(--tracking-display); }
.title { font-size: var(--text-title); line-height: var(--leading-tight); letter-spacing: var(--tracking-display); }
.panel-title { font-size: var(--text-panel); line-height: var(--leading-tight); letter-spacing: var(--tracking-title); }
.heading { color: var(--color-white); font-size: var(--text-heading); font-weight: var(--weight-semibold); line-height: var(--leading-snug); letter-spacing: var(--tracking-title); }
.lead { color: var(--color-text-muted); font-size: var(--text-lead); line-height: var(--leading-snug); }
.small { color: var(--color-text-muted); font-size: var(--text-small); }
.caption { color: var(--color-text-muted); font-size: var(--text-caption); }
.eyebrow { display: block; margin-bottom: var(--space-m); color: var(--color-teal); font-size: var(--text-small); font-weight: var(--weight-semibold); line-height: var(--leading-snug); letter-spacing: var(--tracking-body); }

/* Tlacitka */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-s);
  padding: var(--space-l) var(--space-xxl);
  border: 0;
  border-radius: var(--radius-pill);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-body);
  text-align: center;
  transition: opacity 120ms ease;
}
.btn:hover { text-decoration: none; opacity: 0.86; }
.btn:focus-visible { border-radius: var(--radius-pill); }
.btn-primary { background: var(--color-white); color: var(--color-black); }
.btn-accent { background: var(--color-accent); color: var(--color-white); }
.btn-quiet { background: var(--color-surface-raised); color: var(--color-white); }
.btn-small { padding: var(--space-s) var(--space-l); font-size: var(--text-small); }
.btn svg { width: 1.2em; height: 1.2em; flex: none; }

/* Navigace */
.skip-link { position: absolute; z-index: 20; left: var(--space-s); top: var(--space-s); padding: var(--space-s) var(--space-l); border-radius: var(--radius-control); background: var(--color-white); color: var(--color-black); transform: translateY(-300%); }
.skip-link:focus { transform: none; }
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-black);
  box-shadow: inset 0 -1px 0 var(--color-surface-raised);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-l); padding-block: var(--space-m); }
.brand { display: inline-flex; align-items: center; gap: var(--space-m); color: var(--color-white); font-size: var(--text-heading); font-weight: var(--weight-bold); letter-spacing: var(--tracking-title); }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: var(--radius-control); }
.nav-links { display: flex; align-items: center; gap: var(--space-xl); }
.nav-links a:not(.btn) { color: var(--color-text-muted); font-size: var(--text-small); font-weight: var(--weight-medium); }
.nav-links a:not(.btn):hover { color: var(--color-white); text-decoration: none; }
@media (max-width: 639px) {
  .nav-links .nav-optional { display: none; }
}

/* Ramy zarizeni */
.phone, .ipad {
  background: linear-gradient(180deg, var(--color-frame-top), var(--color-frame-bottom));
  padding: var(--layout-frame) var(--layout-frame) 0;
}
.phone { width: 100%; max-width: 420px; border-radius: var(--radius-phone) var(--radius-phone) 0 0; }
.ipad { width: 100%; max-width: 1040px; border-radius: var(--radius-ipad) var(--radius-ipad) 0 0; }
.phone img, .ipad img { width: 100%; background: var(--color-black); }
.phone img { border-radius: calc(var(--radius-phone) - var(--layout-frame)) calc(var(--radius-phone) - var(--layout-frame)) 0 0; }
.ipad img { border-radius: calc(var(--radius-ipad) - var(--layout-frame)) calc(var(--radius-ipad) - var(--layout-frame)) 0 0; }
.device-crop { overflow: hidden; }

/* Uvod */
.hero { padding-top: var(--space-4xl); text-align: center; overflow: hidden; }
.hero .lead { max-width: 640px; margin: var(--space-xl) auto 0; }
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: var(--space-m); margin-top: var(--space-xxl); }
.store-badge { display: inline-block; padding: var(--space-l); }
.store-badge img { width: auto; height: var(--layout-badge); }
.store-badge:hover { text-decoration: none; }

/* Hero: text vlevo, dve skutecne obrazovky vpravo */
.hero-split { padding-top: var(--space-3xl); text-align: left; }
.hero-split-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3xl); }
.hero-split .display { font-size: var(--text-title); }
.hero-split .lead { max-width: 560px; margin: var(--space-xl) 0 0; }
.hero-split .hero-cta { align-items: flex-start; gap: 0; margin-top: var(--space-m); margin-left: calc(var(--space-l) * -1); }
.hero-split .hero-cta .small { padding-left: var(--space-l); }
.hero-visual { display: flex; justify-content: center; height: 360px; overflow: hidden; }
.hero-visual .phone { position: relative; z-index: 1; flex: 0 0 300px; height: fit-content; }
.hero-visual .phone-back { display: none; }
@media (min-width: 960px) {
  .hero-split { padding-top: var(--space-4xl); }
  .hero-split-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: var(--space-4xl); }
  .hero-split-inner .hero-copy { padding-bottom: var(--space-3xl); }
  .hero-visual { justify-content: flex-end; height: 409px; }
  .hero-visual .phone { flex-basis: 340px; }
  .hero-visual .phone-back { display: block; z-index: 0; order: -1; flex-basis: 300px; margin-top: var(--space-4xl); margin-right: calc(var(--space-5xl) * -1); }
}

/* Radek faktu jako na strance v App Store */
.facts { display: grid; grid-template-columns: repeat(2, 1fr); box-shadow: inset 0 1px 0 var(--color-surface-raised), inset 0 -1px 0 var(--color-surface-raised); }
.fact { padding: var(--space-xl) var(--space-m); text-align: center; }
.fact dt { color: var(--color-text-muted); font-size: var(--text-caption); font-weight: var(--weight-medium); }
.fact dd { color: var(--color-white); font-size: var(--text-heading); font-weight: var(--weight-bold); letter-spacing: var(--tracking-title); line-height: var(--leading-snug); }
.fact dd + dd { color: var(--color-text-muted); font-size: var(--text-caption); font-weight: var(--weight-regular); letter-spacing: var(--tracking-body); }
@media (min-width: 800px) {
  .facts { grid-template-columns: repeat(4, 1fr); }
}

/* Panely nahledu z App Store */
.band { background: var(--color-band); }
.panels { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); }
.panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 640px;
  padding: var(--space-3xl) var(--space-l) 0;
  overflow: hidden;
  background: var(--color-black);
  border-radius: var(--radius-panel);
  text-align: center;
}
.panel p { max-width: 340px; margin-top: var(--space-m); color: var(--color-text-muted); font-size: var(--text-small); line-height: var(--leading-snug); }
.panel .phone { flex: none; max-width: 300px; margin-top: var(--space-xxl); }
@media (min-width: 720px) {
  .panels { grid-template-columns: repeat(2, 1fr); }
  .panel-title { min-height: calc(var(--text-panel) * var(--leading-tight) * 2); }
  .panel p { min-height: calc(var(--text-small) * var(--leading-snug) * 3); }
}
@media (min-width: 1080px) {
  .panels { grid-template-columns: repeat(3, 1fr); }
  .panel { height: 700px; }
}
.panel-short .phone { margin-top: auto; }
.panel-text { height: auto; min-height: 640px; overflow: visible; }
.panel-steps { width: 100%; max-width: 340px; margin-top: auto; margin-bottom: var(--space-xl); text-align: left; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-s); margin-top: var(--space-3xl); }
.chip { padding: var(--space-s) var(--space-l); border-radius: var(--radius-pill); background: var(--color-teal-soft); color: var(--color-teal); font-size: var(--text-small); font-weight: var(--weight-medium); line-height: var(--leading-snug); }

/* Karty */
.card { padding: var(--space-xl); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-card); }
.card-feature { padding: var(--space-xxl); border-radius: var(--radius-feature); }
.card p { margin-top: var(--space-s); color: var(--color-text-muted); }
.band .card { background: var(--color-black); }
.cards { display: grid; grid-template-columns: 1fr; gap: var(--space-l); }
@media (min-width: 860px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}
.card-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: var(--space-l); border-radius: var(--radius-control); background: var(--color-accent-soft); color: var(--color-accent); }
.card-icon svg { width: 24px; height: 24px; }

/* Zalozni plan */
.plan-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-4xl); align-items: start; }
.plan-copy .lead { margin-top: var(--space-l); }
.plan-visual { display: flex; justify-content: center; height: 560px; padding-top: var(--space-3xl); overflow: hidden; background: var(--color-band); border-radius: var(--radius-panel); }
.plan-visual .phone { max-width: 320px; height: fit-content; }
@media (min-width: 960px) {
  .plan-grid { grid-template-columns: 1.1fr 0.9fr; }
  .plan-visual { position: sticky; top: var(--space-5xl); height: 680px; }
  .plan-visual .phone { max-width: 360px; }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.delays { display: inline-flex; gap: var(--space-xs); margin-top: var(--space-xxl); padding: var(--space-xs); border-radius: var(--radius-pill); background: var(--color-surface); }
.delays label { padding: var(--space-s) var(--space-l); border-radius: var(--radius-pill); color: var(--color-text-muted); font-size: var(--text-small); font-weight: var(--weight-semibold); cursor: pointer; white-space: nowrap; }
#d48:checked ~ .delays label[for="d48"],
#d7:checked ~ .delays label[for="d7"],
#d30:checked ~ .delays label[for="d30"] { background: var(--color-accent); color: var(--color-black); }
#d48:focus-visible ~ .delays label[for="d48"],
#d7:focus-visible ~ .delays label[for="d7"],
#d30:focus-visible ~ .delays label[for="d30"] { box-shadow: var(--shadow-focus); }
.w48, .w7, .w30 { display: none; }
#d48:checked ~ .steps .w48, #d7:checked ~ .steps .w7, #d30:checked ~ .steps .w30 { display: inline; }
.steps { margin-top: var(--space-xl); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-card); counter-reset: step; }
.steps li { position: relative; padding: var(--space-l) var(--space-l) var(--space-l) var(--space-4xl); color: var(--color-text-muted); counter-increment: step; }
.steps li + li { box-shadow: inset 0 1px 0 var(--color-line); }
.steps li::before { content: counter(step); position: absolute; left: var(--space-l); top: var(--space-l); display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-pill); background: var(--color-accent-soft); color: var(--color-white); font-size: var(--text-caption); font-weight: var(--weight-semibold); }
.steps strong { display: block; color: var(--color-white); font-weight: var(--weight-semibold); }
.honest { margin-top: var(--space-xl); color: var(--color-text-muted); font-size: var(--text-small); }

/* iPad */
.ipad-stage { display: flex; justify-content: center; overflow: hidden; }

/* Ceny */
.prices { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); max-width: 880px; margin-inline: auto; }
@media (min-width: 760px) {
  .prices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.price { display: flex; flex-direction: column; padding: var(--space-xxl); border-radius: var(--radius-feature); background: var(--color-surface); box-shadow: var(--shadow-card); }
.price-featured { box-shadow: var(--shadow-ring); }
.price-amount { margin-top: var(--space-s); color: var(--color-white); font-size: var(--text-price); font-weight: var(--weight-bold); line-height: var(--leading-tight); letter-spacing: var(--tracking-display); }
.price-note { color: var(--color-text-muted); font-size: var(--text-small); }
.price ul { margin-block: var(--space-xl); flex: 1; }
.price li { padding-block: var(--space-m); box-shadow: inset 0 1px 0 var(--color-line); font-size: var(--text-small); }
.price li.is-off { color: var(--color-text-muted); text-decoration: line-through; }
.price .btn { width: 100%; }
.prices-cta { display: flex; justify-content: center; margin-top: var(--space-m); }
.prices-note { max-width: 680px; margin: var(--space-xl) auto 0; color: var(--color-text-muted); font-size: var(--text-small); text-align: center; }

/* FAQ */
.faq-list { display: grid; gap: var(--space-s); }
.faq-item { border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-card); }
.faq-item summary { display: flex; justify-content: space-between; align-items: center; gap: var(--space-l); padding: var(--space-l) var(--space-xl); color: var(--color-white); font-weight: var(--weight-semibold); cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--color-text-muted); font-size: var(--text-heading); font-weight: var(--weight-regular); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding: 0 var(--space-xl) var(--space-l); color: var(--color-text-muted); }

/* Pravni text */
.legal-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-4xl); }
@media (min-width: 1000px) {
  .legal-grid { grid-template-columns: 1fr 1fr; }
}
.legal h2 { color: var(--color-white); font-size: var(--text-panel); font-weight: var(--weight-bold); line-height: var(--leading-tight); letter-spacing: var(--tracking-title); }
.legal h3 { margin-top: var(--space-xl); color: var(--color-white); font-size: var(--text-body); font-weight: var(--weight-semibold); }
.legal p { margin-top: var(--space-xs); color: var(--color-text-muted); font-size: var(--text-small); }
.legal-page { padding-block: var(--space-3xl) var(--space-5xl); }
.legal-page h2 { margin-top: var(--space-xl); color: var(--color-white); font-size: var(--text-body); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-body); line-height: var(--leading-body); }
.legal-page p { font-size: var(--text-body); }
.legal a, .prose a { text-decoration: underline; }
.legal .updated { margin-top: var(--space-s); font-size: var(--text-caption); }

/* Paticka */
.site-footer { padding-block: var(--space-3xl); box-shadow: inset 0 1px 0 var(--color-surface-raised); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xl); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-xl); }
.footer-links a { color: var(--color-text-muted); font-size: var(--text-small); }
.footer-links a:hover { color: var(--color-white); text-decoration: none; }

/* Tipy */
.tips-head { padding-block: var(--space-4xl) var(--space-3xl); text-align: center; }
.tips-head .lead { max-width: 640px; margin: var(--space-l) auto 0; }
.tip-list { display: grid; grid-template-columns: 1fr; gap: var(--space-l); padding-bottom: var(--space-5xl); }
@media (min-width: 760px) {
  .tip-list { grid-template-columns: 1fr 1fr; }
}
.tip-card { display: flex; flex-direction: column; color: inherit; }
.tip-card:hover { text-decoration: none; background: var(--color-surface-raised); }
.tip-card .heading { margin-top: var(--space-s); }
.tip-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-s) var(--space-m); color: var(--color-text-muted); font-size: var(--text-caption); }
.tip-topic { color: var(--color-teal); font-weight: var(--weight-medium); }
.tips-empty { padding-bottom: var(--space-5xl); text-align: center; color: var(--color-text-muted); }

.article { padding-block: var(--space-3xl) var(--space-5xl); }
.article-back { display: inline-block; margin-bottom: var(--space-xl); font-size: var(--text-small); }
.article .title { font-size: var(--text-panel); }
.article .tip-meta { margin-top: var(--space-l); }
.article .lead { margin-top: var(--space-xl); }
.prose { margin-top: var(--space-xxl); }
.prose h2 { margin-top: var(--space-3xl); color: var(--color-white); font-size: var(--text-heading); font-weight: var(--weight-semibold); line-height: var(--leading-snug); letter-spacing: var(--tracking-title); }
.prose h3 { margin-top: var(--space-xxl); color: var(--color-white); font-size: var(--text-body); font-weight: var(--weight-semibold); }
.prose p, .prose ul, .prose ol, .prose blockquote { margin-top: var(--space-l); }
.prose ul { list-style: disc; padding-left: var(--space-xl); }
.prose ol { list-style: decimal; padding-left: var(--space-xl); }
.prose li + li { margin-top: var(--space-s); }
.prose blockquote { margin-inline: 0; padding-left: var(--space-l); box-shadow: inset 2px 0 0 var(--color-accent); color: var(--color-text-muted); }
.prose code { padding-inline: var(--space-xs); border-radius: var(--radius-control); background: var(--color-surface-raised); font-size: var(--text-small); }
.prose strong { color: var(--color-white); font-weight: var(--weight-semibold); }
.sources { margin-top: var(--space-3xl); }
.sources ul { margin-top: var(--space-s); }
.sources li + li { margin-top: var(--space-xs); }
.sources a { font-size: var(--text-small); }
.article-cta { margin-top: var(--space-3xl); text-align: center; }
.article-cta .btn { margin-top: var(--space-l); }

/* Stranka nenalezena */
.not-found { padding-block: var(--space-5xl); text-align: center; }
.not-found .lead { margin-top: var(--space-l); }

.consent {
  position: fixed;
  z-index: 20;
  inset-inline: var(--layout-gutter);
  bottom: var(--layout-gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-l);
  max-width: var(--layout-text);
  margin-inline: auto;
  padding: var(--space-l) var(--space-xl);
  background: var(--color-surface-raised);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.consent-text { flex: 1 1 20em; margin: 0; color: var(--color-text); font-size: var(--text-small); line-height: var(--leading-snug); }
.consent-text a { color: inherit; text-decoration: underline; }
.consent-actions { display: flex; flex: 1 1 12em; gap: var(--space-s); }
.consent-actions .btn { flex: 1; background: var(--color-surface); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* Tisk: tip jako papirovy checklist, cerny text na bilem, bez navigace (Dan 2026-11-13) */
@media print {
  .nav, .site-footer, .store-badge, .skip-link, .consent, .article-back, .article-cta { display: none; }
  body, .article, .prose, .sources { background: var(--color-white); color: var(--color-black); }
  .title, .heading, .lead, .tip-meta, .tip-topic, .prose h2, .prose h3, .prose li, .prose p, .sources a { color: var(--color-black); }
}
