/* ============================================================
   Tokens
============================================================ */
:root{
  --bg-deep:#070B14;
  --bg-deep-2:#0B1120;
  --panel:#101828;
  --panel-2:#0C1322;
  --border:rgba(255,255,255,0.08);
  --border-soft:rgba(255,255,255,0.05);
  --text:#F5F7FB;
  --text-muted:#8892A6;
  --text-faint:#5C6478;

  --brand-blue-1:#3E74FF;
  --brand-blue-2:#1339B8;
  --brand-blue-glow:rgba(62,116,255,0.38);

  --brand-gold-1:#FFC845;
  --brand-gold-2:#FF8A1E;
  --brand-gold-glow:rgba(255,150,40,0.35);
  --on-gold:#121830;

  --success:#3DDC9A;
  --success-bg:rgba(61,220,154,0.10);
  --success-border:rgba(61,220,154,0.30);

  --danger:#FF6B7A;
  --danger-bg:rgba(255,107,122,0.10);
  --danger-border:rgba(255,107,122,0.35);

  --radius-lg:22px;
  --radius-md:14px;
  --radius-sm:10px;

  --font-display:'Sora', system-ui, sans-serif;
  --font-body:'Inter', system-ui, sans-serif;
  --font-data:'Space Grotesk', system-ui, sans-serif;
}

*{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
  width:100%;
  min-height:100vh;
  background:
    radial-gradient(ellipse 900px 500px at 12% -5%, rgba(255,150,40,0.14), transparent 60%),
    radial-gradient(ellipse 700px 500px at 105% 10%, rgba(62,116,255,0.08), transparent 55%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-deep-2) 100%);
  color:var(--text);
  font-family:var(--font-body);
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

/* ============================================================
   Decorative background scene
============================================================ */
.bg-scene{
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  overflow:hidden;
}
.glow{
  position:absolute;
  border-radius:50%;
  filter:blur(90px);
  opacity:0.5;
}
.glow-1{
  width:520px; height:520px;
  top:-180px; left:-120px;
  background:radial-gradient(circle, var(--brand-gold-glow), transparent 70%);
}
.glow-2{
  width:600px; height:600px;
  bottom:-260px; right:-160px;
  background:radial-gradient(circle, var(--brand-blue-glow), transparent 70%);
}
.route{
  position:absolute;
  top:6%;
  right:-4%;
  width:min(60vw, 900px);
  opacity:0.35;
}
.route-path{
  fill:none;
  stroke:url(#none);
  stroke:var(--brand-blue-1);
  stroke-width:2;
  stroke-linecap:round;
  stroke-dasharray:6 12;
  animation:dashFlow 14s linear infinite;
}
.route-dot{ fill:var(--brand-blue-1); opacity:0.7; }
.dot-a{ fill:var(--brand-gold-1); }
@keyframes dashFlow{
  to{ stroke-dashoffset:-360; }
}
@media (prefers-reduced-motion: reduce){
  .route-path{ animation:none; }
}

/* ============================================================
   Layout shell — 100% viewport bg, 80% section, 1500px cap
============================================================ */
.wrap{
  position:relative;
  z-index:1;
  width:80%;
  max-width:1500px;
  margin:0 auto;
  padding:72px 0 64px;
}

/* ============================================================
   Hero
============================================================ */
.hero{ text-align:center; margin-bottom:56px; }

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:9px 20px;
  border-radius:999px;
  border:none;
  background:linear-gradient(100deg, var(--brand-gold-1), var(--brand-gold-2));
  font-family:var(--font-data);
  font-size:12.5px;
  font-weight:700;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color:var(--on-gold);
  margin-bottom:22px;
}

.hero h1{
  font-family:var(--font-display);
  font-weight:800;
  font-size:clamp(34px, 5vw, 58px);
  line-height:1.08;
  margin:0 0 16px;
  letter-spacing:-0.01em;
}
.hero h1 .accent{
  background:linear-gradient(100deg, var(--brand-blue-1), var(--brand-blue-2));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.subtitle{
  max-width:560px;
  margin:0 auto 40px;
  color:var(--text-muted);
  font-size:16.5px;
  line-height:1.6;
}

.features{
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:14px;
  margin:0;
  padding:0;
}
.features li{
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px 18px;
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  background:rgba(255,255,255,0.02);
  min-width:180px;
  text-align:left;
}
.feat-icon{ font-size:20px; }
.features b{ display:block; font-size:14px; font-weight:600; }
.features small{ display:block; font-size:12.5px; color:var(--text-muted); }

/* ============================================================
   Calculator grid
============================================================ */
.calculator-grid{
  display:grid;
  grid-template-columns:1.05fr 1fr;
  gap:22px;
  align-items:start;
}

.card{
  background:linear-gradient(180deg, var(--panel), var(--panel-2));
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:32px;
  box-shadow:0 20px 60px -25px rgba(0,0,0,0.6);
}

/* Deja este mismo colchón cuando el navegador hace scroll-into-view hacia
   la tarjeta de resultado, para que no quede tapada bajo un header fijo/sticky.
   Súbelo o bájalo según la altura real de tu header. */
#resultCard{
  scroll-margin-top:90px;
}

