/* WaeKayLabs motion layer (GSAP + Lenis). Loaded after the base styles. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* product media: tilt + glare */
.x-media__main { position: relative; transform-style: preserve-3d; will-change: transform; }
.fx-glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.45), transparent 55%);
  mix-blend-mode: soft-light; transition: opacity .3s; z-index: 2; }
.x-media__main:hover .fx-glare { opacity: 1; }

/* Muralo sticky notes */
.x-media { position: relative; }
.fx-note { position: absolute; z-index: 5; width: clamp(84px, 11vw, 120px); padding: 12px 12px 16px; border-radius: 6px;
  font: 600 clamp(12px, 1.2vw, 15px)/1.25 "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive; color: #171a2e;
  box-shadow: 0 10px 24px rgba(23,26,46,.18); cursor: grab; touch-action: none; user-select: none; }
.fx-note:active { cursor: grabbing; }
.fx-note::before { content: ""; position: absolute; top: -6px; left: 50%; width: 34px; height: 12px; transform: translateX(-50%) rotate(-3deg);
  background: rgba(255,255,255,.6); border-radius: 2px; }
.fx-note--y { background: #ffc94a; top: 6%; left: -4%; rotate: -6deg; }
.fx-note--b { background: #9fbaff; top: 40%; right: -3%; rotate: 5deg; }
.fx-note--c { background: #ff9b8f; bottom: 4%; left: 12%; rotate: -2deg; }
@media (max-width: 640px) { .fx-note--y { left: 2%; } .fx-note--b { right: 2%; } }

/* Phone2Cam wifi arcs */
.fx-wifi { position: absolute; z-index: 3; left: 25%; top: 18%; width: 18%; aspect-ratio: 1; pointer-events: none; }
.fx-wifi path { fill: none; stroke: #2e6bff; stroke-width: 6; stroke-linecap: round; opacity: 0; }

/* Pixonomy dice */
.fx-die { position: absolute; z-index: 5; width: clamp(54px, 6vw, 72px); aspect-ratio: 1; padding: 10px; box-sizing: border-box;
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); gap: 4px; background: #fffdf6; border-radius: 14px;
  border: 3px solid #171a2e; box-shadow: inset -4px -5px 0 rgba(23,26,46,.14), 0 12px 24px rgba(23,26,46,.22);
  cursor: grab; touch-action: none; user-select: none; }
.fx-die:active { cursor: grabbing; }
.fx-die i { border-radius: 3px; background: transparent; }
.fx-die i.on { background: #171a2e; }
.fx-die--a { top: 4%; left: -3%; rotate: -10deg; }
.fx-die--a i.on { background: #ff6b5a; }
.fx-die--b { top: 46%; right: -2%; rotate: 8deg; }
@media (max-width: 640px) { .fx-die { width: 48px; padding: 7px; gap: 3px; border-width: 2px; border-radius: 10px; } .fx-die--a { left: 2%; top: 0; } .fx-die--b { right: 2%; top: 40%; } }

/* FreezeWatch live chart + counters */
.fx-chart { margin-top: 18px; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  padding: 14px 14px 8px; position: relative; overflow: hidden; }
.fx-chart__label { display: flex; justify-content: space-between; font: 600 12px/1 ui-monospace, Menlo, monospace; color: rgba(255,255,255,.6); margin-bottom: 8px; }
.fx-chart__label b { color: #7ee2a8; font-weight: 600; }
.fx-chart svg { display: block; width: 100%; height: 110px; overflow: visible; }
.fx-chart .fx-line { fill: none; stroke: #2e6bff; stroke-width: 2.4; stroke-linejoin: round; }
.fx-chart .fx-area { fill: url(#fxGrad); opacity: .5; }
.fx-chart .fx-mark { fill: #ff6b5a; }
.fx-chart .fx-mark-ring { fill: none; stroke: #ff6b5a; stroke-width: 2; }
.fx-chart .fx-mark-text { fill: #ff6b5a; font: 700 11px ui-monospace, Menlo, monospace; }
.fx-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.fx-stat { border-radius: 14px; padding: 12px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); color: #fff; }
.fx-stat strong { display: block; font-size: clamp(20px, 3vw, 28px); letter-spacing: -.02em; }
.fx-stat span { font-size: 12px; color: rgba(255,255,255,.65); }

/* closing card glow + shine */
.x-close { position: relative; isolation: isolate; overflow: hidden; }
.fx-glow { position: absolute; inset: 0; z-index: -2; border-radius: inherit; pointer-events: none; padding: 2px;
  background: conic-gradient(from var(--fx-angle, 0deg), #2e6bff, #ff6b5a, #ffc94a, #2e6bff);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .9; }
@property --fx-angle { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
.x-close__mail { position: relative; overflow: hidden; }
.x-close__mail .fx-shine { position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.65), transparent); transform: skewX(-20deg); }

/* footer wordmark */
.fx-wordmark { font-weight: 800; font-size: clamp(56px, 16vw, 230px); letter-spacing: -.05em; line-height: .85; text-align: center;
  color: transparent; -webkit-text-stroke: 1.5px rgba(46,107,255,.35); margin: 40px 0 0; overflow: hidden; white-space: nowrap; user-select: none; }
.fx-wordmark .char { display: inline-block; }

/* pinned showcase */
.fx-show { overflow: hidden; padding: 70px 0; }
.fx-show__track { display: flex; gap: 28px; padding: 0 6vw; width: max-content; }
.fx-show__card { flex: none; width: min(78vw, 520px); aspect-ratio: 4/3; border-radius: 26px; overflow: hidden; position: relative;
  background: #fff; box-shadow: 0 30px 60px rgba(23,26,46,.14); }
.fx-show__card img { width: 100%; height: 100%; object-fit: cover; }
.fx-show__card figcaption { position: absolute; left: 16px; bottom: 16px; background: rgba(255,255,255,.9); backdrop-filter: blur(8px);
  padding: 8px 14px; border-radius: 999px; font-weight: 700; color: #171a2e; font-size: 14px; }
.fx-show__title { text-align: center; font-size: clamp(28px, 5vw, 56px); letter-spacing: -.03em; margin: 0 0 32px; color: #171a2e; }
@media (max-width: 767px) {
  .fx-show__track { overflow-x: auto; scroll-snap-type: x mandatory; width: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .fx-show__track::-webkit-scrollbar { display: none; }
  .fx-show__card { scroll-snap-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .fx-wifi path { opacity: .6; }
}

/* ---------- mobile layout fixes ---------- */
.main > *, .x-hero > *, .x-prod > *, #products > * { min-width: 0; }
@media (max-width: 859px) {
  .main, .x-hero, .x-prod, #products { grid-template-columns: minmax(0, 1fr); }
  .x-hero { padding: 12px 0 40px; }
  .x-hero__art { width: 100%; max-width: 520px; margin: 0 auto -8px;
    -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 55%, transparent 100%);
            mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 55%, transparent 100%); }
  .x-hero__copy { width: 100%; padding-inline: 4px; }
  .x-hero h1 { font-size: clamp(38px, 11.5vw, 60px); overflow-wrap: break-word; }
  .x-hero__sub { font-size: 17px; }
  .x-hero .x-btns { width: 100%; }
  .x-hero .x-btns .x-btn { flex: 1 1 160px; }
}
@media (max-width: 640px) {
  .x-prod { padding: 48px 0; gap: 28px; }
  .x-prod h2, .x-about h2 { font-size: clamp(30px, 9vw, 40px); }
  .x-media { padding-bottom: 10%; }
  .fx-note { width: 92px; padding: 9px 9px 12px; font-size: 12px; }
  .fx-note--y { top: -2%; left: 2%; }
  .fx-note--b { top: 34%; right: 2%; }
  .fx-note--c { bottom: 0; left: 30%; }
  .fx-stats { gap: 8px; }
  .fx-stat { padding: 10px 8px; }
  .fx-stat strong { font-size: 18px; }
  .fx-stat span { font-size: 11px; }
  .fx-chart svg { height: 90px; }
  .fx-show { padding: 40px 0; }
  .fx-show__card { width: 82vw; border-radius: 20px; }
  .x-close h2 { font-size: clamp(32px, 10vw, 44px); }
  .fx-wordmark { font-size: 17vw; margin-top: 28px; }
}

/* ---------- all sizes ---------- */
/* The hero isolates its stacking context, so the art's multiply blend only sees the hero's
   own backdrop. Give it the page colour so the image's white background blends away. */
/* Full-bleed hero, clipped on all sides, so the art and colour blobs never show box edges. */
.x-hero { background: var(--x-canvas); width: 100vw; margin-inline: calc(50% - 50vw); overflow: clip; padding-inline: var(--gutter); }
/* On desktop the cursor tilt transforms .x-hero__art, which would trap a blend set on the img
   inside the art's own (transparent) group and leave a white box. Blend the container instead. */
.x-hero__art { mix-blend-mode: multiply; }
.x-hero__art img { mix-blend-mode: normal; }
@media (min-width: 860px) {
  .x-hero { margin-top: -78px; padding-top: 118px; } /* tuck under the nav so the glow has no top edge */
  .x-hero__art::after { display: none; }
  /* soft page-colour halo behind the copy so the subtitle stays readable over the icons */
  .x-hero__copy::before { content: ""; position: absolute; z-index: -1; inset: -4% -6%; pointer-events: none;
    background: radial-gradient(closest-side, rgb(246 245 242 / 0.8) 35%, rgb(246 245 242 / 0) 100%); }
}
/* Showcase and footer wordmark span the whole window, not just the content column. */
.fx-show { width: 100vw; margin-inline: calc(50% - 50vw); }
.x-foot { container-type: inline-size; }
.fx-wordmark { width: 100%; font-size: min(15.5cqi, 240px); }

/* ---------- desktop ---------- */
@media (min-width: 1200px) {
  .x-site { --page-max: 1360px; --gutter: 48px; }
  .x-hero { min-height: min(880px, 92vh); }
  .x-hero h1 { font-size: clamp(88px, 5.4vw, 104px); }
  .x-hero__copy { max-width: 1040px; }
  .x-hero__sub { font-size: 21px; max-width: 600px; }
  .x-hero__art { width: 1520px; } /* art is 1376px wide; don't upscale it much */

  .x-prod { grid-template-columns: 5fr 7fr; gap: 96px; padding: 130px 0; }
  .x-prod--flip { grid-template-columns: 7fr 5fr; }
  .x-prod__text { max-width: 520px; gap: 22px; }
  .x-prod h2, .x-about h2 { font-size: clamp(52px, 4vw, 68px); }
  .x-prod__copy { font-size: 19px; }
  .x-prod--dark { padding: 110px 88px; }

  .fx-show { padding: 110px 0; }
  .fx-show__title { font-size: clamp(56px, 4.4vw, 76px); margin-bottom: 56px; }
  .fx-show__track { gap: 36px; padding-inline: max(48px, calc((100vw - 1360px) / 2 + 48px)); }
  .fx-show__card { width: clamp(560px, 38vw, 720px); border-radius: 30px; }

  .x-about { padding: 130px 0 110px; gap: 56px; }
  .x-about__head { max-width: 820px; }
  .x-about__head p:last-child { font-size: 19px; }
  .x-value { padding: 36px; }
  .x-value h3 { font-size: 22px; }
  .x-value p { font-size: 17px; }

  .x-site .wl { padding: 64px 72px; }
  .x-close { padding: 140px 64px; }
  .x-close h2 { font-size: clamp(72px, 5.6vw, 96px); max-width: 1000px; }
  .x-close p { font-size: 21px; max-width: 600px; }
}
