/* ==========================================================================
   WIZKET — Tech stack · the toy box. Prefix: tb-
   Balls rain into a box (js/stack.js). Tokens for the page; the balls wear
   each tool's own colour (--c fill, --ink label).
   ========================================================================== */
.tb {
  --side: clamp(20px, 6vw, 110px);
  position: relative;
  padding: clamp(90px, 14vh, 160px) var(--side) clamp(60px, 10vh, 120px);
  background: var(--bg);
}
.tb__head {
  width: min(1180px, 100%);
  margin: 0 auto clamp(22px, 4vh, 36px);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 32px;
}
.tb__title {
  margin: 0;
  font: 400 clamp(2.6rem, min(6vw, 11vh), 6.4rem)/0.9 var(--font-display);
  text-transform: uppercase;
  color: var(--text);
}
.tb__hint {
  margin: 0 0 6px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 11px/1 var(--font-body);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.tb__hint i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: tb-pulse 1.8s var(--ease-io) infinite; }
.tb__hint-touch { display: none; }
@media (hover: none) { .tb__hint-mouse { display: none; } .tb__hint-touch { display: inline; } }
@keyframes tb-pulse { 50% { transform: scale(1.8); opacity: 0.4; } }

/* the box */
.tb__box {
  position: relative;
  width: min(1180px, 100%);
  height: clamp(440px, 68vh, 720px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: clamp(22px, 3vw, 36px);
  background:
    radial-gradient(90% 80% at 50% 0%, var(--petrol), transparent 75%),
    var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  touch-action: pan-y;          /* vertical swipes keep scrolling the page */
  -webkit-user-select: none;
  user-select: none;
}
.tb__floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.1em;
  margin: 0;
  text-align: center;
  font: 400 clamp(6rem, 24vw, 22rem)/0.8 var(--font-display);
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px var(--line2);
  pointer-events: none;
}
.tb__list { margin: 0; padding: 0; list-style: none; }

/* a ball */
.tb__ball {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background:
    radial-gradient(60% 60% at 32% 26%, rgba(255, 255, 255, 0.32), transparent 60%),
    var(--c);
  box-shadow:
    inset 0 -8px 16px rgba(0, 0, 0, 0.2),
    0 14px 26px -12px rgba(0, 0, 0, 0.45);
  color: var(--ink);
  font: 700 16px/1 var(--font-body);
  letter-spacing: -0.01em;
  text-align: center;
  white-space: nowrap;
  cursor: grab;
  touch-action: none;           /* a ball can be dragged on touch */
  visibility: hidden;           /* until it drops in */
  z-index: 2;                   /* over the device, so a ball you carry stays on top */
  will-change: transform;
}
.tb__ball.is-in { visibility: visible; }
.tb__ball.is-drag { cursor: grabbing; z-index: 3; box-shadow: inset 0 -8px 16px rgba(0, 0, 0, 0.2), 0 24px 40px -14px rgba(0, 0, 0, 0.55); }
.tb__ball span { pointer-events: none; }

@media (max-width: 767px) {
  .tb__head { align-items: flex-start; }
  .tb__box { height: clamp(420px, 66svh, 620px); }
}

/* ==========================================================================
   Build your stack — the device in the box (js/stack.js)
   A browser window (.tb__dev--browser, Website page) or a phone (.tb__dev--phone,
   Apps page). Balls snap into its slots; once all are in plus the idea, the slots
   give way to a finished site / app (.tb__done). The device is always dark.
   ========================================================================== */
