/* JBX Graphics Works — page-specific styles (builds on /styles.css) */

/* hero */
.whero .hero__inner { grid-template-columns: 1fr 1fr; }
.whero .hero__title { font-size: clamp(3rem, 8.4vw, 6.6rem); }
.stats { margin: 30px 0 0; display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 10px 28px; }
.stats div { display: grid; gap: 2px; }
.stats dt { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; background: linear-gradient(135deg, #fff, var(--brand2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats dd { margin: 0; font-size: .78rem; color: var(--muted); }

/* tilted scrolling wall of works */
.wall { position: relative; height: min(640px, 78svh); border-radius: 28px; overflow: hidden; -webkit-mask-image: radial-gradient(ellipse 72% 68% at 50% 50%, #000 52%, transparent 100%); mask-image: radial-gradient(ellipse 72% 68% at 50% 50%, #000 52%, transparent 100%); }
.wall__plane { position: absolute; inset: -30% -18%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; transform: rotate(-12deg) skewX(4deg); }
.wall__col { overflow: hidden; }
.wall__track { display: grid; gap: 16px; animation: wallUp 38s linear infinite; }
.wall__col--down .wall__track { animation-name: wallDown; animation-duration: 44s; }
.wall__col--slow .wall__track { animation-duration: 52s; }
.wall:hover .wall__track { animation-play-state: paused; }
.wall__track img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 20px 40px -20px rgba(0,0,0,.8); border: 1px solid var(--line); }
@keyframes wallUp { from { transform: translateY(0); } to { transform: translateY(calc(-50% - 8px)); } }
@keyframes wallDown { from { transform: translateY(calc(-50% - 8px)); } to { transform: translateY(0); } }
.wall__fade { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(7,6,21,.65) 100%); }

/* customers */
.custs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.cust { position: relative; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; display: grid; align-content: end; min-height: 330px; }
.cust__fan { position: absolute; left: 50%; top: 0; width: 72%; aspect-ratio: 1; transform: translateX(-50%); }
.cust__fan img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 20px 40px -18px rgba(0,0,0,.85); transform-origin: 50% 110%; transition: transform .6s var(--ease); }
.cust__fan img:nth-child(1) { transform: rotate(-7deg); }
.cust__fan img:nth-child(2) { transform: rotate(5deg); }
.cust__fan img:nth-child(3) { transform: rotate(0deg); }
.cust:hover .cust__fan img:nth-child(1), .cust:focus-visible .cust__fan img:nth-child(1) { transform: rotate(-20deg) translate(-14%, -4%); }
.cust:hover .cust__fan img:nth-child(2), .cust:focus-visible .cust__fan img:nth-child(2) { transform: rotate(18deg) translate(14%, -4%); }
.cust:hover .cust__fan img:nth-child(3), .cust:focus-visible .cust__fan img:nth-child(3) { transform: translateY(-10%) scale(1.04); }
.cust__card { position: relative; z-index: 1; display: grid; justify-items: start; gap: 2px; padding: 56px 16px 16px; margin-top: 150px; border-radius: 20px; background: linear-gradient(180deg, rgba(14, 11, 40, .55), rgba(14, 11, 40, .95) 40%); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: border-color .3s; }
.cust:hover .cust__card { border-color: rgba(145, 94, 255, .55); }
.cust__logo { position: absolute; top: -26px; left: 16px; width: 56px; height: 56px; object-fit: contain; border-radius: 14px; background: #fff; padding: 4px; box-shadow: 0 10px 20px -8px rgba(0,0,0,.7); }
.cust__name { font-weight: 700; font-size: 1.05rem; }
.cust__role { font-size: .7rem; color: var(--muted); text-transform: uppercase; }
.cust__open { margin-top: 10px; font-size: .74rem; color: var(--cyan); transition: transform .3s var(--ease); }
.cust:hover .cust__open { transform: translateX(6px); }

/* category tabs */
.wtabs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: -12px; }
.wtab { display: inline-flex; align-items: center; gap: 10px; padding: 12px 14px 12px 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; color: var(--muted); font-weight: 600; transition: all .35s var(--ease); }
.wtab:hover { color: var(--text); border-color: rgba(255,255,255,.25); }
.wtab__count { font-size: .72rem; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.08); }
.wtab.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.wtab.is-active .wtab__count { background: var(--brand); color: #fff; }
.wdesc { margin: 18px 0 26px; font-size: .82rem; color: var(--muted); }

/* masonry grid (row spans set by works.js from each image's size) */
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); grid-auto-rows: 6px; gap: 0 16px; }
.wgrid.is-web { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.wshot { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--bg2); border-radius: 14px; overflow: hidden; cursor: zoom-in; margin-bottom: 16px; animation: wIn .6s var(--ease) both; animation-delay: var(--d, 0ms); }
.wshot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.wshot:hover img { transform: scale(1.05); }
.wshot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(7,6,21,.7), transparent 40%); opacity: 0; transition: opacity .35s; }
.wshot:hover::after, .wshot:focus-visible::after { opacity: 1; }
.wshot__n { position: absolute; z-index: 1; left: 10px; bottom: 10px; font-size: .7rem; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transform: translateY(6px); transition: all .35s var(--ease); }
.wshot:hover .wshot__n, .wshot:focus-visible .wshot__n { opacity: 1; transform: none; }
.wgrid.is-leaving .wshot { animation: wOut .3s var(--ease) both; }
@keyframes wIn { from { opacity: 0; transform: translateY(26px) scale(.96); } }
@keyframes wOut { to { opacity: 0; transform: scale(.96); } }
.wmore-wrap { margin-top: 18px; }
#wleft { font-size: .75rem; color: var(--muted); }

