/* ==========================================================================
   Mass 控制前台 — site styles
   1. Tokens        5. Navigation    9.  Closing CTA
   2. Base          6. Hero          10. Footer
   3. Typography    7. Overview      11. Invite dialog
   4. Components    8. Steps         12. Motion
   ========================================================================== */

/* 1. Tokens --------------------------------------------------------------- */
:root {
  /* Brand — blue from the logo cube */
  --blue: #0057c4;
  --blue-hover: #004bad;
  --blue-press: #00419a;
  --blue-sky: #4fb8f7;
  --blue-50: #edf4fe;

  /* Cool neutrals */
  --ink: #0d1726;
  --ink-2: #445063;
  --ink-3: #5e697a;
  --bg: #eef3fa;
  --surface: #fff;
  --surface-2: #f6f9fd;
  --line: rgba(13, 23, 38, .08);
  --line-2: rgba(13, 23, 38, .14);
  --navy: #0b1424;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --nav-h: 64px;
  --section-y: clamp(88px, 10vw, 152px);
  --grid: 120px;

  /* Shape */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;

  --shadow-window:
    0 0 0 1px rgba(13, 23, 38, .06),
    0 2px 4px rgba(13, 23, 38, .04),
    0 16px 32px -12px rgba(13, 32, 64, .16),
    0 48px 96px -32px rgba(13, 40, 90, .26);

  /* Motion */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --t-fast: .16s;
  --t: .24s;
}

/* 2. Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.is-menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
em { font-style: normal; }
::selection { background: rgba(0, 87, 196, .16); }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }

/* Keeps a phrase intact so CJK text wraps at natural pauses. */
.nw { white-space: nowrap; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  transform: translateY(-160%);
  transition: transform var(--t) var(--ease);
}
.skip-link:focus-visible { transform: none; }

/* 3. Typography ----------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.4;
}

/* The small square is the logo cube, reused as the page's one motif. */
.cube,
.eyebrow::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 1.5px;
  background: var(--blue);
}

.h2 {
  font-size: clamp(28px, 1.6vw + 18px, 44px);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.lead {
  color: var(--ink-2);
  font-size: clamp(16px, .25vw + 15px, 18px);
  line-height: 1.75;
  max-width: 30em;
}

/* 4. Components ----------------------------------------------------------- */
.icon {
  flex: none;
  width: 1.15em;
  height: 1.15em;
  fill: currentColor;
}
.icon--sm { width: 1em; height: 1em; }
.icon--xs { width: .85em; height: .85em; }

/* Buttons: primary / secondary / text, three sizes, one shape. */
.btn {
  --h: 44px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--h);
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color var(--t) var(--ease),
    border-color var(--t) var(--ease),
    color var(--t) var(--ease),
    box-shadow var(--t) var(--ease),
    transform var(--t-fast) var(--ease);
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn--sm { --h: 36px; padding: 0 14px; font-size: 14px; }
.btn--lg { --h: 50px; padding: 0 22px; font-size: 16px; }

.btn--primary {
  color: #fff;
  background: var(--blue);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    0 1px 2px rgba(0, 40, 100, .18),
    0 8px 20px -10px rgba(0, 87, 196, .65);
}
.btn--primary:hover {
  background: var(--blue-hover);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    0 1px 2px rgba(0, 40, 100, .2),
    0 12px 28px -10px rgba(0, 87, 196, .75);
}
.btn--primary:active { background: var(--blue-press); }
.btn--primary.btn--sm,
.btn--primary.btn--sm:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 1px 2px rgba(0, 40, 100, .2);
}

.btn--secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line-2);
  box-shadow: 0 1px 2px rgba(13, 23, 38, .05);
}
.btn--secondary:hover {
  border-color: rgba(13, 23, 38, .26);
  box-shadow: 0 4px 12px -4px rgba(13, 23, 38, .12);
}

.btn--on-dark.btn--secondary {
  color: #fff;
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .16);
  box-shadow: none;
}
.btn--on-dark.btn--secondary:hover {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .3);
}

.btn--text {
  --h: 44px;
  padding: 0 6px;
  color: var(--ink-2);
}
.btn--text:hover { color: var(--ink); }
.btn__arrow { opacity: .6; transition: transform var(--t) var(--ease), opacity var(--t) var(--ease); }
.btn--text:hover .btn__arrow { opacity: 1; transform: translateX(3px); }

