/* Toolwhere Glow v1.1 – brand colours: navy #14213D, blue #3867FF, teal #16B8A6 */
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

:root {
  --tw-blue: #3867FF;
  --tw-teal: #16B8A6;
  --tw-violet: #7C5CFF;
  --tw-amber: #F5A524;
  --tw-rose: #F0527A;
  --tw-navy: #14213D;
  --tw-ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Glow backdrop (home page top) ---------- */
.tw-backdrop {
  position: absolute; top: 0; left: 0; width: 100%; height: 820px;
  overflow: hidden; pointer-events: none; z-index: 0;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
          mask-image: linear-gradient(#000 55%, transparent);
}
.tw-blob {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .3; will-change: transform;
  translate: calc(var(--px, 0) * var(--k, 20px)) calc(var(--py, 0) * var(--k, 20px));
  transition: translate .6s var(--tw-ease);
}
.tw-blob.b1 { --k: 40px;  width: 440px; height: 440px; left: 5%;  top: 30px;  background: var(--tw-blue);   animation: tw-drift1 16s ease-in-out infinite alternate; }
.tw-blob.b2 { --k: -50px; width: 400px; height: 400px; right: 6%; top: 80px;  background: var(--tw-teal);   animation: tw-drift2 19s ease-in-out infinite alternate; }
.tw-blob.b3 { --k: 30px;  width: 320px; height: 320px; left: 42%; top: 320px; background: var(--tw-violet); animation: tw-drift3 22s ease-in-out infinite alternate; opacity: .22; }
.tw-blob.b4 { --k: -30px; width: 240px; height: 240px; left: 20%; top: 420px; background: var(--tw-rose);   animation: tw-drift1 25s ease-in-out infinite alternate-reverse; opacity: .14; }
@keyframes tw-drift1 { to { transform: translate(120px, 70px) scale(1.15); } }
@keyframes tw-drift2 { to { transform: translate(-130px, 60px) scale(.9); } }
@keyframes tw-drift3 { to { transform: translate(-90px, -60px) scale(1.2); } }

/* floating glass chips with tool symbols */
.tw-chip {
  --k: var(--tw-blue);
  position: absolute; display: grid; place-items: center;
  width: var(--s, 46px); height: var(--s, 46px); border-radius: 30%;
  font-weight: 800; font-size: calc(var(--s, 46px) * .38); color: var(--k);
  background: color-mix(in srgb, var(--k) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--k) 38%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 14px 30px -16px var(--k);
  translate: calc(var(--px, 0) * var(--m, 14px)) calc(var(--py, 0) * var(--m, 14px));
  transition: translate .5s var(--tw-ease);
}
.tw-chip > i { font-style: normal; display: block; animation: tw-float var(--t, 18s) ease-in-out var(--dl, 0s) infinite alternate; }
@keyframes tw-float { from { transform: translateY(0) rotate(-8deg); } to { transform: translateY(-46px) rotate(10deg); } }

/* cursor glow (desktop only) */
.tw-cursor {
  position: fixed; left: 0; top: 0; width: 460px; height: 460px; margin: -230px 0 0 -230px;
  border-radius: 50%; pointer-events: none; z-index: 0; opacity: 0; will-change: transform;
  background: radial-gradient(circle, color-mix(in srgb, var(--tw-blue) 20%, transparent), transparent 68%);
  transition: opacity .4s;
}
.tw-cursor.on { opacity: .75; }

/* ---------- Hero ---------- */
.tw-h1 {
  background: linear-gradient(100deg, #5B84FF 0%, var(--tw-teal) 45%, var(--tw-violet) 75%, #5B84FF 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: tw-focus 1.2s var(--tw-ease) both, tw-sheen 7s linear infinite;
}
@keyframes tw-sheen { to { background-position: -250% 0; } }
@keyframes tw-focus {
  from { opacity: 0; filter: blur(16px); letter-spacing: .09em; translate: 0 24px; }
  to   { opacity: 1; filter: blur(0);    letter-spacing: normal; translate: 0 0; }
}
.tw-rise { animation: tw-rise .8s var(--tw-ease) both; animation-delay: var(--d, 0s); }
@keyframes tw-rise { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }

/* ---------- Header ---------- */
header a {
  background: linear-gradient(90deg, var(--tw-blue), var(--tw-teal)) no-repeat 0 100% / 0 2px;
  transition: background-size .35s var(--tw-ease);
}
header a:hover, header a:focus-visible { background-size: 100% 2px; }
.tw-logo-w {
  background: linear-gradient(100deg, var(--tw-teal), var(--tw-blue), var(--tw-violet), var(--tw-teal));
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: tw-sheen 6s linear infinite;
}
header.tw-glass { -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5); box-shadow: 0 10px 34px -22px rgba(20, 33, 61, .6); }

/* ---------- Headings ---------- */
.tw-h2 { position: relative; padding-bottom: .55em; }
.tw-h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--tw-blue), var(--tw-teal), var(--tw-violet)); background-size: 200% 100%;
  animation: tw-sheen 5s linear infinite;
  transition: width .5s var(--tw-ease);
}
.tw-h2:hover::after { width: 120px; }

