/* ==========================================================
   MARCA: cambia estos valores para adaptar la identidad visual
   ========================================================== */
:root {
  --bg:          #0a0a0a;   /* negro base */
  --bg-alt:      #0f0f0f;   /* secciones alternas */
  --surface:     #141414;   /* tarjetas */
  --surface-2:   #1b1b1b;   /* campos, hover */
  --border:      #262626;
  --border-2:    #333333;
  --text:        #f2f1ec;
  --muted:       #a09f99;
  --accent:      #f2c230;   /* amarillo dorado */
  --accent-hi:   #ffd34d;
  --accent-ink:  #0a0a0a;   /* texto sobre el amarillo */
  --accent-soft: rgba(242, 194, 48, .12);
  --error:       #ff6b5e;
  --success:     #4ade80;

  --radius:      12px;
  --font:        "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h:    64px;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 700; }
p { margin: 0 0 1em; }
::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 760px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 10px; border: 1px solid transparent;
  font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s;
}
.btn .icon { transition: transform .2s; }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hi); box-shadow: 0 8px 30px rgba(242, 194, 48, .25); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-small { padding: 9px 16px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; box-shadow: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20; height: var(--header-h);
  background: rgba(10, 10, 10, .8); backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 1.2rem; font-weight: 500; letter-spacing: -.01em; }
.logo strong { font-weight: 800; color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 20px; }
.header-phone { display: none; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: .92rem; transition: color .2s; }
.header-phone:hover { color: var(--accent); }
@media (min-width: 760px) { .header-phone { display: inline-flex; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 48px 0 64px; border-bottom: 1px solid var(--border); }
@media (min-width: 960px) { .hero { padding: 96px 0 112px; } }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-bg::before { /* rejilla */
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px; opacity: .45;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}
.hero-bg::after { /* halo dorado que se mueve despacio */
  content: ""; position: absolute; width: 640px; height: 640px; right: -160px; top: -220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 194, 48, .18), transparent 65%);
  animation: drift 14s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(-180px, 120px) scale(1.15); } }

.hero-inner { position: relative; display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero-inner { grid-template-columns: 1.15fr .85fr; gap: 64px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border-2); color: var(--muted); font-weight: 500; font-size: .82rem; letter-spacing: .02em;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
@media (max-width: 420px) { .eyebrow { font-size: .72rem; padding: 6px 10px; gap: 7px; letter-spacing: 0; white-space: nowrap; } }
.hero h1 { font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 800; letter-spacing: -.035em; max-width: 17ch; text-wrap: balance; }
.hl { color: var(--accent); }
.lead { font-size: clamp(1.02rem, 2.2vw, 1.2rem); color: var(--muted); max-width: 560px; margin-bottom: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: .92rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 6px; }
.hero-points .icon { color: var(--accent); width: 1.1em; height: 1.1em; stroke-width: 2.25; }

/* Entrada escalonada del hero */
.js .hero-anim { opacity: 0; transform: translateY(16px); animation: rise .8s cubic-bezier(.2, .7, .2, 1) forwards; }
.js .hero-anim:nth-child(2) { animation-delay: .08s; }
.js .hero-anim:nth-child(3) { animation-delay: .16s; }
.js .hero-anim:nth-child(4) { animation-delay: .24s; }
.js .hero-anim:nth-child(5) { animation-delay: .32s; }
.js .flow.hero-anim { animation-delay: .35s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Tarjeta animada del flujo */
.flow {
  background: linear-gradient(180deg, var(--surface), #101010); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); max-width: 460px; width: 100%; justify-self: center;
}
.flow-head { display: flex; align-items: center; gap: 12px; font-size: .82rem; color: var(--muted); padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.flow-dots { display: flex; gap: 5px; }
.flow-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); }
.flow-head > span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.flow-live { margin-left: auto; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; }
.flow-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.flow-steps { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 8px; position: relative; }
.flow-steps li {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; font-size: .9rem;
  border: 1px solid var(--border); background: var(--bg); color: var(--muted);
  animation: flowstep 6s calc(var(--i) * .9s + 1s) infinite both;
}
.flow-steps li > .icon { color: var(--muted); }
.flow-steps li span { flex: 1; }
.flow-steps b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border-2); color: transparent; transition: inherit; }
.flow-steps b .icon { width: 14px; height: 14px; stroke-width: 2.5; }
.flow-steps li { --on: 0; }
@keyframes flowstep {
  0%, 6%   { border-color: var(--border); color: var(--muted); }
  12%, 80% { border-color: rgba(242, 194, 48, .45); color: var(--text); background: rgba(242, 194, 48, .05); }
  92%, 100%{ border-color: var(--border); color: var(--muted); }
}
.flow-steps li b { animation: flowcheck 6s calc(var(--i) * .9s + 1s) infinite both; }
@keyframes flowcheck {
  0%, 8%   { background: transparent; border-color: var(--border-2); color: transparent; }
  14%, 80% { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
  92%, 100%{ background: transparent; border-color: var(--border-2); color: transparent; }
}
.flow-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--border); }
.flow-foot small { display: block; color: var(--muted); font-size: .78rem; }
.flow-foot strong { display: inline-flex; align-items: center; gap: 8px; font-size: 1.25rem; letter-spacing: -.02em; }
.flow-foot strong .icon { width: 1em; height: 1em; color: var(--muted); }
.flow-note { font-style: italic; opacity: .7; }
@media (max-width: 959px) { .flow { max-width: 520px; } }