/* Product window: screenshots already carry Win11 chrome, so only add depth. */
.app-window {
  position: relative;
  border-radius: clamp(6px, .55vw, 10px);
  background: #eef3f9;
  box-shadow: var(--shadow-window);
}
.app-window img {
  width: 100%;
  height: auto;
  border-radius: inherit;
  -webkit-user-drag: none;
}

/* Block grid — the brand's Minecraft-grid motif (hero + closing CTA). */
.grid-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.grid-lines {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  /* Centered on the viewport so container edges land exactly on grid lines. */
  width: calc(var(--grid) * 32);
  margin-left: calc(var(--grid) * -16);
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: var(--grid) var(--grid);
}
.grid-cell {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--grid) + 1px);
  height: calc(var(--grid) + 1px);
  background: var(--cell-fill);
  box-shadow: inset 0 0 0 1px var(--cell-line);
  opacity: 0;
  transition: transform .22s var(--ease), opacity .3s var(--ease);
  will-change: transform;
}
.grid-cell.is-on { opacity: 1; }
.grid-cell.is-instant { transition: opacity .3s var(--ease); }

/* 5. Navigation ----------------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .76);
  -webkit-backdrop-filter: saturate(1.8) blur(16px);
  backdrop-filter: saturate(1.8) blur(16px);
  opacity: 0;
  transition: opacity .3s var(--ease), background-color .3s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav.is-scrolled::before { opacity: 1; }

.nav__inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.nav__brand img {
  width: auto;
  height: 24px;
  transition: transform .4s var(--ease);
}
.nav__brand:hover img { transform: rotate(-6deg) scale(1.04); }

.nav__links { display: flex; align-items: center; gap: 2px; }
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
  transition: color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.nav__link:hover { color: var(--ink); background: rgba(13, 23, 38, .05); }
.nav__link .icon { opacity: .5; }
.nav__link.is-active { color: var(--ink); }
.nav__link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 14px;
  height: 2px;
  margin-left: -7px;
  border-radius: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transition: transform .3s var(--ease);
}
.nav__link.is-active::after { transform: scaleX(1); }

.nav__actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav__icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: 20px;
  transition: color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.nav__icon:hover { color: #5865f2; background: rgba(88, 101, 242, .08); }

.nav__toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  -webkit-tap-highlight-color: transparent;
}
.nav__toggle-icon,
.nav__toggle-icon::before,
.nav__toggle-icon::after {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 1.5px;
  margin-left: -9px;
  border-radius: 1px;
  background: var(--ink);
}
.nav__toggle-icon { background: transparent; }
.nav__toggle-icon::before,
.nav__toggle-icon::after {
  content: "";
  transition: transform .32s var(--ease);
}
.nav__toggle-icon::before { transform: translateY(-4px); }
.nav__toggle-icon::after { transform: translateY(4px); }
.nav__toggle[aria-expanded="true"] .nav__toggle-icon::before { transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-icon::after { transform: rotate(-45deg); }

.nav__menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 4px 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 48px -20px rgba(13, 23, 38, .22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .22s var(--ease), transform .32s var(--ease), visibility 0s linear .32s;
}
.nav__menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  font-weight: 500;
}
.nav__menu a .icon { color: var(--ink-3); }
.nav__menu a:last-child { border-bottom: 0; }

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(11, 20, 36, .32);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s var(--ease);
}

body.is-menu-open .nav::before { opacity: 1; background: var(--surface); }
body.is-menu-open .nav { border-bottom-color: var(--line); }
body.is-menu-open .nav__menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
body.is-menu-open .nav-scrim { opacity: 1; pointer-events: auto; }

@media (max-width: 639px) {
  :root { --nav-h: 60px; }
  .nav__links,
  .nav__icon { display: none; }
  .nav__toggle { display: inline-block; margin-right: -8px; }
}

/* 6. Hero ----------------------------------------------------------------- */
.hero {
  --grid-line: rgba(13, 23, 38, .065);
  --cell-fill: rgba(0, 87, 196, .07);
  --cell-line: rgba(0, 87, 196, .4);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: clamp(680px, 100svh, 1000px);
  padding: calc(var(--nav-h) + 40px) 0 72px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 62%, var(--surface) 100%);
}

