/* Life for the whole page: entrances, hand-drawn lines, small loops. Same two inks and one red as landing.css; transforms, opacity and SVG strokes only.
   Every entrance runs once (landing.js / motion.js add `.in` when the block enters the screen). Hidden "before" states exist only with JS (`.js`),
   and reduced motion or the editor (`.calm-all`, `html.ed-on`) show the final state with no movement. */
@property --ms{syntax:'<percentage>';inherits:false;initial-value:320%}

/* ---------- hero ---------- */
.hero::before{translate:0 var(--hy,0px)}
/* the photo panel: ink-splash mask spreads from the centre, then the panel settles; the two slabs behind it slide out */
.frame img{-webkit-mask-image:url(img/blot-reveal.svg);mask-image:url(img/blot-reveal.svg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:var(--ms) var(--ms);mask-size:var(--ms) var(--ms);transition:--ms 1.5s cubic-bezier(.25,.7,.25,1)}
.js .frame.rv:not(.in){opacity:0}
.js .frame.rv:not(.in) img{--ms:0%}
.js .frame.rv.in{animation:settle 1.2s cubic-bezier(.2,.9,.3,1.1) both}
.frame::before{transition:transform .9s .55s cubic-bezier(.3,1.3,.5,1),opacity .4s .55s}
.js .frame.rv:not(.in)::before{transform:translate(0,0) rotate(0);opacity:0}
@keyframes settle{from{transform:rotate(-6deg) scale(.93) translateY(24px)}to{transform:rotate(1.4deg)}}
/* ink drips running down from the top edge of the panel */
.drip{position:absolute;z-index:2;top:0;left:var(--x);width:8px;height:var(--h,70px);margin-left:-4px;pointer-events:none;transform-origin:50% 0;transform:scaleY(0);opacity:0;
  background:radial-gradient(circle at 50% calc(100% - 5px),var(--gold-hi) 4.5px,transparent 5px),linear-gradient(var(--gold-hi),var(--gold-hi)) 50% 0/4px calc(100% - 8px) no-repeat;animation:drip 12s var(--d,0s) ease-in-out infinite paused}
.frame.in .drip{animation-play-state:running}
@keyframes drip{0%,6%{transform:scaleY(0);opacity:1}42%{transform:scaleY(1);opacity:1}66%{transform:scaleY(1);opacity:1}82%{transform:scaleY(1);opacity:0}100%{transform:scaleY(0);opacity:0}}

/* ---------- hand-drawn edges between sections ---------- */
.edge{position:relative;z-index:3;height:28px;margin:-14px 0;pointer-events:none}
.edge svg{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible}
.edge path{fill:none;stroke:var(--gold);stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:0;transition:stroke-dashoffset 1.5s cubic-bezier(.4,.1,.2,1)}
.js .edge:not(.in) path{stroke-dashoffset:1}
.zone{border-block:0}
.hero+.edge+.zone,.zone-y{border-top:0}

/* ---------- Así funciona ---------- */
.steps li{transition:opacity .7s var(--sd,0s),translate .7s var(--sd,0s) cubic-bezier(.2,.9,.3,1.1)}
.steps li:nth-child(2){--sd:.18s}
.steps li:nth-child(3){--sd:.36s}
.js .steps li.rv:not(.in){opacity:0;translate:0 30px}
.num{rotate:-4deg}
.js .steps li:not(.in) .num{opacity:0;scale:2.4;rotate:-20deg}
.steps li.in .num{animation:stamp .55s calc(var(--sd,0s) + .4s) cubic-bezier(.3,1.5,.5,1) both}
@keyframes stamp{0%{opacity:0;scale:2.4;rotate:-20deg}55%{opacity:1;scale:.86;rotate:5deg}100%{opacity:1;scale:1;rotate:-4deg}}
.js .steps li:not(.in) .bubble{scale:0;opacity:0}
.steps li.in .bubble{animation:bubble .6s calc(var(--sd,0s) + .85s) cubic-bezier(.3,1.6,.5,1) both}
@keyframes bubble{0%{scale:0;opacity:0}100%{scale:1;opacity:1}}
.bubble{transform-origin:20% 100%}
/* the hand-drawn dashed line that links the panels (desktop), vertical dashes on a phone */
.stepswrap{position:relative}
.flow{display:none}
.steps li:not(:last-child)::before{content:"";position:absolute;left:50%;top:100%;width:0;height:34px;border-left:3px dashed var(--gold);transform-origin:top;transition:transform .6s calc(var(--sd,0s) + .9s)}
.js .steps li:not(.in)::before{transform:scaleY(0)}
@media(min-width:820px){
  .steps li:not(:last-child)::before{display:none}
  .flow{display:block;position:absolute;left:0;top:-30px;width:100%;height:90px;overflow:visible;pointer-events:none;clip-path:inset(-20px 100% -20px 0)}
  .stepswrap.in .flow{clip-path:inset(-20px -4px -20px 0);transition:clip-path 1.6s .5s cubic-bezier(.4,.1,.2,1)}
  .flow path{fill:none;stroke:var(--gold-hi);stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:11 10}
  .flow .ar{stroke-dasharray:none}
}

/* ---------- precios ---------- */
.lista li{transition:opacity .5s calc(var(--n,0) * 80ms + .25s),translate .6s calc(var(--n,0) * 80ms + .25s) cubic-bezier(.2,.9,.3,1)}
.lista li:nth-child(2){--n:1}.lista li:nth-child(3){--n:2}.lista li:nth-child(4){--n:3}.lista li:nth-child(5){--n:4}.lista li:nth-child(6){--n:5}.lista li:nth-child(n+7){--n:6}
.lista li i{transform-origin:left;transition:transform .7s calc(var(--n,0) * 80ms + .6s) cubic-bezier(.3,.7,.2,1)}
.js .menu.rv:not(.in) .lista li{opacity:0;translate:-26px 0}
.js .menu.rv:not(.in) .lista li i{transform:scaleX(0)}
.menu.in .lista .off{animation:wiggle .9s 1.2s 1 both}
@keyframes wiggle{0%,100%{rotate:0deg}20%{rotate:-9deg}45%{rotate:8deg}70%{rotate:-4deg}}

/* ---------- galería: photos tossed on a table, tilt on hover, a lean on touch ---------- */
.gal li{perspective:800px}
.js .gal li.rv:not(.in){opacity:0}
.gal li:nth-child(odd){--r0:-10deg}
.gal li:nth-child(even){--r0:9deg}
.gal li:nth-child(4n+2){--d:80ms}.gal li:nth-child(4n+3){--d:160ms}.gal li:nth-child(4n+4){--d:240ms}
.gal li.in{animation:toss .85s var(--d,0ms) cubic-bezier(.2,.9,.3,1.1) both}
@keyframes toss{0%{opacity:0;translate:0 -70px;rotate:var(--r0);scale:1.08}55%{opacity:1;translate:0 6px;rotate:calc(var(--r0) * -.22);scale:.98}100%{opacity:1;translate:0 0;rotate:0deg;scale:1}}
.gal .pn{transform:rotate(calc(var(--rot,0deg) + var(--sr,0deg))) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) translateY(var(--lift,0px));transition:transform .2s ease-out,box-shadow .2s}
.gal .pn:hover{--lift:-6px;box-shadow:9px 12px 0 var(--gold-hi)}

