/*
 * Intro de la primera visita, a pantalla completa. La crea splash.js (primer
 * script del <body>): sin script no existe y la web se carga debajo.
 * Abre el logo fr↗ y «Webs para…» gira por los rubros hasta «tu negocio.».
 * Al salir, el logo vuela a su lugar en el menú y «tu negocio.» se acomoda
 * como la primera línea del título mientras se aclara el fondo.
 * Solo la primera visita; con «reducir movimiento» no aparece.
 */
:root{--sp-ease:cubic-bezier(.23,1,.32,1);--sp-ease-in-out:cubic-bezier(.77,0,.175,1)}
.splash{position:fixed;inset:0;z-index:1000;overflow:hidden;color:#fff;cursor:pointer}
.sp-bg{position:absolute;inset:0;background:#14201b}
.splash-skip{position:absolute;z-index:3;right:18px;bottom:max(18px,env(safe-area-inset-bottom));padding:8px 12px;border:1px solid #ffffff33;border-radius:8px;background:none;color:#ffffffb3;font:500 13px/1 Inter,sans-serif;opacity:0}

/* Logo */
.sp-mark{position:fixed;z-index:1001;pointer-events:none;left:50%;top:27%;width:clamp(76px,10vw,104px);aspect-ratio:1;translate:-50% -50%;display:flex;align-items:center;justify-content:center;border-radius:24%;background:#0f6a4b;color:#fff;font:750 clamp(34px,4.4vw,46px)/1 Manrope,sans-serif;letter-spacing:-.08em;opacity:0}
.sp-mark span{font-size:.4em;align-self:flex-start;margin-top:24%;letter-spacing:0}
.sp-mark::after{content:'';position:absolute;inset:-10px;border:2px solid #ffc857;border-radius:30%;opacity:0}

/* Ruleta */
.sp-copy{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.1em;font:650 clamp(34px,6.4vw,84px)/1.1 Manrope,sans-serif;letter-spacing:-.05em;text-align:center}
.sp-copy>p{margin:0;clip-path:inset(0 0 100% 0)}
.sp-slot{height:1.15em;overflow:hidden;mask-image:linear-gradient(transparent,#000 18%,#000 90%,transparent)}
.sp-list{margin:0;padding:0;list-style:none}
.sp-list li{margin:0;padding:0;height:1.15em;line-height:1.15em;color:#ffffffa6}
.sp-list li:last-child{color:#ffc857}

/* «tu negocio.» que vuela al título */
.sp-fly{position:fixed;z-index:1001;left:0;top:0;margin:0;white-space:nowrap;pointer-events:none;font:650 clamp(34px,6.4vw,84px)/1 Manrope,sans-serif;letter-spacing:-.055em;color:#ffc857;transform-origin:0 0;transition:color .5s ease}
.sp-fly.land{color:#14201b}

@media(prefers-reduced-motion:no-preference){
  .splash.play .splash-skip{animation:sp-fade .3s ease .4s both}
  .splash.out .splash-skip{animation:sp-fade-out .2s ease both}
  .sp-mark.play{animation:sp-mark .5s var(--sp-ease) .05s both}
  .sp-mark.play::after{animation:sp-ring .7s var(--sp-ease) .2s both}
  .splash.play .sp-copy>p{animation:sp-rise .45s var(--sp-ease) .4s both}
  .splash.play .sp-slot{animation:sp-fade .3s ease .5s both}
  .splash.play .sp-list{animation:sp-spin 1.5s cubic-bezier(.65,0,.2,1) .65s both}
  .splash.out .sp-copy{animation:sp-fade-out .18s ease both}
  .splash.out .sp-bg{animation:sp-fade-out .6s ease .1s both}
  /* Las otras dos líneas del título suben mientras cae la primera. */
  .splash-landing #hero h1 .line:not(:first-child){animation:sp-line .45s var(--sp-ease) both;animation-delay:calc(.15s + var(--k,0)*.1s)}
  .splash-landing #hero h1 .line:nth-child(3){--k:1}
}
@keyframes sp-fade{from{opacity:0}to{opacity:1}}
@keyframes sp-fade-out{to{opacity:0}}
@keyframes sp-rise{to{clip-path:inset(-10% -5% -20% -5%)}}
@keyframes sp-line{from{clip-path:inset(0 0 100% 0)}to{clip-path:inset(-10% -5% -20% -5%)}}
@keyframes sp-mark{from{opacity:0;transform:scale(.86) rotate(-8deg)}to{opacity:1;transform:none}}
@keyframes sp-ring{0%{opacity:0;transform:scale(.9)}40%{opacity:1}100%{opacity:0;transform:scale(1.35)}}
@keyframes sp-spin{to{transform:translateY(calc(-1.15em * var(--steps)))}}

/* Mientras dura, el logo del menú y el título esperan a los de la intro. */
.splash-on .nav .monogram,.splash-on #hero h1{visibility:hidden}
.splash-on.splash-landing #hero h1{visibility:visible}
.splash-on.splash-landing #hero h1 .line:first-child{visibility:hidden}
