/* Life OS · the homepage, made to look like the app.
   22 Sept 2026: "update it, polish it, make it look like the iOS app. Full
   screenshots, animations, extremely cool animations."

   Everything here reads the design-system tokens, so it follows the site's
   light and dark themes. The phones stay dark in both, because the screens in
   them are the app's own dark screens. */

/* ---------- a phone, the way the app is framed ---------- */
.ph {
  position: relative; width: 300px; aspect-ratio: 1206 / 2622; border-radius: 48px; padding: 5px;
  background: linear-gradient(145deg, #8d929b 0%, #2b2f35 20%, #5d626a 46%, #1d2024 70%, #7c818a 100%);
  box-shadow: 0 50px 110px rgba(0, 0, 0, .45), 0 16px 34px rgba(0, 0, 0, .35);
}
.ph__bezel { position: absolute; inset: 5px; border-radius: 43px; padding: 8px; background: #030304; }
.ph__screen { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: #000; }
.ph__screen img, .ph__screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ph__screen::after { content: ""; position: absolute; inset: 0; border-radius: 36px; pointer-events: none;
  background: linear-gradient(118deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,0) 32%); }

/* ---------- hero ---------- */
.ah-hero { position: relative; padding: 72px 0 40px; overflow: hidden; }
.ah-hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.ah-hero h1 { font-size: clamp(42px, 6.4vw, 78px); line-height: .98; letter-spacing: -.035em; max-width: 13ch; }
.ah-hero .lede { margin-top: 22px; }
.ah-live { display: inline-flex; align-items: center; gap: 9px; margin-top: 18px; font-size: 14px; color: var(--text-2); min-height: 20px; }
.ah-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); animation: ah-pulse 2.4s ease-in-out infinite; }
@keyframes ah-pulse { 0%,100% { opacity: 1; transform: scale(1) } 50% { opacity: .35; transform: scale(.8) } }
.ah-stage { position: relative; display: grid; place-items: center; height: min(700px, calc(100vh - 110px)); min-height: 560px; perspective: 1800px; }
.ah-stage .ph { width: min(320px, calc((100vh - 170px) * 0.46)); transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.ah-halo { position: absolute; width: 560px; height: 560px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--halo, #669dde) 42%, transparent) 0%, transparent 66%);
  transition: background 1s ease; }
.ah-float { position: absolute; padding: 12px 16px; border-radius: 18px; font-size: 14px; font-weight: 600; color: var(--text);
  background: color-mix(in srgb, var(--card) 72%, transparent); border: 1px solid var(--hairline);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  display: flex; align-items: center; gap: 10px; white-space: nowrap; box-shadow: 0 18px 40px rgba(0,0,0,.18); }
.ah-float b { font-variant-numeric: tabular-nums; }
.ah-float .dot { width: 9px; height: 9px; border-radius: 50%; }
.ah-float--a { left: 0; top: 150px; animation: ah-bob 7s ease-in-out infinite; }
.ah-float--b { right: -6px; top: 330px; animation: ah-bob 8s ease-in-out -2s infinite; }
.ah-float--c { left: 14px; bottom: 120px; animation: ah-bob 9s ease-in-out -4s infinite; }
@keyframes ah-bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-12px) } }