/* ---------- Secciones ---------- */
.section { padding: 80px 0; }
@media (min-width: 960px) { .section { padding: 112px 0; } }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.kicker { color: var(--accent); font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px; text-align: center; }
.section-title { font-size: clamp(1.75rem, 4.2vw, 2.6rem); font-weight: 800; text-align: center; max-width: 22ch; margin-left: auto; margin-right: auto; }
.section-sub { text-align: center; color: var(--muted); max-width: 600px; margin: 0 auto 48px; font-size: 1.05rem; }

.grid { display: grid; gap: 16px; margin-top: 48px; }
.section-sub + .grid, .section-sub + .steps { margin-top: 0; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px;
  transition: border-color .25s, transform .25s, background-color .25s;
}
.card:hover { border-color: rgba(242, 194, 48, .5); transform: translateY(-3px); background: var(--surface-2); }
.card h3 { font-size: 1.12rem; }
.card p { color: var(--muted); margin: 0; font-size: .97rem; }
.card-icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; border-radius: 10px;
  border: 1px solid var(--border-2); color: var(--accent); transition: background-color .25s, color .25s, border-color .25s;
}
.card:hover .card-icon { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.card-compact { padding: 24px; }

.benefit { padding: 28px 24px; border-top: 1px solid var(--border-2); transition: border-color .25s; }
.benefit:hover { border-top-color: var(--accent); }
.benefit > .icon { width: 28px; height: 28px; color: var(--accent); margin-bottom: 16px; }
.benefit h3 { font-size: 1.1rem; }
.benefit p { margin: 0; color: var(--muted); font-size: .97rem; }

/* ---------- Pasos ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 28px; transition: border-color .25s, transform .25s; }
.step:hover { border-color: rgba(242, 194, 48, .5); transform: translateY(-3px); }
.step-num { display: block; font-size: 2.6rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; margin-bottom: 20px; color: transparent; -webkit-text-stroke: 1px var(--accent); transition: color .25s; }
.step:hover .step-num { color: var(--accent); }
.step p { color: var(--muted); margin: 0; }

/* ---------- Banda CTA ---------- */
.cta-band { padding: 0; }
.cta-band-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px;
  margin-top: -1px; padding: 36px 20px; border-bottom: 1px solid var(--border);
}
.cta-band p { margin: 0; font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.cta-band strong { color: var(--text); font-weight: 600; }
@media (max-width: 640px) { .cta-band-inner { flex-direction: column; text-align: center; } .cta-band .btn { width: 100%; } }

/* ---------- FAQ ---------- */
.faq { margin-top: 40px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer; font-weight: 600; padding: 22px 4px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  transition: color .2s;
}
.faq summary:hover { color: var(--accent); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; font-weight: 300; line-height: 1; color: var(--accent); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 4px 22px; margin: 0; }
.faq-cta { margin-top: 40px; text-align: center; }
.faq-cta p { color: var(--muted); }

/* ---------- Contacto / formulario ---------- */
.contact-inner { display: grid; gap: 48px; align-items: start; }
@media (min-width: 960px) { .contact-inner { grid-template-columns: .9fr 1.1fr; gap: 72px; } .contact-copy { position: sticky; top: calc(var(--header-h) + 32px); } }
.contact-copy .kicker, .contact-copy .section-title, .contact-copy .section-sub { text-align: left; margin-left: 0; }
.contact-copy .section-sub { margin-bottom: 28px; }
.checklist { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: center; }
.checklist .icon { color: var(--accent-ink); background: var(--accent); border-radius: 50%; padding: 4px; width: 22px; height: 22px; stroke-width: 3; }
.direct { padding-top: 24px; border-top: 1px solid var(--border); display: grid; gap: 10px; justify-items: start; }
.direct p { margin: 0 0 4px; color: var(--muted); font-size: .92rem; }
.direct a { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 500; transition: color .2s; }
.direct a .icon { color: var(--accent); }
.direct a:hover { color: var(--accent); }

.form { background: var(--surface); border-radius: 16px; padding: 24px; border: 1px solid var(--border); }
@media (min-width: 600px) { .form { padding: 36px; } }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; min-width: 0; }
.field-row { display: grid; gap: 0 16px; }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }
label { font-weight: 500; font-size: .9rem; color: var(--text); }
.optional { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: var(--bg);
  border: 1px solid var(--border-2); border-radius: 10px; padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
input::placeholder, textarea::placeholder { color: #6b6a65; }
input:hover, select:hover, textarea:hover { border-color: #4a4a4a; }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23f2c230' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; }
select option { background: var(--surface); color: var(--text); }
textarea { resize: vertical; min-height: 110px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: #0d0d0d; }
.invalid { border-color: var(--error) !important; }
.field-error { color: var(--error); font-size: .84rem; }

/* Tooltip informativo (hover y foco) */
.label-row { display: flex; align-items: center; gap: 8px; }
.tip {
  position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; border-radius: 50%;
  border: 1px solid var(--border-2); background: transparent; color: var(--muted); font: 600 .7rem/1 var(--font); font-style: italic; cursor: help;
  transition: border-color .2s, color .2s;
}
.tip:hover, .tip:focus-visible { border-color: var(--accent); color: var(--accent); }
.tip-text {
  position: absolute; z-index: 5; bottom: calc(100% + 10px); left: 50%; width: max-content; max-width: 240px;
  padding: 10px 12px; border-radius: 8px; background: var(--text); color: var(--bg);
  font: 400 .82rem/1.45 var(--font); font-style: normal; text-align: left; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  opacity: 0; visibility: hidden; transform: translate(-50%, 4px); transition: opacity .2s, transform .2s, visibility .2s; pointer-events: none;
}
.tip-text::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--text); }
.tip:hover .tip-text, .tip:focus .tip-text { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
@media (max-width: 600px) {
  /* En móvil el aviso ocupa el ancho del campo para no salirse de la pantalla */
  .label-row { position: relative; }
  .tip { position: static; }
  .tip-text { left: 0; right: 0; width: auto; max-width: none; bottom: calc(100% + 8px); transform: translateY(4px); }
  .tip-text::after { display: none; }
  .tip:hover .tip-text, .tip:focus .tip-text { transform: none; }
}

.consent { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; color: var(--muted); margin: 6px 0 20px; cursor: pointer; font-size: .92rem; }
.consent input { width: 18px; height: 18px; margin-top: 2px; padding: 0; flex: none; accent-color: var(--accent); cursor: pointer; }
.consent.invalid-consent span { color: var(--error); }

.cf-turnstile { margin-bottom: 20px; min-height: 65px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin: 14px 0 0; font-weight: 500; text-align: center; min-height: 1.4em; font-size: .92rem; }
.form-status.error { color: var(--error); }

.form-success { text-align: center; padding: 32px 8px; }
.form-success .tick { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 20px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.form-success .tick .icon { width: 30px; height: 30px; stroke-width: 2.5; }
.form-success p { color: var(--muted); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; font-size: .9rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.logo-small { font-size: 1.05rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.footer-links a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--accent); }
.footer-links .icon { width: 1.05em; height: 1.05em; }
.copy { margin: 0; width: 100%; font-size: .82rem; color: #6b6a65; }

/* ---------- CTA fijo en móvil ---------- */
.mobile-cta { display: none; }
@media (max-width: 759px) {
  .mobile-cta {
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; gap: 10px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(10, 10, 10, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--border);
    transform: translateY(110%); transition: transform .3s ease;
  }
  .mobile-cta.visible { transform: none; }
  .mobile-cta .btn { flex: 1; }
  .btn-call { display: grid; place-items: center; width: 50px; flex: none; border-radius: 10px; border: 1px solid var(--border-2); color: var(--accent); }
  .site-footer { padding-bottom: calc(40px + 76px); }
  .header-actions .btn-small { padding: 8px 12px; font-size: .85rem; }
}

/* ---------- Aparición al hacer scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
.grid .reveal:nth-child(2), .steps .reveal:nth-child(2) { transition-delay: .08s; }
.grid .reveal:nth-child(3), .steps .reveal:nth-child(3) { transition-delay: .16s; }
.grid .reveal:nth-child(4) { transition-delay: .24s; }
.grid .reveal:nth-child(5) { transition-delay: .08s; }
.grid .reveal:nth-child(6) { transition-delay: .16s; }
.js .card.reveal.in, .js .step.reveal.in { transition: opacity .7s ease, transform .25s, border-color .25s, background-color .25s; }

/* ---------- Página legal ---------- */
.legal { padding: 56px 0 96px; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.legal h2 { font-size: 1.2rem; margin-top: 2.2em; }
.legal p { color: var(--muted); }
.legal .placeholder { background: var(--accent-soft); color: var(--accent); padding: 0 4px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .hero-anim, .js .reveal { opacity: 1; transform: none; }
}
