:root {
  --primary: #1a365d;
  --primary-light: #2b6cb0;
  --primary-dark: #0f233d;
  --secondary: #2b8a3e;
  --secondary-light: #40c057;
  --accent: #d97706;
  --accent-light: #fef3c7;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-focus: #3b82f6;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 16px -2px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 15px 30px -5px rgba(0, 0, 0, 0.1);
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Header & Banner */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--primary);
}

.brand-icon {
  font-size: 2.25rem;
  color: var(--primary);
}

.brand-text {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
}

.brand-text span {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.prototype-tag {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #1a365d 0%, #0f233d 100%);
  color: white;
  padding: 5rem 1.5rem 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  max-width: 850px;
  margin: 0 auto 1.25rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  max-width: 680px;
  margin: 0 auto 2.5rem;
  color: #cbd5e1;
  line-height: 1.7;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: #d97706;
  color: white;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}

.btn-primary:hover {
  background: #b45309;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* Containers */
.container {
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4.5rem 0;
}

.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 3.5rem;
}

.section-badge {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary-light);
  display: inline-block;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Piliers Grid */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.75rem;
}

.pillar-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 2.25rem 1.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.pillar-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.pillar-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 1.25rem;
}

.pillar-blue .pillar-icon { background: #eff6ff; color: #1e40af; }
.pillar-green .pillar-icon { background: #f0fdf4; color: #166534; }
.pillar-amber .pillar-icon { background: #fefce8; color: #854d0e; }
.pillar-purple .pillar-icon { background: #faf5ff; color: #6b21a8; }

.pillar-card h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
}

.pillar-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.pillar-features {
  list-style: none;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  font-size: 0.85rem;
  color: var(--text);
}

.pillar-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.pillar-features i {
  color: var(--secondary);
}

/* Roadmap */
.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  position: relative;
}

.timeline-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.25rem;
  position: relative;
}

.timeline-step.active {
  border: 2px solid var(--primary);
  background: #f8fafc;
}

.timeline-step.active::before {
  content: 'EN COURS';
  position: absolute;
  top: -12px;
  right: 15px;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.step-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 0.4rem;
}

.timeline-step h4 {
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.timeline-step p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Questionnaire Box */
.form-wrapper {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 3rem 2.5rem;
  max-width: 850px;
  margin: 0 auto;
}

.progress-header {
  margin-bottom: 2.25rem;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.6rem;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  width: 25%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  transition: width 0.35s ease-in-out;
}

/* Steps */
.form-step {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.form-step.active {
  display: block;
}

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

.step-title {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  color: var(--primary-dark);
  margin-bottom: 0.3rem;
}

.step-subtitle {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-size: 0.98rem;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.5rem;
}

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

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--text);
  background: white;
  transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Selection Cards (Radio) */
.type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.type-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.type-card:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.type-card.selected {
  border-color: var(--primary);
  background: #eff6ff;
  box-shadow: 0 0 0 1px var(--primary);
}

.type-card i {
  font-size: 2.5rem;
  color: var(--primary);
}

.type-card strong {
  font-size: 1.05rem;
  color: var(--primary-dark);
}

.type-card span {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Checkbox Grid */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.checkbox-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--text);
  transition: all 0.2s;
}

.checkbox-pill:hover {
  background: #e2e8f0;
}

.checkbox-pill input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Priorities Matrix */
.priority-matrix {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.priority-row {
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.priority-title strong {
  display: block;
  font-size: 0.98rem;
  color: var(--primary-dark);
  margin-bottom: 0.15rem;
}

.priority-title span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.priority-options {
  display: flex;
  gap: 0.5rem;
}

.priority-chip {
  font-size: 0.82rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted);
}

.priority-chip.selected {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  font-weight: 600;
}

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

/* Confirmation Box */
.success-card {
  text-align: center;
  padding: 3rem 1rem;
}

.success-icon {
  font-size: 4rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

/* Local Data Inspector Drawer (Testing Helper) */
.data-inspector {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 3rem;
  font-size: 0.88rem;
}

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

.data-inspector-body {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #334155;
  display: none;
}

.data-inspector-body.open {
  display: block;
}

pre.code-view {
  background: #020617;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  color: #38bdf8;
  max-height: 250px;
}

/* FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.faq-item {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.faq-item h4 {
  font-size: 1.05rem;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.faq-item p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .type-selector, .faq-grid {
    grid-template-columns: 1fr;
  }
  .form-wrapper {
    padding: 2rem 1.25rem;
  }
  .priority-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
