:root {
  --hardwood-black: #050608;
  --court-line-glow: #a3e635;
  --court-accent-orange: #f97316;
  --text-chalk: #f8fafc;
  --text-bench: #94a3b8;
  --ikz-red: #ff0000;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: var(--hardwood-black);
  color: var(--text-chalk);
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
canvas#court-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; opacity: 0.45;
}
.shell { position: relative; z-index: 2; min-height: 100vh; }

/* —— Topbar + mobile drawer —— */
.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.55rem 1.1rem;
  padding-top: max(0.55rem, env(safe-area-inset-top));
  min-height: 128px;
  background: linear-gradient(180deg, rgba(5,6,8,0.96), rgba(5,6,8,0.72));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.brand {
  display: inline-flex;
  align-items: center;
  position: relative; z-index: 2;
  line-height: 0;
  flex-shrink: 0;
}
.brand-logo {
  display: block;
  width: auto;
  height: 112px;
  max-width: min(46vw, 280px);
  object-fit: contain;
}
.brand-logo-footer {
  height: 200px;
  max-width: min(70vw, 320px);
  margin: 0 auto 0.75rem;
}
.drawer-head .brand-logo {
  height: 88px;
  max-width: 220px;
}
.topbar-right {
  display: flex; align-items: center; gap: 0.45rem;
}
.nav-actions {
  display: flex; gap: 0.4rem; flex-wrap: nowrap; justify-content: flex-end; align-items: center;
}
.cart-btn {
  appearance: none; border: 0;
  background: rgba(255,255,255,0.08);
  color: var(--text-chalk);
  font: inherit; font-weight: 600;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 44px;
}
.cart-count {
  min-width: 1.25rem; height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--ikz-red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.cart-count.hidden, .cart-count[hidden] { display: none !important; }
.cart-scrim {
  position: fixed; inset: 0; z-index: 85;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(2px);
}
.cart-scrim[hidden] { display: none !important; }
.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 90;
  width: min(92vw, 380px);
  background: linear-gradient(165deg, #0b0d12 0%, #050608 100%);
  padding: max(1rem, env(safe-area-inset-top)) 1.15rem max(1.25rem, env(safe-area-inset-bottom));
  transform: translateX(105%);
  transition: transform .28s cubic-bezier(.22,1,.36,1);
  display: flex; flex-direction: column; gap: 0.85rem;
  box-shadow: -24px 0 60px rgba(0,0,0,0.45);
}
.cart-drawer.open { transform: translateX(0); }
body.cart-open { overflow: hidden; }
.cart-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.8rem; letter-spacing: 0.04em;
}
.cart-body { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 0.75rem; }
.cart-line {
  display: flex; justify-content: space-between; gap: 0.75rem; align-items: center;
  padding: 0.75rem 0;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.06);
}
.cart-qty {
  display: inline-flex; align-items: center; gap: 0.35rem;
}
.cart-qty button {
  width: 32px; height: 32px; border: 0; border-radius: 10px;
  background: rgba(255,255,255,0.08); color: var(--text-chalk);
  font: inherit; cursor: pointer;
}
.cart-qty .cart-remove { background: transparent; color: var(--text-bench); }
.cart-foot { display: grid; gap: 0.55rem; }
.cart-foot .btn { width: 100%; }
.ikz-toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 120;
  transform: translateX(-50%) translateY(120%);
  background: #11141a; color: var(--text-chalk);
  padding: 0.75rem 1.1rem; border-radius: 999px;
  font-weight: 600; font-size: 0.9rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  transition: transform .25s ease; pointer-events: none;
}
.ikz-toast.show { transform: translateX(-50%) translateY(0); }
.cart-page-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 0;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.06);
}
.cart-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.55rem; }
.product .cart-actions .btn { flex: 1 1 auto; min-height: 44px; font-size: 0.9rem; padding: 0.6rem 0.75rem; }
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 0; border-radius: 12px;
  background: rgba(255,255,255,0.08);
  cursor: pointer;
  position: relative; z-index: 2;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px;
  background: var(--text-chalk);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-scrim {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(2px);
}
.nav-scrim[hidden] { display: none !important; }

