/* ============================================================
   Fuego Ancestral — hoja de estilos
   Paleta derivada de la multimedia real del sitio (k-means).
   ============================================================ */

:root {
  --bg: #140a0a;
  --surface: #211512;
  --surface-2: #2d1c18;
  --ember: #c7471f;
  --ember-light: #e06a3c;
  --ruby: #7a1f17;
  --ruby-light: #9c2c1f;
  --ivory: #f0ebe6;
  --ivory-dim: #d9cfc7;
  --stone: #a6978c;
  --stone-dim: #6f6259;
  --mist: #b9c2d4;
  --mist-dim: #7e8699;
  --border: rgba(240, 235, 230, 0.12);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Karla", "Segoe UI", Helvetica, Arial, sans-serif;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  text-wrap: balance;
  margin: 0 0 0.5em;
  color: var(--ivory);
}

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 500; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }

p { margin: 0 0 1em; color: var(--ivory-dim); max-width: 62ch; }

a { color: inherit; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember-light);
  font-weight: 700;
  display: inline-block;
  margin-bottom: 1em;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: 24px;
}

section { padding-block: clamp(64px, 10vw, 120px); position: relative; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
  padding: 16px 30px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--ember), var(--ruby));
  color: var(--ivory);
  box-shadow: 0 12px 30px rgba(199, 71, 31, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(199, 71, 31, 0.45); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; transform: none; }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--ivory);
}
.btn-ghost:hover { border-color: var(--stone); }

.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- header ---------- */
header.site {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 18px 0;
  background: linear-gradient(to bottom, rgba(10, 6, 6, 0.85), transparent);
  backdrop-filter: blur(2px);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  color: var(--ivory);
  text-decoration: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.brand-mark { height: 38px; width: auto; display: block; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text em { font-style: normal; font-family: var(--font-body); font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--stone); margin-top: 3px; }
header.site .btn { padding: 11px 22px; font-size: 0.92rem; }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  position: relative;
  padding-top: 140px;
  padding-bottom: clamp(48px, 8vw, 90px);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media video, .hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
}
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(10, 6, 6, 0.96) 0%, rgba(10, 6, 6, 0.55) 45%, rgba(10, 6, 6, 0.35) 100%),
    linear-gradient(to right, rgba(10, 6, 6, 0.55) 0%, rgba(10, 6, 6, 0.1) 45%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-content { max-width: 640px; }
.hero p.lead { color: var(--ivory-dim); font-size: 1.12rem; max-width: 46ch; }
.hero-cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 28px; }
.trust-line { font-size: 0.86rem; color: var(--stone); display: flex; align-items: center; flex-wrap: wrap; gap: 8px; max-width: 360px; row-gap: 6px; }
.trust-line .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ember-light); flex-shrink: 0; }
.age-badge {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: "Karla", sans-serif; font-weight: 800; font-size: 0.68rem; letter-spacing: 0.02em;
  line-height: 1; padding: 3px 7px;
  color: var(--ivory);
  background: linear-gradient(135deg, var(--ember), var(--ruby));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
}

/* ---------- reconocimiento ---------- */
.recon { background: var(--surface); }
.recon .grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.recon figure { margin: 0; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); position: relative; aspect-ratio: 6/5; }
.recon figure::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(200deg, rgba(199,71,31,0.18), rgba(10,6,6,0.25));
}
.recon figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- proceso ---------- */
.proceso { background: var(--bg); }
.scroll-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  font-family: var(--font-body);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
}
.scroll-hint svg { width: 15px; height: 15px; flex-shrink: 0; animation: hint-nudge 1.6s ease-in-out infinite; }
@keyframes hint-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}
.proceso .steps {
  display: flex;
  gap: 22px;
  margin-top: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 24px;
  padding-bottom: 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--ember) transparent;
  mask-image: linear-gradient(to right, black calc(100% - 56px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 56px), transparent 100%);
}
.proceso .steps::-webkit-scrollbar { height: 6px; }
.proceso .steps::-webkit-scrollbar-track { background: transparent; }
.proceso .steps::-webkit-scrollbar-thumb { background: var(--ember); border-radius: 999px; }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  position: relative;
  flex: 0 0 auto;
  width: min(300px, 78vw);
  scroll-snap-align: start;
}
.step .num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--ember);
  opacity: 0.55;
  line-height: 1;
  margin-bottom: 14px;
}
.step h3 { margin-bottom: 8px; }
.step p { font-size: 0.95rem; margin: 0; }

