/* ==========================================================================
   NovaCadence - Instytut Badań nad Ergonomią i Kinetyką Ruchu
   Polymorphic Stylesheet (Profile 2: H-P, Prefix: nc-*)
   ========================================================================== */

:root {
  --nc-bg: #fafafa;
  --nc-surface: #ffffff;
  --nc-surface-subtle: #f4f4f5;
  --nc-text-main: #18181b;
  --nc-text-secondary: #52525b;
  --nc-text-muted: #71717a;
  --nc-border: #e4e4e7;
  --nc-border-strong: #d4d4d8;
  
  --nc-amber-main: #f97316;
  --nc-amber-hover: #ea580c;
  --nc-amber-light: #fff7ed;
  --nc-amber-border: #ffedd5;
  --nc-amber-dark: #9a3412;

  --nc-dark-main: #18181b;
  --nc-dark-surface: #27272a;
  --nc-dark-border: #3f3f46;

  --nc-font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --nc-font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --nc-radius-sm: 6px;
  --nc-radius-md: 12px;
  --nc-radius-lg: 16px;
  --nc-radius-xl: 24px;
  --nc-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --nc-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --nc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--nc-font-body);
  background-color: var(--nc-bg);
  color: var(--nc-text-main);
  line-height: 1.65;
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typografia */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--nc-font-heading);
  color: var(--nc-text-main);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; margin-bottom: 1.25rem; }
h2 { font-size: 1.85rem; margin-top: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.35rem; margin-top: 1.5rem; margin-bottom: 0.75rem; }
p { margin-bottom: 1.2rem; color: var(--nc-text-secondary); }
p:last-child { margin-bottom: 0; }
a { color: var(--nc-text-main); text-decoration: none; transition: color 0.2s ease, opacity 0.2s ease; }
a:hover { color: var(--nc-amber-hover); }

/* Layout Kontener */
.nc-container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.nc-container-narrow {
  max-width: 860px;
}

/* Header & Nawigacja */
.nc-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--nc-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.25s ease;
}

.nc-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.nc-brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.nc-brand-symbol {
  width: 44px;
  height: 44px;
  background: var(--nc-dark-main);
  color: var(--nc-amber-main);
  border: 1px solid var(--nc-dark-border);
  border-radius: var(--nc-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--nc-font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: var(--nc-shadow-sm);
  transition: transform 0.2s ease;
}

.nc-brand-logo:hover .nc-brand-symbol {
  transform: scale(1.04);
}

.nc-brand-title {
  font-family: var(--nc-font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--nc-text-main);
  letter-spacing: -0.03em;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nc-brand-title span {
  font-size: 0.72rem;
  font-family: var(--nc-font-body);
  color: var(--nc-text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}

.nc-nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nc-nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--nc-text-secondary);
  padding: 0.5rem 0.25rem;
  position: relative;
}

.nc-nav-link:hover,
.nc-nav-link.active {
  color: var(--nc-amber-main);
}

.nc-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--nc-amber-main);
  border-radius: 2px;
}

.nc-header-action {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Przyciski */
.nc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--nc-font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--nc-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
  line-height: 1;
}

.nc-btn-primary {
  background: var(--nc-amber-main);
  color: #ffffff;
}

.nc-btn-primary:hover {
  background: var(--nc-amber-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

.nc-btn-outline {
  background: transparent;
  color: var(--nc-text-main);
  border-color: var(--nc-border-strong);
}

.nc-btn-outline:hover {
  background: var(--nc-surface);
  border-color: var(--nc-amber-main);
  color: var(--nc-amber-main);
}

.nc-btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  min-height: 38px;
}

/* Przycisk Menu Mobilnego */
.nc-mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--nc-border);
  padding: 0.5rem;
  border-radius: var(--nc-radius-sm);
  cursor: pointer;
  color: var(--nc-text-main);
}

.nc-mobile-menu {
  display: none;
  background: var(--nc-surface);
  border-bottom: 1px solid var(--nc-border);
  padding: 1.25rem 1.5rem;
}

.nc-mobile-menu.nc-open {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Badges & Etykiety */
.nc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  background: var(--nc-amber-light);
  color: var(--nc-amber-dark);
  border: 1px solid var(--nc-amber-border);
}

.nc-badge-neutral {
  background: var(--nc-surface-subtle);
  color: var(--nc-text-secondary);
  border-color: var(--nc-border);
}

/* Sekcje */
.nc-section {
  padding: 4.5rem 0;
}

.nc-section-hero {
  padding-top: 3.5rem;
  padding-bottom: 4rem;
  background: radial-gradient(circle at 50% 20%, rgba(249, 115, 22, 0.04) 0%, rgba(250, 250, 250, 0) 70%);
}

.nc-hero-centered {
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}

.nc-hero-title {
  font-size: 3rem;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  line-height: 1.15;
}

.nc-hero-subtitle {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--nc-text-secondary);
  margin-bottom: 2.25rem;
}

.nc-hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Siatki i Karty */
.nc-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.nc-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.nc-card {
  background: var(--nc-surface);
  border: 1px solid var(--nc-border);
  border-radius: var(--nc-radius-lg);
  padding: 2rem;
  box-shadow: var(--nc-shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.nc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--nc-shadow-md);
  border-color: var(--nc-border-strong);
}

.nc-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--nc-radius-md);
  background: var(--nc-amber-light);
  color: var(--nc-amber-main);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

/* Moduł Interaktywny: Quiz & Audyt */
.nc-quiz-card {
  background: var(--nc-surface);
  border: 1px solid var(--nc-border);
  border-radius: var(--nc-radius-xl);
  padding: 2.75rem;
  box-shadow: var(--nc-shadow-lg);
  max-width: 820px;
  margin: 0 auto;
}

