/* EFECTOS — elegantes y sobrios; se desactivan con «reducir movimiento» del sistema */

/* Cabecera transparente sobre la portada que se vuelve sólida al bajar */
body.home .site-header { position: fixed; left: 0; right: 0; top: 0; background: linear-gradient(rgba(20, 6, 38, .55), rgba(20, 6, 38, 0)); border-bottom-color: transparent; backdrop-filter: none; transition: background .35s ease, box-shadow .35s ease, border-color .35s ease; }
body.home .site-header.scrolled { background: rgba(30, 10, 56, .94); backdrop-filter: blur(10px); border-bottom-color: var(--gold); box-shadow: 0 8px 26px rgba(20, 6, 38, .35); }
body.home .site-header .wrap { transition: padding .35s ease; }
body.home .site-header.scrolled .wrap { padding-top: 6px; padding-bottom: 6px; }
body.home .hero .wrap { padding-top: 170px; }

/* Barra de progreso de lectura */
#progreso { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 60; background: linear-gradient(90deg, #A07A30, var(--gold), #F1D58E); box-shadow: 0 0 10px rgba(201, 163, 78, .7); }

/* Botón volver arriba */
#arriba { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--deep); font-weight: 700; font-size: 20px; text-decoration: none; box-shadow: 0 8px 20px rgba(36, 15, 66, .35); opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .3s, transform .3s; z-index: 50; }
#arriba.show { opacity: 1; transform: none; pointer-events: auto; }