.tb__side { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.tb__btn {
  -webkit-appearance: none;
  appearance: none;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: none;
  box-shadow: inset 0 0 0 1px var(--line2);
  color: var(--text);
  font: 600 13.5px/1 var(--font-body);
  cursor: pointer;
  transition: background-color 0.4s var(--ease-io), color 0.4s, box-shadow 0.4s, opacity 0.4s;
}
.tb__btn--go { background: var(--text); color: var(--bg); box-shadow: none; }
.tb__btn:disabled { opacity: 0.35; cursor: default; }
.tb__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .tb__btn:not(:disabled):hover { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
  .tb__btn--go:not(:disabled):hover { background: var(--accent); color: #fff; box-shadow: none; }
}
.tb__ball:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.tb__ball.is-stacked { visibility: hidden; }
.tb__ball.is-ready { animation: tb-ready 1.4s var(--ease-io) infinite; }
@keyframes tb-ready {
  50% { box-shadow: inset 0 -8px 16px rgba(0, 0, 0, 0.2), 0 0 0 10px rgba(253, 95, 7, 0.25), 0 0 50px rgba(253, 95, 7, 0.7); }
}

.tb__dev {
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  container-type: inline-size;
  background: #0b0e10;
  color: #f2f1ed;
  font-family: var(--font-body);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 40px 80px -40px rgba(0, 0, 0, 0.65);
  transition: box-shadow 0.4s var(--ease-io), transform 0.5s var(--ease-out);
}
.tb__dev--browser { top: 9%; bottom: 9%; right: 4%; width: 46%; border-radius: 18px; }
.tb__dev--phone { top: 6%; right: 12%; height: 88%; aspect-ratio: 9 / 18.6; padding: 10px; border-radius: 15% / 7.2%; box-shadow: 0 0 0 2px #2b3238, 0 0 0 3px #12171a, 0 40px 80px -40px rgba(0, 0, 0, 0.65); }
.tb__dev.is-hover { transform: scale(1.02); box-shadow: 0 0 0 2px var(--accent), 0 0 70px -10px rgba(253, 95, 7, 0.65); }
.tb__dev.is-gulp { animation: tb-gulp 0.45s var(--ease-out); }
.tb__dev.is-nope { animation: tb-nope 0.5s var(--ease-io); }
@keyframes tb-gulp { 35% { transform: scale(1.025); } }
@keyframes tb-nope { 20% { translate: -12px 0; } 40% { translate: 9px 0; } 60% { translate: -6px 0; } 80% { translate: 3px 0; } }

/* the browser's bar · the phone's status row */
.tb__bar { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 14px; }
.tb__bar > i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.tb__bar > i:nth-child(2) { background: #febc2e; }
.tb__bar > i:nth-child(3) { background: #28c840; }
.tb__url { flex: 1; min-width: 0; margin: 0 10px; padding: 6px 12px; overflow: hidden; border-radius: 99px; background: #171c20; font: 500 12px/1 var(--font-body); color: #8d9295; white-space: nowrap; text-overflow: ellipsis; }
.tb__count { font: 600 12px/1 var(--font-body); color: #8d9295; white-space: nowrap; }
.tb__count b { font: 400 17px/1 var(--font-display); color: #fd5f07; }
.tb__dev--phone .tb__bar { position: absolute; z-index: 2; left: 0; right: 0; top: 7px; height: auto; flex-direction: column; justify-content: flex-start; padding: 0; }
.tb__dev--phone .tb__bar::before {   /* dynamic island with the front camera at its right end */
  content: ""; width: 32%; height: 22px; border-radius: 99px;
  background:
    radial-gradient(circle at calc(100% - 11px) 50%, rgba(120, 160, 220, 0.55) 0 1px, #1b2a3c 2px, #0b1219 3.5px, #22282d 4.5px, #000 5.5px),
    #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.tb__dev--phone .tb__count { margin-top: 23px; padding: 6px 12px; border-radius: 99px; background: #171c20; font-size: 11px; }

.tb__screen { position: relative; flex: 1; margin: 0 10px 10px; overflow: hidden; border-radius: 12px; background: radial-gradient(80% 60% at 80% 0%, rgba(253, 95, 7, 0.12), transparent 70%), #11161a; }
.tb__dev--phone .tb__screen { margin: 0; border-radius: 12% / 5.8%; }

.tb__slots { position: absolute; inset: 12px; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; gap: 10px; transition: opacity 0.5s var(--ease-io), transform 0.7s var(--ease-out); }
.tb__dev--phone .tb__slots { inset: 92px 12px 16px; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tb__slot {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 4px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1.5px rgba(242, 241, 237, 0.12);
  background-image: radial-gradient(circle, rgba(242, 241, 237, 0.14) 0 1.5px, transparent 2px);
  background-size: 12px 12px;
  background-position: center;
  font: 700 clamp(9px, 2.4cqw, 14px)/1.1 var(--font-body);
  text-align: center;
  color: var(--ink, #fff);
  transition: background-color 0.3s, box-shadow 0.4s;
}
.tb__slot b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tb__dev--phone .tb__slot { font-size: clamp(8px, 5.2cqw, 12px); border-radius: 10px; }
/* the next free slot breathes orange */
.tb__slot:first-child:not(.is-on), .tb__slot.is-on + .tb__slot:not(.is-on) { box-shadow: inset 0 0 0 1.5px rgba(253, 95, 7, 0.7); animation: tb-next 1.6s var(--ease-io) infinite; }
@keyframes tb-next { 50% { box-shadow: inset 0 0 0 1.5px rgba(253, 95, 7, 0.2); } }
.tb__slot.is-on {
  background: radial-gradient(70% 70% at 30% 20%, rgba(255, 255, 255, 0.28), transparent 60%), var(--c);
  box-shadow: inset 0 -4px 10px rgba(0, 0, 0, 0.18);
  animation: tb-pop 0.5s var(--ease-out);
}
@keyframes tb-pop { 0% { transform: scale(0.5); } 60% { transform: scale(1.1); } 100% { transform: none; } }
.tb__dev.is-full:not(.is-done) .tb__slots { animation: tb-glow 1.4s var(--ease-io) infinite; }
@keyframes tb-glow { 50% { filter: drop-shadow(0 0 14px rgba(253, 95, 7, 0.55)); } }

.tb__say {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 16px;
  margin: 0;
  width: max-content;
  max-width: 90%;
  padding: 10px 16px;
  border-radius: 99px;
  background: #f2f1ed;
  color: #0b0e10;
  font: 600 12.5px/1.2 var(--font-body);
  text-align: center;
  translate: -50% 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s var(--ease-io), transform 0.5s var(--ease-out);
  pointer-events: none;
}
.tb__say.is-on { opacity: 1; transform: none; }

/* finished: the slots give way to a real site / app */
.tb__dev.is-done .tb__bar .tb__count { opacity: 0; transition: opacity 0.4s; }
.tb__dev--browser.is-done .tb__bar .tb__count { opacity: 1; }
.tb__done { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; background: radial-gradient(80% 50% at 85% 0%, rgba(253, 95, 7, 0.22), transparent 70%), #0e1215; opacity: 0; visibility: hidden; clip-path: circle(0% at 50% 50%); transition: clip-path 1s var(--ease-out), opacity 0.3s, visibility 0s 1s; }
.tb__dev.is-done .tb__done { opacity: 1; visibility: visible; clip-path: circle(150% at 50% 50%); transition: clip-path 1.1s var(--ease-out), opacity 0.3s; }
.tb__dev.is-done .tb__slots { opacity: 0; transform: scale(0.9); }
.tb__done p { margin: 0; }
.dn__nav { display: flex; align-items: center; justify-content: space-between; padding: 4cqw 5cqw 0; }
.dn__logo { display: flex; align-items: center; gap: 1.4cqw; font: 400 3.4cqw/1 var(--font-display); text-transform: uppercase; }
.dn__logo i { width: 3cqw; height: 3cqw; border-radius: 1cqw; background: #fd5f07; }
.dn__links { display: flex; gap: 2cqw; }
.dn__links i { width: 7cqw; height: 1.2cqw; border-radius: 9px; background: rgba(242, 241, 237, 0.25); }
.dn__k { font: 600 2.2cqw/1 var(--font-body); letter-spacing: 0.2em; text-transform: uppercase; color: #fd5f07; }
.dn__h { font: 400 10cqw/0.9 var(--font-display); text-transform: uppercase; }
.dn__h em { font-style: normal; color: #fd5f07; }
.dn__p { font: 500 2.6cqw/1.4 var(--font-body); color: #8d9295; }
.dn__btn { align-self: flex-start; padding: 2.2cqw 4cqw; border-radius: 99px; background: #fd5f07; color: #fff; font: 700 2.6cqw/1 var(--font-body); text-decoration: none; }
.dn__hero { flex: 1; display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 4cqw; padding: 0 5cqw; }
.dn__copy { display: grid; gap: 2.4cqw; justify-items: start; }
.dn__art { position: relative; height: 70%; border-radius: 3cqw; background: linear-gradient(140deg, #fd5f07, #7a2c00); overflow: hidden; }
.dn__art::before { content: ""; position: absolute; right: -10%; bottom: -20%; width: 80%; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.dn__art::after { content: "+128%"; position: absolute; left: 8%; bottom: 10%; padding: 2cqw 3cqw; border-radius: 2cqw; background: #0b0e10; font: 400 4cqw/1 var(--font-display); color: #f2f1ed; }
.dn__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4cqw; padding: 0 5cqw 4cqw; }
.dn__cards i { height: 9cqw; border-radius: 2cqw; background: #171c20; box-shadow: inset 0 0 0 1px rgba(242, 241, 237, 0.06); }
.dn__cards i::before { content: ""; display: block; width: 30%; height: 1.4cqw; margin: 2.4cqw; border-radius: 9px; background: rgba(253, 95, 7, 0.7); }

/* the phone's finished app (sized off the phone, so cqw is bigger) */
.tb__done--app { gap: 5cqw; padding: 30cqw 7cqw 8cqw; }
.tb__done--app .dn__k { font-size: 4.4cqw; }
.tb__done--app .dn__h { font-size: 15cqw; }
.dn__card { display: grid; gap: 2cqw; padding: 6cqw; border-radius: 7cqw; background: linear-gradient(135deg, #fd5f07, #8a3200); }
.dn__card b { font: 400 12cqw/1 var(--font-display); }
.dn__card span { font: 600 4.2cqw/1 var(--font-body); opacity: 0.85; }
.dn__rows { display: grid; gap: 3cqw; }
.dn__rows i { display: flex; align-items: center; gap: 3cqw; height: 13cqw; padding: 0 3.4cqw; border-radius: 4.4cqw; background: #171c20; }
.dn__rows i::before { content: ""; width: 7cqw; height: 7cqw; border-radius: 2.4cqw; background: #fd5f07; }
.dn__rows i::after { content: ""; flex: 1; height: 2.2cqw; border-radius: 9px; background: rgba(242, 241, 237, 0.2); }
.tb__done--app .dn__btn { align-self: stretch; margin-top: auto; padding: 4.4cqw; text-align: center; font-size: 4.6cqw; }

@media (max-width: 767px) {
  .tb__dev--browser { top: 4%; bottom: auto; left: 5%; right: 5%; width: auto; height: 44%; border-radius: 14px; }
  .tb__dev--browser .tb__bar { height: 34px; }
  .tb__dev--browser .tb__url { display: none; }
  .tb__dev--browser .tb__bar .tb__count { margin-left: auto; }
  .tb__dev--browser .tb__slots { inset: 8px; gap: 6px; }
  .tb__dev--browser .dn__h { font-size: 7cqw; }
  .tb__dev--browser .dn__k, .tb__dev--browser .dn__p { font-size: 3cqw; }
  .tb__dev--browser .dn__btn { font-size: 3.2cqw; }
  .tb__dev--browser .dn__cards { display: none; }
  .tb__dev--browser .dn__hero { gap: 3cqw; padding-bottom: 4cqw; }
  .tb__dev--phone { top: 5%; right: 5%; height: 74%; padding: 7px; }
  .tb__dev--phone .tb__slots { inset: 86px 7px 10px; gap: 5px; }
  .tb__slot { border-radius: 8px; }
  .tb__btn { height: 36px; padding: 0 14px; font-size: 12.5px; }
}
