/* ==========================================================================
   Nabz by Titan — pinned, scroll-driven stage
   ========================================================================== */

@property --g1 { syntax: '<color>'; inherits: true; initial-value: #2a2470; }
@property --g2 { syntax: '<color>'; inherits: true; initial-value: #0c3a4a; }

:root {
  --bg: #04050a;
  --ink: #eef0f6;
  --mute: rgba(238, 240, 246, .62);
  --faint: rgba(238, 240, 246, .36);
  --line: rgba(255, 255, 255, .14);
  --violet: #9a86ff;
  --cyan: #6ee7ff;
  --amber: #ffb86b;
  --pink: #ff7ad9;
  --display: 'Unbounded', 'Eurostile', 'Segoe UI', system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --pad: clamp(18px, 4.4vw, 64px);
  --pw: clamp(240px, 34vw, 460px);          /* carousel panel width */
  --g1: #2a2470;
  --g2: #0c3a4a;
  transition: --g1 1.6s ease, --g2 1.6s ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--mono); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.is-loading { overflow: hidden; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--violet); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }

/* ---------- World ---------- */
.aura {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(70vmax 60vmax at 0% 100%, color-mix(in srgb, var(--g2) 85%, transparent), transparent 62%),
    radial-gradient(60vmax 55vmax at 100% 0%, color-mix(in srgb, var(--g1) 85%, transparent), transparent 60%),
    radial-gradient(50vmax 40vmax at 0% 0%, color-mix(in srgb, var(--g2) 40%, transparent), transparent 60%);
}
#scene, #product { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hud-layer { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .11; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); }
  60% { transform: translate(-2%, 3%); } 80% { transform: translate(4%, 1%); } 100% { transform: translate(0, 0); }
}
.hud { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: .08em; color: rgba(255, 255, 255, .85); white-space: nowrap; will-change: transform, opacity; opacity: 0; }
.hud i { width: 14px; height: 14px; border: 1px solid rgba(255, 110, 150, .9); margin: -7px 0 -7px -7px; flex: none; }
.hud::after { content: ''; order: 1; width: 22px; height: 1px; background: rgba(255, 255, 255, .4); }
.hud span { order: 2; }

/* ---------- Loader ---------- */
.loader { position: fixed; inset: 0; z-index: 200; background: #000; display: grid; place-content: center; justify-items: center; transition: opacity .9s ease .1s, visibility 0s 1s; }
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__ascii { margin: 0; font-family: var(--mono); font-size: 12px; line-height: 1.15; letter-spacing: .32em; color: transparent; }
.loader__ascii b { font-weight: 400; color: rgba(110, 231, 255, .55); }
.loader__count { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 14px; color: var(--cyan); letter-spacing: .08em; background: #000; padding: 2px 6px; }

/* ---------- Chrome ---------- */
.logo { position: fixed; top: 20px; left: var(--pad); z-index: 101; display: block; width: 132px; height: 44px; overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.62); filter: invert(1) brightness(1.75); mix-blend-mode: screen; }
.pill {
  position: fixed; top: 22px; right: var(--pad); z-index: 101; display: flex; align-items: center; gap: 2px; padding: 5px 8px; border-radius: 999px;
  background: rgba(8, 10, 16, .6); border: 1px solid color-mix(in srgb, var(--g2) 60%, rgba(255, 255, 255, .25));
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 16px 36px -14px color-mix(in srgb, var(--g1) 100%, transparent), inset 0 1px 0 rgba(255, 255, 255, .1);
}
.pill::after {
  content: ''; position: absolute; left: 14%; right: 14%; top: 100%; height: 30px; pointer-events: none; opacity: .7;
  background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--g1) 50%, #fff) 0 1px, transparent 1px 9px, color-mix(in srgb, var(--g2) 50%, #fff) 9px 10px, transparent 10px 23px);
  -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent);
}
.pill a { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; padding: 10px 18px; border-radius: 999px; color: #fff; transition: background .3s, color .3s; }
.pill a:hover, .pill a.is-active { background: rgba(255, 255, 255, .12); }
.pill__rule { width: clamp(24px, 5vw, 64px); height: 1px; background: rgba(255, 255, 255, .7); }

.rail { position: fixed; right: 7px; top: 50%; width: 3px; height: 120px; margin-top: -60px; z-index: 101; border-radius: 3px; background: rgba(255, 255, 255, .1); }
.rail i { position: absolute; left: 0; top: 0; width: 100%; height: 22px; border-radius: 3px; background: #fff; }

.cursor { position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none; mix-blend-mode: difference; display: none; }
.cursor i { display: block; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 1px solid #fff; transition: transform .35s var(--ease), background .3s; }
.cursor.is-hover i { transform: scale(1.9); background: rgba(255, 255, 255, .12); }
.cursor.is-down i { transform: scale(.7); }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } }

/* ---------- Stage ---------- */
.spacer { width: 1px; }
.stage { position: fixed; inset: 0; z-index: 3; overflow: hidden; pointer-events: none; }
.scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; pointer-events: none; will-change: opacity, transform; }
.scene.is-live { pointer-events: auto; }

