/* Kimda – web kimda.app. Barvy motivů generuje build.mjs z appky do themes.css; tady je rozvržení. */
:root {
  /* Barvy motivů (pozadí, text, akcenty) jsou v themes.css vygenerovaném z appky. */
  --coral: #FF5A5A;
  --orange: #FFA62B;
  --teal: #26C6C6;
  --violet: #7C73E0;
  --radius: 18px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
p { text-wrap: pretty; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { inset-inline-start: 12px; }

/* Hlavička a patička */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.25rem; }
.brand img { border-radius: 9px; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 650; padding: 8px 12px; border-radius: 999px; }
.site-nav a:hover { color: var(--text); background: var(--bg-alt); }
.site-nav a[aria-current="page"] { color: var(--accent-text); background: var(--primary-soft); }

.site-footer { border-top: 1px solid var(--border); margin-top: 72px; padding: 32px 0 40px; font-size: 0.95rem; color: var(--muted); }
.footer-inner { display: grid; gap: 14px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.footer-brand img { border-radius: 7px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: var(--text); }
.footer-meta { margin: 0; }
.footer-meta a { color: var(--muted); }

/* Úvodní stránka */
.hero { padding: 64px 0 48px; }
.hero-grid { display: grid; gap: 40px; align-items: center; grid-template-columns: 1.1fr 0.9fr; }
.eyebrow { color: var(--accent-text); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; margin: 0 0 12px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin: 0 0 18px; font-weight: 850; }
.hero h1 .accent { color: var(--accent-text); }
.lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px;
  background: var(--text); color: var(--bg); font-weight: 700; font-size: 0.95rem; line-height: 1.2;
}
.store-badge small { display: block; font-weight: 600; opacity: 0.75; font-size: 0.75rem; }
.store-badge svg { width: 22px; height: 22px; flex: none; }
.trial-note { margin: 18px 0 0; color: var(--muted); font-size: 0.95rem; }
.trial-note strong { color: var(--text); }
.hero-art { position: relative; }
.hero-art .icon { width: min(320px, 70%); margin: 0 auto; border-radius: 28%; box-shadow: var(--shadow); }
.hero-art .preview { position: relative; margin: -40px auto 0; width: 100%; max-width: 480px; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface); }

.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin: 0 0 10px; font-weight: 820; }
.section .section-lead { color: var(--muted); margin: 0 0 32px; max-width: 40em; font-size: 1.08rem; }

.features { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 8px; font-size: 1.15rem; font-weight: 780; }
.card p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.card .dot { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 14px; display: grid; place-items: center; font-size: 1.3rem; }
.dot.coral { background: color-mix(in srgb, var(--coral) 18%, transparent); }
.dot.orange { background: color-mix(in srgb, var(--orange) 22%, transparent); }
.dot.teal { background: color-mix(in srgb, var(--teal) 22%, transparent); }
.dot.violet { background: color-mix(in srgb, var(--violet) 22%, transparent); }

.tasks-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 8px; }
.tasks-strip figure { margin: 0; text-align: center; font-size: 0.88rem; color: var(--muted); font-weight: 650; }
.tasks-strip img { border-radius: 22%; margin: 0 auto 8px; background: var(--surface); box-shadow: var(--shadow); }

.jars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.jar { border-radius: 14px; padding: 14px 16px; font-weight: 750; background: var(--surface); border: 1px solid var(--border); }
.jar span { display: block; font-weight: 600; color: var(--muted); font-size: 0.9rem; }
.jar.save { border-top: 5px solid var(--save); }
.jar.spend { border-top: 5px solid var(--spend); }
.jar.give { border-top: 5px solid var(--give); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: var(--on-primary); font-weight: 800; margin-bottom: 12px;
}
.steps h3 { margin: 0 0 6px; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--muted); font-size: 0.98rem; }

.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pricing .card h3 { font-size: 1.3rem; }
.pricing .big { font-size: 2rem; font-weight: 850; color: var(--accent-text); margin: 4px 0 8px; }