/* ---------- el artista ---------- */
.inkbox{position:absolute;z-index:3;left:-7px;top:-7px;width:calc(100% + 14px);height:calc(100% + 14px);overflow:visible;pointer-events:none}
.inkbox path{fill:none;stroke:var(--gold-hi);stroke-width:4;stroke-linejoin:round;stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:0;transition:stroke-dashoffset 1.7s .25s cubic-bezier(.4,.1,.2,1)}
.js .frame-y.rv:not(.in) .inkbox path{stroke-dashoffset:1}
.js .frame-y.rv:not(.in){border-color:transparent}
.frame-y{transition:border-color .2s 1.6s}
.tape{position:absolute;z-index:4;right:-12px;bottom:-18px;max-width:80%;padding:8px 14px 7px;background:var(--gold-g);color:#0d0c0a;border:3px solid var(--text);font:italic 800 15px/1.2 var(--txt);transform:rotate(-3deg);transition:opacity .6s 1.7s,translate .6s 1.7s cubic-bezier(.3,1.4,.5,1)}
.js .frame-y.rv:not(.in) .tape{opacity:0;translate:0 16px}

/* ---------- agenda: ink ripples on the red block, a breathing button ---------- */
.ripple{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none}
.ripple i{position:absolute;left:14%;top:40%;width:80vmin;aspect-ratio:1;margin:-40vmin 0 0 -40vmin;border:3px solid rgba(13,12,10,.2);border-radius:50%;transform:scale(0);animation:ripple 10s linear infinite}
.ripple i:nth-child(2){animation-delay:3.3s}.ripple i:nth-child(3){animation-delay:6.6s}
@keyframes ripple{0%{transform:scale(0);opacity:1}100%{transform:scale(1.7);opacity:0}}
#bkopen:not(:disabled):not(.calm){animation:breathe 3.6s 1.2s ease-out infinite}
@keyframes breathe{0%,70%,100%{box-shadow:0 0 0 0 rgba(230,199,122,0)}78%{box-shadow:0 0 0 0 rgba(230,199,122,.5)}100%{box-shadow:0 0 0 16px rgba(230,199,122,0)}}

/* ---------- buttons and links ---------- */
.btn{transition:color .25s .08s,transform .12s,box-shadow .12s}
.btn:active{transform:translateY(3px) scale(.965) rotate(-1deg);box-shadow:inset 0 4px 0 rgba(0,0,0,.3)}
.btn.red:active{box-shadow:inset 0 4px 0 rgba(0,0,0,.4)}
.nav a,.foot a[href],.info a[href]{background:url(img/underline.svg) left calc(100% - 2px)/0% 7px no-repeat;transition:background-size .45s cubic-bezier(.3,.7,.2,1),color .2s}
.nav a{border-bottom:0}
.nav a:hover,.foot a[href]:hover,.info a[href]:hover{background-size:100% 7px}
.foot a[href]{background-image:url(img/underline-light.svg)}
.foot a.wm,.foot a.wm:hover{background:none}/* the logo link never gets the hand-drawn underline */

/* ---------- floating WhatsApp: one nudge after a while ---------- */
.wa-fab.nudge{animation:bob 1.3s ease-in-out 2}
@keyframes bob{0%,100%{translate:0 0}25%{translate:0 -12px}50%{translate:0 0}70%{translate:0 -6px}}

/* off-screen loops sleep (motion.js toggles .idle), and nothing moves for reduced motion or the editor */
.idle,.idle *,.idle::before,.idle::after{animation-play-state:paused!important}
.calm-all *,.calm-all *::before,.calm-all *::after,html.ed-on *,html.ed-on *::before,html.ed-on *::after{animation:none!important;transition:none!important}
.calm-all .drip,html.ed-on .drip,.calm-all .ripple,html.ed-on .ripple{display:none}
@media(prefers-reduced-motion:reduce){.drip,.ripple{display:none}}

/* ---------- section titles that live: the splatter wobbles and drips, the brush stroke flows (SMIL inside the SVGs; three variants so sections never sync) ---------- */
.ttl::before{background-image:url(img/spat-a.svg);width:52px;height:78px;top:-36px}
.ttl::after{background-image:url(img/stroke-a.svg)}
#como .ttl::before{background-image:url(img/spat-b.svg)}#como .ttl::after{background-image:url(img/stroke-b.svg)}
#precios .ttl::before{background-image:url(img/spat-c.svg)}#precios .ttl::after{background-image:url(img/stroke-c.svg)}
#artista .ttl::before{background-image:url(img/spat-b.svg)}#artista .ttl::after{background-image:url(img/stroke-a.svg)}
#turno .ttl::before{background-image:url(img/spat-c.svg)}#turno .ttl::after{background-image:url(img/stroke-b.svg)}
#llegar .ttl::before{background-image:url(img/spat-a.svg)}#llegar .ttl::after{background-image:url(img/stroke-c.svg)}
/* off-screen titles drop the animated image (it restarts when they come back); still versions for reduced motion and the editor */
.ttl.idle::before,.ttl.idle::after{background-image:none!important}
.calm-all .ttl::before,html.ed-on .ttl::before{background-image:url(img/blot-spat.svg)!important}
.calm-all .ttl::after,html.ed-on .ttl::after{background-image:url(img/blot-stroke.svg)!important}
@media(prefers-reduced-motion:reduce){.ttl::before{background-image:url(img/blot-spat.svg)!important}.ttl::after{background-image:url(img/blot-stroke.svg)!important}}

/* ---------- liquid inside the letters: red ink sloshes in the black glyphs (one element, real text: the background is clipped to the text) ----------
   Each line box is 1.06em tall (see landing.css), so the tiles below repeat once per line. Two waves drift in opposite directions and
   three sparse red specks rise at different speeds. Browsers without text clipping keep plain black text. */
@supports ((-webkit-background-clip:text) or (background-clip:text)){
  .h-ink{
    color:transparent;-webkit-text-fill-color:transparent;
    background:
      radial-gradient(circle at 18% 78%,#f6e2a6 0 1.6px,transparent 2.3px) 0 0/97px 1.06em,
      radial-gradient(circle at 64% 40%,#f6e2a6 0 1.2px,transparent 1.9px) 31px 0/131px 1.06em,
      radial-gradient(circle at 82% 90%,#f6e2a6 0 2px,transparent 2.7px) 7px 0/173px 1.06em,
      url(img/wave-a.svg) 0 0/150px 1.06em,
      url(img/wave-b.svg) 0 0/94px 1.06em,
      var(--text);
    -webkit-background-clip:text;background-clip:text;
    animation:slosh 11s var(--lp,0s) linear infinite;
  }
  #como .h-ink{--lp:-3.5s}#precios .h-ink{--lp:-7s}#trabajos .h-ink{--lp:-1.5s}#artista .h-ink{--lp:-5s}#turno .h-ink{--lp:-8.5s}#llegar .h-ink{--lp:-10s}
  html.ed-on .h-ink,.edit-plain .h-ink{background:none;color:var(--text);-webkit-text-fill-color:currentColor;animation:none}
}
@keyframes slosh{
  from{background-position:0 0,31px 0,7px 0,0 0,0 0,0 0}
  to{background-position:0 -1.06em,31px -2.12em,7px -3.18em,150px 0,-94px 0,0 0}
}

/* ---------- always alive: slow loops that start once each block has entered (all pause off-screen via .idle; .calm-all / reduced motion stop them) ---------- */
/* hero: the paper strips keep swaying, each at its own pace */
.hx-shred.in i{animation:sway 5.5s ease-in-out infinite alternate}
.hx-shred.in i:nth-child(3n+1){animation-duration:6.4s;animation-delay:-2s}
.hx-shred.in i:nth-child(3n+2){animation-duration:4.8s;animation-delay:-3.5s}
.hx-shred.in i:nth-child(4n){animation-duration:7.2s;animation-delay:-1s}
@keyframes sway{from{translate:0 -5px;rotate:-.6deg}to{translate:0 6px;rotate:.6deg}}
/* gold light sweeping across the call-to-action buttons */
.hx-cta{position:relative;overflow:hidden}
.btn.red::after,.hx-cta::after{content:"";position:absolute;inset:-2px auto -2px 0;width:45%;z-index:1;pointer-events:none;background:linear-gradient(105deg,transparent,rgba(255,246,214,.55),transparent);translate:-120% 0;skew:-18deg;animation:shine 5.5s var(--sh,1.5s) ease-in-out infinite}
.hx-cta{--sh:.6s}.top .btn.red{--sh:2.8s}
@keyframes shine{0%,62%{translate:-120% 0}82%,100%{translate:330% 0}}
/* steps: the panels float, the numbers rock like stamps on a string */
.steps li.in{animation:float 6s calc(var(--sd,0s) + 1.6s) ease-in-out infinite}
.steps li.in .num{animation:stamp .55s calc(var(--sd,0s) + .4s) cubic-bezier(.3,1.5,.5,1) both,rock 4.2s calc(var(--sd,0s) + 1.2s) ease-in-out infinite}
.steps li.in .bubble{animation:bubble .6s calc(var(--sd,0s) + .85s) cubic-bezier(.3,1.6,.5,1) both,pop 3.2s 2.5s ease-in-out infinite}
@keyframes float{0%,100%{translate:0 0}50%{translate:0 -9px}}
@keyframes rock{0%,100%{rotate:-4deg}50%{rotate:5deg}}
@keyframes pop{0%,100%{scale:1}45%{scale:1.08}60%{scale:.97}}
/* prices: the menu card floats, its header shimmers, rows lean in on hover */
.menu.in{animation:float 7s 1.8s ease-in-out infinite}
.menu-h{background-size:100% 220%;animation:goldflow 6s ease-in-out infinite alternate}
@keyframes goldflow{from{background-position:0 0}to{background-position:0 100%}}
.lista li{transition-property:opacity,translate,color}
.menu.in .lista li:hover{translate:6px 0;color:var(--gold-hi);transition-delay:0s}
/* gallery: photos drift like prints on a table; the picture zooms in on hover */
.gal li.in{animation:toss .85s var(--d,0ms) cubic-bezier(.2,.9,.3,1.1) both,drift 8s calc(var(--d,0ms) + 1.2s) ease-in-out infinite}
.gal li:nth-child(3n+2).in{animation-duration:.85s,9.5s}
.gal li:nth-child(3n).in{animation-duration:.85s,7s}
@keyframes drift{0%,100%{translate:0 0;rotate:0deg}33%{translate:0 -7px;rotate:.5deg}66%{translate:0 3px;rotate:-.4deg}}
.gal .pn{overflow:hidden}
.gal .pn img{transition:scale .6s cubic-bezier(.2,.8,.2,1)}
.gal .pn:hover img{scale:1.07}
/* artist: the portrait frame floats, the tape flutters */
.frame-y.rv.in{animation:settle 1.2s cubic-bezier(.2,.9,.3,1.1) both,float 7.5s 1.6s ease-in-out infinite}
.frame-y.in .tape{animation:flutter 3.8s 2.4s ease-in-out infinite;transform-origin:90% 50%}
@keyframes flutter{0%,100%{rotate:0deg}40%{rotate:2.4deg}70%{rotate:-1.2deg}}
/* social: cards float out of step, icons bounce now and then */
.soc-c.in{animation:float 6.5s 1s ease-in-out infinite}
.soc-c.in+.soc-c.in{animation-duration:7.8s;animation-delay:2.2s}
.soc-c .ico,.stats .ico{animation:hop 4.5s 1.5s ease-in-out infinite}
.stats li:nth-child(2) .ico{animation-delay:2.4s}.stats li:nth-child(3) .ico{animation-delay:3.3s}
@keyframes hop{0%,72%,100%{translate:0 0;rotate:0deg}80%{translate:0 -8px;rotate:-10deg}88%{translate:0 0;rotate:6deg}94%{translate:0 -2px;rotate:0deg}}
/* booking card and directions breathe gently */
.turno-card{animation:float 8s 1s ease-in-out infinite}
.llegar .rv.in .info{animation:float 9s 1.5s ease-in-out infinite}
/* header and footer logos catch the light; the emblem sways */
.top .wm img{animation:glint 6s 3s ease-in-out infinite}
@keyframes glint{0%,80%,100%{filter:drop-shadow(0 0 0 rgba(230,199,122,0))}88%{filter:drop-shadow(0 0 9px rgba(230,199,122,.75))}}
.foot-emb{animation:pendulum 7s ease-in-out infinite;transform-origin:50% 0}
@keyframes pendulum{0%,100%{rotate:-5deg}50%{rotate:5deg}}
/* section dividers: a bead of gold runs along each hand-drawn line once it is drawn */
.edge.in::after{content:"";position:absolute;top:50%;left:0;width:90px;height:4px;margin-top:-2px;border-radius:4px;background:linear-gradient(90deg,transparent,var(--gold-hi),#fff6d6,transparent);filter:blur(.5px);animation:bead 7s 1.6s linear infinite;opacity:0}
.edge:nth-of-type(odd).in::after{animation-duration:9s;animation-delay:3s}
@keyframes bead{0%{translate:-100px 0;opacity:0}8%{opacity:1}92%{opacity:1}100%{translate:calc(100vw + 10px) 0;opacity:0}}
/* reading progress: a gold line under the header fills as the page scrolls (browsers with scroll timelines only) */
@supports (animation-timeline:scroll()){
  .top::after{content:"";position:absolute;left:0;right:0;bottom:-3px;height:3px;background:var(--gold-g);transform-origin:0 50%;scale:0 1;animation:readbar linear both;animation-timeline:scroll(root)}
  @keyframes readbar{to{scale:1 1}}
}
/* floating gold specks (motion.js draws them on #embers) */
#embers{position:fixed;inset:0;z-index:39;width:100%;height:100%;pointer-events:none}
.calm-all #embers,html.ed-on #embers{display:none}
