/* ===== Moviment i cursor · Tarraco Crea (direcció A) ===== */

/* --- Cursor rodó vaporwave (només amb ratolí) --- */
@media (hover:hover) and (pointer:fine){
  html.tc-cursor, html.tc-cursor *{cursor:none!important}
  html.tc-cursor input[type="text"], html.tc-cursor input[type="email"], html.tc-cursor textarea{cursor:text!important}
}
.tc-dot,.tc-ring{position:fixed;left:0;top:0;pointer-events:none;z-index:9999;border-radius:50%;will-change:transform}
.tc-dot{
  width:18px;height:18px;margin:-9px 0 0 -9px;
  background:radial-gradient(circle at 35% 30%,#bff6ff 0%,#3fd0ff 35%,#2f6bff 70%,#7b3dff 100%);
  box-shadow:0 0 0 2px rgba(255,255,255,.9),0 0 10px 3px rgba(63,208,255,.8),0 0 26px 8px rgba(255,79,163,.45);
  transition:width .22s cubic-bezier(.2,.9,.3,1.4),height .22s cubic-bezier(.2,.9,.3,1.4),margin .22s cubic-bezier(.2,.9,.3,1.4),background .2s,box-shadow .2s;
}
.tc-ring{
  width:40px;height:40px;margin:-20px 0 0 -20px;
  border:1.5px solid rgba(63,208,255,.65);
  outline:1px solid rgba(255,255,255,.35);outline-offset:-3px;
  box-shadow:0 0 14px rgba(255,79,163,.25) inset;
  transition:width .3s ease,height .3s ease,margin .3s ease,border-color .2s,opacity .2s;
}
html.tc-hover .tc-dot{
  width:46px;height:46px;margin:-23px 0 0 -23px;
  background:radial-gradient(circle at 35% 30%,#fdffc2 0%,#f5ff00 45%,#d4e800 100%);
  box-shadow:0 0 16px 4px rgba(245,255,0,.8),0 0 40px 10px rgba(245,255,0,.35);
  mix-blend-mode:normal;
}
html.tc-hover .tc-ring{width:70px;height:70px;margin:-35px 0 0 -35px;border-color:rgba(245,255,0,.7)}
html.tc-down .tc-dot{transform-origin:center;filter:brightness(1.2)}
html.tc-out .tc-dot,html.tc-out .tc-ring{opacity:0}
@media (hover:none),(pointer:coarse){.tc-dot,.tc-ring{display:none}}

/* --- Aparicions en fer scroll --- */
.rv{opacity:0;transform:translateY(34px);transition:opacity .8s cubic-bezier(.2,.7,.2,1),transform .8s cubic-bezier(.2,.7,.2,1)}
.rv.in{opacity:1;transform:none}
.rv-l{transform:translateX(-40px)}
.rv-pin{transform:translateY(-60px) rotate(var(--rot,0deg)) scale(.92)}
.rv-pin.in{transform:rotate(var(--rot,0deg))}

/* --- Títols a dues tintes: la tinta rosa "encaixa" al registre --- */
@keyframes tc-register{
  0%{transform:translate(38px,-26px);opacity:0}
  60%{transform:translate(-4px,3px);opacity:1}
  80%{transform:translate(8px,5px)}
  100%{transform:translate(6px,4px)}
}
@keyframes tc-register-b{
  0%{transform:translate(-30px,20px);opacity:0}
  100%{transform:none;opacity:1}
}
.tc-anim .poster h1 .l2{animation:tc-register 1.3s cubic-bezier(.2,.8,.2,1) .25s both}
.tc-anim .poster h1 .l1{animation:tc-register-b .9s cubic-bezier(.2,.8,.2,1) both}
.tc-anim .phead h1 span{animation:tc-register 1.2s cubic-bezier(.2,.8,.2,1) .2s both}
.tc-anim .poster .intro,.tc-anim .poster .btns,.tc-anim .poster .meta{animation:tc-fade .9s ease .7s both}
@keyframes tc-fade{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}

/* --- El sol: gira molt a poc a poc i segueix el ratolí (JS) --- */
@keyframes tc-spin{to{rotate:360deg}}
.tc-anim .sun i:first-child{animation:tc-spin 90s linear infinite}
.tc-anim .sun i:last-child{animation:tc-spin 140s linear infinite reverse}

/* --- Marques de registre que respiren --- */
@keyframes tc-breathe{0%,100%{transform:scale(1) rotate(0)}50%{transform:scale(1.15) rotate(45deg)}}
.tc-anim .reg{animation:tc-breathe 6s ease-in-out infinite}

/* --- Cartells de l'agenda: s'inclinen cap al ratolí --- */
.pst{transform-style:preserve-3d}

/* --- Botons: petita vibració de tinta en passar-hi --- */
@keyframes tc-jitter{0%,100%{translate:0 0}25%{translate:-1px 1px}50%{translate:1px -1px}75%{translate:-1px 0}}
.b:hover{animation:tc-jitter .25s steps(2) 2}

/* --- Subratllats que es dibuixen --- */
.poster .intro b{background-size:0% 100%;background-repeat:no-repeat;transition:background-size 1.1s ease 1.2s}
.tc-anim .poster .intro b{background-size:100% 100%}

/* --- Accessibilitat: sense moviment si l'usuari ho demana --- */
@media (prefers-reduced-motion:reduce){
  .rv,.rv-pin{opacity:1!important;transform:none!important;transition:none!important}
  .tc-anim *{animation:none!important}
  .tc-ring{display:none}
  .poster .intro b{background-size:100% 100%}
}