.mega { font-family: var(--display); font-weight: 300; text-transform: uppercase; line-height: 1.02; letter-spacing: -.02em; font-size: clamp(2.1rem, 6.6vw, 6.6rem); }
.mega span { display: block; white-space: nowrap; }
.mega--center { text-align: center; font-size: clamp(2rem, 6vw, 6rem); }

/* Intro */
.intro__hint { position: absolute; left: 0; right: 0; top: 17%; text-align: center; color: var(--cyan); font-size: 12px; letter-spacing: .3em; }
.intro__hint::after { content: ''; display: block; width: 1px; height: 30px; margin: 12px auto 0; background: linear-gradient(var(--cyan), transparent); animation: drip 2s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1) translateY(100%); opacity: 0; } }
.intro__foot { position: absolute; left: var(--pad); right: var(--pad); bottom: 26px; display: flex; justify-content: space-between; gap: 16px; color: var(--faint); }

/* Statement */
.statement__inner { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: clamp(20px, 4.5vh, 44px); padding: 0 var(--pad); align-content: center; }
.statement__copy { display: grid; gap: 1.2em; max-width: 36em; font-size: 12px; line-height: 1.9; color: rgba(238, 240, 246, .9); }

/* Orbit / carousel */
.menu { position: absolute; left: var(--pad); top: 50%; transform: translateY(-50%); z-index: 5; display: grid; gap: 12px; justify-items: start; }
.menu p { color: #fff; margin-bottom: 6px; }
.menu button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--violet); transition: color .3s, transform .4s var(--ease); }
.menu button::before { content: '-> '; white-space: pre; }
.menu button:hover, .menu button.is-active { color: #fff; transform: translateX(6px); }
.menu__cta { margin-top: 14px; padding: 12px 20px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--violet) 60%, transparent); color: var(--violet); background: rgba(154, 134, 255, .08); transition: all .3s; }
.menu__cta:hover { background: var(--violet); color: #0a0b12; }

.carousel { position: absolute; inset: 0; perspective: 1300px; perspective-origin: 50% 46%; }
.ring { position: absolute; left: 50%; top: 46%; width: 0; height: 0; transform-style: preserve-3d; }
.panel {
  --acc: #fff;
  position: absolute; width: var(--pw); height: calc(var(--pw) * .64); left: calc(var(--pw) * -.5); top: calc(var(--pw) * -.32);
  border-radius: 18px; overflow: hidden; cursor: pointer; display: grid; place-content: center; text-align: center;
  background: rgba(10, 12, 20, .78); border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 40px 80px -40px #000, inset 0 1px 0 rgba(255, 255, 255, .25);
  will-change: transform, opacity; backface-visibility: hidden;
}
.panel__media { position: absolute; inset: 0; z-index: 0; }
.panel__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 7, 12, .5), rgba(6, 7, 12, .72)); transition: opacity .6s; }
.panel.is-front .panel__media::after { opacity: .62; }
.shot { background-image: url('../assets/nabz-device.png'); background-size: 201% 201%; }
.shot--a { background-position: 0 0; } .shot--b { background-position: 100% 0; } .shot--c { background-position: 0 100%; } .shot--d { background-position: 100% 100%; }
.panel__tag { position: absolute; z-index: 1; left: 14px; top: 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 9.5px; color: rgba(255, 255, 255, .85); }
.panel__tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.panel__tag i + i { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.panel h3 { position: relative; z-index: 1; font-family: var(--display); font-weight: 300; text-transform: uppercase; font-size: calc(var(--pw) * .082); line-height: 1.08; letter-spacing: .02em; text-shadow: 0 2px 24px rgba(0, 0, 0, .7); }
.panel__price { position: relative; z-index: 1; margin-top: .5em; font-family: var(--mono); font-size: calc(var(--pw) * .042); letter-spacing: .12em; color: var(--acc); }
.panel--glucose { --acc: var(--cyan); } .panel--duo { --acc: var(--amber); }
.panel--glucose .panel__media::after { background: linear-gradient(160deg, rgba(20, 90, 110, .7), rgba(6, 7, 12, .8)); }
.panel--duo .panel__media::after { background: linear-gradient(160deg, rgba(120, 70, 20, .7), rgba(6, 7, 12, .8)); }
.panel__detail { display: none; }

.panel--ui h3 { align-self: end; }
.ui { display: grid; align-content: space-between; padding: 34px 16px 12px; text-align: left; background: linear-gradient(180deg, #0d1020, #07080d); }
.ui::after { background: linear-gradient(180deg, rgba(6, 7, 12, .15), rgba(6, 7, 12, .7)) !important; }
.ui__read { display: flex; align-items: baseline; gap: 6px; }
.ui__read b { font-family: var(--display); font-weight: 300; font-size: calc(var(--pw) * .09); line-height: 1; }
.ui__read span { color: var(--mute); font-size: 10px; }
.ui__read em { margin-left: auto; font-style: normal; font-size: 9px; padding: 3px 8px; border-radius: 999px; background: rgba(88, 227, 154, .16); color: #7df0b4; white-space: nowrap; }
.ui svg { width: 100%; height: 44%; display: block; }
.ui__meals { display: flex; gap: 6px; font-size: 7.5px; letter-spacing: .08em; overflow: hidden; }
.ui__meals span { padding: 4px 7px; border-radius: 999px; background: rgba(255, 255, 255, .07); white-space: nowrap; }
.ui__meals b { color: var(--amber); font-weight: 500; }
.eco { background: radial-gradient(circle at 50% 50%, #2a1038, #07080d 70%); }
.eco::after { background: linear-gradient(180deg, rgba(6, 7, 12, .1), rgba(6, 7, 12, .65)) !important; }
.eco i { position: absolute; left: 50%; top: 50%; border: 1px solid rgba(255, 122, 217, .45); border-radius: 50%; transform: translate(-50%, -50%) rotate(-14deg); width: 38%; height: 40%; }
.eco i:nth-child(2) { width: 66%; height: 62%; border-color: rgba(110, 231, 255, .4); transform: translate(-50%, -50%) rotate(10deg); }
.eco i:nth-child(3) { width: 96%; height: 86%; border-color: rgba(154, 134, 255, .35); }
.eco span { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); font-size: 7.5px; padding: 3px 7px; border-radius: 999px; background: rgba(10, 12, 20, .8); border: 1px solid rgba(255, 255, 255, .2); white-space: nowrap; }

.detail {
  position: absolute; right: var(--pad); bottom: 8vh; z-index: 6; width: min(340px, 27vw); padding: 22px 22px 24px; border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02)), rgba(6, 7, 12, .55);
  border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: opacity .35s ease, transform .5s var(--ease);
}
.detail.is-swap { opacity: 0; transform: translateY(10px); }
.detail__count { color: var(--cyan); margin-bottom: 10px; }
.detail h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 1.05rem; letter-spacing: .02em; line-height: 1.2; margin-bottom: 12px; }
.detail__body { font-size: 12px; line-height: 1.75; color: rgba(238, 240, 246, .82); display: grid; gap: 12px; }
.detail__body .price { font-family: var(--display); font-weight: 200; font-size: 2.6rem; line-height: 1; letter-spacing: -.03em; color: #fff; }
.detail__body .price sup { font-size: .4em; vertical-align: top; position: relative; top: .3em; margin-right: .1em; color: var(--cyan); }
.detail__body ul { display: grid; border-top: 1px solid var(--line); }
.detail__body li { padding: 7px 0 7px 16px; border-bottom: 1px solid var(--line); position: relative; }
.detail__body li::before { content: ''; position: absolute; left: 2px; top: 1.25em; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); }
.detail__body .note { color: var(--faint); font-size: 9.5px; }

/* Buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; justify-self: start;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .5); cursor: pointer; overflow: hidden; isolation: isolate;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; transition: color .4s, border-color .4s;
}
.btn span { position: relative; z-index: 1; }
.btn::before { content: ''; position: absolute; inset: 0; z-index: 0; border-radius: inherit; background: #fff; transform: translateY(101%); transition: transform .55s var(--ease); }
.btn:hover { color: #0a0b12; }
.btn:hover::before { transform: none; }
.btn--solid { background: #fff; color: #0a0b12; border-color: #fff; min-height: 52px; }
.btn--solid::before { background: linear-gradient(100deg, var(--cyan), var(--violet)); }

/* Reserve */
.reserve__inner { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; padding: 90px var(--pad) 90px; text-align: center; }
.reserve__eyebrow { color: var(--cyan); margin-bottom: 22px; letter-spacing: .3em; }
.signup { margin-top: clamp(26px, 5vh, 52px); width: min(560px, 100%); }
.signup__pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.signup__pick label { cursor: pointer; }
.signup__pick input { position: absolute; opacity: 0; pointer-events: none; }
.signup__pick span { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--mute); transition: all .3s; background: rgba(6, 7, 11, .5); }
.signup__pick input:checked + span { border-color: var(--cyan); color: #fff; background: rgba(110, 231, 255, .1); }
.signup__pick input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 3px; }
.signup__row { display: flex; gap: 6px; padding: 6px; border-radius: 999px; border: 1px solid var(--line); background: rgba(10, 11, 18, .6); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); transition: border-color .3s; }
.signup__row:focus-within { border-color: rgba(255, 255, 255, .45); }
.signup input[type=email] { flex: 1; min-width: 0; background: none; border: 0; outline: 0; padding: 0 20px; font-size: 14px; }
.signup input::placeholder { color: var(--faint); }
.signup__msg { min-height: 1.6em; margin-top: 14px; color: var(--cyan); }
.signup__msg.is-error { color: #ff9a9a; }
.foot { position: absolute; left: var(--pad); right: var(--pad); bottom: 22px; display: flex; justify-content: space-between; gap: 20px; color: var(--faint); font-size: 10px; }
.foot a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  :root { --pw: min(74vw, 340px); }
  .logo { width: 108px; height: 36px; }
  .pill a { padding: 9px 12px; font-size: 11px; }
  .intro__foot span:last-child { display: none; }
  .statement__inner { align-content: end; gap: 22px; padding-bottom: 9vh; }
  .menu { top: 84px; left: 0; right: 0; transform: none; display: flex; justify-content: center; gap: 16px; }
  .menu p, .menu__cta { display: none; }
  .menu button::before { content: none; }
  .menu button:hover, .menu button.is-active { transform: none; }
  .carousel { perspective: 900px; perspective-origin: 50% 34%; }
  .ring { top: 34%; }
  .detail { left: var(--pad); right: var(--pad); bottom: 18px; width: auto; max-height: 47vh; overflow: auto; padding: 16px 18px 18px; }
  .detail__body .price { font-size: 2rem; }
  .signup__row { flex-direction: column; border-radius: 28px; padding: 8px; }
  .signup input[type=email] { min-height: 50px; text-align: center; }
  .foot__note { display: none; }
  .hud:nth-child(n+2) { display: none; }
  .rail { display: none; }
}
@media (max-height: 620px) { .detail { bottom: 14px; } .intro__hint { top: 12%; } }

@media (prefers-reduced-motion: reduce) {
  .grain, .intro__hint::after { animation: none; }
}
