/* =================================================================
   MADRAS DIGITAL FORGE — core components (home + shared)
   ================================================================= */
:root{
  --mid:   #050A24;
  --mid-2: #0A1238;
  --mid-3: #0E1A4D;
  --txt-d: #A9B2D8;
  --line-d: rgba(255,255,255,.10);
  --ease-x: cubic-bezier(.16,1,.3,1);
}
body[data-page="home"]{ background: var(--mid); }
body[data-nav="overlay"]{ background: #fff; }
body[data-page="home"][data-nav="overlay"]{ background: var(--mid); }
.hx{ overflow-x: clip; }
.hx-wrap{ max-width: 1320px; margin: 0 auto; padding: 0 var(--pad); }

/* ---------- loader ---------- */
.hx-loader{
  position: fixed; inset: 0; z-index: 100000;
  display: grid; place-content: center; justify-items: center; gap: 28px;
  background: #050A24;
  animation: hxLoaderOut .6s 2.6s forwards;   /* safety net if JS fails */
}
.hx-loader img{ width: min(260px, 60vw); height: auto; }
.hx-loader__bar{ width: 180px; height: 2px; background: rgba(255,255,255,.12); border-radius: 2px; overflow: hidden; }
.hx-loader__bar i{ display: block; height: 100%; width: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); animation: hxBar 1.1s .1s var(--ease-x, ease) forwards; }
.hx-loader.is-skip{ display: none; }
@keyframes hxBar{ to{ transform: scaleX(1); } }
@keyframes hxLoaderOut{ to{ opacity: 0; visibility: hidden; } }

