/* =========================================================
   RESET & BASE
========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:   #0A1628;
  --navy2:  #0D1F3C;
  --navy3:  #122347;
  --gold:   #C9A84C;
  --gold2:  #E4C26A;
  --gold3:  #A07830;
  --white:  #F4F7FB;
  --gray:   #8896A8;
  --glass:  rgba(255,255,255,0.05);
  --glassBorder: rgba(201,168,76,0.25);
  --radius: 16px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--navy);
  color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}

/* =========================================================
   ANIMATED BACKGROUND
========================================================= */
.bg-canvas {
  position: fixed; inset: 0; z-index: 0;
  background: linear-gradient(135deg, #050e1d 0%, #0A1628 35%, #0c2240 65%, #071220 100%);
  overflow: hidden;
}
.bg-canvas::before {
  content: '';
  position: absolute; inset: -50%;
  background: radial-gradient(ellipse 80% 60% at 20% 40%, rgba(12,60,100,.55) 0%, transparent 60%),
              radial-gradient(ellipse 60% 50% at 80% 70%, rgba(201,168,76,.10) 0%, transparent 55%),
              radial-gradient(ellipse 50% 40% at 50% 10%, rgba(10,30,70,.7) 0%, transparent 60%);
  animation: bgShift 18s ease-in-out infinite alternate;
}
@keyframes bgShift {
  0%   { transform: translateX(0) translateY(0) rotate(0deg); }
  100% { transform: translateX(3%) translateY(2%) rotate(1.5deg); }
}

/* Stars */
.stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 40%, rgba(255,255,255,.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 5%,  rgba(255,255,255,.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 25%, rgba(255,255,255,.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 10%, rgba(255,255,255,.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 92% 50%, rgba(255,255,255,.3) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 5% 75%, rgba(201,168,76,.5) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 33% 80%, rgba(255,255,255,.3) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 60% 90%, rgba(201,168,76,.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 78% 85%, rgba(255,255,255,.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 47% 55%, rgba(255,255,255,.3) 0%, transparent 100%);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle {
  0%   { opacity: .7; }
  100% { opacity: 1; }
}

/* Wave bottom */
.wave {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 220px;
  background: radial-gradient(ellipse 120% 80% at 50% 110%, rgba(201,168,76,.07) 0%, transparent 70%);
}

/* =========================================================
   AIRPLANE ANIMATION  (motion controlled by anime.js in app.js)
========================================================= */
.airplane-layer {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Wrappers — CSS fallback animation; anime.js overrides when loaded */
.plane-wrapper {
  position: absolute;
  bottom: -100px; left: -220px;
  will-change: transform;
  animation: cssFlightPath1 22s linear infinite;
}
.plane-wrapper-2 {
  position: absolute;
  top: 18%; left: -140px;
  will-change: transform;
  animation: cssFlightPath2 34s linear infinite 13s;
}

@keyframes cssFlightPath1 {
  0%   { transform: translate(0, 0)              rotate(-24deg); opacity: 0; }
  5%   { opacity: .88; }
  92%  { opacity: .88; }
  100% { transform: translate(140vw, -105vh)     rotate(-24deg); opacity: 0; }
}
@keyframes cssFlightPath2 {
  0%   { transform: translate(0, 0)              rotate(-16deg); opacity: 0; }
  4%   { opacity: .5; }
  93%  { opacity: .5; }
  100% { transform: translate(140vw, -72vh)      rotate(-16deg); opacity: 0; }
}

/* When anime.js takes over, pause the CSS animation */
.plane-wrapper.anime-active,
.plane-wrapper-2.anime-active {
  animation: none;
}

.plane-svg {
  width: 92px; height: auto;
  filter: drop-shadow(0 0 12px rgba(201,168,76,.55))
          drop-shadow(0 0 28px rgba(201,168,76,.22));
}
.plane-svg-2 {
  width: 54px; height: auto;
  filter: drop-shadow(0 0 7px rgba(201,168,76,.32));
}

/* Dual-contrail effect (two engine trails side by side) */
.contrail {
  position: absolute;
  top: 50%; right: calc(100% - 8px);
  transform: translateY(-50%);
  width: 230px; height: 7px;
  border-radius: 4px;
  background:
    linear-gradient(to bottom,
      transparent 0%,
      rgba(201,168,76,.55) 18%,
      rgba(201,168,76,.12) 50%,
      rgba(201,168,76,.55) 82%,
      transparent 100%),
    linear-gradient(to left,
      rgba(201,168,76,.7) 0%,
      rgba(255,255,255,.2) 40%,
      transparent 100%);
}
.contrail-2 {
  position: absolute;
  top: 50%; right: calc(100% - 5px);
  transform: translateY(-50%);
  width: 145px; height: 5px;
  border-radius: 3px;
  background:
    linear-gradient(to bottom,
      transparent 0%,
      rgba(201,168,76,.45) 20%,
      rgba(201,168,76,.1) 50%,
      rgba(201,168,76,.45) 80%,
      transparent 100%),
    linear-gradient(to left,
      rgba(201,168,76,.55) 0%,
      rgba(255,255,255,.12) 45%,
      transparent 100%);
}

/* =========================================================
   LAYOUT
========================================================= */
.page-wrapper {
  position: relative; z-index: 1;
  min-height: 100vh;
}

/* =========================================================
   NAVBAR / HEADER
========================================================= */
.header {
  padding: 24px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(18px);
  background: rgba(10,22,40,.65);
  border-bottom: 1px solid rgba(201,168,76,.12);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--gold), var(--gold3));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(201,168,76,.35);
}
.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: .03em;
}
.logo-text span { color: var(--gold); }

.header-cta {
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  padding: 9px 22px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.header-cta:hover {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 0 20px rgba(201,168,76,.4);
}

/* =========================================================
   HERO
========================================================= */
.hero {
  padding: 80px 5% 60px;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(201,168,76,.12);
  border: 1px solid rgba(201,168,76,.3);
  color: var(--gold2);
  padding: 6px 18px;
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero-badge::before {
  content: '';
  display: block;
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.4); }
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--white) 40%, var(--gold2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero h1 em {
  font-style: italic;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.18rem);
  color: rgba(244,247,251,.7);
  max-width: 560px;
  margin: 0 auto 48px;
  font-weight: 300;
  letter-spacing: .01em;
}

/* Scroll arrow */
.scroll-hint {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin-top: 10px;
}
.scroll-hint span {
  font-size: .78rem;
  color: rgba(201,168,76,.6);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.scroll-arrow {
  width: 28px; height: 28px;
  border: 2px solid rgba(201,168,76,.4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  animation: bounce 1.8s ease-in-out infinite;
}
.scroll-arrow svg { color: var(--gold); }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

/* =========================================================
   STATS BAR
========================================================= */
.stats-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  max-width: 860px;
  margin: 0 auto 70px;
  border: 1px solid var(--glassBorder);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(16px);
  overflow: hidden;
}
.stat-item {
  flex: 1;
  min-width: 140px;
  padding: 20px 24px;
  text-align: center;
  border-right: 1px solid var(--glassBorder);
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  display: block;
}
.stat-label {
  font-size: .8rem;
  color: rgba(244,247,251,.55);
  letter-spacing: .04em;
}

/* =========================================================
   FORM SECTION
========================================================= */
#formulario {
  padding: 0 5% 100px;
  max-width: 860px;
  margin: 0 auto;
}

.form-header {
  text-align: center;
  margin-bottom: 48px;
}
.form-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 600;
  margin-bottom: 10px;
}
.form-header h2 span { color: var(--gold); }
.form-header p {
  color: rgba(244,247,251,.6);
  font-size: .95rem;
}

/* Steps indicator */
.steps-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
}
.step-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(201,168,76,.3);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  font-weight: 600;
  color: var(--gray);
  transition: var(--transition);
  position: relative;
}
.step-dot.active {
  border-color: var(--gold);
  background: rgba(201,168,76,.15);
  color: var(--gold);
  box-shadow: 0 0 18px rgba(201,168,76,.3);
}
.step-dot.done {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--navy);
}
.step-line {
  flex: 1;
  max-width: 60px;
  height: 2px;
  background: rgba(201,168,76,.2);
  transition: var(--transition);
}
.step-line.done { background: var(--gold); }
.step-label {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%; transform: translateX(-50%);
  white-space: nowrap;
  font-size: .7rem;
  color: var(--gray);
}
.step-dot.active .step-label { color: var(--gold); }

