/* Homepage, built from the Figma draft. Loads after styles.css. */

body.home {
  --bg: #0b0b0b;            /* same as the waitlist site */
  --line: #222227;
  --card: #121214;
  --card-hi: #17171a;
  --muted: #9d9da5;
  --faint: #66666d;
  background: var(--bg);
}
html:has(body.home) { background: #0b0b0b; }

/* ── Floating pill nav (15% larger than the draft) ───────────────────── */
.pillnav-wrap {
  position: sticky;
  top: 24px;                                      /* = margin-top: the pill never moves with the scroll… */
  z-index: 50;
  margin-top: 24px;
  padding: 0 16px;
}
.pillnav {
  max-width: 736px;
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 12px 0 16px;
  border-radius: 14px;
  background: #18181b;
  border: 1px solid #232328;
  transition: background-color .2s ease, box-shadow .2s ease, transform .4s cubic-bezier(.2, .8, .2, 1);
}
.pillnav-wrap.is-scrolled .pillnav {
  transform: translateY(-8px);                    /* …it glides 8px up once you scroll, and back at the top */
  background: rgba(24, 24, 27, .88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.pillnav .brand { gap: 10px; font-size: 18px; font-weight: 500; letter-spacing: -.2px; }
.pillnav .brand img { width: 32px; height: 32px; border-radius: 8px; }
.pillnav-links { display: flex; gap: 2px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.pillnav-links a {
  display: block;
  padding: 7px 12px;
  border-radius: 8px;
  color: #c4c4c9;
  font-size: 16.5px;
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease;
}
.pillnav-links a:hover, .pillnav-links a.is-current { color: #fff; }
/* no purple focus ring on the floating bar's buttons (tapping a tab focuses it); keyboard focus still turns the text white */
.pillnav a:not(.pill-btn):focus-visible, .pillnav button:focus-visible { outline: none; color: #fff; }
.pillnav .pill-btn:focus-visible { outline: none; background: #e9e9ec; }
.pill-btn {
  min-width: 94px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .15s ease;
}
.pill-btn:hover { background: #e9e9ec; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.h-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 15.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.h-btn:hover { background: #e9e9ec; }
.h-btn:active { transform: translateY(1px); }
.h-btn.ghost { background: transparent; border-color: #38383d; color: #e6e6e9; }
.h-btn.ghost:hover { border-color: #55555c; color: #fff; }
.h-btn.disabled { opacity: .45; pointer-events: none; }
.h-btn .win-logo { grid-template-columns: repeat(2, 6px); grid-template-rows: repeat(2, 6px); }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.h-hero { padding: 96px 16px 0; text-align: center; }
.h-hero h1 { margin: 0; font-weight: 450; letter-spacing: -.035em; line-height: 1.08; }
.h-name, .h-line { display: block; font-size: clamp(44px, 6.4vw, 78px); }
.h-name { margin-bottom: .14em; }
.h-line { max-width: 10.5em; margin: 0 auto; text-wrap: balance; }
.h-sub {
  max-width: 480px;
  margin: 26px auto 0;
  color: var(--muted);
  font-size: 17.5px;
  line-height: 1.55;
  text-wrap: pretty;
}
.h-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.h-meta { margin: 16px 0 0; color: var(--faint); font-size: 13.5px; }

@media (prefers-reduced-motion: no-preference) {
  .h-hero > *, .h-showcase { animation: rise .8s var(--ease) both; }
  .h-hero h1 { animation-delay: .05s; }
  .h-hero .h-sub { animation-delay: .15s; }
  .h-hero .h-ctas { animation-delay: .22s; }
  .h-hero .h-meta { animation-delay: .28s; }
  .h-showcase { animation-delay: .4s; animation-duration: 1s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* product showcase right under the hero */
.h-showcase { padding: 64px 0 0; }
.home .stage {
  background-color: #101012;
  border-color: var(--line);
  background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px);
}
.home .steps, .home .steps li + li { border-color: var(--line); }

/* ── Section scaffolding ──────────────────────────────────────────────── */
.h-section { padding: 130px 0 0; }
.h-head { max-width: 640px; margin-bottom: 40px; }
.h-section h2, .h-final h2, .h-faq h2 {
  margin: 0;
  font-size: clamp(32px, 3.8vw, 46px);
  font-weight: 450;
  letter-spacing: -.03em;
  line-height: 1.08;
}
.h-lead { margin: 14px 0 0; color: var(--muted); font-size: 17px; line-height: 1.55; }

/* ── Works-anywhere row (heading) ────────────────────────────────────── */
.h-apps { text-align: center; }
.h-apps p { margin: 0 0 24px; color: var(--faint); font-size: 14px; }

/* ── Bento grid ───────────────────────────────────────────────────────── */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(220px, auto);
  gap: 14px;
}
.ac {
  display: flex;
  flex-direction: column;
  padding: 20px 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  transition: border-color .2s ease, background-color .2s ease, transform .25s var(--ease), opacity .7s var(--ease);
  transition-delay: 0s, 0s, 0s, calc(var(--i, 0) * 60ms);
}
.ac:hover { border-color: #3a3a40; background: var(--card-hi); }
.ac-name { margin: 0 0 14px; color: #f2f2f3; font-size: 15px; font-weight: 500; }
.ac-before {
  margin: 0;
  color: #74747b;
  font-size: 14.5px;
  line-height: 1.5;
  text-decoration: line-through;
  text-decoration-color: rgba(116, 116, 123, .5);
}
.ac-after { margin: auto 0 0; padding-top: 14px; color: #e9e9ec; font-size: 15px; line-height: 1.5; }
.ac-after::before {
  content: "";
  display: block;
  width: 18px; height: 1.5px;
  margin-bottom: 12px;
  background: var(--cyan);
  transition: width .35s var(--ease);
}
.ac:hover .ac-after::before { width: 40px; }

.ac-hero { grid-column: span 2; grid-row: span 2; position: relative; overflow: hidden; padding: 26px 28px; }
.ac-hero .ac-name { font-size: 22px; letter-spacing: -.3px; margin-bottom: 8px; }
.ac-hero-sub { margin: 0; max-width: 360px; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.ac-wide { grid-column: span 2; }
.ac-own { border-style: dashed; border-color: #38383e; background: transparent; }
.ac-own .ac-before { text-decoration: none; font-style: italic; }
.ac-own .ac-name span { color: var(--cyan); margin-right: 2px; }


/* "words fix themselves" demo, inside the big bento card:
   Ctrl+C → the wrong words morph into the right ones, one by one → Ctrl+V */
.fx {
  flex: 1;
  width: 100%;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding-top: 26px;
}
.fx-keys { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 13.5px; opacity: .55; transition: opacity .3s ease; }
.fx-keys.on { opacity: 1; }
.fx-keys span { margin-left: 8px; }
/* Keyboard keys across the site (not the top demo, which has its own):
   low-profile keys, flat top, a darker edge at the bottom that sinks when pressed */
.fx-keys kbd, .combo kbd {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  box-sizing: border-box;
  border: 1px solid #2e2e33;
  border-radius: 8px;
  background: #1d1d20;
  box-shadow: inset 0 -3px 0 #121214;
  color: #b4b4bb;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  transition: transform .09s ease, box-shadow .09s ease, color .15s ease, border-color .15s ease, background-color .15s ease;
}
/* bigger keys in the cards ("Opens the way you like", download steps) */
.combo kbd { min-width: 46px; height: 42px; padding: 0 14px; border-radius: 10px; box-shadow: inset 0 -4px 0 #121214; color: #c9c9cf; font-size: 15px; }
.fx-keys kbd.is-down, .combo kbd.is-down {
  transform: translateY(2px);
  border-width: 1px;
  border-color: #45454c;
  background: #232327;
  box-shadow: inset 0 -1px 0 #121214;
  color: #fff;
}
.fx-note {
  position: relative;
  width: min(440px, 100%);
  padding: 18px 22px 20px;
  border: 1px solid #303035;
  border-radius: 14px;
  background: #1c1c1f;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  transition: border-color .35s ease;
}
.fx-note.copied { border-color: var(--cyan); }
.fx-label {
  margin: 0 0 10px;
  color: var(--faint); font-size: 12.5px;
  opacity: 0; transition: opacity .3s ease;
}
.fx-note.working .fx-label { opacity: 1; }
.fx-text { margin: 0; min-height: 4.35em; color: #c9c9cf; font-size: 17px; line-height: 1.45; letter-spacing: -.15px; }
.fx-sel { border-radius: 3px; transition: background-color .25s ease; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.fx-note.selected .fx-sel { background: rgba(94, 92, 230, .38); }
.fx-w { display: inline-block; margin: 0 -2px; padding: 0 2px; border-radius: 4px; }
.fx-w.plain { color: #a9a9b1; }
.fx-w.bad { color: #a9a9b1; text-decoration: underline wavy rgba(229, 72, 77, .75); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.fx-w.good { color: #fff; }
@media (max-width: 760px) { .fx-text { font-size: 16px; min-height: 5.8em; } .fx { min-height: 280px; } }   /* 4 lines: the longest example fits without the box jumping */

/* ── Action cards: all the same size, 4 per row. Before (crossed out) and after for each action. ── */
.acards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.acard {
  display: flex;
  flex-direction: column;
  padding: 20px 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  transition: border-color .2s ease, background-color .2s ease;
}
.acard:hover { border-color: #3a3a40; background: var(--card-hi); }
.acard .ac-name { margin: 0 0 14px; }
.acard .ac-before { margin: 0; }
.acard .ac-after { margin: auto 0 0; padding-top: 14px; }
.acard-own { border-style: dashed; border-color: #38383e; background: transparent; }
.acard-own .ac-before { text-decoration: none; font-style: italic; }
.acard:hover .ac-after::before { width: 40px; }
.acard:hover .ac-ico { transform: rotate(-6deg) scale(1.06); }
@media (max-width: 1080px) { .acards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {   /* phones: one row you swipe through, a card and a bit of the next one in view */
  .acards {
    display: flex;
    gap: 12px;
    margin: 0 calc(var(--gutter) * -1);
    padding: 2px var(--gutter) 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .acards::-webkit-scrollbar { display: none; }
  .acard { flex: none; width: 78%; padding: 18px 18px 20px; scroll-snap-align: start; }
}

/* "Opens the way you like": fake text = rows of rounded word boxes, different in every card (home.js) */
.home .mini-lines .mini-line { display: flex; gap: 4px; width: auto; height: 7px; background: none; }
.mini-w { flex: none; height: 7px; border-radius: 4px; background: #2a2a30; }
.home .mini-lines .mini-line.sel .mini-w { background: rgba(94, 92, 230, .55); }

/* ── Big numbers band ─────────────────────────────────────────────────── */
.h-stats { margin-top: 130px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.h-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.h-stats-grid div { padding: 44px 24px 46px; }
.h-stats-grid div + div { border-left: 1px solid var(--line); }
.h-stats-grid b { display: block; font-size: clamp(48px, 5.4vw, 72px); font-weight: 450; line-height: 1; letter-spacing: -.04em; }
.h-stats-grid span { display: block; margin-top: 12px; color: var(--muted); font-size: 15px; }

/* ── "Opens the way you like" cards (markup shared with the old page) ── */
.home .way { border-color: var(--line); border-radius: 16px; background: var(--card); }
.home .way-visual { height: 230px; border-color: var(--line); }
.home .mini-screen { background: #18181b; border-color: #2c2c32; }
.home .mini-line { background: #2a2a30; }

/* ── Pricing cards ────────────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.plan {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}
.plan-main { border-color: #3a3a40; background: var(--card-hi); }
.plan-top { display: flex; align-items: center; justify-content: space-between; }
.plan-name { margin: 0; font-size: 18px; font-weight: 500; }
.plan-tag { color: var(--faint); font-size: 13.5px; }
.plan-tag.muted { color: var(--faint); }
.plan-tag.muted::before { background: #4a4a50; }
.plan-price { margin: 22px 0 0; font-size: 46px; font-weight: 450; letter-spacing: -.03em; line-height: 1; }
.plan-price small { color: var(--faint); font-size: 15px; letter-spacing: 0; }
.plan-price.muted { color: #7a7a81; font-size: 30px; padding: 8px 0 4px; }
.plan ul { margin: 26px 0 28px; padding: 0; list-style: none; }
.plan li {
  position: relative;
  padding: 9px 0 9px 26px;
  border-top: 1px solid var(--line);
  color: #d4d4d8;
  font-size: 15px;
}
.plan li::before {
  content: "";
  position: absolute;
  left: 2px; top: 15px;
  width: 9px; height: 5px;
  border-left: 1.6px solid var(--cyan);
  border-bottom: 1.6px solid var(--cyan);
  transform: rotate(-45deg);
}
.plan:not(.plan-main) li::before { border-color: #55555c; }
.plan .h-btn { margin-top: auto; align-self: flex-start; }

/* ── FAQ (two columns) ────────────────────────────────────────────────── */
.h-faq { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 64px; }
.home .faq { border-color: var(--line); }
.home .faq details { border-color: var(--line); }
.home .faq summary { font-size: 16.5px; font-weight: 500; }

/* ── Final call to action ─────────────────────────────────────────────── */
.h-final {
  margin-top: 140px;
  padding: 80px 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background-color: #1f1f21;
  background-image: radial-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 22px 22px;
  text-align: center;
}
.h-final > img { width: 64px; height: 64px; margin: 0 auto 26px; border-radius: 24%; }
.h-final .h-lead { max-width: 460px; margin: 14px auto 28px; }

/* ── Footer: identical to the waitlist site, plus a square hover box ─── */
.site-footer {
  margin-top: 110px;
  padding: 29px max(42px, calc((100vw - 1416px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #1c1c21;
  background: #111114;
}
.site-footer p { margin: 0; color: #bdbdc4; font-size: 17px; font-weight: 500; line-height: 22px; }
.foot-right { display: flex; align-items: center; gap: 22px; }
.foot-link { color: #8e8e96; font-size: 15.5px; font-weight: 500; text-decoration: none; transition: color .15s ease; }
.foot-link:hover, .foot-link:focus-visible, .foot-link[aria-current="page"] { color: #fff; }
@media (max-width: 760px) {   /* two rows on phones: © line, then Ideas (left) + socials (right) */
  .site-footer { flex-direction: column; align-items: stretch; gap: 14px; }
  .foot-right { justify-content: space-between; }
}
.social-links { display: flex; align-items: center; gap: 4px; margin-right: -8px; }
.social-links a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #bdbdc4;
  text-decoration: none;
  transition: color .16s ease, background-color .16s ease;
}
.social-links a:hover, .social-links a:focus-visible { color: #fff; background: #1f1f24; }
.social-links svg { width: 20px; height: 18px; fill: currentColor; }   /* inline icons (Font Awesome shapes), no icon font needed */

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .h-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .h-stats-grid div:nth-child(3) { border-left: 0; }
  .h-stats-grid div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .h-faq { grid-template-columns: 1fr; gap: 28px; }
  .site-footer { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 760px) {
  .pillnav { height: 58px; gap: 12px; }
  .pillnav-links { display: none; }
  .pillnav .pill-btn { margin-left: auto; }
  .h-hero { padding-top: 72px; }
  .h-ctas .h-btn { width: 100%; }
  .h-section { padding-top: 100px; }
  .bento { grid-template-columns: 1fr; }
  .ac-hero, .ac-wide { grid-column: auto; grid-row: auto; }
  .plans { grid-template-columns: 1fr; }
  .h-stats { margin-top: 100px; }
  .h-stats-grid div { padding: 28px 16px; }
  .h-final { margin-top: 100px; padding: 56px 20px; }
  .site-footer { margin-top: 80px; padding: 24px 20px; }
}

/* No scroll-in animations on these pages: everything is simply there. */
.home .reveal, .home .reveal.is-visible { opacity: 1; transform: none; }
.home .ac { transition: border-color .2s ease, background-color .2s ease; }
.home .faq details.is-closing summary::after { transform: translateY(-3px) rotate(45deg); }
.home .faq details p { margin: 0; padding: 0 0 24px; }

/* ── Color: solid Clype purple + colored icon tiles (no gradients, no glows) ── */
body.home { --brand: #4c1fbc; --brand-2: #5a2bd9; --brand-deep: #2a1470; }

.h-btn.brand { background: var(--brand-2); color: #fff; }
.h-btn.brand:hover { background: #6a3cf0; }

/* the demo sits on a purple "desktop" */
.home .stage {
  background-color: var(--brand-deep);
  border-color: #3a2290;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
}
.home .stage .keys { color: #b9a8f5; }
.home .stage kbd { background: #1b1050; border-color: #4a32a8; color: #fff; }

/* colored icon tiles on the action cards */
.ac-name { display: flex; align-items: center; gap: 10px; }
.ac-ico {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--c);
  transition: transform .25s var(--ease);
}
.ac-ico svg { width: 17px; height: 17px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ac:hover .ac-ico { transform: rotate(-6deg) scale(1.06); }
.ac-own .ac-name span.ac-ico { margin-right: 0; }

/* the numbers band in solid brand purple */
.h-stats { background: var(--brand); border-color: var(--brand); }
.h-stats-grid div + div, .h-stats-grid div:nth-child(n+3) { border-color: rgba(255, 255, 255, .16); }
.h-stats-grid b { color: #fff; }
.h-stats-grid span { color: rgba(255, 255, 255, .72); }

/* free plan gets the brand color */
.plan-main { border: 1.5px solid var(--brand-2); }

/* final panel: solid purple */
.h-final {
  background-color: var(--brand);
  border-color: var(--brand);
  background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px);
}
.h-final .h-lead { color: rgba(255, 255, 255, .78); }
.h-final .text-link { color: #fff; text-decoration-color: rgba(255, 255, 255, .5); }
.h-final > img { box-shadow: 0 0 0 4px rgba(255, 255, 255, .14); }



/* ── Steadier page loads: same width with or without a scrollbar ─────── */
html:has(body.home) { scrollbar-gutter: stable; }
.pillnav { width: 100%; box-sizing: border-box; }

/* ── Windows logo (SVG) in buttons ────────────────────────────────────── */
.win-svg { width: 15px; height: 15px; flex: none; fill: currentColor; }

/* ── Store button (replaces the official badge image) ─────────────────── */
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 22px 0 16px;
  border: 1px solid #3a3a40;
  border-radius: 10px;
  background: #0f0f10;
  color: #fff;
  text-align: left;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.store-btn:hover { background: #18181a; border-color: #55555c; }
.store-btn:active { transform: translateY(1px); }
.store-btn span { display: flex; flex-direction: column; font-size: 17px; font-weight: 500; line-height: 1.15; letter-spacing: -.1px; }
.store-btn small { color: #a9a9b1; font-size: 11.5px; font-weight: 400; letter-spacing: .1px; }
.store-svg { width: 28px; height: 28px; flex: none; }
.store-svg .bag { fill: none; stroke: #fff; stroke-width: 1.5; stroke-linejoin: round; }
.store-svg .handle { fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; }
.store-btn.light { background: #fff; border-color: #fff; color: #111; }
.store-btn.light:hover { background: #ececef; }
.store-btn.light small { color: #55555c; }
.store-btn.light .bag { stroke: #111; }
.store-btn.light .handle { stroke: #111; }
.store-btn[aria-disabled="true"] { cursor: default; }

/* ── Dots that swell around the cursor (purple panels) ───────────────── */
.home .stage, .h-final { position: relative; isolation: isolate; }
.home .stage::before, .h-final::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .55) 2.2px, transparent 2.6px);
  background-size: 22px 22px;
  background-position: -11px -11px;
  -webkit-mask-image: radial-gradient(circle 150px at var(--mx, -999px) var(--my, -999px), #000 0%, rgba(0,0,0,.45) 45%, transparent 100%);
  mask-image: radial-gradient(circle 150px at var(--mx, -999px) var(--my, -999px), #000 0%, rgba(0,0,0,.45) 45%, transparent 100%);
  opacity: 0;
  transition: opacity .35s ease;
}
.home .stage.is-lit::before, .h-final.is-lit::before { opacity: 1; }
.home .stage { background-position: -11px -11px; background-size: 22px 22px; }
.h-final { background-position: -11px -11px; }

/* ── App rows: two lines of app tiles drifting in opposite directions ── */
.h-apps { padding: 90px 0 0; }
.h-apps p { margin-bottom: 28px; }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee + .marquee { margin-top: 14px; }
.marquee-track {
  display: flex;
  gap: 14px;
  width: max-content;
  margin: 0;
  padding: 2px 0;
  list-style: none;
  animation: marquee var(--dur, 70s) linear infinite;
}
.marquee-track.to-right { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(var(--shift, -50%)); } }

.marquee-track li {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 200px;
  padding: 12px 24px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  transition: border-color .2s ease, background-color .2s ease;
}
.marquee-track li:hover { border-color: #3a3a40; background: var(--card-hi); }
.app-ico {
  width: 48px; height: 48px; flex: none;
  display: grid; place-items: center;
  border: 1px solid #26262b;
  border-radius: 12px;
  background: #19191c;
}
.app-ico img { width: 28px; height: 28px; object-fit: contain; }
.app-txt { display: flex; flex-direction: column; text-align: left; }
.app-txt b { color: #f2f2f3; font-size: 16px; font-weight: 500; }
.app-txt small { margin-top: 2px; color: var(--faint); font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; padding: 0 16px; }
  .marquee-track li[aria-hidden="true"] { display: none; }
}
@media (max-width: 760px) {
  .marquee-track li { min-width: 0; padding: 10px 18px 10px 10px; }
  .app-ico { width: 40px; height: 40px; border-radius: 10px; }
  .app-ico img { width: 24px; height: 24px; }
}

/* ── Liquid highlight that flows between nav links ────────────────────── */
.pillnav-links { position: relative; }
.pillnav-links li { position: relative; z-index: 1; }
.nav-blob {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  z-index: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, .09);
  opacity: 0;
  pointer-events: none;
  transition:
    left .34s cubic-bezier(.5, 0, .2, 1),
    width .34s cubic-bezier(.5, 0, .2, 1),
    opacity .2s ease;
}
.nav-blob.no-anim { transition: opacity .2s ease; }

/* ── Phone menu: two thin lines; the pill grows down into the link list ── */
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .pillnav-wrap { height: 58px; }                 /* the open menu floats over the page */
  .pillnav { height: auto; min-height: 58px; flex-wrap: wrap; row-gap: 0; padding: 9px 6px 9px 14px; }
  .pillnav .pill-btn { order: 1; }
  .nav-toggle {
    order: 2;
    display: grid;
    place-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    margin-left: -4px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;                                  /* whole pixels so all three lines look the same */
    border-radius: 1px;
    background: #e4e4e7;
    transition: transform .3s cubic-bezier(.5, 0, .2, 1), opacity .2s ease;
  }
  .pillnav.is-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .pillnav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .pillnav.is-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .pillnav-links {
    order: 3;
    display: flex;
    flex-direction: column;
    flex-basis: 100%;
    gap: 2px;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height .34s cubic-bezier(.5, 0, .2, 1), padding .34s cubic-bezier(.5, 0, .2, 1), visibility 0s .34s;
  }
  .pillnav.is-open .pillnav-links {
    max-height: 240px;
    padding: 10px 8px 4px 0;
    visibility: visible;
    transition: max-height .34s cubic-bezier(.5, 0, .2, 1), padding .34s cubic-bezier(.5, 0, .2, 1), visibility 0s;
  }
  .pillnav-links a { padding: 11px 10px; font-size: 17px; }
  .pillnav-links a.is-current { background: rgba(255, 255, 255, .07); }
  .nav-blob { display: none; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .nav-toggle span, .pillnav-links, .pillnav.is-open .pillnav-links { transition: none; }
}

/* ── Footer credit ────────────────────────────────────────────────────── */
.foot-by { color: #6e6e76; font-weight: 400; }

/* ── 404 page ─────────────────────────────────────────────────────────── */
/* The whole page fits the screen: nav on top, footer always visible at the bottom, no scrolling. */
body.nf-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body.nf-page > main { flex: 1 0 auto; display: flex; }
body.nf-page .site-footer { margin-top: 0; }
.nf { flex: 1; padding: clamp(20px, 4vh, 48px) 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.nf h1 { margin: clamp(18px, 3.5vh, 34px) 0 0; font-size: clamp(80px, min(16vw, 19vh), 170px); font-weight: 450; line-height: .9; letter-spacing: -.05em; }
.nf .h-sub { margin-top: clamp(14px, 2.6vh, 26px); }
.nf .h-ctas { margin-top: clamp(18px, 3vh, 30px); }
/* the note: same look as the homepage "Messy in, clean out" demo, fixes itself once */
.nf-note { width: min(340px, 100%); padding: 14px 18px 16px; text-align: left; }
.nf-note .fx-text { min-height: 0; font-size: 16px; }
.nf-note .fx-label { margin-bottom: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .nf > * { animation: rise .8s var(--ease) both; }
  .nf h1 { animation-delay: .08s; }
  .nf .h-sub { animation-delay: .16s; }
  .nf .h-ctas { animation-delay: .24s; }
}

/* ── Numbers band: same dots + cursor effect as the other purple panels ── */
.h-stats {
  position: relative;
  isolation: isolate;
  background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -11px -11px;
}
.h-stats::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .55) 2.2px, transparent 2.6px);
  background-size: 22px 22px;
  background-position: -11px -11px;
  -webkit-mask-image: radial-gradient(circle 150px at var(--mx, -999px) var(--my, -999px), #000 0%, rgba(0,0,0,.45) 45%, transparent 100%);
  mask-image: radial-gradient(circle 150px at var(--mx, -999px) var(--my, -999px), #000 0%, rgba(0,0,0,.45) 45%, transparent 100%);
  opacity: 0;
  transition: opacity .35s ease;
}
.h-stats.is-lit::before { opacity: 1; }

/* ── "Works anywhere" heading, as big as the other section titles ─────── */
.h-apps .apps-title {
  margin: 0 auto;
  max-width: 16em;
  padding: 0 16px;
  font-size: clamp(32px, 3.8vw, 46px);
  font-weight: 450;
  letter-spacing: -.03em;
  line-height: 1.08;
  text-wrap: balance;
}
.h-apps .apps-sub { margin: 14px auto 40px; padding: 0 16px; max-width: 520px; color: var(--muted); font-size: 17px; line-height: 1.55; }
.h-apps { padding-top: 120px; }

/* ── Official Microsoft Store badge (white version) ───────────────────── */
.ms-badge {
  display: inline-block;
  line-height: 0;
  border-radius: 7px;
  transition: transform .18s var(--ease), box-shadow .18s ease;
}
.ms-badge img { display: block; width: auto; }
.ms-badge:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0, 0, 0, .35); }
.ms-badge:active { transform: none; box-shadow: none; }

/* ── Hero: faint dot grid where cyan dots light up and fade ───────────── */
.h-hero { position: relative; isolation: isolate; }
.hero-sky {
  position: absolute;
  left: 0;
  right: 0;
  top: -120px;              /* reaches up behind the floating nav */
  bottom: -40px;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.4px);
  background-size: 28px 28px;
  background-position: center top;
  /* clear behind the headline, strongest around it, fading out at the edges */
  -webkit-mask-image: radial-gradient(ellipse 66% 74% at 50% 46%, transparent 16%, #000 46%, transparent 98%);
  mask-image: radial-gradient(ellipse 66% 74% at 50% 46%, transparent 16%, #000 46%, transparent 98%);
}
.hero-sky canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.h-hero > .hero-sky { animation: none; }

/* ── Rotating word in the headline ────────────────────────────────────── */
.h-nowrap { white-space: nowrap; }
.rot {
  position: relative;
  display: inline-block;
  height: 1.12em;
  vertical-align: bottom;
  overflow: hidden;
  padding-bottom: .08em;           /* room for descenders like the g in "right" */
  margin-bottom: -.08em;
  transition: width .5s cubic-bezier(.2, .7, .2, 1);
}
.rot-word {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  transform: translateY(105%);
  opacity: 0;
  filter: blur(6px);
  transition: transform .55s cubic-bezier(.2, .7, .2, 1), opacity .45s ease, filter .45s ease;
}
.rot-word.is-in { transform: none; opacity: 1; filter: none; }
.rot-word.is-out { transform: translateY(-105%); opacity: 0; filter: blur(6px); }
.rot:not(.ready) .rot-word.is-in { position: static; }   /* before the script runs */
.h-hero h1 .h-line { max-width: none; }
@media (max-width: 520px) { .h-hero h1 .h-line { font-size: clamp(30px, 9.4vw, 44px); } }

/* ── Clearer hover states on every button (not the nav) ───────────────── */
.h-btn {
  transition: background-color .18s ease, border-color .18s ease, color .18s ease,
              transform .18s cubic-bezier(.2, .7, .2, 1), box-shadow .18s ease;
}
.h-btn:hover, .h-btn:focus-visible {
  background: #d6d6dc;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .4);
}
.h-btn.brand:hover, .h-btn.brand:focus-visible {
  background: #7a50ff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .18) inset;
}
.h-btn.ghost:hover, .h-btn.ghost:focus-visible {
  background: rgba(255, 255, 255, .08);
  border-color: #9a9aa3;
  color: #fff;
}
.h-btn:active { transform: translateY(0); box-shadow: none; }

/* white button on the purple panel: tint toward the panel color */
.h-final .h-btn:hover, .h-final .h-btn:focus-visible { background: #e6defe; color: #2a1470; }

/* Store badge */
.ms-badge:hover, .ms-badge:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .45), 0 0 0 2px rgba(255, 255, 255, .55);
}
.ms-badge:hover img { filter: brightness(.94); }

/* ── Privacy page (legal text on the new layout) ──────────────────────── */
.home .legal { max-width: 760px; margin: 0 auto; padding: 96px 0 0; color: #cfcfd4; font-size: 16.5px; line-height: 1.75; }
.home .legal h1 { margin: 0; color: var(--text); font-size: clamp(40px, 5vw, 58px); font-weight: 450; letter-spacing: -.035em; line-height: 1.05; }
.home .legal .updated { margin: 14px 0 44px; color: var(--faint); }
.home .legal h2 { margin: 46px 0 10px; font-size: 24px; font-weight: 500; letter-spacing: -.4px; }
.home .legal strong { color: var(--text); font-weight: 500; }

/* hero + "short version" cards on top, the details underneath */
.pv-short-section { padding-top: 72px; }
.pv-label { margin: 0 0 16px; color: var(--faint); font-size: 14px; font-weight: 500; letter-spacing: .02em; }
.pv-short { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pv-short .ac { padding: 24px 22px 26px; }
.pv-short svg {
  width: 24px; height: 24px; margin-bottom: 18px;
  fill: none; stroke: #d4d4d8; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.pv-short .ac-name { margin-bottom: 6px; font-size: 17px; }
.pv-text { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.home .pv-legal { padding-top: 64px; }
.home .pv-legal h2 { margin: 40px 0 10px; padding-top: 36px; border-top: 1px solid var(--line); }
.home .pv-legal h2:first-child { margin-top: 0; }
@media (max-width: 1000px) { .pv-short { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .pv-short { grid-template-columns: 1fr; } .pv-short-section { padding-top: 56px; } }
