/* Alexi × Xloop: the page around the bento boards (fonts, hero, chapter bar, sections, live 3D, motion). */
@font-face { font-family: 'Alexi Sans'; src: url(fonts/AlexiSans-Light.woff2) format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Alexi Sans'; src: url(fonts/AlexiSans-Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(fonts/Inter-Regular.woff2) format('woff2'); font-weight: 300 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(fonts/Inter-Medium.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(fonts/Inter-SemiBold.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Sora'; src: url(fonts/Sora-Light.woff2) format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Sora'; src: url(fonts/Sora-Regular.woff2) format('woff2'); font-weight: 400 600; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #060607; --fg: #f5f5f7; --mut: #9a9ea7; --mut2: #6c7078; --line: rgba(255, 255, 255, .08);
  --sans: 'Inter', -apple-system, 'SF Pro Text', system-ui, sans-serif; --disp: 'Alexi Sans', 'Sora', 'Inter', sans-serif; --num: 'Sora', 'Inter', sans-serif;
  --gap: 16px; --max: 1392px; --side: max(16px, env(safe-area-inset-left, 0px)); --sider: max(16px, env(safe-area-inset-right, 0px));
  --ease: cubic-bezier(.2, .75, .2, 1); --expo: cubic-bezier(.16, 1, .3, 1);
  --a: 222, 226, 234; --b: 128, 133, 146;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
img { max-width: 100%; }
a { color: inherit; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: #fff; color: #000; font-weight: 500; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid rgba(255, 255, 255, .7); outline-offset: 3px; }

/* section colours (same ramps as the boards) */
[data-acc="silver"] { --a: 222, 226, 234; --b: 128, 133, 146; }
[data-acc="sleep"] { --a: 169, 150, 255; --b: 106, 79, 232; }
[data-acc="heart"] { --a: 255, 111, 102; --b: 227, 52, 44; }
[data-acc="hrv"] { --a: 240, 139, 211; --b: 184, 66, 154; }
[data-acc="spo2"] { --a: 124, 203, 255; --b: 43, 143, 219; }
[data-acc="temp"] { --a: 255, 159, 107; --b: 221, 94, 38; }
[data-acc="act"] { --a: 138, 203, 255; --b: 47, 125, 228; }

/* the light behind the page takes the colour of the section on screen */
.journey { position: fixed; inset: -10vh -10vw; z-index: -1; pointer-events: none; --ja: 222, 226, 234;
  background: radial-gradient(60% 45% at 50% 0%, rgba(var(--ja), .10), transparent 70%), radial-gradient(50% 40% at 50% 100%, rgba(var(--ja), .06), transparent 70%);
  transition: --ja 1.2s ease; }
@property --ja { syntax: '*'; inherits: true; initial-value: 222, 226, 234; }

/* ------------------------------------------------------------ hero */
.pg-hero { position: relative; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; gap: clamp(8px, 2vh, 24px); padding: clamp(64px, 11vh, 120px) var(--sider) 28px var(--side); max-width: var(--max); margin: 0 auto; }
.pg-hero-copy { text-align: center; display: grid; justify-items: center; gap: clamp(12px, 2vh, 20px); }
.pg-eyebrow { margin: 0; display: inline-flex; align-items: center; gap: 10px; font: 400 clamp(15px, 1.4vw, 18px)/1 var(--disp); letter-spacing: .04em; color: rgba(255, 255, 255, .86); }
.pg-eyebrow i { font-style: normal; color: var(--mut); }
.hm { width: 26px; height: 22px; display: block; }
.pg-h { margin: 0; font: 300 clamp(44px, 8.2vw, 116px)/1.0 var(--disp); letter-spacing: -.03em; text-wrap: balance; }
.pg-h .w { display: inline-block; background: linear-gradient(180deg, #fff 0%, #e9eaee 45%, #9da1aa 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.pg-h .pg-gt { background: linear-gradient(135deg, #fff 0%, #e4e6eb 40%, #8f939c 100%); -webkit-background-clip: text; background-clip: text; }
.pg-sub { margin: 0; max-width: 34ch; font: 400 clamp(16px, 1.5vw, 20px)/1.45 var(--sans); color: rgba(235, 235, 245, .66); text-wrap: balance; }
.pg-stage { position: relative; height: auto !important; min-height: clamp(380px, 52vh, 640px); border-radius: clamp(22px, 2.4vw, 32px); overflow: hidden; isolation: isolate; }
.pg-cue { justify-self: center; width: 28px; height: 44px; border-radius: 14px; border: 1.5px solid rgba(255, 255, 255, .35); display: grid; justify-items: center; padding-top: 8px; }
.pg-cue span { width: 3px; height: 8px; border-radius: 2px; background: #fff; animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* the hero's words rise in, one after another */
.js .pg-h .w, .js .pg-eyebrow, .js .pg-sub { opacity: 0; translate: 0 .35em; filter: blur(10px); transition: opacity 1s var(--ease), translate 1.2s var(--expo), filter 1s var(--ease); }
.js .pg-h .w:nth-child(1) { transition-delay: .15s; } .js .pg-h .w:nth-child(2) { transition-delay: .27s; } .js .pg-h .w:nth-child(4) { transition-delay: .42s; } .js .pg-h .w:nth-child(5) { transition-delay: .54s; }
.js .pg-sub { transition-delay: .72s; }
.js .pg-stage { opacity: 0; translate: 0 40px; transition: opacity 1.2s var(--ease) .5s, translate 1.4s var(--expo) .5s; }
.js.ready .pg-h .w, .js.ready .pg-eyebrow, .js.ready .pg-sub { opacity: 1; translate: none; filter: none; }
.js.ready .pg-stage { opacity: 1; translate: none; }

/* ------------------------------------------------------------ chapter bar */
.chapters { position: sticky; top: 0; z-index: 50; padding: max(10px, env(safe-area-inset-top, 0px)) var(--sider) 10px var(--side);
  background: linear-gradient(180deg, rgba(6, 6, 7, .92), rgba(6, 6, 7, .72)); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid var(--line); }
.ch-in { max-width: var(--max); margin: 0 auto; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-mask: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent); mask: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent); padding: 0 12px; }
.ch-in::-webkit-scrollbar { display: none; }
.ch-in a { flex: none; scroll-snap-align: center; text-decoration: none; white-space: nowrap; padding: 9px 15px; border-radius: 999px; font: 500 14px/1 var(--sans); color: rgba(235, 235, 245, .62); transition: color .3s, background .3s, box-shadow .3s; }
.ch-in a:hover { color: #fff; }
.ch-in a[aria-current="true"] { color: #fff; background: rgba(var(--a), .16); box-shadow: inset 0 0 0 1px rgba(var(--a), .45), 0 0 18px -4px rgba(var(--a), .6); }

/* ------------------------------------------------------------ sections */
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--sider) 0 var(--side); }
.pg-sec { padding-top: clamp(56px, 9vw, 120px); scroll-margin-top: 56px; }
.pg-sec-head { display: flex; align-items: baseline; gap: 14px; margin: 0 0 clamp(14px, 1.6vw, 22px) 4px; }
.pg-sec-n { font: 400 14px/1 var(--num); letter-spacing: .08em; color: rgb(var(--a)); }
.pg-sec-t { margin: 0; font: 400 clamp(15px, 1.3vw, 17px)/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: rgba(235, 235, 245, .72); }
.pg-sec-head::after { content: ''; flex: 1; height: 1px; align-self: center; background: linear-gradient(90deg, rgba(var(--a), .4), transparent); }

/* ------------------------------------------------------------ the boards: whole board (wide) or tile by tile (phones) */
.bx { position: relative; contain: layout style; }
.bx img { max-width: none; }
.bx .board { margin: 0 auto; zoom: var(--s, 1); border-radius: 36px; }
.bx.compact .board { width: auto; height: auto; overflow: visible; background: none; zoom: 1; border-radius: 0; }
.bx.compact .board::before { display: none; }
.bx.compact .grid { position: static; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.bx.compact .cw { display: contents; }
.bx.compact .t { flex: none; width: var(--cw, var(--tw)); height: var(--ch, var(--th)); zoom: var(--z, 1); order: var(--o); grid-column: auto; grid-row: auto; }
/* tablets: two balanced columns (positions from site.js) */
.bx.compact.cols2 .grid { display: block; position: relative; inset: auto; }
.bx.compact.cols2 .t { position: absolute; left: var(--x, 0); top: var(--y, 0); margin: 0; }

/* motion: tiles rise in, their words follow, numbers count, lines draw */
.js .bx .t { opacity: 0; translate: 0 36px; scale: .985; transition: opacity .9s var(--ease) calc(var(--k, 0) * 85ms), translate 1.2s var(--expo) calc(var(--k, 0) * 85ms), scale 1.2s var(--expo) calc(var(--k, 0) * 85ms); }
.js .bx .t.in { opacity: 1; translate: none; scale: none; }
.js .bx .ta { clip-path: inset(0 0 100% 0); translate: 0 .45em; transition: clip-path 1s var(--expo), translate 1.1s var(--expo); transition-delay: calc(var(--k, 0) * 85ms + 160ms + var(--e, 0) * 75ms); }
.js .bx .t.in .ta { clip-path: inset(-50% -30% -50% -30%); translate: none; }
.js .bx .t [data-draw] { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s cubic-bezier(.45, 0, .2, 1); transition-delay: calc(var(--k, 0) * 85ms + 300ms); }
.js .bx .t.in [data-draw] { stroke-dashoffset: 0; }
.js .bx .t [data-a="grow-x"] { scale: 0 1; transform-origin: left center; transition: scale 1.3s var(--expo); transition-delay: calc(var(--k, 0) * 85ms + 260ms + var(--e, 0) * 60ms); }
.js .bx .t [data-a="grow-y"] { scale: 1 0; transform-origin: center bottom; transition: scale 1.3s var(--expo); transition-delay: calc(var(--k, 0) * 85ms + 260ms + var(--e, 0) * 60ms); }
.js .bx .t [data-a="pop"] { scale: .6; opacity: 0; transition: scale 1s var(--expo), opacity .6s ease; transition-delay: calc(var(--k, 0) * 85ms + 300ms + var(--e, 0) * 60ms); }
.js .bx .t [data-a="fade"] { opacity: 0; transition: opacity 1.2s ease; transition-delay: calc(var(--k, 0) * 85ms + 300ms + var(--e, 0) * 60ms); }
.js .bx .t.in [data-a] { scale: none; opacity: 1; }
.js .bx .t.in [data-a="fade"] { opacity: var(--op, 1); }
.bx .cnt.counting { font-variant-numeric: tabular-nums; }
.bx .t img.phone { translate: 0 var(--py, 0px); }

/* the boards' live 3D (phones and rings in their stills' boxes) */
.bx .phone-view::before { display: none; }
.bx .phone-view { touch-action: pan-y; }
.bx .phone-view.reflect { -webkit-box-reflect: below 0 linear-gradient(transparent 38%, rgba(255, 255, 255, .3)); }
.bx .live3d[data-par] { translate: 0 var(--py, 0px); }

/* the hero's ring stage tile */
.pg-g { position: relative; border-radius: 30px; overflow: hidden; isolation: isolate; }
.pg-g::after { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px; pointer-events: none; z-index: 6;
  background: linear-gradient(155deg, rgba(255, 255, 255, .34) 0%, rgba(255, 255, 255, .08) 30%, rgba(255, 255, 255, .03) 60%, rgba(255, 255, 255, .16) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }

/* ------------------------------------------------------------ footer */
.pg-foot { max-width: var(--max); margin: clamp(80px, 12vw, 160px) auto 0; padding: 48px var(--sider) max(48px, env(safe-area-inset-bottom, 0px)) var(--side); border-top: 1px solid var(--line); display: grid; justify-items: center; text-align: center; gap: 12px; }
.pg-foot .hm { width: 34px; height: 29px; }
.pg-foot-h { margin: 6px 0 0; font: 300 clamp(26px, 3vw, 40px)/1.1 var(--disp); background: linear-gradient(180deg, #fff, #9da1aa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pg-foot-s { margin: 0; font-size: 14px; color: rgba(235, 235, 245, .62); }
.pg-foot-f { margin: 8px 0 0; font-size: 13px; color: rgba(235, 235, 245, .42); max-width: 60ch; }

/* ------------------------------------------------------------ narrow screens */
@media (max-width: 640px) {
  .pg-hero { padding-top: 72px; }
  .pg-stage { min-height: 420px; }
  .pg-sec { scroll-margin-top: 52px; }
}

/* ------------------------------------------------------------ reduced motion: everything in place, nothing moves */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .bx .t, .js .bx .ta, .js .pg-h .w, .js .pg-eyebrow, .js .pg-sub, .js .pg-stage { opacity: 1 !important; translate: none !important; scale: none !important; clip-path: none !important; filter: none !important; transition: none !important; }
  .js .bx .t [data-draw] { stroke-dashoffset: 0 !important; transition: none !important; }
  .js .bx .t [data-a] { scale: none !important; opacity: var(--op, 1) !important; transition: none !important; }
  .pg-cue span { animation: none; }
}
