:root {
  --primary: #0D1B3E;
  --secondary: #FDFCF8;
  --accent: #C9A84C;
  --text: #1b2440;
  --muted: rgba(13, 27, 62, 0.62);
  --ok: #1c8f4d;
  --warn: #c77900;
  --bad: #b92020;
  --card-shadow: 0 18px 40px rgba(13, 27, 62, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "DM Sans", Arial, sans-serif;
  background: var(--secondary);
  color: var(--text);
  line-height: 1.6;
}
a { color: inherit; }
.font-serif { font-family: "Playfair Display", Georgia, serif; }
.text-gradient {
  background: linear-gradient(135deg, #C9A84C, #e0c98a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}
.section { padding: 3.2rem 0; }
.hero {
  padding: 7rem 0 2.8rem;
  background:
    radial-gradient(circle at top right, rgba(201, 168, 76, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(13, 27, 62, 0.03), rgba(13, 27, 62, 0));
}
h1, h2, h3 { line-height: 1.15; margin: 0 0 1rem; }
h1 { font-size: clamp(1.85rem, 4vw, 2.9rem); color: var(--primary); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); color: var(--primary); }
p { margin: 0 0 1rem; color: var(--muted); }

.calc-card, .box {
  background: #fff;
  border-radius: 1rem;
  border: 1px solid rgba(13, 27, 62, 0.08);
  box-shadow: var(--card-shadow);
  padding: clamp(1rem, 2vw, 1.5rem);
}
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.input-row { display: grid; gap: 0.35rem; }
label { font-size: 0.92rem; font-weight: 600; color: rgba(13, 27, 62, 0.9); }
input, select, textarea, button { font: inherit; }
input[type="number"],
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  border: 1px solid rgba(13, 27, 62, 0.2);
  border-radius: 0.65rem;
  padding: 0.72rem 0.8rem;
  background: #fff;
  color: var(--primary);
}
input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}
.hint { margin: 0; font-size: 0.85rem; color: rgba(13, 27, 62, 0.55); }

.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}
.result {
  background: rgba(13, 27, 62, 0.04);
  border: 1px solid rgba(13, 27, 62, 0.09);
  border-radius: 0.8rem;
  padding: 0.85rem;
}
.result .label { font-size: 0.84rem; color: rgba(13, 27, 62, 0.62); margin: 0; }
.result .value {
  margin: 0.2rem 0 0;
  font-size: clamp(1.25rem, 2.8vw, 2.1rem);
  line-height: 1.1;
  font-weight: 700;
  color: var(--primary);
}
.badge {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}
.badge.ok { background: rgba(28,143,77,0.15); color: var(--ok); }
.badge.warn { background: rgba(199,121,0,0.17); color: var(--warn); }
.badge.bad { background: rgba(185,32,32,0.15); color: var(--bad); }

.chart-wrap {
  margin-top: 0.95rem;
  min-height: 230px;
  border: 1px solid rgba(13, 27, 62, 0.08);
  border-radius: 0.8rem;
  background: #fff;
  padding: 0.65rem;
}

.lead-magnet {
  margin-top: 1.25rem;
  border: 1px solid rgba(201,168,76,0.5);
  background: #fffdf6;
}
.cta-btn, .btn-primary {
  border: 0;
  border-radius: 0.65rem;
  padding: 0.82rem 1.05rem;
  font-weight: 700;
  background: var(--accent);
  color: var(--primary);
  cursor: pointer;
}
.status { min-height: 1.3rem; font-size: 0.9rem; font-weight: 500; margin-top: 0.45rem; }
.status.ok { color: var(--ok); }
.status.err { color: var(--bad); }

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.card {
  background: #fff;
  border: 1px solid rgba(13,27,62,0.1);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: var(--card-shadow);
}

#mobile-menu { display: none; }
#mobile-menu.open { display: flex; }

@media (min-width: 760px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 1.2rem; }
  .result-grid { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.shared-slot {
  margin-top: 1rem;
}

.shared-personalization {
  margin-bottom: 1rem;
  background: rgba(201, 168, 76, 0.12);
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 0.8rem;
  padding: 0.85rem 1rem;
  color: var(--primary);
}

.benchmark-note {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  color: rgba(13, 27, 62, 0.75);
}

.contextual-cta-card,
.scenario-card,
.social-proof-card,
.chatbot-card {
  margin-top: 1rem;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid rgba(13, 27, 62, 0.08);
  box-shadow: var(--card-shadow);
  padding: 1rem;
}

[data-component="contextual-cta"] {
  margin-top: 0.9rem;
}

.contextual-cta-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  background: rgba(13, 27, 62, 0.04);
  border: 1px solid rgba(13, 27, 62, 0.12);
  border-left: 4px solid rgba(201, 168, 76, 0.9);
  border-radius: 0.8rem;
  padding: 0.7rem 0.85rem;
}

