:root {
  --gold: #c8973a;
  --gold-light: #e8c278;
  --gold-pale: #f5edd8;
  --ink: #1a1610;
  --ink-mid: #4a3f2f;
  --ink-light: #8a7a65;
  --cream: #faf7f0;
  --cream-dark: #f0ead8;
  --white: #ffffff;
  --red-risk: #b84040;
  --amber-risk: #c07030;
  --green-risk: #3a7a50;
  --radius: 4px;
  --radius-lg: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "DM Sans", sans-serif;
  background: var(--ink);
  color: var(--cream);
  min-height: 100vh;
  display: flex !important;
  flex-direction: column !important;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 0 1rem;
  margin: 0;
}

/* Haz que el contenido principal empuje al footer hacia abajo */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Esto mantendrá tu widget centrado verticalmente si hay poco contenido */
  align-items: center;     /* Centra el widget de forma horizontal */
  width: 100%;
}

/* Subtle paper texture via repeating gradient */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 28px,
    rgba(180, 160, 120, 0.04) 28px,
    rgba(180, 160, 120, 0.04) 29px
  );
  pointer-events: none;
  z-index: 0;
}

.widget-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
}

/*.nav-logo {
  background: var(--ink);
  color: var(--cream);
  position: relative;
  left: -280px;
}

.nav-logo span{
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.nav-links a{
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  position: relative;
  top:-30px;
  left: 180px;
}*/

.nav-links a:hover{
  color:var(--gold)
}

/* Header brand strip */
.brand-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}
.brand-line {
  flex: 1;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
}
.brand-name {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
}

/* Gold corner accent */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 60px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}

.step {
  display: none;
}
.step.active {
  display: block;
}

/* Intro step */
.intro-eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 10px;
}

h1.intro-title {
  font-family: "DM Serif Display", serif;
  font-size: 28px;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 12px;
}

h1.intro-title em {
  font-style: italic;
  color: var(--gold);
}

.intro-desc {
  font-size: 14px;
  color: var(--ink-mid);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.steps-list {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.step-pill {
  flex: 1;
  background: var(--cream);
  border-radius: var(--radius);
  padding: 10px 8px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-mid);
  line-height: 1.4;
}
.step-pill strong {
  display: block;
  font-size: 18px;
  font-family: "DM Serif Display", serif;
  color: var(--gold);
  font-weight: 400;
}

label.field-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--cream);
  outline: none;
  transition: border-color 0.2s;
}
input:focus {
  border-color: var(--gold);
  background: var(--white);
}
input::placeholder {
  color: var(--ink-light);
}

.field-group {
  margin-bottom: 1rem;
}

.btn-primary {
  width: 100%;
  padding: 13px;
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.1s;
  margin-top: 0.5rem;
}
.btn-primary:hover {
  background: var(--gold);
}
.btn-primary:active {
  transform: scale(0.99);
}
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--ink-mid);
  border: 1px solid var(--cream-dark);
  padding: 11px 20px;
  border-radius: var(--radius);
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.btn-secondary:hover {
  border-color: var(--ink-light);
}

