/* ============================================
   AI Divide v2 — Design System & Page Styles
   Brand Manual v3 compliant
   ============================================ */

:root {
  --navy: #1B2974;
  --teal: #39BDB2;
  --teal-light: #BDE4EB;
  --green: #2B5E43;
  --crimson: #B11506;
  --gray-light: #EEF0F1;
  --gray: #6B7280;
  --white: #FFFFFF;

  --ff: 'DM Sans', system-ui, sans-serif;
  --fm: 'DM Mono', monospace;
  --fi: 'IBM Plex Mono', monospace;

  --radius: 6px;
  --max-content: 1200px;
  --max-text: 680px;
  --max-bot: 640px;
  --transition: 200ms ease;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  font-family: var(--ff);
  font-size: 17px;
  line-height: 1.6;
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; }

/* --- Typography --- */
h1, h2, h3 { font-weight: 700; line-height: 1.15; }
h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); margin-bottom: 24px; }
h3 { font-size: clamp(1.125rem, 2vw, 1.5rem); }

/* --- Layout --- */
.section-inner {
  max-width: var(--max-content);
  margin-inline: auto;
  padding-inline: 48px;
}
@media (max-width: 768px) {
  .section-inner { padding-inline: 20px; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.4;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.btn-cta {
  background: var(--teal);
  color: var(--navy);
  font-weight: 700;
}
.btn-cta:hover { background: #42cfc4; box-shadow: 0 4px 16px rgba(57,189,178,0.3); }

.btn-primary {
  background: var(--navy);
  color: var(--white);
}
.btn-primary:hover { background: #263396; }
.btn-primary:disabled {
  background: var(--gray);
  cursor: not-allowed;
  transform: none;
}

.btn-outline {
  background: transparent;
  color: var(--teal);
  border: 1.5px solid var(--teal);
}
.btn-outline:hover { background: rgba(57,189,178,0.08); }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  padding: 8px 16px;
}
.btn-ghost:hover { background: var(--gray-light); }

/* --- Form elements --- */
.input-field {
  width: 100%;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--navy);
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--navy);
  transition: border-color var(--transition);
}
.input-field:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(57,189,178,0.15); }
.input-field::placeholder { color: var(--gray); }
.input-field.has-error { border-color: var(--crimson); }

.field-group { margin-bottom: 16px; }
.field-label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 0.9375rem; }
.field-error { font-size: 0.8125rem; color: var(--crimson); margin-top: 4px; display: none; }
.field-error.visible { display: block; }
.field-optional { font-size: 0.8125rem; color: var(--gray); font-weight: 400; margin-left: 6px; }

/* --- Custom radio buttons --- */
.radio-group { display: flex; flex-direction: column; gap: 10px; }
.radio-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  line-height: 1.5;
}
.radio-option:hover { border-color: var(--teal); background: rgba(57,189,178,0.04); }
.radio-option.selected { border-color: var(--teal); background: rgba(57,189,178,0.06); }
.radio-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-dot {
  flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px;
  border: 2px solid var(--navy); border-radius: 50%;
  transition: border-color var(--transition); position: relative;
}
.radio-dot::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%;
  background: var(--teal); transform: scale(0); transition: transform var(--transition);
}
.radio-option.selected .radio-dot::after { transform: scale(1); }
.radio-option input:focus-visible ~ .radio-dot { outline: 2px solid var(--teal); outline-offset: 2px; }

/* --- Checkbox --- */
.checkbox-wrap {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  font-size: 0.8125rem; color: var(--gray); line-height: 1.5;
}
.checkbox-wrap input[type="checkbox"] {
  flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--teal);
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy); color: var(--white);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max-content); margin-inline: auto;
  padding: 16px 48px;
}
.header-logo {
  font-family: var(--fi); font-weight: 700;
  font-size: 2.25rem; color: var(--white); letter-spacing: -0.02em;
}
.header-right { display: flex; align-items: center; gap: 32px; }
.header-nav { display: flex; align-items: center; gap: 28px; }
.header-nav a {
  font-size: 0.9375rem; font-weight: 500;
  color: rgba(255,255,255,0.8); transition: color var(--transition);
}
.header-nav a:hover { color: var(--white); }
.header-nav-logo { height: 44px; width: auto; display: block; }

