:root{
  --primary: #363835;
  --wine-mid: #9e7e65;
  --beige: #f4efe6;
  --gold: #ddb87c;
  --gold-light: #f0d39d;
  --gold-dark: #9e7e65;
  --pistachio: #a4b486;
  --text-dim: rgba(54,56,53,0.78);
  --text-faint: rgba(54,56,53,0.5);
  --line: rgba(158,126,101,0.32);
  --field-bg: rgba(255,255,255,0.4);
  --glass-border: rgba(158,126,101,0.28);
  --shadow-gold: 0 0 30px rgba(221,184,124,0.22);
  --serif: "Cormorant Garamond", serif;
  --sans: "DM Sans", sans-serif;
}

*{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
  background: var(--beige);
  color: var(--primary);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body{
  min-height:100vh;
  position: relative;
}

body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(244,239,230,0.96) 0%, rgba(244,239,230,0.88) 45%, rgba(244,239,230,0.55) 100%),
    url('img/textura-fundo.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.75;
  mix-blend-mode: multiply;
}

.bg-layer{
  position: fixed;
  inset: 0;
  background-repeat: no-repeat;
  background-image: url('img/laura-hero.png');
  background-size: min(40vw, 520px) auto;
  background-position: right 4vw bottom -4vh;
  z-index: 0;
  transition: opacity .7s ease;
  pointer-events: none;
  filter: drop-shadow(0 28px 46px rgba(54,56,53,0.18));
}
.bg-base{ opacity: 0.62; }
.bg-intro{ opacity: 0; }
body.intro-bg .bg-intro{ opacity: 0.78; }
body.intro-bg .bg-base{ opacity: 0; }

@media (max-width: 900px){
  .bg-layer{
    background-size: 150vw auto;
    background-position: right -60vw bottom 8vh;
    opacity: 0.28 !important;
  }
  body.intro-bg .bg-intro{ opacity: 0.4 !important; }
}

#cover-screen, #wizard{
  position: relative;
  z-index: 1;
}

/* ---------- COVER ---------- */
#cover-screen{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding: 60px 24px;
}
#cover-screen > div{
  position: relative;
  z-index: 1;
  max-width: 600px;
  transform: translateY(-8vh);
}
.cover-logo{
  width: clamp(160px, 32vw, 240px);
  height: auto;
  margin: 0 auto 8px;
  display: block;
  opacity: 0.95;
}
.kicker{
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--gold-dark);
  font-weight: 700;
  margin-bottom: 18px;
}
#cover-screen h1{
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
  margin: 0;
  letter-spacing: 0.01em;
  color: var(--primary);
}
#cover-screen .sub{
  font-family: var(--sans);
  font-size: clamp(14px, 1.8vw, 16.5px);
  color: var(--text-dim);
  margin-top: 16px;
  line-height: 1.6;
  font-weight: 400;
}
#cover-screen .divider{
  width:72px;
  height:1px;
  margin: 26px auto 28px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
#cover-screen .cover-meta{
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-top: 20px;
}

.btn-primary{
  position: relative;
  overflow: hidden;
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--primary);
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  border: none;
  border-radius: 999px;
  padding: 16px 40px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(221,184,124,0.34);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-primary:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(201,169,110,0.48);
}
.btn-primary:active{ transform: translateY(0); }
.btn-primary:disabled{ opacity:0.4; cursor:not-allowed; transform:none; }

.btn-ghost{
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: var(--primary);
  background: rgba(255,255,255,0.4);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 14px 26px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.btn-ghost:hover{ background: rgba(255,255,255,0.65); border-color: rgba(226,201,154,0.85); transform: translateY(-1px); }
.btn-ghost:active{ transform: translateY(0); }
.btn-ghost:disabled{ opacity:0.3; cursor:not-allowed; transform:none; }

/* ---------- WIZARD SHELL ---------- */
#wizard{ display:none; }

.progress-shell{
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 6px;
  z-index: 50;
}
.progress-track{
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(54,56,53,0.16);
  box-shadow: inset 0 -1px 0 rgba(54,56,53,0.14);
}
.progress-fill{
  position: absolute;
  top: 0; left: 0;
  height: 6px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold) 54%, var(--pistachio) 100%);
  background-size: 200% 100%;
  animation: progressShift 6s ease infinite;
  box-shadow: 0 0 10px rgba(221,184,124,0.5), 0 0 22px rgba(158,126,101,0.3);
  transition: width .4s ease;
  z-index: 1;
}
@keyframes progressShift{
  0%{ background-position: 0% 50%; }
  50%{ background-position: 100% 50%; }
  100%{ background-position: 0% 50%; }
}
.question-marker{
  position: absolute;
  top: 50%;
  width: 2px;
  height: 2.7px;
  transform: translateY(-50%);
  background: rgba(54,56,53,0.2);
  opacity: 0.7;
  transition: background .25s ease, opacity .25s ease;
}
.question-marker.active{
  background: var(--gold-dark);
  opacity: 1;
}