/* Form card */
.form-card {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--glassBorder);
  border-radius: 24px;
  padding: 44px 44px;
  backdrop-filter: blur(24px);
  box-shadow: 0 30px 80px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.03) inset;
}
@media (max-width: 600px) {
  .form-card { padding: 28px 20px; }
}

/* Steps */
.form-step { display: none; }
.form-step.active { display: block; animation: stepIn .35s ease; }
@keyframes stepIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.step-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 6px;
  color: var(--white);
}
.step-sub {
  font-size: .88rem;
  color: rgba(244,247,251,.5);
  margin-bottom: 32px;
}

/* Field groups */
.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.fields-grid.col-1 { grid-template-columns: 1fr; }
@media (max-width: 580px) {
  .fields-grid { grid-template-columns: 1fr; }
}
.field-span-2 { grid-column: 1 / -1; }

/* Field */
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.field label {
  font-size: .82rem;
  font-weight: 500;
  color: rgba(244,247,251,.65);
  letter-spacing: .04em;
  display: flex; align-items: center; gap: 7px;
}
.field label svg { opacity: .6; }

.field input,
.field select,
.field textarea {
  background: rgba(255,255,255,.05);
  border: 1.5px solid rgba(201,168,76,.2);
  border-radius: 10px;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  padding: 12px 16px;
  outline: none;
  transition: var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
  background: rgba(201,168,76,.07);
  box-shadow: 0 0 0 3px rgba(201,168,76,.15), 0 4px 20px rgba(201,168,76,.08);
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(244,247,251,.28); }
.field select option {
  background: var(--navy2);
  color: var(--white);
}
.field textarea {
  resize: vertical;
  min-height: 110px;
}
.field input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(.7) sepia(1) hue-rotate(5deg) saturate(2);
  cursor: pointer;
}

