/* TANIX business website: v5.4 "wow" additions (wow.js). Loaded on the homepage and on /ai-automations, after the
   other stylesheets. Each block is switched on by markup or by a class wow.js adds, so without the script the pages
   are the pages they were. Colours stay in the site's blue family (founder: one colour family, no rainbow cards).
   Numbers match the list the founder approved:
     1 site that builds itself (hero)   3 project wall   4 scroll story   6 depth on scroll   7 letters assemble
     8 light through the glass          9 liquid buttons 10 robot on the process line   11 numbers   12 day and night
   (2, before/after, is not here: it needs the client's old screenshots. 5, the real AI phone, is in ai-automations.*) */

/* ---------- 1. A website that builds itself, floating in the hero ---------- */
.wow-build { position: absolute; left: -17%; bottom: 3%; z-index: 3; width: 47%; border-radius: 14px; overflow: hidden;
  background: #081434; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 0 0 1px rgba(150, 200, 255, .28), 0 26px 60px rgba(0, 6, 30, .6), 0 0 50px rgba(47, 134, 255, .28);
  transform: perspective(900px) rotateY(19deg) rotateX(7deg) rotateZ(-2deg); animation: wow-bob 7s ease-in-out infinite; }
@keyframes wow-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.wow-build-bar { display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; background: rgba(255, 255, 255, .09); }
.wow-build-bar i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.wow-build-bar span { margin-left: 6px; font: 600 9.5px/1 var(--body); color: var(--dim); }
.wow-build-stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.wow-build-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; clip-path: inset(0 100% 0 0); }
.wow-build-wire { position: absolute; inset: 0; padding: 7%; display: grid; gap: 6%; grid-template-columns: repeat(3, 1fr); grid-template-rows: 12% 38% 1fr; transition: opacity .5s; }
.wow-build-wire b { border-radius: 6px; border: 1.5px dashed rgba(111, 220, 255, .75); background: rgba(111, 220, 255, .07); opacity: 0; }
.wow-build-wire b:nth-child(1), .wow-build-wire b:nth-child(2) { grid-column: 1 / -1; }
.wow-build.is-wire .wow-build-wire b, .wow-build.is-reveal .wow-build-wire b { animation: wow-drop .6s var(--ease) both; }
.wow-build .wow-build-wire b:nth-child(2) { animation-delay: .22s; } .wow-build .wow-build-wire b:nth-child(3) { animation-delay: .44s; }
.wow-build .wow-build-wire b:nth-child(4) { animation-delay: .6s; } .wow-build .wow-build-wire b:nth-child(5) { animation-delay: .76s; }
@keyframes wow-drop { from { opacity: 0; translate: 0 -46px; scale: 1.12; } to { opacity: 1; translate: 0 0; scale: 1; } }
.wow-build-line { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--cyan); box-shadow: 0 0 18px 4px rgba(111, 220, 255, .8); opacity: 0; }
.wow-build.is-reveal .wow-build-stage img, .wow-build.is-done .wow-build-stage img { clip-path: inset(0 0 0 0); transition: clip-path 1.5s cubic-bezier(.6, 0, .3, 1); }
.wow-build.is-reveal .wow-build-line { opacity: 1; left: 100%; transition: left 1.5s cubic-bezier(.6, 0, .3, 1), opacity .2s; }
.wow-build.is-done .wow-build-wire { opacity: 0; }

/* ---------- 3. Project wall: a third view beside 3D and Grid ---------- */
.wow-wall { position: relative; height: 470px; margin: 8px 0 30px; perspective: 1500px; display: none; }
.wow-wall.on { display: block; }
.wow-wall-track { position: absolute; inset: 0 0 70px; transform-style: preserve-3d; }
.wow-wall-item { position: absolute; left: 50%; top: 50%; width: min(520px, 62vw); aspect-ratio: 16 / 10; margin: 0; padding: 0; border: 0; border-radius: 16px; overflow: hidden; cursor: pointer;
  background: #081434; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 0 0 1px rgba(150, 200, 255, .25), 0 30px 70px rgba(0, 6, 30, .6);
  transition: transform .8s var(--ease), opacity .8s, box-shadow .8s; display: block; }