.hero__bg {
  -webkit-mask-image: radial-gradient(120% 85% at 32% 30%, #000 30%, transparent 78%);
  mask-image: radial-gradient(120% 85% at 32% 30%, #000 30%, transparent 78%);
}

.hero__glow {
  position: absolute;
  right: -12vw;
  top: 8%;
  width: 72vw;
  height: 72vw;
  max-width: 1100px;
  max-height: 1100px;
  background: radial-gradient(closest-side, rgba(79, 184, 247, .22), rgba(0, 87, 196, .07) 55%, transparent);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
}

.hero__copy {
  position: relative;
  z-index: 2;
  padding-right: 48px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .02em;
}

.hero__title {
  margin-top: 22px;
  font-size: clamp(44px, 3.4vw + 26px, 80px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.03em;
}
/* Each line is masked so it can rise into place. */
.hero__line {
  display: block;
  overflow: hidden;
  padding-bottom: .06em;
  margin-bottom: -.06em;
}
.hero__line > span { display: block; }

.hero__rotator {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  margin-top: 30px;
  font-size: clamp(20px, .8vw + 13px, 28px);
  font-weight: 600;
  line-height: 1;
  -webkit-user-select: none;
  user-select: none;
}
.hero__rotator-label { color: var(--ink-2); }

.hero-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--chip-w, auto);
  height: 1.9em;
  padding: 0 .6em;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--blue);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    0 10px 24px -12px rgba(0, 87, 196, .7);
  transition: width .5s var(--ease);
}
.hero-chip__viewport { position: relative; display: inline-block; height: 1.1em; line-height: 1.1; }
.hero-chip__line { display: inline-flex; white-space: nowrap; }
.hero-chip__line--next { position: absolute; left: 50%; top: 0; transform: translateX(-50%); }
.hero-chip__char { display: inline-block; white-space: pre; }
.hero-chip__line--next .hero-chip__char { opacity: 0; transform: translateY(110%); }
.hero-chip.is-switching .hero-chip__line:not(.hero-chip__line--next) .hero-chip__char {
  animation: chip-out .42s var(--ease) forwards;
  animation-delay: calc(var(--ci) * 22ms);
}
.hero-chip.is-switching .hero-chip__line--next .hero-chip__char {
  animation: chip-in .42s var(--ease) forwards;
  animation-delay: calc(var(--ci) * 22ms);
}
.hero-chip__meter { position: absolute; visibility: hidden; white-space: pre; }
@keyframes chip-out { to { opacity: 0; transform: translateY(-110%); } }
@keyframes chip-in { to { opacity: 1; transform: none; } }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
}
.hero__actions .btn--text { margin-left: 4px; }

.hero__visual {
  position: relative;
  z-index: 1;
  width: clamp(640px, 62vw, 1060px);
}

/* Hero entrance — runs once on load, staggered top to bottom. */
.hero__eyebrow,
.hero__rotator,
.hero__actions { animation: rise .8s var(--ease) both; }
.hero__eyebrow { animation-delay: .05s; }
.hero__rotator { animation-delay: .42s; }
.hero__actions { animation-delay: .52s; }
.hero__line > span { animation: line-up .95s var(--ease) both; }
.hero__line:nth-child(1) > span { animation-delay: .12s; }
.hero__line:nth-child(2) > span { animation-delay: .22s; }
.hero__visual { animation: window-in 1.2s var(--ease) .3s both; }
.hero__bg { animation: fade 1.4s ease both; }

@keyframes rise { from { opacity: 0; transform: translate3d(0, 16px, 0); } }
@keyframes line-up { from { transform: translate3d(0, 105%, 0); } }
@keyframes window-in { from { opacity: 0; transform: translate3d(0, 40px, 0) scale(.98); } }
@keyframes fade { from { opacity: 0; } }

@media (max-width: 1279px) {
  .hero__copy { padding-right: 32px; }
}