/* Input with icon prefix */
.input-wrap { position: relative; }
.input-wrap .icon-prefix {
  position: absolute;
  left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--gold);
  opacity: .7;
  pointer-events: none;
}
.input-wrap input,
.input-wrap select { padding-left: 40px; }

/* Number field custom */
.number-field {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,.05);
  border: 1.5px solid rgba(201,168,76,.2);
  border-radius: 10px;
  overflow: hidden;
  transition: var(--transition);
}
.number-field:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
.number-field button {
  background: transparent;
  border: none;
  color: var(--gold);
  width: 40px; height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background var(--transition);
  flex-shrink: 0;
}
.number-field button:hover { background: rgba(201,168,76,.12); }
.number-field input {
  flex: 1;
  background: transparent;
  border: none;
  border-left: 1px solid rgba(201,168,76,.15);
  border-right: 1px solid rgba(201,168,76,.15);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  text-align: center;
  padding: 12px 6px;
  outline: none;
  -moz-appearance: textfield;
}
.number-field input::-webkit-outer-spin-button,
.number-field input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Validation state */
.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: rgba(255, 90, 90, .6);
  box-shadow: 0 0 0 3px rgba(255, 90, 90, .1);
}
.field-error {
  font-size: .75rem;
  color: #ff7a7a;
  display: none;
}
.field.invalid .field-error { display: block; }

/* Navigation buttons */
.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 36px;
  gap: 14px;
}