@media (max-width: 768px) {
  .header-inner { padding: 12px 20px; }
  .header-logo { font-size: 1.625rem; }
  .header-right { gap: 20px; }
  .header-nav { gap: 16px; }
  .header-nav a { font-size: 0.8125rem; }
  .header-nav-logo { height: 32px; }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  background: var(--navy); color: var(--white);
  padding: 80px 48px 96px;
}
.hero-inner {
  max-width: var(--max-content); margin-inline: auto;
  display: grid; grid-template-columns: 1fr 400px; gap: 64px; align-items: center;
}
.hero-eyebrow {
  font-family: var(--fm); font-size: 0.875rem;
  color: var(--teal); text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.hero h1 { margin-bottom: 24px; font-family: var(--fi); letter-spacing: -0.02em; }
.hero-perex {
  font-size: 1.1875rem; color: rgba(255,255,255,0.85);
  line-height: 1.65; margin-bottom: 40px; max-width: var(--max-text);
}
.hero-actions { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.hero-link {
  font-size: 0.9375rem; color: var(--teal-light);
  text-decoration: underline; text-underline-offset: 3px;
}
.hero-link:hover { color: var(--white); }
.hero-microcopy {
  font-size: 0.875rem; color: rgba(255,255,255,0.55);
}
.hero-visual { display: flex; align-items: center; justify-content: center; }
.topo-map { width: 100%; max-width: 400px; height: auto; }

@media (max-width: 900px) {
  .hero { padding: 48px 20px 64px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }
}

/* ============================================
   SECTIONS — shared rhythm
   ============================================ */
.section-story,
.section-mindset {
  padding: 96px 0; background: var(--white);
}
.section-roadmap,
.section-explain {
  padding: 96px 0; background: var(--gray-light);
}
@media (max-width: 768px) {
  .section-story, .section-mindset, .section-roadmap, .section-explain { padding: 64px 0; }
}

/* ============================================
   PŘÍBĚH
   ============================================ */
.story-layout {
  display: grid; grid-template-columns: 1fr 280px; gap: 64px; align-items: start;
}
.story-content { min-width: 0; }
.story-photo {
  position: sticky; top: 120px;
}
.story-photo img {
  width: 280px; height: 280px; border-radius: 50%; object-fit: cover;
}
.story-text {
  max-width: var(--max-text); margin-bottom: 32px;
}
.story-text p { margin-bottom: 20px; }
.story-statement {
  font-size: 1.25rem; font-weight: 700; color: var(--navy);
  margin-top: 8px; margin-bottom: 8px;
}
.story-aside {
  max-width: var(--max-text);
  padding: 16px 20px; border-left: 3px solid var(--teal);
  color: var(--gray); font-size: 0.9375rem; line-height: 1.6;
}
@media (max-width: 900px) {
  .story-layout { grid-template-columns: 1fr; gap: 40px; }
  .story-photo { justify-self: center; position: static; }
  .story-photo img { width: 200px; height: 200px; }
}

/* ============================================
   AI MINDSET
   ============================================ */
.mindset-text { max-width: var(--max-text); margin-bottom: 48px; }
.mindset-text p { margin-bottom: 20px; }
.mindset-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.mindset-card {
  background: var(--navy); color: var(--white);
  border-radius: var(--radius); padding: 32px 24px;
}
.mindset-icon { color: var(--teal); margin-bottom: 16px; }
.mindset-icon img { display: block; }
.mindset-card h3 { margin-bottom: 12px; font-size: 1.125rem; }
.mindset-card p { font-size: 0.9375rem; color: rgba(255,255,255,0.8); line-height: 1.55; }

@media (max-width: 768px) {
  .mindset-cards { grid-template-columns: 1fr; }
}

/* ============================================
   AI VYSVĚTLENÍ
   ============================================ */
.explain-text { max-width: var(--max-text); margin-bottom: 32px; }
.explain-text p { margin-bottom: 20px; }
.explain-text a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }

/* ============================================
   ROADMAP
   ============================================ */
.roadmap-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: stretch;
  margin-bottom: 40px;
}
.roadmap-step { padding: 0 16px; }
.step-icon { color: var(--teal); margin-bottom: 12px; }
.roadmap-step h3 { margin-bottom: 8px; }
.step-time {
  font-family: var(--fm); font-size: 0.8125rem;
  color: var(--teal); margin-bottom: 12px;
}
.roadmap-step p:last-child { font-size: 0.9375rem; color: var(--gray); line-height: 1.55; }
.roadmap-divider {
  width: 2px; background: var(--teal);
  align-self: stretch;
}
.roadmap-note {
  max-width: var(--max-text); color: var(--gray); font-size: 0.9375rem;
  line-height: 1.6; border-left: 3px solid var(--teal); padding: 12px 20px;
}

