:root {
  --primary: #1a3d3c;
  --primary-light: #2a5c5b;
  --primary-dark: #0f2a29;
  --accent: #f18a21;
  --accent-hover: #ff9d3d;
  --text: #ffffff;
  --text-muted: #a0aec0;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.1);
  --font-main: 'Outfit', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-main);
  background-color: var(--primary-dark);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
}

#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #1a3d3c 0%, #0f2a29 100%);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(36, 109, 107, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(241, 138, 33, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

header {
  position: fixed;
  top: 1.5rem;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 100;
  pointer-events: none;
}

.logo-container {
  display: inline-flex;
  align-items: center;
  gap: 2.5rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 1rem 3rem;
  border-radius: 60px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  pointer-events: all;
  max-width: 90vw; /* Prevent overflow on mobile */
  box-sizing: border-box;
}

.logo-item {
  display: flex;
  align-items: center;
}

.logo-img-cfi {
  height: 60px;
  width: auto;
  filter: brightness(0) invert(1);
}

.logo-img-conocimiento {
  height: 55px;
  width: auto;
}

.logo-separator {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
}

main {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 160px 1.5rem 100px; /* Increased top padding for better breathing room */
}

.form-container {
  width: 100%;
  max-width: 800px;
  display: grid;
  grid-template-areas: "stack";
  align-items: center;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 40px;
  padding: 4rem 3rem;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.form-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
  z-index: 5;
}

.step {
  grid-area: stack;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  width: 100%;
}

.step.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  z-index: 1;
}

.step-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 100%;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  font-weight: 700;
  max-width: 650px;
}

.step-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 700;
}

p.description {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 550px;
}

.input-wrapper {
  width: 100%;
  max-width: 500px;
  position: relative;
}

input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,0.1);
  padding: 1rem 0;
  font-size: 2rem;
  color: var(--text);
  font-family: var(--font-main);
  outline: none;
  transition: all 0.3s ease;
  text-align: center;
}

input:focus {
  border-color: var(--accent);
}

input.error {
  border-color: #ff4d4d;
}

.btn-start, .btn-next, .btn-submit {
  background: var(--accent);
  color: white;
  border: none;
  padding: 1.25rem 3.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  box-shadow: 0 10px 30px rgba(241, 138, 33, 0.3);
  position: relative;
  z-index: 50;
  opacity: 1 !important;
  visibility: visible !important;
}

.btn-back {
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 50;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 1rem;
}

.btn-back:hover {
  color: #fff;
}

.btn-back svg {
  width: 18px;
  height: 18px;
}

.btn-back:hover {
  transform: translateX(-3px);
}

.btn-back span {
  display: inline-block;
}

.btn-start:hover, .btn-next:hover, .btn-submit:hover {
  background: var(--accent-hover);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 35px rgba(241, 138, 33, 0.5);
}

.progress-container {
  position: fixed;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  z-index: 100;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.navigation-hints {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  display: flex;
  gap: 2rem;
  z-index: 100;
}

.bg-hexagons {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.hexagon {
  position: absolute;
  width: 300px;
  height: 300px;
  background: rgba(36, 109, 107, 0.04);
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  animation: float 25s infinite ease-in-out;
}

.hex-1 { top: -100px; right: -50px; --rot: 15deg; }
.hex-2 { bottom: -80px; left: -100px; --rot: -10deg; animation-delay: -5s; }
.hex-3 { top: 45%; right: 8%; width: 150px; height: 150px; background: rgba(241, 138, 33, 0.02); --rot: 30deg; animation-delay: -12s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--rot)); }
  50% { transform: translateY(-30px) rotate(calc(var(--rot) + 8deg)); }
}

@media (max-width: 768px) {
  header {
    padding: 1rem;
  }
  .logo-container {
    gap: 0.75rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }
  .logo-container::-webkit-scrollbar { display: none; }
  .logo-item svg { width: 35px; height: 35px; }
  .logo-item div { font-size: 0.55rem !important; }
  .logo-separator { height: 20px; }
  
  main {
    padding-top: 140px;
    align-items: flex-start;
  }
  .form-container {
    padding: 3rem 1.5rem;
    border-radius: 24px;
  }
  .btn-start, .btn-next, .btn-submit {
    width: 100%;
    padding: 1.1rem;
    font-size: 1rem;
    border-radius: 14px;
  }
  header {
    top: 1rem;
    padding: 0 1rem;
  }
  .logo-container {
    padding: 0.6rem 1.25rem;
    gap: 1.25rem;
    max-width: 95vw;
  }
  .logo-img-cfi {
    height: 35px;
  }
  .logo-img-conocimiento {
    height: 30px;
  }
  .logo-separator { height: 20px; margin: 0; }
  
  .btn-back {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }
  .btn-back svg {
    width: 16px;
    height: 16px;
  }
  h1 {
    font-size: 1.75rem;
  }
  input {
    font-size: 1.5rem;
  }
  .navigation-hints {
    display: none;
  }
  .progress-container {
    bottom: 2rem;
    width: 200px;
  }
}