@media (max-width: 1023px) {
  .hero {
    display: block;
    min-height: 0;
    padding: calc(var(--nav-h) + 64px) 0 0;
  }
  .hero__bg {
    -webkit-mask-image: radial-gradient(140% 70% at 20% 20%, #000 30%, transparent 75%);
    mask-image: radial-gradient(140% 70% at 20% 20%, #000 30%, transparent 75%);
  }
  .hero__glow { right: -40vw; top: 40%; width: 120vw; height: 120vw; }
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__copy { padding-right: 0; max-width: 640px; }
  /* The window bleeds off the right edge; the frame crops it to its top
     portion and fades it into the next section. --bleed is relative to the
     column, --show is the visible share of the window's height (0.533 = aspect). */
  .hero__visual {
    --bleed: 1.18;
    --show: .74;
    --pad: 32px;
    width: calc(100% * var(--bleed) + var(--pad));
    height: calc((100vw - var(--gutter) * 2) * var(--bleed) * .533 * var(--show) + var(--pad));
    margin: 40px 0 0 calc(var(--pad) * -1);
    padding: var(--pad) 0 0 var(--pad);
    -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent);
    mask-image: linear-gradient(to bottom, #000 45%, transparent);
  }
}

@media (max-width: 639px) {
  :root { --grid: 96px; }
  .hero { padding-top: calc(var(--nav-h) + 44px); }
  .hero__eyebrow { font-size: 15px; }
  .hero__title { margin-top: 18px; font-size: clamp(40px, 11.6vw, 54px); letter-spacing: -.025em; }
  .hero__rotator { margin-top: 24px; gap: 10px; font-size: clamp(19px, 5.4vw, 23px); }
  .hero__actions { margin-top: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero__actions .btn--lg { --h: 48px; padding: 0 12px; font-size: 15px; }
  .hero__actions .btn--text { grid-column: 1 / -1; justify-self: start; margin-left: -6px; }
  .hero__visual { --bleed: 1.5; --show: .72; --pad: 24px; margin-top: 28px; }
}

@media (max-width: 359px) {
  .hero__actions { grid-template-columns: 1fr; }
}

/* 7. Overview ------------------------------------------------------------- */
.overview { padding-bottom: calc(var(--section-y) * .75); }

.overview__statement {
  max-width: 24em;
  color: var(--ink-3);
  font-size: clamp(24px, 1.9vw + 12px, 40px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.overview__statement em { color: var(--ink); }

.specs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(56px, 6vw, 88px);
  border-top: 1px solid var(--line-2);
}
.spec {
  position: relative;
  padding: 28px 24px 4px;
  border-left: 1px solid var(--line);
}
.spec:first-child { padding-left: 0; border-left: 0; }
.spec::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 24px;
  width: 24px;
  height: 2px;
  background: var(--blue);
}
.spec:first-child::before { left: 0; }
.spec dt {
  font-size: clamp(28px, 1.4vw + 16px, 40px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.spec dd {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
}

@media (max-width: 899px) {
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 0; }
  .spec,
  .spec:first-child {
    padding: 24px 16px 28px 0;
    border-left: 0;
    border-top: 1px solid var(--line-2);
  }
  .spec:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
  .spec::before,
  .spec:first-child::before { left: 0; }
  .spec:nth-child(even)::before { left: 20px; }
}

@media (max-width: 479px) {
  .spec dd { font-size: 14px; }
}

/* 8. Steps ---------------------------------------------------------------- */
.steps { --step-ms: 7000ms; padding-top: 0; }
.steps > .container::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: calc(var(--section-y) * .75);
  background: var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 26em);
  align-items: end;
  gap: 24px 64px;
  scroll-margin-top: calc(var(--nav-h) + 40px);
}
.section-head .h2 { margin-top: 16px; }
.section-head .lead { padding-bottom: 6px; }

.steps__tabs { display: none; }

.steps__panels { margin-top: clamp(40px, 5vw, 64px); }

.step__num {
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}
.step__title {
  margin-top: 12px;
  font-size: clamp(22px, .8vw + 16px, 28px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.015em;
}
.step__desc {
  margin-top: 12px;
  max-width: 30em;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.8;
}
.step__list { display: grid; gap: 10px; }
.step__list li {
  position: relative;
  padding-left: 20px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
}
.step__list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .62em;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--blue);
}

/* The stage is a tinted panel that frames each window like a desktop. */
.step__stage {
  --grid-line: rgba(0, 87, 196, .07);
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background:
    radial-gradient(70% 60% at 50% 100%, rgba(79, 184, 247, .22), transparent 70%),
    linear-gradient(180deg, #eaf1fa, #dde8f6);
  isolation: isolate;
}
.step__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
.step__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(13, 23, 38, .05);
  pointer-events: none;
}

/* Stacked layout (default / small screens). */
.step + .step { margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--line); }
.step__copy { display: grid; gap: 20px; }
.step__stage { margin-top: 28px; aspect-ratio: 4 / 3; }
.step__stage .app-window {
  position: absolute;
  left: 20px;
  top: 24px;
  width: 168%;
}

