/* LuckySoft — landing de captación. Mobile-first. */

:root {
  --bg: #0A0A0A;
  --surface: #141414;
  --surface-2: #1A1A1A;
  --border: #262626;
  --gold: #D4AF37;
  --gold-dark: #B8860B;
  --gold-light: #F3D27A;
  --gold-grad: linear-gradient(135deg, #B8860B 0%, #D4AF37 45%, #F3D27A 100%);
  --text: #F5F5F5;
  --muted: #A3A3A3;
  --ok: #4ade80;
  --error: #F87171;
  --wa: #25D366;

  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --radius: 14px;
  --gutter: 20px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grano sutil de fondo */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg, video { display: block; max-width: 100%; }

a { color: var(--gold-light); text-underline-offset: 3px; }
a:hover { color: var(--text); }

:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.15; }
h1, h2 { font-family: var(--serif); letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 8.5vw, 3.9rem); }
h2 { font-size: clamp(1.75rem, 6vw, 2.75rem); max-width: 22ch; }
h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -.005em; }
p { margin: 0; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--gold); color: #0A0A0A; padding: 10px 16px; border-radius: 8px;
}
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 820px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
  color: var(--gold);
  font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
}
.eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--gold-grad); }

.muted { color: var(--muted); }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 26px;
  border: 0; border-radius: 999px;
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 20px; height: 20px; flex: none; transition: transform .2s var(--ease); }
.btn:active { transform: scale(.98); }

.btn--gold {
  background: var(--gold-grad);
  color: #0A0A0A;
  box-shadow: 0 8px 30px -10px rgba(212, 175, 55, .55), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn--gold:hover { color: #0A0A0A; box-shadow: 0 12px 38px -10px rgba(212, 175, 55, .75), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn--gold:hover svg { transform: translateX(3px); }

.btn--ghost { background: transparent; color: var(--gold-light); box-shadow: inset 0 0 0 1px rgba(212, 175, 55, .55); }
.btn--ghost:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--gold); background: rgba(212, 175, 55, .08); }

.btn--wa { background: var(--wa); color: #06210f; }
.btn--wa:hover { color: #06210f; box-shadow: 0 10px 30px -10px rgba(37, 211, 102, .6); }

.btn--lg { min-height: 58px; padding: 16px 30px; font-size: 1.0625rem; }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: .9rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Barra superior ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 10, 10, .78);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(212, 175, 55, .14);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem; letter-spacing: .01em; }
.brand:hover { color: var(--text); }
.brand__mark { width: 28px; height: 28px; color: var(--gold); }

/* ---------- Hero ---------- */

.hero { position: relative; padding: 48px 0 64px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; z-index: -1;
  width: 720px; height: 720px; right: -260px; top: -280px;
  background: radial-gradient(closest-side, rgba(212, 175, 55, .16), transparent 70%);
}
.hero__grid { display: grid; gap: 44px; align-items: center; }

.hero h1 em {
  font-style: italic;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.lead { margin: 20px 0 30px; color: var(--muted); font-size: 1.125rem; max-width: 36rem; }
.hero .btn--lg { width: 100%; }

.proof {
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  margin: 28px 0 0; padding: 22px 0 0; list-style: none;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: .92rem;
}
.proof li { display: flex; align-items: center; gap: 8px; }
.proof li::before { content: ''; width: 6px; height: 6px; transform: rotate(45deg); background: var(--gold); }
.proof strong { color: var(--text); font-weight: 600; }

.hero__visual { margin: 0; }
.panel-art { width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .6)); }
.panel-art .draw { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: draw 2.2s .4s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Secciones ---------- */

.section { padding: 72px 0; position: relative; }
.section--alt { background: linear-gradient(180deg, transparent, rgba(20, 20, 20, .7) 12%, rgba(20, 20, 20, .7) 88%, transparent); }
.section h2 { margin-bottom: 36px; }
/* Línea fina dorada entre secciones */
.section + .section::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(1120px, calc(100% - 40px)); height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, .35), transparent);
}

/* Tarjetas de servicios */
.cards { display: grid; gap: 16px; }
.card {
  position: relative;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .3s, transform .3s var(--ease);
}
.card::after {
  content: ''; position: absolute; left: 24px; right: 24px; top: -1px; height: 1px;
  background: var(--gold-grad); opacity: .5;
}
@media (hover: hover) { .card:hover { border-color: rgba(212, 175, 55, .45); transform: translateY(-3px); } }
.card__icon { width: 34px; height: 34px; margin-bottom: 18px; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .97rem; }

