/* PixelPerfekt: minimal, grid-based, a little bit pixel. */
:root {
  --paper: #f3f0e8;
  --paper-2: #ebe7dc;
  --ink: #0c0d10;
  --muted: #64646b;
  --line: rgba(12, 13, 16, 0.12);
  --blue: #2f5bff;
  --coral: #ff5a3c;
  --gold: #c9a227;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pix: "Silkscreen", "Courier New", monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gy: 0px;
  --pad: max(20px, 5vw);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--blue); color: #fff; }

/* graph-paper grid that drifts with scroll */
.gridbg {
  position: fixed; inset: -48px 0 0 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: translate3d(0, var(--gy), 0);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.45) 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.45) 100%);
}

.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--blue); transform-origin: 0 50%; transform: scaleX(0); }

/* lagging pixel cursor (fine pointers only) */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 70; pointer-events: none;
  width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border: 1.5px solid var(--blue);
  opacity: 0;
  transition: width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease), background .25s, opacity .3s;
}
.cursor.on { opacity: 1; }
.cursor.big { width: 46px; height: 46px; margin: -23px 0 0 -23px; background: rgba(47, 91, 255, 0.12); }
@media (pointer: coarse) { .cursor { display: none; } }

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad);
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(243, 240, 232, 0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; font-size: 1.05rem; }
.logo { height: 32px; width: auto; aspect-ratio: 6 / 8.46; color: var(--ink); overflow: visible; }
.logo .loose { transition: transform .35s var(--ease); }
.brand:hover .logo .loose { transform: translate(-0.55px, -1.23px); }
.site-header nav { display: flex; align-items: center; gap: 28px; font-size: .92rem; }
.site-header nav a { position: relative; color: var(--muted); transition: color .2s; }
.site-header nav a:hover { color: var(--ink); }
.site-header nav .nav-cta { color: var(--paper); background: var(--ink); padding: 8px 16px; transition: background .2s, transform .2s; }
.site-header nav .nav-cta:hover { background: var(--blue); color: #fff; }

/* ---------- shared type ---------- */
h1, h2, h3 { font-weight: 600; letter-spacing: -0.035em; line-height: 0.98; margin: 0; }
h1 { font-size: clamp(3rem, 9vw, 8rem); }
h2 { font-size: clamp(2.2rem, 5.4vw, 4.4rem); }
h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -0.025em; }
p { margin: 0; }

.label, .pix-label, .readout, .cue, .num, .tags li {
  font-family: var(--pix);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.label { font-size: .72rem; color: var(--blue); margin-bottom: 18px; }
.sq { display: inline-block; width: 8px; height: 8px; background: var(--blue); animation: blink 1.4s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .15; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--pix); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 7px 12px; border: 1px solid var(--ink); background: var(--paper);
  margin-bottom: 26px;
}

/* split-text headline reveal (solid colour, so nothing to repaint) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .06em .04em .16em; margin: -.06em 0 -.16em; }
.w > span { display: inline-block; }
.js [data-split] .w > span {
  transform: translateY(115%);
  transition: transform 1s var(--ease);
  transition-delay: calc(var(--i, 0) * .08s + var(--base, 0s));
}
.js [data-split].in .w > span { transform: none; }

.js .reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

/* floating pixels */
.px {
  position: absolute; width: var(--s, 12px); height: var(--s, 12px);
  background: var(--c, var(--blue)); pointer-events: none; z-index: 1;
}
.px.gold { background: var(--gold); box-shadow: 0 0 18px rgba(201, 162, 39, .6); }