/* Tabbed layout (JS enabled, ≥ 768px). */
.steps.is-tabs .steps__tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: clamp(40px, 5vw, 64px);
}
.steps.is-tabs .steps__panels { display: grid; margin-top: 40px; }
.steps.is-tabs .step {
  grid-area: 1 / 1;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s var(--ease), visibility 0s linear .4s;
}
.steps.is-tabs .step.is-active {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}
.steps.is-tabs .step__num { display: none; }
.steps.is-tabs .step__copy {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: start;
  gap: 24px 64px;
}
.steps.is-tabs .step__title { margin-top: 0; }
.steps.is-tabs .step__list { padding-top: 6px; }
/* Stage ratio is derived from the window (90% wide, 2858×1524) so ~15% of it
   bleeds past the bottom edge; `top` is a % of the stage height. */
.steps.is-tabs .step__stage { margin-top: 36px; aspect-ratio: 9 / 4; }
.steps.is-tabs .step__stage .app-window {
  left: 50%;
  top: 7.9%;
  width: 90%;
  transform: translateX(-50%);
}
.steps.is-tabs .step .step__copy,
.steps.is-tabs .step .app-window img {
  transition: transform .7s var(--ease);
}
.steps.is-tabs .step:not(.is-active) .step__copy { transform: translate3d(0, 8px, 0); }
.steps.is-tabs .step:not(.is-active) .app-window img { transform: translate3d(0, 18px, 0); }

.steps__tab {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 18px 0 6px;
  text-align: left;
  color: var(--ink-3);
  -webkit-tap-highlight-color: transparent;
  transition: color var(--t) var(--ease);
}
.steps__tab:hover { color: var(--ink-2); }
.steps__tab[aria-selected="true"] { color: var(--ink); }
.steps__tab:focus-visible { outline-offset: 4px; }
.steps__tab-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line-2);
}
.steps__tab-fill {
  position: absolute;
  inset: 0;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left center;
}
.steps__tab[aria-selected="true"] .steps__tab-fill {
  transform: scaleX(1);
  transition: transform .5s var(--ease);
}
.steps.is-auto .steps__tab[aria-selected="true"] .steps__tab-fill {
  transition: none;
  animation: tab-progress var(--step-ms, 6500ms) linear both;
}
.steps.is-auto.is-paused .steps__tab[aria-selected="true"] .steps__tab-fill { animation-play-state: paused; }
@keyframes tab-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.steps__tab-num {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  transition: color var(--t) var(--ease);
}
.steps__tab[aria-selected="true"] .steps__tab-num { color: var(--blue); }
.steps__tab-label { font-size: 16px; font-weight: 600; }

@media (max-width: 1023px) {
  .section-head { grid-template-columns: 1fr; }
  .steps.is-tabs .step__copy { grid-template-columns: 1fr; gap: 20px; }
  .steps.is-tabs .step__stage { aspect-ratio: 11 / 5; }
  .steps.is-tabs .step__stage .app-window { width: 92%; top: 8.8%; }
}

@media (max-width: 767px) {
  .step__title { margin-top: 10px; }
}