/* ---------- Tool cards ---------- */
.tw-card {
  --c: var(--tw-blue);
  position: relative; overflow: hidden; isolation: isolate; border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  background-image: linear-gradient(160deg, color-mix(in srgb, var(--c) 11%, transparent), transparent 62%);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .25s ease-out, box-shadow .35s var(--tw-ease), border-color .35s;
  text-decoration: none; background-size: 100% 100%;
}
.tw-card.c0 { --c: var(--tw-violet); }
.tw-card.c1 { --c: var(--tw-blue); }
.tw-card.c2 { --c: var(--tw-teal); }
.tw-card.c3 { --c: var(--tw-amber); }
.tw-card.c4 { --c: var(--tw-rose); }
.tw-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--c) 28%, transparent), transparent 70%);
}
.tw-card::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--c), var(--tw-teal)); transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--tw-ease);
}
.tw-card:hover, .tw-card:focus-visible {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-8px) scale(1.015);
  border-color: transparent;
  box-shadow: 0 26px 50px -22px color-mix(in srgb, var(--c) 75%, transparent);
}
.tw-card:hover::before, .tw-card:focus-visible::before { opacity: 1; }
.tw-card:hover::after,  .tw-card:focus-visible::after  { transform: scaleX(1); }
.tw-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--c) 70%, transparent); outline-offset: 3px; }

/* spinning colour ring on hover */
.tw-ring {
  position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none; opacity: 0;
  background: conic-gradient(from var(--ang), var(--c), var(--tw-teal), var(--tw-violet), var(--c));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  transition: opacity .3s; animation: tw-spin 3.2s linear infinite;
}
.tw-card:hover .tw-ring, .tw-card:focus-visible .tw-ring { opacity: 1; }
@keyframes tw-spin { to { --ang: 360deg; } }

.tw-ico {
  display: inline-grid !important; place-items: center; min-width: 50px; height: 50px; padding: 0 10px;
  border-radius: 15px; color: #fff !important; font-weight: 800;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #14213D)) !important;
  box-shadow: 0 12px 22px -10px var(--c);
  transition: transform .45s var(--tw-ease);
  animation: tw-pulse 3.6s ease-in-out infinite;
}
@keyframes tw-pulse { 50% { box-shadow: 0 12px 26px -6px var(--c); } }
.tw-card:hover .tw-ico { transform: rotate(-8deg) scale(1.14) translateZ(0); }
.tw-open { display: inline-block; font-weight: 700; color: var(--c); transition: translate .3s var(--tw-ease); }
.tw-card:hover .tw-open { translate: 8px 0; }

/* ---------- "Why choose" ---------- */
.tw-why {
  --c: var(--tw-blue); position: relative; border-radius: 18px; padding-top: 1.1em;
  border: 1px solid color-mix(in srgb, var(--c) 25%, transparent);
  background-image: linear-gradient(180deg, color-mix(in srgb, var(--c) 10%, transparent), transparent 70%);
  transition: transform .35s var(--tw-ease), box-shadow .35s var(--tw-ease);
}
.tw-why.c0 { --c: var(--tw-amber); } .tw-why.c1 { --c: var(--tw-blue); }
.tw-why.c2 { --c: var(--tw-teal); }  .tw-why.c3 { --c: var(--tw-violet); }
.tw-why:hover { transform: translateY(-6px); box-shadow: 0 20px 38px -22px var(--c); }
.tw-why h3 { color: var(--c); }

/* ---------- Buttons: click ripple ---------- */
.tw-rip { position: relative; overflow: hidden; }
.tw-ripple { position: absolute; border-radius: 50%; pointer-events: none; background: rgba(255,255,255,.5); transform: scale(0); animation: tw-ripple .65s ease-out forwards; }
@keyframes tw-ripple { to { transform: scale(4); opacity: 0; } }