/* Modelo */
.model { display: grid; gap: 40px; align-items: center; }
.model__copy > p { color: var(--muted); font-size: 1.06rem; margin-top: -12px; }
.checks { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 34px; color: var(--muted); }
.checks li strong { color: var(--text); font-weight: 600; }
.checks li::before {
  content: ''; position: absolute; left: 0; top: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, .6);
  background: radial-gradient(circle, var(--gold) 0 3px, transparent 3.5px);
}
.model__visual { margin: 0; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; }
.infra-art { width: 100%; height: auto; }
.infra-art .flow path { stroke-dasharray: 4 5; animation: flow 1.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -18; } }

/* Pasos */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: s; }
.step {
  position: relative;
  padding: 24px 22px 24px 76px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.step__n {
  position: absolute; left: 22px; top: 22px;
  font-family: var(--serif); font-size: 1.6rem; font-weight: 700; line-height: 1;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .97rem; }

/* Testimonios */
.quotes { display: grid; gap: 16px; }
.quote { margin: 0; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; gap: 18px; }
.quote blockquote { margin: 0; font-family: var(--serif); font-size: 1.15rem; line-height: 1.5; }
.quote figcaption { display: flex; flex-direction: column; font-size: .92rem; }
.quote figcaption span { color: var(--muted); }
.video { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #000; cursor: pointer; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.video iframe { width: 100%; height: 100%; border: 0; }
.video__play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; background: var(--gold-grad); }
.video__play::after { content: ''; position: absolute; left: 26px; top: 20px; border-left: 18px solid #0A0A0A; border-top: 12px solid transparent; border-bottom: 12px solid transparent; }

/* FAQ */
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 22px 44px 22px 0;
  font-weight: 600; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 6px; top: 50%;
  width: 10px; height: 10px; margin-top: -7px;
  border-right: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold);
  transform: rotate(45deg); transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 0 22px; color: var(--muted); max-width: 62ch; }

/* CTA final */
.final__box {
  text-align: center;
  padding-top: 48px; padding-bottom: 48px;
  border: 1px solid rgba(212, 175, 55, .35);
  border-radius: 22px;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(212, 175, 55, .13), transparent 60%),
    var(--surface);
}
.final h2 { margin: 0 auto 14px; }
.final p { color: var(--muted); margin-bottom: 28px; font-size: 1.06rem; }
.final .btn { width: 100%; max-width: 380px; }

/* Footer */
.footer { padding: 48px 0 110px; border-top: 1px solid var(--border); color: var(--muted); font-size: .94rem; }
.footer__inner { display: grid; gap: 26px; }
.footer__tag { margin-top: 10px; max-width: 34ch; }
.footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer__links a { color: var(--text); text-decoration: none; }
.footer__links a:hover { color: var(--gold-light); }
.footer__legal { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--border); font-size: .82rem; display: grid; gap: 6px; }
.footer__legal a { color: var(--muted); }

/* WhatsApp flotante */
.wa-float {
  position: fixed; z-index: 30;
  right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  display: grid; place-items: center;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff;
  box-shadow: 0 10px 30px -6px rgba(0, 0, 0, .6), 0 0 0 4px rgba(37, 211, 102, .18);
  transition: transform .2s var(--ease);
}
.wa-float:hover { color: #fff; transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- Animación al hacer scroll ---------- */

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Encuesta ---------- */

.survey {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  margin: 0; padding: 0;
  border: 0;
  background: var(--bg);
  color: var(--text);
}
.survey[open] { display: flex; flex-direction: column; animation: sheet-in .35s var(--ease); }
.survey::backdrop { background: rgba(0, 0, 0, .75); backdrop-filter: blur(4px); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px); } }

.survey__head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 12px; padding-top: calc(12px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--border);
}
.survey__back, .survey__close {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
}
.survey__back svg, .survey__close svg { width: 20px; height: 20px; }
.survey__back[hidden] { display: grid; visibility: hidden; }
.survey__progress { flex: 1; height: 4px; border-radius: 4px; background: var(--border); overflow: hidden; }
.survey__progress span { display: block; height: 100%; width: 0; background: var(--gold-grad); transition: width .4s var(--ease); }

.survey__body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 28px var(--gutter) calc(28px + env(safe-area-inset-bottom));
}
.survey__step { max-width: 520px; margin: 0 auto; animation: step-in .35s var(--ease); }
.survey__step.is-back { animation-name: step-back; }
@keyframes step-in { from { opacity: 0; transform: translateX(24px); } }
@keyframes step-back { from { opacity: 0; transform: translateX(-24px); } }