/* buttons */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn {
  display: inline-block; padding: 14px 24px; font-weight: 600; font-size: .98rem;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.btn:hover { transform: translate(-3px, -3px); box-shadow: 4px 4px 0 var(--blue); }
.btn.ghost { background: transparent; color: var(--ink); }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px var(--pad) 90px;
  overflow: hidden;
}
#field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, var(--paper) 0%, rgba(243, 240, 232, .94) 34%, rgba(243, 240, 232, .35) 62%, rgba(243, 240, 232, 0) 82%);
}
.hero-copy { max-width: 760px; position: relative; z-index: 2; }
.hero h1 { --base: .1s; }
.lede { margin-top: 28px; max-width: 34em; font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: #34343a; }
.readout {
  position: absolute; right: var(--pad); bottom: 28px; z-index: 2;
  font-size: .66rem; color: var(--ink); background: var(--paper); padding: 5px 9px; border: 1px solid var(--ink);
}
.cue { position: absolute; left: var(--pad); bottom: 28px; z-index: 2; display: flex; align-items: center; gap: 12px; font-size: .66rem; color: var(--muted); }
.cue-line { width: 40px; height: 1px; background: var(--ink); transform-origin: 0 50%; animation: cue 2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleX(0); } 60%, 100% { transform: scaleX(1); opacity: .2; } }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--ink); background: var(--ink); color: var(--paper); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee span {
  display: inline-flex; align-items: center; gap: 28px; padding: 16px 28px 16px 0;
  font-family: var(--pix); font-size: clamp(1rem, 2vw, 1.5rem); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap;
}
.marquee i { width: 12px; height: 12px; background: var(--blue); display: inline-block; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- about ---------- */
.about { position: relative; padding: 22vh var(--pad); max-width: 1240px; margin: 0 auto; }
.scrub { font-size: clamp(1.8rem, 4.4vw, 3.6rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.12; max-width: 22em; }
.scrub .sw { opacity: .16; transition: opacity .35s; }
.scrub .sw.lit { opacity: 1; }

/* ---------- services ---------- */
.services { position: relative; padding: 8vh var(--pad) 16vh; max-width: 1240px; margin: 0 auto; }
.section-head { margin-bottom: 56px; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.card {
  position: relative; padding: 36px 32px 34px; min-height: 320px;
  background: var(--paper); border: 1px solid var(--ink);
  display: flex; flex-direction: column; gap: 16px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translate(-6px, -6px); box-shadow: 8px 8px 0 var(--blue); }
.js .card.reveal.in:hover { transform: translate(-6px, -6px); }
.card .num { font-size: .8rem; color: var(--blue); }
.card p { color: #34343a; max-width: 28em; }
.tags { list-style: none; padding: 0; margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: .62rem; padding: 6px 10px; border: 1px solid var(--line); color: var(--muted); background: var(--paper-2); }

/* ---------- products ---------- */
.products { position: relative; padding: 4vh var(--pad) 18vh; max-width: 1240px; margin: 0 auto; }
.product {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: .85fr 1.3fr; align-items: center; gap: 16px;
  padding: clamp(32px, 6vw, 72px);
  background: #08080a; color: #f4f1ea;
  border: 1px solid var(--ink);
}
.product-glow {
  position: absolute; z-index: -1; right: -10%; top: 50%; width: 70%; aspect-ratio: 1; margin-top: -35%;
  background: radial-gradient(circle, rgba(201, 162, 39, .28), rgba(201, 162, 39, 0) 62%);
}
.pix-label { font-size: .7rem; color: var(--gold); margin-bottom: 18px; }
.product-name { font-size: clamp(2.4rem, 5vw, 4.2rem); margin-bottom: 22px; }
.product-copy > p { color: #c4c1b8; max-width: 30em; }
.facts { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; font-size: .95rem; color: #e8e4d9; }
.facts li { display: flex; align-items: center; gap: 12px; }
.facts li::before { content: ""; width: 8px; height: 8px; background: var(--gold); flex: none; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.store {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 20px 10px 16px; border: 1px solid rgba(201, 162, 39, .6);
  background: rgba(255, 255, 255, .03); color: #fff; text-align: left;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.store svg { width: 26px; height: 26px; flex: none; color: var(--gold); }
.store span { display: flex; flex-direction: column; line-height: 1.15; }
.store small { font-size: .68rem; letter-spacing: .04em; color: #b8b8be; }
.store b { font-size: 1.05rem; font-weight: 600; }
a.store:hover { transform: translate(-3px, -3px); box-shadow: 4px 4px 0 var(--gold); }
.store.soon { border-color: rgba(255, 255, 255, .18); cursor: default; }
.store.soon svg { color: #8a8a90; }
.store.soon b { color: #d0d0d4; }

.product-shots { position: relative; display: flex; justify-content: center; align-items: center; gap: 14px; min-height: 480px; }
.shot { flex: 1 1 0; max-width: 270px; }
.shot.s2 { margin-top: -6%; max-width: 300px; z-index: 2; }
.shot.s3 { margin-top: 8%; }
.device {
  border-radius: 24px; overflow: hidden;
  border: 4px solid #25252a;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55);
  background: #000;
}

/* ---------- contact ---------- */
.contact { position: relative; padding: 18vh var(--pad) 20vh; max-width: 1240px; margin: 0 auto; }
.contact > p:not(.label) { margin-top: 22px; color: #34343a; font-size: 1.1rem; }
.mail {
  display: inline-block; margin-top: 36px;
  font-size: clamp(1.7rem, 5.6vw, 4.6rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.05;
  background: linear-gradient(var(--blue), var(--blue)) 0 100% / 0 6px no-repeat;
  padding-bottom: 6px;
  transition: background-size .5s var(--ease), color .3s;
  word-break: break-all;
}
.mail:hover { background-size: 100% 6px; color: var(--blue); }
.copy {
  display: block; margin-top: 22px; cursor: pointer;
  font-family: var(--pix); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 10px 16px; background: transparent; color: var(--ink); border: 1px solid var(--ink);
  transition: background .2s, color .2s;
}
.copy:hover { background: var(--ink); color: var(--paper); }

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 28px var(--pad) 40px; border-top: 1px solid var(--ink);
  font-size: .85rem; color: var(--muted);
}
.site-footer a:hover { color: var(--blue); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .site-header nav { gap: 16px; font-size: .85rem; }
  .hero { align-items: flex-start; padding-top: 18vh; }
  .hero::before { background: linear-gradient(180deg, var(--paper) 0%, rgba(243, 240, 232, .92) 45%, rgba(243, 240, 232, .25) 80%, rgba(243, 240, 232, 0) 100%); }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .product { grid-template-columns: 1fr; }
  .product-shots { min-height: 0; margin-top: 24px; gap: 8px; }
  .device { border-radius: 18px; border-width: 3px; }
  .cue { display: none; }
}

@media (max-width: 520px) {
  .site-header nav a:not(.nav-cta) { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sq, .cue-line, .marquee-track { animation: none; }
  .js [data-split] .w > span, .js .reveal { transform: none; opacity: 1; transition: none; }
  .scrub .sw { opacity: 1; }
}