.contextual-cta-inline p {
  margin: 0;
  color: rgba(13, 27, 62, 0.78);
  font-size: 0.92rem;
}

.contextual-cta-inline .btn-primary {
  padding: 0.62rem 0.9rem;
  font-size: 0.88rem;
  box-shadow: none;
}

[data-component="social-proof"],
.social-proof-card {
  display: none !important;
}

.social-proof-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1200;
  max-width: min(92vw, 290px);
  background: rgba(13, 27, 62, 0.96);
  color: #fff;
  border: 1px solid rgba(201, 168, 76, 0.42);
  border-radius: 0.8rem;
  box-shadow: 0 18px 36px rgba(13, 27, 62, 0.28);
  padding: 0.72rem 0.86rem;
  font-size: 0.86rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

.social-proof-toast strong {
  color: #C9A84C;
}

.social-proof-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.scenario-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.8rem;
  font-size: 0.92rem;
}

.scenario-table th,
.scenario-table td {
  border: 1px solid rgba(13, 27, 62, 0.12);
  padding: 0.55rem;
  text-align: left;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.faq-list details {
  border: 1px solid rgba(13, 27, 62, 0.12);
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.8rem 0.9rem;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--primary);
}

.faq-list details p {
  margin-top: 0.55rem;
  margin-bottom: 0;
}

.component-form {
  display: grid;
  gap: 0.9rem;
}

.component-form .btn-primary {
  width: fit-content;
  margin-top: 0.45rem;
}

.contact-form-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfaf7 100%);
  border: 1px solid rgba(13, 27, 62, 0.11);
}

.contact-form-card h2 {
  margin-bottom: 0.45rem;
}

.contact-form-card > p {
  margin-bottom: 1rem;
}

.component-form .field {
  display: grid;
  gap: 0.35rem;
}

.component-form .field label {
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(13, 27, 62, 0.72);
}

.component-form .form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.contact-form-card input[type="text"],
.contact-form-card input[type="tel"],
.contact-form-card input[type="email"],
.contact-form-card textarea {
  border: 1px solid rgba(13, 27, 62, 0.16);
  background: #fff;
  border-radius: 0.72rem;
  padding: 0.78rem 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* UX: textarea sa nesmie rozťahovať do strán */
.contact-form-card textarea {
  resize: vertical;
  max-width: 100%;
}

.contact-form-card input:focus,
.contact-form-card textarea:focus {
  outline: none;
  border-color: rgba(201, 168, 76, 0.9);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.18);
}

.contact-form-card .btn-primary {
  padding: 0.86rem 1.2rem;
  box-shadow: 0 8px 20px rgba(201, 168, 76, 0.28);
}

.pdf-export-wrap {
  margin-top: 1.25rem;
}

.calc-card > [data-component],
.calc-card > [data-action="pdf-export"],
.calc-card > .btn-primary {
  margin-top: 1.15rem;
}

.calc-card > [data-action="pdf-export"],
.calc-card > .btn-primary {
  display: inline-flex;
  align-items: center;
}

.calc-card > [data-component="social-proof"] {
  margin-top: 1.35rem;
}

.lead-magnet .grid {
  gap: 0.75rem;
  align-items: end;
}

.lead-magnet .cta-btn,
.lead-magnet .btn-primary {
  white-space: nowrap;
}

.lead-magnet .status,
.component-form .status {
  margin-top: 0.55rem;
}

/* UX: prázdny status nenechá zbytočné miesto pod CTA */
.component-form .status:empty {
  display: none;
}

@media (min-width: 760px) {
  .lead-magnet .component-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    column-gap: 0.8rem;
  }
  .lead-magnet .component-form .status {
    grid-column: 1 / -1;
  }

  .component-form .form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* DESIGN D1: zlaté ohranicenie vysledkovych kariet */
