/* Skeleton loading para formulario Tally */
.skeleton-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 2rem 1.5rem;
  background: #f6f6f6;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  min-width: 280px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
.skeleton-header {
  width: 70%;
  height: 24px;
  background: linear-gradient(90deg,#ececec 25%,#e0e0e0 50%,#ececec 75%);
  border-radius: 6px;
  animation: skeleton 1.2s infinite linear;
}
.skeleton-line {
  width: 90%;
  height: 16px;
  background: linear-gradient(90deg,#ececec 25%,#e0e0e0 50%,#ececec 75%);
  border-radius: 6px;
  animation: skeleton 1.2s infinite linear;
}
.skeleton-line.short {
  width: 60%;
}
.skeleton-btn {
  width: 50%;
  height: 38px;
  background: linear-gradient(90deg,#ececec 25%,#e0e0e0 50%,#ececec 75%);
  border-radius: 20px;
  animation: skeleton 1.2s infinite linear;
  margin-top: 0.5rem;
}
@keyframes skeleton {
  0% {background-position: -200px 0;}
  100% {background-position: 200px 0;}
}
/* Botón CTA para newsletter */
.cta-btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 6px;
  background: linear-gradient(135deg, #ff6200 0%, #ff4500 50%, #ff0000 100%);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: filter 0.2s;
}
.cta-btn:hover, .cta-btn:focus {
  filter: brightness(1.1);
  text-decoration: underline;
}
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'VictoryMarr', Arial, sans-serif;
  background: #fafafa;
  color: #333;
  line-height: 1.8;
  font-size: clamp(17px, 2.5vw, 19px);
  scroll-behavior: smooth;

}

a { 
  color: inherit; 
  text-decoration: none; 
}

/* Contenedor principal - tarjeta blanca solo en escritorio */
#page-wrapper {
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  margin: 2rem auto;
  width: 33%;
  max-width: 1200px;
  border-radius: 8px;
  overflow: hidden;
}

/* Layout principal */
header, main, footer {
  padding: 3rem 2rem;
}

/* ALINEACIÓN UNIVERSAL - Todos los textos con el mismo ancho y centrado */
section {
  margin: 5rem 0;
  padding: 0;
}

section:first-of-type {
  margin-top: 3rem;
  margin-bottom: 4rem;
}

section > * {
  max-width: 68ch;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

header {
  text-align: center;
  padding-top: 3rem;
  padding-bottom: 4rem;
  background: #fff;
  color: #000;
  font-weight: 900;
  letter-spacing: -1px;
}

/* Tipografías */
h1 {
  font-size: clamp(42px, 8vw, 60px);
  font-weight: 900;
  line-height: 1.1;
  color: #000;
  letter-spacing: -1px;
  max-width: 700px;
  margin: 2rem auto 0;
}

h1 span { 
  color: #ff7a00; 
}

h1 .accent {
  font-weight: 900;
}

h2 {
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 800;
  line-height: 1.2;
  margin: 3rem 0 2rem 0;
  letter-spacing: -0.5px;
  position: relative;
  padding-bottom: 0.75rem;
  text-indent: 0;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, #ff6200 0%, #ff4500 50%, #ff0000 100%);
  border-radius: 2px;
}

h3 {
  font-size: clamp(20px, 4vw, 24px);
  font-weight: 700;
  line-height: 1.3;
  margin: 2rem 0 1rem 0;
}

p { 
  margin: 0.8rem 0;
  font-size: clamp(17px, 2.5vw, 19px);
  line-height: 1.8;
  color: #444;
}

br {
  display: block;
  content: "";
  margin-top: 0.3em;
}

ul { 
  margin-left: 1.5rem; 
  margin-bottom: 1.5rem; 
}

li { 
  margin-bottom: 0.6rem; 
  font-size: clamp(17px, 2.5vw, 19px);
  color: #333; 
}

strong { 
  color: #000; 
  font-weight: 700; 
}

em { 
  font-style: italic; 
}

.accent { 
  background: linear-gradient(135deg, #ff6200 0%, #ff4500 50%, #ff0000 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #ff7a00;
  font-weight: 700;
}

/* Lista ordenada semántica para los pasos */
.steps {
  list-style: none;
  padding: 0;
  counter-reset: step-counter;
}

.steps > li {
  counter-increment: step-counter;
  margin: 3rem 0;
  padding: 2rem;
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  position: relative;
  scroll-margin-top: 2rem;
}

.steps > li:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.steps > li::before {
  content: counter(step-counter);
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ff6200 0%, #ff4500 50%, #ff0000 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
}

.steps > li:focus-within {
  outline: 2px solid #ff7a00;
  outline-offset: 2px;
}

.sub h3 {
  margin-top: 1rem;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.3;
  color: #000 !important;
  margin-bottom: 2rem;
  letter-spacing: -0.3px;
  background: #f8f9fa;
  padding: 0.8rem 1.2rem;
  border-radius: 6px;
  border-left: 3px solid #ff7a00;
}

/* Formularios */
.tally-container { 
  margin: 4rem auto; 
  border: 2px solid #e9ecef; 
  border-radius: 12px; 
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  max-width: 68ch;
}

.tally-container * {
  max-width: 100%;
}

/* Loading spinner */
.loading-spinner {
  text-align: center;
  padding: 2rem;
  color: #666;
}

.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #ff7a00;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Accesibilidad */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

h2:focus,
h3:focus {
  outline: 2px solid #ff7a00;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Footer */
footer {
  font-size: 0.85rem;
  color: #666;
  text-align: center;
  padding: 3rem 0;
  background: #fff;
}

footer a {
  color: #666;
  text-decoration: underline;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #000;
}

/* Media Queries */

/* Tablet - Vista intermedia */
@media (min-width: 769px) and (max-width: 1024px) {
  #page-wrapper {
    width: 85%;
    margin: 1rem auto;
  }
  
  header, main, footer {
    padding: 2rem 1.5rem;
  }
}

/* Móvil */
@media (max-width: 768px) {
  body {
    background: #fff;
  }
  
  #page-wrapper {
    width: 100%;
    margin: 0;
    box-shadow: none;
  }
  
  header, main, footer {
    padding: 1.5rem 1rem;
  }
  
  h1 {
    max-width: 400px;
    font-weight: 900 !important;
  }
  
  h2 {
    font-weight: 900 !important;
  }
  
  h3 {
    font-weight: 800 !important;
  }
  
  .controls {
    flex-direction: column;
  }
  
  input[type="email"],
  button {
    width: 100%;
  }
  
  .steps > li::before {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
  
  p, li {
    max-width: none;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 42px;
    font-weight: 900 !important;
    line-height: 1.1;
    max-width: 300px;
  }
}

/* Escritorio - Aumentar font-size general */
@media (min-width: 769px) {
  body {
    font-size: 20px;
  }
  
  p {
    font-size: 22px;
  }
  
  li {
    font-size: 22px;
  }
}