/* ============================================================
   Alfred SaaS — prezentační web + aplikace
   Vychází z Virtualworx brand manuálu: černobílá, Poppins, pill tlačítka.
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f6;
  --bg-softer: #fafafa;
  --ink: #0a0a0b;
  --ink-2: #26262a;
  --muted: rgba(10, 10, 11, 0.6);
  --faint: rgba(10, 10, 11, 0.42);
  --line: rgba(10, 10, 11, 0.12);
  --line-soft: rgba(10, 10, 11, 0.07);
  --ok: #2f9e63;
  --ok-bg: #e9f6ef;
  --bad: #d83a3a;
  --bad-bg: #fdecec;
  --warn: #b7791f;
  --warn-bg: #fdf4e3;
  --unknown: #52525a;
  --unknown-bg: #efeff1;
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1120px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --surface: #ffffff;
  --surface-2: #f5f5f6;
  --on-primary: #ffffff;
  --primary: #0a0a0b;
  --primary-hover: #26262a;
  --accent: #2f9e63;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Poppins', -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .875rem; }
.center { text-align: center; }
.eyebrow {
  font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 14px; display: inline-block;
}
.hidden-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Tlačítka ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; border: 1px solid var(--primary);
  background: var(--primary); color: var(--on-primary); font: inherit; font-weight: 600; font-size: .95rem;
  text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease, opacity .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--primary-hover); color: var(--on-primary); transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(47, 158, 99, .45); outline-offset: 2px;
}
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--bad); border-color: var(--bad); }
.btn-danger:hover { background: #b92f2f; }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-lg { padding: 16px 30px; font-size: 1.05rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }

/* ---------- Navigace webu ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft);
}
.site-nav .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-size: 1rem; font-weight: 800;
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { text-decoration: none; font-size: .92rem; font-weight: 500; color: var(--muted); }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
@media (max-width: 860px) {
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: flex-start; padding: 16px 20px 22px; gap: 14px; border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: inline-block; }
  .nav-actions .btn-ghost { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: 88px 0 72px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(circle, rgba(47,158,99,.10), rgba(47,158,99,0) 62%); pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; position: relative; }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 34ch; margin-bottom: 30px; }
.hero-note { margin-top: 16px; font-size: .85rem; color: var(--faint); }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } .hero { padding: 56px 0 40px; } }

/* Ukázková karta v hero */
.preview-card {
  background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.18);
}
.preview-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 10px; }
.preview-head strong { font-size: .95rem; }

