/* Homepage only (src/pages/index.astro). Every class is hx- prefixed so nothing here can reach other pages.
   Tokens come from site.css. Behaviour lives in home.js. */

/* ── Hero: headline, then a 3D stack of real screens; side by side from 1024px ── */
.hx-hero.hero0 { padding: 34px var(--gut) 56px; }
.hx-hero h1 { font: 600 clamp(46px, 13.4vw, 168px)/.94 var(--head); letter-spacing: -.035em; margin-top: 14px; max-width: 15ch; }
.hx-hero h1 .w, .hx-hero h1 .wi { color: inherit; }
.hx-copy .page-sub { margin-top: 28px; max-width: 46ch; }
.hx-copy .cred { margin-top: 18px; }
.hx-copy .stats { margin-top: 34px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hx-copy .stats div { display: block; border: 0; padding: 10px 8px 0 0; }
.hx-copy .stats b { font-size: clamp(38px, 4.4vw, 60px); }
.hx-copy .stats span { font-size: 13px; }
.hx-stage { position: relative; margin: 30px 0 0; perspective: 1300px; padding-top: 30%; }
.hx-stack { position: relative; aspect-ratio: 16 / 10; width: 86%; transform-style: preserve-3d; --t: 1; --s: 1; --px: 0; --py: 0;
  transform: rotateX(calc(var(--t) * 20deg + var(--py) * 1deg)) rotateY(calc(var(--t) * -16deg + var(--px) * 1deg)) rotateZ(calc(var(--t) * 3deg)); }
.hx-layer { position: absolute; inset: 0; margin: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--card); box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); }
.hx-layer img, .hx-layer video { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.hx-l2 { transform: translate3d(calc(var(--s) * 5%), calc(var(--s) * -25%), calc(var(--s) * -40px)); filter: brightness(.85); }
.hx-l3 { transform: translate3d(calc(var(--s) * 10%), calc(var(--s) * -50%), calc(var(--s) * -80px)); filter: brightness(.7); }
.hx-tag { position: absolute; left: 10px; top: 8px; font: 600 11px var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: rgba(20,21,23,.85); }
.hx-cap { position: absolute; left: 8px; bottom: 8px; display: flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 999px; background: rgba(20,21,23,.86); font-size: 12px; }
.hx-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--wire); flex: none; }
.hx-dot.pulse { position: relative; }
.motion .hx-dot.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--wire); animation: hx-ping 1.8s var(--ease) infinite; }
@keyframes hx-ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(2.6); opacity: 0; } }
.motion .hx-stack.pre { --s: 2.4; --t: 1.6; opacity: 0; }
.motion .hx-stack.assemble, .motion .hx-stack.assemble .hx-layer { transition: opacity .6s var(--ease), transform 1.4s var(--ease); }