.nav-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 80;
  width: min(86vw, 340px);
  background: linear-gradient(165deg, #0b0d12 0%, #050608 100%);
  padding: max(1rem, env(safe-area-inset-top)) 1.15rem max(1.25rem, env(safe-area-inset-bottom));
  transform: translateX(105%);
  transition: transform .28s cubic-bezier(.22,1,.36,1);
  display: flex; flex-direction: column; gap: 1rem;
  box-shadow: -24px 0 60px rgba(0,0,0,0.45);
  pointer-events: auto;
}
.nav-drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 0.5rem;
}
.nav-close {
  width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: rgba(255,255,255,0.06); color: var(--text-chalk);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.drawer-nav { display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.drawer-link {
  display: block;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  font-weight: 600;
  font-size: 1.05rem;
  background: rgba(255,255,255,0.03);
  color: var(--text-chalk);
}
.drawer-link.on {
  background: var(--court-line-glow);
  color: #041006;
}
.drawer-foot {
  display: grid; gap: 0.55rem;
  padding-top: 0.5rem;
}
.drawer-foot .btn { width: 100%; text-align: center; }

.btn {
  appearance: none; border: 0; background: transparent; color: var(--text-chalk);
  font: inherit; font-weight: 600; padding: 0.65rem 0.95rem; border-radius: 999px;
  cursor: pointer; transition: transform .2s ease, opacity .2s ease, background .2s ease;
  display: inline-flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); opacity: 0.92; }
.btn.ghost { background: rgba(255,255,255,0.06); }
.btn.primary { background: linear-gradient(120deg, var(--ikz-red), #8b0000); }
.btn.lime { background: var(--court-line-glow); color: #041006; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.page {
  max-width: 1100px; margin: 0 auto; padding: 1.25rem 1.15rem 4rem;
}
.hero-strip {
  position: relative; min-height: 200px; overflow: hidden; margin: 0 0 1.25rem;
}
.hero-strip video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0.45) saturate(1.1);
}
.hero-strip .veil {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(5,6,8,0.95), rgba(5,6,8,0.25));
}
.hero-strip .inner {
  position: relative; z-index: 2; max-width: 1100px; margin: 0 auto;
  padding: 2.75rem 1.15rem 1.35rem;
}
h1, .title {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  letter-spacing: 0.03em; line-height: 0.92; margin-bottom: 0.4rem;
}
.muted { color: var(--text-bench); }
.heat { color: var(--ikz-red); }
.lime { color: var(--court-line-glow); }
.stack { display: flex; flex-direction: column; gap: 0.75rem; }
.row { display: flex; gap: 0.55rem; flex-wrap: wrap; align-items: center; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.75rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0.75rem; }