@media (max-width: 900px) {
  .roadmap-steps {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .roadmap-step { padding: 0; }
  .roadmap-divider {
    width: 48px; height: 2px;
    margin: 16px auto;
    align-self: auto;
  }
}

/* ============================================
   BRIDGING SECTION — "Pro koho je tahle mapa"
   ============================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section-bridging {
  padding: 96px 0; background: var(--white);
}
.bridging-grid {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 0 24px;
  align-items: start;
}
.bridging-item { }
.bridging-dot {
  font-size: 2.5rem; color: var(--teal); line-height: 1;
  align-self: center; text-align: center; user-select: none; opacity: 0.6;
}
.bridging-body {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--navy);
  margin-bottom: 12px;
}

.bridging-question {
  font-size: 1.0625rem; line-height: 1.65;
  color: var(--navy); margin-bottom: 16px;
}
.bridging-answer {
  font-size: 1.0625rem; color: var(--navy);
}
@media (max-width: 768px) {
  .section-bridging { padding: 64px 0; }
  .bridging-grid { grid-template-columns: 1fr; gap: 0; }
  .bridging-dot {
    display: block; text-align: center; padding: 16px 0;
  }
}

/* ============================================
   BOT SECTION
   ============================================ */
.section-bot {
  padding: 96px 0; background: var(--gray-light);
}
.bot-container {
  max-width: var(--max-bot); margin-inline: auto;
  min-height: 300px; position: relative;
}

/* Bot screens — crossfade inside fixed container */
.bot-screen {
  opacity: 0; transition: opacity var(--transition);
  position: absolute; inset: 0; pointer-events: none;
}
.bot-screen.active { opacity: 1; position: relative; pointer-events: auto; }

/* Welcome — CTA card (brief 5.2) */
.bot-cta-card {
  background: var(--teal-light);
  border: 1px solid var(--navy);
  border-radius: 12px;
  padding: 48px;
  text-align: center;
  max-width: var(--max-bot);
  margin-inline: auto;
}
.bot-cta-personal {
  font-style: italic; color: var(--gray);
  font-size: 0.9375rem; margin-bottom: 24px;
}
.btn-cta-start {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--teal); color: var(--white);
  font-weight: 700; font-size: 1.125rem;
  padding: 16px 32px; border-radius: var(--radius);
  margin-bottom: 16px; transition: background var(--transition), transform var(--transition);
  white-space: normal; line-height: 1.4;
}
.btn-cta-start:hover { background: #2ea89e; box-shadow: 0 4px 16px rgba(57,189,178,0.3); }
.btn-cta-start:active { transform: scale(0.98); }
.btn-cta-start:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.bot-cta-micro {
  font-size: 0.875rem; color: var(--gray); line-height: 1.6;
}
@media (max-width: 768px) {
  .bot-cta-card { padding: 32px 24px; }
  .btn-cta-start { font-size: 1rem; padding: 14px 24px; }
}

.bot-contact-gate {
  max-width: var(--max-bot);
  margin-inline: auto;
  padding: 32px;
  background: var(--white);
  border: 1px solid var(--teal);
  border-radius: 12px;
}
.bot-contact-gate h3 { margin-bottom: 12px; line-height: 1.35; font-size: 1.25rem; }
.bot-contact-lead { color: var(--gray); margin-bottom: 24px; line-height: 1.6; font-size: 0.9375rem; }
@media (max-width: 768px) {
  .bot-contact-gate { padding: 24px; }
}

/* Progress bar */
.bot-progress-wrap {
  display: flex; align-items: center; gap: 12px; margin-bottom: 28px;
}
.bot-progress-text { font-family: var(--fm); font-size: 0.8125rem; color: var(--gray); white-space: nowrap; }
.bot-progress-bar { display: flex; gap: 4px; flex: 1; }
.bot-progress-seg {
  flex: 1; height: 4px; border-radius: 2px; background: var(--gray-light);
  transition: background var(--transition);
}
.bot-progress-seg.filled { background: var(--teal); }

/* Question */
.bot-question {
  border: 1px solid var(--teal); border-radius: 12px;
  padding: 32px; background: var(--white);
}
.bot-question h3 { margin-bottom: 24px; line-height: 1.4; font-size: 1.1875rem; }
.bot-question .radio-group { margin-bottom: 28px; }
.bot-actions { display: flex; align-items: center; gap: 12px; }

@media (max-width: 768px) {
  .bot-question { padding: 24px; }
}
.bot-back {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.875rem; color: var(--gray); cursor: pointer;
  background: none; border: none; padding: 8px 12px;
  transition: color var(--transition);
}
.bot-back:hover { color: var(--navy); }
.bot-back svg { width: 16px; height: 16px; }

/* Semi-report with streaming + blur */
.semi-report {
  max-width: var(--max-text); margin-inline: auto;
}
.sr-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding-bottom: 16px; margin-bottom: 24px;
  border-bottom: 2px solid var(--navy);
}
.sr-logo { font-family: var(--fi); font-weight: 700; font-size: 1.125rem; color: var(--navy); }
.sr-meta { font-family: var(--fm); font-size: 0.75rem; color: var(--gray); text-align: right; }
.sr-content h2 { font-size: 1.25rem; margin-top: 28px; margin-bottom: 14px; }
.sr-content p { font-size: 0.9375rem; line-height: 1.75; margin-bottom: 14px; color: var(--navy); }
.sr-paragraph.sr-stream {
  opacity: 0; transform: translateY(8px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.sr-paragraph.sr-stream.visible {
  opacity: 1; transform: translateY(0);
}
.sr-blur-zone {
  filter: blur(8px); user-select: none; pointer-events: none; opacity: 0.6;
}
.sr-paywall {
  background: var(--white); border-radius: 12px;
  border: 1px solid var(--navy);
  padding: 32px 28px; margin-top: 24px;
  box-shadow: 0 2px 16px rgba(27,41,116,0.08);
}
.sr-paywall-title { font-size: 1.125rem; margin-bottom: 8px; color: var(--navy); }
.sr-paywall-desc { margin-bottom: 24px; line-height: 1.6; color: var(--gray); font-size: 0.9375rem; }

/* Wave 2 intro */
.bot-wave2-intro { text-align: center; padding: 48px 0; }
.bot-wave2-intro h3 { margin-bottom: 16px; font-size: 1.375rem; }
.bot-wave2-intro p { margin-bottom: 24px; line-height: 1.7; max-width: 480px; margin-inline: auto; }

/* Loading */
.bot-loading { text-align: center; padding: 48px 0; }
.bot-loading-line {
  font-size: 1.0625rem; color: var(--navy);
  margin-bottom: 12px; opacity: 0; transition: opacity 600ms ease;
}
.bot-loading-line.visible { opacity: 1; }
.bot-loading-extra {
  font-size: 0.9375rem; color: var(--gray); margin-top: 24px;
  opacity: 0; transition: opacity 600ms ease;
}
.bot-loading-extra.visible { opacity: 1; }

/* Confirmation (after contact submit) */
.bot-confirmation { text-align: center; padding: 48px 0; }
.bot-confirmation h3 { margin-bottom: 20px; font-size: 1.375rem; }
.bot-confirmation p { margin-bottom: 14px; line-height: 1.7; max-width: 480px; margin-inline: auto; }
.bot-confirmation a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
.bot-confirmation .signature {
  margin-top: 32px; font-style: italic; color: var(--gray);
}

.bot-confirmation--ack .bot-ack-lead {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.35;
}
.bot-confirmation--ack .bot-ack-signature {
  margin-top: 28px;
  margin-bottom: 0;
  font-weight: 500;
  line-height: 1.5;
}

/* Report */
.bot-report { }
.bot-report-body h2 { margin-top: 32px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--teal); }
.bot-report-body h2:first-child { margin-top: 0; }
.bot-report-body h3 { margin-top: 20px; margin-bottom: 10px; }
.bot-report-body p { margin-bottom: 14px; line-height: 1.75; }
.bot-report-body blockquote {
  border-left: 3px solid var(--teal); padding: 12px 20px; margin: 20px 0;
  background: rgba(57,189,178,0.04); border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}
.bot-report-actions { margin-top: 40px; display: flex; flex-direction: column; gap: 12px; }
.bot-report-actions .btn { width: 100%; }
.bot-report-note { font-size: 0.8125rem; color: var(--gray); text-align: center; margin-top: 16px; }

/* Small-firm */
.bot-smallfirm { text-align: center; padding: 32px 0; }
.bot-smallfirm p { margin-bottom: 16px; line-height: 1.7; text-align: left; }

/* Question form (post-report) */
.bot-question-form { display: none; margin-top: 16px; }
.bot-question-form.open { display: block; }
.bot-question-form textarea {
  width: 100%; min-height: 100px; padding: 12px 16px;
  border: 1px solid var(--navy); border-radius: var(--radius);
  font-family: var(--ff); font-size: 1rem; resize: vertical; margin-bottom: 12px;
}
.bot-question-form textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(57,189,178,0.15); }