/* Quiz step */
.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.quiz-counter {
  font-size: 12px;
  color: var(--ink-light);
}
.quiz-addr {
  font-size: 11px;
  color: var(--ink-light);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-track {
  height: 2px;
  background: var(--cream-dark);
  border-radius: 1px;
  margin-bottom: 1.5rem;
}
.progress-fill {
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
  transition: width 0.4s ease;
}

.q-text {
  font-family: "DM Serif Display", serif;
  font-size: 19px;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.opt-btn {
  padding: 12px 16px;
  background: var(--cream);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  color: var(--ink-mid);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.opt-btn:hover {
  border-color: var(--gold-light);
  background: var(--gold-pale);
}
.opt-btn .opt-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.opt-btn.sel-green {
  background: #eef6f1;
  border-color: var(--green-risk);
  color: var(--green-risk);
}
.opt-btn.sel-green .opt-dot {
  background: var(--green-risk);
  border-color: var(--green-risk);
}
.opt-btn.sel-red {
  background: #f9eeee;
  border-color: var(--red-risk);
  color: var(--red-risk);
}
.opt-btn.sel-red .opt-dot {
  background: var(--red-risk);
  border-color: var(--red-risk);
}
.opt-btn.sel-amber {
  background: #f9f2e8;
  border-color: var(--amber-risk);
  color: var(--amber-risk);
}
.opt-btn.sel-amber .opt-dot {
  background: var(--amber-risk);
  border-color: var(--amber-risk);
}

.dot-check {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
  display: none;
}
.opt-btn.sel-green .dot-check,
.opt-btn.sel-red .dot-check,
.opt-btn.sel-amber .dot-check {
  display: block;
}

.nav-row {
  display: flex;
  gap: 8px;
}

/* Email gate step */
.gate-eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 8px;
}
.gate-title {
  font-family: "DM Serif Display", serif;
  font-size: 22px;
  line-height: 1.3;
  margin-bottom: 8px;
}
.gate-desc {
  font-size: 13px;
  color: var(--ink-mid);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Preview score (blurred) */
.score-preview {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.score-preview-label {
  font-size: 11px;
  color: var(--ink-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.score-preview-bar-wrap {
  height: 8px;
  background: var(--cream-dark);
  border-radius: 4px;
}
.score-preview-bar {
  height: 8px;
  border-radius: 4px;
}
.score-blur-overlay {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 60%;
  background: linear-gradient(to right, transparent, var(--cream) 60%);
}
.score-preview-text {
  font-size: 13px;
  color: var(--ink-mid);
  margin-top: 8px;
}

.privacy-note {
  font-size: 11px;
  color: var(--ink-light);
  margin-top: 10px;
  text-align: center;
}

/* Result step */
.result-header {
  margin-bottom: 1.5rem;
}
.result-level-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.result-title {
  font-family: "DM Serif Display", serif;
  font-size: 22px;
  line-height: 1.3;
  margin-bottom: 4px;
}
.result-addr {
  font-size: 12px;
  color: var(--ink-light);
}

.score-big {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.score-num-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}
.score-num {
  font-family: "DM Serif Display", serif;
  font-size: 40px;
  line-height: 1;
}
.score-max {
  font-size: 14px;
  color: var(--ink-light);
}
.score-bar-track {
  height: 6px;
  background: var(--cream-dark);
  border-radius: 3px;
}
.score-bar-fill {
  height: 6px;
  border-radius: 3px;
  transition: width 0.8s ease;
}

.result-desc {
  font-size: 14px;
  color: var(--ink-mid);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.findings-title {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 10px;
}
.finding-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--cream-dark);
  font-size: 13px;
  color: var(--ink-mid);
  line-height: 1.5;
}
.finding-row:last-child {
  border-bottom: none;
}
.finding-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Upsell card */
.upsell-card {
  background: var(--ink);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1rem;
  color: var(--white);
}
.upsell-eyebrow {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 8px;
}
.upsell-title {
  font-family: "DM Serif Display", serif;
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: 10px;
}
.upsell-items {
  list-style: none;
  margin-bottom: 1.25rem;
}
.upsell-items li {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  padding: 5px 0;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.upsell-items li::before {
  content: "→";
  color: var(--gold-light);
  flex-shrink: 0;
  font-size: 12px;
  margin-top: 1px;
}
.upsell-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 1rem;
}
.upsell-price {
  font-family: "DM Serif Display", serif;
  font-size: 28px;
  color: var(--gold-light);
}
.upsell-price-note {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}
.btn-upsell {
  width: 100%;
  padding: 13px;
  background: var(--gold);
  color: var(--ink);
  border: none;
  border-radius: var(--radius);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-upsell:hover {
  background: var(--gold-light);
}

.btn-cerrar {
  /* Alineación */
  display: inline-flex; /* Permite alinear el contenido interno */
  align-items: center; /* Centra verticalmente icono y texto */
  gap: 8px;

  width: fit-content;
  padding: 5px;
  background: var(--gold);
  color: var(--ink);
  border: none;
  border-radius: var(--radius);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s;
  color: white;
}

.btn-cerrar:hover {
  background: var(--gold-light);
}

.restart-link {
  display: block;
  text-align: center;
  font-size: 12px;
  color: var(--ink-light);
  margin-top: 1rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */


.ft-contacto {
  margin-top: 250px; /* Espacio razonable entre el widget y el footer */
  padding-bottom: 2rem; /* Margen inferior extra para que respire al final */
  width: 100%;
  position: relative;
  z-index: 1; /* Evita que la textura de papel (body::before) bloquee los links */
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  /*.nav-logo {
    left: -200px;
  }

  .nav-links{
    background-color: #b84040;
  }

  .nav-links a{
    font-size: 17px;
    top:-120px;
    left: 200px;
  }*/
}

@media (max-width: 400px) {
  .card {
    padding: 1.25rem;
  }
  h1.intro-title {
    font-size: 24px;
  }
  .steps-list {
    gap: 6px;
  }

  /*.nav-logo {
    left: 120px;
  }

  .nav-links{
    background-color: #b84040;
  }

  .nav-links a{
    top:-30px;
    left: 120px;
  }*/
}