.wow-wall-item img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.wow-wall-item.front { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 1px rgba(160, 210, 255, .5), 0 40px 90px rgba(0, 6, 30, .7), 0 0 90px rgba(47, 134, 255, .45); }
.wow-wall-item.fly { transform: translate(-50%, -50%) translateZ(520px) scale(1.25) !important; opacity: 0; transition: transform .6s cubic-bezier(.5, 0, .9, .4), opacity .6s; }
.wow-wall-cap { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; }
.wow-wall-cap b { display: block; font: 800 20px/1.3 var(--head); }
.wow-wall-cap span { color: var(--muted); font-size: 14.5px; }
.wow-wall-nav { position: absolute; top: calc(50% - 35px); z-index: 4; width: 46px; height: 46px; margin-top: -23px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; display: grid; place-items: center;
  background: rgba(12, 28, 72, .8); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 0 0 1px rgba(150, 200, 255, .3); }
.wow-wall-nav svg { width: 20px; height: 20px; } .wow-wall-nav.prev { left: 0; } .wow-wall-nav.next { right: 0; }

/* ---------- 4. Scroll story on /ai-automations ---------- */
.wow-story { position: relative; height: 270vh; }
.wow-story-pin { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; overflow: hidden; }
.wow-story-pin > .container { padding-top: var(--header-h); }
.wow-story .section-head { margin-bottom: 18px; }
.wow-story-stage { position: relative; width: 100%; max-width: 1180px; margin: 0 auto; aspect-ratio: 1000 / 420; }
.wow-story-path { position: absolute; left: 0; top: 0; width: 100%; height: 90.5%; overflow: visible; }
.wow-story-path path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
#wow-story-track { stroke: rgba(150, 200, 255, .28); stroke-width: 2.5; stroke-dasharray: 2 10; }
#wow-story-done { stroke: var(--cyan); stroke-width: 3; filter: drop-shadow(0 0 8px rgba(47, 134, 255, .9)); }
.wow-story-dot { position: absolute; z-index: 3; width: 20px; height: 20px; margin: -10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 9px rgba(111, 220, 255, .28), 0 0 30px 8px rgba(111, 220, 255, .8); transition: background .4s, box-shadow .4s; }
.wow-story-dot.is-reply { background: var(--yellow); box-shadow: 0 0 0 9px rgba(255, 214, 10, .25), 0 0 30px 8px rgba(255, 214, 10, .7); }
.wow-st { position: absolute; top: 45.2%; z-index: 2; width: 26%; translate: -50% -50%; text-align: center; opacity: .4; scale: .92; transition: opacity .6s, scale .6s var(--ease); }
.wow-st.is-on { opacity: 1; scale: 1; }
.wow-st-1 { left: 19%; } .wow-st-2 { left: 50%; } .wow-st-3 { left: 81%; }
.wow-st p { margin-top: 18px; font: 700 17px/1.3 var(--head); color: #dbe7ff; }
.wow-st p b { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 6px; border-radius: 50%; font-size: 12.5px; color: #0a1430; background: var(--cyan); }
.wow-st-phone, .wow-st-order { margin: 0 auto; background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-shadow), 0 0 0 1px rgba(150, 200, 255, .22); }
.wow-st-phone { width: 176px; height: 252px; border-radius: 26px; padding: 14px 10px; display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; transform: perspective(800px) rotateY(22deg) rotateX(5deg); }
.wow-st-phone .aa-msg { font-size: 12.5px; padding: 7px 10px; text-align: left; animation: none; max-width: 94%; }
.wow-st-core { width: 176px; height: 176px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font: 800 48px/1 var(--head); color: #fff;
  background: radial-gradient(circle at 35% 30%, #cfeeff, #4aa3ff 45%, #123a9c); box-shadow: 0 0 70px rgba(47, 134, 255, .8), inset 0 0 34px rgba(255, 255, 255, .4); }
.wow-st-2.is-on .wow-st-core { animation: wow-pulse 2.2s ease-in-out infinite; }
@keyframes wow-pulse { 50% { box-shadow: 0 0 110px rgba(47, 134, 255, 1), inset 0 0 34px rgba(255, 255, 255, .5); } }
.wow-st-order { width: min(100%, 250px); padding: 22px; border-radius: 20px; text-align: left; transform: perspective(800px) rotateY(-20deg) rotateX(5deg); }
.wow-st-order small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.wow-st-order strong { display: block; font: 700 15px/1.3 var(--head); margin-top: 4px; }
.wow-st-order em { display: block; font: 800 27px/1.2 var(--head); font-style: normal; margin-top: 4px; }
.wow-st-order span { display: inline-block; margin-top: 10px; padding: 4px 12px; border-radius: 999px; font: 800 12px/1.5 var(--head); color: #06281a; background: var(--green); opacity: 0; scale: .6; transition: opacity .4s, scale .5s var(--ease); }
.wow-st-3.is-paid .wow-st-order span { opacity: 1; scale: 1; box-shadow: 0 0 22px rgba(34, 197, 94, .7); }

/* ---------- 6. Depth on scroll: wow.js moves headings, card grids and the background at different speeds ---------- */
.wow-depth .section-head h2, .wow-depth .wow-plane { will-change: translate; }

/* ---------- 7. Section titles assemble letter by letter (a throw-away copy animates; the real heading is untouched) ---------- */
.section-head { position: relative; }
.wow-hide { visibility: hidden; }
.wow-letters { position: absolute; margin: 0; pointer-events: none; font-family: var(--head); font-size: clamp(30px, 4vw, 48px); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; color: var(--text); }
.wow-w { display: inline-block; white-space: nowrap; }
.wow-l { display: inline-block; animation: wow-letter .62s var(--ease) both; }
.wow-l.wow-g { background: linear-gradient(100deg, #9fe8ff, var(--cyan) 40%, #6aa8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes wow-letter { from { opacity: 0; translate: .18em -.9em; rotate: 16deg; scale: 1.25; filter: blur(4px); } to { opacity: 1; translate: 0 0; rotate: 0deg; scale: 1; filter: blur(0); } }

/* ---------- 8. Light moving behind the service cards, and a soft sheen when a card is pointed at ---------- */
#services > .container { position: relative; }
#services .services-grid { position: relative; z-index: 1; }
.wow-lights { position: absolute; inset: 180px 0 0; z-index: 0; pointer-events: none; overflow: hidden; border-radius: 40px; }
.wow-lights i { position: absolute; width: 340px; height: 340px; border-radius: 50%; filter: blur(34px); opacity: .55; }
.wow-lights i:nth-child(1) { left: 4%; top: 8%; background: radial-gradient(circle, rgba(47, 134, 255, .85), rgba(47, 134, 255, 0) 68%); animation: wow-drift-a 19s ease-in-out infinite alternate; }
.wow-lights i:nth-child(2) { left: 40%; top: 38%; background: radial-gradient(circle, rgba(111, 220, 255, .7), rgba(111, 220, 255, 0) 68%); animation: wow-drift-b 23s ease-in-out infinite alternate; }
.wow-lights i:nth-child(3) { right: 2%; top: 6%; background: radial-gradient(circle, rgba(139, 92, 246, .6), rgba(139, 92, 246, 0) 68%); animation: wow-drift-a 27s ease-in-out infinite alternate-reverse; }
@keyframes wow-drift-a { to { translate: 180px 150px; } } @keyframes wow-drift-b { to { translate: -220px -120px; } }
.service::after { content: ""; position: absolute; top: -30%; left: -40%; width: 26%; height: 160%; pointer-events: none; z-index: 2; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(190, 225, 255, .34), transparent); transform: rotate(18deg); filter: blur(5px); }
.service:hover::after { animation: wow-sheen 1.1s ease-out 1; }
@keyframes wow-sheen { 0% { left: -40%; opacity: 0; } 20% { opacity: 1; } 100% { left: 120%; opacity: 0; } }

/* ---------- 9. Liquid buttons: the glass buttons fill with yellow from below; a click throws a few sparks ---------- */
.btn-ghost { background-image: radial-gradient(150% 120% at 50% 122%, #ffd60a 0 56%, #ffb300 57% 60%, rgba(255, 179, 0, 0) 61%), var(--glass-bg);
  background-repeat: no-repeat; background-position: 50% 100%, 0 0; background-size: 100% 0%, 100% 100%; transition: background-size .6s var(--ease), color .35s, transform .25s var(--ease), box-shadow .25s ease; }
.btn-ghost:hover, .btn-ghost:focus-visible { background-size: 100% 290%, 100% 100%; color: #0a1430; }
.wow-spark { position: fixed; z-index: 90; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%; pointer-events: none; background: var(--yellow); box-shadow: 0 0 10px rgba(255, 214, 10, .9); }
.wow-spark.c { background: var(--cyan); box-shadow: 0 0 10px rgba(111, 220, 255, .9); } .wow-spark.w { background: #fff; }

/* ---------- 10. The robot rides the head of the process line ---------- */
.wow-walker { position: absolute; left: 100%; bottom: 9px; width: 50px; height: auto; margin-left: -25px; pointer-events: none; filter: drop-shadow(0 8px 12px rgba(47, 134, 255, .7)); animation: wow-bob 2.4s ease-in-out infinite; }

/* ---------- 11. Numbers on /ai-automations ---------- */
.wow-nums { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.wow-num { position: relative; padding: 28px 26px; border-radius: var(--r); background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-shadow); overflow: hidden; }
.wow-num::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; background: var(--glass-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.wow-num b { display: flex; align-items: baseline; gap: 8px; font: 800 60px/1 var(--head); letter-spacing: -.04em; font-variant-numeric: tabular-nums;
  background: linear-gradient(100deg, #fff, #9fe8ff 60%, #6aa8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wow-num b small { font: 700 19px/1 var(--head); letter-spacing: 0; color: var(--muted); -webkit-text-fill-color: var(--muted); }
.wow-num p { margin-top: 12px; color: var(--muted); font-size: 15.5px; }
.wow-num svg { position: absolute; right: 18px; top: 18px; width: 62px; height: 62px; transform: rotate(-90deg); }
.wow-num svg circle { fill: none; stroke: rgba(150, 200, 255, .18); stroke-width: 12; }
.wow-num svg .wow-ring { stroke: var(--cyan); stroke-linecap: round; stroke-dasharray: 314.16; stroke-dashoffset: 314.16; transition: stroke-dashoffset 1.6s var(--ease) .3s; filter: drop-shadow(0 0 5px rgba(47, 134, 255, .9)); }
.wow-num.in svg .wow-ring { stroke-dashoffset: 31.4; }

/* ---------- 12. Day and night: after dark where the visitor is, the hero gets a night sky and its own line ---------- */
.wow-night { display: none; }
.wow-night-on .wow-day { display: none; } .wow-night-on .wow-night { display: inline-flex; }
.wow-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 1.2s;
  background-image: radial-gradient(1.4px 1.4px at 12% 18%, #fff, transparent), radial-gradient(1.2px 1.2px at 27% 62%, #cfe2ff, transparent), radial-gradient(1.6px 1.6px at 41% 9%, #fff, transparent),
    radial-gradient(1.1px 1.1px at 56% 34%, #dfeaff, transparent), radial-gradient(1.5px 1.5px at 68% 76%, #fff, transparent), radial-gradient(1.2px 1.2px at 79% 22%, #cfe2ff, transparent),
    radial-gradient(1.4px 1.4px at 91% 55%, #fff, transparent), radial-gradient(1.1px 1.1px at 6% 82%, #dfeaff, transparent), radial-gradient(1.3px 1.3px at 34% 90%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 48% 70%, #cfe2ff, transparent), radial-gradient(1.5px 1.5px at 85% 88%, #fff, transparent), radial-gradient(1.1px 1.1px at 62% 12%, #fff, transparent),
    linear-gradient(180deg, rgba(1, 3, 12, .72), rgba(1, 3, 12, .25) 70%, transparent); }
.wow-night-on .wow-sky { opacity: 1; animation: wow-twinkle 5s ease-in-out infinite; }
@keyframes wow-twinkle { 50% { filter: brightness(1.35); } }
.wow-moon { position: absolute; left: 46%; top: 7%; width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle at 36% 34%, #fff, #cdd9ff 58%, #8ea4e6); box-shadow: 0 0 46px rgba(170, 190, 255, .55); }

@media (max-width: 1080px) {
  .wow-nums { grid-template-columns: repeat(2, 1fr); }
  .wow-build { left: -6%; width: 42%; }
}
@media (max-width: 920px) {
  .wow-walker { display: none; }
  .wow-wall { height: 360px; }
  /* The story is not pinned on phones: three steps, one under the other. */
  .wow-story { height: auto; padding: 80px 0; }
  .wow-story-pin { position: static; height: auto; display: block; overflow: visible; }
  .wow-story-pin > .container { padding-top: 0; }
  .wow-story-stage { aspect-ratio: auto; display: grid; gap: 34px; }
  .wow-story-path, .wow-story-dot { display: none; }
  .wow-st { position: static; width: auto; translate: none; opacity: 1; scale: 1; }
  .wow-st-order span { opacity: 1; scale: 1; }
}
@media (max-width: 640px) {
  .wow-build { display: none; }
  .wow-nums { grid-template-columns: 1fr; }
  .wow-moon { width: 38px; height: 38px; top: 13%; }
  .wow-lights { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wow-build, .wow-walker, .wow-lights i, .wow-sky, .wow-st-core, .wow-l { animation: none !important; }
  .wow-build-stage img { clip-path: none; } .wow-build-wire { display: none; }
  .wow-story { height: auto; padding: 80px 0; } .wow-story-pin { position: static; height: auto; }
  .wow-st { opacity: 1; scale: 1; } .wow-st-order span { opacity: 1; scale: 1; } .wow-story-dot { display: none; }
  .btn-ghost { transition: none; } .service:hover::after { animation: none; }
  .wow-num svg .wow-ring { transition: none; }
}