.survey__count { color: var(--gold); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px; }
.survey h2 { font-size: clamp(1.6rem, 6.5vw, 2.1rem); max-width: none; margin-bottom: 24px; }
.survey h2:focus { outline: none; }
.survey__hint { color: var(--muted); margin: -12px 0 22px; }

.opts { display: grid; gap: 12px; }
.opt {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  width: 100%; min-height: 60px; padding: 16px 18px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text);
  font: 500 1.02rem/1.35 var(--sans); text-align: left;
  cursor: pointer;
  transition: border-color .2s, background-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.opt::before {
  content: ''; flex: none;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid #4a4a4a;
  transition: border-color .2s, box-shadow .2s;
}
@media (hover: hover) { .opt:hover { border-color: rgba(212, 175, 55, .5); } }
.opt[aria-checked='true'] { border-color: var(--gold); background: rgba(212, 175, 55, .09); }
.opt[aria-checked='true']::before { border-color: var(--gold); box-shadow: inset 0 0 0 5px var(--bg), inset 0 0 0 11px var(--gold); }

.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label, .field .label { font-size: .92rem; font-weight: 500; }
.field .opt-tag { color: var(--muted); font-weight: 400; }
.input, .select {
  width: 100%; min-height: 54px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text);
  font: 400 16px/1.3 var(--sans); /* 16px evita el zoom de iOS al enfocar */
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: #6f6f6f; }
.input:focus, .select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, .2); }
.select {
  appearance: none; -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23D4AF37' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.phone { display: grid; grid-template-columns: 112px 1fr; gap: 8px; }
.field.has-error .input, .field.has-error .select { border-color: var(--error); }
.error { color: var(--error); font-size: .88rem; }
.error:empty { display: none; }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: .94rem; color: var(--muted); cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--gold); }

.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.survey__actions { margin-top: 26px; }
.survey__note { margin-top: 14px; color: var(--muted); font-size: .85rem; text-align: center; }
.form-error { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: rgba(248, 113, 113, .1); color: #fecaca; font-size: .92rem; }
.form-error:empty { display: none; }

/* Resultado */
.result { text-align: center; }
.result__icon {
  display: grid; place-items: center;
  width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%;
  background: rgba(212, 175, 55, .12); border: 1px solid rgba(212, 175, 55, .5); color: var(--gold-light);
}
.result__icon svg { width: 30px; height: 30px; }
.result h2 { margin-bottom: 12px; }
.result p { color: var(--muted); margin: 0 auto 24px; max-width: 30rem; }
.result .btn { width: 100%; }
.result .btn + .btn { margin-top: 12px; }
.calendar { margin: 8px -8px 20px; border-radius: 14px; overflow: hidden; background: #fff; min-height: 640px; }
.calendar iframe { display: block; width: 100%; height: 680px; border: 0; }
.calendar--cal { background: var(--surface); }
.result--wide { max-width: 760px; }

/* ---------- Página legal ---------- */

.prose h1 { font-size: clamp(2rem, 7vw, 3rem); margin-bottom: 8px; }
.prose h2 { font-family: var(--sans); font-size: 1.2rem; font-weight: 600; margin: 36px 0 12px; max-width: none; }
.prose p, .prose li { color: #cfcfcf; }
.prose ul { padding-left: 20px; display: grid; gap: 8px; }
.prose strong { color: var(--text); }
.legal .footer { padding-bottom: 40px; }

/* ---------- Tablet y escritorio ---------- */

@media (min-width: 640px) {
  :root { --gutter: 28px; }
  .cards, .quotes { grid-template-columns: repeat(2, 1fr); }
  .hero .btn--lg { width: auto; }
  .footer__inner { grid-template-columns: 1fr auto; align-items: start; }
  .survey {
    width: min(620px, calc(100% - 32px)); height: auto; max-height: min(860px, calc(100% - 48px));
    margin: auto; border: 1px solid var(--border); border-radius: 20px;
    box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .8);
  }
  .survey:has(.result--wide) { width: min(820px, calc(100% - 32px)); }
  .survey__body { padding: 36px 40px 40px; }
  .calendar { margin-left: 0; margin-right: 0; }
}

@media (min-width: 960px) {
  .hero { padding: 88px 0 110px; }
  .hero__grid { grid-template-columns: 1.05fr 1fr; gap: 56px; }
  .section { padding: 110px 0; }
  .section h2 { margin-bottom: 52px; }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .model { grid-template-columns: 1fr 1.05fr; gap: 72px; }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .step { padding: 76px 22px 26px; }
  .step__n { top: 24px; }
  .quotes { grid-template-columns: repeat(3, 1fr); }
  .footer { padding-bottom: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .panel-art .draw { stroke-dashoffset: 0; }
}