@media (max-width: 768px) {
  .section-bot { padding: 64px 0; }
}

/* ============================================
   BOTTOM CTA
   ============================================ */
.section-bottom-cta {
  padding: 96px 0; background: var(--teal-light); color: var(--navy);
}
.section-bottom-cta-inner { text-align: center; }
.section-bottom-cta h2 { color: var(--navy); }
.section-bottom-cta p {
  font-size: 1.0625rem; color: var(--navy); opacity: 0.8;
  max-width: var(--max-text); margin-inline: auto; margin-bottom: 32px; line-height: 1.65;
}
@media (max-width: 768px) {
  .section-bottom-cta { padding: 64px 0; }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--navy); color: rgba(255,255,255,0.8); padding: 64px 0;
}
.footer-inner {
  max-width: var(--max-content); margin-inline: auto; padding-inline: 48px;
  text-align: center;
}
.footer-main { margin-bottom: 32px; }
.footer-logo-wrap {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-bottom: 16px;
}
.footer-logo-img { height: 30px; width: auto; }
.footer-logo {
  font-family: var(--fi); font-weight: 700;
  font-size: 2rem; color: var(--white);
}
.footer-email {
  display: inline-block; font-size: 1.375rem; font-weight: 600;
  color: var(--teal-light); text-decoration: underline; text-underline-offset: 4px;
  margin-bottom: 12px;
}
.footer-email:hover { color: var(--white); }
.footer-note { font-size: 0.9375rem; color: rgba(255,255,255,0.6); }
.footer-links {
  display: flex; justify-content: center; gap: 24px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.footer-links a { font-size: 0.875rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--white); }
.footer-copy {
  font-size: 0.8125rem; color: rgba(255,255,255,0.4);
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-copy a { color: rgba(255,255,255,0.5); text-decoration: underline; text-underline-offset: 2px; }
.footer-copy a:hover { color: var(--white); }

@media (max-width: 768px) {
  .footer { padding: 48px 0; }
  .footer-inner { padding-inline: 20px; }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 400ms ease forwards; }