/* phones */
.phones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; align-items: start; }
.phone { position: relative; padding: 0; border: 0; background: none; cursor: zoom-in; display: grid; gap: 14px; justify-items: center; color: var(--text); }
.phone:nth-child(even) { margin-top: 60px; }
.phone__screen { position: relative; display: block; width: 100%; max-width: 250px; aspect-ratio: 738 / 1600; border-radius: 34px; padding: 10px; background: linear-gradient(160deg, #2a2550, #0d0b24); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 40px 80px -30px rgba(145, 94, 255, .55), inset 0 0 0 2px rgba(0,0,0,.6); transition: transform .6s var(--ease); animation: bob 7s ease-in-out infinite; }
.phone:nth-child(2) .phone__screen { animation-delay: -2s; } .phone:nth-child(3) .phone__screen { animation-delay: -4s; } .phone:nth-child(4) .phone__screen { animation-delay: -6s; }
.phone__screen::before { content: ""; position: absolute; z-index: 2; top: 16px; left: 50%; width: 30%; height: 16px; transform: translateX(-50%); border-radius: 10px; background: #05040f; }
.phone__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 25px; }
.phone__screen { transition: translate .6s var(--ease), rotate .6s var(--ease); }
.phone:hover .phone__screen { translate: 0 -12px; rotate: -2deg; }
.phone__label { font-weight: 600; font-size: .95rem; }

/* CTA */
.cta { position: relative; padding: clamp(28px, 5vw, 64px); border-radius: 30px; border: 1px solid var(--line); overflow: hidden; display: grid; gap: 16px; background: radial-gradient(600px circle at 100% 0%, rgba(145,94,255,.35), transparent 60%), radial-gradient(500px circle at 0% 100%, rgba(34,211,238,.16), transparent 60%), var(--bg2); }
.cta h2 { max-width: 20ch; }
.cta .muted { max-width: 58ch; font-size: 1.02rem; }
.cta__addr { font-size: .78rem; color: var(--muted); margin-top: 4px; }

/* lightbox counter for long galleries */
#wlb img { max-height: 84vh; }

@media (max-width: 1020px) {
  .whero .hero__inner { grid-template-columns: 1fr; }
  .wall { height: 420px; }
  .custs { grid-template-columns: repeat(3, 1fr); }
  .phones { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, auto); gap: 14px 30px; }
  .wall { height: 340px; border-radius: 20px; }
  .wall__plane { gap: 10px; }
  .wall__track { gap: 10px; }
  .custs { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .custs .cust:last-child { grid-column: 1 / -1; max-width: 50%; justify-self: center; width: 100%; }
  .cust { min-height: 270px; }
  .cust__card { margin-top: 110px; padding: 44px 12px 12px; }
  .cust__logo { width: 46px; height: 46px; top: -22px; left: 12px; }
  .wgrid { grid-template-columns: repeat(2, 1fr); gap: 0 10px; }
  .wgrid.is-web { grid-template-columns: repeat(2, 1fr); }
  .wshot { margin-bottom: 10px; border-radius: 10px; }
  .wshot__n { opacity: 1; transform: none; }
  .phones { gap: 16px; }
  .phone:nth-child(even) { margin-top: 30px; }
  .phone__screen { border-radius: 26px; padding: 7px; }
  .phone__screen img { border-radius: 20px; }
  .wtab { padding: 10px 10px 10px 14px; font-size: .88rem; }
}
@media (prefers-reduced-motion: reduce) {
  .wall__track { animation: none; }
  .phone__screen { animation: none; }
}