.steps-viewport{
  max-width: 660px;
  margin: 0 auto;
  padding: 46px 24px;
  min-height: 100vh;
  display:flex;
  align-items:center;
}

#stepsContainer{ width: 100%; }

.step{
  display:none;
  width:100%;
  animation: fadeUp .22s ease;
}
.step.active{ display:block; }

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

.panel{
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 44px clamp(20px, 5vw, 56px);
  box-shadow: 0 20px 60px rgba(54,56,53,0.1);
}

.panel h2{
  font-family: var(--serif);
  font-weight: 600;
  font-size: 30px;
  color: var(--primary);
  margin: 0 0 18px;
}
.panel p{
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-dim);
  margin: 0 0 16px;
  font-weight: 400;
}

/* ---------- QUESTION META ROW ---------- */
.q-meta{
  display:flex;
  align-items:center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 8px;
}
.q-meta-count{
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
}
.q-meta-axis{
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold-dark);
  white-space: nowrap;
}

.q label{
  display:block;
  margin: 0 0 26px;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.32;
  color: var(--primary);
  font-weight: 600;
}

/* ---------- CHOICE BUTTONS ---------- */
.choice-list{
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.choice-btn{
  text-align: left;
  width: 100%;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--text-dim);
  background: rgba(255,255,255,0.4);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 17px 21px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .12s ease, color .18s ease, box-shadow .18s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.choice-btn:hover{
  border-color: rgba(158,126,101,0.58);
  background: rgba(221,184,124,0.12);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
  color: var(--primary);
}
.choice-btn.selected{
  color: var(--primary);
  border-color: rgba(255,241,208,0.9);
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  box-shadow: 0 0 0 1px rgba(255,241,208,0.5), 0 10px 28px rgba(201,169,110,0.28);
  font-weight: 600;
}
.choice-btn:disabled{ cursor: default; }

/* ---------- CONTACT STEP ---------- */
input[type="text"], input[type="tel"]{
  width:100%;
  background: var(--field-bg);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  color: var(--primary);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  padding: 17px 18px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
input[type="text"]::placeholder, input[type="tel"]::placeholder{ color: var(--text-faint); font-style: normal; }
input[type="text"]:focus, input[type="tel"]:focus{
  outline:none;
  border-color: rgba(226,201,154,0.9);
  box-shadow: 0 0 0 3px rgba(221,184,124,0.18);
}
input[type="text"].invalid, input[type="tel"].invalid,
input[type="text"].invalid:focus, input[type="tel"].invalid:focus{
  border-color: #c0392b;
  animation: shakeField .35s ease;
}
@keyframes shakeField{
  0%, 100%{ transform: translateX(0); }
  25%{ transform: translateX(-5px); }
  75%{ transform: translateX(5px); }
}
.field-error{
  display:none;
  margin-top: 10px;
  font-size: 13px;
  color: #c0392b;
  font-weight: 500;
}
.field-error.show{ display:block; animation: fadeIn .25s ease; }
@keyframes fadeIn{
  from{ opacity:0; transform: translateY(-4px); }
  to{ opacity:1; transform: translateY(0); }
}
.q-field{ margin-bottom: 24px; }
.q-field label{
  display:block;
  margin-bottom: 12px;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  font-weight: 600;
}

.phone-grid{
  display: grid;
  grid-template-columns: 1.1fr 0.6fr 1.3fr;
  gap: 12px;
}
.phone-field{
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.phone-sublabel{
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 700;
}

.phone-country-wrap{
  position: relative;
  z-index: 5;
}
.phone-country-native{
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.phone-country-trigger{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 17px 16px;
  background: var(--field-bg);
  color: var(--primary);
  cursor: pointer;
  text-align: left;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.phone-country-trigger:hover{ border-color: rgba(158,126,101,0.7); }
.phone-country-wrap.open .phone-country-trigger{
  border-color: rgba(226,201,154,0.9);
  box-shadow: 0 0 0 3px rgba(221,184,124,0.18);
}
.phone-country-text{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.phone-country-chevron{
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--text-faint);
  border-bottom: 2px solid var(--text-faint);
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.phone-country-wrap.open .phone-country-chevron{ transform: rotate(-135deg); }

.phone-country-list{
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fbf8f2;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 6px;
  max-height: 240px;
  overflow-y: auto;
  display: none;
  z-index: 60;
  box-shadow: 0 20px 45px rgba(54,56,53,0.18);
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dark) rgba(158,126,101,0.1);
}
.phone-country-wrap.open .phone-country-list{ display: block; }
.phone-country-list::-webkit-scrollbar{ width: 8px; }
.phone-country-list::-webkit-scrollbar-track{
  background: rgba(158,126,101,0.08);
  border-radius: 999px;
}
.phone-country-list::-webkit-scrollbar-thumb{
  background: var(--gold-dark);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.phone-country-option{
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-dim);
  text-align: left;
  padding: 10px 12px;
  border-radius: 9px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13.5px;
}
.phone-country-option:hover,
.phone-country-option:focus{
  background: rgba(221,184,124,0.16);
  color: var(--primary);
  outline: none;
}
.phone-country-option.selected{
  background: rgba(221,184,124,0.28);
  color: var(--primary);
}

@media (max-width: 768px){
  .phone-grid{ grid-template-columns: 1fr; }
}

.submit-status{
  margin-top: 18px;
  font-size: 13.5px;
  font-weight: 500;
  min-height: 1.2em;
  color: var(--text-dim);
}
.submit-status.success{ color: #5a7a3f; }
.submit-status.error{ color: #c0392b; }

/* ---------- OVERLAY DE ENVIO ---------- */
.submit-overlay{
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(244,239,230,0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.submit-overlay.active{
  opacity: 1;
  pointer-events: all;
}
.submit-spinner{
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid rgba(158,126,101,0.18);
  border-top-color: var(--gold-dark);
  animation: submitSpin .85s linear infinite;
}
@keyframes submitSpin{
  to{ transform: rotate(360deg); }
}
.submit-overlay-text{
  margin-top: 22px;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  font-weight: 500;
}

/* ---------- STEP NAV ---------- */
.step-nav{
  display:flex;
  align-items:center;
  gap: 14px;
  margin-top: 34px;
}
.result-retake-nav{
  justify-content: center;
  margin-top: 22px;
}

/* ---------- RESULT SCREEN ---------- */
.result-badge{
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold-dark);
  display: block;
  margin-bottom: 14px;
}
.result-title{
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 4.6vw, 38px);
  color: var(--primary);
  margin: 0 0 18px;
  line-height: 1.16;
}
.result-desc{
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--text-dim);
  font-weight: 400;
  margin: 0 0 28px;
}
.result-cta-label{
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 700;
  margin-bottom: 14px;
}
.result-actions{
  display:flex;
  flex-direction: column;
  gap: 12px;
}
.result-cta-link{
  display: block;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  padding: 26px 28px;
  background: linear-gradient(150deg, rgba(255,255,255,0.7) 0%, rgba(244,239,230,0.5) 100%);
  border: 1px solid rgba(226,201,154,0.7);
  box-shadow: 0 14px 34px rgba(54,56,53,0.1), var(--shadow-gold);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.result-cta-link:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(54,56,53,0.14), 0 0 34px rgba(221,184,124,0.32);
}
.result-cta-product{
  display:block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 18px;
}
.result-cta-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--primary);
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  border-radius: 999px;
  padding: 14px 26px;
}
.result-cta-btn::after{
  content: "→";
  font-weight: 700;
}

@media (max-width: 640px){
  .steps-viewport{ padding: 34px 16px; }
  .panel{ padding: 30px 22px; }
  .q label{ font-size: 22px; }
  .btn-primary, .btn-ghost{ padding: 14px 22px; }
  .step-nav{ flex-wrap: wrap; }
  .choice-btn{ padding: 15px 17px; font-size: 14px; }
  .result-badge, .q-meta-axis{ font-size: 9.5px; letter-spacing: 0.14em; }
  .result-cta-link{ padding: 22px 20px; }
}
