/* style.css - Spójny, przejrzysty design system */
:root {
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-light: #ecfdf5;
  --primary-gradient: linear-gradient(135deg, #10b981 0%, #0d9488 100%);
  --accent: #0284c7;
  --accent-light: #f0f9ff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-alt: #f1f5f9;
  --border: #e2e8f0;
  --border-focus: #10b981;
  --error: #ef4444;
  --error-bg: #fef2f2;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Układ kontenera */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.95);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-main);
}

.logo-icon {
  width: 32px;
  height: 32px;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 6px;
}

.logo-text {
  letter-spacing: -0.02em;
}

.badge-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-dark);
  background-color: var(--primary-light);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

/* Główny obszar */
.main-content {
  flex: 1;
  padding: 2.5rem 0 3.5rem;
  display: flex;
  align-items: center;
}

/* Karty i sekcje */
.card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 2rem 1.75rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

@media (min-width: 640px) {
  .card {
    padding: 2.75rem 2.5rem;
  }
}

/* Typografia */
h1, h2, h3 {
  color: var(--text-main);
  line-height: 1.25;
  letter-spacing: -0.025em;
  font-weight: 700;
}

h1 {
  font-size: 1.75rem;
  margin-bottom: 0.85rem;
}

@media (min-width: 640px) {
  h1 {
    font-size: 2.15rem;
  }
}

h2 {
  font-size: 1.45rem;
  margin-bottom: 0.75rem;
}

p {
  color: var(--text-muted);
  font-size: 1rem;
}

.lead-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  line-height: 1.55;
}

/* Przyciski */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: var(--transition);
  font-family: inherit;
  width: 100%;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.38);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
  width: auto;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
}

.btn-secondary:hover {
  background-color: #e2e8f0;
  color: var(--text-main);
}

/* Informacyjne sekcje na startowym ekranie */
.info-box-group {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  padding-top: 1.75rem;
}

.info-box {
  background-color: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.info-box:last-child {
  margin-bottom: 0;
}

.info-box h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-box p {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Pasek postępu kwiuzu */
.progress-container {
  margin-bottom: 1.5rem;
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background-color: var(--bg-alt);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  transition: width 0.35s ease;
}

/* Krok pytania */
.question-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.question-header {
  margin-bottom: 1.75rem;
  text-align: center;
}

.question-icon-wrapper {
  width: 58px;
  height: 58px;
  background-color: var(--primary-light);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.question-title {
  font-size: 1.35rem;
  color: var(--text-main);
}

/* Karty odpowiedzi */
.answers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.answer-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background-color: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  user-select: none;
  outline: none;
  font-family: inherit;
  width: 100%;
}

.answer-card:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.answer-card:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.answer-card.selected {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.answer-card-indicator {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.answer-card:hover .answer-card-indicator,
.answer-card.selected .answer-card-indicator {
  border-color: var(--primary);
  background-color: var(--primary);
}

.answer-card-indicator::after {
  content: '';
  width: 8px;
  height: 8px;
  background-color: #ffffff;
  border-radius: 50%;
  opacity: 0;
  transition: var(--transition);
}

.answer-card:hover .answer-card-indicator::after,
.answer-card.selected .answer-card-indicator::after {
  opacity: 1;
}

.answer-card-text {
  font-size: 1.025rem;
  font-weight: 500;
  color: var(--text-main);
  flex: 1;
}

/* Ekran ładowania / analizy */
.analyzing-box {
  text-align: center;
  padding: 3rem 1rem;
}

.spinner {
  width: 54px;
  height: 54px;
  border: 4px solid var(--bg-alt);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.analyzing-title {
  font-size: 1.45rem;
  margin-bottom: 0.5rem;
}

.analyzing-subtitle {
  color: var(--text-muted);
  font-size: 0.975rem;
}

/* Ekran wyników */
.result-header {
  text-align: center;
  margin-bottom: 2rem;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background-color: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.825rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.tips-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.tip-card {
  display: flex;
  gap: 1rem;
  background-color: var(--bg-alt);
  padding: 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  align-items: flex-start;
}

.tip-icon {
  width: 36px;
  height: 36px;
  background-color: #ffffff;
  color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.tip-content h4 {
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.tip-content p {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Sekcja formularza kontaktowego */
.lead-form-box {
  background-color: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
}

.form-title {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
  text-align: center;
}

.form-subtitle {
  font-size: 0.925rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  text-align: center;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-main);
  background-color: #ffffff;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.form-input.is-invalid {
  border-color: var(--error);
  background-color: var(--error-bg);
}

.field-error {
  color: var(--error);
  font-size: 0.825rem;
  margin-top: 0.35rem;
  display: none;
  font-weight: 500;
}

.field-error.show {
  display: block;
}

/* Checkbox regulaminowy / RODO */
.checkbox-group {
  margin-bottom: 1.5rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.checkbox-input {
  margin-top: 0.2rem;
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-label a {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.checkbox-label a:hover {
  color: var(--primary);
}

/* Informacja prawna / Disclaimer */
.disclaimer-text {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 1.25rem;
}

/* Stopka */
.site-footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: auto;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
  list-style: none;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.footer-disclaimer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.footer-copy {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Animacje i przejścia kroków */
.fade-in {
  animation: fadeIn 0.35s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hidden {
  display: none !important;
}

/* Karty podstron prawnych / tekstowych */
.static-page-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 2rem 1.5rem;
}

@media (min-width: 640px) {
  .static-page-card {
    padding: 3rem;
  }
}

.static-page-card h1 {
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.static-page-card h2 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.static-page-card p {
  margin-bottom: 1rem;
}

.static-page-card ul {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  color: var(--text-muted);
}

.static-page-card li {
  margin-bottom: 0.4rem;
}

.back-link-wrapper {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
