/* =====================================================================
   Tara Tech: home page background effects on the other pages
   (Products, product pages, Services, service pages, About).
   Loaded by elements/web/site_interactions.blade.php. Behaviour: site-interactions.js
   ===================================================================== */

/* 1. Page content sits above the cursor grid */
.ttv2.tt-page section > .tt-container,
.ttv2 .tt-utility,
.ttv2 .tt-footer > .tt-container { position: relative; z-index: 1; }

/* 2. Hero background from the home page: warm gradient + thin line pattern fading at the edges */
.ttv2.tt-page .tt-products-hero,
.ttv2.tt-page .tt-product-hero,
.ttv2.tt-page .tt-svc-hero,
.ttv2.tt-page .tt-svc-detail-hero,
.ttv2.tt-page .tt-about-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(45% 55% at 85% 20%, rgba(226, 86, 91, .10), transparent 70%),
    radial-gradient(40% 50% at 8% 90%, rgba(255, 200, 175, .25), transparent 70%),
    linear-gradient(160deg, #FFF9F7 0%, #FFFFFF 55%, #FCF6F4 100%);
}
.ttv2.tt-page .tt-products-hero::before,
.ttv2.tt-page .tt-product-hero::before,
.ttv2.tt-page .tt-svc-hero::before,
.ttv2.tt-page .tt-svc-detail-hero::before,
.ttv2.tt-page .tt-about-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(29, 33, 37, .06) 1px, transparent 1px),
    linear-gradient(rgba(29, 33, 37, .06) 1px, transparent 1px);
  background-size: 160px 160px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 50% 45%, #000 40%, transparent 85%);
          mask-image: radial-gradient(ellipse 80% 75% at 50% 45%, #000 40%, transparent 85%);
}

/* 3. Grid that lights up around the cursor, cursor ring and reading progress (same as the home page) */
.tt-spotlight {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(155, 28, 32, .12) 1px, transparent 1px),
    linear-gradient(rgba(155, 28, 32, .12) 1px, transparent 1px);
  background-size: 80px 80px;
  -webkit-mask-image: radial-gradient(240px circle at var(--spot-x, -999px) var(--spot-y, -999px), #000 0%, transparent 72%);
          mask-image: radial-gradient(240px circle at var(--spot-x, -999px) var(--spot-y, -999px), #000 0%, transparent 72%);
  opacity: 0;
  transition: opacity .4s ease;
}
html.has-pointer .tt-spotlight { opacity: 1; }

/* Trailing ring + exact dot */
.tt-cursor,
.tt-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1001; /* above the sticky header (997) */
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease, background-color .3s ease, border-color .3s ease;
}
.tt-cursor {
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 1.5px solid var(--tt-brand, #9B1C20);
  transform: translate3d(var(--ring-x, -100px), var(--ring-y, -100px), 0) scale(var(--ring-scale, 1));
  transition: opacity .3s ease, background-color .3s ease, border-color .3s ease, transform .15s linear;
}
.tt-cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--tt-brand, #9B1C20);
  transform: translate3d(var(--dot-x, -100px), var(--dot-y, -100px), 0);
}
html.has-pointer .tt-cursor,
html.has-pointer .tt-cursor-dot { opacity: 1; }
html.is-cursor-active .tt-cursor { background-color: rgba(155, 28, 32, .08); border-color: rgba(155, 28, 32, .45); }
html.is-cursor-active .tt-cursor-dot { opacity: 0; }

/* Reading progress */
.tt-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1002;
  height: 2px;
  background: linear-gradient(90deg, #C53A40, #9B1C20, #6E1417);
  transform-origin: left;
  transform: scaleX(var(--scroll-progress, 0));
  pointer-events: none;
}

/* Touch screens and reduced motion: no cursor effects */
@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  .tt-cursor, .tt-cursor-dot, .tt-spotlight { display: none; }
}