@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
/* Apple Health, Time Perception: the card / hero animation (ah-anim.js). Built from the Figma components (FigBuild
   2026 file): the Time Perception ring, the Dynamic Island in its three sizes, and the lock screen widget.
   Everything sits on a 640×420 stage that ah-anim.js scales to fit the box and moves like a camera, centred at --cy.
   SF Pro on Apple devices, Inter everywhere else (closest free match). */
.aht { position: relative; overflow: hidden; background: #f4f4f9; --cy: 0.5;
  --sf: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", Inter, system-ui, sans-serif;
  --orange: linear-gradient(90deg, #ff717b 0%, #ff755b 25.96%, #ff9e58 44.71%, #ffbe5a 68.27%, #ffe46a 96.64%);
  --blue: linear-gradient(90deg, #5b8cff, #a066ff); }
.aht * { box-sizing: border-box; }
.aht-stage { position: absolute; left: 50%; top: calc(var(--cy) * 100%); width: 640px; height: 420px; margin: -210px 0 0 -320px;
  font-family: var(--sf); -webkit-font-smoothing: antialiased; }
.aht-grad { -webkit-background-clip: text; background-clip: text; color: transparent; }
.aht-glow, .aht-line, .aht-tick, .aht-sun, .aht-sunrise { display: block; background: center / 100% 100% no-repeat; }

/* backgrounds: soft Health colours (lockup), a warm dusk wallpaper (island), the blue lock screen (widget).
   Each is a few soft colour blobs that drift (ah-anim.js moves them). */
.aht-bg { position: absolute; inset: 0; opacity: 0; overflow: hidden; }
.aht-bg i { position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; margin: -35% 0 0 -35%; }
.aht-sky { background: #f4f4f9; opacity: 1; }
.aht-sky i:nth-child(1) { left: 18%; top: 25%; background: radial-gradient(closest-side, rgba(91, 140, 255, 0.42), transparent); }
.aht-sky i:nth-child(2) { left: 82%; top: 20%; background: radial-gradient(closest-side, rgba(160, 102, 255, 0.36), transparent); }
.aht-sky i:nth-child(3) { left: 75%; top: 92%; background: radial-gradient(closest-side, rgba(255, 92, 140, 0.3), transparent); }
.aht-sky i:nth-child(4) { left: 15%; top: 95%; background: radial-gradient(closest-side, rgba(110, 214, 255, 0.36), transparent); }
.aht-warm { background: linear-gradient(160deg, #e9eefb 0%, #f3eff6 50%, #fbeee6 100%); }
.aht-warm i:nth-child(1) { left: 10%; top: 30%; background: radial-gradient(closest-side, rgba(128, 164, 255, 0.6), transparent); }
.aht-warm i:nth-child(2) { left: 18%; top: 100%; background: radial-gradient(closest-side, rgba(150, 235, 232, 0.6), transparent); }
.aht-warm i:nth-child(3) { left: 90%; top: 35%; background: radial-gradient(closest-side, rgba(255, 113, 123, 0.45), transparent); }
.aht-warm i:nth-child(4) { left: 84%; top: 100%; background: radial-gradient(closest-side, rgba(255, 190, 90, 0.55), transparent); }
.aht-wall { background: linear-gradient(160deg, #6f93e6 0%, #5b78d4 55%, #7c72dc 100%); }
.aht-wall i:nth-child(1) { left: 15%; top: 95%; background: radial-gradient(closest-side, rgba(120, 205, 235, 0.9), transparent); }
.aht-wall i:nth-child(2) { left: 88%; top: 12%; background: radial-gradient(closest-side, rgba(176, 160, 255, 0.85), transparent); }
.aht-wall i:nth-child(3) { left: 60%; top: 60%; background: radial-gradient(closest-side, rgba(115, 216, 169, 0.3), transparent); }
.aht-wall i:nth-child(4) { left: 5%; top: 10%; background: radial-gradient(closest-side, rgba(91, 140, 255, 0.5), transparent); }

/* icons drawn by masks, so each can take the colour or gradient of its state */
.aht-ring, .aht-hare, .aht-dog, .aht-ico { position: absolute; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.aht-ring { --m: url(assets/apple-health-anim/ring-55.svg); }
.aht-hare { --m: url(assets/apple-health-anim/hare.png); aspect-ratio: 226 / 160; }
.aht-dog { --m: url(assets/apple-health-anim/dog.png); aspect-ratio: 208 / 170; background: #fff; }

/* 1 · the Time Perception lockup (ring + wordmark) */
.aht-lock { position: absolute; top: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; white-space: nowrap; }
.aht-eyebrow { display: flex; align-items: center; gap: 8px; font-size: 21px; font-weight: 600; letter-spacing: -0.3px; color: #111; }
/* the Health app icon: a pink heart on a white rounded square */
.aht-app { position: relative; width: 28px; height: 28px; flex: none; border-radius: 7px; background: #fff; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(20, 20, 60, 0.12); }
.aht-app::after { content: ""; position: absolute; left: 4px; top: 5px; width: 20px; height: 18px; background: linear-gradient(180deg, #ff6b8b, #ff2d55);
  -webkit-mask: url(assets/apple-health-anim/heart.png) center / contain no-repeat; mask: url(assets/apple-health-anim/heart.png) center / contain no-repeat; }
.aht-row { display: flex; align-items: center; gap: 14px; }
.aht-spacer { width: 60px; height: 60px; flex: none; }
.aht-word { font-size: 46px; font-weight: 600; letter-spacing: -0.9px; line-height: 1.15; background-image: var(--blue); padding-right: 2px; }
/* the ring that draws itself in the lockup, then flies into the island (positioned by ah-anim.js) */
.aht-fly { position: absolute; left: 0; top: 0; width: 60px; height: 60px; margin: -30px 0 0 -30px; }
.aht-fly .aht-ring { inset: 0; }
.aht-fly .aht-sweep { position: absolute; inset: 0; -webkit-mask: conic-gradient(#000 var(--a, 360deg), transparent 0); mask: conic-gradient(#000 var(--a, 360deg), transparent 0); }
.aht-fly .aht-b { background: var(--blue); }
.aht-fly .aht-o { background: var(--orange); opacity: 0; }

/* Health data chips that pop in around the island, then get pulled into it */
.aht-chip { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 8px; padding: 9px 14px 9px 11px; border-radius: 14px; white-space: nowrap;
  background: rgba(255, 255, 255, 0.96); color: #111; font-size: 14px; font-weight: 600; letter-spacing: -0.2px; opacity: 0;
  box-shadow: 0 10px 26px rgba(40, 40, 90, 0.18), 0 0 0 0.5px rgba(0, 0, 0, 0.06); }
.aht-chip .aht-ico { position: relative; width: 20px; height: 20px; flex: none; }
.aht-chip b { font-weight: 700; }
.aht-c1 .aht-ico { --m: url(assets/apple-health-anim/ecg.png); background: #ff2d55; }
.aht-c1 b { color: #ff2d55; }
.aht-c2 .aht-ico { --m: url(assets/apple-health-anim/eye.png); background: #32ade6; }
.aht-c2 b { color: #32ade6; }

/* 2 · the Dynamic Island: one black shape that springs between its sizes (and finally into the widget) */
.aht-island { position: absolute; left: 320px; top: 61px; width: 198px; height: 40px; transform: translateX(-50%); background: #000; border-radius: 21px; overflow: hidden; }
.aht-s { position: absolute; left: 50%; top: 0; transform: translateX(-50%); opacity: 0; }
.aht-compact { width: 198px; height: 40px; }
.aht-compact .aht-hare { left: 11px; top: 13px; width: 19px; background: var(--orange); }
.aht-compact .aht-ring { left: 169px; top: 12px; width: 16px; height: 16px; background: #fff; }
.aht-mid { width: 373px; height: 107px; display: flex; align-items: center; justify-content: center; gap: 24px; }
.aht-mid .aht-ring { position: relative; width: 55px; height: 55px; flex: none; background: var(--orange); }
.aht-mid p { margin: 0; width: 198px; font-size: 20px; font-weight: 600; line-height: 22px; background-image: var(--orange); }
.aht-exp { width: 373px; height: 298px; color: #fff; }
.aht-glow { position: absolute; left: -36px; top: 81px; width: 312px; height: 186px; }
.aht-line { position: absolute; left: -5px; top: 175px; width: 226px; height: 1px; transform: rotate(0.25deg); }
.aht-ticks { position: absolute; left: -5px; top: 171px; width: 226px; height: 9px; overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 25%, #000 85%, transparent); mask: linear-gradient(90deg, transparent, #000 25%, #000 85%, transparent); }
.aht-ticks i { position: absolute; top: 0; width: 1px; height: 9px; background: rgba(255, 255, 255, 0.55); }
.aht-tick { position: absolute; left: 186.5px; top: 166px; width: 1px; height: 20px; }
.aht-ihare { position: absolute; left: 50%; top: 141px; width: 28px; margin-left: -13px; background: #fff; opacity: 0; }
.aht-clock { position: absolute; left: 186.5px; top: 186px; transform: translateX(-50%); font-size: 24px; font-weight: 700; line-height: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.aht-copy { position: absolute; left: 50%; top: 46px; width: 284px; margin-left: -142px; text-align: center; }
.aht-h { margin: 0; font-size: 20px; font-weight: 600; line-height: 22px; background-image: var(--orange); }
.aht-sub { margin: 9px 0 0; font-size: 14px; line-height: 1.22; letter-spacing: -0.45px; }
.aht-btn { position: absolute; left: 41px; top: 231px; width: 292px; height: 40px; border-radius: 100px; background: #fff; color: #000;
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; letter-spacing: -0.45px; overflow: hidden; }
.aht-tap { position: absolute; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%; background: rgba(0, 0, 0, 0.09); opacity: 0; }

/* 4 · the lock screen widget, Condensed → Synchronized */
.aht-widget { position: absolute; left: 135px; top: 130px; width: 370px; height: 160px; border-radius: 25.6px; overflow: hidden; opacity: 0;
  background: rgba(255, 255, 255, 0.14); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 8.5px 42.65px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.12); color: #fff; }
.aht-widget svg { position: absolute; inset: 0; overflow: visible; }
.aht-sheen { position: absolute; top: -20%; bottom: -20%; width: 90px; left: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent); opacity: 0; }
.aht-greet { position: absolute; left: 15px; top: 12.8px; font-size: 15px; font-weight: 600; line-height: 18.1px; letter-spacing: -0.25px; }
.aht-sun { position: absolute; left: 333.7px; top: 11.7px; width: 22.3px; height: 22.3px; }
.aht-sunrise { position: absolute; left: 328.3px; top: 12.8px; width: 26.7px; height: 19.5px; opacity: 0; }
.aht-label { position: absolute; left: 185px; top: 139px; transform: translate(-50%, -50%); font-size: 15px; font-weight: 500; white-space: nowrap; }
.aht-runner { position: absolute; left: 0; top: 0; }
.aht-runner .aht-hare, .aht-runner .aht-dog { left: 0; top: 0; transform: translate(-50%, -50%); }
.aht-runner .aht-hare { width: 19px; background: #fff; }
.aht-runner .aht-dog { width: 19px; opacity: 0; }