/* ---------- the story: a phone that stays, a screen that changes ---------- */
.ah-story { position: relative; padding: 40px 0 60px; }
.ah-story__grid { display: grid; grid-template-columns: 1fr 380px; gap: 64px; }
.ah-step { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; max-width: 520px;
  opacity: .28; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.ah-step.is-on { opacity: 1; transform: none; }
.ah-step .tag { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--tint, var(--text-2)); }
.ah-step .tag i { width: 10px; height: 10px; border-radius: 50%; background: var(--tint, var(--text-2)); }
.ah-step h3 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.04; letter-spacing: -.03em; margin-top: 14px; }
.ah-step p { font-size: 19px; color: var(--text-2); margin-top: 16px; line-height: 1.5; }
.ah-step .inline { display: none; }
.ah-sticky { position: sticky; top: 90px; height: calc(100vh - 110px); display: grid; place-items: center; }
.ah-sticky .ph { width: min(340px, calc((100vh - 170px) * 0.46)); }
.ah-sticky .ph__screen img { opacity: 0; transform: scale(1.04); transition: opacity .55s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.ah-sticky .ph__screen img.is-on { opacity: 1; transform: none; }
.ah-sticky .ah-halo { width: 620px; height: 620px; }

/* ---------- rings that fill ---------- */
.ah-rings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 40px; }
.ah-ring { text-align: center; padding: 26px 16px 22px; border-radius: var(--r-surface); background: var(--card); border: 1px solid var(--hairline); }
.ah-ring svg { width: 150px; height: 150px; transform: rotate(-90deg); }
.ah-ring circle { fill: none; stroke-width: 14; stroke-linecap: round; }
.ah-ring .track { stroke: var(--track); }
.ah-ring .val { stroke-dasharray: 402; stroke-dashoffset: 402; transition: stroke-dashoffset 1.8s cubic-bezier(.2,.7,.2,1); }
.ah-ring .num { font-size: 34px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 10px; }
.ah-ring .lbl { font-size: 14px; color: var(--text-2); font-weight: 600; margin-top: 2px; }

/* ---------- the wall of screens ---------- */
.ah-wall { overflow: hidden; padding: 30px 0 50px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ah-wall__track { display: flex; gap: 28px; width: max-content; animation: ah-marquee 60s linear infinite; }
.ah-wall:hover .ah-wall__track { animation-play-state: paused; }
.ah-wall .ph { width: 220px; border-radius: 36px; padding: 4px; box-shadow: 0 30px 60px rgba(0,0,0,.35); flex: none; }
.ah-wall .ph__bezel { inset: 4px; border-radius: 32px; padding: 6px; }
.ah-wall .ph__screen, .ah-wall .ph__screen::after { border-radius: 27px; }
.ah-wall .ph:nth-child(even) { transform: translateY(34px); }
@keyframes ah-marquee { from { transform: translateX(0) } to { transform: translateX(-50%) } }

/* ---------- numbers ---------- */
.ah-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 36px; }
.ah-stat { border-top: 1px solid var(--hairline); padding-top: 16px; }
.ah-stat .n { font-size: clamp(34px, 4.4vw, 54px); font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1; }
.ah-stat .k { font-size: 14px; color: var(--text-2); margin-top: 8px; }

/* ---------- the close ---------- */
.ah-close { text-align: center; padding: 110px 0 120px; position: relative; overflow: hidden; }
.ah-close h2 { font-size: clamp(38px, 5.6vw, 68px); letter-spacing: -.035em; line-height: 1; }
.ah-close .btn-row { justify-content: center; }

/* ---------- small screens: the story stops being sticky ---------- */
@media (max-width: 920px) {
  .ah-hero__grid { grid-template-columns: 1fr; }
  .ah-stage { height: 620px; }
  .ah-story__grid { grid-template-columns: 1fr; }
  .ah-sticky { display: none; }
  .ah-step { min-height: 0; opacity: 1; transform: none; padding: 34px 0; }
  .ah-step .inline { display: block; margin-top: 26px; }
  .ah-step .inline .ph { width: 250px; margin: 0 auto; }
  .ah-rings, .ah-stats { grid-template-columns: repeat(2, 1fr); }
  .ah-float--b { right: 0; }
}
@media (max-width: 520px) {
  .ah-stage .ph { width: 260px; }
  .ah-stage { height: 560px; }
  .ah-float { font-size: 12px; padding: 9px 12px; }
  .ah-ring svg { width: 120px; height: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  .ah-wall__track, .ah-float, .ah-live i { animation: none; }
  .ah-step, .ah-sticky .ph__screen img, .ah-ring .val { transition: none; }
}