/* 9. Closing CTA ---------------------------------------------------------- */
.cta {
  --grid-line: rgba(255, 255, 255, .055);
  --cell-fill: rgba(79, 184, 247, .1);
  --cell-line: rgba(79, 184, 247, .5);
  position: relative;
  overflow: hidden;
  padding: clamp(104px, 12vw, 176px) 0 clamp(88px, 9vw, 136px);
  background: var(--navy);
  color: #fff;
  text-align: center;
  isolation: isolate;
}
.cta__bg {
  z-index: -1;
  background: radial-gradient(60% 70% at 50% 0%, rgba(0, 87, 196, .38), transparent 70%);
  -webkit-mask-image: radial-gradient(75% 90% at 50% 10%, #000 30%, transparent 85%);
  mask-image: radial-gradient(75% 90% at 50% 10%, #000 30%, transparent 85%);
}
.cta__inner { position: relative; }
.cta__mark { width: 64px; height: auto; margin: 0 auto 32px; }
.cta__title {
  font-size: clamp(32px, 2.4vw + 16px, 52px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.cta__desc {
  margin: 20px auto 0;
  max-width: 32em;
  color: rgba(255, 255, 255, .66);
  font-size: clamp(16px, .25vw + 15px, 18px);
  line-height: 1.8;
}
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 44px;
}
.cta :focus-visible { outline-color: var(--blue-sky); }

@media (max-width: 519px) {
  .cta { text-align: left; }
  .cta__mark { margin-left: 0; }
  .cta__desc br { display: none; }
  .cta__actions { display: grid; grid-template-columns: 1fr 1fr; justify-content: stretch; }
  .cta__actions .btn--primary { grid-column: 1 / -1; }
}

/* 10. Footer -------------------------------------------------------------- */
.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, .56);
  font-size: 14px;
}
.footer__inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 40px;
  padding-block: 32px calc(32px + env(safe-area-inset-bottom));
}
.footer__inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: rgba(255, 255, 255, .08);
}
.footer__brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.footer__brand img { height: 21px; width: auto; }
.footer__name { color: #fff; font-size: 16px; font-weight: 700; }
.footer__tagline { padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .14); }
.footer__links { display: flex; gap: 28px; }
.footer__links a { transition: color var(--t) var(--ease); }
.footer__links a:hover { color: #fff; }
.footer__copy { font-variant-numeric: tabular-nums; }
.footer :focus-visible { outline-color: var(--blue-sky); }

@media (max-width: 767px) {
  .footer__inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer__brand { flex-wrap: wrap; }
}

/* 11. Invite dialog ------------------------------------------------------- */
html:has(.invite[open]) { overflow: hidden; }

.invite {
  width: min(440px, calc(100% - 32px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}
.invite::backdrop {
  background: rgba(11, 20, 36, .44);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.invite[open] { animation: dialog-in .55s var(--ease) both; }
.invite[open]::backdrop { animation: fade .3s ease both; }
.invite.is-closing { animation: dialog-out .2s ease-in both; }
.invite.is-closing::backdrop { animation: fade .2s ease-in reverse both; }
@keyframes dialog-in { from { opacity: 0; transform: translate3d(0, 20px, 0) scale(.97); } }
@keyframes dialog-out { to { opacity: 0; transform: translate3d(0, 8px, 0) scale(.98); } }

.invite__card {
  --grid: 32px;
  --grid-line: rgba(0, 87, 196, .08);
  position: relative;
  overflow: hidden;
  padding: 44px 36px 32px;
  border-radius: var(--r-lg);
  background: var(--surface);
  text-align: center;
  box-shadow: 0 0 0 1px rgba(13, 23, 38, .06), 0 32px 80px -16px rgba(11, 20, 36, .4);
}
.invite__art {
  height: 168px;
  bottom: auto;
  background: linear-gradient(180deg, var(--blue-50), transparent);
  -webkit-mask-image: radial-gradient(60% 100% at 50% 0%, #000 30%, transparent 90%);
  mask-image: radial-gradient(60% 100% at 50% 0%, #000 30%, transparent 90%);
}
.invite__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 24px;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  font-size: 26px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 12px 24px -10px rgba(0, 87, 196, .7);
  animation: pop .6s var(--ease) .15s both;
}
@keyframes pop { from { opacity: 0; transform: scale(.6); } }
.invite__eyebrow { position: relative; color: var(--blue); font-size: 13px; font-weight: 600; letter-spacing: .06em; }
.invite__title { position: relative; margin-top: 6px; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.invite__desc { margin-top: 8px; color: var(--ink-2); font-size: 15px; line-height: 1.6; }

.invite__code {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 6px 6px 6px 16px;
  border: 1px dashed rgba(0, 87, 196, .35);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.invite__code-value {
  flex: 1;
  min-width: 0;
  text-align: left;
  font: 600 16px/1.4 var(--mono);
  letter-spacing: .06em;
  overflow-wrap: anywhere;
  -webkit-user-select: all;
  user-select: all;
}
.invite__copy {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.invite__copy:hover { border-color: rgba(13, 23, 38, .26); }
.invite__copy:active { transform: scale(.97); }
.invite__copy.is-copied { color: #0a7a4c; border-color: rgba(10, 122, 76, .3); background: #edf9f3; }

.invite__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 28px;
}

@media (max-width: 419px) {
  .invite__card { padding: 36px 20px 20px; }
  .invite__actions { grid-template-columns: 1fr; }
}

/* 12. Motion -------------------------------------------------------------- */
/* Scroll reveal — hidden only when JS is present; the inline failsafe adds .no-reveal. */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js [data-reveal].is-in,
.no-reveal [data-reveal] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}