/* ---------- form card ---------- */
.field-group{ margin-bottom:26px; }

.field-label{
  display:flex;
  align-items:center;
  gap:10px;
  font-family:var(--font-display);
  font-weight:700;
  font-size:13px;
  letter-spacing:0.04em;
  text-transform:uppercase;
  color:var(--text);
  margin-bottom:12px;
}
.step{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px; height:22px;
  border-radius:50%;
  background:linear-gradient(135deg, var(--brand-gold-1), var(--brand-gold-2));
  color:var(--on-gold);
  font-family:var(--font-data);
  font-size:12px;
  font-weight:700;
}

.input-row{
  display:flex;
  align-items:center;
  gap:10px;
  background:var(--bg-deep);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:6px 10px 6px 18px;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.input-row:focus-within{
  border-color:var(--brand-blue-1);
  box-shadow:0 0 0 3px rgba(62,116,255,0.20);
}
.input-affix{ color:var(--text-faint); font-size:17px; }
.input-row input{
  flex:1;
  min-width:0;
  background:transparent;
  border:none;
  outline:none;
  color:var(--text);
  font-family:var(--font-data);
  font-size:22px;
  font-weight:600;
  padding:12px 0;
  -moz-appearance:textfield;
}
.input-row input::-webkit-outer-spin-button,
.input-row input::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
.input-row input::placeholder{ color:var(--text-faint); font-weight:500; }

.pill{
  flex-shrink:0;
  padding:8px 14px;
  border-radius:999px;
  background:linear-gradient(135deg, var(--brand-gold-1), var(--brand-gold-2));
  color:var(--on-gold);
  font-family:var(--font-data);
  font-weight:700;
  font-size:12.5px;
  letter-spacing:0.03em;
}

.toggle-group{
  display:flex;
  gap:10px;
  margin-top:12px;
}
.toggle-option{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 10px;
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  cursor:pointer;
  font-size:14px;
  font-weight:600;
  color:var(--text-muted);
  transition:border-color .15s ease, color .15s ease, background .15s ease;
}
.toggle-option input{ display:none; }
.toggle-option.is-active,
.toggle-option:has(input:checked){
  border-color:var(--brand-gold-1);
  color:var(--text);
  background:rgba(255,212,0,0.10);
}

.btn-primary{
  width:100%;
  border:none;
  cursor:pointer;
  padding:17px 20px;
  border-radius:var(--radius-md);
  background:linear-gradient(100deg, var(--brand-blue-1), var(--brand-blue-2));
  color:#FFFFFF;
  font-family:var(--font-display);
  font-weight:700;
  font-size:15.5px;
  letter-spacing:0.01em;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  box-shadow:0 14px 34px -14px rgba(30,80,220,0.55);
  transition:transform .12s ease, box-shadow .12s ease;
}
.btn-primary:hover{ transform:translateY(-1px); box-shadow:0 18px 40px -14px rgba(30,80,220,0.65); }
.btn-primary:active{ transform:translateY(0); }
.btn-primary:focus-visible{ outline:2px solid var(--brand-gold-1); outline-offset:3px; }

.alert-box{
  margin-top:18px;
  padding:16px 20px;
  border-radius:18px;
  font-size:14.5px;
  line-height:1.55;
  display:flex;
  gap:14px;
  align-items:flex-start;
  border:none;
  box-shadow:0 14px 34px -16px rgba(0,0,0,0.55);
}
.alert-box[hidden]{ display:none; }
.alert-box.is-ok{
  background:linear-gradient(100deg, #3CE28F, #12C46B);
  color:#052A1B;
}
.alert-box.is-warn{
  background:linear-gradient(100deg, #FF7A87, #FF3450);
  color:#2E0207;
}
.alert-box .alert-icon{
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:32px;
  border-radius:50%;
  background:rgba(255,255,255,0.28);
  font-size:15px;
  line-height:1;
  margin-top:0;
}
.alert-box b{ display:block; margin-bottom:2px; font-weight:800; letter-spacing:0.01em; }

/* ---------- result card ---------- */
.result-card h2{
  display:flex;
  align-items:center;
  gap:10px;
  font-family:var(--font-display);
  font-size:19px;
  font-weight:700;
  margin:0 0 22px;
}
.result-icon{ font-size:20px; }

/* ---------- empty state ---------- */
.result-placeholder{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:12px;
  padding:52px 12px 46px;
  color:var(--text-faint);
  animation:fadeIn .4s ease;
}
.placeholder-icon{
  font-size:30px;
  opacity:0.7;
}
.result-placeholder p{
  margin:0;
  font-size:14px;
  line-height:1.6;
  max-width:280px;
}
.result-placeholder p b{ color:var(--text-muted); }

.result-body{ display:none; }

.result-card.has-result .result-placeholder{ display:none; }
.result-card.has-result .result-body{ display:block; }

@keyframes fadeIn{
  from{ opacity:0; }
  to{ opacity:1; }
}

/* ---------- staggered row reveal ---------- */
@keyframes rowIn{
  from{ opacity:0; transform:translateY(16px); }
  to{ opacity:1; transform:translateY(0); }
}

.result-body .breakdown li,
.result-body .taxes-row,
.result-body .total-row{
  opacity:0;
  transform:translateY(16px);
}

.result-card.is-revealed .breakdown li,
.result-card.is-revealed .taxes-row,
.result-card.is-revealed .total-row{
  animation:rowIn .5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.result-card.is-revealed .breakdown li:nth-child(1){ animation-delay:.00s; }
.result-card.is-revealed .breakdown li:nth-child(2){ animation-delay:.07s; }
.result-card.is-revealed .breakdown li:nth-child(3){ animation-delay:.14s; }
.result-card.is-revealed .breakdown li:nth-child(4){ animation-delay:.21s; }
.result-card.is-revealed .breakdown li:nth-child(5){ animation-delay:.28s; }
.result-card.is-revealed .taxes-row{ animation-delay:.37s; }
.result-card.is-revealed .total-row{ animation-delay:.46s; }

@media (prefers-reduced-motion: reduce){
  .result-placeholder,
  .result-body .breakdown li,
  .result-body .taxes-row,
  .result-body .total-row{
    animation:none !important;
    opacity:1 !important;
    transform:none !important;
  }
}

.breakdown{
  list-style:none;
  margin:0 0 20px;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.breakdown li{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:12px;
  padding-bottom:14px;
  border-bottom:1px solid var(--border-soft);
  font-size:14.5px;
}
.breakdown li span{ color:var(--text); display:flex; flex-direction:column; gap:2px; }
.breakdown li span em{
  font-style:normal;
  font-size:12px;
  color:var(--text-faint);
}
.breakdown li b{
  font-family:var(--font-data);
  font-weight:600;
  font-size:15px;
  white-space:nowrap;
}
.breakdown li b.free{ color:var(--success); font-size:13px; }

.taxes-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:16px 18px;
  border-radius:var(--radius-md);
  background:var(--success-bg);
  border:1px solid var(--success-border);
  margin-bottom:20px;
  transition:background .2s ease, border-color .2s ease;
}
.taxes-row.is-danger{
  background:var(--danger-bg);
  border-color:var(--danger-border);
}
.taxes-row span{ font-size:14px; font-weight:600; display:block; }
.taxes-row em{
  font-style:normal;
  display:block;
  font-size:12px;
  color:var(--text-muted);
  margin-top:2px;
}
.taxes-row b{
  font-family:var(--font-data);
  font-size:15px;
  color:var(--success);
  white-space:nowrap;
}
.taxes-row.is-danger b{ color:var(--danger); }

.total-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding-top:6px;
}
.total-row span{ font-size:13px; text-transform:uppercase; letter-spacing:0.05em; color:var(--text-muted); }
.total-row span em{ font-style:normal; display:block; font-size:11px; margin-top:2px; }
.total-row strong{
  font-family:var(--font-data);
  font-size:34px;
  font-weight:700;
  background:linear-gradient(100deg, var(--brand-gold-1), var(--brand-gold-2));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

/* ============================================================
   Footer bits
============================================================ */
.disclaimer{
  text-align:center;
  max-width:640px;
  margin:36px auto 0;
  padding:12px 20px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,0.02);
  font-size:12.5px;
  color:var(--text-muted);
}

.trust{
  list-style:none;
  display:flex;
  justify-content:center;
  gap:36px;
  flex-wrap:wrap;
  margin:40px 0 0;
  padding:28px 0 0;
  border-top:1px solid var(--border-soft);
}
.trust li{ display:flex; align-items:center; gap:10px; }
.trust li span{ font-size:20px; }
.trust li b{ display:block; font-size:13.5px; }
.trust li small{ display:block; font-size:12px; color:var(--text-muted); }

/* ============================================================
   Responsive
============================================================ */
@media (max-width: 980px){
  .calculator-grid{ grid-template-columns:1fr; }
  .wrap{ padding:56px 0 48px; }
}

@media (max-width: 640px){
  .wrap{ width:90%; padding:44px 0 40px; }
  .card{ padding:24px; }
  .subtitle{ display:none; }
  .trust{ gap:22px; }
  .total-row strong{ font-size:28px; }
  .route{ display:none; }

  /* -- carrusel automático de "features" -- */
  .features{
    position:relative;
    display:block;
    min-height:66px;
  }
  .features li{
    position:absolute;
    inset:0;
    width:100%;
    min-width:0;
    opacity:0;
    pointer-events:none;
    transition:opacity .5s ease;
  }
  .features li.is-active{
    opacity:1;
    pointer-events:auto;
  }
}
