/* =========================================================
   Built by JS — builtbyjs.ca
   ========================================================= */
:root {
  --bg: #07070b;
  --bg-2: #0c0c13;
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f4f4f7;
  --text-2: #a9a9b8;
  --text-3: #6d6d7e;
  --brand-1: #7c5cff;
  --brand-2: #22d3ee;
  --brand-3: #f472b6;
  --radius: 22px;
  --radius-sm: 14px;
  --maxw: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --f-display: "Sora", "Inter", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: rgba(124, 92, 255, .45); color: #fff; }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 3px; border-radius: 6px; }
.ico { width: 1.1em; height: 1.1em; flex: none; }

/* ---------- ambient layers ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); }
}
.spotlight {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 30%), rgba(124, 92, 255, .07), transparent 60%);
}

.aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.aurora span {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; mix-blend-mode: screen;
  animation: drift 22s var(--ease) infinite alternate;
}
.aurora span:nth-child(1) { width: 52vw; height: 52vw; left: -12vw; top: -18vw; background: #5b3cff; }
.aurora span:nth-child(2) { width: 40vw; height: 40vw; right: -10vw; top: -6vw; background: #0ea5e9; animation-duration: 26s; animation-delay: -6s; opacity: .4; }
.aurora span:nth-child(3) { width: 34vw; height: 34vw; left: 30vw; top: 22vw; background: #db2777; animation-duration: 30s; animation-delay: -12s; opacity: .28; }
.aurora span:nth-child(4) { width: 26vw; height: 26vw; right: 12vw; top: 30vw; background: #f59e0b; animation-duration: 34s; opacity: .14; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, 4vw) scale(1.12); }
  100% { transform: translate(-4vw, 6vw) scale(.92); }
}
.grid-lines {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  opacity: .5;
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; z-index: 50;
  width: min(var(--maxw), calc(100% - 2 * var(--gutter)));
  transform: translateX(-50%);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 10px 10px 16px;
  border: 1px solid transparent; border-radius: 999px;
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s;
}
.nav.scrolled {
  background: rgba(12, 12, 19, .66);
  border-color: var(--line);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 600; letter-spacing: -.01em; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  font-size: 13px; font-weight: 800; letter-spacing: .02em;
  background: conic-gradient(from 210deg, var(--brand-1), var(--brand-2), var(--brand-3), var(--brand-1));
  color: #fff; box-shadow: 0 6px 24px -6px rgba(124, 92, 255, .7);
}
.brand-name { font-size: 17px; color: var(--text-2); }
.brand-name b { color: var(--text); font-weight: 700; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 14px; border-radius: 999px; color: var(--text-2); font-size: 14.5px; font-weight: 500; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.lang {
  display: flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line-2);
  font: 500 12px var(--f-mono);
}
.lang span { padding: 5px 9px; border-radius: 999px; color: var(--text-3); transition: .25s var(--ease); }
html[lang="en"] .lang [data-l="en"], html[lang="fr"] .lang [data-l="fr"] { background: var(--text); color: var(--bg); }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 15px; line-height: 1;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 10px 16px; font-size: 14px; }
.btn-lg { padding: 16px 26px; font-size: 16px; }
.btn-primary {
  background: linear-gradient(135deg, #8b6dff, #5b8cff 55%, #22d3ee);
  color: #fff; box-shadow: 0 10px 30px -10px rgba(124, 92, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary:hover { box-shadow: 0 16px 40px -10px rgba(124, 92, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-ghost { border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px var(--gutter) 90px; overflow: hidden; isolation: isolate;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 200px; z-index: 0;
  background: linear-gradient(transparent, var(--bg));
}
.hero-inner {
  position: relative; z-index: 2; width: 100%; max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.12fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 26px;
  padding: 7px 14px 7px 10px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); backdrop-filter: blur(10px);
  font-size: 13px; color: var(--text-2);
}
.live-dot {
  position: relative; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex: none;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: pulse 2s infinite;
}
.live-dot.red { background: #ef4444; box-shadow: 0 0 0 0 rgba(239, 68, 68, .6); animation-name: pulseRed; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
@keyframes pulseRed { 70% { box-shadow: 0 0 0 9px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }

.hero-title {
  margin: 0; font-family: var(--f-display); font-weight: 700;
  font-size: clamp(40px, 5.3vw, 76px); line-height: 1.02; letter-spacing: -.035em;
}
.hl {
  background: linear-gradient(100deg, #a78bfa 0%, #60a5fa 30%, #22d3ee 50%, #f472b6 75%, #a78bfa 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 7s linear infinite;
}
@keyframes shimmer { to { background-position: -220% 0; } }
.hero-lead { margin: 24px 0 30px; max-width: 560px; font-size: clamp(17px, 1.5vw, 19px); color: var(--text-2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: flex; gap: clamp(20px, 4vw, 44px); margin: 40px 0 0; padding: 0; }
.hero-stats div { min-width: 0; }
.hero-stats dt { font: 700 34px/1 var(--f-display); letter-spacing: -.03em; }
.hero-stats dd { margin: 8px 0 0; font-size: 13.5px; color: var(--text-3); max-width: 150px; line-height: 1.4; }

.hero-visual { position: relative; height: clamp(380px, 46vw, 560px); perspective: 1600px; }
.stack {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateX(var(--rx, 8deg)) rotateY(var(--ry, -16deg)) rotateZ(2deg);
  transition: transform .6s var(--ease);
}
.frame {
  margin: 0; border-radius: 14px; overflow: hidden; background: #111118;
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .03) inset;
}
.frame-bar {
  display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  background: linear-gradient(#1b1b25, #15151d); border-bottom: 1px solid var(--line);
  font: 500 11.5px var(--f-mono); color: var(--text-3);
}
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3a48; }
.frame-bar i:nth-child(1) { background: #ff5f57; } .frame-bar i:nth-child(2) { background: #febc2e; } .frame-bar i:nth-child(3) { background: #28c840; }
.frame-bar span {
  flex: 1; margin: 0 8px 0 10px; padding: 4px 10px; border-radius: 7px; background: rgba(255, 255, 255, .05);
  text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stack .frame { position: absolute; width: 82%; }
.stack .frame img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.f-back { top: 0; left: 18%; transform: translateZ(-160px) translateY(-6%); filter: brightness(.7); animation: floatA 9s ease-in-out infinite; }
.f-mid { top: 16%; left: 9%; transform: translateZ(-70px); filter: brightness(.85); animation: floatB 10s ease-in-out infinite; }
.f-front { top: 34%; left: 0; transform: translateZ(20px); animation: floatC 8s ease-in-out infinite; }
@keyframes floatA { 50% { translate: 0 -10px; } }
@keyframes floatB { 50% { translate: 0 8px; } }
@keyframes floatC { 50% { translate: 0 -6px; } }

.phone {
  margin: 0; position: relative; padding: 7px; border-radius: 34px; background: #0d0d12;
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9), inset 0 0 0 2px #1d1d26;
}
.phone::before {
  content: ""; position: absolute; top: 14px; left: 50%; width: 30%; height: 16px; border-radius: 99px;
  transform: translateX(-50%); background: #000; z-index: 2;
}
.phone img { border-radius: 27px; width: 100%; aspect-ratio: 640 / 1385; object-fit: cover; object-position: top; }
.f-phone { position: absolute; width: 22%; right: 0; top: 30%; transform: translateZ(90px); animation: floatB 7s ease-in-out infinite; }

.float-chip {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 12px; font-size: 13px; font-weight: 500;
  background: rgba(20, 20, 30, .75); border: 1px solid var(--line-2);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .8);
  transform: translateZ(140px);
}
.float-chip .ico { color: #22c55e; }
.c1 { left: -4%; top: 22%; animation: floatA 6s ease-in-out infinite; }
.c2 { right: 6%; bottom: -2%; animation: floatC 7s ease-in-out infinite; }

.scroll-cue {
  position: absolute; z-index: 3; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: 26px; height: 42px; border-radius: 99px; border: 1.5px solid var(--line-2);
}
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 4px; background: var(--text-2); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- marquee ---------- */
.marquee {
  position: relative; overflow: hidden; padding: 22px 0;
  border-block: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 45s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; gap: 14px; margin: 0; padding: 0 7px; list-style: none; }
.marquee li {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  font: 500 14px var(--f-mono); color: var(--text-2); white-space: nowrap; background: var(--surface);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { position: relative; max-width: var(--maxw); margin: 0 auto; padding: clamp(90px, 12vw, 150px) var(--gutter) 40px; }
.kicker {
  margin: 0 0 16px; font: 500 13px var(--f-mono); text-transform: uppercase; letter-spacing: .18em;
  background: linear-gradient(90deg, #a78bfa, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-title { margin: 0; font: 700 clamp(34px, 5vw, 64px)/1.04 var(--f-display); letter-spacing: -.035em; max-width: 900px; }
.muted { color: var(--text-3); }
.section-lead { margin: 22px 0 0; max-width: 640px; font-size: 18px; color: var(--text-2); }
.work-index { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.work-index a {
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px 11px 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 15px;
  transition: .3s var(--ease);
}
.work-index a b {
  font: 600 11px var(--f-mono); padding: 4px 7px; border-radius: 99px; color: #0b0b10;
  background: linear-gradient(135deg, var(--a1), var(--a2));
}
.work-index a:hover { border-color: var(--a1); transform: translateY(-2px); box-shadow: 0 12px 30px -14px var(--a1); }

/* ---------- project ---------- */
.project {
  position: relative; max-width: var(--maxw); margin: 0 auto;
  padding: clamp(80px, 10vw, 130px) var(--gutter) 20px;
}
.project-glow {
  position: absolute; z-index: -1; left: 50%; top: 18%; width: 90%; height: 70%;
  transform: translateX(-50%); border-radius: 50%; filter: blur(110px);
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
}
.p-head { display: flex; align-items: flex-end; gap: clamp(16px, 3vw, 30px); flex-wrap: wrap; }
.p-num {
  font: 800 clamp(64px, 9vw, 120px)/.8 var(--f-display); letter-spacing: -.05em;
  background: linear-gradient(160deg, var(--a1), var(--a2) 60%, transparent 110%);
  -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .9;
}
.p-heading { flex: 1; min-width: 220px; }
.p-kicker { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 8px; font: 500 13px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--a1); }
.p-title { margin: 0; font: 700 clamp(38px, 5.6vw, 72px)/1 var(--f-display); letter-spacing: -.04em; }
.wip { padding: 3px 9px; border-radius: 99px; font-size: 11px; letter-spacing: .08em; color: #0b0b10; background: var(--a1); }
.live-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04);
  font: 500 14px var(--f-mono); transition: .3s var(--ease);
}
.live-pill:hover { border-color: var(--a1); background: rgba(255, 255, 255, .07); box-shadow: 0 10px 30px -12px var(--a1); transform: translateY(-2px); }
.live-pill .ico { transition: transform .3s var(--ease); }
.live-pill:hover .ico { transform: translate(2px, -2px); }

.p-intro { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 5vw, 70px); margin: 40px 0 46px; }
.p-teaser { margin: 0; font: 600 clamp(21px, 2.3vw, 29px)/1.3 var(--f-display); letter-spacing: -.02em; }
.p-meta p { margin: 0; color: var(--text-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.chips li {
  padding: 6px 12px; border-radius: 999px; font: 500 12.5px var(--f-mono); color: var(--text);
  background: color-mix(in srgb, var(--a1) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--a1) 30%, transparent);
}

/* ---------- tour ---------- */
.tour { display: grid; grid-template-columns: 330px 1fr; gap: 26px; align-items: start; }
.tour-tabs { display: flex; flex-direction: column; gap: 4px; }
.tour-tab {
  position: relative; display: block; text-align: left; padding: 14px 16px 15px; border-radius: var(--radius-sm);
  border: 1px solid transparent; overflow: hidden; transition: background .3s, border-color .3s;
}
.tour-tab b { display: block; font-weight: 600; font-size: 15.5px; color: var(--text-2); transition: color .3s; }
.tour-tab small { display: block; max-height: 0; overflow: hidden; opacity: 0; color: var(--text-3); font-size: 13.5px; line-height: 1.45; transition: max-height .45s var(--ease), opacity .35s, margin .35s; }
.tour-tab:hover b { color: var(--text); }
.tour-tab.active { background: var(--surface-2); border-color: var(--line); }
.tour-tab.active b { color: var(--text); }
.tour-tab.active small { max-height: 60px; opacity: 1; margin-top: 4px; }
.tour-tab .bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, var(--a1), var(--a2)); }
.tour-tab.active .bar { animation: progress var(--dur, 6s) linear forwards; }
.tour.paused .tour-tab.active .bar { animation-play-state: paused; }
@keyframes progress { to { transform: scaleX(1); } }

.tour-stage { position: relative; }
.tour-frame { position: relative; }
.tour-frame .frame-bar { height: 38px; }
.zoom { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; color: var(--text-3); transition: .2s; }
.zoom:hover { color: var(--text); background: var(--surface-2); }
.slides { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0b0b10; cursor: zoom-in; }
.slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top;
  opacity: 0; transform: scale(1.025); transition: opacity .6s var(--ease), transform .9s var(--ease);
  pointer-events: none;
}
.slide.active { opacity: 1; transform: none; pointer-events: auto; }
.slide-center { display: grid; place-items: center; padding: 4% 0; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--a1) 30%, transparent), transparent 65%), #0b0b10; }
.slide-center .phone { height: 100%; width: auto; aspect-ratio: 654 / 1399; }
.slide-center .phone img { height: 100%; }
.slide-duo { display: flex; align-items: center; justify-content: center; gap: 4%; padding: 0 5%; background: linear-gradient(135deg, #eef2f7, #dfe7f1); }
.slide-duo > img { width: 64%; border-radius: 10px; box-shadow: 0 20px 50px -20px rgba(15, 23, 42, .45); aspect-ratio: 16 / 10; object-fit: cover; }
.slide-duo .phone { width: 22%; flex: none; }

.tour-phone { position: absolute; width: 19%; right: -4%; bottom: -10%; z-index: 3; transform: rotate(3deg); transition: transform .5s var(--ease); }
.tour-stage:hover .tour-phone { transform: rotate(0) translateY(-8px); }
.illus-tag {
  position: absolute; left: 14px; bottom: 14px; z-index: 4; padding: 5px 10px; border-radius: 8px;
  font: 500 11px var(--f-mono); color: #fff; background: rgba(10, 10, 16, .72); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.tour-frame.illus .illus-tag { opacity: 1; }

.also { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 34px 0 0; padding: 0; list-style: none; }
.also li { padding: 18px 18px 20px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); transition: .3s var(--ease); }
.also li:hover { border-color: color-mix(in srgb, var(--a1) 45%, transparent); transform: translateY(-3px); }
.also b { display: block; margin-bottom: 6px; font-size: 15px; }
.also b::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 2px; transform: translateY(-2px) rotate(45deg); background: linear-gradient(135deg, var(--a1), var(--a2)); }
.also span { color: var(--text-3); font-size: 14px; }

/* ---------- WeightTracker illustrations (light, app-like) ---------- */
.frame-light .slides { background: #f3f5f9; }
.wt-slide { padding: 4.5%; background: linear-gradient(180deg, #f6f8fb, #edf1f6); color: #0f172a; font-size: clamp(10px, 1.15vw, 15px); }
.wt-card { background: #fff; border-radius: 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 10px 30px -12px rgba(15, 23, 42, .18); padding: 1.3em 1.4em; }
.wt-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1em; margin-bottom: .8em; }
.wt-card-head b { display: block; font-size: 1.25em; }
.wt-card-head small { color: #64748b; }
.wt-chart-card { height: 100%; display: flex; flex-direction: column; }
.wt-legend { display: flex; flex-wrap: wrap; gap: .4em 1em; margin: 0; padding: 0; list-style: none; font-size: .85em; color: #475569; }
.wt-legend li { display: flex; align-items: center; gap: .45em; }
.wt-legend i { width: 1.1em; height: 3px; border-radius: 2px; }
.wt-legend i.dash { background: repeating-linear-gradient(90deg, var(--c) 0 4px, transparent 4px 7px); }
.wt-chart { flex: 1; width: 100%; min-height: 0; overflow: visible; }
.wt-chart .grid line { stroke: #e2e8f0; stroke-width: 1; }
.wt-chart .ax { fill: #94a3b8; font: 500 11px var(--f-body); }
.wt-chart .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.slide.active .wt-chart .draw { animation: draw 2.2s var(--ease) forwards; }
.slide.active .wt-chart .d2 { animation-delay: .4s; }
.slide.active .wt-chart .d3 { animation-delay: .8s; }
.wt-chart .pts circle { opacity: 0; }
.slide.active .wt-chart .pts circle { animation: fadeIn .4s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }

.wt-split { display: grid; grid-template-columns: 1fr 1fr; gap: 5%; align-items: center; }
.wt-explain h4 { margin: 0 0 .5em; font: 700 2em/1.1 var(--f-display); letter-spacing: -.03em; color: #0f172a; }
.wt-explain p { margin: 0; color: #475569; font-size: 1.05em; line-height: 1.55; }
.cam { background: #0b1220; border-radius: 22px; padding: 4%; box-shadow: 0 30px 60px -25px rgba(15, 23, 42, .6); }
.cam-view {
  position: relative; aspect-ratio: 4 / 3.2; border-radius: 14px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, #3b4252 0%, #1e2430 55%, #12161f 100%);
}
.lcd {
  display: flex; align-items: baseline; gap: .3em; padding: .55em .8em; border-radius: 10px;
  background: linear-gradient(#a7c5a0, #8fb388); box-shadow: inset 0 3px 10px rgba(0, 0, 0, .35), 0 0 0 6px #2a303c;
  color: #1c2a1a;
}
.lcd-digits { font: 600 3.2em/1 var(--f-mono); letter-spacing: .04em; }
.lcd small { font: 600 1em var(--f-mono); }
.corner { position: absolute; width: 14%; height: 14%; border: 3px solid #34d399; }
.corner.tl { left: 18%; top: 22%; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.corner.tr { right: 18%; top: 22%; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.corner.bl { left: 18%; bottom: 22%; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.corner.br { right: 18%; bottom: 22%; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.scanline { position: absolute; left: 18%; right: 18%; top: 22%; height: 2px; background: #34d399; box-shadow: 0 0 14px 3px rgba(52, 211, 153, .7); }
.slide.active .scanline { animation: scan 2.4s ease-in-out infinite; }
@keyframes scan { 0%, 100% { top: 24%; } 50% { top: 76%; } }
.cam-result { display: flex; flex-direction: column; gap: .8em; padding: 1em .4em .3em; }
.badge-ok { display: inline-flex; align-self: flex-start; align-items: center; gap: .45em; padding: .45em .8em; border-radius: 99px; background: rgba(52, 211, 153, .15); color: #6ee7b7; font-weight: 600; font-size: .95em; }
.cam-btns { display: flex; gap: .6em; }
.cam-btns .b { flex: 1; text-align: center; padding: .7em; border-radius: 10px; background: #1e293b; color: #cbd5e1; font-weight: 600; font-size: .9em; }
.cam-btns .b-primary { background: #2563eb; color: #fff; }

.wt-today .wt-weight { font: 700 1.9em/1 var(--f-display); color: #2563eb; }
.wt-today .wt-weight small { font-size: .5em; color: #64748b; }
.checks { margin: .6em 0 0; padding: 0; list-style: none; display: grid; gap: .45em; }
.checks li { display: flex; align-items: center; gap: .8em; padding: .7em .9em; border-radius: 10px; background: #f8fafc; border: 1px solid #e2e8f0; font-weight: 500; }
.checks i { width: 1.3em; height: 1.3em; border-radius: 6px; border: 2px solid #cbd5e1; flex: none; display: grid; place-items: center; }
.checks li.on i { background: #2563eb; border-color: #2563eb; }
.checks li.on i::after { content: ""; width: .35em; height: .65em; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.checks li.on { background: #eff6ff; border-color: #bfdbfe; }
.wt-note { margin-top: .8em; padding: .7em .9em; border-radius: 10px; background: #fffbeb; color: #92400e; font-size: .92em; border: 1px dashed #fcd34d; }

.wt-stats { height: 100%; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: auto 1fr; gap: 1em; }
.wt-tile { background: #fff; border-radius: 14px; padding: 1.1em 1.2em; box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 10px 30px -14px rgba(15, 23, 42, .18); }
.wt-tile small { display: block; color: #64748b; font-weight: 500; }
.wt-tile b { display: block; margin: .3em 0 .2em; font: 700 1.9em/1.1 var(--f-display); letter-spacing: -.03em; }
.wt-tile b i { font-style: normal; font-size: .5em; color: #64748b; }
.wt-tile span { font-size: .85em; color: #64748b; }
.wt-tile .up { color: #059669; font-weight: 600; }
.wt-habits { grid-column: 1 / -1; display: flex; flex-direction: column; justify-content: center; gap: .9em; }
.wt-habits > b { font-size: 1.15em; }
.hbar { display: grid; grid-template-columns: 9em 1fr 3em; align-items: center; gap: 1em; font-weight: 500; }
.hbar i { position: relative; height: .7em; border-radius: 99px; background: #e2e8f0; overflow: hidden; }
.hbar i::after { content: ""; position: absolute; inset: 0; width: var(--w); border-radius: 99px; background: linear-gradient(90deg, #10b981, #2563eb); transform: scaleX(0); transform-origin: left; }
.slide.active .hbar i::after { animation: grow 1.3s var(--ease) .2s forwards; }
.hbar em { font-style: normal; color: #64748b; text-align: right; }
@keyframes grow { to { transform: scaleX(1); } }

/* ---------- MangaTCG illustrations ---------- */
.mg-slide {
  display: grid; place-items: center; padding: 4%; font-size: clamp(9px, 1.1vw, 14px);
  background: radial-gradient(circle at 50% 30%, rgba(251, 191, 36, .12), transparent 60%), #111014;
}
.pack-stage { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fan { position: relative; width: 100%; height: 74%; }
.tcg {
  position: absolute; left: 50%; top: 8%; width: 16%; aspect-ratio: 5 / 7; margin-left: -8%;
  border-radius: 10px; padding: 1.6%; transform-origin: 50% 100%;
  background: linear-gradient(160deg, #26231d, #0d0c0b);
  border: 1.5px solid var(--rc); box-shadow: 0 18px 30px -12px rgba(0, 0, 0, .9), 0 0 22px -6px var(--rc);
  display: flex; flex-direction: column; justify-content: space-between; color: var(--rc);
  font: 600 .75em var(--f-mono); letter-spacing: .1em;
  transform: translateY(40%) scale(.8); opacity: 0;
  transition: transform 1s var(--ease), opacity .5s;
}
.tcg .k { align-self: center; font: 700 3.3em/1 "Noto Sans JP", var(--f-display); color: rgba(255, 255, 255, .85); text-shadow: 0 0 18px var(--rc); }
.tcg .r { align-self: flex-end; padding: .1em .45em; border-radius: 4px; background: var(--rc); color: #111; }
.tcg.ur { background: linear-gradient(160deg, #3b2a0a, #120d05); }
.tcg.ur::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%);
  background-size: 250% 100%; animation: holo 2.6s linear infinite;
}
@keyframes holo { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.slide.active .tcg { opacity: 1; transform: translateX(var(--tx)) translateY(var(--ty)) rotate(var(--rot)); }
.pack-cap { position: relative; z-index: 30; margin: 1.2em 0 0; padding: .5em 1em; border-radius: 99px; background: rgba(0, 0, 0, .55); color: #d6d3d1; font-size: 1.15em; }
.pack-cap b { color: #fbbf24; }

.mg-sets { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 1.2em; }
.mg-set { display: flex; gap: 1.1em; align-items: center; padding: 1.1em; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); }
.mg-cover {
  width: 4.6em; aspect-ratio: 5 / 7; flex: none; border-radius: 8px; display: grid; place-items: center;
  font: 700 2.2em/1 "Noto Sans JP", var(--f-display); color: rgba(255, 255, 255, .9);
  background: linear-gradient(160deg, hsl(var(--h) 70% 45%), hsl(calc(var(--h) + 40) 60% 18%));
}
.mg-info { flex: 1; min-width: 0; }
.mg-info b { display: block; color: #fafaf9; font-size: 1.2em; }
.mg-info small { display: block; margin: .3em 0 .7em; color: #a8a29e; }
.mg-info .gold { color: #fbbf24; font-weight: 600; }
.mg-info i { display: block; position: relative; height: .55em; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.mg-info i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: linear-gradient(90deg, #fbbf24, #f97316); border-radius: 99px; transform: scaleX(0); transform-origin: left; }
.slide.active .mg-info i::after { animation: grow 1.3s var(--ease) .2s forwards; }

.mg-market { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4em; }
.mg-lot { display: flex; flex-direction: column; align-items: center; gap: .55em; padding: 1.5em 1em; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); text-align: center; color: #fafaf9; }
.mg-lot small { color: #a8a29e; }
.mg-lot em { font: 700 1.5em var(--f-display); font-style: normal; color: #fbbf24; }
.mini-card {
  width: 55%; aspect-ratio: 5 / 7; border-radius: 10px; display: grid; place-items: center; margin-bottom: .4em;
  font: 700 3.4em/1 "Noto Sans JP", var(--f-display); color: rgba(255, 255, 255, .88);
  border: 1.5px solid var(--rc); box-shadow: 0 0 26px -6px var(--rc); background: linear-gradient(160deg, #26231d, #0d0c0b);
}
.r-ur { --rc: #fbbf24; } .r-sr { --rc: #c084fc; } .r-r { --rc: #38bdf8; }
.tag { padding: .25em .7em; border-radius: 99px; font: 600 .8em var(--f-mono); letter-spacing: .06em; text-transform: uppercase; }
.t-auc { background: rgba(239, 68, 68, .18); color: #fca5a5; }
.t-buy { background: rgba(34, 197, 94, .16); color: #86efac; }
.t-trade { background: rgba(56, 189, 248, .16); color: #7dd3fc; }

/* ---------- craft ---------- */
.craft-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 50px; }
.craft-card {
  position: relative; padding: 26px 24px 28px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  border: 1px solid var(--line);
  transition: transform .4s var(--ease), border-color .4s;
}
.craft-card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .4s;
  background: radial-gradient(400px circle at var(--cx, 50%) var(--cy, 0%), rgba(124, 92, 255, .16), transparent 50%);
}
.craft-card:hover { transform: translateY(-4px); border-color: var(--line-2); }
.craft-card:hover::before { opacity: 1; }
.cc-n { font: 500 12px var(--f-mono); color: var(--text-3); }
.craft-card h3 { position: relative; margin: 40px 0 10px; font: 600 21px var(--f-display); letter-spacing: -.02em; }
.craft-card p { position: relative; margin: 0; color: var(--text-2); font-size: 15px; }
.pipeline {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 26px; padding: 18px 20px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  font: 500 13.5px var(--f-mono); color: var(--text-2);
}
.pipeline span { padding: 7px 12px; border-radius: 9px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.pipeline .ok { color: #4ade80; border-color: rgba(74, 222, 128, .35); background: rgba(74, 222, 128, .08); }
.pipeline i { position: relative; flex: 1; min-width: 18px; height: 1px; background: var(--line-2); overflow: hidden; }
.pipeline i::after { content: ""; position: absolute; top: 0; left: -40%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, #22d3ee, transparent); animation: flow 2.2s linear infinite; }
@keyframes flow { to { left: 100%; } }

/* ---------- contact ---------- */
.contact {
  position: relative; isolation: isolate; overflow: hidden; text-align: center;
  margin: clamp(80px, 10vw, 130px) auto 0; padding: clamp(90px, 12vw, 150px) var(--gutter);
  border-top: 1px solid var(--line);
}
.contact .aurora span { opacity: .35; }
.contact .kicker, .contact .section-lead { margin-left: auto; margin-right: auto; }
.contact-title { margin: 0 auto; max-width: 900px; font: 700 clamp(38px, 6.5vw, 88px)/1 var(--f-display); letter-spacing: -.045em; }
.contact-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 44px; }
.mail-big {
  display: inline-flex; align-items: center; gap: 14px; padding: 20px 32px; border-radius: 999px;
  font: 600 clamp(19px, 2.4vw, 28px) var(--f-display); letter-spacing: -.02em; color: #fff;
  background: linear-gradient(135deg, #8b6dff, #5b8cff 55%, #22d3ee);
  box-shadow: 0 24px 60px -20px rgba(124, 92, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.mail-big:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 30px 70px -20px rgba(124, 92, 255, 1), inset 0 1px 0 rgba(255, 255, 255, .3); }

.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  max-width: var(--maxw); margin: 0 auto; padding: 30px var(--gutter) 40px;
  border-top: 1px solid var(--line); color: var(--text-3); font-size: 13.5px;
}

/* ---------- lightbox & toast ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 60px 70px;
  background: rgba(5, 5, 9, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; transition: opacity .3s;
}
.lightbox[hidden] { display: none; }
.lightbox.open { opacity: 1; }
.lightbox figure { margin: 0; max-width: 1400px; width: 100%; }
.lightbox img { width: 100%; max-height: 80vh; object-fit: contain; border-radius: 12px; box-shadow: 0 40px 100px -30px #000; }
.lightbox figcaption { margin-top: 14px; text-align: center; color: var(--text-2); font-size: 14.5px; }
.lb-btn { position: absolute; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .08); border: 1px solid var(--line-2); transition: .2s; }
.lb-btn:hover { background: rgba(255, 255, 255, .16); }
.lb-btn .ico { width: 20px; height: 20px; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 210; padding: 12px 18px; border-radius: 12px;
  background: #f4f4f7; color: #0b0b10; font-weight: 600; font-size: 14px;
  transform: translate(-50%, 200%); opacity: 0; visibility: hidden;
  transition: transform .4s var(--ease), opacity .3s, visibility .4s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

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

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .tour { grid-template-columns: 1fr; }
  .tour-tabs { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; padding-bottom: 4px; scrollbar-width: none; }
  .tour-tabs::-webkit-scrollbar { display: none; }
  .tour-tab { flex: none; scroll-snap-align: start; padding: 10px 14px 12px; border: 1px solid var(--line); border-radius: 999px; }
  .tour-tab b { font-size: 14px; white-space: nowrap; }
  .tour-tab small, .tour-tab.active small { display: none; }
  .tour-tab .bar { left: 14px; right: 14px; width: auto; bottom: 4px; }
  .also, .craft-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero { padding-top: 120px; }
  .hero-visual { height: 64vw; max-height: 460px; margin-top: 10px; }
  .p-intro { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .brand-name { display: none; }
  .nav { top: 10px; }
  .nav .btn-sm { padding: 9px 13px; font-size: 13px; }
  .hero-stats { gap: 18px; }
  .hero-stats dt { font-size: 28px; }
  .hero-stats dd { font-size: 12px; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .float-chip { font-size: 11px; padding: 7px 10px; }
  .tour-phone { width: 24%; right: -2%; bottom: -8%; }
  .also, .craft-grid { grid-template-columns: 1fr; }
  .p-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .p-num { font-size: 56px; }
  .slides { aspect-ratio: 4 / 3.4; }
  .wt-slide, .mg-slide { font-size: 8.5px; padding: 4%; }
  .wt-split { grid-template-columns: 1fr; gap: 1em; }
  .wt-explain { display: none; }
  .wt-split .cam, .wt-split .wt-today { max-width: 78%; margin: 0 auto; }
  .mg-sets { grid-template-columns: 1fr; gap: .7em; }
  .mg-set { padding: .7em; }
  .lightbox { padding: 60px 10px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
  .lb-prev { left: calc(50% - 56px); } .lb-next { right: calc(50% - 56px); }
  .pipeline i { display: none; }
  .contact-actions .btn { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* hide the companion phone while an illustration slide is showing */
.tour-phone { transition: transform .5s var(--ease), opacity .4s; }
.tour-frame.illus ~ .tour-phone { opacity: 0; transform: translateY(24px) rotate(3deg); pointer-events: none; }

/* ---------- games ---------- */
.games-intro { padding-top: clamp(110px, 14vw, 180px); }
.games-intro::before {
  content: ""; display: block; width: 100%; height: 1px; margin-bottom: clamp(60px, 8vw, 100px);
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
}
.tour-game .slides { aspect-ratio: 16 / 9; }
.tour-game .slide { object-position: center; }
.wip-alt { background: transparent; color: var(--a1); border: 1px solid color-mix(in srgb, var(--a1) 50%, transparent); }
.p-meta a.inline { color: var(--text); text-decoration: underline; text-decoration-color: var(--a1); text-underline-offset: 3px; }
.p-meta a.inline:hover { color: var(--a1); }
.boxart {
  position: absolute; z-index: 3; width: 17%; right: -3%; bottom: -12%; margin: 0;
  border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .95), 0 0 50px -16px rgba(226, 232, 240, .35);
  transform: rotate(3deg); transition: transform .5s var(--ease);
}
.tour-stage:hover .boxart { transform: rotate(0) translateY(-8px); }
.quote { margin: 34px 0 0; padding: 22px 26px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); border-left: 3px solid var(--a1); }
.quote p { margin: 0; font: 600 clamp(18px, 2vw, 22px)/1.4 var(--f-display); letter-spacing: -.01em; }
.quote cite { display: block; margin-top: 8px; font: 500 13px var(--f-mono); font-style: normal; color: var(--text-3); }
@media (max-width: 640px) {
  .boxart { width: 22%; right: -2%; bottom: -8%; }
  .tour-game .slides { aspect-ratio: 16 / 9; }
}