.result-card,
.calc-result-box,
[class*="result-card"] {
  border: 1.5px solid #C9A84C;
  border-radius: 10px;
  background: #FDFAF3;
  box-shadow: 0 2px 8px rgba(201, 168, 76, 0.12);
  transition: box-shadow 0.2s ease;
}
.result-card:hover {
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.22);
}
.result-card .result-label,
.calc-result-box .result-label {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.result-card .result-value,
.calc-result-box .result-value {
  font-size: 28px;
  font-weight: 700;
  color: #0D1B3E;
}
/* DESIGN D2: progress bar pri vypocte */
.calc-progress {
  height: 3px;
  background: #e8dfc8;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 16px;
}
.calc-progress-bar {
  height: 100%;
  background: #C9A84C;
  width: 0%;
  transition: width 0.4s ease;
}
/* DESIGN D3: sticky CTA lista pre mobile */
.sticky-cta {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #0D1B3E;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 999;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
}
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta-text { color: #fff; font-size: 14px; font-weight: 500; }
.sticky-cta-btn {
  background: #C9A84C;
  color: #0D1B3E;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
@media (min-width: 769px) { .sticky-cta { display: none; } }

/* ===== LEAD MAGNET — vylepšený dizajn ===== */

.lead-magnet {
  margin-top: 1.5rem;
  border: 1.5px solid rgba(201, 168, 76, 0.6);
  background: linear-gradient(135deg, #fffdf6 0%, #fdf8ec 100%);
  border-radius: 1rem;
  padding: 1.5rem;
}

.lm-header {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.lm-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.lm-title {
  margin: 0 0 0.2rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0D1B3E;
  line-height: 1.3;
}

.lm-sub {
  margin: 0;
  font-size: 0.88rem;
  color: #666;
  line-height: 1.4;
}

.lm-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.lm-benefits li {
  font-size: 0.9rem;
  color: #1A7A4A;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.lm-form {
  display: grid;
  gap: 0.6rem;
}

.lm-form input[type="email"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(13, 27, 62, 0.2);
  border-radius: 0.6rem;
  font-size: 1rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.lm-form input[type="email"]:focus {
  outline: none;
  border-color: #C9A84C;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

.lm-form .btn-primary {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  background: #C9A84C;
  color: #0D1B3E;
  border: none;
  border-radius: 0.65rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.lm-form .btn-primary:hover {
  background: #b8923d;
}

.lm-form .btn-primary:active {
  transform: scale(0.98);
}

.lm-trust {
  margin: 0.7rem 0 0;
  font-size: 0.78rem;
  color: #999;
  text-align: center;
}

/* Desktop: email + tlačidlo vedľa seba (rovnaká výška, zarovnanie na osi) */
@media (min-width: 600px) {
  .lm-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.65rem;
  }
  .lm-form input[type="email"],
  .lm-form .btn-primary {
    min-height: 2.875rem;
  }
  .lm-form .btn-primary {
    width: auto;
    white-space: nowrap;
  }
  .lm-form .status,
  .lm-trust {
    grid-column: 1 / -1;
  }
}

/* ===== EXIT INTENT OVERLAY ===== */
.ei-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 27, 62, 0.82);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.ei-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}
.ei-box {
  background: #ffffff;
  border-radius: 14px;
  padding: 32px 28px 28px;
  max-width: 440px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  animation: ei-slide-up 0.3s ease forwards;
}
@keyframes ei-slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.ei-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #6B7A8D;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.ei-close:hover { background: #F0EBE0; }
.ei-icon {
  font-size: 36px;
  margin-bottom: 12px;
}
.ei-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: #0D1B3E;
  margin-bottom: 8px;
  line-height: 1.25;
}
.ei-sub {
  font-size: 14px;
  color: #6B7A8D;
  line-height: 1.55;
  margin-bottom: 20px;
}
.ei-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ei-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #D8D0C4;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: #1E2A3A;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.ei-input:focus {
  outline: none;
  border-color: #C9A84C;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}
.ei-btn {
  width: 100%;
  padding: 12px;
  background: #C9A84C;
  color: #0D1B3E;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.ei-btn:hover  { background: #b8923d; }
.ei-btn:active { transform: scale(0.98); }
.ei-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.ei-status {
  font-size: 12.5px;
  text-align: center;
  min-height: 18px;
  color: #1A6B45;
}
.ei-status.err { color: #991B1B; }
.ei-trust {
  font-size: 11px;
  color: #9CA3AF;
  text-align: center;
  margin-top: 10px;
}
.ei-skip {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: 12px;
  color: #9CA3AF;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ei-skip:hover { color: #6B7A8D; }

/* Úspech stav */
.ei-success {
  text-align: center;
  padding: 8px 0;
}
.ei-success-icon { font-size: 44px; margin-bottom: 12px; }
.ei-success-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: #0D1B3E;
  margin-bottom: 8px;
}
.ei-success-text { font-size: 13.5px; color: #6B7A8D; line-height: 1.5; }

@media (max-width: 480px) {
  .ei-box { padding: 24px 20px 20px; }
  .ei-title { font-size: 19px; }
}
