/* ===========================================================
   IČOmat – prémiový minimalistický vzhled
   Světlý + automatický tmavý režim. Písmo Inter.
   =========================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --surface: #ffffff;
  --text: #0a0a0b;
  --muted: #6b7280;
  --faint: #9aa1ac;
  --border: #e9eaee;
  --border-strong: #d7d9df;
  --accent: #0a84ff;
  --accent-soft: #eaf3ff;
  --primary: #0a0a0b;
  --primary-ink: #ffffff;
  --ok: #16a34a;
  --danger: #e5484d;

  --r: 16px;
  --r-sm: 11px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(10, 12, 20, .05);
  --shadow: 0 8px 30px rgba(10, 12, 20, .08);
  --shadow-lg: 0 24px 60px rgba(10, 12, 20, .14);
  --ring: 0 0 0 4px var(--accent-soft);

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0b;
    --bg-soft: #121214;
    --surface: #161618;
    --text: #f4f4f6;
    --muted: #9aa0a8;
    --faint: #6b7280;
    --border: #26272b;
    --border-strong: #34353a;
    --accent: #2f9bff;
    --accent-soft: #11233a;
    --primary: #f4f4f6;
    --primary-ink: #0a0a0b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 8px 30px rgba(0, 0, 0, .5);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
    --ring: 0 0 0 4px rgba(47, 155, 255, .22);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { letter-spacing: -0.025em; line-height: 1.1; margin: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}
.muted { color: var(--muted); }

/* ---------- navigace ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 880px; margin: 0 auto; padding: 20px 24px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  background: var(--primary); color: var(--primary-ink);
  border-radius: 9px; font-weight: 800; font-size: 14px; letter-spacing: -0.04em;
}
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.nav-link { color: var(--muted); font-size: 14px; font-weight: 500; }
.nav-link:hover { color: var(--text); }

/* ---------- layout ---------- */
main { max-width: 880px; margin: 0 auto; padding: 0 24px; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 56px 0 8px; }
.hero-title {
  font-size: clamp(34px, 6vw, 56px); font-weight: 800; letter-spacing: -0.035em;
  margin-bottom: 16px;
}
.hero-sub {
  font-size: clamp(16px, 2.4vw, 19px); color: var(--muted);
  max-width: 520px; margin: 0 auto 32px;
}

/* ---------- vyhledávání ---------- */
.search { max-width: 580px; margin: 0 auto; }
.search-box {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r); padding: 0 16px; height: 62px;
  box-shadow: var(--shadow-sm); transition: box-shadow .2s, border-color .2s, transform .2s;
}
.search-box:focus-within {
  border-color: var(--accent); box-shadow: var(--ring);
}
.search-icon { color: var(--faint); flex: none; }
#search-input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-family: inherit; font-size: 18px; color: var(--text); height: 100%;
}
#search-input::placeholder { color: var(--faint); }
#search-input::-webkit-search-cancel-button { display: none; }
.clear-btn {
  flex: none; border: 0; background: var(--bg-soft); color: var(--muted);
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  font-size: 18px; line-height: 1; display: grid; place-items: center;
}
.clear-btn:hover { color: var(--text); }

.hint { font-size: 13.5px; color: var(--faint); margin: 14px 0 0; }

.recent { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.recent-label { font-size: 13px; color: var(--faint); align-self: center; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: var(--r-pill); padding: 7px 14px; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--text); transform: translateY(-1px); }

/* ---------- status ---------- */
.status { text-align: center; color: var(--muted); font-size: 14.5px; min-height: 20px; margin: 26px 0 0; }
.status.bad { color: var(--danger); }
.spinner {
  display: inline-block; width: 15px; height: 15px; vertical-align: -2px; margin-right: 8px;
  border: 2px solid var(--border-strong); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- karty ---------- */
.results { display: grid; gap: 14px; margin-top: 22px; }
.card {
  text-align: left; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 22px; box-shadow: var(--shadow-sm);
  animation: rise .25s cubic-bezier(.2, .7, .2, 1);
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card-top { margin-bottom: 16px; }
.card-name { font-size: 20px; font-weight: 700; }
.card-obor {
  display: inline-block; margin-top: 7px; font-size: 13px; font-weight: 500;
  color: var(--muted); background: var(--bg-soft); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: var(--r-pill);
}

.kv { margin: 0; display: grid; gap: 0; }
.kv-row {
  display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--border);
}
.kv-row:first-child { border-top: 0; padding-top: 0; }
.kv-row dt { color: var(--muted); font-size: 13.5px; margin: 0; }
.kv-val { font-size: 16px; overflow-wrap: anywhere; }
.kv-val.mono { font-family: var(--mono); letter-spacing: .3px; }
.kv-val.muted { color: var(--faint); font-size: 14px; }

.copy-btn {
  flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px;
  border-radius: 9px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); cursor: pointer; transition: all .14s;
}
.copy-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-soft); }
.copy-btn.copied { color: var(--ok); border-color: var(--ok); }