/* ---------- testimonios ---------- */
.testimonios { background: var(--surface); }
.testimonios .track {
  display: flex;
  gap: 24px;
  margin-top: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 24px;
  padding-bottom: 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--ember) transparent;
  mask-image: linear-gradient(to right, black calc(100% - 56px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 56px), transparent 100%);
}
.testimonios .track::-webkit-scrollbar { height: 6px; }
.testimonios .track::-webkit-scrollbar-track { background: transparent; }
.testimonios .track::-webkit-scrollbar-thumb { background: var(--ember); border-radius: 999px; }
.testimonial-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 30px 26px 26px;
  flex: 0 0 auto;
  width: min(380px, 85vw);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}
.testimonial-card .quote-mark {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--ember);
  opacity: 0.5;
  line-height: 1;
  margin-bottom: 4px;
}
.testimonial-card h3 { font-size: 1.08rem; margin-bottom: 12px; line-height: 1.3; }
.testimonial-card p { font-size: 0.92rem; margin-bottom: 20px; flex: 1; }
.testimonial-card .who {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.testimonial-card .name { font-weight: 700; color: var(--ivory); font-size: 0.92rem; }
.testimonial-card .name .loc { font-weight: 400; color: var(--stone); }
.testimonial-card .svc {
  align-self: flex-start;
  font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--mist); border: 1px solid rgba(185,194,212,0.3); border-radius: 999px;
  padding: 4px 12px;
}

/* ---------- servicios ---------- */
.servicios { background: var(--surface); }
.servicios .grid-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px;
}
.service-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.service-card .img-wrap { aspect-ratio: 16/10; overflow: hidden; position: relative; }
.service-card .img-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.service-card:hover .img-wrap img { transform: scale(1.06); }
.service-card .img-wrap::after { content:""; position:absolute; inset:0; background: linear-gradient(to top, rgba(20,10,10,0.75), transparent 55%); }
.service-card .body { padding: 22px 22px 26px; flex: 1; display: flex; flex-direction: column; }
.service-card h3 { margin-bottom: 10px; }
.service-card p { font-size: 0.94rem; flex: 1; }
.service-card--icon { justify-content: flex-start; }
.service-card--icon .icon-wrap {
  aspect-ratio: 16/10;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, rgba(199,71,31,0.22), rgba(122,31,23,0.3));
  color: var(--ember-light);
}
.service-card .tag {
  align-self: flex-start;
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mist); border: 1px solid rgba(185,194,212,0.3); border-radius: 999px;
  padding: 4px 12px; margin-top: 10px;
  text-decoration: none; cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.service-card .tag:hover,
.service-card .tag:focus-visible {
  color: var(--ember-light); border-color: var(--ember-light);
  background: rgba(199,71,31,0.12);
}

/* ---------- video emocional ---------- */
.video-emocional {
  min-height: 86vh;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  text-align: center;
  overflow: hidden;
}
.video-emocional .hero-media::after {
  background: linear-gradient(to top, rgba(10,6,6,0.9), rgba(10,6,6,0.35) 50%, rgba(10,6,6,0.55));
}
.video-emocional .content { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; padding-inline: 24px; }
.video-emocional p.lead { margin: 0 auto 30px; font-size: 1.15rem; }
.video-emocional h2 { margin-bottom: 0.4em; }