.nc-quiz-step {
  display: none;
}

.nc-quiz-step.active {
  display: block;
  animation: ncFadeIn 0.3s ease;
}

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

.nc-quiz-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--nc-surface);
  border: 1px solid var(--nc-border);
  border-radius: var(--nc-radius-md);
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nc-quiz-option:hover {
  border-color: var(--nc-amber-main);
  background: var(--nc-amber-light);
}

.nc-quiz-option.selected {
  border-color: var(--nc-amber-main);
  background: #fff7ed;
  box-shadow: 0 0 0 1px var(--nc-amber-main);
}

.nc-radio-disc {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--nc-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nc-quiz-option.selected .nc-radio-disc {
  border-color: var(--nc-amber-main);
}

.nc-quiz-option.selected .nc-radio-disc::after {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--nc-amber-main);
  border-radius: 50%;
}

.nc-quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--nc-border);
}

.nc-progress-track {
  width: 100%;
  height: 8px;
  background: var(--nc-surface-subtle);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.75rem;
}

.nc-progress-bar {
  height: 100%;
  background: var(--nc-amber-main);
  transition: width 0.3s ease;
}

/* Tabele Biomechaniczne */
.nc-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--nc-border);
  border-radius: var(--nc-radius-lg);
  box-shadow: var(--nc-shadow-sm);
  background: var(--nc-surface);
  margin: 2rem 0;
}

.nc-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.nc-table th {
  background: var(--nc-dark-main);
  color: #ffffff;
  font-family: var(--nc-font-heading);
  padding: 1.1rem 1.25rem;
  font-weight: 600;
  border-bottom: 2px solid var(--nc-amber-main);
}

.nc-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--nc-border);
  color: var(--nc-text-secondary);
}

.nc-table tr:last-child td {
  border-bottom: none;
}

.nc-table tr:hover td {
  background: var(--nc-surface-subtle);
}

/* Callout / Cytaty */
.nc-callout {
  background: var(--nc-surface);
  border-left: 4px solid var(--nc-amber-main);
  padding: 1.75rem 2rem;
  border-radius: 0 var(--nc-radius-md) var(--nc-radius-md) 0;
  margin: 2.25rem 0;
  box-shadow: var(--nc-shadow-sm);
}

.nc-callout-quote {
  font-family: var(--nc-font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--nc-text-main);
  line-height: 1.55;
  margin-bottom: 0.5rem;
}

.nc-callout-author {
  font-size: 0.88rem;
  color: var(--nc-text-muted);
}

/* Formularze */
.nc-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nc-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nc-form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--nc-text-main);
}

.nc-form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--nc-border);
  border-radius: var(--nc-radius-md);
  font-family: var(--nc-font-body);
  font-size: 0.95rem;
  background: #ffffff;
  color: var(--nc-text-main);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nc-form-control:focus {
  outline: none;
  border-color: var(--nc-amber-main);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

textarea.nc-form-control {
  min-height: 130px;
  resize: vertical;
}

/* Obrazy responsywne */
.nc-img-responsive {
  width: 100%;
  height: auto;
  border-radius: var(--nc-radius-lg);
  object-fit: cover;
  border: 1px solid var(--nc-border);
  box-shadow: var(--nc-shadow-md);
}

/* Footer */
.nc-footer {
  background: var(--nc-dark-main);
  color: #a1a1aa;
  padding-top: 4.5rem;
  padding-bottom: 2rem;
  margin-top: auto;
  border-top: 4px solid var(--nc-amber-main);
}

.nc-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.nc-footer-title {
  font-size: 1.05rem;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.nc-footer-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #a1a1aa;
}

.nc-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.nc-footer-link {
  color: #d4d4d8;
  font-size: 0.9rem;
}

.nc-footer-link:hover {
  color: var(--nc-amber-main);
}

.nc-footer-meta-box {
  background: var(--nc-dark-surface);
  border: 1px solid var(--nc-dark-border);
  border-radius: var(--nc-radius-md);
  padding: 1.25rem;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  line-height: 1.6;
}

.nc-footer-disclaimer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--nc-dark-surface);
  border-bottom: 1px solid var(--nc-dark-surface);
  font-size: 0.82rem;
  line-height: 1.6;
  color: #71717a;
  margin-bottom: 1.5rem;
}

.nc-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #71717a;
}

/* Cookie Banner */
.nc-cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  max-width: 460px;
  background: var(--nc-dark-main);
  border: 1px solid var(--nc-dark-border);
  border-radius: var(--nc-radius-lg);
  padding: 1.75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  display: none;
  color: #ffffff;
}

.nc-cookie-title {
  font-size: 1.1rem;
  font-family: var(--nc-font-heading);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.nc-cookie-text {
  font-size: 0.85rem;
  color: #d4d4d8;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.nc-cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* RWD */
@media (max-width: 1024px) {
  .nc-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .nc-footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  h1 { font-size: 2.15rem; }
  .nc-hero-title { font-size: 2.25rem; }
  .nc-nav-desktop, .nc-header-action .nc-btn { display: none; }
  .nc-mobile-toggle { display: block; }
  .nc-grid-3, .nc-grid-2 { grid-template-columns: 1fr; }
  .nc-footer-grid { grid-template-columns: 1fr; }
  .nc-footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .nc-cookie-banner { left: 1rem; right: 1rem; bottom: 1rem; max-width: none; }
  .nc-quiz-card { padding: 1.75rem; }
}