/* ── What we build: tabs over device frames ── */
.hx-tabs { display: flex; gap: 6px; margin-top: 26px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut); }
.hx-tabs::-webkit-scrollbar { display: none; }
.hx-tabs button { flex: 0 0 auto; min-height: 48px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: none; font: 600 16px var(--sans); color: var(--ink-2); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.hx-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bp); border-color: var(--ink); }
.hx-panels { margin-top: 24px; touch-action: pan-y; }
.hx-show { display: grid; gap: 26px; outline: none; }
.hx-show + .hx-show { margin-top: 56px; }
.is-tabbed .hx-show + .hx-show { margin-top: 0; }
.hx-devices { position: relative; padding-bottom: 46px; }
.hx-browser { margin: 0; width: 92%; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.hx-browser img, .hx-browser video { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }
.hx-chrome { display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.hx-chrome i { width: 7px; height: 7px; border-radius: 50%; background: var(--pale); }
.hx-chrome em { margin-left: 8px; font-style: normal; font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-phone { position: absolute; right: 0; bottom: 0; width: 30%; margin: 0; border-radius: 16px; overflow: hidden; border: 5px solid #2a2c31; background: #000; box-shadow: 0 24px 50px -16px rgba(0,0,0,.8); }
.hx-phone.light { border-color: #d9dde3; background: #fff; }
.hx-phone img { width: 100%; height: auto; aspect-ratio: 520 / 1000; object-fit: cover; object-position: top; }
.hx-chip { position: absolute; right: 0; bottom: 0; margin: 0; display: grid; gap: 6px; max-width: 62%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #1F2125; box-shadow: 0 24px 50px -16px rgba(0,0,0,.8); font-size: 14px; }
.hx-vt { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.hx-show-text { display: grid; gap: 12px; align-content: start; }
.hx-kick { font-size: 14px; color: var(--ink-2); }
.hx-show-text h3 { font: 600 clamp(30px, 8.4vw, 48px)/1 var(--head); letter-spacing: -.025em; }
.hx-lead { color: var(--ink-2); font-size: 16px; }
.hx-res { list-style: none; border-top: 1px solid var(--ink); }
.hx-res li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); }
.hx-res b { font: 600 28px var(--head); white-space: nowrap; }
.hx-res span { color: var(--ink-2); font-size: 15px; }
.hx-links { display: flex; flex-wrap: wrap; gap: 0 22px; }
.hx-links a, .hx-more { display: inline-flex; align-items: center; min-height: 48px; font-weight: 600; }
@keyframes hx-in-r { from { opacity: 0; transform: translateX(40px); } }
@keyframes hx-in-l { from { opacity: 0; transform: translateX(-40px); } }
@keyframes hx-pop { from { opacity: 0; transform: translateY(30px) scale(.94); } }
@keyframes hx-rise { from { opacity: 0; transform: translateY(18px); } }
.motion .hx-show.fromR .hx-browser { animation: hx-in-r .55s var(--ease) both; }
.motion .hx-show.fromL .hx-browser { animation: hx-in-l .55s var(--ease) both; }
.motion .hx-show.fromR :is(.hx-phone, .hx-chip), .motion .hx-show.fromL :is(.hx-phone, .hx-chip) { animation: hx-pop .6s var(--ease) .15s both; }
.motion .hx-show.fromR .hx-show-text > *, .motion .hx-show.fromL .hx-show-text > * { animation: hx-rise .5s var(--ease) both; }

/* ── Work: swipe with a position ── */
.hx-work { position: relative; }
.hx-pos { position: absolute; right: var(--gut); top: -40px; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hx-gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 86%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: var(--gut); padding: 6px var(--gut); scrollbar-width: none; overscroll-behavior-x: contain; }
.hx-gallery::-webkit-scrollbar { display: none; }
.hx-gallery article { scroll-snap-align: start; display: grid; gap: 12px; align-content: start; }
.motion .hx-gallery article { transform: scale(calc(1 - var(--k, 0) * .07)); transform-origin: left center; }
.hx-gallery h3 { font: 600 30px/1.02 var(--head); letter-spacing: -.02em; }
.hx-gallery h3 a { color: inherit; text-decoration: none; }
.hx-gallery h3 a:hover { color: var(--wire); }
.hx-r { display: flex; align-items: baseline; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.hx-r + .hx-r { border-top-style: dashed; }
.hx-r b { font: 600 28px var(--head); white-space: nowrap; }
.hx-r span { color: var(--ink-2); font-size: 15px; }
.hx-frame { margin: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(135deg, #1A2B45, #0F1C30); aspect-ratio: 16 / 10; }
.hx-frame img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }
.hx-brand { aspect-ratio: 16 / 10; border-radius: 8px; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; padding: 16px; font-size: 14px; }
.hx-brand img { width: 34%; max-width: 170px; }
.hx-brand.nim { background: #6FCFB7; color: #0D3B31; font-weight: 600; }
.hx-num { aspect-ratio: 16 / 10; border-radius: 8px; border: 1px solid var(--line); display: grid; align-content: end; padding: 20px; }
.hx-num b { font: 600 clamp(80px, 22vw, 170px)/.8 var(--head); letter-spacing: -.06em; }
.hx-num span { color: var(--ink-2); margin-top: 10px; font-size: 15px; }
.hx-num.amber { background: radial-gradient(120% 120% at 100% 0%, rgba(245,165,36,.22), transparent 60%), var(--card); }
.hx-num.amber b { color: #F5A524; }
.hx-num.violet { background: radial-gradient(120% 120% at 100% 0%, rgba(124,140,255,.24), transparent 60%), var(--card); }
.hx-num.violet b { color: #A3AEFF; }
.hx-dots { display: flex; justify-content: center; gap: 4px; margin-top: 12px; }
.hx-dots button { width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; cursor: pointer; }
.hx-dots button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pale); transition: background .2s, width .2s; }
.hx-dots button[aria-current="true"]::before { background: var(--wire); width: 22px; border-radius: 4px; }

/* ── Teasers: protection, aftercare, partner ── */
.hx-teaser-grid { display: grid; gap: 28px; }
.hx-status { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
.hx-alert { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 16px 18px; display: grid; gap: 6px; max-width: 520px; }
.hx-alert-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-2); }
.hx-alert-top b { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.hx-alert h3 { font: 600 24px/1.08 var(--head); }
.hx-alert p { color: var(--ink-2); font-size: 15px; }
.hx-att { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.hx-att span { font-size: 13px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; }
.hx-alert-cap { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.hx-chain { list-style: none; margin-top: 22px; border-top: 1px solid var(--ink); }
.hx-chain li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.hx-chain li::before { content: ""; width: 10px; height: 10px; margin-left: 4px; border-radius: 50%; border: 1.5px solid var(--ink-2); }
.hx-chain li:first-child::before { background: var(--wire); border-color: var(--wire); }
.hx-ladder { list-style: none; margin-top: 26px; border-top: 1px solid var(--ink); }
.hx-ladder li { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.hx-meter { display: flex; gap: 4px; }
.hx-meter i { width: 26px; height: 4px; border-radius: 2px; background: var(--pale); }
.hx-meter i.on { background: var(--ink); }
.hx-ladder li:last-child .hx-meter i.on { background: var(--wire); }
.hx-ladder b { font: 600 clamp(30px, 8.6vw, 52px)/1 var(--head); letter-spacing: -.03em; }
.hx-ladder p { color: var(--ink-2); max-width: 54ch; }
.hx-proof { margin-top: 24px; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; align-items: start; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.hx-proof .hx-phone { position: static; width: 100%; border-width: 4px; border-radius: 12px; }
.hx-proof p { color: var(--ink-2); font-size: 15px; }
.hx-proof b { display: block; font: 600 22px/1.1 var(--head); color: var(--ink); margin-bottom: 4px; }

/* ── Products, team, who we are ── */
.hx-plist { list-style: none; border-top: 1px solid var(--ink); }
.hx-plist li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 16px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.hx-plist .hx-ico { grid-row: span 3; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; border: 1px solid var(--line); background: var(--card); font: 600 22px var(--head); }
.hx-plist .hx-ico img { width: 100%; height: 100%; }
.hx-plist h3 { font: 600 30px/1.05 var(--head); letter-spacing: -.02em; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.hx-plist h3 a { color: inherit; text-decoration: none; }
.hx-plist h3 a:hover { color: var(--wire); }
.hx-plist p { color: var(--ink-2); font-size: 16px; }
.hx-plist .badge { font-size: 11px; padding: 3px 9px; }
.hx-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin-top: 18px; }
.hx-chips li { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.hx-chips small { color: var(--ink-2); }
.hx-reach { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 26px; border-top: 1px solid var(--ink); }
.hx-reach div { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); }
.hx-reach b { display: block; font: 600 26px var(--head); }
.hx-reach span { font-size: 14px; color: var(--ink-2); }

@media (min-width: 760px) {
  .hx-show { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
  .hx-gallery { grid-auto-columns: min(60vw, 560px); gap: 24px; }
  .hx-teaser-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 56px; align-items: start; }
  .hx-ladder li { grid-template-columns: 120px minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: 24px; }
  .hx-proof { grid-template-columns: 120px minmax(0, 1fr); gap: 24px; padding: 22px; }
  .hx-plist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
  .hx-reach { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .hx-hero.hero0 { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 10fr); column-gap: 56px; align-items: center; padding-block: 64px 90px; padding-inline: var(--gut); }
  .hx-hero h1 { font-size: clamp(64px, 6.2vw, 116px); }
  .hx-head, .hx-copy { grid-column: 1; }
  .hx-stage { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  .hx-stage .hx-stack { width: 92%; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-stack { --t: .6; --s: .8; }
}

/* The hero is the centred content box itself; its navy runs to the screen edges. */
.hx-hero.dark { box-shadow: 0 0 0 100vmax var(--bp); clip-path: inset(0 -100vmax); }
.hx-copy .rise-art { margin-top: 30px; }
.hx-copy .rise-art + .stats { margin-top: 10px; border-top: 0; }

.hx-line { color: var(--ink-2); font-size: 15px; margin-top: -4px; }

/* ── "What we build" offers: Found Everywhere (Websites) and Code Vaidya aftercare (Web apps) ── */
.hx-offer { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 18px; display: grid; gap: 14px; }
.hx-offer-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.hx-offer-h b { font: 600 clamp(24px, 2.4vw, 32px)/1.05 var(--head); letter-spacing: -.02em; }
.hx-offer-h span:not(.badge) { color: var(--ink-2); font-size: 15px; }
.hx-offer-lead { color: var(--ink-2); max-width: 64ch; }
.hx-offer ul { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--ink); }
.hx-offer li { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.hx-offer li b { font: 600 22px/1.1 var(--head); }
.hx-offer li span { color: var(--ink-2); font-size: 15px; }
.hx-offer li small { font: 12.5px/1.4 ui-monospace, Menlo, monospace; color: var(--ink-2); }
.hx-offer-for { font: 600 12px var(--sans) !important; letter-spacing: .12em; text-transform: uppercase; color: var(--wire) !important; }
.hx-offer-go { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; justify-self: start; }
@media (min-width: 760px) {
  .hx-offer { padding: 24px 26px; }
  .hx-offer ul { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 28px; }
  .hx-offer.care ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* ── NimNim "case in focus" under the work cards ── */
.hx-focus { display: grid; gap: 18px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.hx-focus h3 { font: 600 clamp(28px, 3vw, 40px)/1.05 var(--head); letter-spacing: -.02em; margin-top: 10px; max-width: 26ch; }
.hx-focus .shield-attack { margin: 0; }
@media (min-width: 1024px) { .hx-focus { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: end; column-gap: 48px; } .hx-focus .hx-links { grid-column: 1 / -1; } }