.card-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--r-sm); font-family: inherit; font-size: 14.5px; font-weight: 600;
  padding: 12px 18px; cursor: pointer; border: 1px solid transparent; transition: all .15s;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { flex: 1; min-width: 180px; background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary.copied { background: var(--ok); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--bg-soft); transform: translateY(-1px); }

/* ---------- sekce ---------- */
section.block { margin-top: 80px; }
.block-head { font-size: 14px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 18px; }

.chips-wrap { display: flex; flex-wrap: wrap; gap: 9px; }
.firm-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: var(--r-pill); padding: 9px 16px; font-size: 14.5px; font-weight: 500;
  transition: all .15s;
}
.firm-chip:hover { border-color: var(--text); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.firm-chip span { color: var(--faint); font-size: 12.5px; }

.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { padding: 22px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.step-n { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.step h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }

.faq details {
  border-bottom: 1px solid var(--border); padding: 6px 4px;
}
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 16px; padding: 16px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-weight: 400; font-size: 22px; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 18px; color: var(--muted); font-size: 15px; }

/* ---------- firemní stránka ---------- */
.crumbs { font-size: 13.5px; color: var(--muted); padding: 32px 0 0; }
.crumbs a:hover { color: var(--text); }
.firma-head { font-size: clamp(28px, 5vw, 40px); font-weight: 800; margin: 14px 0 8px; }
.firma-intro { color: var(--muted); font-size: 16px; max-width: 600px; margin: 0 0 26px; }
.source-link { font-size: 13px; color: var(--faint); margin: 16px 0 0; }
.source-link a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- footer ---------- */
.foot {
  max-width: 880px; margin: 96px auto 0; padding: 28px 24px 40px;
  border-top: 1px solid var(--border); color: var(--muted); font-size: 13.5px;
}
.foot p { margin: 5px 0; }
.foot a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px);
  background: var(--primary); color: var(--primary-ink); padding: 12px 20px;
  border-radius: var(--r-pill); font-size: 14.5px; font-weight: 600;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s; z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--danger); color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .hero { padding: 36px 0 4px; }
  .how-grid { grid-template-columns: 1fr; }
  .kv-row { grid-template-columns: 70px 1fr auto; gap: 10px; }
  .btn-primary { min-width: 140px; }
  section.block { margin-top: 56px; }
}

/* ---------- našeptávač (autocomplete) ---------- */
.search { position: relative; }
.suggest {
  position: absolute; top: 68px; left: 0; right: 0; z-index: 60;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-sm); box-shadow: var(--shadow-lg); overflow: hidden;
  text-align: left;
}
.suggest-item {
  display: flex; flex-direction: column; gap: 2px; width: 100%;
  padding: 11px 16px; border: 0; border-top: 1px solid var(--border);
  background: transparent; cursor: pointer; text-align: left; font-family: inherit;
}
.suggest-item:first-child { border-top: 0; }
.suggest-item:hover, .suggest-item.active { background: var(--bg-soft); }
.su-name { font-weight: 600; font-size: 15px; color: var(--text); }
.su-meta { font-size: 12.5px; color: var(--muted); }
.suggest-empty { padding: 14px 16px; color: var(--muted); font-size: 14px; }

/* ---------- ověřeno / stav firmy ---------- */
.verified { margin: 14px 0 0; font-size: 13px; font-weight: 600; color: var(--ok); }
.verified.bad { color: var(--danger); }
.verified a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.foot-firmy a { color: var(--muted); }
.page-title { font-size: clamp(26px, 5vw, 36px); font-weight: 800; letter-spacing: -.025em; margin: 28px 0 8px; }
.prose h2 { font-size: 19px; margin: 24px 0 6px; }
.prose p { color: var(--muted); line-height: 1.65; margin: 0 0 12px; }
.prose ul, .prose ol { color: var(--muted); line-height: 1.65; padding-left: 20px; margin: 0 0 14px; }
.prose strong { color: var(--text); }
.link-inline { background: none; border: 0; color: var(--accent); font-weight: 600; font-family: inherit; font-size: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