/* ---------- FAQ ---------- */
.faq { background: var(--bg); }
.faq .list { margin-top: 44px; border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 4px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  font-family: var(--font-display);
  font-size: 1.12rem;
  color: var(--ivory);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .icon { flex-shrink: 0; width: 22px; height: 22px; position: relative; }
.faq-item .icon::before, .faq-item .icon::after {
  content: ""; position: absolute; background: var(--ember-light); border-radius: 2px;
}
.faq-item .icon::before { width: 100%; height: 2px; top: 50%; left: 0; transform: translateY(-50%); }
.faq-item .icon::after { width: 2px; height: 100%; left: 50%; top: 0; transform: translateX(-50%); transition: transform 0.25s ease; }
.faq-item[open] .icon::after { transform: translateX(-50%) rotate(90deg); opacity: 0; }
.faq-item .a { padding: 0 4px 24px; max-width: 65ch; }

/* ---------- confianza ---------- */
.confianza { background: var(--surface); }
.confianza .grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center; }
.confianza figure { margin: 0; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); position: relative; aspect-ratio: 4/5; }
.confianza figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.trust-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 18px; }
.trust-points li { display: flex; gap: 14px; align-items: flex-start; }
.trust-points .ico {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px;
  background: rgba(199,71,31,0.16); border: 1px solid rgba(199,71,31,0.35);
  display: flex; align-items: center; justify-content: center; color: var(--ember-light);
}
.trust-points span.txt { color: var(--ivory-dim); font-size: 0.96rem; }
.disclaimer-box {
  margin-top: 32px; padding: 18px 20px; border-radius: 12px;
  background: rgba(185,194,212,0.07); border: 1px solid rgba(185,194,212,0.22);
}
.disclaimer-box p { font-size: 0.86rem; color: var(--mist); margin: 0; }

/* ---------- CTA final ---------- */
.cta-final {
  min-height: 80vh;
  display: flex; align-items: center; justify-content: center;
  position: relative; text-align: center; overflow: hidden;
}
.cta-final .content { position: relative; z-index: 1; max-width: 620px; margin: 0 auto; padding-inline: 24px; }
.cta-final .btn-primary { font-size: 1.08rem; padding: 18px 36px; }

/* ---------- footer ---------- */
footer.site {
  background: #0c0706;
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
}
footer.site .wrap { display: flex; flex-direction: column; gap: 22px; }
footer .top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
footer nav a { color: var(--stone); text-decoration: none; font-size: 0.9rem; }
footer nav a:hover { color: var(--ivory); }
footer .legal { font-size: 0.78rem; color: var(--stone-dim); line-height: 1.7; }
footer .legal.credit { opacity: 0.8; }
footer .credit-link { color: inherit; text-decoration: underline; text-decoration-color: var(--ember); text-underline-offset: 2px; }
footer .credit-link:hover { color: var(--ember-light); text-decoration-color: var(--ember-light); }

/* ---------- whatsapp flotante ---------- */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #25d366;
  color: #04381f;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  transition: transform 0.18s ease;
}
.whatsapp-float:hover { transform: scale(1.06); }
.wa-icon { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; animation: wa-heartbeat 2.4s ease-in-out 16s infinite; }
.whatsapp-float svg { width: 32px; height: 32px; }
.whatsapp-float-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25d366;
  animation: wa-pulse 2.2s ease-out infinite;
}
@keyframes wa-pulse {
  0% { transform: scale(1); opacity: 0.55; }
  80% { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}
@keyframes wa-heartbeat {
  0% { transform: scale(1); }
  14% { transform: scale(1.12); }
  28% { transform: scale(1); }
  42% { transform: scale(1.08); }
  56% { transform: scale(1); }
  100% { transform: scale(1); }
}

/* mensaje de aviso: "escribiendo..." -> burbuja de texto, en bucle */
.wa-bubble {
  position: absolute;
  right: calc(100% + 14px);
  bottom: 6px;
  width: max-content;
  max-width: 210px;
  background: var(--surface-2);
  color: var(--ivory);
  border: 1px solid var(--border);
  border-radius: 14px 14px 4px 14px;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  line-height: 1.35;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px) scale(0.92);
  transform-origin: bottom right;
  animation: wa-bubble-cycle 11s ease-in-out 4.5s 1 forwards;
  pointer-events: none;
}
.wa-bubble-tail {
  position: absolute;
  right: -5px;
  bottom: 12px;
  width: 11px; height: 11px;
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(-45deg);
}
.wa-bubble-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  height: 14px;
  animation: wa-typing-cycle 11s ease-in-out 4.5s 1 forwards;
}
.wa-bubble-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--stone);
  animation: wa-dot-bounce 1s ease-in-out infinite;
}
.wa-bubble-typing span:nth-child(2) { animation-delay: 0.15s; }
.wa-bubble-typing span:nth-child(3) { animation-delay: 0.3s; }
.wa-bubble-text {
  display: block;
  opacity: 0;
  animation: wa-text-cycle 11s ease-in-out 4.5s 1 forwards;
}
@keyframes wa-dot-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}
@keyframes wa-bubble-cycle {
  0% { opacity: 0; transform: translateY(8px) scale(0.92); }
  8%, 88% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(8px) scale(0.92); }
}
@keyframes wa-typing-cycle {
  0%, 8% { opacity: 0; }
  12%, 30% { opacity: 1; }
  34%, 100% { opacity: 0; }
}
@keyframes wa-text-cycle {
  0%, 34% { opacity: 0; }
  40%, 88% { opacity: 1; }
  100% { opacity: 0; }
}