.field { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.7rem; }
.field label { color: var(--text-bench); font-size: 0.8rem; letter-spacing: 0.04em; }
.field input, .field select, .field textarea {
  background: rgba(255,255,255,0.04); border: 0; outline: none;
  border-radius: 12px; padding: 0.8rem 0.9rem; color: var(--text-chalk); font: inherit;
  font-size: 16px; /* prevent iOS zoom */
}
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th, .table td { text-align: left; padding: 0.7rem 0.25rem; }
.table th { color: var(--text-bench); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
.table tr { background: linear-gradient(90deg, rgba(255,255,255,0.03), transparent); }
.table tr + tr td { box-shadow: inset 0 1px 0 rgba(255,255,255,0.04); }
.rank-1 { color: var(--ikz-red); font-weight: 800; }
.item {
  padding: 0.9rem 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.03), transparent);
}
.item + .item { box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); }
.pill {
  display: inline-flex; padding: 0.2rem 0.55rem; border-radius: 999px;
  font-size: 0.75rem; background: rgba(163,230,53,0.12); color: var(--court-line-glow);
}
.pill.warn { background: rgba(249,115,22,0.15); color: var(--court-accent-orange); }
.error { color: #ff6b6b; }
.ok { color: var(--court-line-glow); }
.product-stream {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.35rem 1rem;
}
.product .viz {
  height: 200px; overflow: hidden; margin-bottom: 0.7rem;
  mask-image: linear-gradient(to bottom, #000 78%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent);
}
.product .viz video,
.product .viz img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.88); display: block; }
.price { font-family: "Bebas Neue", sans-serif; font-size: 1.6rem; color: var(--ikz-red); }
.telemetry { display: flex; flex-wrap: wrap; gap: 1.25rem 1.75rem; margin: 1rem 0 1.25rem; }
.gauge label { display: block; color: var(--text-bench); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; }
.gauge strong { font-family: "Bebas Neue", sans-serif; font-size: 2.1rem; line-height: 1; }
.footer { text-align: center; color: var(--text-bench); padding: 2rem 1rem 3rem; }
.footer-badges { display:flex; flex-wrap:wrap; gap:0.75rem; justify-content:center; align-items:center; margin:1.25rem 0; }
.footer-badges a img, .footer-badges img { height:40px; width:auto; display:block; }
.footer-links { display:flex; flex-wrap:wrap; gap:0.75rem 1.1rem; justify-content:center; margin:0.85rem 0; }
.footer-links a { color:var(--text-bench); font-size:0.9rem; }
.footer-links a:hover { color:var(--text-chalk); }
.legal-page { max-width:820px; margin:0 auto; padding:1.5rem 1.1rem 4rem; }
.legal-page h1 { font-size:clamp(1.8rem,4vw,2.6rem); margin-bottom:0.5rem; }
.legal-page h2 { margin:2rem 0 0.75rem; font-size:1.25rem; color:var(--court-line-glow); }
.legal-page h3 { margin:1.25rem 0 0.5rem; font-size:1.05rem; }
.legal-page p, .legal-page li { color:var(--text-bench); line-height:1.65; margin-bottom:0.65rem; }
.legal-page ul { padding-left:1.2rem; margin-bottom:1rem; }
.legal-toc { display:flex; flex-wrap:wrap; gap:0.5rem; margin:1.25rem 0 2rem; }
.legal-toc a { font-size:0.82rem; padding:0.4rem 0.7rem; border-radius:999px; background:rgba(255,255,255,0.06); color:var(--text-bench); }
.legal-toc a:hover { color:var(--text-chalk); background:rgba(255,255,255,0.1); }

@media (max-width: 860px) {
  .nav-desktop { display: none !important; }
  .nav-toggle { display: inline-flex; }
  .page { padding: 1rem 1rem 3.5rem; }
  .hero-strip { min-height: 160px; }
  .hero-strip .inner { padding: 2.2rem 1rem 1.1rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .row .btn { flex: 1 1 auto; min-height: 44px; }
  .product-stream { grid-template-columns: 1fr 1fr; gap: 1rem 0.75rem; }
  .product .viz { height: 150px; }
  .gauge strong { font-size: 1.75rem; }
  .table { font-size: 0.85rem; }
  .table th, .table td { padding: 0.6rem 0.15rem; }
}

@media (max-width: 720px) {
  .topbar { min-height: 112px; }
  .brand-logo { height: 96px; max-width: min(52vw, 220px); }
  .drawer-head .brand-logo { height: 80px; }
}
@media (max-width: 420px) {
  .product-stream { grid-template-columns: 1fr; }
  .topbar { min-height: 104px; }
  .brand-logo { height: 88px; max-width: min(58vw, 200px); }
  .brand-logo-footer { height: 160px; max-width: min(78vw, 260px); }
  .drawer-head .brand-logo { height: 72px; }
}