/* Portada: fondo con zoom lento, polvo dorado y textos que suben */
.hero { isolation: isolate; }
.hero-bg { position: absolute; inset: -3%; z-index: -2; background-image: inherit; background-size: cover; background-position: center 35%; animation: kenburns 26s ease-in-out infinite alternate; will-change: transform; }
.hero-dust { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }
@keyframes kenburns { from { transform: scale(1) translate3d(0, 0, 0); } to { transform: scale(1.09) translate3d(-1.5%, -1%, 0); } }
.js [data-rise] { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.hero h1 em { background: linear-gradient(100deg, #C9A34E 20%, #F6E2A6 40%, #C9A34E 60%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 5s ease-in-out 1.6s infinite; }
@keyframes shine { 0%, 60% { background-position: 100% 0; } 100% { background-position: -120% 0; } }

/* Medallón: flota, respira y tiene un anillo dorado que gira */
.hero-visual img { animation: floaty 7s ease-in-out 1.4s infinite, pop 1.1s cubic-bezier(.2, .9, .3, 1.2) .35s both; }
.hero-visual::after { content: ""; position: absolute; width: min(400px, 92%); aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed rgba(201, 163, 78, .55); animation: spin 60s linear infinite; }
.hero-visual::before { animation: breathe 4.5s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }

/* Franja de valores que se monta sobre la portada */
.values { position: relative; z-index: 3; margin-top: -58px; }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.value { display: flex; gap: 14px; align-items: flex-start; background: rgba(255, 253, 249, .97); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: 0 18px 40px rgba(36, 15, 66, .14); }
.value svg { flex: none; width: 40px; height: 40px; padding: 8px; border-radius: 12px; background: linear-gradient(140deg, var(--deep), var(--brand)); stroke: var(--gold); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.value b { display: block; font-family: var(--serif); color: var(--ink); font-size: 19px; }
.value span { font-size: 15px; }
#servicios { padding-top: 72px; }

/* Aparición al hacer scroll (solo si hay JavaScript) */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }
.section-head .rule { transform-origin: left; }
.js .section-head[data-reveal] .rule { transform: scaleX(0); transition: transform .9s cubic-bezier(.2, .7, .2, 1) .3s; }
.js .section-head[data-reveal].in .rule { transform: scaleX(1); }

/* Tarjetas de servicios: ícono, elevación y borde dorado que crece */
.card { position: relative; overflow: hidden; border-top: 1px solid var(--line); transition: transform .35s ease, box-shadow .35s ease, border-color .35s, opacity .8s, transform .8s; }
.card::before { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 38%; background: linear-gradient(90deg, var(--gold), #F1D58E); transition: width .5s ease; }
.card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(36, 15, 66, .14); border-color: #D9C49A; }
.card:hover::before { width: 100%; }
.js .card.in:hover { transform: translateY(-6px); transition-delay: 0s; transition-duration: .35s; }
.js .step.in:hover { transform: translateX(4px); transition-delay: 0s; transition-duration: .3s; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ico { width: 48px; height: 48px; padding: 10px; border-radius: 14px; background: linear-gradient(140deg, var(--deep), var(--brand)); stroke: var(--gold); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s ease; }
.card:hover .ico { transform: rotate(-6deg) scale(1.06); }

/* Botones con destello */
.btn { position: relative; overflow: hidden; }
.btn-gold::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg); transition: left .7s ease; }
.btn-gold:hover::after { left: 130%; }
.hero .actions .btn-gold { animation: glow 3.2s ease-in-out 2s infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 6px 18px rgba(201, 163, 78, .35); } 50% { box-shadow: 0 6px 30px rgba(201, 163, 78, .7); } }

/* Pasos unidos por una línea dorada */
.steps { position: relative; }
.steps::before { content: ""; position: absolute; left: 45px; top: 40px; bottom: 40px; width: 2px; background: linear-gradient(var(--gold), rgba(201, 163, 78, .15)); }
.step { position: relative; transition: transform .3s ease, box-shadow .3s ease, opacity .8s; }
.step:hover { transform: translateX(4px); box-shadow: 0 12px 26px rgba(36, 15, 66, .09); }
.price-box { overflow: hidden; }
.price-box::after { content: ""; position: absolute; width: 260px; height: 260px; right: -90px; top: -90px; border-radius: 50%; background: radial-gradient(circle, rgba(201, 163, 78, .28), transparent 70%); pointer-events: none; }

/* Preguntas frecuentes con apertura suave */
.faq details { transition: border-color .3s, box-shadow .3s, opacity .8s, transform .8s; }
.faq details[open] { border-color: #D9C49A; box-shadow: 0 10px 24px rgba(36, 15, 66, .07); }
.faq details[open] p { animation: rise .45s ease both; }

/* Fondos fijos (parallax) en escritorio */
@media (min-width: 921px) and (hover: hover) { .cta-band, .about-photo { background-attachment: fixed; } }

/* Charlas: brillo sutil */
.talks { position: relative; overflow: hidden; }
.talks::after { content: ""; position: absolute; width: 420px; height: 420px; left: -140px; bottom: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(201, 163, 78, .22), transparent 70%); pointer-events: none; }

@media (max-width: 920px) {
  body.home .hero .wrap { padding-top: 110px; }
  .values { margin-top: -40px; }
  .values-grid { grid-template-columns: 1fr; gap: 12px; }
  .hero-visual::after { width: 250px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg, .hero-visual img, .hero-visual::after, .hero-visual::before, .js [data-rise], .hero h1 em, .hero .actions .btn-gold { animation: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero h1 em { color: var(--gold); background: none; }
  .hero-dust { display: none; }
}

/* ===== Portada con más fluidez (21-11-2026) ===== */
/* 1 · Profundidad al bajar: los edificios avanzan más lento que el texto, que sube y se desvanece */
.fx-depth .hero-bg { animation: none; transform: translate3d(0, var(--fx-bg, 0px), 0) scale(calc(1.06 + var(--fx-p, 0) * .06)); }
.fx-depth .hero .wrap > div { transform: translate3d(0, var(--fx-txt, 0px), 0); opacity: var(--fx-op, 1); will-change: transform, opacity; }
.fx-depth .hero-card { translate: 0 var(--fx-card, 0px); }
.fx-depth .hero::before { background: linear-gradient(180deg, rgba(14, 6, 26, calc(.55 + var(--fx-p, 0) * .25)) 0%, rgba(14, 6, 26, calc(var(--fx-p, 0) * .55)) 40%, rgba(14, 6, 26, calc(var(--fx-p, 0) * .55)) 70%, rgba(14, 6, 26, .65) 100%); }
/* 2 · Entrada cinematográfica: título palabra por palabra y línea dorada que se dibuja */
.fx-words .hero h1[data-rise] { animation: none; opacity: 1; transform: none; }
.fx-words .hero h1 .w { display: inline-block; opacity: 0; transform: translateY(.55em); filter: blur(6px); animation: fxWord .9s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(.35s + var(--i) * .09s); }
@keyframes fxWord { to { opacity: 1; transform: none; filter: blur(0); } }
.fx-words .hero .eyebrow::before { transform-origin: left; animation: fxLine 1.1s cubic-bezier(.2, .7, .2, 1) .2s both; }
@keyframes fxLine { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* Haz de luz dorada que cruza los edificios (solo con transform; se pausa fuera de la vista) */
.fx-sweep { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.fx-sweep::before { content: ""; position: absolute; top: -40%; bottom: -40%; left: 0; width: 28%; background: linear-gradient(90deg, transparent, rgba(241, 213, 142, .10) 40%, rgba(241, 213, 142, .18) 50%, rgba(241, 213, 142, .10) 60%, transparent); filter: blur(8px); transform: translateX(-160%) rotate(18deg); animation: fxSweep 11s ease-in-out 2.2s infinite; will-change: transform; }
@keyframes fxSweep { 0% { transform: translateX(-160%) rotate(18deg); } 45%, 100% { transform: translateX(470%) rotate(18deg); } }
.fx-paused .fx-sweep::before { animation-play-state: paused; }
/* Luz suave que sigue al mouse (solo computador) */
.fx-glow { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .6s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 40%), rgba(228, 204, 147, .14), transparent 70%); }
.hero:hover .fx-glow { opacity: 1; }
@media (hover: none) { .fx-glow { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .fx-words .hero h1 .w { animation: none; opacity: 1; transform: none; filter: none; }
  .fx-sweep, .fx-glow { display: none; }
}

/* Polvo dorado también en la franja «Asesoría por videollamada» */
.cta-band { isolation: isolate; overflow: hidden; }
.cta-dust { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.cta-band .wrap { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .cta-dust { display: none; } }