/* insignia roja "1" — aparece una vez tras el primer mensaje y queda fija */
.wa-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 22px; height: 22px; padding: 0 5px;
  border-radius: 999px;
  background: #e3342f;
  color: #fff;
  font-family: var(--font-body); font-weight: 800; font-size: 0.72rem;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
  z-index: 2;
  opacity: 0;
  transform: scale(0.3);
  animation: wa-badge-in 0.45s cubic-bezier(.34,1.56,.64,1) 16s forwards;
}
@keyframes wa-badge-in {
  to { opacity: 1; transform: scale(1); }
}
@media (max-width: 480px) {
  .whatsapp-float { width: 56px; height: 56px; right: 14px; bottom: 14px; }
  .whatsapp-float svg { width: 28px; height: 28px; }
  .wa-bubble { max-width: 165px; font-size: 0.76rem; padding: 8px 12px; }
  .wa-badge { min-width: 19px; height: 19px; font-size: 0.65rem; top: -2px; right: -2px; }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-float-ring { animation: none; display: none; }
  .wa-bubble, .wa-bubble-typing, .wa-bubble-text, .wa-bubble-typing span { animation: none; }
  .wa-bubble { display: none; }
  .wa-icon { animation: none; }
  .wa-badge { animation: none; opacity: 1; transform: scale(1); }
  .scroll-hint svg { animation: none; }
}

/* ---------- turnstile overlay ---------- */
#verif-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(10, 6, 6, 0.88);
  display: none;
  align-items: center; justify-content: center;
  text-align: center;
  backdrop-filter: blur(3px);
}
#verif-overlay.show { display: flex; }
#verif-overlay .box {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 36px 40px; max-width: 320px;
}
#verif-overlay .spinner {
  width: 40px; height: 40px; margin: 0 auto 18px;
  border: 3px solid rgba(240,235,230,0.15); border-top-color: var(--ember-light);
  border-radius: 50%; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#verif-overlay p { color: var(--ivory-dim); font-size: 0.92rem; margin: 0; }
#verif-overlay.blocked .spinner { display: none; }
#verif-overlay.blocked p { color: var(--ember-light); }

/* ---------- utils ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--ember); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 1000;
}
.skip-link:focus { left: 0; }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .recon .grid, .confianza .grid { grid-template-columns: 1fr; gap: 32px; }
  .confianza figure { order: 2; }
  .servicios .grid-cards { grid-template-columns: 1fr; }
  section { padding-block: 56px; }
}
@media (max-width: 480px) {
  .hero { align-items: flex-end; padding-top: 110px; }
  .hero-cta-row { flex-direction: column; align-items: flex-start; }
  header.site .btn span.btn-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
