/* =============================================================================
 * styles.css — AI Realitka špička funnelu. Střízlivě, mobile-first, a11y.
 * Externí soubor (self) → drží CSP `default-src 'self'` bez 'unsafe-inline'.
 * ========================================================================== */

:root {
  --bg: #ffffff;
  --fg: #14181f;
  --muted: #55606e;
  --line: #e2e6ec;
  --brand: #143b6b;      /* střízlivá modrá */
  --brand-ink: #0e2b4e;
  --accent-bg: #f4f7fb;
  --ok-bg: #eef4ff;
  --focus: #1b6ef3;
  --radius: 12px;
  --maxw: 68rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
}

h1, h2, h3 { line-height: 1.2; color: var(--brand-ink); }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); margin: 0 0 .6em; }
p { margin: 0 0 1em; }

a { color: var(--brand); }
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* Skip link (a11y) */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--brand); color: #fff; padding: .6rem 1rem; z-index: 10;
}
.skip-link:focus { left: 0; }

/* Header / nav */
.site-header {
  border-bottom: 1px solid var(--line);
  padding: .9rem 0;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { font-weight: 700; color: var(--brand-ink); text-decoration: none; letter-spacing: .01em; }
.brand span { color: var(--muted); font-weight: 500; }

/* Hero */
.hero { padding: clamp(2.5rem, 8vw, 5rem) 0; background: linear-gradient(180deg, var(--accent-bg), #fff); }
.hero p.lede { font-size: 1.15rem; color: var(--muted); max-width: 42rem; }
.hero .cta { display: inline-block; margin-top: .5rem; background: var(--brand); color: #fff;
  text-decoration: none; padding: .8rem 1.4rem; border-radius: var(--radius); font-weight: 600; }
.hero .cta:hover { background: var(--brand-ink); }

/* Sekce */
section { padding: clamp(2rem, 6vw, 3.5rem) 0; }
section:nth-of-type(even) { background: var(--accent-bg); }

/* Kroky */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem;
  grid-template-columns: 1fr; counter-reset: step; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.25rem 3.6rem; position: relative; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 1rem; top: 1.15rem;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700;
  display: grid; place-items: center;
}
.steps h3 { margin: 0 0 .3rem; }

/* Widget */
.widget-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; max-width: 40rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; }
.field select, .field input[type="number"], .field input[type="text"] {
  width: 100%; padding: .7rem .8rem; font-size: 1rem;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--fg);
}
.field select:disabled { background: #f2f4f7; color: var(--muted); }
#w-estimate-btn {
  width: 100%; padding: .85rem 1rem; font-size: 1.05rem; font-weight: 600;
  color: #fff; background: var(--brand); border: 0; border-radius: 10px; cursor: pointer;
}
#w-estimate-btn:hover { background: var(--brand-ink); }

#w-result { margin-top: 1.25rem; padding: 1.1rem; background: var(--ok-bg);
  border: 1px solid #d3e0f7; border-radius: 10px; }
#w-result.w-result--error { background: #fff5f5; border-color: #f2caca; }
.w-range { font-size: 1.5rem; font-weight: 700; color: var(--brand-ink); margin: 0 0 .2rem; }
.w-permeter { color: var(--muted); margin: 0 0 .6rem; }
.w-disclosure { font-size: .85rem; color: var(--muted); margin: 0;
  border-top: 1px dashed #c6d4ea; padding-top: .6rem; }

.grid-2 { display: grid; gap: 1rem; grid-template-columns: 1fr; }

/* Article 50 slot */
.ai-badge { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
  padding: .25rem .7rem; margin-top: 1rem; }
.ai-badge::before { content: "AI"; font-weight: 700; color: var(--brand);
  background: var(--accent-bg); border-radius: 4px; padding: 0 .3rem; font-size: .7rem; }

/* Kontakt */
.contact a { font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0; color: var(--muted); font-size: .9rem; }
.site-footer strong { color: var(--fg); }
.site-footer .legal { margin-top: .6rem; }

/* Responsivní vylepšení */
@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