.btn-back {
  background: transparent;
  border: 1.5px solid rgba(201,168,76,.35);
  color: var(--gold);
  padding: 12px 28px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; gap: 8px;
}
.btn-back:hover {
  background: rgba(201,168,76,.08);
  border-color: var(--gold);
}
.btn-back.hidden { visibility: hidden; pointer-events: none; }

.btn-next {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 50%, var(--gold) 100%);
  background-size: 200% 100%;
  border: none;
  color: var(--navy);
  padding: 14px 36px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; gap: 9px;
  box-shadow: 0 6px 28px rgba(201,168,76,.35);
  letter-spacing: .02em;
}
.btn-next:hover {
  background-position: 100% 0;
  box-shadow: 0 8px 36px rgba(201,168,76,.5);
  transform: translateY(-2px);
}
.btn-next:active { transform: translateY(0); }

/* Submit button */
.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 50%, var(--gold) 100%);
  background-size: 200% 100%;
  border: none;
  color: var(--navy);
  padding: 18px 24px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 12px;
  box-shadow: 0 8px 32px rgba(201,168,76,.4);
  margin-top: 36px;
  letter-spacing: .02em;
  position: relative;
  overflow: hidden;
}
.btn-submit::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.25) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform .6s ease;
}
.btn-submit:hover::before { transform: translateX(100%); }
.btn-submit:hover {
  background-position: 100% 0;
  box-shadow: 0 12px 44px rgba(201,168,76,.55);
  transform: translateY(-2px);
}
.btn-submit:active { transform: translateY(0); }
.btn-submit.loading { pointer-events: none; opacity: .8; }
.btn-submit.loading .btn-text { display: none; }
.btn-submit .loading-spinner { display: none; }
.btn-submit.loading .loading-spinner { display: flex; align-items: center; gap: 10px; }

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(201,168,76,.5); }
  70%  { box-shadow: 0 0 0 16px rgba(201,168,76,0); }
  100% { box-shadow: 0 0 0 0 rgba(201,168,76,0); }
}
.btn-submit:not(.loading) { animation: pulse-ring 2.5s ease-out infinite; }

/* Spinner */
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(10,22,40,.3);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Success state */
.success-overlay {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  animation: fadeIn .5s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.success-overlay.show { display: flex; }
.success-icon {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 0 40px rgba(201,168,76,.4);
  animation: popIn .5s cubic-bezier(.2,1.3,.5,1) both;
}
@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }
.success-overlay h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  margin-bottom: 12px;
}
.success-overlay p { color: rgba(244,247,251,.65); font-size: .95rem; }

/* =========================================================
   TRUST SECTION
========================================================= */
.trust-section {
  padding: 60px 5% 30px;
  max-width: 860px;
  margin: 0 auto;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 580px) {
  .trust-grid { grid-template-columns: 1fr; }
}
.trust-card {
  background: var(--glass);
  border: 1px solid var(--glassBorder);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: var(--transition);
}
.trust-card:hover {
  background: rgba(201,168,76,.07);
  border-color: rgba(201,168,76,.4);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.3);
}
.trust-icon {
  width: 48px; height: 48px;
  background: rgba(201,168,76,.12);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  color: var(--gold);
}
.trust-card h4 {
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--white);
}
.trust-card p {
  font-size: .8rem;
  color: var(--gray);
}

/* =========================================================
   FOOTER
========================================================= */
footer {
  padding: 40px 5% 30px;
  border-top: 1px solid rgba(201,168,76,.1);
  max-width: 860px;
  margin: 0 auto;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-copy {
  font-size: .8rem;
  color: rgba(244,247,251,.35);
}
.footer-copy span { color: var(--gold); }
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  font-size: .8rem;
  color: rgba(244,247,251,.4);
  text-decoration: none;
  transition: color .2s;
}
.footer-links a:hover { color: var(--gold); }

/* =========================================================
   SCROLLBAR
========================================================= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: rgba(201,168,76,.35); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201,168,76,.6); }