/* ---------- Footer, progress bar, back-to-top ---------- */
footer { border-top: 3px solid transparent; border-image: linear-gradient(90deg, var(--tw-blue), var(--tw-teal), var(--tw-violet)) 1; }
.tw-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 99999; pointer-events: none;
  transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, var(--tw-blue), var(--tw-teal), var(--tw-violet));
  box-shadow: 0 0 12px var(--tw-teal);
}
.tw-top {
  position: fixed; right: 20px; bottom: 20px; width: 50px; height: 50px; border: 0; padding: 0; border-radius: 50%; z-index: 9999; cursor: pointer;
  background: conic-gradient(var(--tw-teal) calc(var(--p, 0) * 1%), color-mix(in srgb, var(--tw-blue) 25%, transparent) 0);
  box-shadow: 0 14px 28px -12px var(--tw-blue);
  opacity: 0; translate: 0 20px; pointer-events: none; transition: opacity .35s, translate .35s var(--tw-ease), scale .25s;
}
.tw-top::after { content: "\2191"; position: absolute; inset: 4px; border-radius: 50%; display: grid; place-items: center; background: var(--tw-navy); color: #fff; font-size: 20px; font-weight: 700; }
.tw-top.show { opacity: 1; translate: 0 0; pointer-events: auto; }
.tw-top:hover { scale: 1.1; }
.tw-top:focus-visible { outline: 3px solid var(--tw-teal); outline-offset: 3px; }

/* ---------- Reveal ---------- */
.tw-pre  { opacity: 0; translate: 0 26px; scale: .96; }
.tw-show { opacity: 1; translate: 0 0; scale: 1; transition: opacity .7s var(--tw-ease) var(--d, 0s), translate .7s var(--tw-ease) var(--d, 0s), scale .7s var(--tw-ease) var(--d, 0s); }

/* ---------- Small screens: lighter effects ---------- */
@media (max-width: 700px) {
  .tw-chip:nth-child(n+6) { display: none; }
  .tw-blob { filter: blur(50px); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .tw-blob, .tw-chip > i, .tw-h1, .tw-rise, .tw-ring, .tw-ico, .tw-logo-w, .tw-h2::after { animation: none !important; }
  .tw-h1, .tw-logo-w { background-position: 0 0; }
  .tw-pre { opacity: 1; translate: none; scale: 1; }
  .tw-card, .tw-why, .tw-open, .tw-top { transition: none !important; }
}

/* =====================================================================
   v1.2 – Colourful animated page background
   ===================================================================== */
@property --m1x { syntax: '<percentage>'; inherits: true; initial-value: 8%; }
@property --m1y { syntax: '<percentage>'; inherits: true; initial-value: 10%; }
@property --m2x { syntax: '<percentage>'; inherits: true; initial-value: 92%; }
@property --m2y { syntax: '<percentage>'; inherits: true; initial-value: 20%; }
@property --m3x { syntax: '<percentage>'; inherits: true; initial-value: 70%; }
@property --m3y { syntax: '<percentage>'; inherits: true; initial-value: 88%; }
@property --m4x { syntax: '<percentage>'; inherits: true; initial-value: 15%; }
@property --m4y { syntax: '<percentage>'; inherits: true; initial-value: 80%; }
@property --m5x { syntax: '<percentage>'; inherits: true; initial-value: 50%; }
@property --m5y { syntax: '<percentage>'; inherits: true; initial-value: 45%; }

:root {
  --tw-mesh:
    radial-gradient(55vmax 55vmax at var(--m1x) var(--m1y), color-mix(in srgb, var(--tw-blue)   26%, transparent), transparent 62%),
    radial-gradient(50vmax 50vmax at var(--m2x) var(--m2y), color-mix(in srgb, var(--tw-teal)   24%, transparent), transparent 62%),
    radial-gradient(55vmax 55vmax at var(--m3x) var(--m3y), color-mix(in srgb, var(--tw-violet) 22%, transparent), transparent 62%),
    radial-gradient(40vmax 40vmax at var(--m4x) var(--m4y), color-mix(in srgb, var(--tw-rose)   16%, transparent), transparent 62%),
    radial-gradient(38vmax 38vmax at var(--m5x) var(--m5y), color-mix(in srgb, var(--tw-amber)  13%, transparent), transparent 62%);
  animation: tw-mesh-a 26s ease-in-out infinite alternate;
}
@keyframes tw-mesh-a {
  0%   { --m1x: 8%;  --m1y: 10%; --m2x: 92%; --m2y: 20%; --m3x: 70%; --m3y: 88%; --m4x: 15%; --m4y: 80%; --m5x: 50%; --m5y: 45%; }
  50%  { --m1x: 30%; --m1y: 35%; --m2x: 70%; --m2y: 5%;  --m3x: 90%; --m3y: 60%; --m4x: 40%; --m4y: 95%; --m5x: 20%; --m5y: 20%; }
  100% { --m1x: 12%; --m1y: 60%; --m2x: 85%; --m2y: 50%; --m3x: 40%; --m3y: 70%; --m4x: 80%; --m4y: 90%; --m5x: 75%; --m5y: 15%; }
}

html, body, .tw-mesh {
  background-image: var(--tw-mesh);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* coloured bands behind sections */
.tw-band { --bc: var(--tw-blue); background-image: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bc) 10%, transparent) 50%, transparent); }
.tw-band.tw-mesh {
  background-image: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bc) 10%, transparent) 50%, transparent), var(--tw-mesh);
  background-attachment: scroll, fixed;
  background-repeat: no-repeat;
}
.tw-band.b0 { --bc: var(--tw-teal); }
.tw-band.b1 { --bc: var(--tw-violet); }
.tw-band.b2 { --bc: var(--tw-blue); }
.tw-band.b3 { --bc: var(--tw-rose); }

/* header and footer get a frosted look so the colours show through */
header.tw-mesh, footer.tw-mesh { background-blend-mode: normal; }

@media (max-width: 700px) {
  html, body, .tw-mesh { background-attachment: scroll; }
  .tw-band.tw-mesh { background-attachment: scroll, scroll; }
}
@media (prefers-reduced-motion: reduce) {
  :root { animation: none; }
}