/* ---------- buttons ---------- */
.hx-btn{
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 28px;
  border-radius: 999px; border: 1px solid transparent;
  font: 600 16px/1 var(--f); letter-spacing: -0.01em;
  color: inherit; cursor: pointer; white-space: nowrap; overflow: hidden;
  transition: background .3s, color .3s, border-color .3s, box-shadow .3s;
  will-change: transform;
}
.hx-btn svg{ transition: transform .35s var(--ease-x); }
.hx-btn:hover svg{ transform: translateX(4px); }
.hx-btn--primary{
  background: var(--grad); color: #fff;
  box-shadow: 0 14px 34px -14px rgba(227,38,47,.85), inset 0 1px 0 rgba(255,255,255,.28);
}
.hx-btn--primary::after{
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.5) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s var(--ease-x);
}
.hx-btn--primary:hover::after{ transform: translateX(120%); }
.hx-btn--primary:hover{ box-shadow: 0 20px 44px -14px rgba(227,38,47,.95), inset 0 1px 0 rgba(255,255,255,.28); }
.hx-btn--glass{ background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.hx-btn--glass:hover{ background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.32); }
.hx-btn--white{ background: #fff; color: #0A1030; box-shadow: 0 16px 40px -18px rgba(0,0,0,.5); }
.hx-btn--white:hover{ background: #0A1030; color: #fff; }
.hx-btn--dark{ background: #0A1030; color: #fff; }
.hx-btn--dark:hover{ background: var(--red); }
.hx-btn--line{ border-color: var(--line-l-2); color: #0A1030; }
.hx-btn--line:hover{ border-color: #0A1030; background: #0A1030; color: #fff; }

/* ---------- shared heads ---------- */
.hx-kicker{
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0; font-size: 14px; font-weight: 600; letter-spacing: 0;
  color: var(--red);
}
.hx-kicker::before{ content: ""; width: 28px; height: 2px; border-radius: 2px; background: var(--grad); }
.hx-h2{
  font-size: clamp(36px, 4.6vw, 68px);
  font-weight: 600; letter-spacing: -0.045em; line-height: 1.02;
  margin: 18px 0 0; text-wrap: balance;
}
.hx-sechead{
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 32px 64px; align-items: end;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.hx-sechead > p{ margin: 0; font-size: 18px; line-height: 1.6; color: var(--gray); max-width: 30em; justify-self: end; }
.hx-sechead > .hx-btn{ justify-self: end; }
.hx-sechead--dark .hx-kicker{ color: var(--sun); }
.hx-sechead--dark > p{ color: var(--txt-d); }

/* line masks from SplitText */
.hx [data-split] .line-mask, .hx-hero__title .line-mask{ padding-bottom: .08em; margin-bottom: -.08em; }

/* ---------- hero ---------- */
.hx-hero{
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 140px 0 130px;
  color: #fff;
  background:
    radial-gradient(ellipse 70% 50% at 50% 105%, rgba(227,38,47,.55), transparent 70%),
    radial-gradient(ellipse 60% 50% at 15% 0%, rgba(28,46,140,.65), transparent 70%),
    var(--mid);
}
.hx-hero__video{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; background: #050A24; filter: brightness(.72) saturate(1.08); }
.hx-hero__shade{
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 52% at 50% 50%, rgba(5,10,36,.80), rgba(5,10,36,.55) 55%, rgba(5,10,36,.25) 85%),
    linear-gradient(to bottom, rgba(5,10,36,.70) 0%, rgba(5,10,36,.25) 35%, rgba(5,10,36,.35) 70%, rgba(5,10,36,1) 100%),
    radial-gradient(ellipse 70% 40% at 50% 110%, rgba(227,38,47,.35), transparent 70%);
}
/* reel pause/play and scroll cue */
.hx-reelctl{
  position: absolute; left: var(--pad); bottom: 34px; z-index: 2;
  display: inline-flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 16px 0 12px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: #fff;
  font: 500 14px/1 var(--f); cursor: pointer;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background .25s, border-color .25s;
}
.hx-reelctl:hover{ background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.32); }
.hx-reelctl[hidden]{ display: none; }
.hx-reelctl__icon{ position: relative; display: inline-flex; gap: 4px; width: 18px; height: 18px; align-items: center; justify-content: center; border-radius: 50%; background: #fff; }
.hx-reelctl__icon i{ width: 2px; height: 7px; background: #050A24; border-radius: 1px; }
.hx-reelctl[aria-pressed="true"] .hx-reelctl__icon i{ display: none; }
.hx-reelctl[aria-pressed="true"] .hx-reelctl__icon::after{ content: ""; margin-left: 2px; border-left: 7px solid #050A24; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; }
.hx-scrollcue{
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 500; letter-spacing: .02em; color: rgba(255,255,255,.75);
}
.hx-scrollcue i{ position: relative; width: 1px; height: 44px; background: rgba(255,255,255,.2); overflow: hidden; }
.hx-scrollcue i::after{ content: ""; position: absolute; left: 0; top: -50%; width: 1px; height: 50%; background: #fff; animation: hxCue 1.8s cubic-bezier(.6,0,.3,1) infinite; }
@keyframes hxCue{ to{ top: 100%; } }

/* showcase section (3D screens) */
.hx-showcase{ position: relative; background: var(--mid); color: #fff; padding: clamp(24px, 4vw, 56px) 0 clamp(100px, 12vw, 170px); overflow: hidden; }
.hx-hero__grain{
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hx-hero::after{
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 220px; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--mid));
}
.hx-hero__inner{ max-width: 1120px; margin: 0 auto; padding: 0 var(--pad); text-align: center; }
.hx-pill{
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  padding: 8px 16px 8px 12px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 14px; font-weight: 500; color: #DCE1F7;
}
.hx-pill__dot{ width: 8px; height: 8px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 0 rgba(255,138,61,.6); animation: hxPulse 2.4s infinite; }
@keyframes hxPulse{ 70%{ box-shadow: 0 0 0 9px rgba(255,138,61,0); } 100%{ box-shadow: 0 0 0 0 rgba(255,138,61,0); } }
.hx-hero__title{
  margin: 30px auto 0;
  font-size: clamp(44px, 5vw, 108px);
  font-weight: 600; letter-spacing: -0.055em; line-height: 1.1;
  max-width: 20ch; text-wrap: balance;
  color: #fff;
}
.hx-hero__title .line{
  background: linear-gradient(180deg, #FFFFFF 35%, #C2CAEC 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hx-hero__sub{ margin: 28px auto 0; max-width: 640px; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.6; color: var(--txt-d); }
.hx-hero__ctas{ display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 40px; }

/* showcase */
.hx-show{ position: relative; margin-top: 0; padding: 0 var(--pad); perspective: 1800px; }
.hx-show__stage{ position: relative; max-width: 1140px; margin: 0 auto; transform-style: preserve-3d; transform-origin: 50% 0; }
.js .hx-show__stage{ transform: rotateX(22deg) scale(.92); }
.hx-show__glow{
  position: absolute; inset: 8% 4% -14%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255,138,61,.6), rgba(227,38,47,.35) 45%, transparent 75%);
  filter: blur(50px);
}
.hx-win{
  border-radius: 14px; overflow: hidden;
  background: #0B1440;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 60px 120px -40px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.06);
}
.hx-win__bar{
  position: relative; display: flex; align-items: center; height: 38px; padding: 0 14px;
  background: rgba(255,255,255,.05); border-bottom: 1px solid rgba(255,255,255,.08);
}
.hx-win__dots{ display: flex; gap: 7px; }
.hx-win__dots i{ width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.22); }
.hx-win__url{
  position: absolute; left: 50%; transform: translateX(-50%);
  max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; color: var(--txt-d); background: rgba(255,255,255,.06); padding: 4px 14px; border-radius: 6px;
}
.hx-win img{ display: block; width: 100%; height: auto; }
.hx-win__crop{ aspect-ratio: 16 / 10.5; overflow: hidden; }
.hx-win__crop img{ height: 100%; object-fit: cover; object-position: top; }
.hx-show__float{ position: absolute; width: 34%; }
.hx-show__float--l{ left: -5%; bottom: -12%; transform: translateZ(60px); }
.hx-show__float--r{ right: -5%; top: -10%; transform: translateZ(90px); }

/* ---------- marquee ---------- */
.hx-marquee{ background: var(--mid); color: #fff; padding: 48px 0 56px; border-top: 1px solid var(--line-d); }
.hx-marquee__label{ margin: 0 0 30px; text-align: center; font-size: 14px; color: var(--txt-d); padding: 0 var(--pad); }
.hx-marquee__mask{ overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.hx-marquee__track{ display: flex; width: max-content; animation: hxMarquee 38s linear infinite; }
.hx-marquee__mask:hover .hx-marquee__track{ animation-play-state: paused; }
.hx-marquee__group{ display: flex; flex: none; }
.hx-marquee__group span{
  display: inline-flex; align-items: center; gap: 56px; padding-right: 56px;
  font-size: clamp(22px, 2.6vw, 36px); font-weight: 600; letter-spacing: -0.03em; white-space: nowrap;
  color: rgba(255,255,255,.88);
}
.hx-marquee__group span::after{ content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--grad); }
@keyframes hxMarquee{ to{ transform: translateX(-50%); } }

/* ---------- statement ---------- */
.hx-statement{ background: var(--mid); color: #fff; padding: clamp(110px, 15vw, 220px) 0; }
.hx-statement__text{
  margin: 0; max-width: 1180px;
  font-size: clamp(30px, 4.2vw, 62px); font-weight: 500; letter-spacing: -0.04em; line-height: 1.12;
  text-wrap: pretty;
}

/* ---------- services bento ---------- */
.hx-services{
  position: relative; z-index: 2;
  background: var(--paper); color: #0A1030;
  padding: clamp(96px, 11vw, 160px) 0;
  border-radius: clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px) 0 0;
}
.hx-bento{ display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(270px, auto); gap: 16px; }
.hx-tile{
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 32px; border-radius: 26px;
  background: #fff; border: 1px solid var(--line-l); color: inherit;
  transition: translate .5s var(--ease-x), box-shadow .5s var(--ease-x), border-color .3s;
}
.hx-tile::before{
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(255,138,61,.16), transparent 45%);
}
.hx-tile:hover{ translate: 0 -6px; box-shadow: 0 40px 70px -40px rgba(10,16,48,.35); border-color: var(--line-l-2); }
.hx-tile:hover::before{ opacity: 1; }
.hx-tile__icon{
  width: 50px; height: 50px; flex: none; border-radius: 14px; display: grid; place-items: center;
  background: var(--paper); color: var(--red); border: 1px solid var(--line-l);
}
.hx-tile h3{ margin: auto 0 10px; padding-top: 36px; font-size: 24px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.hx-tile p{ margin: 0; font-size: 16px; line-height: 1.55; color: var(--gray); }
.hx-tile__more{ display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font-size: 15px; font-weight: 600; }
.hx-tile__more svg{ transition: transform .35s var(--ease-x); }
.hx-tile:hover .hx-tile__more svg{ transform: translateX(4px); }

.hx-tile--erp{ grid-column: span 2; grid-row: span 2; background: #050A24; color: #fff; border-color: transparent; padding-bottom: 0; }
.hx-tile--erp::before{ background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(255,138,61,.22), transparent 45%); }
.hx-tile--erp::after{ content: ""; position: absolute; inset: auto -20% -30% -20%; height: 70%; z-index: -2; background: radial-gradient(closest-side, rgba(227,38,47,.5), transparent 75%); filter: blur(20px); }
.hx-tile--erp .hx-tile__icon{ background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: var(--sun); }
.hx-tile--erp h3{ margin-top: 36px; padding-top: 0; font-size: clamp(28px, 2.6vw, 38px); }
.hx-tile--erp p{ color: var(--txt-d, #A9B2D8); max-width: 30em; }
.hx-tile__shot{ margin: 36px -33px 0 24px; border-radius: 14px 0 0 0; overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-right: 0; border-bottom: 0; transform: translateY(18px); transition: transform .7s var(--ease-x); box-shadow: 0 -20px 60px -20px rgba(0,0,0,.6); }
.hx-tile__shot img{ display: block; width: 100%; height: auto; }
.hx-tile--erp:hover .hx-tile__shot{ transform: translateY(0); }

.hx-tile--web{ grid-column: span 2; flex-direction: row; gap: 24px; padding-right: 0; padding-bottom: 0; }
.hx-tile--web .hx-tile__body{ display: flex; flex-direction: column; flex: 1 1 52%; padding-bottom: 32px; }
.hx-tile__peek{ flex: 1 1 48%; align-self: flex-end; height: 100%; max-height: 240px; border-radius: 14px 0 0 0; overflow: hidden; border: 1px solid var(--line-l); border-right: 0; border-bottom: 0; }
.hx-tile__peek img{ width: 100%; height: auto; display: block; transform: translateY(0); transition: transform 4s var(--ease-x); }
.hx-tile--web:hover .hx-tile__peek img{ transform: translateY(-30%); }
.hx-tile--wide{ grid-column: span 2; }

/* ---------- work (horizontal) ---------- */
.hx-work{ position: relative; background: var(--mid); color: #fff; padding: clamp(96px, 11vw, 150px) 0; overflow: hidden; }
.hx-work__viewport{ overflow: visible; }
.hx-work__track{ display: flex; gap: 28px; width: max-content; padding: 0 var(--pad); }
.hx-case{
  flex: none; width: min(80vw, 1060px);
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(28px, 3.5vw, 52px); align-items: center;
  padding: 24px; border-radius: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border: 1px solid var(--line-d);
}
.hx-case__shot{
  display: block; aspect-ratio: 4 / 3.15; border-radius: 16px;
  background-color: #0B1440; background-repeat: no-repeat; background-size: 100% auto; background-position: 50% 0;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.8);
  animation: hxShot 22s ease-in-out infinite alternate;
}
.hx-case:nth-child(2) .hx-case__shot{ animation-delay: -6s; }
.hx-case:nth-child(3) .hx-case__shot{ animation-delay: -11s; }
.hx-case:nth-child(4) .hx-case__shot{ animation-delay: -16s; }
@keyframes hxShot{ 0%, 8%{ background-position: 50% 0; } 92%, 100%{ background-position: 50% 100%; } }
.hx-case__body{ padding-right: clamp(4px, 1.5vw, 20px); }
.hx-case__num{ font-size: 13px; color: var(--txt-d); font-variant-numeric: tabular-nums; }
.hx-case__client{ margin: 14px 0 0; font-size: 15px; font-weight: 600; color: var(--sun); }
.hx-case h3{ margin: 12px 0 14px; font-size: clamp(24px, 2.4vw, 36px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; }
.hx-case p{ margin: 0; color: var(--txt-d); font-size: 16px; line-height: 1.6; }
.hx-case__tags{ display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 26px; }
.hx-case__tags li{ padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-d); font-size: 13px; color: #DCE1F7; }
.hx-case__link{ display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.3); padding-bottom: 3px; transition: color .25s, border-color .25s; }
.hx-case__link:hover{ color: var(--sun); border-color: var(--sun); }
.hx-work__progress{ height: 2px; margin-top: 56px; background: var(--line-d); border-radius: 2px; overflow: hidden; }
.hx-work__progress i{ display: block; height: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); }

@media (min-width: 1024px){
  .hx-work{ padding-top: 96px; }
  .hx-work .hx-sechead{ margin-bottom: 40px; }
  .hx-case__shot{ aspect-ratio: auto; height: min(50vh, 500px); }
}

/* ---------- ERP ---------- */
.hx-erp{ background: #fff; color: #0A1030; padding: clamp(96px, 11vw, 160px) 0; border-radius: clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px) 0 0; position: relative; z-index: 2; }
.hx-erp__grid{ display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(48px, 6vw, 96px); align-items: start; }
.hx-erp__copy{ position: sticky; top: 120px; }
.hx-erp__lede{ margin: 26px 0 0; font-size: 18px; line-height: 1.6; color: var(--gray); max-width: 30em; }
.hx-stats{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 44px; border-top: 1px solid var(--line-l); }
.hx-stat{ padding: 24px 16px 0 0; }
.hx-stat + .hx-stat{ padding-left: 20px; border-left: 1px solid var(--line-l); }
.hx-stat strong{
  display: block; font-size: clamp(38px, 3.8vw, 58px); font-weight: 600; letter-spacing: -0.05em; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.hx-stat span{ display: block; margin-top: 10px; font-size: 14px; color: var(--gray); }
.hx-erp__ctas{ display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.hx-win--light{ background: #fff; border-color: var(--line-l); box-shadow: 0 50px 100px -50px rgba(10,16,48,.45); }
.hx-win--light .hx-win__bar{ background: var(--paper); border-bottom-color: var(--line-l); }
.hx-win--light .hx-win__dots i{ background: var(--line-l-2); }
.hx-win--light .hx-win__url{ background: #fff; color: var(--gray); }
.hx-mods{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 28px; }
.hx-mods a{
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; border-radius: 14px;
  background: var(--paper); border: 1px solid transparent;
  font-size: 15.5px; font-weight: 500; color: #0A1030;
  transition: background .25s, border-color .25s, transform .35s var(--ease-x), box-shadow .35s;
}
.hx-mods a i{ width: 8px; height: 8px; border-radius: 50%; background: var(--grad); flex: none; transition: transform .3s var(--ease-x); }
.hx-mods a:hover{ background: #fff; border-color: var(--line-l); transform: translateX(4px); box-shadow: 0 14px 30px -20px rgba(10,16,48,.35); }
.hx-mods a:hover i{ transform: scale(1.6); }

/* ---------- process ---------- */
.hx-process{ background: var(--mid); color: #fff; padding: clamp(96px, 11vw, 160px) 0; }
.hx-steps{ position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.hx-steps__line{ position: absolute; top: 28px; left: 28px; right: 28px; height: 2px; background: var(--line-d); border-radius: 2px; }
.hx-steps__line i{ display: block; height: 100%; background: var(--grad); transform-origin: left; transform: scaleX(1); border-radius: 2px; }
.js .hx-steps__line i{ transform: scaleX(0); }
.hx-step{ position: relative; }
.hx-step__dot{
  position: relative; z-index: 1;
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--mid-2); border: 1px solid rgba(255,255,255,.18);
  font-weight: 600; font-size: 18px; transition: background .5s, border-color .5s, box-shadow .5s;
}
.hx-step.is-on .hx-step__dot{ background: var(--grad); border-color: transparent; box-shadow: 0 0 0 8px rgba(255,138,61,.12); }
.hx-step h3{ margin: 30px 0 10px; font-size: 22px; font-weight: 600; letter-spacing: -0.025em; }
.hx-step p{ margin: 0; font-size: 16px; line-height: 1.6; color: var(--txt-d); }

/* ---------- CTA ---------- */
.hx-cta{ background: var(--mid); padding: 0 var(--pad) clamp(96px, 10vw, 140px); }
.hx-cta__panel{
  position: relative; isolation: isolate; overflow: hidden;
  max-width: 1320px; margin: 0 auto; text-align: center; color: #fff;
  padding: clamp(64px, 9vw, 130px) clamp(24px, 6vw, 96px);
  border-radius: clamp(28px, 4vw, 48px);
  background: linear-gradient(120deg, #FF8A3D, #E3262F 45%, #9C1630 75%, #FF8A3D);
  background-size: 300% 300%;
  animation: hxGrad 14s ease infinite;
}
@keyframes hxGrad{ 0%,100%{ background-position: 0% 50%; } 50%{ background-position: 100% 50%; } }
.hx-cta__grid{
  position: absolute; inset: 0; z-index: -1; opacity: .25;
  background-image: linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000, transparent 75%); mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000, transparent 75%);
}
.hx-cta__title{ margin: 0 auto; font-size: clamp(40px, 6vw, 88px); font-weight: 600; letter-spacing: -0.05em; line-height: 1; max-width: 14ch; }
.hx-cta__panel p{ margin: 24px auto 0; max-width: 520px; font-size: 18px; line-height: 1.6; color: rgba(255,255,255,.88); }
.hx-cta__actions{ display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 40px; }

/* ---------- contact ---------- */
.hx-contact{ background: var(--paper); color: #0A1030; padding: clamp(96px, 11vw, 150px) 0; }
.hx-contact__grid{ display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.hx-contact__intro > p{ margin: 22px 0 0; font-size: 18px; color: var(--gray); max-width: 28em; }
.hx-details{ margin: 44px 0 0; display: grid; gap: 24px; }
.hx-details div{ padding-top: 16px; border-top: 1px solid var(--line-l-2); }
.hx-details dt{ font-size: 14px; color: var(--gray); margin-bottom: 6px; }
.hx-details dd{ margin: 0; font-size: 18px; line-height: 1.5; font-weight: 500; }
.hx-details a:hover{ color: var(--red); }
.hx-form{ background: #fff; border-radius: 28px; padding: clamp(24px, 3.6vw, 48px); border: 1px solid var(--line-l); box-shadow: 0 40px 80px -60px rgba(10,16,48,.4); }
.hx-form__row{ display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.hx-field{ display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.hx-field label, .hx-chips legend{ font-size: 14px; font-weight: 600; color: var(--gray-d); }
.hx-field input, .hx-field textarea{
  font: inherit; font-size: 16px; color: #0A1030;
  padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-l-2); background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.hx-field textarea{ resize: vertical; min-height: 130px; }
.hx-field input:focus, .hx-field textarea:focus{ outline: none; border-color: var(--sun); box-shadow: 0 0 0 4px rgba(255,138,61,.18); }
.hx-field input[aria-invalid="true"]{ border-color: var(--red); }
.hx-chips{ border: 0; padding: 0; margin: 4px 0 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.hx-chips legend{ margin-bottom: 12px; padding: 0; }
.hx-chips label{ position: relative; cursor: pointer; }
.hx-chips input{ position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.hx-chips span{ display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-l-2); font-size: 15px; transition: background .2s, color .2s, border-color .2s; }
.hx-chips input:checked + span{ background: #0A1030; border-color: #0A1030; color: #fff; }
.hx-chips input:focus-visible + span{ outline: 2px solid var(--sun); outline-offset: 2px; }
.hx-form__send{ display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.hx-form__fine{ margin: 0; font-size: 14px; color: var(--gray); max-width: 24em; }
.hx-form__status{ display: none; margin: 18px 0 0; padding: 14px 16px; border-radius: 12px; font-size: 15px; }
.hx-form__status.is-ok{ display: block; background: #EAF6EE; color: #1E5C38; }
.hx-form__status.is-err{ display: block; background: #FDECEC; color: #9B1C22; }

/* ---------- responsive ---------- */
@media (max-width: 1023px){
  .hx-sechead{ grid-template-columns: 1fr; }
  .hx-sechead > p, .hx-sechead > .hx-btn{ justify-self: start; }
  .hx-bento{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-tile--erp{ grid-row: auto; }
  .hx-work__track{ flex-direction: column; width: auto; }
  .hx-case{ width: auto; grid-template-columns: 1fr; }
  .hx-work__progress{ display: none; }
  .hx-erp__grid, .hx-contact__grid{ grid-template-columns: 1fr; }
  .hx-erp__copy{ position: static; }
  .hx-steps{ grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .hx-steps__line{ display: none; }
}
@media (max-width: 640px){
  .hx-hero{ padding-top: 120px; padding-bottom: 120px; }
  .hx-reelctl__label{ display: none; }
  .hx-reelctl{ padding: 0 12px; }
  .hx-scrollcue{ display: none; }
  .hx-hero__ctas .hx-btn{ flex: 1 1 100%; }
  .hx-show__float{ width: 44%; }
  .hx-show .hx-win__url{ display: none; }
  .hx-win__bar{ height: 26px; }
  .hx-show__float--l{ left: -2%; bottom: -16%; }
  .hx-show__float--r{ right: -2%; top: -14%; }
  .hx-bento{ grid-template-columns: 1fr; }
  .hx-tile--erp, .hx-tile--web, .hx-tile--wide{ grid-column: auto; }
  .hx-tile--web{ flex-direction: column; padding-right: 32px; }
  .hx-tile__peek{ margin-right: -32px; max-height: 200px; }
  .hx-tile__shot{ margin-left: 0; margin-right: -32px; }
  .hx-case{ padding: 16px; border-radius: 24px; }
  .hx-mods{ grid-template-columns: 1fr; }
  .hx-stats{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hx-stat + .hx-stat{ padding-left: 12px; }
  .hx-steps{ grid-template-columns: 1fr; }
  .hx-form__row{ grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce){
  .hx-loader{ display: none; }
  .js .hx-show__stage{ transform: none; }
  .js .hx-steps__line i{ transform: scaleX(1); }
  .hx-marquee__track, .hx-case__shot, .hx-cta__panel, .hx-scrollcue i::after{ animation: none; }
}

/* ---------- web-first refresh ---------- */
.hx-show__page{ aspect-ratio: 16 / 8.4; background-repeat: no-repeat; background-size: 100% auto; background-position: 50% 0; animation: hxShot 26s ease-in-out infinite alternate; }
.hx-tile__shot--page{ aspect-ratio: 16 / 9; background-color: #0B1440; background-repeat: no-repeat; background-size: 100% auto; background-position: 50% 0; animation: hxShot 22s ease-in-out infinite alternate; }

/* Kalvisalai ERP: compact secondary band */
.hx-erpband{ background: var(--paper); color: #0A1030; padding: 0 0 clamp(80px, 9vw, 130px); position: relative; z-index: 2; }
.hx-erpband__inner{ display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px clamp(40px, 6vw, 96px); align-items: center; }
.hx-erpband__inner{ padding-top: clamp(36px, 4vw, 56px); padding-bottom: clamp(36px, 4vw, 56px); border-top: 1px solid var(--line-l-2); }
.hx-erpband__title{ margin: 14px 0 0; font-size: clamp(26px, 2.6vw, 38px); font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; max-width: 22ch; }
.hx-erpband__copy > p:last-child{ margin: 16px 0 0; font-size: 16.5px; line-height: 1.6; color: var(--gray); max-width: 36em; }
.hx-erpband__links{ display: grid; gap: 10px; }
.hx-erpband__links a{ display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-radius: 14px; background: #fff; border: 1px solid var(--line-l); font-size: 16px; font-weight: 600; transition: border-color .25s, translate .4s var(--ease-x), box-shadow .4s; }
.hx-erpband__links a svg{ transition: transform .35s var(--ease-x); }
.hx-erpband__links a:hover{ border-color: var(--line-l-2); translate: 4px 0; box-shadow: 0 16px 30px -22px rgba(10,16,48,.35); }
.hx-erpband__links a:hover svg{ transform: translateX(3px); }
@media (max-width: 1023px){ .hx-erpband__inner{ grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce){ .hx-show__page, .hx-tile__shot--page{ animation: none; } }

/* reel pause button: hidden on screen, appears only when a keyboard user tabs to it */
.hx-reelctl:not(:focus-visible){
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important;
  margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important;
}