/* ---------- Sekce ---------- */
.section { padding: 88px 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--ink); color: #e9e9ec; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .muted { color: rgba(255,255,255,.62); }
.section-dark .eyebrow { color: rgba(255,255,255,.55); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; }
@media (max-width: 700px) { .section { padding: 60px 0; } }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card-soft { background: var(--bg-soft); border-color: transparent; }
.section-dark .card { background: #151517; border-color: #2a2a2e; color: #d7d7db; }
.card h3 { margin-bottom: 8px; }
.num {
  width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center;
  font-weight: 700; margin-bottom: 18px; font-size: .95rem;
}
.section-dark .num { background: #fff; color: var(--ink); }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { padding-left: 32px; position: relative; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ok-bg); color: var(--ok); font-size: .78rem; font-weight: 700; display: grid; place-items: center;
}
.checklist.no li::before { content: "–"; background: var(--unknown-bg); color: var(--unknown); }

.quote { font-size: clamp(1.3rem, 2.6vw, 1.9rem); font-weight: 600; line-height: 1.35; letter-spacing: -0.02em; max-width: 30ch; }

/* ---------- Ceník ---------- */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 860px; margin: 0 auto; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }
.plan { border: 1px solid var(--line); border-radius: 22px; padding: 30px; background: var(--surface); display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--ink); }
.plan .price { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; margin: 8px 0 4px; }
.plan .price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.plan ul { margin: 20px 0 26px; }
.plan .btn { margin-top: auto; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: .75rem;
  font-weight: 600; background: var(--bg-soft); color: var(--ink-2); white-space: nowrap;
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-unknown { background: var(--unknown-bg); color: var(--unknown); }
.badge-dark { background: var(--ink); color: #fff; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--muted); }

/* ---------- Formuláře ---------- */
.form { display: grid; gap: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field input[type=text], .field input[type=email], .field input[type=password], .field textarea, .field select {
  width: 100%; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit;
  background: var(--surface); color: var(--ink);
}
.field textarea { resize: vertical; }
.field .help { font-size: .8rem; color: var(--faint); margin-top: 4px; }
.field .error, .errorlist { color: var(--bad); font-size: .85rem; margin: 4px 0 0; padding: 0; list-style: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--ink); flex-shrink: 0; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form input { flex: 1 1 220px; padding: 13px 18px; border: 1px solid var(--line); border-radius: 999px; font: inherit; min-width: 0; }
.section-dark .inline-form input { background: #151517; border-color: #2a2a2e; color: #fff; }
.section-dark .btn { background: #fff; color: var(--ink); border-color: #fff; }
.section-dark .btn:hover { background: #e9e9ec; }

/* ---------- Auth stránky ---------- */
.auth-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 40px 20px; background: var(--bg-soft); }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border-radius: 24px; padding: 36px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.8rem; }
@media (max-width: 480px) { .auth-card { padding: 26px 20px; } }

/* ---------- Zprávy ---------- */
.messages { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.messages li { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--bg-soft); font-size: .92rem; }
.messages .error { background: var(--bad-bg); color: #8f2222; }
.messages .success { background: var(--ok-bg); color: #1d6b42; }
.messages .info { background: var(--warn-bg); color: #7a5214; }

/* ---------- Patička ---------- */
.site-footer { border-top: 1px solid var(--line-soft); padding: 48px 0 40px; font-size: .9rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid a { display: block; text-decoration: none; color: var(--muted); padding: 3px 0; }
.footer-grid a:hover { color: var(--ink); }
.footer-grid h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--ink); margin-bottom: 12px; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--faint); }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Prose (právní stránky) ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.35rem; margin-top: 2em; }
.prose p, .prose li { color: var(--ink-2); }
.notice { border: 1px dashed var(--line); background: var(--bg-softer); border-radius: var(--radius-sm); padding: 14px 18px; font-size: .9rem; color: var(--muted); }

/* ============================================================
   APLIKACE
   ============================================================ */
.app-nav { border-bottom: 1px solid var(--line-soft); background: #fff; position: sticky; top: 0; z-index: 20; }
.app-nav .container { display: flex; align-items: center; gap: 24px; height: 64px; }
.app-nav .nav-links { gap: 4px; }
.app-nav .nav-links a { padding: 7px 14px; border-radius: 999px; }
.app-nav .nav-links a.active { background: var(--bg-soft); color: var(--ink); }
.app-nav .org { margin-left: auto; font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 14px; }
@media (max-width: 860px) { .app-nav .org .org-name { display: none; } .app-nav .nav-links { top: 64px; } }
.app-main { padding: 36px 0 80px; background: var(--bg-softer); min-height: calc(100vh - 64px); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }

.answers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .answers { grid-template-columns: 1fr; } }
.answer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.answer .q { font-weight: 700; font-size: 1.02rem; }
.answer p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.answer.state-ok { border-top: 4px solid var(--ok); }
.answer.state-problem { border-top: 4px solid var(--bad); }
.answer.state-unknown { border-top: 4px solid var(--unknown); }

.finding {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 18px 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink);
}
a.finding:hover { border-color: var(--ink); }
.finding .meta { display: flex; gap: 8px; flex-wrap: wrap; grid-column: 1 / -1; }
.finding p { margin: 0; color: var(--muted); font-size: .92rem; grid-column: 1 / -1; }
.stack { display: grid; gap: 12px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 760px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.stat .l { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .c { font-size: .8rem; color: var(--muted); }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t .r { text-align: right; font-variant-numeric: tabular-nums; }

.steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.steps span { font-size: .8rem; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); }
.steps span.done { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.steps span.now { background: var(--ink); border-color: var(--ink); color: #fff; }

.progress { display: flex; align-items: center; gap: 14px; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin 0.9s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } .btn { transition: none; } html { scroll-behavior: auto; } }

.evidence { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: .9rem; margin: 0; }
.evidence dt { color: var(--muted); }
.evidence dd { margin: 0; font-variant-numeric: tabular-nums; word-break: break-word; }

.confidence { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); }
.confidence .bar { width: 64px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.confidence .bar i { display: block; height: 100%; background: var(--ink); }

.danger-zone { border: 1px solid rgba(216,58,58,.35); border-radius: var(--radius); padding: 22px; background: var(--surface); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }
.empty { text-align: center; padding: 48px 20px; }