/* Textové stránky */
.prose { max-width: 760px; padding-top: 48px; }
.prose h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 8px; font-weight: 840; }
.prose h2 { font-size: 1.35rem; margin: 40px 0 10px; font-weight: 780; scroll-margin-top: 84px; }
.prose h3 { font-size: 1.1rem; margin: 28px 0 6px; }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose li { margin: 0.45em 0; }
.prose .updated { color: var(--muted); margin: 0 0 28px; }
.prose .intro { font-size: 1.12rem; color: var(--muted); }
.callout { background: var(--primary-soft); border-radius: var(--radius); padding: 18px 22px; margin: 24px 0; }
.callout p { margin: 0.3em 0; }
.callout.warn { background: var(--warning-soft); }
.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0 8px; }
.contact-cards .card a { font-weight: 750; font-size: 1.05rem; }
.btn {
  display: inline-block; background: var(--primary); color: var(--on-primary); text-decoration: none;
  font-weight: 750; padding: 12px 20px; border-radius: 999px; margin: 8px 0;
}
.btn:hover { background: var(--primary-pressed); color: var(--on-primary); }
details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px 18px; margin: 10px 0; }
details[open] { padding-bottom: 12px; }
summary { cursor: pointer; font-weight: 750; padding: 12px 0; }
details p, details ul, details ol { margin: 0.4em 0; color: var(--muted); }
details li { color: var(--muted); }
pre.template {
  white-space: pre-wrap; background: var(--surface); border: 1px dashed var(--border); border-radius: 12px;
  padding: 14px 16px; font-family: inherit; font-size: 0.97rem; color: var(--text);
}
.not-found { text-align: center; padding-top: 96px; }
.not-found img { margin: 0 auto 20px; border-radius: 24%; }

@media (max-width: 860px) {
  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art .icon { display: none; }
  .hero-art .preview { margin-top: 0; }
  .features, .steps { grid-template-columns: 1fr 1fr; }
  .tasks-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 0; }
  .site-header { position: static; }
  .features, .steps, .pricing, .contact-cards, .jars { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
}
.section-lead.after-steps { margin: 28px 0 0; }

/* Hlavička: navigace, jazyk a motiv */
.header-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.menu { position: relative; }
.menu > summary {
  list-style: none; cursor: pointer; font-weight: 650; color: var(--muted); padding: 8px 12px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface); white-space: nowrap;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover, .menu[open] > summary { color: var(--text); }
.menu-panel {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 20; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 6px;
  max-height: min(70vh, 520px); overflow: auto; min-width: 220px; list-style: none; margin: 0;
}
.lang-switch .menu-panel { columns: 2; column-gap: 4px; width: max-content; }
.menu-panel a, .menu-panel button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; padding: 7px 10px;
  border-radius: 9px; color: var(--text); text-decoration: none; font: inherit; font-size: 0.95rem;
  background: none; border: 0; cursor: pointer; break-inside: avoid;
}
.menu-panel a:hover, .menu-panel button:hover { background: var(--bg-alt); }
.menu-panel [aria-current="true"], .menu-panel [aria-pressed="true"] { background: var(--primary-soft); font-weight: 750; }
.swatch { width: 22px; height: 22px; border-radius: 7px; border: 1px solid var(--border); flex: none; }
.swatch.auto { background: linear-gradient(135deg, #F7F5FF 0 50%, #0E1418 50%); }
html:not(.js) .theme-switch, html:not(.js) .theme-hint { display: none; }

/* Galerie motivů na úvodní stránce */
.theme-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.theme-card {
  display: block; width: 100%; padding: 0; text-align: start; font: inherit; color: var(--text); cursor: pointer;
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
html:not(.js) .theme-card { cursor: default; }
.theme-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--bg-alt); }
.theme-card span { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 700; font-size: 0.95rem; }
.theme-card[aria-pressed="true"] { border-color: var(--accent-text); box-shadow: 0 0 0 3px var(--primary-soft); }
.theme-card:hover { border-color: var(--accent-text); }
@media (max-width: 600px) {
  .header-tools { justify-content: flex-start; }
  .menu-panel { inset-inline-end: auto; inset-inline-start: 0; }
  .lang-switch .menu-panel { columns: 1; }
  .theme-gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
}
